code wiki / _hdl_build / nx_intra_image_gate.nx

nx_intra_image_gate.nx

buildroot/runtime/_hdl_build/nx_intra_image_gate.nx

8111 B165 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic intra
docsdependenciesstructsconstsfunctions

about

nx_intra_image_gate.nx -- SOVEREIGN proof of the patent-free intra IMAGE codec (Phase-1 capstone): tiles the 8x8 block coder across a full image with ONE amortized static frequency table, and measures image-level compression (freq-table cost INCLUDED in the total -- honest, not hidden) + reconstruction error. Flow: pixels -> per 8x8 block [level-shift -> 2D DCT-II (nx_dct8, foundational EXPIRED math) -> scalar quantize] -> collect ALL quantized coeffs -> 16-bit serialize -> ONE rANS (nx_rans, PUBLIC DOMAIN) over the whole image with ONE shared table -> [decode -> per-block dequant -> inverse DCT] -> reconstruct. Every tool EXPIRED or PUBLIC-DOMAIN; no CABAC; integer-only; nx_cc->nxasm, no gcc. GREEN iff 6/6. Durable knowledge/status/intra_image_gate.log. license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_gate_emit_lib.nx nx_dct8.nx nx_rans.nx nx_intra_image_gate.nx

imports: nx_syscalls.nxnx_gate_emit_lib.nxnx_dct8.nxnx_rans.nx

imported by: nobody (leaf or entry point)

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

main g_puts sys_write sys_mmap nx_dct8_init nx_dct8_forward_2d nx_dct8_forward_1d qround rans_count rans_normalize rans_cum rans_build_slot2sym rans_encode sys_mmap ↻ rans_decode nx_dct8_inverse_2d nx_dct8_inverse_1d iabs g_num sys_mmap ↻ sys_write ↻ g_check g_puts ↻ sys_openat_append g_w sys_write ↻ g_wn sys_mmap ↻ sys_write ↻ sys_close sys_exit

structs

none

consts

none

functions

14func g_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
15func g_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 1: main calls 1: sys_write
16func g_wn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
17func iabs(v: i64) -> i64 { if v<0 { return 0-v } return v }
called by 1: main
18func qround(v: i64, q: i64) -> i64 { if v>=0 { return (v + q/2)/q } return 0 - (((0-v) + q/2)/q) }
called by 1: main
20func main() -> i64