pub struct MasteringDisplay {
pub red: (u16, u16),
pub green: (u16, u16),
pub blue: (u16, u16),
pub white_point: (u16, u16),
pub max_luminance: u32,
pub min_luminance: u32,
}Expand description
SMPTE ST 2086 mastering display colour volume, in the units MP4 mdcv and
the HEVC/AV1 metadata store it: chromaticity coordinates in 0.00002
steps, luminance in 0.0001 cd/m² steps.
Fields§
§red: (u16, u16)Red primary (x, y).
green: (u16, u16)Green primary (x, y).
blue: (u16, u16)Blue primary (x, y).
white_point: (u16, u16)White point (x, y).
max_luminance: u32Maximum display luminance, 0.0001 cd/m² units.
min_luminance: u32Minimum display luminance, 0.0001 cd/m² units.
Implementations§
Source§impl MasteringDisplay
impl MasteringDisplay
Sourcepub const CHROMA_UNIT: f64 = 0.00002
pub const CHROMA_UNIT: f64 = 0.00002
One chromaticity step, as a fraction.
Sourcepub fn chroma_from_f64(v: f64) -> u16
pub fn chroma_from_f64(v: f64) -> u16
The coordinate in CHROMA_UNIT steps for a
fractional chromaticity (Matroska stores floats), clamped to range.
Sourcepub fn luma_from_f64(v: f64) -> u32
pub fn luma_from_f64(v: f64) -> u32
The luminance in LUMA_UNIT steps for cd/m².
Trait Implementations§
Source§impl Clone for MasteringDisplay
impl Clone for MasteringDisplay
impl Copy for MasteringDisplay
Source§impl Debug for MasteringDisplay
impl Debug for MasteringDisplay
Source§impl Default for MasteringDisplay
impl Default for MasteringDisplay
impl Eq for MasteringDisplay
Source§impl Hash for MasteringDisplay
impl Hash for MasteringDisplay
Source§impl PartialEq for MasteringDisplay
impl PartialEq for MasteringDisplay
impl StructuralPartialEq for MasteringDisplay
Auto Trait Implementations§
impl Forget for MasteringDisplay
impl Freeze for MasteringDisplay
impl Move for MasteringDisplay
impl RefUnwindSafe for MasteringDisplay
impl Send for MasteringDisplay
impl Sync for MasteringDisplay
impl Unpin for MasteringDisplay
impl UnsafeUnpin for MasteringDisplay
impl UnwindSafe for MasteringDisplay
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more