code wiki / _hdl_build / nx_connect_decode.nx
nx_connect_decode.nx
buildroot/runtime/_hdl_build/nx_connect_decode.nx
about
nx_connect_decode.nx -- VIDEO ROOM receive: wire SVC layer-selection to REAL PIXELS. A sovereign
integer scalable codec (no floats): BASE layer = 2x2 downscale; ENHANCEMENT layer = residual to
reconstruct full resolution. A thumbnail subscription decodes BASE only; the active speaker
subscription decodes BASE+ENH = the original frame BIT-EXACT (lossless). Layers are RLE-compressed
and CONTENT-BLIND (decrypt-then-decode on the client; the server, lacking the key, cannot decode).
This makes the receive pipeline produce VERIFIED pixels; the heavy production codecs (ecosystem
h264/vp9/av1) drop into the same base+enhancement pipeline -- named substrate, not reinvented.
7 checks incl. negative controls. 100% sovereign. license_tier: ORIGINAL expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_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
| 11 | func sw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 12 | func sn(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 } |
| 14 | func avg4(a: i64, b: i64, c: i64, d: i64) -> i64 { return (a+b+c+d)/4 } called by 1: downsample |
| 17 | func downsample(f: *i64, b: *i64) -> i64 |
| 25 | func upsample(b: *i64, u: *i64) -> i64 called by 1: main |
| 32 | func frames_equal(a: *i64, b: *i64, n: i64) -> i64 { var i: i64=0; while i<n { if a[i]!=b[i] { return 0 } i=i+1 } return 1 } called by 1: main |
| 35 | func rle_encode(src: *i64, n: i64, dst: *i64) -> i64 called by 1: main |
| 46 | func rle_decode(enc: *i64, ol: i64, back: *i64) -> i64 called by 1: main |
| 52 | func tcheck(pass: i64, label: *u8, fails: *i64) -> i64 |
| 58 | func main() -> i64 |