Skip to main content

FrameDependencyStructure

Struct FrameDependencyStructure 

Source
pub struct FrameDependencyStructure {
    pub template_id_offset: u8,
    pub num_decode_targets: usize,
    pub num_chains: usize,
    pub decode_target_protected_by: Vec<u8>,
    pub resolutions: Vec<RenderResolution>,
    pub templates: Vec<FrameDependencyTemplate>,
}
Expand description

The frame dependency structure of a coded video sequence (template_dependency_structure, AV1 RTP specification A.8.2): the decode targets, the templates and the chains.

Fields§

§template_id_offset: u8

template_id_offset: the frame_dependency_template_id of the first template (0 to 63). A new structure SHOULD use ids the one before it did not.

§num_decode_targets: usize

DtCnt: the number of decode targets, 1 to 32.

§num_chains: usize

chain_cnt: the number of chains, 0 to num_decode_targets.

§decode_target_protected_by: Vec<u8>

decode_target_protected_by: for each decode target the chain that protects it. Empty when there are no chains; otherwise one entry per decode target.

§resolutions: Vec<RenderResolution>

render_resolutions: one per spatial layer, lowest first, or empty.

§templates: Vec<FrameDependencyTemplate>

The templates, ordered by spatial then temporal layer (the syntax can only step a layer up from one template to the next).

Implementations§

Source§

impl FrameDependencyStructure

Source

pub fn validate(&self) -> Result<()>

Checks that the structure can be written: everything the syntax of A.8.2 can carry and the rules of A.8.3 require.

Source

pub fn max_spatial_id(&self) -> u8

MaxSpatialId: the highest spatial layer a template is of.

Source

pub fn max_temporal_id(&self) -> u8

MaxTemporalId: the highest temporal layer a template is of.

Source

pub fn decode_target_layers(&self) -> Vec<(u8, u8)>

decode_target_layers(): for each decode target the highest spatial and temporal layer of the frames that are part of it, which is the fidelity it stands for.

Source

pub fn decode_target_for( &self, spatial_id: u8, temporal_id: u8, ) -> Option<usize>

The decode target that stands for the given spatial and temporal layer: the one whose layers are exactly those, or failing that the best one that does not exceed them.

Source

pub fn template_index(&self, template_id: u8) -> Option<usize>

The index of the template a frame_dependency_template_id names, if it is one of this structure’s.

Source

pub fn template_id(&self, index: usize) -> u8

The frame_dependency_template_id of the template at index.

Source

pub fn all_decode_targets(&self) -> u32

The bitmask with every decode target active.

Source

pub fn next_template_id_offset(&self) -> u8

A template_id_offset for a structure that replaces this one: the first id after this structure’s range, so the two do not overlap (A.8.3) as long as the new one has no more than 64 - self.templates.len() templates.

Trait Implementations§

Source§

impl Clone for FrameDependencyStructure

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FrameDependencyStructure

Source§

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

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

impl Default for FrameDependencyStructure

Source§

fn default() -> Self

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

impl Eq for FrameDependencyStructure

Source§

impl PartialEq for FrameDependencyStructure

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FrameDependencyStructure

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.