code wiki / _hdl_build / nx_vcodec_hpel6_probe.nx

nx_vcodec_hpel6_probe.nx

buildroot/runtime/_hdl_build/nx_vcodec_hpel6_probe.nx

13673 B244 linesdepth 6pulls 16 transitivereach 0 importersview sourcekind probetopic vcodec
docsdependenciesstructsconstsfunctions

about

nx_vcodec_hpel6_probe.nx -- 6-TAP HALF-PEL SIZING (derived from entcost probe) (seq1105, the 2.9x direction question): is the residual coder spending materially more bits than its own coefficients' entropy floor? For each P-frame MB of a real 2593-chain encode (same refs the encoder used), take the encoder's deterministic (mv,qpel) choice, form the residual, 4x4-transform+quant (the shipped tf=1 path), then measure: bits_rc = rc_sig_cost_q8 (the shipping coder's own cost) vs H0 = the static per-zigzag-position level-entropy floor of the WHOLE collected coefficient field. bits_rc / H0 <= ~1.15 => the coder is fine, the gap is UPSTREAM (prediction/transform quality); bits_rc / H0 >= ~1.3 => context/entropy depth is the rung. No float: entropy accumulated in millibits via a log2 lookup on p in permille. license: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_video_codec_wasm.nx nx_vcodec_hpel6_probe.nx

imports: nx_syscalls.nxnx_video_codec_wasm.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close gw sys_write frames vc_t8_init nx_dct8_init vc_t8p vv_enc_rc vc_enc_frame_packed_rc rc_enc_init nx_bw_put vc_aq_level vc_mb_mad vc_enc_block_packed_e vc_enc_block_packed_i vm_sad_zero vm_sad vs_skip nx_bw_put ↻ vc_intra_dc_sad vm_search vm_scan vc_enc_mb4r_intra vc_t8p ↻ vc_gather_edges vc_mpm_pred vc_pred_rich vc_mpm_put vc_coeff_enc vm_sad ↻ vc_rd_part_inter vm_search_q vc_mvcost

structs

none

consts

12const K_MAGIC_20000: i64 = 20000
13const K_MAGIC_2026: i64 = 2026
14const K_MAGIC_4194304: i64 = 4194304
15const K_MAGIC_8192: i64 = 8192
16const K_MAGIC_65536: i64 = 65536
17const K_MAGIC_4096: i64 = 4096
18const K_MAGIC_2593: i64 = 2593
19const K_MAGIC_500000: i64 = 500000
20const K_MAGIC_65025: i64 = 65025
22const SW: i64 = 352
23const SH: i64 = 288
24const NF: i64 = 16
25const QP: i64 = 16
26const PMUL: i64 = 94
27const KEYMUL: i64 = 188

functions

29func gw(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 1: main calls 1: sys_write
30func gn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
34func cpb(d: *u8, s: *u8, n: i64) -> i64 { var i: i64=0; while i<n { d[i]=s[i]; i=i+1 } return 0 }
called by 1: main
35func frames(yuv: *u8, hi: i64, total: i64, fp: *i64, fdata: i64) -> i64
called by 1: main
44func mb_log2(num: i64, den: i64) -> i64
called by 1: main
57func hp6_sample(p: *u8, W: i64, H: i64, x: i64, y: i64) -> i64
called by 3: hp6_hhp6_vhp6_pixel
62func hp6_h(p: *u8, W: i64, H: i64, x: i64, y: i64) -> i64
called by 2: hp6_hvhp6_pixel calls 1: hp6_sample
68func hp6_v(p: *u8, W: i64, H: i64, x: i64, y: i64) -> i64
called by 1: hp6_pixel calls 1: hp6_sample
74func hp6_hv(p: *u8, W: i64, H: i64, x: i64, y: i64) -> i64
called by 1: hp6_pixel calls 1: hp6_h
82func hp6_pixel(p: *u8, W: i64, H: i64, x: i64, y: i64, qx: i64, qy: i64) -> i64
called by 1: main calls 4: hp6_samplehp6_vhp6_hhp6_hv
100func main(argc: i64, argv: *i64) -> i64