code wiki / _hdl_build / nx_vcodec_compound_ceil.nx

nx_vcodec_compound_ceil.nx

buildroot/runtime/_hdl_build/nx_vcodec_compound_ceil.nx

6402 B120 linesdepth 6pulls 16 transitivereach 0 importersview sourcekind tooltopic vcodec
docsdependenciesstructsconstsfunctions

about

nx_vcodec_compound_ceil.nx -- GEN-2 RUNG-0 PROBE P0a: compound-from-past AVERAGING ceiling (SAD domain). Question: on P-frames, does predicting a coded MB as the AVERAGE of two motion-compensated PAST references (latency-safe: no future frame) beat the single-ref prediction we ship? Compound averaging cancels independent quant noise between refs (up to ~sqrt(2) on static) and covers occlusion flips -- multi-ref SELECTION measured only 1.5%, but AVERAGING is unmeasured and is gen-2's biggest open lever. Method: build the recon chain with the REAL shipped encoder (vv_enc_rct8, emode 681); per coded (non-skip-threshold) MB, compare full-pel ME SAD: single = vm_search vs prev1; compound = avg(MC(prev1,mv1), MC(prev2,mv2)) with mv2 = vm_search vs prev2. Both arms full-pel (equal granularity = fair relative). Reports total SADs + the per-mille cut + the share of MBs where compound wins. ⚠SAD->bits is SUBLINEAR (measured: an 18% SAD cut -> 3.7% bits at qp8) -- read the result as an UPPER-bound direction gate for building compound syntax, not as BD-rate. license: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_video_codec_wasm.nx nx_vcodec_compound_ceil.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 sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gw sys_write ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close frames sweepqp sys_mmap ↻ runv sys_mmap ↻ vc_t8_init nx_dct8_init vc_t8p sad_avg2 vv_enc_rct8 vc_enc_frame_packed_rct8 rc_enc_init nx_bw_put vc_aq_level vc_mb_mad

structs

none

consts

14const SW: i64 = 352
15const SH: i64 = 288
16const NF: i64 = 48

functions

18func gw(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: sweepqpmain calls 1: sys_write
19func gn(v: i64) -> i64
called by 1: sweepqp calls 2: sys_mmapsys_write
23func cpb(d: *u8, s: *u8, n: i64) -> i64 { var i: i64=0; while i<n { d[i]=s[i]; i=i+1 } return 0 }
called by 1: runv
25func frames(yuv: *u8, hi: i64, total: i64, fp: *i64, fdata: i64) -> i64
called by 1: main
33func sad_avg2(cur: *u8, r1: *u8, r2: *u8, W: i64, cx: i64, cy: i64, m1x: i64, m1y: i64, m2x: i64, m2y: i64) -> i64
called by 1: runv
48func runv(fp: *i64, qp: i64, sz: i64, out: *i64) -> i64
92func sweepqp(fp: *i64, sz: i64, qp: i64) -> i64
called by 1: main calls 4: sys_mmaprunvgwgn
104func main() -> i64