[][src]Enum y4m::Colorspace

pub enum Colorspace {
    Cmono,
    C420,
    C420p10,
    C420p12,
    C420jpeg,
    C420paldv,
    C420mpeg2,
    C422,
    C422p10,
    C422p12,
    C444,
    C444p10,
    C444p12,
}

Colorspace (color model/pixel format). Only subset of them is supported.

From libavformat/yuv4mpegenc.c:

yuv4mpeg can only handle yuv444p, yuv422p, yuv420p, yuv411p and gray8 pixel formats. And using 'strict -1' also yuv444p9, yuv422p9, yuv420p9, yuv444p10, yuv422p10, yuv420p10, yuv444p12, yuv422p12, yuv420p12, yuv444p14, yuv422p14, yuv420p14, yuv444p16, yuv422p16, yuv420p16, gray9, gray10, gray12 and gray16 pixel formats.

Variants

Cmono

Grayscale only, 8-bit.

C420

4:2:0 with coincident chroma planes, 8-bit.

C420p10

4:2:0 with coincident chroma planes, 10-bit.

C420p12

4:2:0 with coincident chroma planes, 12-bit.

C420jpeg

4:2:0 with biaxially-displaced chroma planes, 8-bit.

C420paldv

4:2:0 with vertically-displaced chroma planes, 8-bit.

C420mpeg2

Found in some files. Same as C420.

C422

4:2:2, 8-bit.

C422p10

4:2:2, 10-bit.

C422p12

4:2:2, 12-bit.

C444

4:4:4, 8-bit.

C444p10

4:4:4, 10-bit.

C444p12

4:4:4, 12-bit.

Implementations

impl Colorspace[src]

pub fn get_bit_depth(self) -> usize[src]

Return the bit depth per sample

pub fn get_bytes_per_sample(self) -> usize[src]

Return the number of bytes in a sample

Trait Implementations

impl Clone for Colorspace[src]

impl Copy for Colorspace[src]

impl Debug for Colorspace[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.