pub struct Vp9Decoder { /* private fields */ }Expand description
A stateful VP9 decoder for the encoder’s subset.
Maintains the eight reference-buffer slots across a frame sequence so inter
frames can motion-compensate against the previous reconstruction. Decode a
keyframe first (which populates every slot), then feed each subsequent inter
frame to Vp9Decoder::decode_frame.
Implementations§
Source§impl Vp9Decoder
impl Vp9Decoder
Sourcepub fn decode_frame(
&mut self,
bytes: &[u8],
) -> Result<Rc<FrameBuffer>, DecodeError>
pub fn decode_frame( &mut self, bytes: &[u8], ) -> Result<Rc<FrameBuffer>, DecodeError>
Decode one frame (keyframe or inter) from bytes, update the reference
slots per the frame’s refresh mask, and return the reconstruction (borders
already extended, so it can serve directly as a later reference).
An inter frame decoded before any keyframe — or one referencing an empty
slot — is rejected with DecodeError::Corrupt rather than reading
uninitialized state.
Trait Implementations§
Auto Trait Implementations§
impl !Send for Vp9Decoder
impl !Sync for Vp9Decoder
impl Freeze for Vp9Decoder
impl RefUnwindSafe for Vp9Decoder
impl Unpin for Vp9Decoder
impl UnsafeUnpin for Vp9Decoder
impl UnwindSafe for Vp9Decoder
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> 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