Enum dcv_color_primitives::PixelFormat
source · [−]#[repr(C)]
pub enum PixelFormat {
Argb,
Bgra,
Bgr,
Rgba,
Rgb,
I444,
I422,
I420,
Nv12,
}
Expand description
An enumeration of supported pixel formats.
Variants
Argb
RGB with alpha channel first.
32 bits per pixel
Bgra
Reverse RGB with alpha channel last.
32 bits per pixel
Bgr
Reverse RGB packed into 24 bits without padding.
24 bits per pixel
Rgba
RGB with alpha channel last.
32 bits per pixel
Rgb
RGB packed into 24 bits without padding.
24 bits per pixel
I444
YUV with one luma plane Y then 2 chroma planes U and V. Chroma planes are not sub-sampled.
24 bits per pixel
I422
YUV with one luma plane Y then 2 chroma planes U, V. Chroma planes are sub-sampled in the horizontal dimension, by a factor of 2.
16 bits per pixel
I420
YUV with one luma plane Y then U chroma plane and last the V chroma plane. The two chroma planes are sub-sampled in both the horizontal and vertical dimensions by a factor of 2.
12 bits per pixel
Nv12
YUV with one luma plane Y then one plane with U and V values interleaved. Chroma planes are subsampled in both the horizontal and vertical dimensions by a factor of 2.
12 bits per pixel
Trait Implementations
sourceimpl Clone for PixelFormat
impl Clone for PixelFormat
sourcefn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for PixelFormat
Auto Trait Implementations
impl RefUnwindSafe for PixelFormat
impl Send for PixelFormat
impl Sync for PixelFormat
impl Unpin for PixelFormat
impl UnwindSafe for PixelFormat
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more