#[non_exhaustive]pub struct Color {
pub primaries: Option<u8>,
pub transfer: Option<u8>,
pub matrix: Option<u8>,
pub range: Option<ColorRange>,
pub mastering: Option<Mastering>,
pub content_light: Option<ContentLight>,
}Expand description
The colour a rendition’s pixels carry, so a renderer can set up its pipeline without reparsing the bitstream.
The first four fields are ITU-T H.273 (ISO/IEC 23091-2) code points, the numbering H.264 and
H.265 VUI, AV1, VP9, and the ISOBMFF colr box all share. Absent means the source left it
unspecified, never a signalled default.
Marked #[non_exhaustive]: start from Color::default and assign the fields you know.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.primaries: Option<u8>The chromaticities of the source primaries, as H.273 ColourPrimaries (1 is BT.709, 9 is BT.2020).
transfer: Option<u8>The transfer function, as H.273 TransferCharacteristics (1 is BT.709, 16 is PQ, 18 is HLG).
matrix: Option<u8>The matrix between RGB and Y’CbCr, as H.273 MatrixCoefficients (0 is RGB, 1 is BT.709, 9 is BT.2020 NCL).
range: Option<ColorRange>The numeric range of the samples.
mastering: Option<Mastering>The display the content was mastered on, as SMPTE ST 2086.
content_light: Option<ContentLight>The content’s light levels, as CTA-861.3.