[FFmpeg-cvslog] ppc: add const where needed in scalarproduct_int16_altivec()

Mans Rullgard git at videolan.org
Tue May 1 22:19:18 CEST 2012


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Fri Apr 27 10:43:08 2012 +0100| [c81d1e2390ce7d3182d4176723384e65a771844c] | committer: Mans Rullgard

ppc: add const where needed in scalarproduct_int16_altivec()

Signed-off-by: Mans Rullgard <mans at mansr.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c81d1e2390ce7d3182d4176723384e65a771844c
---

 libavcodec/ppc/int_altivec.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavcodec/ppc/int_altivec.c b/libavcodec/ppc/int_altivec.c
index bbf4e1d..3c8b852 100644
--- a/libavcodec/ppc/int_altivec.c
+++ b/libavcodec/ppc/int_altivec.c
@@ -79,17 +79,18 @@ static int ssd_int8_vs_int16_altivec(const int8_t *pix1, const int16_t *pix2,
     return u.score[3];
 }
 
-static int32_t scalarproduct_int16_altivec(int16_t *v1, const int16_t *v2,
+static int32_t scalarproduct_int16_altivec(const int16_t *v1, const int16_t *v2,
                                            int order)
 {
     int i;
     LOAD_ZERO;
-    register vec_s16 vec1, *pv;
+    const vec_s16 *pv;
+    register vec_s16 vec1;
     register vec_s32 res = vec_splat_s32(0), t;
     int32_t ires;
 
     for(i = 0; i < order; i += 8){
-        pv = (vec_s16*)v1;
+        pv = (const vec_s16*)v1;
         vec1 = vec_perm(pv[0], pv[1], vec_lvsl(0, v1));
         t = vec_msum(vec1, vec_ld(0, v2), zero_s32v);
         res = vec_sums(t, res);



More information about the ffmpeg-cvslog mailing list