diff options
author | Måns Rullgård <mans@mansr.com> | 2009-08-26 13:17:06 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2009-08-26 13:17:06 +0000 |
commit | 95d36bdbc3541448f8678f131897e0d5dcc2a85e (patch) | |
tree | 7090a05e1fe30b671cca3d054f9f252a9b7c3f17 | |
parent | 20e7c8ae0a7f06c9d525a61ef1b7ac39756b1a44 (diff) | |
download | ffmpeg-95d36bdbc3541448f8678f131897e0d5dcc2a85e.tar.gz |
dsputil: declare some arrays 16-byte aligned
These arrays are passed to functions for which we promise 16-byte
alignment, so make sure we fulfil that promise.
Originally committed as revision 19716 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/dsputil.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index f2b2fc8d2b..92d613a93d 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -3788,7 +3788,7 @@ static int dct264_sad8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *s static int dct_max8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){ MpegEncContext * const s= (MpegEncContext *)c; - DECLARE_ALIGNED_8(uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]); + DECLARE_ALIGNED_16(uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]); DCTELEM * const temp= (DCTELEM*)aligned_temp; int sum=0, i; @@ -3805,7 +3805,7 @@ static int dct_max8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2 static int quant_psnr8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){ MpegEncContext * const s= (MpegEncContext *)c; - DECLARE_ALIGNED_8 (uint64_t, aligned_temp[sizeof(DCTELEM)*64*2/8]); + DECLARE_ALIGNED_16(uint64_t, aligned_temp[sizeof(DCTELEM)*64*2/8]); DCTELEM * const temp= (DCTELEM*)aligned_temp; DCTELEM * const bak = ((DCTELEM*)aligned_temp)+64; int sum=0, i; @@ -3830,9 +3830,9 @@ static int quant_psnr8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *s static int rd8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){ MpegEncContext * const s= (MpegEncContext *)c; const uint8_t *scantable= s->intra_scantable.permutated; - DECLARE_ALIGNED_8 (uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]); - DECLARE_ALIGNED_8 (uint64_t, aligned_src1[8]); - DECLARE_ALIGNED_8 (uint64_t, aligned_src2[8]); + DECLARE_ALIGNED_16(uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]); + DECLARE_ALIGNED_16(uint64_t, aligned_src1[8]); + DECLARE_ALIGNED_16(uint64_t, aligned_src2[8]); DCTELEM * const temp= (DCTELEM*)aligned_temp; uint8_t * const lsrc1 = (uint8_t*)aligned_src1; uint8_t * const lsrc2 = (uint8_t*)aligned_src2; @@ -3909,7 +3909,7 @@ static int rd8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int static int bit8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){ MpegEncContext * const s= (MpegEncContext *)c; const uint8_t *scantable= s->intra_scantable.permutated; - DECLARE_ALIGNED_8 (uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]); + DECLARE_ALIGNED_16(uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]); DCTELEM * const temp= (DCTELEM*)aligned_temp; int i, last, run, bits, level, start_i; const int esc_length= s->ac_esc_length; |