pub struct Colorspace { /* private fields */ }Expand description
A recognized colorspace: subsampling family, chroma siting, and bit depth.
Values exist only for the tags in the YUV4MPEG2 contract (mjpegtools core
plus the ffmpeg high-bit-depth extension). Parsing an unknown C value
returns Error::Unsupported.
Implementations§
Source§impl Colorspace
impl Colorspace
Sourcepub const C420JPEG: Colorspace
pub const C420JPEG: Colorspace
The C420jpeg colorspace tag.
Sourcepub const C420MPEG2: Colorspace
pub const C420MPEG2: Colorspace
The C420mpeg2 colorspace tag.
Sourcepub const C420PALDV: Colorspace
pub const C420PALDV: Colorspace
The C420paldv colorspace tag.
Sourcepub const C420: Colorspace
pub const C420: Colorspace
The C420 colorspace tag.
Sourcepub const C420P9: Colorspace
pub const C420P9: Colorspace
The C420p9 colorspace tag.
Sourcepub const C420P10: Colorspace
pub const C420P10: Colorspace
The C420p10 colorspace tag.
Sourcepub const C420P12: Colorspace
pub const C420P12: Colorspace
The C420p12 colorspace tag.
Sourcepub const C420P14: Colorspace
pub const C420P14: Colorspace
The C420p14 colorspace tag.
Sourcepub const C420P16: Colorspace
pub const C420P16: Colorspace
The C420p16 colorspace tag.
Sourcepub const C422: Colorspace
pub const C422: Colorspace
The C422 colorspace tag.
Sourcepub const C422P9: Colorspace
pub const C422P9: Colorspace
The C422p9 colorspace tag.
Sourcepub const C422P10: Colorspace
pub const C422P10: Colorspace
The C422p10 colorspace tag.
Sourcepub const C422P12: Colorspace
pub const C422P12: Colorspace
The C422p12 colorspace tag.
Sourcepub const C422P14: Colorspace
pub const C422P14: Colorspace
The C422p14 colorspace tag.
Sourcepub const C422P16: Colorspace
pub const C422P16: Colorspace
The C422p16 colorspace tag.
Sourcepub const C444: Colorspace
pub const C444: Colorspace
The C444 colorspace tag.
Sourcepub const C444P9: Colorspace
pub const C444P9: Colorspace
The C444p9 colorspace tag.
Sourcepub const C444P10: Colorspace
pub const C444P10: Colorspace
The C444p10 colorspace tag.
Sourcepub const C444P12: Colorspace
pub const C444P12: Colorspace
The C444p12 colorspace tag.
Sourcepub const C444P14: Colorspace
pub const C444P14: Colorspace
The C444p14 colorspace tag.
Sourcepub const C444P16: Colorspace
pub const C444P16: Colorspace
The C444p16 colorspace tag.
Sourcepub const MONO: Colorspace
pub const MONO: Colorspace
The Cmono colorspace tag.
Sourcepub const MONO9: Colorspace
pub const MONO9: Colorspace
The Cmono9 colorspace tag.
Sourcepub const MONO10: Colorspace
pub const MONO10: Colorspace
The Cmono10 colorspace tag.
Sourcepub const MONO12: Colorspace
pub const MONO12: Colorspace
The Cmono12 colorspace tag.
Sourcepub const MONO16: Colorspace
pub const MONO16: Colorspace
The Cmono16 colorspace tag.
Sourcepub const ALL: &'static [Colorspace]
pub const ALL: &'static [Colorspace]
Every recognized colorspace, in tag-table order.
Source§impl Colorspace
impl Colorspace
Sourcepub fn from_tag(tag: &str) -> Result<Colorspace, Error>
pub fn from_tag(tag: &str) -> Result<Colorspace, Error>
Looks up a colorspace by its wire tag value (the bytes after C).
Returns Error::Unsupported for any value outside the recognized
set, including 444alpha.
Sourcepub fn subsampling(self) -> Subsampling
pub fn subsampling(self) -> Subsampling
The chroma subsampling family.
Sourcepub fn chroma_siting(self) -> ChromaSiting
pub fn chroma_siting(self) -> ChromaSiting
The chroma sample siting carried by the tag.
Sourcepub fn bytes_per_sample(self) -> usize
pub fn bytes_per_sample(self) -> usize
Bytes per sample on the wire: 1 for depth <= 8, 2 otherwise.