pub struct MasteringDisplay {
pub green_x: u32,
pub green_y: u32,
pub blue_x: u32,
pub blue_y: u32,
pub red_x: u32,
pub red_y: u32,
pub white_x: u32,
pub white_y: u32,
pub max_luminance: u32,
pub min_luminance: u32,
}Expand description
SMPTE ST 2086 mastering-display colour volume.
Chromaticity coordinates are stored in units of 1/50000 and luminance in
units of 0.0001 cd/m² — the exact integer encoding x265’s master-display
parameter consumes.
Fields§
§green_x: u32Green primary x, in 1/50000 units.
green_y: u32Green primary y, in 1/50000 units.
blue_x: u32Blue primary x, in 1/50000 units.
blue_y: u32Blue primary y, in 1/50000 units.
red_x: u32Red primary x, in 1/50000 units.
red_y: u32Red primary y, in 1/50000 units.
white_x: u32White point x, in 1/50000 units.
white_y: u32White point y, in 1/50000 units.
max_luminance: u32Maximum display luminance, in 0.0001 cd/m² units.
min_luminance: u32Minimum display luminance, in 0.0001 cd/m² units.
Implementations§
Source§impl MasteringDisplay
impl MasteringDisplay
Sourcepub fn to_x265_string(&self) -> String
pub fn to_x265_string(&self) -> String
Formats as an x265 master-display value:
G(gx,gy)B(bx,by)R(rx,ry)WP(wx,wy)L(max,min), with chromaticity in
1/50000 units and luminance in 0.0001 cd/m² units (the stored encoding).
Sourcepub fn to_svtav1_string(&self) -> String
pub fn to_svtav1_string(&self) -> String
Formats as an SVT-AV1 mastering-display value. SVT-AV1 shares x265’s
G()B()R()WP()L() grammar but expects real chromaticity coordinates
in [0,1] and luminance in cd/m² — not x265’s scaled integers. Feeding
it the x265 integers makes SVT-AV1 clip the values to garbage.
Trait Implementations§
Source§impl Clone for MasteringDisplay
impl Clone for MasteringDisplay
Source§fn clone(&self) -> MasteringDisplay
fn clone(&self) -> MasteringDisplay
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MasteringDisplay
impl Debug for MasteringDisplay
Source§impl Default for MasteringDisplay
impl Default for MasteringDisplay
Source§fn default() -> MasteringDisplay
fn default() -> MasteringDisplay
Source§impl<'de> Deserialize<'de> for MasteringDisplay
impl<'de> Deserialize<'de> for MasteringDisplay
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for MasteringDisplay
Source§impl PartialEq for MasteringDisplay
impl PartialEq for MasteringDisplay
Source§fn eq(&self, other: &MasteringDisplay) -> bool
fn eq(&self, other: &MasteringDisplay) -> bool
self and other values to be equal, and is used by ==.