pub struct Dpb<T> { /* private fields */ }
Implementations§
Source§impl<T: Clone> Dpb<T>
impl<T: Clone> Dpb<T>
Sourcepub fn pictures(&self) -> impl Iterator<Item = Ref<'_, PictureData>>
pub fn pictures(&self) -> impl Iterator<Item = Ref<'_, PictureData>>
Returns an iterator over the underlying H265 pictures stored in the DPB.
Sourcepub fn pictures_mut(&mut self) -> impl Iterator<Item = RefMut<'_, PictureData>>
pub fn pictures_mut(&mut self) -> impl Iterator<Item = RefMut<'_, PictureData>>
Returns a mutable iterator over the underlying H265 pictures stored in the DPB.
pub fn is_empty(&self) -> bool
Sourcepub fn set_max_num_pics(&mut self, max_num_pics: usize)
pub fn set_max_num_pics(&mut self, max_num_pics: usize)
Set the dpb’s max num pics.
Sourcepub fn max_num_pics(&self) -> usize
pub fn max_num_pics(&self) -> usize
Get a reference to the dpb’s max num pics.
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_ref_by_poc(&self, poc: i32) -> Option<DpbEntry<T>>
pub fn find_ref_by_poc(&self, poc: i32) -> Option<DpbEntry<T>>
Finds a reference picture in the DPB using poc
.
Sourcepub fn find_ref_by_poc_masked(&self, poc: i32, mask: i32) -> Option<DpbEntry<T>>
pub fn find_ref_by_poc_masked(&self, poc: i32, mask: i32) -> Option<DpbEntry<T>>
Finds a reference picture in the DPB using poc
and mask
.
Sourcepub fn find_short_term_ref_by_poc(&self, poc: i32) -> Option<DpbEntry<T>>
pub fn find_short_term_ref_by_poc(&self, poc: i32) -> Option<DpbEntry<T>>
Finds a short term reference picture in the DPB using poc
.
Sourcepub fn drain(&mut self) -> Vec<DpbEntry<T>>
pub fn drain(&mut self) -> Vec<DpbEntry<T>>
Drains the DPB by continuously invoking the bumping process.
Sourcepub fn needs_bumping(&mut self, sps: &Sps) -> bool
pub fn needs_bumping(&mut self, sps: &Sps) -> bool
Whether the DPB needs bumping. See C.5.2.2.
Sourcepub fn needs_additional_bumping(&mut self, sps: &Sps) -> bool
pub fn needs_additional_bumping(&mut self, sps: &Sps) -> bool
See C.5.2.3. Happens when we are done decoding the picture.
Sourcepub fn remove_unused(&mut self)
pub fn remove_unused(&mut self)
Removes all pictures which are marked as “not needed for output” and “unused for reference”. See C.5.2.2
Sourcepub fn store_picture(
&mut self,
picture: Rc<RefCell<PictureData>>,
handle: T,
) -> Result<(), String>
pub fn store_picture( &mut self, picture: Rc<RefCell<PictureData>>, handle: T, ) -> Result<(), String>
Store a picture and its backend handle in the DPB.
Sourcepub fn get_all_references(&self) -> Vec<DpbEntry<T>>
pub fn get_all_references(&self) -> Vec<DpbEntry<T>>
Returns all the references in the DPB.