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));
67 for (i = 0; i <
size; i++)
68 u.score[3] += (pix1[i] - pix2[i]) * (pix1[i] - pix2[i]);
Macro definitions for various function/variable attributes.
#define u(width, name, range_min, range_max)
#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.