]> granicus.if.org Git - libx264/commitdiff
Fix visual corruption when picture width was not mod 32.
authorDavid Wolstencroft <wolstencroft@alum.rpi.edu>
Sun, 14 Dec 2008 10:47:28 +0000 (10:47 +0000)
committerGuillaume Poirier <gpoirier@mplayerhq.hu>
Sun, 14 Dec 2008 10:47:28 +0000 (10:47 +0000)
The previous Altivec implemention of mc_chroma assumed that i_src_stride was always mod 16.

common/ppc/mc.c

index c30328547e209c217e1b86a3c061f216bf3cae84..3772ff55a25acfeb4b6ae4edee78c7a97f7f29e2 100644 (file)
@@ -272,7 +272,6 @@ static void mc_chroma_altivec_4xh( uint8_t *dst, int i_dst_stride,
     LOAD_ZERO;
     PREP_LOAD;
     PREP_LOAD_SRC( src );
-    PREP_LOAD_SRC( srcp );
     PREP_STORE4;
     vec_u16_t   coeff0v, coeff1v, coeff2v, coeff3v;
     vec_u8_t    src0v_8, src1v_8, src2v_8, src3v_8;
@@ -299,7 +298,7 @@ static void mc_chroma_altivec_4xh( uint8_t *dst, int i_dst_stride,
     {
         src0v_8 = src2v_8;
         src1v_8 = src3v_8;
-        VEC_LOAD( srcp, src2v_8, 5, vec_u8_t, srcp );
+        VEC_LOAD_G( srcp, src2v_8, 5, vec_u8_t );
         src3v_8 = vec_perm( src2v_8, src2v_8, permv );
 
         dstv_16 = k32v;
@@ -340,7 +339,6 @@ static void mc_chroma_altivec_8xh( uint8_t *dst, int i_dst_stride,
     LOAD_ZERO;
     PREP_LOAD;
     PREP_LOAD_SRC( src );
-    PREP_LOAD_SRC( srcp );
     PREP_STORE8;
     vec_u16_t   coeff0v, coeff1v, coeff2v, coeff3v;
     vec_u8_t    src0v_8, src1v_8, src2v_8, src3v_8;
@@ -367,7 +365,7 @@ static void mc_chroma_altivec_8xh( uint8_t *dst, int i_dst_stride,
     {
         src0v_8 = src2v_8;
         src1v_8 = src3v_8;
-        VEC_LOAD( srcp, src2v_8, 9, vec_u8_t, srcp );
+        VEC_LOAD_G( srcp, src2v_8, 9, vec_u8_t );
         src3v_8 = vec_perm( src2v_8, src2v_8, permv );
 
         dstv_16 = k32v;