pub struct RCQsModel { /* private fields */ }Expand description
Quasi-Static adaptive probability model for the range coder.
Implementations§
Source§impl RCQsModel
impl RCQsModel
Sourcepub fn new(compress: bool, symbols: usize, bits: i32, period: i32) -> Self
pub fn new(compress: bool, symbols: usize, bits: i32, period: i32) -> Self
Creates a new quasi-static probability model.
compress: true for compression, false for decompression.
symbols: number of symbols.
bits: log2 of total frequency count (must be <= 16).
period: max symbols between normalizations.
Sourcepub fn with_defaults(compress: bool, symbols: usize) -> Self
pub fn with_defaults(compress: bool, symbols: usize) -> Self
Creates a new model with default bits=16 and period=0x400.
pub fn symbols(&self) -> usize
Sourcepub fn encode(&mut self, s: u32) -> (u32, u32)
pub fn encode(&mut self, s: u32) -> (u32, u32)
Gets the cumulative and individual frequencies for encoding symbol s.
Auto Trait Implementations§
impl Freeze for RCQsModel
impl RefUnwindSafe for RCQsModel
impl Send for RCQsModel
impl Sync for RCQsModel
impl Unpin for RCQsModel
impl UnsafeUnpin for RCQsModel
impl UnwindSafe for RCQsModel
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