code wiki / h264
topic: h264
93 modules sharing the h264 name family (derived from the tree's prefix discipline).
H.264 interop: bitstream parsing, intra/inter reconstruction (P-frame recon included), written from the spec in NishiLang so the ecosystem can decode the world's dominant video format without linking a single foreign library. Sibling of the fully-sovereign vcodec family.
narrated overview -- maintained by the narration lane, module links verified against this wiki.
| module | description | lines | funcs |
|---|---|---|---|
| nx_h264_bframe_probe.nx | B-R0: parse the GOP STRUCTURE of an annexb H.264 stream with B-frames | 104 | 3 |
| nx_h264_bframe_reflist_gate.nx | B-R1: compute POC (display order) for every frame of bframe_test.264 | 121 | 3 |
| nx_h264_bframe_walk.nx | B-R2: ENTROPY-WALK the first B-slice of bframe_test.264, consuming every bit | 338 | 6 |
| nx_h264_bits.nx | H.264 bitstream reader + Exp-Golomb (rung 2 keystone). | 106 | 6 |
| nx_h264_bits_gate.nx | REFEREE for the H.264 bit reader + Exp-Golomb keystone. | 89 | 3 |
| nx_h264_bitwriter.nx | MSB-first bit writer (hardware-rung primitive). | 58 | 5 |
| nx_h264_block_e2e_gate.nx | SINGLE 4x4 BLOCK end-to-end micro-decode. | 119 | 3 |
| nx_h264_bmb.nx | H.264 B-macroblock type tables (Table 7-14 mb_type, 7-18 sub_mb_type). | 74 | 11 |
| nx_h264_brecon.nx | B-R3: reconstruct the EXPLICIT-MV B macroblocks (B_L0/L1/Bi 16x16/16x8/8x16/8x8) | 1393 | 20 |
| nx_h264_cabac.nx | H.264 CABAC arithmetic decoding ENGINE (ITU-T H.264 clause 9.3), STEP 1 core. | 100 | 11 |
| nx_h264_cabac_ctxinc.nx | H.264 CABAC I-slice ctxIdxInc DERIVATION (spec clause 9.3.3.1.1). | 54 | 7 |
| nx_h264_cabac_ctxinc_gate.nx | REFEREE for the H.264 CABAC ctxIdxInc derivation logic. | 72 | 3 |
| nx_h264_cabac_gate.nx | REFEREE for the H.264 CABAC arithmetic engine (STEP 1 core). | 93 | 5 |
| nx_h264_cabac_mb.nx | H.264 CABAC I-slice macroblock syntax (clauses 9.3.2.5, 9.3.3.1.1, Table 9-36). | 158 | 18 |
| nx_h264_cabac_mb_gate.nx | teeth for the I-slice macroblock syntax layer. | 163 | 3 |
| nx_h264_cabac_residual.nx | H.264 CABAC residual block decoding (clause 9.3.2.3 / 9.3.3.1.3). | 118 | 3 |
| nx_h264_cabac_residual_gate.nx | teeth for STEP 2 residual decoding. | 136 | 3 |
| nx_h264_cavlc_enc.nx | CAVLC level ENCODER (inverse of nx_h264_cavlc_level's | 42 | 2 |
| nx_h264_cavlc_level.nx | CAVLC level decoding (rung 4c-i, spec 9.2.2.1). | 67 | 4 |
| nx_h264_cavlc_level_gate.nx | REFEREE for CAVLC level decode (rung 4c-i). | 97 | 4 |
| nx_h264_cavlc_rt_gate.nx | SOVEREIGN round-trip oracle for CAVLC level codec. | 120 | 3 |
| nx_h264_cdc_gate.nx | REFEREE for the chroma-DC coeff_token table (nC=-1). | 133 | 3 |
| nx_h264_cdc_tz_gate.nx | REFEREE for chroma-DC total_zeros (2x2). | 83 | 3 |
| nx_h264_chroma.nx | chroma reconstruction kernels: 2x2 DC inverse Hadamard | 52 | 3 |
| nx_h264_chroma_dc_gate.nx | validate chroma DC scaling (spec 8.5.11.2). | 90 | 4 |
| nx_h264_chroma_gate.nx | REFEREE for chroma kernels. | 93 | 3 |
| nx_h264_chroma_pred.nx | Intra chroma 8x8 prediction (4:2:0), spec 8.3.4. | 102 | 3 |
| nx_h264_chroma_pred_gate.nx | validate intra chroma 8x8 prediction (4 modes). | 121 | 5 |
| nx_h264_coeff_token.nx | CAVLC coeff_token VLC (rung 4c-ii), table-driven | 380 | 11 |
| nx_h264_coeff_token_gate.nx | REFEREE for coeff_token machinery (rung 4c-ii). | 105 | 4 |
| nx_h264_colmv_gate.nx | verify the co-located MV-field decoder: decode the future-anchor P-slice | 125 | 3 |
| nx_h264_ctctx_gate.nx | validate ALL coeff_token nC contexts via the dispatcher. | 168 | 4 |
| nx_h264_ctfull_gate.nx | validate the FULL 0<=nC<2 coeff_token table. | 116 | 3 |
| nx_h264_deblock.nx | H.264 in-loop deblocking, normal luma edge filter | 177 | 10 |
| nx_h264_deblock_gate.nx | REFEREE for the normal luma deblocking filter. | 90 | 3 |
| nx_h264_decode_frame.nx | FULL-FRAME H.264 decoder (Constrained Baseline, CAVLC, | 927 | 11 |
| nx_h264_dequant.nx | H.264 inverse quantization / scaling for 4x4 residual | 73 | 3 |
| nx_h264_dequant_gate.nx | REFEREE for H.264 dequant (rung 5 scaling) + the | 86 | 4 |
| nx_h264_diag.nx | Nishi Teacher DIAGNOSTIC ENGINE: parse a raw log/output against the machine-readable | 70 | 3 |
| nx_h264_diag_gate.nx | gate the Teacher diagnostic engine: feed crafted logs with known symptoms and | 72 | 4 |
| nx_h264_emit.nx | emit a VALID H.264 Annex-B bitstream: SPS + PPS + IDR slice of I_PCM macroblocks. | 249 | 11 |
| nx_h264_fdct.nx | H.264 FORWARD 4x4 integer transform + forward quantization (the ENCODE counterpart of | 97 | 4 |
| nx_h264_fdct_gate.nx | SOVEREIGN gate for the H.264 forward transform + quant (the encoder core, R6). | 64 | 5 |
| nx_h264_hadamard.nx | 4x4 inverse Hadamard for the Intra_16x16 luma DC block | 44 | 2 |
| nx_h264_hadamard_gate.nx | REFEREE for the Intra_16x16 luma DC Hadamard. | 88 | 4 |
| nx_h264_idct.nx | H.264 4x4 inverse integer transform (rung 5-core, built | 77 | 4 |
| nx_h264_idct_gate.nx | REFEREE for the H.264 4x4 inverse transform (rung 5-core). | 109 | 5 |
| nx_h264_iframe.nx | reusable CAVLC I-slice -> YUV420 decode driver (STEP 3 core for the cam poster). | 496 | 9 |
| nx_h264_intra.nx | H.264 Intra_4x4 spatial prediction (core modes), the last | 111 | 4 |
| nx_h264_intra16.nx | Intra_16x16 luma prediction (spec 8.3.3), core modes. | 78 | 2 |
| nx_h264_intra16_gate.nx | REFEREE for Intra_16x16 prediction (core modes). | 82 | 3 |
| nx_h264_intra16plane_gate.nx | validate Intra_16x16 Plane (mode 3). | 98 | 4 |
| nx_h264_intra4_gate.nx | validate Intra_4x4 (9 modes). | 130 | 3 |
| nx_h264_intra_gate.nx | REFEREE for Intra_4x4 prediction + the FULL | 112 | 4 |
| nx_h264_intra_recon.nx | H.264 INTRA luma reconstruction kernels, shared by the I-frame decoder | 139 | 3 |
| nx_h264_mb.nx | H.264 I-slice macroblock type layer (rung 4d, spec 7.3.5 / 7.4.5). | 40 | 3 |
| nx_h264_mb_gate.nx | REFEREE for the I-slice macroblock type layer (rung 4d). | 88 | 4 |
| nx_h264_mb_pred.nx | I_NxN macroblock prediction layer (rung 4e, spec 7.3.5.1 + | 93 | 8 |
| nx_h264_mb_pred_gate.nx | REFEREE for the I_NxN prediction layer (rung 4e). | 116 | 3 |
| nx_h264_mc_luma.nx | H.264 luma quarter-pel motion-compensated interpolation (spec 8.4.2.2.1). | 83 | 9 |
| nx_h264_mc_luma_gate.nx | gate luma quarter-pel interpolation (8.4.2.2.1). | 81 | 3 |
| nx_h264_mv_recon_gate.nx | P-R4a: reconstruct the per-4x4 MOTION-VECTOR FIELD of frame 1 of | 451 | 7 |
| nx_h264_mvgrid.nx | H.264 per-4x4 motion-vector grid + neighbour gathering (8.4.1.3). | 93 | 4 |
| nx_h264_mvpred.nx | H.264 motion-vector prediction (spec 8.4.1.3 / 8.4.1.3.1). | 83 | 5 |
| nx_h264_mvpred_gate.nx | gate MV prediction (8.4.1.3). Hand-computed KATs. | 78 | 4 |
| nx_h264_nal.nx | H.264 NAL unit splitter + header decode (rung 2b). | 65 | 5 |
| nx_h264_nal_gate.nx | REFEREE for the H.264 NAL splitter (rung 2b). | 95 | 3 |
| nx_h264_nc.nx | CAVLC neighbour context nC (spec 9.2.1) + coeff_token table | 33 | 2 |
| nx_h264_nc_gate.nx | REFEREE for nC derivation + coeff_token table select. | 74 | 3 |
| nx_h264_pframe_probe.nx | P-R0: locate frame 1 (sample 1), parse its P-slice header, | 128 | 4 |
| nx_h264_pframe_recon.nx | P-R4b: pixel-exact LUMA reconstruction of frame 1 (inter content). | 1062 | 16 |
| nx_h264_pframe_walk.nx | P-R1c: ENTROPY-WALK the entire P-frame (frame 1) of realtest.mp4. | 328 | 6 |
| nx_h264_pmb.nx | P-macroblock type layer (ITU-T H.264 Tables 7-13 + 7-18). | 49 | 5 |
| nx_h264_pmb_gate.nx | gate the P-macroblock type layer (Tables 7-13 / 7-18). | 74 | 3 |
| nx_h264_pmvfield.nx | decode a P-slice's per-4x4 L0 MOTION-VECTOR FIELD (gref/gmvx/gmvy) by the proven | 243 | 4 |
| nx_h264_poc.nx | H.264 Picture Order Count (POC type 0, spec 8.2.1.1) + B-slice reference list | 103 | 2 |
| nx_h264_pps.nx | H.264 Picture Parameter Set parser (rung 4b, spec 7.3.2.2). | 45 | 1 |
| nx_h264_pps_gate.nx | REFEREE for the H.264 PPS parser (rung 4b). | 75 | 3 |
| nx_h264_research_run.nx | the SOVEREIGN half of the H.264-codec research pass. | 31 | 3 |
| nx_h264_residual.nx | CAVLC residual 4x4 block assembler (rung 4c-v, spec 9.2). | 186 | 3 |
| nx_h264_residual_gate.nx | SOVEREIGN round-trip oracle for the CAVLC residual | 81 | 5 |
| nx_h264_run_before.nx | CAVLC run_before VLC (rung 4c-iv), table-driven | 106 | 3 |
| nx_h264_run_before_gate.nx | REFEREE for run_before VLC (rung 4c-iv). | 95 | 4 |
| nx_h264_slice.nx | H.264 slice header parser (rung 4a, spec 7.3.3). | 111 | 2 |
| nx_h264_slice_extract.nx | locate + parse a REAL coded slice from realtest.mp4. | 339 | 4 |
| nx_h264_slice_gate.nx | REFEREE for the H.264 slice header parser (rung 4a). | 69 | 3 |
| nx_h264_sps.nx | H.264 Sequence Parameter Set parser (rung 3). | 112 | 3 |
| nx_h264_sps_gate.nx | REFEREE for the H.264 SPS parser (rung 3). | 83 | 3 |
| nx_h264_total_zeros.nx | CAVLC total_zeros VLC (rung 4c-iii), table-driven | 196 | 6 |
| nx_h264_total_zeros_gate.nx | REFEREE for total_zeros VLC (rung 4c-iii). | 90 | 3 |
| nx_h264_ts_probe.nx | STEP 0 decisive probe for the cam-poster build. | 254 | 15 |
| nx_h264_tzrb_gate.nx | validate FULL total_zeros (TC 1..15) + run_before (zL 1..6,>6). | 133 | 4 |
| nx_h264_zigzag.nx | 4x4 inverse zig-zag scan (spec 8.5.6 / Table 8-12). | 19 | 1 |