code wiki / _hdl_build / nx_vcodec_realframe_gate.nx
nx_vcodec_realframe_gate.nx
buildroot/runtime/_hdl_build/nx_vcodec_realframe_gate.nx
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
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
structs
| none |
consts
| none |
functions
| 11 | func g_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } called by 1: frame_maxerr |
| 12 | func 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 |
| 13 | func 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 } |
| 16 | func measure_qp(f0: *u8, W: i64, H: i64, N: i64, qp: i64, eR: *u8, dR: *u8, stream: *u8, blk: *i64, mv: *i64) -> i64 called by 1: main calls 7: vc_enc_frame_packedvc_dec_frame_packedframe_equalframe_maxerrqm_psnr_cdbg_puts+1 |
| 31 | func main() -> i64 |