pub struct Color {
pub matrix: Matrix,
pub full_range: bool,
}Expand description
A YUV color space: the matrix and whether samples use the full 8-bit range.
Fields§
§matrix: MatrixThe RGB to Y’CbCr matrix.
full_range: boolWhether luma spans 0..=255 rather than 16..=235.
Implementations§
Source§impl Color
impl Color
Sourcepub fn infer(height: u32) -> Self
pub fn infer(height: u32) -> Self
Returns the conventional space for a stream of height lines.
Standard definition (576 lines or fewer) is BT.601, anything taller BT.709, both in limited range. That is the guess most players make for an unlabelled stream, though not all of them (ffmpeg’s scaler takes BT.601 at every size), which is why the stream is labelled.
Trait Implementations§
impl Copy for Color
impl Eq for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnsafeUnpin for Color
impl UnwindSafe for Color
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