Enum y4m::Colorspace
source · #[non_exhaustive]
pub enum Colorspace {
Show 14 variants
Cmono,
Cmono12,
C420,
C420p10,
C420p12,
C420jpeg,
C420paldv,
C420mpeg2,
C422,
C422p10,
C422p12,
C444,
C444p10,
C444p12,
}
Expand description
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 (Non-exhaustive)§
This enum is marked as non-exhaustive
Cmono
Grayscale only, 8-bit.
Cmono12
Grayscale only, 12-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§
source§impl Colorspace
impl Colorspace
sourcepub fn get_bit_depth(self) -> usize
pub fn get_bit_depth(self) -> usize
Return the bit depth per sample
sourcepub fn get_bytes_per_sample(self) -> usize
pub fn get_bytes_per_sample(self) -> usize
Return the number of bytes in a sample
Trait Implementations§
source§impl Clone for Colorspace
impl Clone for Colorspace
source§fn clone(&self) -> Colorspace
fn clone(&self) -> Colorspace
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more