Enum Colorspace
#[non_exhaustive]
pub enum Colorspace
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.
-
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
impl Colorspace
fn get_bit_depth(self) -> usizeReturn the bit depth per sample
fn get_bytes_per_sample(self) -> usizeReturn the number of bytes in a sample
Trait Implementations
impl Clone for Colorspace
fn clone(&self) -> Colorspace
impl Copy for Colorspace
impl Debug for Colorspace
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl Freeze for Colorspace
impl RefUnwindSafe for Colorspace
impl Send for Colorspace
impl Sync for Colorspace
impl Unpin for Colorspace
impl UnsafeUnpin for Colorspace
impl UnwindSafe for Colorspace
Blanket Implementations
impl<T> Any for Colorspace
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Colorspace
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Colorspace
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Colorspace
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Colorspace
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Colorspace
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Colorspace
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Colorspace
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Colorspace
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>