yuv444_alpha_to_rgba

Function yuv444_alpha_to_rgba 

Source
pub fn yuv444_alpha_to_rgba(
    planar_with_alpha: &YuvPlanarImageWithAlpha<'_, u8>,
    rgba: &mut [u8],
    rgba_stride: u32,
    range: YuvRange,
    matrix: YuvStandardMatrix,
    premultiply_alpha: bool,
) -> Result<(), YuvError>
Expand description

Convert YUV 444 planar format to RGBA format and appends provided alpha channel.

This function takes YUV 444 planar format data with 8-bit precision, and converts it to RGBA format with 8-bit per channel precision.

§Arguments

  • planar_with_alpha - Source planar image.
  • rgba - A mutable slice to store the converted RGBA data.
  • rgba_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).
  • premultiply_alpha - Flag to premultiply alpha or not

§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.