code wiki / _hdl_build / nx_vcodec_subpel_ceil.nx

nx_vcodec_subpel_ceil.nx

buildroot/runtime/_hdl_build/nx_vcodec_subpel_ceil.nx

6502 B107 linesdepth 6pulls 16 transitivereach 0 importersview sourcekind tooltopic vcodec
docsdependenciesstructsconstsfunctions

about

nx_vcodec_subpel_ceil.nx -- CEILING of the 6-tap sub-pel lever (the next real refinement after the magic-number fixes). Our qp_pixel is BILINEAR; x264 uses a 6-tap [1,-5,20,20,-5,1]/32 half-pel filter. For each genuinely- coded P-MB (non-skip, INTERIOR so the 6-tap has its +/-2..3 margin), find the best integer MV, then compare the best fractional residual SAD under BILINEAR quarter-pel (what we do) vs 6-TAP half-pel. The reduction is the prediction gain a 6-tap upgrade could realize (residual smaller -> fewer bits). Decides if the (vcv-bump, bit-exact-critical) 6-tap build is worth it. Reads /tmp/seq.y4m. CIF. license: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_video_codec_wasm.nx nx_vmotion.nx nx_vsubpel.nx nx_vcodec_subpel_ceil.nx

imports: nx_syscalls.nxnx_video_codec_wasm.nxnx_vmotion.nxnx_vsubpel.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 gw sys_write sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close frames vm_sad_zero vm_sad v128_sad16 vm_search vm_scan vm_try vm_sad_capped v128_sad16 ↻ bil_sad qp_pixel t6_sad h6 tap6 sys_mmap ↻ gn sys_mmap ↻ sys_write ↻

structs

none

consts

11const K_MAGIC_2147483647: i64 = 2147483647
12const K_MAGIC_2026: i64 = 2026
14const SW: i64 = 352
15const SH: i64 = 288
16const NF: i64 = 48

functions

18func 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
19func gn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
25func tap6(a: i64, b: i64, c: i64, d: i64, e: i64, f: i64) -> i64
called by 1: h6
29func h6(prev: *u8, W: i64, x: i64, y: i64, hx: i64, hy: i64) -> i64
called by 1: t6_sad calls 2: tap6sys_mmap
41func frames(yuv: *u8, hi: i64, total: i64, fp: *i64, fdata: i64) -> i64
called by 1: main
49func bil_sad(cur: *u8, prev: *u8, W: i64, cx: i64, cy: i64, idx: i64, idy: i64) -> i64
called by 1: main calls 1: qp_pixel
59func t6_sad(cur: *u8, prev: *u8, W: i64, cx: i64, cy: i64, idx: i64, idy: i64) -> i64
called by 1: main calls 1: h6
69func main() -> i64