Expand description
Separable multi-level 3D wavelet transforms by lifting.
- CDF 9/7 (f64 lifting, the JPEG 2000 irreversible filter): the lossy
path. Float, but plain IEEE
+/*in a fixed order with no fused ops, so the CPU decoder is deterministic. - LeGall 5/3 (integer lifting, the JPEG 2000 reversible filter): the
lossless path, exact on
i32.
Both use whole-sample symmetric extension and work on any length ≥ 1 (odd
lengths keep the extra sample in the low band). The pyramid is dyadic on the
LL region; at each level every axis whose current length is ≥ MIN_LEN
is split, so a 64×128×128 block gets 4 levels on its short axis and 5 on
the others (anisotropic bands where axes stop early). Arrays are always
handled as 3D, with leading unit axes for 1D/2D input.
Structs§
- Band
- A subband: level
level(0 = finest), orientationmask(bitaset = highpass along axisa;mask == 0is the final LL), half-open region. - Pyramid
- The dyadic pyramid for a shape.
Constants§
- MAX_
LEVELS - Level cap for 2D/3D arrays.
- MAX_
LEVELS_ 1D - Level cap for 1D signals (and the size of the basis-norm table).
- MIN_LEN
- An axis is split at a level only while its LL length is at least this.
Functions§
- as3
- Pad an n-D shape (n ≤ 3) to 3D with leading unit axes.
- forward_
53 - Forward multi-level integer 5/3 in place.
- forward_
97 - Forward multi-level CDF 9/7 in place.
- fwd53
- One level of forward integer 5/3 (reversible) on
x. - fwd97
- One level of forward CDF 9/7 on
x(in place: low half first). - inv53
- Inverse of
fwd53. - inv97
- Inverse of
fwd97. - inverse_
53 - Inverse multi-level integer 5/3 in place.
- inverse_
97 - Inverse multi-level CDF 9/7 in place.
- norms_
97 - 1D synthesis-basis norms
(lo[k], hi[k])afterksplits (lo[0] = 1).