code wiki / (root) / nx_h264_mc_luma.nx

nx_h264_mc_luma.nx

buildroot/runtime/nx_h264_mc_luma.nx

4644 B83 linesdepth 2pulls 2 transitivereach 3 importersview sourcekind librarytopic h264
docsdependenciesstructsconstsfunctions

about

nx_h264_mc_luma.nx -- H.264 luma quarter-pel motion-compensated interpolation (spec 8.4.2.2.1). Half-pel = 6-tap (1,-5,20,20,-5,1); quarter-pel = bilinear average of integer/half-pel samples; center (2,2) = 6-tap on the UNROUNDED horizontal half-pel intermediates ((.+512)>>10). Edge samples are clamped (full-sample padding). Given a reference plane + integer pos (x,y) + frac (xf,yf in 0..3), returns one predicted luma sample. genealogy_id: itu_t_h264_sec8_4_2_2_1_luma_interp lineage_id: sixtap_halfpel + bilinear_quarterpel + center_2pass license_tier: ORIGINAL

dependencies 1 imports · 3 importers

nx_syscalls.nx nx_h264_mc_luma.nx nx_h264_brecon.nx nx_h264_mc_luma_gate.nx nx_h264_pframe_recon.nx

imports: nx_syscalls.nx

imported by: nx_h264_brecon.nxnx_h264_mc_luma_gate.nxnx_h264_pframe_recon.nx

structs

none

consts

none

functions

11func mc_clip1(v: i64) -> i64 { if v < 0 { return 0 } if v > 255 { return 255 } return v }
12func mc_tap6(a: i64, b: i64, c: i64, d: i64, e: i64, f: i64) -> i64
called by 3: mc_hcmc_vcmc_halfHV
16func mc_rc(ref: *u8, W: i64, H: i64, x: i64, y: i64) -> i64
26func mc_hc(ref: *u8, W: i64, H: i64, x: i64, y: i64) -> i64
called by 2: mc_halfHmc_halfHV calls 2: mc_tap6mc_rc
31func mc_vc(ref: *u8, W: i64, H: i64, x: i64, y: i64) -> i64
called by 1: mc_halfV calls 2: mc_tap6mc_rc
35func mc_halfH(ref: *u8, W: i64, H: i64, x: i64, y: i64) -> i64 { return mc_clip1((mc_hc(ref,W,H,x,y) + 16) >> 5) }
36func mc_halfV(ref: *u8, W: i64, H: i64, x: i64, y: i64) -> i64 { return mc_clip1((mc_vc(ref,W,H,x,y) + 16) >> 5) }
38func mc_halfHV(ref: *u8, W: i64, H: i64, x: i64, y: i64) -> i64
45func nx_h264_mc_luma_sample(ref: *u8, W: i64, H: i64, x: i64, y: i64, xf: i64, yf: i64) -> i64