#[non_exhaustive]pub enum PixelFormat {
Yuv(YuvFormat),
Rgba8,
LinearRgbaF16,
}Expand description
Plane organization delivered by a decoder.
A Decoder delivers only layouts the renderer consumes directly: YuvFormat YCbCr,
8-bit RGBA, and linear half-float RGBA for high-range sources. Decoders must convert any
other layout (packed RGB, palettes and so on) and report it as PixelFormat::Rgba8.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Yuv(YuvFormat)
Planar or semi-planar YCbCr, one Plane per stored plane.
Rgba8
Straight-alpha 8-bit red, green, blue, alpha in one plane.
LinearRgbaF16
Premultiplied linear RGBA in one plane of little-endian half floats, BT.709 primaries,
1.0 at SDR white. Values outside 0..=1 are allowed, and the frame’s color metadata
does not apply.
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
impl Copy for PixelFormat
Source§impl Debug for PixelFormat
impl Debug for PixelFormat
impl Eq for PixelFormat
Source§impl PartialEq for PixelFormat
impl PartialEq for PixelFormat
impl StructuralPartialEq for PixelFormat
Auto Trait Implementations§
impl Freeze for PixelFormat
impl RefUnwindSafe for PixelFormat
impl Send for PixelFormat
impl Sync for PixelFormat
impl Unpin for PixelFormat
impl UnsafeUnpin for PixelFormat
impl UnwindSafe for PixelFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more