rgb16_to_p016

Function rgb16_to_p016 

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

Convert RGB16 image data to P016 format.

This function performs RGB16 to P016 conversion and stores the result in P016 format, with separate planes for Y (luminance), UV (chrominance) components.

§Arguments

  • bi_planar_image - Target Bi-Planar P016 image.
  • dst - The input RGB16 image data slice.
  • dst_stride - The stride (components per row) for the RGB16 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 RGB data are not valid based on the specified width, height, and strides, or if invalid YUV range or matrix is provided.