comparison simple_idct.c @ 4603:3d2b2a2a664e libavcodec

enable some 64bit optimized code on 64bit arch
author aurel
date Wed, 28 Feb 2007 00:55:19 +0000
parents 23da44e8fd05
children eb2b4b1da4cd
comparison
equal deleted inserted replaced
4602:76fa19d23485 4603:3d2b2a2a664e
76 #endif 76 #endif
77 77
78 static inline void idctRowCondDC (DCTELEM * row) 78 static inline void idctRowCondDC (DCTELEM * row)
79 { 79 {
80 int a0, a1, a2, a3, b0, b1, b2, b3; 80 int a0, a1, a2, a3, b0, b1, b2, b3;
81 #ifdef FAST_64BIT 81 #ifdef HAVE_FAST_64BIT
82 uint64_t temp; 82 uint64_t temp;
83 #else 83 #else
84 uint32_t temp; 84 uint32_t temp;
85 #endif 85 #endif
86 86
87 #ifdef FAST_64BIT 87 #ifdef HAVE_FAST_64BIT
88 #ifdef WORDS_BIGENDIAN 88 #ifdef WORDS_BIGENDIAN
89 #define ROW0_MASK 0xffff000000000000LL 89 #define ROW0_MASK 0xffff000000000000LL
90 #else 90 #else
91 #define ROW0_MASK 0xffffLL 91 #define ROW0_MASK 0xffffLL
92 #endif 92 #endif
144 MUL16(b2, W5, row[1]); 144 MUL16(b2, W5, row[1]);
145 MAC16(b2, -W1, row[3]); 145 MAC16(b2, -W1, row[3]);
146 MUL16(b3, W7, row[1]); 146 MUL16(b3, W7, row[1]);
147 MAC16(b3, -W5, row[3]); 147 MAC16(b3, -W5, row[3]);
148 148
149 #ifdef FAST_64BIT 149 #ifdef HAVE_FAST_64BIT
150 temp = ((uint64_t*)row)[1]; 150 temp = ((uint64_t*)row)[1];
151 #else 151 #else
152 temp = ((uint32_t*)row)[2] | ((uint32_t*)row)[3]; 152 temp = ((uint32_t*)row)[2] | ((uint32_t*)row)[3];
153 #endif 153 #endif
154 if (temp != 0) { 154 if (temp != 0) {