pub fn i012_alpha_to_rgba(
planar_image_with_alpha: &YuvPlanarImageWithAlpha<'_, u16>,
dst: &mut [u8],
dst_stride: u32,
range: YuvRange,
matrix: YuvStandardMatrix,
) -> Result<(), YuvError>Expand description
Convert I012A planar format with 12 bit pixel format to RGBA 8 bit-depth format with interleaving alpha.
This function takes I012A planar data with 12 bit precision and interleaved provided alpha channel, and converts it to RGBA format with 8 bit-depth precision per channel.
§Arguments
planar_image- Source I012A planar image.rgba- A mutable slice to store the converted RGBA 8 bit-depth data.rgba_stride- The stride (components per row) for RGBA 8 bit-depth data.range- The YUV range (limited or full).matrix- The YUV standard matrix (BT.601 or BT.709 or BT.2020 or other).bit_depth- Bit depth of source YUV planes, only 10 and 12 is supported.
§Panics
This function panics if the lengths of the planes or the input RGBA data are not valid based on the specified width, height, and strides, or if invalid YUV range or matrix is provided.