code wiki / _hdl_build / nx_vcodec_multiref_gate.nx
nx_vcodec_multiref_gate.nx
buildroot/runtime/_hdl_build/nx_vcodec_multiref_gate.nx
about
nx_vcodec_multiref_gate.nx -- MEASURES the latency-safe B-frame lever: does predicting from TWO PAST
references (multi-ref best-of + COMPOUND averaging) shrink the residual vs single-ref (previous frame only)?
This is how low-latency RTC codecs get B-frame-like gains WITHOUT the reorder/latency of classic
bidirectional B (which references a FUTURE frame). Per 16x16 block, on real frames, measures total residual
SAD for: (1) single-ref = prev frame N-1; (2) multi-ref = best-of {N-1, N-2, N-4 long-term}; (3) compound =
average of the two best past predictions. The SAD reduction = the upper-bound prediction gain a multi-ref/
compound generation would win. GREEN reports the measured reduction (build-decision, not pass/fail-of-idea).
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_vmotion.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
| 12 | const NW: i64 = 576 |
| 13 | const NH: i64 = 1024 |
| 14 | const T: i64 = 16 |
| 15 | const R: i64 = 8 |
functions
| 17 | func gw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 18 | func gn(v: i64) -> i64 |
| 24 | func compound_sad(cur: *u8, r1: *u8, r2: *u8, W: i64, cx: i64, cy: i64, mvx1: i64, mvy1: i64, mvx2: i64, mvy2: i64) -> i64 called by 1: main |
| 36 | func inb(cx: i64, cy: i64, mvx: i64, mvy: i64) -> i64 { // is the MC block fully in-frame? called by 1: main |
| 41 | func main() -> i64 |