pub struct DiffuseWhite(/* private fields */);Expand description
The absolute luminance, in cd/m² (nits), that a relative-linear sample
value of 1.0 represents — the “diffuse white” (a.k.a. nominal diffuse
white / SDR reference white) anchor that bridges relative-linear pixel
data to absolute display light.
This is the single scalar the rest of the industry uses for that bridge:
OpenEXR’s whiteLuminance (“nits of RGB (1,1,1)”), JPEG XL’s
intensity_target, libheif’s ndwt (nominal diffuse white), and
libplacebo’s SDR-white constant. The cross-vendor default is
BT2408 = 203 cd/m².
It is a typed anchor on purpose: HDR code mixes nits, PQ-encoded [0,1],
log2 gain, and headroom ratios — passing a bare f32 invites unit
confusion. Use DiffuseWhite::new / DiffuseWhite::nits.
Implementations§
Source§impl DiffuseWhite
impl DiffuseWhite
Sourcepub const BT2408: DiffuseWhite
pub const BT2408: DiffuseWhite
ITU-R BT.2408 HDR reference white: 203 cd/m². The cross-industry
default anchor for relative-linear HDR (matches Chrome SDRWhiteLevel,
Skia skcms, CSS rec2100-linear, and libplacebo).
Sourcepub const fn new(nits: f32) -> DiffuseWhite
pub const fn new(nits: f32) -> DiffuseWhite
An anchor of nits cd/m² (the luminance that relative-linear 1.0
represents).
Trait Implementations§
Source§impl Clone for DiffuseWhite
impl Clone for DiffuseWhite
Source§fn clone(&self) -> DiffuseWhite
fn clone(&self) -> DiffuseWhite
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 DiffuseWhite
Source§impl Debug for DiffuseWhite
impl Debug for DiffuseWhite
Source§impl Default for DiffuseWhite
impl Default for DiffuseWhite
Source§fn default() -> DiffuseWhite
fn default() -> DiffuseWhite
BT2408 — 203 cd/m².
impl Eq for DiffuseWhite
Source§impl PartialEq for DiffuseWhite
impl PartialEq for DiffuseWhite
Source§fn eq(&self, other: &DiffuseWhite) -> bool
fn eq(&self, other: &DiffuseWhite) -> bool
self and other values to be equal, and is used by ==.