nx_h264_coeff_token.nx
buildroot/runtime/nx_h264_coeff_token.nx
about
nx_h264_coeff_token.nx -- CAVLC coeff_token VLC (rung 4c-ii), table-driven
encoder + decoder. coeff_token maps a prefix-free code <-> (TotalCoeff,
TrailingOnes), selected by neighbour context nC. This builds the MACHINERY
(lookup-by-symbol encode, accumulate-and-match decode) + the high-confidence
canonical subset of the 0<=nC<2 table (Table 9-5 first column).
SOVEREIGN VALIDATION: round-trip (encode->decode) gates the machinery; the
anchored short codes pin those entries to the spec; the ULTIMATE oracle is
decoding the real I-frame (wrong table value -> desync -> garbage image, so a
coherent reconstruction proves every entry). No third-party reference.
HONEST: only the verified subset (TotalCoeff<=3 short codes + a few) is filled;
the full TC 0..16 x 4 nC contexts is accuracy-critical data to complete from the
ITU-T spec, validated by the real-frame decode. nC>=8 uses a 6-bit FLC (not here yet).
genealogy_id: itu_t_h264_table9_5_coeff_token
lineage_id: vlc_symbol_table + prefix_match_decode + roundtrip_oracle
license_tier: ORIGINAL
dependencies 3 imports · 14 importers
diagram shows first 10 each side; +0 more imports, +4 more importers in the complete lists below.
imports: nx_syscalls.nxnx_h264_bits.nxnx_h264_bitwriter.nx
imported by: nx_h264_bframe_walk.nxnx_h264_brecon.nxnx_h264_cdc_gate.nxnx_h264_coeff_token_gate.nxnx_h264_ctctx_gate.nxnx_h264_ctfull_gate.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.nxnx_h264_slice_extract.nx
structs
| none |
consts
| none |
functions
| 26 | func ct_table_nc01(ln: *i64, cd: *i64, tc: *i64, to: *i64) -> i64 |
| 97 | func ct_table_chromadc(ln: *i64, cd: *i64, tc: *i64, to: *i64) -> i64 |
| 115 | func nx_coeff_token_encode_cdc(bw: *BitWriter, total_coeff: i64, trailing_ones: i64) -> i64 |
| 129 | func nx_coeff_token_decode_cdc(br: *BitReader, out: *i64) -> i64 called by 3: mainnx_coeff_token_decode_ctxnx_h264_residual_decode_cdc calls 2: ct_table_chromadcbr_read_bit |
| 149 | func nx_coeff_token_encode(bw: *BitWriter, total_coeff: i64, trailing_ones: i64) -> i64 |
| 164 | func nx_coeff_token_decode(br: *BitReader, out: *i64) -> i64 |
| 185 | func ct_table_nc23(ln: *i64, cd: *i64, tc: *i64, to: *i64) -> i64 called by 1: ct_table_for |
| 254 | func ct_table_nc47(ln: *i64, cd: *i64, tc: *i64, to: *i64) -> i64 called by 1: ct_table_for |
| 323 | func ct_table_for(nC: i64, ln: *i64, cd: *i64, tc: *i64, to: *i64) -> i64 |
| 332 | func nx_coeff_token_decode_ctx(br: *BitReader, nC: i64, out: *i64) -> i64 |
| 361 | func nx_coeff_token_encode_ctx(bw: *BitWriter, nC: i64, total_coeff: i64, trailing_ones: i64) -> i64 called by 2: validate_vlc_ctxmain calls 4: nx_coeff_token_encode_cdcbw_write_bitssys_mmapct_table_for |