diff options
author | Alan Curry <pacman@world.std.com> | 2006-02-08 08:20:40 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2006-02-08 08:20:40 +0000 |
commit | 5edb653bca2cfc6792d0185ef4298e068375fb5a (patch) | |
tree | 1f051ac6029be683e747d404c3d7949af68a0a81 /postproc/yuv2rgb_altivec.c | |
parent | be9d060d0c4f7e548bdb6ce96789b22bfd09a704 (diff) | |
download | ffmpeg-5edb653bca2cfc6792d0185ef4298e068375fb5a.tar.gz |
AltiVec operations need to have memory aligned on 16-byte boundaries.
patch by Alan Curry, pacman at world dot std dot com
Originally committed as revision 17559 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
Diffstat (limited to 'postproc/yuv2rgb_altivec.c')
-rw-r--r-- | postproc/yuv2rgb_altivec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/postproc/yuv2rgb_altivec.c b/postproc/yuv2rgb_altivec.c index 16acc42564..69b5b302da 100644 --- a/postproc/yuv2rgb_altivec.c +++ b/postproc/yuv2rgb_altivec.c @@ -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 @@ altivec_yuv2packedX (SwsContext *c, 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]; |