#[non_exhaustive]pub enum PixelFormat {
Yuv(YuvFormat),
Rgba8,
LinearRgbaF16,
}Expand description
Plane organization delivered by a decoder.
A Decoder delivers only the layouts the render stage consumes directly:
planar or semi-planar YCbCr of any chroma subsampling and bit depth that
YuvFormat describes, 8-bit RGBA, and linear-light half-float RGBA for
sources with more range than 8 bits hold. Every other decoded layout, such as
packed RGB orders, palettes, or YCbCr with alpha, must be converted by the
decoder before it is handed over, and is then reported as
PixelFormat::Rgba8. The bundled native decoder does this with
libswscale; a custom decoder is responsible for the same conversion.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
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-light red, green, blue, alpha in one plane, each
a little-endian IEEE 754 half float, in BT.709 primaries with 1.0 at
SDR white. Values above 1.0 and below 0.0 are allowed; the frame’s
color metadata does not apply.