code wiki / (root) / nx_h264_pframe_recon.nx

nx_h264_pframe_recon.nx

buildroot/runtime/nx_h264_pframe_recon.nx

51708 B1062 linesdepth 5pulls 33 transitivereach 0 importersview sourcekind tooltopic h264
docsdependenciesstructsconstsfunctions

about

nx_h264_pframe_recon.nx -- P-R4b: pixel-exact LUMA reconstruction of frame 1 (inter content). Uses frame 0's PRE-deblock luma plane as the reference (ref_frame0.yuv -- proven byte-exact equal to nx_h264_decode_frame's pre-deblock recon), reconstructs every SKIP + INTER macroblock by motion-compensating each 4x4 block from the reference (per-4x4 MV from the grid) and adding the decoded residual (inv-zigzag -> dequant -> 4x4 IDCT -> add+clip), then compares to ffmpeg's frame-1 PRE-deblock luma (ref_frame1_nodeblock.yuv). Both sides skip deblocking, isolating MC+residual from the loop filter. Intra-in-P macroblocks (179) are decoded for entropy sync but EXCLUDED from the pixel count (P-R4b-2). Exit 0/1. Log knowledge/status/h264_pframe_recon.log. license_tier: ORIGINAL

dependencies 27 imports · 0 importers

nx_syscalls.nx nx_mp4_demux.nx nx_mp4_stbl.nx nx_h264_bits.nx nx_h264_sps.nx nx_h264_pps.nx nx_h264_nal.nx nx_h264_slice.nx nx_h264_mb.nx nx_h264_mb_pred.nx nx_h264_pframe_recon.nx

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

imports: nx_syscalls.nxnx_mp4_demux.nxnx_mp4_stbl.nxnx_h264_bits.nxnx_h264_sps.nxnx_h264_pps.nxnx_h264_nal.nxnx_h264_slice.nxnx_h264_mb.nxnx_h264_mb_pred.nxnx_h264_coeff_token.nxnx_h264_cavlc_level.nxnx_h264_residual.nxnx_h264_nc.nxnx_h264_pmb.nxnx_h264_mvgrid.nxnx_h264_idct.nxnx_h264_dequant.nxnx_h264_zigzag.nxnx_h264_hadamard.nxnx_h264_intra16.nxnx_h264_intra.nxnx_h264_intra_recon.nxnx_h264_chroma.nxnx_h264_chroma_pred.nxnx_h264_deblock.nxnx_h264_mc_luma.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_openat_append gp sys_write sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_exit find_tag mp4_t4 nx_h264_unescape_rbsp nx_h264_parse_sps sys_mmap ↻ br_init sys_mmap ↻ br_read_bits br_read_bit br_read_ue br_read_bit ↻ br_read_bits ↻ nx_h264_is_high br_read_se br_read_ue ↻ nx_h264_parse_pps sys_mmap ↻ br_init ↻ br_read_ue ↻ br_read_bits ↻ br_read_se ↻ nx_mp4_video_info sys_mmap ↻ mp4_find_box mp4_be32 mp4_be64 mp4_t4 ↻ mp4_be32 ↻

structs

none

consts

none

functions

37func gp(fd: i64, s: *u8) -> i64
called by 1: main calls 1: sys_write
43func gn(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
54func find_tag(b: *u8, start: i64, end: i64, s: *u8) -> i64
called by 1: main calls 1: mp4_t4
59func dec_luma(br: *BitReader, lumaTC: *i64, lbW: i64, bx: i64, by: i64, maxc: i64, coeff: *i64) -> i64
71func dec_cac(br: *BitReader, cTC: *i64, cbW: i64, cbx: i64, cby: i64, coeff: *i64) -> i64
83func read_ref(sbr: *BitReader, num_ref: i64) -> i64
called by 1: main calls 2: br_read_bitbr_read_ue
90func recon_inter_4x4(myY: *u8, W: i64, ref: *u8, Wr: i64, Hr: i64, bpx: i64, bpy: i64,
135func cclamp(v: i64, hi: i64) -> i64 { if v < 0 { return 0 } if v > hi { return hi } return v }
called by 1: chroma_mc_sample
137func chroma_mc_sample(refC: *u8, cW: i64, cH: i64, cx: i64, cy: i64, mvx: i64, mvy: i64) -> i64
called by 1: recon_chroma_inter_mb calls 2: asrcclamp
155func recon_chroma_inter_mb(myC: *u8, refC: *u8, cW: i64, cH: i64, mbX: i64, mbY: i64,
216func recon_chroma_intra_mb(myC: *u8, cW: i64, cH: i64, mbX: i64, mbY: i64, mode: i64,
289func p_bs(gref: *i64, gmvx: *i64, gmvy: *i64, lumaTC: *i64, pblk: i64, qblk: i64, mbBoundary: i64) -> i64
305func deblock_luma_p(yf: *u8, W: i64, mbW: i64, mbH: i64, mbQP: *i64,
402func cqp(lumaQP: i64, cqio: i64) -> i64
called by 1: deblock_chroma_p calls 1: nx_h264_chroma_qp
412func deblock_chroma_p(myC: *u8, cW: i64, cH: i64, mbW: i64, mbH: i64, mbQP: *i64,
495func main() -> i64