"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libavcodec/ppc/huffyuvdsp_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.

huffyuvdsp_altivec.c  (libav-11.7):huffyuvdsp_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/huffyuvdsp.h" #include "libavcodec/huffyuvdsp.h"
#if HAVE_ALTIVEC #if HAVE_ALTIVEC && HAVE_BIGENDIAN
static void add_bytes_altivec(uint8_t *dst, uint8_t *src, int w) static void add_bytes_altivec(uint8_t *dst, uint8_t *src, int w)
{ {
register int i; register int i;
register vector unsigned char vdst, vsrc; register vector unsigned char vdst, vsrc;
/* dst and src are 16 bytes-aligned (guaranteed). */ /* dst and src are 16 bytes-aligned (guaranteed). */
for (i = 0; i + 15 < w; i += 16) { for (i = 0; i + 15 < w; i += 16) {
vdst = vec_ld(i, (unsigned char *) dst); vdst = vec_ld(i, (unsigned char *) dst);
vsrc = vec_ld(i, (unsigned char *) src); vsrc = vec_ld(i, (unsigned char *) src);
vdst = vec_add(vsrc, vdst); vdst = vec_add(vsrc, vdst);
vec_st(vdst, i, (unsigned char *) dst); vec_st(vdst, i, (unsigned char *) dst);
} }
/* If w is not a multiple of 16. */ /* If w is not a multiple of 16. */
for (; i < w; i++) for (; i < w; i++)
dst[i] = src[i]; dst[i] = src[i];
} }
#endif /* HAVE_ALTIVEC */ #endif /* HAVE_ALTIVEC */
av_cold void ff_huffyuvdsp_init_ppc(HuffYUVDSPContext *c) av_cold void ff_huffyuvdsp_init_ppc(HuffYUVDSPContext *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->add_bytes = add_bytes_altivec; c->add_bytes = add_bytes_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