#[non_exhaustive]pub enum Subsampling {
S444,
S422,
S420,
S440,
}Expand description
Chroma subsampling mode.
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.
S444
4:4:4 - No subsampling
S422
4:2:2 - Horizontal subsampling only
S420
4:2:0 - Both horizontal and vertical subsampling
S440
4:4:0 - Vertical subsampling only (rare)
Implementations§
Source§impl Subsampling
impl Subsampling
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.
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.
Trait Implementations§
Source§impl Clone for Subsampling
impl Clone for Subsampling
Source§fn clone(&self) -> Subsampling
fn clone(&self) -> Subsampling
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 Subsampling
impl Debug for Subsampling
Source§impl Default for Subsampling
impl Default for Subsampling
Source§fn default() -> Subsampling
fn default() -> Subsampling
Returns the “default value” for a type. Read more
Source§impl Hash for Subsampling
impl Hash for Subsampling
Source§impl PartialEq for Subsampling
impl PartialEq for Subsampling
impl Copy for Subsampling
impl Eq for Subsampling
impl StructuralPartialEq for Subsampling
Auto Trait Implementations§
impl Freeze for Subsampling
impl RefUnwindSafe for Subsampling
impl Send for Subsampling
impl Sync for Subsampling
impl Unpin for Subsampling
impl UnwindSafe for Subsampling
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more