nx_h264_nc.nx
buildroot/runtime/nx_h264_nc.nx
about
nx_h264_nc.nx -- CAVLC neighbour context nC (spec 9.2.1) + coeff_token table
selection. nC picks which coeff_token VLC table a 4x4 block uses, from the
TotalCoeff of its LEFT (nA) and TOP (nB) neighbour blocks:
both available -> nC = (nA + nB + 1) >> 1
left only -> nC = nA ; top only -> nC = nB ; neither -> nC = 0
chroma DC -> nC = -1 (special table)
Table index by nC: 0 (0<=nC<2), 1 (2<=nC<4), 2 (4<=nC<8), 3 (FLC, nC>=8),
4 (chroma DC, nC=-1).
The MB loop tracks per-4x4-block TotalCoeff to feed nA/nB. This is the key
missing algorithm for decoding blocks beyond the first (which was nC=0).
genealogy_id: itu_t_h264_sec9_2_1_nC_derivation
lineage_id: neighbour_totalcoeff_average + coeff_token_table_select
license_tier: ORIGINAL
dependencies 1 imports · 9 importers
imports: nx_syscalls.nx
imported by: nx_h264_bframe_walk.nxnx_h264_brecon.nxnx_h264_decode_frame.nxnx_h264_iframe.nxnx_h264_mv_recon_gate.nxnx_h264_nc_gate.nxnx_h264_pframe_recon.nxnx_h264_pframe_walk.nxnx_h264_pmvfield.nx
structs
| none |
consts
| 17 | const NX_NC_CHROMA_DC: i64 = 0 - 1 |
functions
| 19 | func nx_h264_nc_luma(nA: i64, availA: i64, nB: i64, availB: i64) -> i64 |
| 27 | func nx_h264_coeff_token_table(nC: i64) -> i64 called by 1: main |