code wiki / (root) / nx_av1_txfm_gate.nx

nx_av1_txfm_gate.nx

buildroot/runtime/nx_av1_txfm_gate.nx

8122 B189 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic av1
docsdependenciesstructsconstsfunctions

about

nx_av1_txfm_gate.nx -- proves the AV1/AV2 transform primitives. T1 pins the DIFFERENCE between Round2 and Round2Signed on negatives. They agree on non-negative input and diverge below zero: Round2(-3,1) is -1, Round2Signed(-3,1) is -2. Substituting one for the other yields a transform that is correct on a test pattern of positives and half-wrong on real signal. The gate asserts the divergence explicitly rather than testing each in isolation, because testing them separately is exactly what lets the substitution survive. T4 pins the cosine table's QUADRANT SIGNS. Only angles 0..64 are stored; the rest are reflections. A wrong sign in one quadrant inverts half the basis functions and decodes to a recognisable-but-wrong image -- it does not look like noise, so it ships easily. The test walks all four quadrants and asserts the Pythagorean identity holds at 12-bit precision throughout. T5 round-trips the Walsh-Hadamard pair over pseudo-random vectors -- the lossless path must be EXACTLY invertible, not approximately. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_av1_txfm.nx nx_av1_txfm_gate.nx

imports: nx_syscalls.nxnx_av1_txfm.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nx_av1_round2 nx_av1_round2_signed nx_av1_round2 ↻ nx_av1_brev nx_av1_clamp sys_mmap nx_av1_cos_table nx_av1_cos128 nx_av1_sin128 nx_av1_cos128 ↻ nx_av1_fwht4 nx_av1_iwht4 nx_av1_identity8 nx_av1_identity32 nx_av1_identity4 nx_av1_round2 ↻ nx_av1_identity16 nx_av1_round2 ↻ nx_av1_butterfly_h nx_av1_butterfly_b nx_av1_cos128 ↻ nx_av1_sin128 ↻ nx_av1_round2 ↻ g_puts sys_write sys_exit g_putn sys_mmap ↻ g_puts ↻ sys_write ↻

structs

none

consts

none

functions

24func g_puts(s: *u8) -> i64
called by 2: g_putnmain calls 1: sys_write
31func g_putn(v: i64) -> i64
called by 1: main calls 3: sys_mmapg_putssys_write
45func main() -> i64