pub struct MaConfig { /* private fields */ }
Expand description
Meta-adaptive tree configuration.
Meta-adaptive (MA) tree is a decision tree that controls how the sample is decoded in the given context. The configuration consists of two components: the MA tree itself, and the distribution information of an entropy decoder. These components are read from the bitstream.
Implementations§
Source§impl MaConfig
impl MaConfig
Sourcepub fn decoder(&self) -> &Decoder
pub fn decoder(&self) -> &Decoder
Returns the entropy decoder.
The decoder should be cloned to be used for decoding.
Sourcepub fn make_flat_tree(
&self,
channel: u32,
stream_idx: u32,
prev_channels: u32,
) -> FlatMaTree
pub fn make_flat_tree( &self, channel: u32, stream_idx: u32, prev_channels: u32, ) -> FlatMaTree
Creates a simplified MA tree with given channel index and stream index, which then can be used to decode samples.
The method will evaluate the tree with the given information and prune branches which are always not taken.
Source§impl MaConfig
impl MaConfig
Sourcepub fn num_tree_nodes(&self) -> usize
pub fn num_tree_nodes(&self) -> usize
Returns the number of MA tree nodes.
Sourcepub fn tree_depth(&self) -> usize
pub fn tree_depth(&self) -> usize
Returns the maximum distance from root to any leaf node.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MaConfig
impl RefUnwindSafe for MaConfig
impl Send for MaConfig
impl Sync for MaConfig
impl Unpin for MaConfig
impl UnwindSafe for MaConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more