code wiki / _hdl_build / nx_vcodec_subpel_ceiling.nx

nx_vcodec_subpel_ceiling.nx

buildroot/runtime/_hdl_build/nx_vcodec_subpel_ceiling.nx

8659 B177 linesdepth 2pulls 4 transitivereach 0 importersview sourcekind tooltopic vcodec
docsdependenciesstructsconstsfunctions

about

nx_vcodec_subpel_ceiling.nx -- RE-AUDIT the self-judged "6-tap sub-pel = 0" verdict (task #17) against a MEASURED residual ceiling, decoder-transparent. The codec's sub-pel is BILINEAR (qp_pixel: a 4-neighbour weighted blend that BLURS the reference). H.264 uses a SHARP 6-tap FIR (1,-5,20,20,-5,1)/32 that preserves high-frequency detail -> a tighter prediction -> smaller residual -> fewer bits at identical quality. This probe isolates FILTER SHARPNESS: for each interior 16x16 P-block, integer-search the clean prev (+/-16), then refine to HALF-pel with (a) the existing bilinear filter and (b) a proper 6-tap filter, and sum the best SAD each way over several P-frames. If 6-tap's total residual is materially lower, the "0" verdict was a short-bench lie (like RD-skip and wide-ME were) and the real enc+dec+wasm build is justified. Pure measurement on CLEAN originals => no bitstream, no parity risk. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_vsubpel.nx nx_vmotion.nx nx_vcodec_subpel_ceiling.nx

imports: nx_syscalls.nxnx_vsubpel.nxnx_vmotion.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 vm_search vm_scan vm_try vm_sad_capped v128_sad16 bl_refine hp_pixel s6_refine s6_pixel clp s6v s6h s6c s6h ↻ gn sys_mmap ↻ sys_write ↻

structs

none

consts

12const K_MAGIC_2147483647: i64 = 2147483647
13const K_MAGIC_2026: i64 = 2026
15const NW: i64 = 576
16const NH: i64 = 1024

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 2: g2main calls 1: sys_write
19func gn(v: i64) -> i64
called by 2: g2main calls 2: sys_mmapsys_write
23func g2(v: i64) -> i64 { gn(v/100); gw("." as *u8); let f: i64=v%100; if f<10 { gw("0" as *u8) } gn(f); return 0 }
calls 2: gngw
24func clp(v: i64) -> i64 { if v<0 { return 0 } if v>255 { return 255 } return v }
called by 1: s6_pixel
27func s6h(prev: *u8, W: i64, x: i64, y: i64) -> i64
called by 2: s6cs6_pixel
37func s6v(prev: *u8, W: i64, x: i64, y: i64) -> i64
called by 1: s6_pixel
47func s6c(prev: *u8, W: i64, x: i64, y: i64) -> i64
called by 1: s6_pixel calls 1: s6h
57func s6_pixel(prev: *u8, W: i64, x: i64, y: i64, hx: i64, hy: i64) -> i64
called by 1: s6_refine calls 4: clps6vs6hs6c
66func s6_refine(cur: *u8, prev: *u8, W: i64, cx: i64, cy: i64, px: i64, py: i64, T: i64) -> i64
called by 1: main calls 1: s6_pixel
91func bl_refine(cur: *u8, prev: *u8, W: i64, cx: i64, cy: i64, px: i64, py: i64, T: i64) -> i64
called by 1: main calls 1: hp_pixel
116func main() -> i64