pub struct RefFrame {
pub poc: i32,
pub frame_num: u32,
pub ref_type: RefFrameType,
pub in_use: bool,
pub buffer_index: usize,
}Expand description
A reference frame entry in the decoded picture buffer.
Fields§
§poc: i32Picture order count (POC).
frame_num: u32frame_num for short-term or long-term frame index for long-term.
ref_type: RefFrameTypeReference type.
in_use: booltrue when this entry is actually in use (not an empty slot).
buffer_index: usizeOpaque frame data buffer index (into a larger buffer pool).
Implementations§
Source§impl RefFrame
impl RefFrame
Sourcepub fn short_term(poc: i32, frame_num: u32, buffer_index: usize) -> Self
pub fn short_term(poc: i32, frame_num: u32, buffer_index: usize) -> Self
Creates a new short-term reference frame.
Sourcepub fn long_term(
poc: i32,
long_term_frame_idx: u32,
buffer_index: usize,
) -> Self
pub fn long_term( poc: i32, long_term_frame_idx: u32, buffer_index: usize, ) -> Self
Creates a new long-term reference frame.
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Returns true when this slot is occupied by a valid reference frame.
Sourcepub fn mark_unused(&mut self)
pub fn mark_unused(&mut self)
Marks this frame as unused (removes it from the DPB logically).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RefFrame
impl RefUnwindSafe for RefFrame
impl Send for RefFrame
impl Sync for RefFrame
impl Unpin for RefFrame
impl UnsafeUnpin for RefFrame
impl UnwindSafe for RefFrame
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