diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-01-19 20:04:35 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-01-19 20:04:35 +0000 |
commit | 76fbb0248a0fc8a0c5d32fbb158372ee938eda63 (patch) | |
tree | f733fb266b5b66ce502c0880e2e746b970c9d046 | |
parent | 35e5fb067e0099fde6c3429131f11433eb92f22b (diff) | |
download | ffmpeg-76fbb0248a0fc8a0c5d32fbb158372ee938eda63.tar.gz |
align
Originally committed as revision 1477 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/dsputil.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 112369e32b..06da93ba73 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -1782,7 +1782,8 @@ static int hadamard8_abs_c(uint8_t *src, int stride, int mean){ static int dct_sad8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride){ MpegEncContext * const s= (MpegEncContext *)c; - DCTELEM temp[64]; + uint64_t __align8 aligned_temp[sizeof(DCTELEM)*64/8]; + DCTELEM * const temp= (DCTELEM*)aligned_temp; int sum=0, i; s->dsp.diff_pixels(temp, src1, src2, stride); @@ -1798,7 +1799,9 @@ void simple_idct(DCTELEM *block); //FIXME static int quant_psnr8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride){ MpegEncContext * const s= (MpegEncContext *)c; - DCTELEM temp[64], bak[64]; + uint64_t __align8 aligned_temp[sizeof(DCTELEM)*64*2/8]; + DCTELEM * const temp= (DCTELEM*)aligned_temp; + DCTELEM * const bak = ((DCTELEM*)aligned_temp)+64; int sum=0, i; s->mb_intra=0; @@ -1820,8 +1823,10 @@ 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){ MpegEncContext * const s= (MpegEncContext *)c; const UINT8 *scantable= s->intra_scantable.permutated; - DCTELEM temp[64]; - uint8_t bak[stride*8]; + uint64_t __align8 aligned_temp[sizeof(DCTELEM)*64/8]; + uint64_t __align8 aligned_bak[stride]; + DCTELEM * const temp= (DCTELEM*)aligned_temp; + uint8_t * const bak= (uint8_t*)aligned_bak; int i, last, run, bits, level, distoration, start_i; const int esc_length= s->ac_esc_length; uint8_t * length; @@ -1892,7 +1897,8 @@ 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){ MpegEncContext * const s= (MpegEncContext *)c; const UINT8 *scantable= s->intra_scantable.permutated; - DCTELEM temp[64]; + uint64_t __align8 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; uint8_t * length; |