code wiki / (root) / nx_av1_intra_gate.nx

nx_av1_intra_gate.nx

buildroot/runtime/nx_av1_intra_gate.nx

9750 B257 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic av1
docsdependenciesstructsconstsfunctions

about

nx_av1_intra_gate.nx -- proves AV1/AV2 non-directional intra prediction. T2 pins DC's FOUR availability cases. With NEITHER edge the answer is mid-grey 1 << (bitdepth-1), not zero. A decoder that treats a missing edge as zeros predicts black along the top and left of every frame -- which reads as a vignette, not as a bug. T5 is the strongest structural check for the smooth family: with CONSTANT neighbours every smooth predictor must return exactly that constant. That holds only if each weight and its complement sum to 256 and the rounding matches. Using 255 as the complement produces almost-right constants -- a fraction of a level per pixel, accumulating across a frame as a gradient. T4 pins Paeth's TIE ORDER and that it SELECTS rather than averages: over 300 random triples the result must always be one of its three inputs. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_av1_intra.nx nx_av1_intra_gate.nx

imports: nx_syscalls.nxnx_av1_intra.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_intra_sm_weight nx_intra_dc_value nx_intra_predict nx_intra_dc_value ↻ nx_intra_paeth_pick nx_intra_abs nx_intra_sm_weight ↻ nx_intra_paeth_pick ↻ g_puts sys_write sys_exit g_putn sys_mmap ↻ g_puts ↻ sys_write ↻

structs

none

consts

none

functions

21func g_puts(s: *u8) -> i64
called by 2: g_putnmain calls 1: sys_write
28func g_putn(v: i64) -> i64
called by 1: main calls 3: sys_mmapg_putssys_write
42func main() -> i64