"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libavcodec/ppc/svq1enc_altivec.c" between
libav-11.7.tar.gz and libav-11.8.tar.gz

About: libav provides cross-platform tools ("avconv") and libraries to convert, manipulate and stream a wide range of multimedia (audio and video) formats and protocols.

svq1enc_altivec.c  (libav-11.7):svq1enc_altivec.c  (libav-11.8)
skipping to change at line 35 skipping to change at line 35
#include <altivec.h> #include <altivec.h>
#endif #endif
#include "libavutil/attributes.h" #include "libavutil/attributes.h"
#include "libavutil/cpu.h" #include "libavutil/cpu.h"
#include "libavutil/ppc/cpu.h" #include "libavutil/ppc/cpu.h"
#include "libavutil/ppc/types_altivec.h" #include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h" #include "libavutil/ppc/util_altivec.h"
#include "libavcodec/svq1enc.h" #include "libavcodec/svq1enc.h"
#if HAVE_ALTIVEC #if HAVE_ALTIVEC && HAVE_BIGENDIAN
static int ssd_int8_vs_int16_altivec(const int8_t *pix1, const int16_t *pix2, static int ssd_int8_vs_int16_altivec(const int8_t *pix1, const int16_t *pix2,
int size) int size)
{ {
int i, size16 = size >> 4; int i, size16 = size >> 4;
vector signed char vpix1; vector signed char vpix1;
vector signed short vpix2, vdiff, vpix1l, vpix1h; vector signed short vpix2, vdiff, vpix1l, vpix1h;
union { union {
vector signed int vscore; vector signed int vscore;
int32_t score[4]; int32_t score[4];
} u = { .vscore = vec_splat_s32(0) }; } u = { .vscore = vec_splat_s32(0) };
skipping to change at line 79 skipping to change at line 79
size %= 16; size %= 16;
for (i = 0; i < size; i++) for (i = 0; i < size; i++)
u.score[3] += (pix1[i] - pix2[i]) * (pix1[i] - pix2[i]); u.score[3] += (pix1[i] - pix2[i]) * (pix1[i] - pix2[i]);
return u.score[3]; return u.score[3];
} }
#endif /* HAVE_ALTIVEC */ #endif /* HAVE_ALTIVEC */
av_cold void ff_svq1enc_init_ppc(SVQ1EncContext *c) av_cold void ff_svq1enc_init_ppc(SVQ1EncContext *c)
{ {
#if HAVE_ALTIVEC #if HAVE_ALTIVEC && HAVE_BIGENDIAN
if (!PPC_ALTIVEC(av_get_cpu_flags())) if (!PPC_ALTIVEC(av_get_cpu_flags()))
return; return;
c->ssd_int8_vs_int16 = ssd_int8_vs_int16_altivec; c->ssd_int8_vs_int16 = ssd_int8_vs_int16_altivec;
#endif /* HAVE_ALTIVEC */ #endif /* HAVE_ALTIVEC */
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS