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: u8template_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: usizeDtCnt: the number of decode targets, 1 to 32.
num_chains: usizechain_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
impl FrameDependencyStructure
Sourcepub fn validate(&self) -> Result<()>
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.
Sourcepub fn max_spatial_id(&self) -> u8
pub fn max_spatial_id(&self) -> u8
MaxSpatialId: the highest spatial layer a template is of.
Sourcepub fn max_temporal_id(&self) -> u8
pub fn max_temporal_id(&self) -> u8
MaxTemporalId: the highest temporal layer a template is of.
Sourcepub fn decode_target_layers(&self) -> Vec<(u8, u8)>
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.
Sourcepub fn decode_target_for(
&self,
spatial_id: u8,
temporal_id: u8,
) -> Option<usize>
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.
Sourcepub fn template_index(&self, template_id: u8) -> Option<usize>
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.
Sourcepub fn template_id(&self, index: usize) -> u8
pub fn template_id(&self, index: usize) -> u8
The frame_dependency_template_id of the template at index.
Sourcepub fn all_decode_targets(&self) -> u32
pub fn all_decode_targets(&self) -> u32
The bitmask with every decode target active.
Sourcepub fn next_template_id_offset(&self) -> u8
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.