pub struct ParamQcd { /* private fields */ }Expand description
QCD/QCC marker segment — quantization parameters.
Defines the quantization step sizes for all subbands (QCD = default, QCC = per-component override). For reversible transforms, the step sizes encode exponent information; for irreversible transforms, mantissa+exponent pairs are stored.
Implementations§
Source§impl ParamQcd
impl ParamQcd
Sourcepub fn set_delta(&mut self, delta: f32)
pub fn set_delta(&mut self, delta: f32)
Sets the base quantization step size (Δ) for irreversible coding.
Typical values are in the range 0.0001–1.0. Smaller values yield higher quality and larger files.
Sourcepub fn set_delta_for_comp(&mut self, comp_idx: u32, delta: f32)
pub fn set_delta_for_comp(&mut self, comp_idx: u32, delta: f32)
Sets the base quantization step size for a specific component.
Sourcepub fn get_num_guard_bits(&self) -> u32
pub fn get_num_guard_bits(&self) -> u32
Returns the number of guard bits.
pub fn get_magb(&self) -> u32
pub fn get_kmax( &self, _num_decompositions: u32, resolution: u32, subband: u32, ) -> u32
pub fn get_irrev_delta( &self, _num_decompositions: u32, resolution: u32, subband: u32, ) -> f32
pub fn check_validity(&mut self, siz: &ParamSiz, cod: &ParamCod) -> Result<()>
Sourcepub fn get_qcc(&self, comp_idx: u32) -> &ParamQcd
pub fn get_qcc(&self, comp_idx: u32) -> &ParamQcd
Get QCC for a component, or self if not found
pub fn get_or_add_qcc(&mut self, comp_idx: u32) -> &mut ParamQcd
pub fn write(&mut self, file: &mut dyn OutfileBase) -> Result<bool>
pub fn write_qcc( &self, file: &mut dyn OutfileBase, num_comps: u32, ) -> Result<bool>
pub fn read(&mut self, file: &mut dyn InfileBase) -> Result<()>
pub fn read_qcc( &mut self, file: &mut dyn InfileBase, num_comps: u32, ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParamQcd
impl RefUnwindSafe for ParamQcd
impl Send for ParamQcd
impl Sync for ParamQcd
impl Unpin for ParamQcd
impl UnsafeUnpin for ParamQcd
impl UnwindSafe for ParamQcd
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