summaryrefslogtreecommitdiff
path: root/libavcodec/ppc/int_altivec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/ppc/int_altivec.c')
-rw-r--r--libavcodec/ppc/int_altivec.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/ppc/int_altivec.c b/libavcodec/ppc/int_altivec.c
index ffbb86303b..42c396c244 100644
--- a/libavcodec/ppc/int_altivec.c
+++ b/libavcodec/ppc/int_altivec.c
@@ -36,21 +36,19 @@
static int ssd_int8_vs_int16_altivec(const int8_t *pix1, const int16_t *pix2,
int size)
{
- int i, size16;
+ int i, size16 = size >> 4;
vector signed char vpix1;
vector signed short vpix2, vdiff, vpix1l, vpix1h;
union {
vector signed int vscore;
int32_t score[4];
- } u;
- u.vscore = vec_splat_s32(0);
+ } u = { .vscore = vec_splat_s32(0) };
// XXX lazy way, fix it later
#define vec_unaligned_load(b) \
vec_perm(vec_ld(0, b), vec_ld(15, b), vec_lvsl(0, b));
- size16 = size >> 4;
while (size16) {
// score += (pix1[i] - pix2[i]) * (pix1[i] - pix2[i]);
// load pix1 and the first batch of pix2