[][src]Enum av_metrics::video::ChromaSampling

#[repr(C)]pub enum ChromaSampling {
    Cs420,
    Cs422,
    Cs444,
    Cs400,
}

Chroma subsampling format

Variants

Cs420

Both vertically and horizontally subsampled.

Cs422

Horizontally subsampled.

Cs444

Not subsampled.

Cs400

Monochrome.

Implementations

impl ChromaSampling[src]

pub fn get_decimation(self) -> Option<(usize, usize)>[src]

Provides the amount to right shift the luma plane dimensions to get the chroma plane dimensions. Only values 0 or 1 are ever returned. The plane dimensions must also be rounded up to accommodate odd luma plane sizes. Cs400 returns None, as there are no chroma planes.

pub fn get_chroma_dimensions(
    self,
    luma_width: usize,
    luma_height: usize
) -> (usize, usize)
[src]

Calculates the size of a chroma plane for this sampling type, given the luma plane dimensions.

Trait Implementations

impl Clone for ChromaSampling[src]

impl Copy for ChromaSampling[src]

impl Debug for ChromaSampling[src]

impl Default for ChromaSampling[src]

impl Display for ChromaSampling[src]

impl FromPrimitive for ChromaSampling[src]

impl PartialEq<ChromaSampling> for ChromaSampling[src]

impl StructuralPartialEq for ChromaSampling[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.