pub enum ColorMatrix {
Bt601,
Bt709,
Bt2020Ncl,
Rgb,
}Expand description
Coefficients used to decode source components.
Variants§
Bt601
SD BT.601 YUV coefficients.
Bt709
HD BT.709 YUV coefficients.
Bt2020Ncl
BT.2020 non-constant-luminance YUV coefficients.
Rgb
Source components are already RGB.
Implementations§
Source§impl ColorMatrix
impl ColorMatrix
Sourcepub const fn luma_weights(self) -> Option<(f32, f32)>
pub const fn luma_weights(self) -> Option<(f32, f32)>
The red and blue luma weights (Kr, Kb) of a YCbCr matrix, or None
for components that are already RGB.
These are the only definition of the coefficients: import, export, and
the CPU reference all derive their matrices from them. Green’s weight
is 1 - Kr - Kb.
Trait Implementations§
Source§impl Clone for ColorMatrix
impl Clone for ColorMatrix
impl Copy for ColorMatrix
Source§impl Debug for ColorMatrix
impl Debug for ColorMatrix
Source§impl<'de> Deserialize<'de> for ColorMatrix
impl<'de> Deserialize<'de> for ColorMatrix
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 ColorMatrix
Source§impl PartialEq for ColorMatrix
impl PartialEq for ColorMatrix
Source§impl Serialize for ColorMatrix
impl Serialize for ColorMatrix
impl StructuralPartialEq for ColorMatrix
Auto Trait Implementations§
impl Freeze for ColorMatrix
impl RefUnwindSafe for ColorMatrix
impl Send for ColorMatrix
impl Sync for ColorMatrix
impl Unpin for ColorMatrix
impl UnsafeUnpin for ColorMatrix
impl UnwindSafe for ColorMatrix
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