Mercurial > libavcodec.hg
comparison simple_idct.c @ 464:9b73bce5071a libavcodec
gcc 3.1 warning fix (patch by Felix Buenemann <atmosfear at users.sourceforge.net>)
author | michaelni |
---|---|
date | Sun, 02 Jun 2002 16:06:41 +0000 |
parents | 000aeeac27a2 |
children | ec13b0a726c3 |
comparison
equal
deleted
inserted
replaced
463:ba3e863aa316 | 464:9b73bce5071a |
---|---|
57 W5,-W1, W7, W3,-W3,-W7, W1,-W5, | 57 W5,-W1, W7, W3,-W3,-W7, W1,-W5, |
58 W6,-W2, W2,-W6,-W6, W2,-W2, W6, | 58 W6,-W2, W2,-W6,-W6, W2,-W2, W6, |
59 W7,-W5, W3,-W1, W1,-W3, W5,-W7 | 59 W7,-W5, W3,-W1, W1,-W3, W5,-W7 |
60 }; | 60 }; |
61 | 61 |
62 static int inline idctRowCondZ (int16_t * row) | 62 static inline int idctRowCondZ (int16_t * row) |
63 { | 63 { |
64 int a0, a1, a2, a3, b0, b1, b2, b3; | 64 int a0, a1, a2, a3, b0, b1, b2, b3; |
65 | 65 |
66 if( !( ((uint32_t*)row)[0]|((uint32_t*)row)[1] |((uint32_t*)row)[2] |((uint32_t*)row)[3])) { | 66 if( !( ((uint32_t*)row)[0]|((uint32_t*)row)[1] |((uint32_t*)row)[2] |((uint32_t*)row)[3])) { |
67 /* row[0] = row[1] = row[2] = row[3] = row[4] = | 67 /* row[0] = row[1] = row[2] = row[3] = row[4] = |
103 return 1; | 103 return 1; |
104 } | 104 } |
105 | 105 |
106 #ifdef ARCH_ALPHA | 106 #ifdef ARCH_ALPHA |
107 /* 0: all entries 0, 1: only first entry nonzero, 2: otherwise */ | 107 /* 0: all entries 0, 1: only first entry nonzero, 2: otherwise */ |
108 static int inline idctRowCondDC(int16_t *row) | 108 static inline int idctRowCondDC(int16_t *row) |
109 { | 109 { |
110 int_fast32_t a0, a1, a2, a3, b0, b1, b2, b3; | 110 int_fast32_t a0, a1, a2, a3, b0, b1, b2, b3; |
111 uint64_t *lrow = (uint64_t *) row; | 111 uint64_t *lrow = (uint64_t *) row; |
112 | 112 |
113 if (lrow[1] == 0) { | 113 if (lrow[1] == 0) { |
203 row[7] = (a0 - b0) >> ROW_SHIFT; | 203 row[7] = (a0 - b0) >> ROW_SHIFT; |
204 | 204 |
205 return 2; | 205 return 2; |
206 } | 206 } |
207 #else /* not ARCH_ALPHA */ | 207 #else /* not ARCH_ALPHA */ |
208 static int inline idctRowCondDC (int16_t * row) | 208 static inline int idctRowCondDC (int16_t * row) |
209 { | 209 { |
210 int a0, a1, a2, a3, b0, b1, b2, b3; | 210 int a0, a1, a2, a3, b0, b1, b2, b3; |
211 | 211 |
212 if( !( ((uint32_t*)row)[1] |((uint32_t*)row)[2] |((uint32_t*)row)[3]| row[1])) { | 212 if( !( ((uint32_t*)row)[1] |((uint32_t*)row)[2] |((uint32_t*)row)[3]| row[1])) { |
213 // row[0] = row[1] = row[2] = row[3] = row[4] = row[5] = row[6] = row[7] = row[0]<<3; | 213 // row[0] = row[1] = row[2] = row[3] = row[4] = row[5] = row[6] = row[7] = row[0]<<3; |
250 | 250 |
251 return 1; | 251 return 1; |
252 } | 252 } |
253 #endif /* not ARCH_ALPHA */ | 253 #endif /* not ARCH_ALPHA */ |
254 | 254 |
255 static void inline idctCol (int16_t * col) | 255 static inline void idctCol (int16_t * col) |
256 { | 256 { |
257 | 257 |
258 /* | 258 /* |
259 if( !(col[8*1] | col[8*2] |col[8*3] |col[8*4] |col[8*5] |col[8*6] | col[8*7])) { | 259 if( !(col[8*1] | col[8*2] |col[8*3] |col[8*4] |col[8*5] |col[8*6] | col[8*7])) { |
260 col[8*0] = col[8*1] = col[8*2] = col[8*3] = col[8*4] = | 260 col[8*0] = col[8*1] = col[8*2] = col[8*3] = col[8*4] = |
282 col[8*5] = (a2 - b2) >> COL_SHIFT; | 282 col[8*5] = (a2 - b2) >> COL_SHIFT; |
283 col[8*3] = (a3 + b3) >> COL_SHIFT; | 283 col[8*3] = (a3 + b3) >> COL_SHIFT; |
284 col[8*4] = (a3 - b3) >> COL_SHIFT; | 284 col[8*4] = (a3 - b3) >> COL_SHIFT; |
285 } | 285 } |
286 | 286 |
287 static void inline idctSparseCol (int16_t * col) | 287 static inline void idctSparseCol (int16_t * col) |
288 { | 288 { |
289 int a0, a1, a2, a3, b0, b1, b2, b3; | 289 int a0, a1, a2, a3, b0, b1, b2, b3; |
290 col[0] += (1<<(COL_SHIFT-1))/W4; | 290 col[0] += (1<<(COL_SHIFT-1))/W4; |
291 a0 = W4*col[8*0]; | 291 a0 = W4*col[8*0]; |
292 a1 = W4*col[8*0]; | 292 a1 = W4*col[8*0]; |
370 #ifndef ARCH_ALPHA | 370 #ifndef ARCH_ALPHA |
371 } | 371 } |
372 #endif | 372 #endif |
373 } | 373 } |
374 | 374 |
375 static void inline idctSparse2Col (int16_t * col) | 375 static inline void idctSparse2Col (int16_t * col) |
376 { | 376 { |
377 int a0, a1, a2, a3, b0, b1, b2, b3; | 377 int a0, a1, a2, a3, b0, b1, b2, b3; |
378 col[0] += (1<<(COL_SHIFT-1))/W4; | 378 col[0] += (1<<(COL_SHIFT-1))/W4; |
379 a0 = W4*col[8*0]; | 379 a0 = W4*col[8*0]; |
380 a1 = W4*col[8*0]; | 380 a1 = W4*col[8*0]; |