code wiki / _hdl_build / nx_video_codec_wasm_gate.nx

nx_video_codec_wasm_gate.nx

buildroot/runtime/_hdl_build/nx_video_codec_wasm_gate.nx

7243 B140 linesdepth 6pulls 16 transitivereach 0 importersview sourcekind gate/prooftopic video
docsdependenciesstructsconstsfunctions

about

nx_video_codec_wasm_gate.nx -- gate the YUV420 wire wrapper (nx_video_codec_wasm) BEFORE it ships (task #27): color round-trip sane, encode->decode CLOSED LOOP bit-exact (decoder recon == encoder recon, the law the realseq gate proved for luma, now for all 3 planes through the packed wire stream), P-frame smaller than key on real motion, and the wire boundary REFUSES truncated/hostile frames (rule 12). Frames carry +/-2 noise (the synthetic-bench trap fix: bit-identical statics flatter the codec). 0=GREEN / 1=RED. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_video_codec_wasm.nx nx_video_codec_wasm_gate.nx

imports: nx_syscalls.nxnx_video_codec_wasm.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main g_w sys_write sys_mmap g_paint_rgba g_noise vv_clamp255 vv_rgba_to_yuv420 vv_clamp255 ↻ vv_yuv420_to_rgba vv_clamp255 ↻ g_psnr_y g_n g_w ↻ sys_mmap ↻ sys_write ↻ chk g_w ↻ vv_enc vc_enc_frame_packed_tf nx_bw_put vc_aq_level vc_mb_mad vc_enc_block_packed vc_enc_block_packed_e vc_enc_block_packed_i vm_sad_zero vs_skip nx_bw_put ↻ vc_intra_dc_sad vm_search vc_enc_mb4r_intra vm_sad vc_rd_part_inter vc_t8p vc_enc_mb_part8_inter vm_search_q vc_mvpred vc_gput vc_mvplane_set

structs

none

consts

20const GW: i64 = 320
21const GH: i64 = 240

functions

10func g_w(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 3: g_nchkmain calls 1: sys_write
11func g_n(v: i64) -> i64
called by 1: main calls 3: g_wsys_mmapsys_write
15func chk(cond: i64, name: *u8, pp: *i64, tp: *i64) -> i64
called by 1: main calls 1: g_w
24func g_noise(seed: i64) -> i64 { return ((seed * 1103515245 + 12345) >> 16) & 3 }
called by 1: g_paint_rgba
27func g_paint_rgba(rgba: *u8, sx: i64, f: i64) -> i64
called by 1: main calls 2: g_noisevv_clamp255
49func g_bytes_eq(a: *u8, b: *u8, n: i64) -> i64
called by 1: main
55func g_psnr_y(a: *u8, b: *u8, n: i64) -> i64
called by 1: main
72func main() -> i64