pub struct DecodedFrame {
pub width: u32,
pub height: u32,
pub bit_depth: u8,
pub chroma: ChromaFormat,
pub y: Vec<u16>,
pub u: Vec<u16>,
pub v: Vec<u16>,
pub color: ColorInfo,
}Available on crate feature
decode only.Expand description
A decoded picture, cropped to its display size.
Fields§
§width: u32Display width in pixels.
height: u32Display height in pixels.
bit_depth: u8Bits per sample, 8 to 12.
chroma: ChromaFormatChroma subsampling.
y: Vec<u16>Luma, width * height, tightly packed.
u: Vec<u16>Chroma planes, chroma_size each. Empty for
monochrome.
v: Vec<u16>Cr, laid out like u.
color: ColorInfoWhat the stream says about its colour.
Implementations§
Source§impl DecodedFrame
impl DecodedFrame
Sourcepub fn chroma_size(&self) -> (u32, u32)
pub fn chroma_size(&self) -> (u32, u32)
Size of each chroma plane.
Sourcepub fn to_raw_yuv(&self) -> Vec<u8> ⓘ
pub fn to_raw_yuv(&self) -> Vec<u8> ⓘ
The planes as ffmpeg’s rawvideo writes them for the stream’s native
pixel format: one byte a sample at 8 bits, two (little-endian) above.
Trait Implementations§
Source§impl Clone for DecodedFrame
impl Clone for DecodedFrame
Auto Trait Implementations§
impl Freeze for DecodedFrame
impl RefUnwindSafe for DecodedFrame
impl Send for DecodedFrame
impl Sync for DecodedFrame
impl Unpin for DecodedFrame
impl UnsafeUnpin for DecodedFrame
impl UnwindSafe for DecodedFrame
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more