pub enum PixelFormat {
Rgb8,
Bgr8,
Rgba8,
Nv12,
I420,
Gray8,
}Expand description
Pixel format of the decoded frame.
Variants§
Rgb8
8-bit RGB, 3 bytes per pixel.
Bgr8
8-bit BGR, 3 bytes per pixel.
Rgba8
8-bit RGBA, 4 bytes per pixel.
Nv12
NV12 (Y plane + interleaved UV), 12 bits per pixel.
I420
I420 (Y + U + V planes), 12 bits per pixel.
Gray8
8-bit grayscale, 1 byte per pixel.
Implementations§
Source§impl PixelFormat
impl PixelFormat
Sourcepub fn bytes_per_pixel(&self) -> Option<u32>
pub fn bytes_per_pixel(&self) -> Option<u32>
Bytes per pixel for packed formats.
Returns None for planar formats (NV12, I420) where the concept
of “bytes per pixel” is ambiguous.
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
Source§fn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PixelFormat
impl Debug for PixelFormat
Source§impl Hash for PixelFormat
impl Hash for PixelFormat
Source§impl PartialEq for PixelFormat
impl PartialEq for PixelFormat
impl Copy for PixelFormat
impl Eq for PixelFormat
impl StructuralPartialEq for PixelFormat
Auto Trait Implementations§
impl Freeze for PixelFormat
impl RefUnwindSafe for PixelFormat
impl Send for PixelFormat
impl Sync for PixelFormat
impl Unpin for PixelFormat
impl UnsafeUnpin for PixelFormat
impl UnwindSafe for PixelFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more