pub struct VideoColorInfo { /* private fields */ }Expand description
Color space, transfer curve, matrix coefficients, range, and HDR mastering metadata preserved across decode and presentation.
Implementations§
Source§impl VideoColorInfo
Color-space constructors, CICP nclx decoding, and HDR helpers for VideoColorInfo.
impl VideoColorInfo
Color-space constructors, CICP nclx decoding, and HDR helpers for VideoColorInfo.
Sourcepub const fn sdr_bt709() -> VideoColorInfo
pub const fn sdr_bt709() -> VideoColorInfo
Constructs standard 8-bit limited-range ITU-R BT.709 SDR color metadata.
§Returns
Self- SDR BT.709 color metadata.
Sourcepub const fn hdr10_bt2020_pq(
max_cll_nits: u16,
max_fall_nits: u16,
) -> VideoColorInfo
pub const fn hdr10_bt2020_pq( max_cll_nits: u16, max_fall_nits: u16, ) -> VideoColorInfo
Sourcepub const fn from_nclx(
primaries_code: u16,
transfer_code: u16,
matrix_code: u16,
full_range: bool,
) -> VideoColorInfo
pub const fn from_nclx( primaries_code: u16, transfer_code: u16, matrix_code: u16, full_range: bool, ) -> VideoColorInfo
Decodes ISO/IEC 23091-2 (colr nclx) CICP integer codes into VideoColorInfo.
§Arguments
u16- CICP color primaries code.u16- CICP transfer characteristics code.u16- CICP matrix coefficients code.bool-truefor full-range quantization,falsefor studio limited range.
§Returns
Self- Decoded color space and HDR metadata.
Source§impl VideoColorInfo
impl VideoColorInfo
pub fn get_primaries(&self) -> ColorPrimaries
pub fn get_mut_primaries(&mut self) -> &mut ColorPrimaries
pub fn set_primaries(&mut self, val: ColorPrimaries) -> &mut VideoColorInfo
pub fn get_transfer(&self) -> TransferCharacteristics
pub fn get_mut_transfer(&mut self) -> &mut TransferCharacteristics
pub fn set_transfer( &mut self, val: TransferCharacteristics, ) -> &mut VideoColorInfo
pub fn get_matrix(&self) -> MatrixCoefficients
pub fn get_mut_matrix(&mut self) -> &mut MatrixCoefficients
pub fn set_matrix(&mut self, val: MatrixCoefficients) -> &mut VideoColorInfo
pub fn get_range(&self) -> ColorRange
pub fn get_mut_range(&mut self) -> &mut ColorRange
pub fn set_range(&mut self, val: ColorRange) -> &mut VideoColorInfo
pub fn get_bit_depth(&self) -> u8
pub fn get_mut_bit_depth(&mut self) -> &mut u8
pub fn set_bit_depth(&mut self, val: u8) -> &mut VideoColorInfo
pub fn get_max_cll_nits(&self) -> u16
pub fn get_mut_max_cll_nits(&mut self) -> &mut u16
pub fn set_max_cll_nits(&mut self, val: u16) -> &mut VideoColorInfo
pub fn get_max_fall_nits(&self) -> u16
pub fn get_mut_max_fall_nits(&mut self) -> &mut u16
pub fn set_max_fall_nits(&mut self, val: u16) -> &mut VideoColorInfo
Source§impl VideoColorInfo
impl VideoColorInfo
pub fn new( primaries: ColorPrimaries, transfer: TransferCharacteristics, matrix: MatrixCoefficients, range: ColorRange, bit_depth: u8, max_cll_nits: u16, max_fall_nits: u16, ) -> VideoColorInfo
Trait Implementations§
Source§impl Clone for VideoColorInfo
impl Clone for VideoColorInfo
Source§fn clone(&self) -> VideoColorInfo
fn clone(&self) -> VideoColorInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for VideoColorInfo
Source§impl Debug for VideoColorInfo
impl Debug for VideoColorInfo
Source§impl Default for VideoColorInfo
Default SDR BT.709 color profile for VideoColorInfo.
impl Default for VideoColorInfo
Default SDR BT.709 color profile for VideoColorInfo.
Source§fn default() -> VideoColorInfo
fn default() -> VideoColorInfo
Creates standard 8-bit limited-range BT.709 SDR color metadata.
§Returns
Self- Default SDR color metadata.
Source§impl<'de> Deserialize<'de> for VideoColorInfo
impl<'de> Deserialize<'de> for VideoColorInfo
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<VideoColorInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<VideoColorInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for VideoColorInfo
Source§impl Hash for VideoColorInfo
impl Hash for VideoColorInfo
Source§impl PartialEq for VideoColorInfo
impl PartialEq for VideoColorInfo
Source§impl Serialize for VideoColorInfo
impl Serialize for VideoColorInfo
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for VideoColorInfo
Auto Trait Implementations§
impl Forget for VideoColorInfo
impl Freeze for VideoColorInfo
impl Move for VideoColorInfo
impl RefUnwindSafe for VideoColorInfo
impl Send for VideoColorInfo
impl Sync for VideoColorInfo
impl Unpin for VideoColorInfo
impl UnsafeUnpin for VideoColorInfo
impl UnwindSafe for VideoColorInfo
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