pub struct VardctQuantizer {
pub global_scale: u32,
pub quant_lf: u32,
}Expand description
VarDCT quantizer fields recovered from a JPEG XL frame’s LfGlobal
section (the lossy quantization state).
These are the raw bitstream values. Mapping them to an encoder “quality” or Butteraugli distance is encoder-specific and approximate, so it lives in higher-level crates rather than the decoder.
Fields§
§global_scale: u32The frame’s global_scale field. Larger = coarser quantization
(lower quality). Always >= 1.
quant_lf: u32The frame’s quant_lf field — the low-frequency quantization
multiplier. Always >= 1.
Implementations§
Source§impl VardctQuantizer
impl VardctQuantizer
Sourcepub fn inv_global_scale(&self) -> f32
pub fn inv_global_scale(&self) -> f32
2^16 / global_scale: the inverse global scale. Larger = finer
quantization (higher quality). This is the objective dequantization
factor, independent of any encoder’s quality mapping.
Trait Implementations§
Source§impl Clone for VardctQuantizer
impl Clone for VardctQuantizer
Source§fn clone(&self) -> VardctQuantizer
fn clone(&self) -> VardctQuantizer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for VardctQuantizer
Source§impl Debug for VardctQuantizer
impl Debug for VardctQuantizer
impl Eq for VardctQuantizer
Source§impl PartialEq for VardctQuantizer
impl PartialEq for VardctQuantizer
Source§fn eq(&self, other: &VardctQuantizer) -> bool
fn eq(&self, other: &VardctQuantizer) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VardctQuantizer
Auto Trait Implementations§
impl Freeze for VardctQuantizer
impl RefUnwindSafe for VardctQuantizer
impl Send for VardctQuantizer
impl Sync for VardctQuantizer
impl Unpin for VardctQuantizer
impl UnsafeUnpin for VardctQuantizer
impl UnwindSafe for VardctQuantizer
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