pub struct ClliCodes(/* private fields */);Expand description
Exact PNG 3 / ITU-T H.274 cLLI content light-level codes (0.0001 cd/m² precision).
Separate from the integer-nit ContentLightLevel view so sub-nit PNG cLLI
payloads (max_cll, max_fall as big-endian u32 in units of 0.0001 cd/m²)
survive lossless transcodes without quantization.
Implementations§
Source§impl ClliCodes
impl ClliCodes
Sourcepub const fn from_be_bytes(bytes: [u8; 8]) -> ClliCodes
pub const fn from_be_bytes(bytes: [u8; 8]) -> ClliCodes
Preserve all 8 big-endian bytes ([max_cll: u32 BE, max_fall: u32 BE]).
Sourcepub const fn from_ten_thousandths(
max_cll_10000: u32,
max_fall_10000: u32,
) -> ClliCodes
pub const fn from_ten_thousandths( max_cll_10000: u32, max_fall_10000: u32, ) -> ClliCodes
Construct from exact 0.0001 cd/m² integer units (PNG cLLI wire scale).
Sourcepub const fn to_be_bytes(self) -> [u8; 8]
pub const fn to_be_bytes(self) -> [u8; 8]
Return the exact original 8 big-endian bytes without float or integer rounding.
Sourcepub const fn max_cll_ten_thousandths(self) -> u32
pub const fn max_cll_ten_thousandths(self) -> u32
Exact MaxCLL in units of 0.0001 cd/m².
Sourcepub const fn max_fall_ten_thousandths(self) -> u32
pub const fn max_fall_ten_thousandths(self) -> u32
Exact MaxFALL in units of 0.0001 cd/m².
Sourcepub const fn max_cll_nits(self) -> f64
pub const fn max_cll_nits(self) -> f64
MaxCLL in cd/m² (f64).
Sourcepub const fn max_fall_nits(self) -> f64
pub const fn max_fall_nits(self) -> f64
MaxFALL in cd/m² (f64).
Sourcepub const fn semantic(self) -> ContentLightLevel
pub const fn semantic(self) -> ContentLightLevel
Project to integer-nit ContentLightLevel (rounded to nearest nit, clamped to u16::MAX).
Retain ClliCodes when exact 0.0001 cd/m² precision must survive a transcode.