code wiki / _hdl_build / nx_vcodec_realframe_gate.nx

nx_vcodec_realframe_gate.nx

buildroot/runtime/_hdl_build/nx_vcodec_realframe_gate.nx

5228 B75 linesdepth 5pulls 16 transitivereach 0 importersview sourcekind gate/prooftopic vcodec
docsdependenciesstructsconstsfunctions

about

nx_vcodec_realframe_gate.nx -- MEASURES our sovereign video codec on REAL video content, not a synthetic frame. The luma plane of ref_frame0.yuv is a real H.264 I-frame our own decoder (nx_h264_decode_frame) reconstructed 100% bit-exact vs ffmpeg (768x768 YUV420 -> first 589824 bytes = the Y plane). We encode that real frame as a keyframe at three quality points, prove an INDEPENDENT decoder reconstructs bit-exact, and report bytes + ratio + PSNR (centi-dB, via the shared qm_psnr_cdb). This closes RT-003's "synthetic frames" gap with zero third-party code.

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_gate_emit_lib.nx nx_vcodec.nx nx_quality_metric.nx nx_vcodec_realframe_gate.nx

imports: nx_syscalls.nxnx_gate_emit_lib.nxnx_vcodec.nxnx_quality_metric.nx

imported by: nobody (leaf or entry point)

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

main g_puts sys_write sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_exit g_pn sys_mmap ↻ sys_write ↻ g_check g_puts ↻ measure_qp vc_enc_frame_packed vc_enc_frame_packed_tf nx_bw_put vc_aq_level vc_mb_mad vc_enc_block_packed vc_enc_block_packed_e vc_enc_block_packed_i vm_sad_zero vc_rdskip_len vc_aq_qp vc_dec_frame_packed vc_dec_frame_packed_tf nx_br_get vc_dec_block_packed vc_dec_block_packed_e nx_br_get ↻ vc_dec_mb4r_intra vc_dec_mb_part8_inter vc_t8p vc_mvpred vc_gget vc_mvplane_set

structs

none

consts

none

functions

11func g_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 1: frame_maxerr
12func frame_equal(a: *u8, b: *u8, n: i64) -> i64 { var i: i64=0; while i<n { if a[i]!=b[i] { return 0 } i=i+1 } return 1 }
called by 1: measure_qp
13func frame_maxerr(a: *u8, b: *u8, n: i64) -> i64 { var m: i64=0; var i: i64=0; while i<n { let e: i64=g_abs((a[i] as i64)-(b[i] as i64)); if e>m { m=e } i=i+1 } return m }
called by 1: measure_qp calls 1: g_abs
16func measure_qp(f0: *u8, W: i64, H: i64, N: i64, qp: i64, eR: *u8, dR: *u8, stream: *u8, blk: *i64, mv: *i64) -> i64
31func main() -> i64