Skip to main content

Module pixel

Module pixel 

Source
Expand description

Pixel format definitions for video processing.

This module provides the PixelFormat enum which represents various pixel formats used in video processing. It supports both packed (RGB/BGRA) and planar (YUV) formats commonly used in video editing.

§Examples

use ff_format::PixelFormat;

let format = PixelFormat::Yuv420p;
assert!(format.is_planar());
assert!(!format.is_packed());
assert_eq!(format.num_planes(), 3);

let rgba = PixelFormat::Rgba;
assert!(rgba.has_alpha());
assert_eq!(rgba.bits_per_pixel(), Some(32));

Enums§

PixelFormat
Pixel format for video frames.