code wiki / (root) / nx_av1_dct_gate.nx

nx_av1_dct_gate.nx

buildroot/runtime/nx_av1_dct_gate.nx

7757 B210 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic av1
docsdependenciesstructsconstsfunctions

about

nx_av1_dct_gate.nx -- proves the inverse DCT networks by STRUCTURAL property. Reference bit-exactness needs libaom's test vectors, which are not present here. What IS provable without them is the set of properties a correct DCT basis must have and a mis-wired one cannot fake: T1 DC-only in -> FLAT out. Any butterfly wired to the wrong index or any sign error in the even path breaks this immediately. T2 odd basis index -> ANTISYMMETRIC out (out[i] == -out[n-1-i]). This is what catches a wrong rotation angle in the odd path. T3 even basis index -> the specific symmetric pattern. T4 LINEARITY within rounding slack. A network that is structurally right but uses a halved angle still passes T1; it does not survive T2 plus the basis-frequency check in T5. T5 the constants land where the angle mapping says: cospi_16_64 is cos128(32) = 2896, not cos128(16). Halving the factor yields a transform that still LOOKS like a DCT and decodes blurred. This gate does NOT claim bit-exactness against libaom. It claims the network is structurally a DCT with the right frequencies. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_av1_txfm.nx nx_av1_dct.nx nx_av1_dct_gate.nx

imports: nx_syscalls.nxnx_av1_txfm.nxnx_av1_dct.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_av1_cos_table nx_av1_cos128 nx_av1_idct4 nx_av1_cos128 ↻ nx_av1_round2 absv nx_av1_idct8 nx_av1_cos128 ↻ nx_av1_sin128 nx_av1_cos128 ↻ sys_mmap ↻ nx_av1_round2 ↻ nx_av1_dct_permute sys_mmap ↻ nx_av1_brev g_puts sys_write sys_exit g_putn sys_mmap ↻ g_puts ↻ sys_write ↻

structs

none

consts

none

functions

27func g_puts(s: *u8) -> i64
called by 2: g_putnmain calls 1: sys_write
34func g_putn(v: i64) -> i64
called by 1: main calls 3: sys_mmapg_putssys_write
48func absv(x: i64) -> i64 { if x < 0 { return 0 - x } return x }
called by 1: main
50func main() -> i64