code wiki / _hdl_build / nx_intra_image_gate.nx
nx_intra_image_gate.nx
buildroot/runtime/_hdl_build/nx_intra_image_gate.nx
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
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
structs
| none |
consts
| none |
functions
| 14 | func 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 } |
| 15 | func 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 } |
| 16 | func 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 } |
| 17 | func iabs(v: i64) -> i64 { if v<0 { return 0-v } return v } called by 1: main |
| 18 | func 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 |
| 20 | func main() -> i64 |