code wiki / (root) / nx_h264_intra.nx

nx_h264_intra.nx

buildroot/runtime/nx_h264_intra.nx

5458 B111 linesdepth 2pulls 2 transitivereach 10 importersview sourcekind librarytopic h264
docsdependenciesstructsconstsfunctions

about

nx_h264_intra.nx -- H.264 Intra_4x4 spatial prediction (core modes), the last reconstruction DSP kernel (spec 8.3.1.2). Produces a 4x4 prediction block from neighbour samples; the decoded residual (dequant->idct) is then added and clipped (nx_idct_add_clip) to form the final pixels. mode 0 Vertical : pred[y][x] = top[x] (needs top) mode 1 Horizontal : pred[y][x] = left[y] (needs left) mode 2 DC : both avail -> (sum top + sum left + 4) >> 3 top only -> (sum top + 2) >> 2 left only -> (sum left + 2) >> 2 neither -> 128 HONEST scope: the 6 directional modes (3..8: diag-down-left/right, vertical- right, horizontal-down, vertical-left, horizontal-up) are NOT yet implemented (they need top-right + corner + filtered neighbours) -- flagged for a follow-up rung. DC/Vertical/Horizontal are the most common and are exactly gated here. genealogy_id: itu_t_h264_sec8_3_1_2_intra4x4 + spatial_intra_prediction lineage_id: intra4x4_dc_vertical_horizontal license_tier: ORIGINAL

dependencies 1 imports · 7 importers

nx_syscalls.nx nx_h264_intra.nx nx_h264_block_e2e_gate.nx nx_h264_decode_frame.nx nx_h264_iframe.nx nx_h264_intra4_gate.nx nx_h264_intra_gate.nx nx_h264_intra_recon.nx nx_h264_pframe_recon.nx

imports: nx_syscalls.nx

imported by: nx_h264_block_e2e_gate.nxnx_h264_decode_frame.nxnx_h264_iframe.nxnx_h264_intra4_gate.nxnx_h264_intra_gate.nxnx_h264_intra_recon.nxnx_h264_pframe_recon.nx

structs

none

consts

none

functions

24func nx_intra4x4_pred(mode: i64, top: *i64, left: *i64, avail_top: i64, avail_left: i64, pred: *i64) -> i64
47func p4_topx(t: *i64, tl: i64, k: i64) -> i64 { if k < 0 { return tl } return t[k] }
48func p4_left(l: *i64, tl: i64, k: i64) -> i64 { if k < 0 { return tl } return l[k] }
54func nx_intra4x4_pred_full(mode: i64, t: *i64, l: *i64, tl: i64, avail_top: i64, avail_left: i64, pred: *i64) -> i64