changeset 1016:5840ee827cc9 libavcodec

align
author michaelni
date Sun, 19 Jan 2003 20:04:35 +0000
parents 35cf2f4a0f8c
children e113a950c074
files dsputil.c
diffstat 1 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/dsputil.c	Sun Jan 19 19:00:45 2003 +0000
+++ b/dsputil.c	Sun Jan 19 20:04:35 2003 +0000
@@ -1782,7 +1782,8 @@
 
 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 @@
 
 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 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 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;