code wiki / (root) / nx_h264_dequant.nx

nx_h264_dequant.nx

buildroot/runtime/nx_h264_dequant.nx

2711 B73 linesdepth 2pulls 2 transitivereach 12 importersview sourcekind librarytopic h264
docsdependenciesstructsconstsfunctions

about

nx_h264_dequant.nx -- H.264 inverse quantization / scaling for 4x4 residual blocks (spec 8.5.12.1). Turns quantized levels c[] into the coefficient block d[] that feeds the inverse transform (nx_h264_idct). Flat weightScale=16 (no custom scaling list). m = QP % 6 ; shift = QP / 6 LevelScale = 16 * normAdjust4x4[m][posClass(i,j)] QP >= 24: d = (c * LevelScale) << (shift - 4) QP < 24: d = (c * LevelScale + (1 << (3 - shift))) >> (4 - shift) posClass: 0 if (i,j both even), 1 if (both odd), else 2. normAdjust4x4 is the spec V matrix; verified by KAT (level 1 at QP0 -> 10/13/16 for the 3 position classes). Pure integer, table-driven. genealogy_id: itu_t_h264_sec8_5_12_1_scaling + normadjust4x4_matrix lineage_id: qp_mod6_levelscale + round_shift_dequant license_tier: ORIGINAL

dependencies 1 imports · 10 importers

nx_syscalls.nx nx_h264_dequant.nx nx_h264_block_e2e_gate.nx nx_h264_brecon.nx nx_h264_decode_frame.nx nx_h264_dequant_gate.nx nx_h264_fdct.nx nx_h264_fdct_gate.nx nx_h264_iframe.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_brecon.nxnx_h264_decode_frame.nxnx_h264_dequant_gate.nxnx_h264_fdct.nxnx_h264_fdct_gate.nxnx_h264_iframe.nxnx_h264_intra_gate.nxnx_h264_intra_recon.nxnx_h264_pframe_recon.nx

structs

none

consts

none

functions

20func nx_dq_posclass(i: i64, j: i64) -> i64
32func nx_dq_normadjust(m: i64, pc: i64) -> i64
called by 1: nx_h264_dequant4x4
56func nx_h264_dequant4x4(c: *i64, qp: i64, d: *i64) -> i64