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() -> Self
pub const fn sdr_bt709() -> Self
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) -> Self
pub const fn hdr10_bt2020_pq(max_cll_nits: u16, max_fall_nits: u16) -> Self
Sourcepub const fn from_nclx(
primaries_code: u16,
transfer_code: u16,
matrix_code: u16,
full_range: bool,
) -> Self
pub const fn from_nclx( primaries_code: u16, transfer_code: u16, matrix_code: u16, full_range: bool, ) -> Self
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 Self
pub fn get_transfer(&self) -> TransferCharacteristics
pub fn get_mut_transfer(&mut self) -> &mut TransferCharacteristics
pub fn set_transfer(&mut self, val: TransferCharacteristics) -> &mut Self
pub fn get_matrix(&self) -> MatrixCoefficients
pub fn get_mut_matrix(&mut self) -> &mut MatrixCoefficients
pub fn set_matrix(&mut self, val: MatrixCoefficients) -> &mut Self
pub fn get_range(&self) -> ColorRange
pub fn get_mut_range(&mut self) -> &mut ColorRange
pub fn set_range(&mut self, val: ColorRange) -> &mut Self
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 Self
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 Self
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 Self
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, ) -> Self
Trait Implementations§
Source§impl Clone for VideoColorInfo
impl Clone for VideoColorInfo
impl 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§impl<'de> Deserialize<'de> for VideoColorInfo
impl<'de> Deserialize<'de> for VideoColorInfo
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>,
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
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