pub struct EntropyDecoder<S: RansParams> { /* private fields */ }Expand description
High-level entropy decoder using CDF tables for symbol lookup.
Generic over S: RansParams (RansByte or Rans64).
Implementations§
Source§impl<S: RansParams> EntropyDecoder<S>
impl<S: RansParams> EntropyDecoder<S>
Sourcepub fn initialize(
&mut self,
pmf_lengths: &[i32],
pmf_offsets: &[i32],
pmf_table: &[i32],
symbol_bits: u32,
bypass_bits: u32,
) -> Result<(), EntropyError>
pub fn initialize( &mut self, pmf_lengths: &[i32], pmf_offsets: &[i32], pmf_table: &[i32], symbol_bits: u32, bypass_bits: u32, ) -> Result<(), EntropyError>
Initialize the decoder with PMF distribution data.
pmf_lengths— number of symbols per distribution (including bypass sentinel)pmf_offsets— value offsets per distributionpmf_table— flat array of symbol frequencies for all distributionssymbol_bits— number of bits for symbol encoding (e.g. 16)bypass_bits— number of bits for bypass encoding (e.g. 4)
Trait Implementations§
Source§impl<S: RansParams> Default for EntropyDecoder<S>
impl<S: RansParams> Default for EntropyDecoder<S>
Auto Trait Implementations§
impl<S> Freeze for EntropyDecoder<S>
impl<S> RefUnwindSafe for EntropyDecoder<S>where
S: RefUnwindSafe,
impl<S> Send for EntropyDecoder<S>where
S: Send,
impl<S> Sync for EntropyDecoder<S>where
S: Sync,
impl<S> Unpin for EntropyDecoder<S>where
S: Unpin,
impl<S> UnsafeUnpin for EntropyDecoder<S>
impl<S> UnwindSafe for EntropyDecoder<S>where
S: UnwindSafe,
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