nx_h264_mc_luma.nx
buildroot/runtime/nx_h264_mc_luma.nx
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
imports: nx_syscalls.nx
imported by: nx_h264_brecon.nxnx_h264_mc_luma_gate.nxnx_h264_pframe_recon.nx
structs
| none |
consts
| none |
functions
| 11 | func mc_clip1(v: i64) -> i64 { if v < 0 { return 0 } if v > 255 { return 255 } return v } |
| 12 | func mc_tap6(a: i64, b: i64, c: i64, d: i64, e: i64, f: i64) -> i64 |
| 16 | func mc_rc(ref: *u8, W: i64, H: i64, x: i64, y: i64) -> i64 |
| 26 | func mc_hc(ref: *u8, W: i64, H: i64, x: i64, y: i64) -> i64 |
| 31 | func mc_vc(ref: *u8, W: i64, H: i64, x: i64, y: i64) -> i64 |
| 35 | func 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) } |
| 36 | func 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) } |
| 38 | func mc_halfHV(ref: *u8, W: i64, H: i64, x: i64, y: i64) -> i64 |
| 45 | func nx_h264_mc_luma_sample(ref: *u8, W: i64, H: i64, x: i64, y: i64, xf: i64, yf: i64) -> i64 |