nx_h264_residual.nx
buildroot/runtime/nx_h264_residual.nx
about
nx_h264_residual.nx -- CAVLC residual 4x4 block assembler (rung 4c-v, spec 9.2).
Ties the four VLC primitives into a scan-order coefficient block, and its
inverse encoder so the whole thing is round-trip-gated SOVEREIGNLY.
decode: coeff_token -> (TotalCoeff,TrailingOnes); trailing-one signs; levels
(suffixLength init + first-level +2 offset); total_zeros; run_before
distribution; reverse-scan placement -> coeff[scan].
encode: analyse coeff[] -> tc/t1/levels/runs/total_zeros -> emit (exact inverse).
Coverage is bounded by the filled VLC subsets (full tables fill later; the real
I-frame decode is the capstone oracle). Scan-order output; raster conversion
(inverse zigzag) is a tiny separate step.
genealogy_id: itu_t_h264_sec9_2_residual_block
lineage_id: coeff_token+signs+levels+total_zeros+run_before+reverse_scan
license_tier: ORIGINAL
dependencies 8 imports · 11 importers
diagram shows first 10 each side; +0 more imports, +1 more importers in the complete lists below.
imports: nx_syscalls.nxnx_h264_bits.nxnx_h264_bitwriter.nxnx_h264_cavlc_level.nxnx_h264_cavlc_enc.nxnx_h264_coeff_token.nxnx_h264_total_zeros.nxnx_h264_run_before.nx
imported by: nx_h264_bframe_walk.nxnx_h264_block_e2e_gate.nxnx_h264_brecon.nxnx_h264_decode_frame.nxnx_h264_iframe.nxnx_h264_mv_recon_gate.nxnx_h264_pframe_recon.nxnx_h264_pframe_walk.nxnx_h264_pmvfield.nxnx_h264_residual_gate.nxnx_h264_slice_extract.nx
structs
| none |
consts
| none |
functions
| 25 | func nx_h264_residual_decode(br: *BitReader, max_num_coeff: i64, nC: i64, coeff: *i64) -> i64 |
| 78 | func nx_h264_residual_decode_cdc(br: *BitReader, out: *i64) -> i64 |
| 129 | func nx_h264_residual_encode(bw: *BitWriter, coeff: *i64, max_num_coeff: i64, nC: i64) -> i64 |