pub struct Dpb<T: DecodedHandle> {
    entries: Vec<DpbEntry<T>>,
    max_num_pics: usize,
    interlaced: bool,
}

Fields

entries: Vec<DpbEntry<T>>

List of PictureData and backend handles to decoded pictures.

max_num_pics: usize

The maximum number of pictures that can be stored.

interlaced: bool

Whether we’re decoding in interlaced mode. Interlaced support is inspired by the GStreamer implementation, in which frames are split if interlaced=1. This makes reference marking easier. We also decode both fields to the same surface, and this surface with both fields is outputted only once.

Implementations

Returns an iterator over the underlying H264 pictures stored in the DPB.

Returns a mutable iterator over the underlying H264 pictures stored in the DPB.

Returns the length of the DPB.

Get a reference to the whole DPB entries.

Set the dpb’s max num pics.

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

Get a reference to the dpb’s interlaced mode.

Set the dpb’s interlaced mode.

Find the short term reference picture with the lowest frame_num_wrap value.

Mark all pictures in the DPB as unused for reference.

Remove unused pictures from the DPB. A picture is not going to be used anymore if it’s a) not a reference and b) not needed for output

Find a short term reference picture with the given pic_num value.

Find a long term reference picture with the given long_term_pic_num value.

Store a picture and its backend handle in the DPB.

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

Whether the DPB needs bumping, as described by clauses 1, 4, 5, 6 of C.4.5.3 “Bumping” process.

Find the lowest POC in the DPB that can be bumped.

Gets the position of needle in the DPB, if any.

Bump the dpb, returning a picture as per the bumping process described in C.4.5.3. Note that this picture will still be referenced by its pair, if any.

Drains the DPB by continuously invoking the bumping process.

Clears the DPB, dropping all the pictures.

Gets a Vec<ContainedPicture> of short term refs into out

Gets a Vec<ContainedPicture> of long term refs into out

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.