pub struct ColorMetadata {
pub transfer: TransferFn,
pub matrix_coefficients: u8,
pub colour_primaries: u8,
pub full_range: bool,
pub mastering_display: Option<MasteringDisplay>,
pub content_light_level: Option<ContentLightLevel>,
}Expand description
HDR / wide-gamut metadata carried from SPS VUI through the pipeline
to the MP4 mux colr nclx box. All values default to an SDR
BT.709 baseline so un-annotated StreamInfo constructions stay
backward-compatible.
Fields§
§transfer: TransferFnTransfer function per ITU-T H.273. Defaults to Bt709 for SDR. HDR10 streams populate this with St2084 (PQ); HLG broadcasts with AribStdB67.
matrix_coefficients: u8Raw H.273 matrix_coefficients (0–255). Preserves the ncl/cl
distinction the ColorSpace enum collapses: 9 = BT.2020 NCL,
10 = BT.2020 CL. Mux writes this verbatim into colr nclx.
colour_primaries: u8Raw H.273 colour_primaries (0–255). Written verbatim into
colr nclx.
full_range: boolfull_range_flag (H.273): false = studio/limited-range (16..235),
true = full-range (0..255). HEVC SPS VUI exposes this directly.
mastering_display: Option<MasteringDisplay>HDR10 mastering display color volume (SMPTE ST 2086, HEVC SEI 137,
AV1 metadata OBU type 2 HDR_MDCV, MP4 mdcv box, MKV
MasteringMetadata). None for SDR sources or when the
upstream did not signal it. Carried to the MP4 mux’s mdcv box
per ISO/IEC 14496-12 §12.1.6 / AV1-ISOBMFF v1.3.0 (Squad-20).
Populated by Squad-21 from HEVC SEI 137 / AV1 metadata OBU
METADATA_TYPE_HDR_MDCV / MP4 mdcv / MKV MasteringMetadata.
Without it, Apple devices fall back to BT.709 limited even when
colr nclx signals BT.2020.
content_light_level: Option<ContentLightLevel>HDR10 content light level info (CTA-861.3, HEVC SEI 144, AV1
metadata OBU type 1 HDR_CLL, MP4 clli, MKV MaxCLL +
MaxFALL). None for SDR or unsignalled HDR. Carried to the
MP4 mux’s clli box per ISO/IEC 14496-12 §12.1.6 / AV1-ISOBMFF
v1.3.0 (Squad-20). Populated by Squad-21 from HEVC SEI 144 / AV1
metadata OBU METADATA_TYPE_HDR_CLL / MP4 clli / MKV.
Trait Implementations§
Source§impl Clone for ColorMetadata
impl Clone for ColorMetadata
Source§fn clone(&self) -> ColorMetadata
fn clone(&self) -> ColorMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ColorMetadata
Source§impl Debug for ColorMetadata
impl Debug for ColorMetadata
Source§impl Default for ColorMetadata
impl Default for ColorMetadata
impl Eq for ColorMetadata
Source§impl PartialEq for ColorMetadata
impl PartialEq for ColorMetadata
Source§fn eq(&self, other: &ColorMetadata) -> bool
fn eq(&self, other: &ColorMetadata) -> bool
self and other values to be equal, and is used by ==.