Expand description
Shared scalar oracle: float 9/7 bands into prequantized HTJ2K code-blocks.
This module uses the native encoder’s public irreversible 9/7 quantization step helper plus the native code-block layout rules, so both GPU backends can compare their fused code-block kernels against one authoritative CPU reference instead of each re-deriving the math.
The re-derivation is anchored to native truth by a codestream pin test (see the module tests): encoding the oracle’s prequantized output reproduces the native precomputed-DWT codestream byte-for-byte.
Functions§
- htj2k97_
subband_ delta - Deadzone quantization step size
Δfor a subband. - htj2k97_
subband_ total_ bitplanes - Total declared bitplanes for every code-block in a subband.
- prequantized_
component_ from_ dwt97 - Quantize one level of float 9/7 bands into a prequantized HTJ2K component.
- quantize_
codeblock_ subband - Quantize a single float subband and slice it into code-block-major layout.
- validate_
htj2k97_ codeblock_ options - Validate 9/7 code-block options against the numeric limits both GPU
backends must agree on, returning the decoded
(cb_width, cb_height).