code wiki / (root) / nx_h264_idct.nx

nx_h264_idct.nx

buildroot/runtime/nx_h264_idct.nx

2939 B77 linesdepth 2pulls 2 transitivereach 21 importersview sourcekind librarytopic h264
docsdependenciesstructsconstsfunctions

about

nx_h264_idct.nx -- H.264 4x4 inverse integer transform (rung 5-core, built bottom-up). THE deterministic DSP kernel at the base of pixel reconstruction: dequantized transform coefficients -> residual samples. Spec ITU-T H.264 section 8.5.12.2 (residual 4x4): two butterfly passes (rows then columns) then r = (h + 32) >> 6. Reusable regardless of the entropy layer above. Arithmetic right shift (floor, sign-preserving) is REQUIRED on negatives. We implement asr() to shift only non-negative magnitudes, so correctness does NOT depend on whether the language '>>' is arithmetic or logical -- the gate's negative outputs (e.g. -1) prove it. genealogy_id: itu_t_h264_sec8_5_residual_transform + malvar_2003_low_complexity_transform lineage_id: integer_butterfly_2pass + round_shift6 license_tier: ORIGINAL

dependencies 1 imports · 14 importers

nx_syscalls.nx nx_h264_idct.nx nx_h264_block_e2e_gate.nx nx_h264_brecon.nx nx_h264_chroma.nx nx_h264_chroma_pred.nx nx_h264_decode_frame.nx nx_h264_dequant_gate.nx nx_h264_fdct_gate.nx nx_h264_idct_gate.nx nx_h264_iframe.nx nx_h264_intra16.nx

diagram shows first 10 each side; +0 more imports, +4 more importers in the complete lists below.

imports: nx_syscalls.nx

imported by: nx_h264_block_e2e_gate.nxnx_h264_brecon.nxnx_h264_chroma.nxnx_h264_chroma_pred.nxnx_h264_decode_frame.nxnx_h264_dequant_gate.nxnx_h264_fdct_gate.nxnx_h264_idct_gate.nxnx_h264_iframe.nxnx_h264_intra16.nxnx_h264_intra_gate.nxnx_h264_intra_recon.nxnx_h264_pframe_recon.nxnx_h264_slice_extract.nx

structs

none

consts

none

functions

18func asr(x: i64, n: i64) -> i64
29func nx_idct4x4(d: *i64) -> i64 { let f: *i64 = sys_mmap(16 * 8) as *i64; return nx_idct4x4_s(d, f) }
30func nx_idct4x4_s(d: *i64, f: *i64) -> i64
67func nx_idct_add_clip(pred: *u8, res: *i64, out: *u8, n: i64) -> i64
called by 3: mainmainmain