Mercurial > libavcodec.hg
diff common.h @ 753:8e1f0939d15d libavcodec
complete mpeg4 GMC decoding support
author | michaelni |
---|---|
date | Wed, 16 Oct 2002 19:55:49 +0000 |
parents | 1aa1cbb8c3c1 |
children | 5344ecb2c677 |
line wrap: on
line diff
--- a/common.h Wed Oct 16 17:23:18 2002 +0000 +++ b/common.h Wed Oct 16 19:55:49 2002 +0000 @@ -157,6 +157,8 @@ # define av_abort() do { fprintf(stderr, "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)) /* assume b>0 */ #define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) #define ABS(a) ((a) >= 0 ? (a) : (-(a)))