code wiki / (root) / nx_jpeg_dequant_test.nx

nx_jpeg_dequant_test.nx

buildroot/runtime/nx_jpeg_dequant_test.nx

4375 B122 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic jpeg
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_jpeg_zigzag.nx nx_jpeg_dequant.nx nx_jpeg_dequant_test.nx

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

main sys_mmap nx_jpeg_zigzag_inverse_tab nx_jpeg_dequant_un_zigzag sys_mmap ↻ nx_jpeg_zigzag_inverse_tab ↻ _fail sys_mmap ↻ sys_write sys_write ↻

structs

none

consts

none

functions

29func _fail(n: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
49func main() -> i64