#[non_exhaustive]pub enum PixelFormat {
Rgba,
Bgra,
Rgb0,
Bgr0,
Rgb24,
Bgr24,
Nv12,
Yuv420p,
}Expand description
The pixel layout of raw frames given to a Stream.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Rgba
4 bytes per pixel: R, G, B, A (A ignored).
Bgra
4 bytes per pixel: B, G, R, A (A ignored).
Rgb0
4 bytes per pixel: R, G, B, unused.
Bgr0
4 bytes per pixel: B, G, R, unused: a little-endian u32
0x00RRGGBB (softbuffer, minifb).
Rgb24
3 bytes per pixel: R, G, B.
Bgr24
3 bytes per pixel: B, G, R.
Nv12
Planar Y, then interleaved U/V at half resolution (two planes).
Yuv420p
Planar Y, U, V, the chroma planes at half resolution (three planes).
Implementations§
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
impl Copy for PixelFormat
Source§impl Debug for PixelFormat
impl Debug for PixelFormat
impl Eq for PixelFormat
Source§impl Hash for PixelFormat
impl Hash for PixelFormat
Source§impl PartialEq for PixelFormat
impl PartialEq for PixelFormat
impl StructuralPartialEq for PixelFormat
Auto Trait Implementations§
impl Forget for PixelFormat
impl Freeze for PixelFormat
impl Move 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