Mercurial > libavcodec.hg
comparison common.h @ 522:cf7d120ed51a libavcodec
gcc3 bug workaround
author | michaelni |
---|---|
date | Tue, 09 Jul 2002 17:41:51 +0000 |
parents | 19a5e2a81e1a |
children | 985187bc2fa3 |
comparison
equal
deleted
inserted
replaced
521:9c66b5183ab3 | 522:cf7d120ed51a |
---|---|
163 #define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) | 163 #define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) |
164 #define ABS(a) ((a) >= 0 ? (a) : (-(a))) | 164 #define ABS(a) ((a) >= 0 ? (a) : (-(a))) |
165 #define MAX(a,b) ((a) > (b) ? (a) : (b)) | 165 #define MAX(a,b) ((a) > (b) ? (a) : (b)) |
166 #define MIN(a,b) ((a) > (b) ? (b) : (a)) | 166 #define MIN(a,b) ((a) > (b) ? (b) : (a)) |
167 | 167 |
168 #ifdef ARCH_X86 | 168 #if defined ARCH_X86 && (__GNUC__ != 3 || __GNUC_MINOR__ > 1) |
169 // inverse for shift optimization (gcc should do that ...) | 169 // inverse for shift optimization (gcc should do that ...) |
170 #define INV32(a) (-a) | 170 #define INV32(a) (-a) |
171 #else | 171 #else |
172 #define INV32(a) (32-a) | 172 #define INV32(a) (32-a) |
173 #endif | 173 #endif |