pub struct QuantTable {
pub values: [u16; 64],
pub precision: u8,
}Expand description
A quantization table.
Fields§
§values: [u16; 64]Quantization values in zigzag order (1-255 for baseline, 1-65535 for extended)
precision: u8Precision: 0 = 8-bit, 1 = 16-bit
Implementations§
Source§impl QuantTable
impl QuantTable
Sourcepub fn from_natural_order(values: &[u16; 64]) -> Self
pub fn from_natural_order(values: &[u16; 64]) -> Self
Creates a new quantization table from values in natural (row-major) order.
Sourcepub fn to_natural_order(&self) -> [u16; 64]
pub fn to_natural_order(&self) -> [u16; 64]
Returns values in natural (row-major) order.
Trait Implementations§
Source§impl Clone for QuantTable
impl Clone for QuantTable
Source§fn clone(&self) -> QuantTable
fn clone(&self) -> QuantTable
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 QuantTable
impl Debug for QuantTable
Auto Trait Implementations§
impl Freeze for QuantTable
impl RefUnwindSafe for QuantTable
impl Send for QuantTable
impl Sync for QuantTable
impl Unpin for QuantTable
impl UnwindSafe for QuantTable
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