Dpb

Struct Dpb 

Source
pub struct Dpb<T> { /* private fields */ }

Implementations§

Source§

impl<T: Clone> Dpb<T>

Source

pub fn len(&self) -> usize

Returns the length of the DPB.

Source

pub fn is_empty(&self) -> bool

Source

pub fn entries(&self) -> &Vec<DpbEntry<T>>

Get a reference to the whole DPB entries.

Source

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.

Source

pub fn max_num_pics(&self) -> usize

Get a reference to the dpb’s max num pics.

Source

pub fn num_ref_frames(&self) -> usize

Source

pub fn interlaced(&self) -> bool

Get a reference to the dpb’s interlaced mode.

Source

pub fn set_interlaced(&mut self, interlaced: bool)

Set the dpb’s interlaced mode.

Source

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.

Source

pub fn mark_all_as_unused_for_ref(&mut self)

Mark all pictures in the DPB as unused for reference.

Source

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.

Source

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.

Source

pub fn store_picture( &mut self, picture: RcPictureData, handle: Option<T>, ) -> Result<(), StorePictureError>

Store picture and its backend handle in the DPB.

Source

pub fn has_empty_frame_buffer(&self) -> bool

Whether the DPB has an empty slot for a new picture.

Source

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.

Source

pub fn drain(&mut self) -> Vec<Option<T>>

Drains the DPB by continuously invoking the bumping process.

Source

pub fn clear(&mut self)

Clears the DPB, dropping all the pictures.

Source

pub fn short_term_refs_iter(&self) -> impl Iterator<Item = &DpbEntry<T>>

Returns an iterator of short term refs.

Source

pub fn long_term_refs_iter(&self) -> impl Iterator<Item = &DpbEntry<T>>

Returns an iterator of long term refs.

Source

pub fn update_pic_nums( &mut self, frame_num: u32, max_frame_num: u32, current_pic: &PictureData, )

Source

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.

Source

pub fn sliding_window_marking(&mut self, pic: &mut PictureData, sps: &Sps)

Source

pub fn mmco_op_1( &mut self, pic: &PictureData, marking: &RefPicMarkingInner, ) -> Result<(), MmcoError>

Source

pub fn mmco_op_2( &mut self, pic: &PictureData, marking: &RefPicMarkingInner, ) -> Result<(), MmcoError>

Source

pub fn mmco_op_3( &mut self, pic: &PictureData, marking: &RefPicMarkingInner, ) -> Result<(), MmcoError>

Source

pub fn mmco_op_4(&mut self, marking: &RefPicMarkingInner) -> MaxLongTermFrameIdx

Returns the new max_long_term_frame_idx.

Source

pub fn mmco_op_5(&mut self, pic: &mut PictureData) -> MaxLongTermFrameIdx

Returns the new max_long_term_frame_idx.

Source

pub fn mmco_op_6(&mut self, pic: &mut PictureData, marking: &RefPicMarkingInner)

Source

pub fn build_ref_pic_lists(&self, pic: &PictureData) -> ReferencePicLists

Returns the lists of reference pictures for pic.

Trait Implementations§

Source§

impl<T> Debug for Dpb<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> Default for Dpb<T>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<T> Freeze for Dpb<T>

§

impl<T> !RefUnwindSafe for Dpb<T>

§

impl<T> !Send for Dpb<T>

§

impl<T> !Sync for Dpb<T>

§

impl<T> Unpin for Dpb<T>
where T: Unpin,

§

impl<T> !UnwindSafe for Dpb<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.