nx_jpeg_dequant_test.nx
buildroot/runtime/nx_jpeg_dequant_test.nx
about
nx_jpeg_dequant_test.nx -- KAT for dequant + un-zigzag composer.
Construction:
zz_coeffs[k] = k (0, 1, 2, ..., 63)
quant_zz[k] = k + 1 (1, 2, 3, ..., 64)
natural[un_zigzag[k]] = zz_coeffs[k] * quant_zz[k] = k * (k + 1)
Cross-check against the published un_zigzag table for the first
few positions:
k=0 -> nat[0] = 0 * 1 = 0
k=1 -> nat[1] = 1 * 2 = 2
k=2 -> nat[8] = 2 * 3 = 6
k=3 -> nat[16] = 3 * 4 = 12
k=4 -> nat[9] = 4 * 5 = 20
k=5 -> nat[2] = 5 * 6 = 30
...
Also: end-to-end composition with the entropy decoder's output
shape (zero-padded zig-zag block) yields a sparse natural block
at the expected natural positions.
expect_exit: 0
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_jpeg_zigzag.nxnx_jpeg_dequant.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 29 | func _fail(n: i64) -> i64 |
| 49 | func main() -> i64 |