#[non_exhaustive]pub enum ChromaSubsampling {
None,
HalfHorizontal,
Quarter,
HalfVertical,
}Expand description
YCbCr chroma subsampling (spatial resolution).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
4:4:4 - No subsampling (full chroma resolution, best quality, largest files)
HalfHorizontal
4:2:2 - Half horizontal resolution
Quarter
4:2:0 - Quarter resolution (half each direction, most common)
HalfVertical
4:4:0 - Half vertical resolution
Implementations§
Source§impl ChromaSubsampling
impl ChromaSubsampling
Sourcepub const fn h_samp_factor_luma(self) -> u8
pub const fn h_samp_factor_luma(self) -> u8
Returns the horizontal sampling factor for luma.
This is the luma block count in horizontal direction per MCU. Returns 1 for 4:4:4/4:4:0, returns 2 for 4:2:0/4:2:2.
Sourcepub const fn v_samp_factor_luma(self) -> u8
pub const fn v_samp_factor_luma(self) -> u8
Returns the vertical sampling factor for luma.
This is the luma block count in vertical direction per MCU. Returns 1 for 4:4:4/4:2:2, returns 2 for 4:2:0/4:4:0.
Trait Implementations§
Source§impl Clone for ChromaSubsampling
impl Clone for ChromaSubsampling
Source§fn clone(&self) -> ChromaSubsampling
fn clone(&self) -> ChromaSubsampling
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChromaSubsampling
impl Debug for ChromaSubsampling
Source§impl PartialEq for ChromaSubsampling
impl PartialEq for ChromaSubsampling
impl Copy for ChromaSubsampling
impl Eq for ChromaSubsampling
impl StructuralPartialEq for ChromaSubsampling
Auto Trait Implementations§
impl Freeze for ChromaSubsampling
impl RefUnwindSafe for ChromaSubsampling
impl Send for ChromaSubsampling
impl Sync for ChromaSubsampling
impl Unpin for ChromaSubsampling
impl UnwindSafe for ChromaSubsampling
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