Function ravif::encode_raw_planes[][src]

pub fn encode_raw_planes(
    width: usize,
    height: usize,
    y_plane: &[u8],
    u_plane: &[u8],
    v_plane: &[u8],
    a_plane: Option<&[u8]>,
    color_pixel_range: PixelRange,
    config: &EncConfig
) -> Result<(Vec<u8>, usize, usize), Box<dyn Error + Send + Sync>>
Expand description

If config.color_space is ColorSpace::YCbCr, then it takes 8-bit BT709 color space.

Alpha always uses full range. Chroma subsampling is not supported, and it’s a bad idea for AVIF anyway.

returns AVIF file, size of color metadata, size of alpha metadata overhead