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

6490 B127 linesdepth 5pulls 15 transitivereach 0 importersview sourcekind gate/prooftopic vcodec
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_vcodec.nx nx_quality_metric.nx nx_vcodec_dct2_rd_gate.nx

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

main g_puts sys_write sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_exit measure_tf 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 vs_skip nx_bw_put ↻ vc_intra_dc_sad vm_search vc_enc_mb4r_intra vm_sad vc_rd_part_inter vc_t8p vc_enc_mb_part8_inter vm_search_q vc_mvpred vc_gput vc_mvplane_set ve_vput vc_satd16_cand vc_rd_t8_inter vc_enc_mb8_intra vc_enc_mb8_inter vc_pred_px vc_coeff_enc

structs

none

consts

none

functions

12func 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 }
called by 3: g_pdbmeasure_tfmain calls 1: sys_write
13func g_pn(v: i64) -> i64
23func g_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
25func g_pdb(v: i64) -> i64
called by 2: measure_tfmain calls 2: g_putsg_pn
32func 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
35func 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
52func interp_psnr(R1: *i64, P1: *i64, n: i64, rt: i64) -> i64
called by 1: main
67func main() -> i64