code wiki / _hdl_build / _codec_bench.nx
_codec_bench.nx
buildroot/runtime/_hdl_build/_codec_bench.nx
about
_codec_bench.nx -- SOVEREIGN SAME-CORPUS codec head-to-head (no-wave, no external tool, no
fabricated numbers): our lossless frame codec (fc = MED spatial predictor + Rice) vs sovereign
DEFLATE, on IDENTICAL frames. Two deflate baselines: raw (general compressor) and Sub-prefiltered
(PNG-class = PNG applies per-row filters then deflate). Verdict per frame = fc size < PNG-class size.
All three measured on the SAME bytes -> a real measured exceed, honest by construction.
dependencies 3 imports · 0 importers
imports: nx_frame_codec.nxnx_deflate_fixed.nxnx_syscalls.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
| 9 | func bp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 10 | func bn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; var k: i64=0; let t: *u8=sys_mmap(28); if m==0{t[0]=48;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{b[i]=t[k-1-i];i=i+1}; sys_write(1,b,k); return 0 } |
| 12 | func sub_filter(buf: *u8, w: i64, h: i64, res: *u8) -> i64 called by 1: bench_buf |
| 26 | func bench_buf(label: *u8, buf: *u8, w: i64, h: i64, scratch: *u8, cap: i64) -> i64 |
| 41 | func main() -> i64 |