nx_h264_brecon.nx
buildroot/runtime/nx_h264_brecon.nx
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
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
structs
| none |
consts
| none |
functions
| 33 | func 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 } |
| 34 | func gn(fd: i64, v: i64) -> i64 |
| 45 | func dec_luma(br: *BitReader, lumaTC: *i64, lbW: i64, bx: i64, by: i64, maxc: i64, coeff: *i64) -> i64 |
| 57 | func dec_cac(br: *BitReader, cTC: *i64, cbW: i64, cbx: i64, cby: i64, coeff: *i64) -> i64 |
| 69 | func read_ref(br: *BitReader, num_ref: i64) -> i64 |
| 75 | func mc1(ref: *u8, W: i64, H: i64, px: i64, py: i64, mvx: i64, mvy: i64) -> i64 |
| 79 | func recon_b_4x4(myY: *u8, W: i64, H: i64, refL0: *u8, refL1: *u8, bpx: i64, bpy: i64, |
| 127 | func minpos(x: i64, y: i64) -> i64 called by 1: b_direct_params |
| 136 | func b_direct_params(g0r: *i64, g0x: *i64, g0y: *i64, g1r: *i64, g1x: *i64, g1y: *i64, |
| 165 | func b_direct_fill4(g0r: *i64, g0x: *i64, g0y: *i64, g1r: *i64, g1x: *i64, g1y: *i64, lbW: i64, called by 1: main |
| 203 | func b_bs(g0r: *i64, g0x: *i64, g0y: *i64, g1r: *i64, g1x: *i64, g1y: *i64, lumaTC: *i64, pblk: i64, qblk: i64, mbBoundary: i64) -> i64 |
| 248 | func deblock_luma_b(yf: *u8, W: i64, mbW: i64, mbH: i64, mbQP: *i64, |
| 347 | func cclampc(v: i64, hi: i64) -> i64 { if v < 0 { return 0 } if v > hi { return hi } return v } called by 1: chroma_mc_s |
| 350 | func chroma_mc_s(refC: *u8, cW: i64, cH: i64, cx: i64, cy: i64, mvx: i64, mvy: i64) -> i64 |
| 365 | func 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) } |
| 367 | func chroma_add_res(myC: *u8, cpW: i64, bcx: i64, bcy: i64, pred: *i64, q: i64, sdc: *i64, ac4: *i64, cbpC: i64, QPc: i64) -> i64 |
| 397 | func recon_chroma_b_inter(myC: *u8, compOff: i64, gt: *u8, FS: i64, l0poc: *i64, l1poc: *i64, W: i64, |
| 442 | func recon_chroma_b_intra(myC: *u8, cpW: i64, cpH: i64, mbX: i64, mbY: i64, mode: i64, availT: i64, |
| 483 | func deblock_chroma_b(myU: *u8, myV: *u8, cpW: i64, mbW: i64, mbH: i64, mbQP: *i64, cqo: i64, |
| 578 | func main() -> i64 |