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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)