pub fn bgra_to_sharp_yuv422(
planar_image: &mut YuvPlanarImageMut<'_, u8>,
bgra: &[u8],
bgra_stride: u32,
range: YuvRange,
matrix: YuvStandardMatrix,
gamma_transfer: SharpYuvGammaTransfer,
) -> Result<(), YuvError>Expand description
Convert BGRA image data to YUV 422 planar format using bi-linear interpolation and gamma correction ( sharp YUV algorithm ).
This function performs BGRA to YUV conversion using bi-linear interpolation and gamma correction and stores the result in YUV422 planar format using bi-linear interpolation and gamma correction, with separate planes for Y (luminance), U (chrominance), and V (chrominance) components.
§Arguments
planar_image- Target planar image.bgra- The input BGRA image data slice.bgra_stride- The stride (components per row) for the BGRA image data.range- The YUV range (limited or full).matrix- The YUV standard matrix (BT.601 or BT.709 or BT.2020 or other).
§Panics
This function panics if the lengths of the planes or the input BGRA data are not valid based on the specified width, height, and strides, or if invalid YUV range or matrix is provided.