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]);
Macro definitions for various function/variable attributes.
#define PPC_ALTIVEC(flags)
int(* ssd_int8_vs_int16)(const int8_t *pix1, const int16_t *pix2, intptr_t size)
av_cold void ff_svq1enc_init_ppc(SVQ1EncContext *c)
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
Contains misc utility macros and inline functions.