pub struct ReferenceFrameBuffer { /* private fields */ }Expand description
Simple reference frame buffer for P-slice decoding.
Maintains a bounded FIFO of recent reconstructed frames so that P-slices can reference them for motion compensation.
Implementations§
Source§impl ReferenceFrameBuffer
impl ReferenceFrameBuffer
Sourcepub fn new(max_refs: usize) -> Self
pub fn new(max_refs: usize) -> Self
Creates a new buffer that keeps at most max_refs reference frames.
Sourcepub fn push(&mut self, frame: Vec<u8>)
pub fn push(&mut self, frame: Vec<u8>)
Pushes a reconstructed frame into the buffer, evicting the oldest if the capacity is exceeded.
Auto Trait Implementations§
impl Freeze for ReferenceFrameBuffer
impl RefUnwindSafe for ReferenceFrameBuffer
impl Send for ReferenceFrameBuffer
impl Sync for ReferenceFrameBuffer
impl Unpin for ReferenceFrameBuffer
impl UnsafeUnpin for ReferenceFrameBuffer
impl UnwindSafe for ReferenceFrameBuffer
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