i212_to_rgb12

Function i212_to_rgb12 

Source
pub fn i212_to_rgb12(
    planar_image: &YuvPlanarImage<'_, u16>,
    dst: &mut [u16],
    dst_stride: u32,
    range: YuvRange,
    matrix: YuvStandardMatrix,
) -> Result<(), YuvError>
Expand description

Convert I212 planar format with 12 bit pixel format to RGB 12 bit-depth format.

This function takes I212 planar data with 12 bit precision. and converts it to RGB format with 12 bit-depth precision per channel

§Arguments

  • planar_image - Source I212 planar image.
  • rgb - A mutable slice to store the converted RGB 12 bit-depth data.
  • rgb_stride - The stride (components per row) for RGB 12 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).
  • endianness - The endianness of stored bytes
  • bytes_packing - see YuvBytesPacking for more info.
  • 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 RGB data are not valid based on the specified width, height, and strides, or if invalid YUV range or matrix is provided.