pub struct Qcd {
pub style: QuantStyle,
pub guard_bits: u8,
pub steps: Vec<(u8, u16)>,
}Expand description
QCD — quantization default (ISO A.6.4): the step sizes / exponents the dequant stage applies, with the guard-bit count.
Fields§
§style: QuantStyle§guard_bits: u8§steps: Vec<(u8, u16)>(exponent, mantissa) per subband; mantissa is 0 for the reversible style.
Implementations§
Source§impl Qcd
impl Qcd
Sourcepub fn subband_step(&self, band: usize) -> Option<(u8, u16)>
pub fn subband_step(&self, band: usize) -> Option<(u8, u16)>
The (exponent, mantissa) quantization pair for subband index band
(0 = LL, then HL, LH, HH per resolution level coarsest-first), or
None if the QCD does not carry it. Reversible (None style) and
expounded QCDs store one pair per subband; the derived style stores only
subband 0 and drops the exponent by one per resolution level finer
(E-5: ε_b = max(ε_0 − ⌊(b−1)/3⌋, 0)), keeping the single mantissa.
Both the Tier-1 bit-plane count (Mb) and the dequant step read this, so
the per-band mapping lives here once rather than in two places that must
stay numerically identical.