pub enum ChromaFormat {
Monochrome,
Yuv420,
Yuv422,
Yuv444,
}Expand description
Chroma subsampling mode.
Variants§
Monochrome
4:0:0 — monochrome (luma only, no chroma). ChromaArrayType = 0.
Yuv420
4:2:0 — chroma is half width, half height. ChromaArrayType = 1.
Yuv422
4:2:2 — chroma is half width, full height. ChromaArrayType = 2.
Yuv444
4:4:4 — chroma is full width, full height. ChromaArrayType = 3.
Implementations§
Source§impl ChromaFormat
impl ChromaFormat
Sourcepub fn is_monochrome(self) -> bool
pub fn is_monochrome(self) -> bool
True when there is no chroma (4:0:0).
Sourcepub fn sub_w(self) -> usize
pub fn sub_w(self) -> usize
Horizontal subsampling factor: luma_width / chroma_width. (1 for monochrome, which has no chroma; the value is unused but kept well-defined.)
Sourcepub fn chroma_tb_size(self) -> usize
pub fn chroma_tb_size(self) -> usize
Side length of each chroma transform block for an 8×8 luma CU.
Sourcepub fn chroma_tbs_per_cu(self) -> usize
pub fn chroma_tbs_per_cu(self) -> usize
Number of chroma transform blocks stacked vertically per 8×8 luma CU.
Trait Implementations§
Source§impl Clone for ChromaFormat
impl Clone for ChromaFormat
Source§fn clone(&self) -> ChromaFormat
fn clone(&self) -> ChromaFormat
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 ChromaFormat
Source§impl Debug for ChromaFormat
impl Debug for ChromaFormat
impl Eq for ChromaFormat
Source§impl PartialEq for ChromaFormat
impl PartialEq for ChromaFormat
Source§fn eq(&self, other: &ChromaFormat) -> bool
fn eq(&self, other: &ChromaFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ChromaFormat
Auto Trait Implementations§
impl Freeze for ChromaFormat
impl RefUnwindSafe for ChromaFormat
impl Send for ChromaFormat
impl Sync for ChromaFormat
impl Unpin for ChromaFormat
impl UnsafeUnpin for ChromaFormat
impl UnwindSafe for ChromaFormat
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