code wiki / (root) / nx_h264_brecon.nx

nx_h264_brecon.nx

buildroot/runtime/nx_h264_brecon.nx

79188 B1393 linesdepth 6pulls 34 transitivereach 0 importersview sourcekind tooltopic h264
docsdependenciesstructsconstsfunctions

about

nx_h264_brecon.nx -- B-R3: reconstruct the EXPLICIT-MV B macroblocks (B_L0/L1/Bi 16x16/16x8/8x16/8x8) of the first B-slice of bframe_test.264 and verify LUMA bit-exact vs ffmpeg ground truth. Proves the two-reference-list MV reconstruction (per-list median predictor + mvd) + BI-PREDICTION MC (pred=(L0+L1+1)>>1) + residual. Direct/Skip (derived MVs) = B-R4; chroma/deblock = B-R5/R6. References = ffmpeg-decoded anchors (POC->display = POC/2 here); target = the B-frame (its POC/2). Excludes direct/skip/intra MBs from the pixel count. Exit 0/1. license_tier: ORIGINAL

dependencies 25 imports · 0 importers

nx_syscalls.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_coeff_token.nx nx_h264_cavlc_level.nx nx_h264_brecon.nx

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

imports: nx_syscalls.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_bmb.nxnx_h264_poc.nxnx_h264_mvpred.nxnx_h264_mvgrid.nxnx_h264_pmvfield.nxnx_h264_idct.nxnx_h264_dequant.nxnx_h264_zigzag.nxnx_h264_mc_luma.nxnx_h264_deblock.nxnx_h264_intra_recon.nxnx_h264_chroma.nxnx_h264_chroma_pred.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 nx_nal_split_annexb 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 ↻ br_init ↻ nx_h264_parse_slice_header br_read_ue ↻ br_read_bits ↻ br_read_se ↻ nx_h264_poc_type0 nx_h264_build_blists gn

structs

none

consts

none

functions

33func gp(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); if fd > 0 { sys_write(fd, s, n) } return 0 }
called by 1: main calls 1: sys_write
34func gn(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
45func dec_luma(br: *BitReader, lumaTC: *i64, lbW: i64, bx: i64, by: i64, maxc: i64, coeff: *i64) -> i64
57func dec_cac(br: *BitReader, cTC: *i64, cbW: i64, cbx: i64, cby: i64, coeff: *i64) -> i64
69func read_ref(br: *BitReader, num_ref: i64) -> i64
called by 1: main calls 2: br_read_bitbr_read_ue
75func mc1(ref: *u8, W: i64, H: i64, px: i64, py: i64, mvx: i64, mvy: i64) -> i64
79func recon_b_4x4(myY: *u8, W: i64, H: i64, refL0: *u8, refL1: *u8, bpx: i64, bpy: i64,
127func minpos(x: i64, y: i64) -> i64
called by 1: b_direct_params
136func b_direct_params(g0r: *i64, g0x: *i64, g0y: *i64, g1r: *i64, g1x: *i64, g1y: *i64,
165func b_direct_fill4(g0r: *i64, g0x: *i64, g0y: *i64, g1r: *i64, g1x: *i64, g1y: *i64, lbW: i64,
called by 1: main
203func b_bs(g0r: *i64, g0x: *i64, g0y: *i64, g1r: *i64, g1x: *i64, g1y: *i64, lumaTC: *i64, pblk: i64, qblk: i64, mbBoundary: i64) -> i64
248func deblock_luma_b(yf: *u8, W: i64, mbW: i64, mbH: i64, mbQP: *i64,
347func cclampc(v: i64, hi: i64) -> i64 { if v < 0 { return 0 } if v > hi { return hi } return v }
called by 1: chroma_mc_s
350func chroma_mc_s(refC: *u8, cW: i64, cH: i64, cx: i64, cy: i64, mvx: i64, mvy: i64) -> i64
called by 1: recon_chroma_b_inter calls 2: asrcclampc
365func chroma_qpc_b(qpL: i64, cqo: i64) -> i64 { var q: i64 = qpL + cqo; if q < 0 { q = 0 } if q > 51 { q = 51 } return nx_h264_chroma_qp(q) }
367func chroma_add_res(myC: *u8, cpW: i64, bcx: i64, bcy: i64, pred: *i64, q: i64, sdc: *i64, ac4: *i64, cbpC: i64, QPc: i64) -> i64
397func recon_chroma_b_inter(myC: *u8, compOff: i64, gt: *u8, FS: i64, l0poc: *i64, l1poc: *i64, W: i64,
442func recon_chroma_b_intra(myC: *u8, cpW: i64, cpH: i64, mbX: i64, mbY: i64, mode: i64, availT: i64,
483func deblock_chroma_b(myU: *u8, myV: *u8, cpW: i64, mbW: i64, mbH: i64, mbQP: *i64, cqo: i64,
578func main() -> i64