pub struct Dpb<T> { /* private fields */ }
Implementations§
Source§impl<T: Clone> Dpb<T>
impl<T: Clone> Dpb<T>
pub fn is_empty(&self) -> bool
Sourcepub fn set_limits(&mut self, max_num_pics: usize, max_num_reorder_frames: usize)
pub fn set_limits(&mut self, max_num_pics: usize, max_num_reorder_frames: usize)
Set the DPB’s limits in terms of maximum number or pictures.
Sourcepub fn max_num_pics(&self) -> usize
pub fn max_num_pics(&self) -> usize
Get a reference to the dpb’s max num pics.
pub fn num_ref_frames(&self) -> usize
Sourcepub fn interlaced(&self) -> bool
pub fn interlaced(&self) -> bool
Get a reference to the dpb’s interlaced mode.
Sourcepub fn set_interlaced(&mut self, interlaced: bool)
pub fn set_interlaced(&mut self, interlaced: bool)
Set the dpb’s interlaced mode.
Sourcepub fn find_short_term_lowest_frame_num_wrap(&self) -> Option<&DpbEntry<T>>
pub fn find_short_term_lowest_frame_num_wrap(&self) -> Option<&DpbEntry<T>>
Find the short term reference picture with the lowest frame_num_wrap
value.
Sourcepub fn mark_all_as_unused_for_ref(&mut self)
pub fn mark_all_as_unused_for_ref(&mut self)
Mark all pictures in the DPB as unused for reference.
Sourcepub fn find_short_term_with_pic_num(&self, pic_num: i32) -> Option<&DpbEntry<T>>
pub fn find_short_term_with_pic_num(&self, pic_num: i32) -> Option<&DpbEntry<T>>
Find a short term reference picture with the given pic_num
value.
Sourcepub fn find_long_term_with_long_term_pic_num(
&self,
long_term_pic_num: u32,
) -> Option<&DpbEntry<T>>
pub fn find_long_term_with_long_term_pic_num( &self, long_term_pic_num: u32, ) -> Option<&DpbEntry<T>>
Find a long term reference picture with the given long_term_pic_num
value.
Sourcepub fn store_picture(
&mut self,
picture: RcPictureData,
handle: Option<T>,
) -> Result<(), StorePictureError>
pub fn store_picture( &mut self, picture: RcPictureData, handle: Option<T>, ) -> Result<(), StorePictureError>
Store picture
and its backend handle in the DPB.
Sourcepub fn has_empty_frame_buffer(&self) -> bool
pub fn has_empty_frame_buffer(&self) -> bool
Whether the DPB has an empty slot for a new picture.
Sourcepub fn needs_bumping(&self, to_insert: &PictureData) -> bool
pub fn needs_bumping(&self, to_insert: &PictureData) -> bool
Whether the DPB needs bumping, as described by clauses 1, 4, 5, 6 of C.4.5.3 “Bumping” process.
Sourcepub fn drain(&mut self) -> Vec<Option<T>>
pub fn drain(&mut self) -> Vec<Option<T>>
Drains the DPB by continuously invoking the bumping process.
Sourcepub fn short_term_refs_iter(&self) -> impl Iterator<Item = &DpbEntry<T>>
pub fn short_term_refs_iter(&self) -> impl Iterator<Item = &DpbEntry<T>>
Returns an iterator of short term refs.
Sourcepub fn long_term_refs_iter(&self) -> impl Iterator<Item = &DpbEntry<T>>
pub fn long_term_refs_iter(&self) -> impl Iterator<Item = &DpbEntry<T>>
Returns an iterator of long term refs.
pub fn update_pic_nums( &mut self, frame_num: u32, max_frame_num: u32, current_pic: &PictureData, )
Sourcepub fn bump_as_needed(&mut self, current_pic: &PictureData) -> Vec<Option<T>>
pub fn bump_as_needed(&mut self, current_pic: &PictureData) -> Vec<Option<T>>
Bumps the DPB if needed. DPB bumping is described on C.4.5.3.
pub fn sliding_window_marking(&mut self, pic: &mut PictureData, sps: &Sps)
pub fn mmco_op_1( &mut self, pic: &PictureData, marking: &RefPicMarkingInner, ) -> Result<(), MmcoError>
pub fn mmco_op_2( &mut self, pic: &PictureData, marking: &RefPicMarkingInner, ) -> Result<(), MmcoError>
pub fn mmco_op_3( &mut self, pic: &PictureData, marking: &RefPicMarkingInner, ) -> Result<(), MmcoError>
Sourcepub fn mmco_op_4(&mut self, marking: &RefPicMarkingInner) -> MaxLongTermFrameIdx
pub fn mmco_op_4(&mut self, marking: &RefPicMarkingInner) -> MaxLongTermFrameIdx
Returns the new max_long_term_frame_idx
.
Sourcepub fn mmco_op_5(&mut self, pic: &mut PictureData) -> MaxLongTermFrameIdx
pub fn mmco_op_5(&mut self, pic: &mut PictureData) -> MaxLongTermFrameIdx
Returns the new max_long_term_frame_idx
.
pub fn mmco_op_6(&mut self, pic: &mut PictureData, marking: &RefPicMarkingInner)
Sourcepub fn build_ref_pic_lists(&self, pic: &PictureData) -> ReferencePicLists
pub fn build_ref_pic_lists(&self, pic: &PictureData) -> ReferencePicLists
Returns the lists of reference pictures for pic
.