code wiki / _hdl_build / nx_connect_decode.nx

nx_connect_decode.nx

buildroot/runtime/_hdl_build/nx_connect_decode.nx

7046 B142 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic connect
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_connect_decode.nx

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

main sys_mmap downsample avg4 upsample sw sys_write sn sys_mmap ↻ sys_write ↻ frames_equal tcheck sw ↻ rle_encode rle_decode sys_exit

structs

none

consts

none

functions

11func sw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: tcheckmain calls 1: sys_write
12func 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 }
called by 1: main calls 2: sys_mmapsys_write
14func avg4(a: i64, b: i64, c: i64, d: i64) -> i64 { return (a+b+c+d)/4 }
called by 1: downsample
17func downsample(f: *i64, b: *i64) -> i64
called by 1: main calls 1: avg4
25func upsample(b: *i64, u: *i64) -> i64
called by 1: main
32func 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
35func rle_encode(src: *i64, n: i64, dst: *i64) -> i64
called by 1: main
46func rle_decode(enc: *i64, ol: i64, back: *i64) -> i64
called by 1: main
52func tcheck(pass: i64, label: *u8, fails: *i64) -> i64
called by 1: main calls 1: sw
58func main() -> i64