nx_h264_cabac_gate.nx
buildroot/runtime/nx_h264_cabac_gate.nx
about
nx_h264_cabac_gate.nx -- REFEREE for the H.264 CABAC arithmetic engine (STEP 1 core).
Three known-answer checks:
(1) tables: rangeTabLps/transIdxLps/transIdxMps parse to 256/64/64 (fail-closed loader).
(2) engine KAT: the arithmetic engine is byte-identical to the GATED nx_hevc_cabac engine,
so on the SAME self-test (buf[i]=(i*37+11)&0xff, ctxInit initValue=154 @ QP26) it MUST
reproduce the exact captured answer: init range=510 offset=22; ctx0 pState=0 mps=1;
16 bypass bins = 0x0B3B; 16 decision bins = 0x0708; terminate=0; range stays in [256,510].
(3) (m,n) context init: two hand-computed vectors verify the H.264 clause-9.3.1.1 formula
(m=20,n=-15,QP26 -> pre=17 -> pState=46,mps=0) and (m=20,n=60,QP40 -> pre=110 -> pState=46,mps=1).
stdout + knowledge/status/h264_cabac_gate.log. Exit 0/1. Sovereign. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_h264_cabac.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
| 14 | func gp(logfd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); if logfd > 0 { sys_write(logfd, s, n) } return 0 } |
| 15 | func gn(logfd: i64, v: i64) -> i64 |
| 28 | func kat_engine(rlps: *i64, tlps: *i64, tmps: *i64) -> i64 |
| 60 | func kat_ctxinit_mn() -> i64 |
| 72 | func main() -> i64 |