code wiki / _hdl_build / nx_video_native_video_gate.nx
nx_video_native_video_gate.nx
buildroot/runtime/_hdl_build/nx_video_native_video_gate.nx
about
nx_video_native_video_gate.nx -- MOBILE-NATIVE VIDEO proof (task #22/#47). The chat gate proved a pure-nx
client (no browser/JS/wasm) is a room participant; THIS proves the same native client does VIDEO end to end
on the LIVE relay, producing the byte-identical 0x57 wire the browser speaks -> native<->browser interop.
Native peer A: synthetic YUV frame -> vv_enc (the SHARED core: DCT-II + in-loop deblock + AQ, native) ->
0x57 payload [key|qp|w|h][vv_enc out] -> vc_wire_pack -> TLS-1.3/WSS -> relay. Native peer B: receives via
the content-blind broadcast, vc_wire_parse (asserts kind 0x57), vv_dec -> recon; independently vv_enc+the
SAME frame locally and asserts the DECODED-FROM-WIRE recon == the LOCAL recon BIT-EXACT. GREEN = native
video works on the real edge with a browser-compatible bitstream (the codec gains ride the shared core for
free). Camera(V4L2)/display(framebuffer) are the remaining hardware last-mile. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_ws_client_session.nxnx_video_client_wasm.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
| 13 | func nw(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 1: main |
| 14 | func nn(v: i64) -> i64 |
| 18 | func eqb(a: *u8, b: *u8, n: i64) -> i64 { var i: i64=0; while i<n { if (a[i]&0xff)!=(b[i]&0xff) { return 0 } i=i+1 } return 1 } |
| 19 | func vfill(yuv: *u8, W: i64, H: i64) -> i64 { // gradient + edge + chroma tint = realistic content |
| 27 | func pack57(pay: *u8, cur: *u8, prevE: *u8, reconE: *u8, W: i64, H: i64, qp: i64, blk: *i64, mv: *i64) -> i64 calls 1: vv_enc |
| 34 | func main() -> i64 |