yuv444_to_yvyu422

Function yuv444_to_yvyu422 

Source
pub fn yuv444_to_yvyu422(
    packed_image: &mut YuvPackedImageMut<'_, u8>,
    planar_image: &YuvPlanarImage<'_, u8>,
) -> Result<(), YuvError>
Expand description

Convert YUV 444 planar format to YVYU ( YUV Packed ) format.

This function takes YUV 444 planar format data with 8-bit precision, and converts it to YVYU format with 8-bit per channel precision. Do not forget about odd alignment, use (width + 1) for buffers.

§Arguments

  • packed_image - Target packed frame image.
  • planar_image - Source planar image.

§Panics

This function panics if the lengths of the planes or the input YVYU data are not valid based on the specified width, height, and strides, or if invalid YUV range or matrix is provided. Panic will be received if buffer doesn’t expand with (width + 1) size for odd width