pub struct QuantizationOptimizer { /* private fields */ }Expand description
Quantization optimizer.
Implementations§
Source§impl QuantizationOptimizer
impl QuantizationOptimizer
Sourcepub fn new(enable_trellis: bool, deadzone_offset: f64) -> Self
pub fn new(enable_trellis: bool, deadzone_offset: f64) -> Self
Creates a new quantization optimizer.
Sourcepub fn quantize(&self, coeffs: &[i16], qp: u8) -> Vec<i16>
pub fn quantize(&self, coeffs: &[i16], qp: u8) -> Vec<i16>
Quantizes coefficients with optional trellis optimization.
Sourcepub fn calculate_deadzone(&self, variance: f64) -> f64
pub fn calculate_deadzone(&self, variance: f64) -> f64
Calculates optimal deadzone for a block.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QuantizationOptimizer
impl RefUnwindSafe for QuantizationOptimizer
impl Send for QuantizationOptimizer
impl Sync for QuantizationOptimizer
impl Unpin for QuantizationOptimizer
impl UnsafeUnpin for QuantizationOptimizer
impl UnwindSafe for QuantizationOptimizer
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> 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