pub enum FrameFormat {
Rgba8,
Rgb8,
Nv12,
}Expand description
How a frame’s pixels are laid out.
Variants§
Rgba8
Tightly packed RGBA8, row-major, no padding.
Rgb8
Tightly packed RGB8, row-major, no padding.
What a USB webcam decodes to. Carried as-is so a desktop viewfinder does not pay a widening copy per frame for an alpha channel a camera never has.
Nv12
Full-range NV12: a width * height luma plane followed by an
interleaved width * height / 2 chroma plane at half resolution in both
directions.
What a phone camera produces. Carrying it as-is is what removes the encode-and-decode round trip a JPEG preview pays on every frame.
Implementations§
Trait Implementations§
Source§impl Clone for FrameFormat
impl Clone for FrameFormat
impl Copy for FrameFormat
Source§impl Debug for FrameFormat
impl Debug for FrameFormat
Source§impl Default for FrameFormat
impl Default for FrameFormat
impl Eq for FrameFormat
Source§impl Hash for FrameFormat
impl Hash for FrameFormat
Source§impl PartialEq for FrameFormat
impl PartialEq for FrameFormat
impl StructuralPartialEq for FrameFormat
Auto Trait Implementations§
impl Freeze for FrameFormat
impl RefUnwindSafe for FrameFormat
impl Send for FrameFormat
impl Sync for FrameFormat
impl Unpin for FrameFormat
impl UnsafeUnpin for FrameFormat
impl UnwindSafe for FrameFormat
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