y012_to_rgb12

Function y012_to_rgb12 

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

Convert Y012 format to RGBA 12-bit format.

This function takes Y012 format data with RGBA 12-bit precision, and converts it to RGBA 12-bit per channel precision.

§Arguments

  • gray_image - Source Y012 gray image.
  • rgb_data - A mutable slice to store the converted RGBA12 data.
  • rgb_stride - Elements per row.
  • 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 RGB data are not valid based on the specified width, height, and strides, or if invalid YUV range or matrix is provided.