36 static int ssd_int8_vs_int16_altivec(
const int8_t *pix1,
const int16_t *pix2,
39 int i, size16 = size >> 4;
40 vector
signed char vpix1;
41 vector
signed short vpix2, vdiff, vpix1l, vpix1h;
43 vector
signed int vscore;
45 }
u = { .vscore = vec_splat_s32(0) };
51 vpix1 = vec_unaligned_load(pix1);
52 vpix2 = vec_unaligned_load(pix2);
55 vpix1h = vec_unpackh(vpix1);
56 vdiff = vec_sub(vpix1h, vpix2);
57 vpix1l = vec_unpackl(vpix1);
59 vpix2 = vec_unaligned_load(pix2);
60 u.vscore = vec_msum(vdiff, vdiff,
u.vscore);
61 vdiff = vec_sub(vpix1l, vpix2);
62 u.vscore = vec_msum(vdiff, vdiff,
u.vscore);
67 u.vscore = vec_sums(
u.vscore, vec_splat_s32(0));
70 for (i = 0; i <
size; i++)
71 u.score[3] += (pix1[i] - pix2[i]) * (pix1[i] - pix2[i]);