From 355c445f222eae4f953f1be9f8e1d44a2a07d639 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier Date: Mon, 26 Jan 2009 06:28:23 -0800 Subject: [PATCH] add AltiVec implementation of x264_mc_copy_w16_aligned --- common/ppc/mc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/common/ppc/mc.c b/common/ppc/mc.c index 81d5c5f3..5b596993 100644 --- a/common/ppc/mc.c +++ b/common/ppc/mc.c @@ -162,6 +162,22 @@ static void x264_mc_copy_w16_altivec( uint8_t *dst, int i_dst, } +static void x264_mc_copy_w16_aligned_altivec( uint8_t *dst, int i_dst, + uint8_t *src, int i_src, int i_height ) +{ + int y; + + for( y = 0; y < i_height; ++y) + { + vec_u8_t cpyV = vec_ld( 0, src); + vec_st(cpyV, 0, dst); + + src += i_src; + dst += i_dst; + } +} + + static void mc_luma_altivec( uint8_t *dst, int i_dst_stride, uint8_t *src[4], int i_src_stride, int mvx, int mvy, @@ -644,5 +660,8 @@ void x264_mc_altivec_init( x264_mc_functions_t *pf ) pf->get_ref = get_ref_altivec; pf->mc_chroma = mc_chroma_altivec; + pf->copy_16x16_unaligned = x264_mc_copy_w16_altivec; + pf->copy[PIXEL_16x16] = x264_mc_copy_w16_aligned_altivec; + pf->hpel_filter = x264_hpel_filter_altivec; } -- 2.47.3