pub struct Av1ArithmeticEncoder { /* private fields */ }Expand description
Arithmetic encoder state.
Implementations§
Source§impl ArithmeticEncoder
impl ArithmeticEncoder
Sourcepub fn encode_symbol(&mut self, symbol: u16, cdf: &[u16])
pub fn encode_symbol(&mut self, symbol: u16, cdf: &[u16])
Encode a symbol using CDF.
§Arguments
symbol- Symbol value to encodecdf- Cumulative distribution function
Sourcepub fn encode_bool(&mut self, symbol: bool, prob: u16)
pub fn encode_bool(&mut self, symbol: bool, prob: u16)
Encode a binary symbol (0 or 1).
Sourcepub fn encode_literal(&mut self, value: u32, num_bits: u8)
pub fn encode_literal(&mut self, value: u32, num_bits: u8)
Encode a literal value with uniform distribution.
Trait Implementations§
Source§impl Clone for ArithmeticEncoder
impl Clone for ArithmeticEncoder
Source§fn clone(&self) -> ArithmeticEncoder
fn clone(&self) -> ArithmeticEncoder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArithmeticEncoder
impl Debug for ArithmeticEncoder
Auto Trait Implementations§
impl Freeze for ArithmeticEncoder
impl RefUnwindSafe for ArithmeticEncoder
impl Send for ArithmeticEncoder
impl Sync for ArithmeticEncoder
impl Unpin for ArithmeticEncoder
impl UnsafeUnpin for ArithmeticEncoder
impl UnwindSafe for ArithmeticEncoder
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more