comparison ppc/int_altivec.c @ 11981:d3551fcf4c1c libavcodec

Add const to some pointer parameters. Patch by Eli Friedman, eli D friedman A gmail
author cehoyos
date Sun, 27 Jun 2010 15:11:38 +0000
parents 7dd2a45249a9
children
comparison
equal deleted inserted replaced
11980:263b4ef7ad87 11981:d3551fcf4c1c
77 u.score[3] += (pix1[i]-pix2[i])*(pix1[i]-pix2[i]); 77 u.score[3] += (pix1[i]-pix2[i])*(pix1[i]-pix2[i]);
78 } 78 }
79 return u.score[3]; 79 return u.score[3];
80 } 80 }
81 81
82 static int32_t scalarproduct_int16_altivec(int16_t * v1, int16_t * v2, int order, const int shift) 82 static int32_t scalarproduct_int16_altivec(const int16_t * v1, const int16_t * v2, int order, const int shift)
83 { 83 {
84 int i; 84 int i;
85 LOAD_ZERO; 85 LOAD_ZERO;
86 register vec_s16 vec1, *pv; 86 register vec_s16 vec1, *pv;
87 register vec_s32 res = vec_splat_s32(0), t; 87 register vec_s32 res = vec_splat_s32(0), t;
107 res = vec_splat(res, 3); 107 res = vec_splat(res, 3);
108 vec_ste(res, 0, &ires); 108 vec_ste(res, 0, &ires);
109 return ires; 109 return ires;
110 } 110 }
111 111
112 static int32_t scalarproduct_and_madd_int16_altivec(int16_t *v1, int16_t *v2, int16_t *v3, int order, int mul) 112 static int32_t scalarproduct_and_madd_int16_altivec(int16_t *v1, const int16_t *v2, const int16_t *v3, int order, int mul)
113 { 113 {
114 LOAD_ZERO; 114 LOAD_ZERO;
115 vec_s16 *pv1 = (vec_s16*)v1; 115 vec_s16 *pv1 = (vec_s16*)v1;
116 vec_s16 *pv2 = (vec_s16*)v2; 116 vec_s16 *pv2 = (vec_s16*)v2;
117 vec_s16 *pv3 = (vec_s16*)v3; 117 vec_s16 *pv3 = (vec_s16*)v3;