diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-04-22 23:15:24 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-04-22 23:15:24 +0000 |
commit | 10f3005f51c4aed49abad7d882e1488225f1c674 (patch) | |
tree | 011170a85ef3e46cc80c16e905e42544cc3e7b39 | |
parent | 25ef43bb289a3a3a717a684902c0a310e292beba (diff) | |
download | ffmpeg-10f3005f51c4aed49abad7d882e1488225f1c674.tar.gz |
RSHIFT(x,0) fix
Originally committed as revision 3041 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/common.h b/libavcodec/common.h index a678f2e349..f9010dbc17 100644 --- a/libavcodec/common.h +++ b/libavcodec/common.h @@ -227,7 +227,7 @@ inline void dprintf(const char* fmt,...) {} # define av_abort() do { av_log(NULL, AV_LOG_ERROR, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0) //rounded divison & shift -#define RSHIFT(a,b) ((a) > 0 ? ((a) + (1<<((b)-1)))>>(b) : ((a) + (1<<((b)-1))-1)>>(b)) +#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b)) /* assume b>0 */ #define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) #define ABS(a) ((a) >= 0 ? (a) : (-(a))) |