changeset 6066:a82931915c54 libavcodec

Minor fix
author lu_zero
date Sun, 23 Dec 2007 19:06:33 +0000
parents 180976fd652e
children 292269939c50
files ppc/h264_template_altivec.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ppc/h264_template_altivec.c	Sun Dec 23 15:54:21 2007 +0000
+++ b/ppc/h264_template_altivec.c	Sun Dec 23 19:06:33 2007 +0000
@@ -166,8 +166,8 @@
         } else {
             vec_u8_t vsrcDuc;
             for (i = 0 ; i < h ; i++) {
-                vsrcCuc = vec_ld(0, src);
-                vsrcDuc = vec_ld(15, src);
+                vsrcCuc = vec_ld(stride + 0, src);
+                vsrcDuc = vec_ld(stride + 15, src);
                 vsrc1uc = vec_perm(vsrcCuc, vsrcDuc, vsrcperm0);
                 CHROMA_MC8_ALTIVEC_CORE_SIMPLE
 
@@ -189,7 +189,10 @@
                 vsrcCuc = vec_ld(0, src);
                 vsrcDuc = vec_ld(15, src);
                 vsrc0uc = vec_perm(vsrcCuc, vsrcDuc, vsrcperm0);
-                vsrc1uc = vec_perm(vsrcCuc, vsrcDuc, vsrcperm1);
+                if (reallyBadAlign)
+                    vsrc1uc = vsrcDuc;
+                else
+                    vsrc1uc = vec_perm(vsrcCuc, vsrcDuc, vsrcperm1);
 
                 CHROMA_MC8_ALTIVEC_CORE_SIMPLE
             }