[x264-devel] commit: add AltiVec implementation of x264_mc_copy_w16_aligned ( Guillaume Poirier )

git version control git at videolan.org
Mon Jan 26 15:29:34 CET 2009


x264 | branch: master | Guillaume Poirier <gpoirier at mplayerhq.hu> | Mon Jan 26 06:28:23 2009 -0800| [355c445f222eae4f953f1be9f8e1d44a2a07d639] | committer: Guillaume Poirier 

add AltiVec implementation of x264_mc_copy_w16_aligned

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=355c445f222eae4f953f1be9f8e1d44a2a07d639
---

 common/ppc/mc.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/common/ppc/mc.c b/common/ppc/mc.c
index 81d5c5f..5b59699 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;
 }



More information about the x264-devel mailing list