pub struct Decoder { /* private fields */ }Expand description
AOM decoder context
Implementations§
Source§impl Decoder
impl Decoder
Sourcepub fn frame_meta<'a>(&'a mut self, av1_data: &[u8]) -> Result<FrameMeta>
pub fn frame_meta<'a>(&'a mut self, av1_data: &[u8]) -> Result<FrameMeta>
This parses the AV1 data independently of decode_frame
Sourcepub fn decode_frame<'a>(
&'a mut self,
av1_data: &[u8],
) -> Result<FrameTempRef<'a>>
pub fn decode_frame<'a>( &'a mut self, av1_data: &[u8], ) -> Result<FrameTempRef<'a>>
Take AV1-compressed data and decode a single frame into raw frame data (YUV pixels). This is for AVIF, and can’t handle video.
The returned frame is temporary. You must copy data out of it and drop it before decoding other files.
See yuv crate for conversion to RGB.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Decoder
impl RefUnwindSafe for Decoder
impl !Send for Decoder
impl !Sync for Decoder
impl Unpin for Decoder
impl UnwindSafe for Decoder
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