code wiki / _hdl_build / nx_vcodec_dct2_rd_gate.nx
nx_vcodec_dct2_rd_gate.nx
buildroot/runtime/_hdl_build/nx_vcodec_dct2_rd_gate.nx
about
nx_vcodec_dct2_rd_gate.nx -- MEASURED head-to-head: the clean royalty-free integer DCT-II (tf=1) vs the shipped
Walsh-Hadamard transform (tf=0), through the SAME real full codec, on the SAME real 768x768 H.264-decoded luma
frame, at the SAME QP sweep. Both run via vc_enc_frame_packed_tf / vc_dec_frame_packed_tf (the only difference is
the transform). We print both RD curves and the HONEST exceed metric = PSNR gain at MATCHED bitrate (linear
interpolation of the DCT-II curve to each WHT operating point -- the BD-PSNR idea, not a cherry-picked QP).
Correctness (independent decode bit-exact at every QP, both transforms) is the GREEN bar; the RD gain is MEASURED
and printed raw -- never self-scored. [[feedback-no-wave-measured-exceed]] [[feedback-show-raw-output-no-overclaim]]
dependencies 3 imports · 0 importers
imports: nx_syscalls.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
| 12 | func g_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 13 | func g_pn(v: i64) -> i64 |
| 23 | func g_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } |
| 25 | func g_pdb(v: i64) -> i64 |
| 32 | 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_tf |
| 35 | func measure_tf(f0: *u8, W: i64, H: i64, N: i64, qp: i64, tf: i64, eR: *u8, dR: *u8, stream: *u8, blk: *i64, mv: *i64, arrR: *i64, arrP: *i64, idx: i64) -> i64 called by 1: main calls 7: vc_enc_frame_packed_tfvc_dec_frame_packed_tfframe_equalqm_psnr_cdbg_putsg_pn+1 |
| 52 | func interp_psnr(R1: *i64, P1: *i64, n: i64, rt: i64) -> i64 called by 1: main |
| 67 | func main() -> i64 |