Mercurial > mplayer.hg
diff postproc/yuv2rgb_altivec.c @ 17558:ad90899eeee6
AltiVec operations need to have memory aligned on 16-byte boundaries.
patch by Alan Curry, pacman at world dot std dot com
author | diego |
---|---|
date | Wed, 08 Feb 2006 08:20:40 +0000 |
parents | 3f863d1d8b43 |
children | 1a54f39404b9 |
line wrap: on
line diff
--- a/postproc/yuv2rgb_altivec.c Wed Feb 08 08:16:53 2006 +0000 +++ b/postproc/yuv2rgb_altivec.c Wed Feb 08 08:20:40 2006 +0000 @@ -68,6 +68,9 @@ #include <inttypes.h> #include <assert.h> #include "config.h" +#ifdef HAVE_MALLOC_H +#include <malloc.h> +#endif #include "rgb2rgb.h" #include "swscale.h" #include "swscale_internal.h" @@ -788,8 +791,8 @@ vector signed short *YCoeffs, *CCoeffs; - vYCoeffsBank = malloc (sizeof (vector signed short)*lumFilterSize*c->dstH); - vCCoeffsBank = malloc (sizeof (vector signed short)*chrFilterSize*c->dstH); + vYCoeffsBank = memalign (16, sizeof (vector signed short)*lumFilterSize*c->dstH); + vCCoeffsBank = memalign (16, sizeof (vector signed short)*chrFilterSize*c->dstH); for (i=0;i<lumFilterSize*c->dstH;i++) { tmp = c->vLumFilter[i];