nx_h264_intra.nx
buildroot/runtime/nx_h264_intra.nx
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
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
| 24 | func nx_intra4x4_pred(mode: i64, top: *i64, left: *i64, avail_top: i64, avail_left: i64, pred: *i64) -> i64 |
| 47 | func p4_topx(t: *i64, tl: i64, k: i64) -> i64 { if k < 0 { return tl } return t[k] } called by 1: nx_intra4x4_pred_full |
| 48 | func p4_left(l: *i64, tl: i64, k: i64) -> i64 { if k < 0 { return tl } return l[k] } called by 1: nx_intra4x4_pred_full |
| 54 | func nx_intra4x4_pred_full(mode: i64, t: *i64, l: *i64, tl: i64, avail_top: i64, avail_left: i64, pred: *i64) -> i64 called by 4: recon_i4_blockrecon_i4_block_hmainrecon_i4_block calls 3: nx_intra4x4_predp4_topxp4_left |