33 static int ssd_int8_vs_int16_altivec(
const int8_t *pix1,
const int16_t *pix2,
36 int i, size16 =
size >> 4;
37 vector
signed char vpix1;
38 vector
signed short vpix2, vdiff, vpix1l, vpix1h;
40 vector
signed int vscore;
42 }
u = { .vscore = vec_splat_s32(0) };
48 vpix1 = vec_unaligned_load(pix1);
49 vpix2 = vec_unaligned_load(pix2);
52 vpix1h = vec_unpackh(vpix1);
53 vdiff = vec_sub(vpix1h, vpix2);
54 vpix1l = vec_unpackl(vpix1);
56 vpix2 = vec_unaligned_load(pix2);
57 u.vscore = vec_msum(vdiff, vdiff,
u.vscore);
58 vdiff = vec_sub(vpix1l, vpix2);
59 u.vscore = vec_msum(vdiff, vdiff,
u.vscore);
64 u.vscore = vec_sums(
u.vscore, vec_splat_s32(0));
68 u.score[3] += (pix1[
i] - pix2[
i]) * (pix1[
i] - pix2[
i]);
80 c->ssd_int8_vs_int16 = ssd_int8_vs_int16_altivec;