diff options
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/common.h b/libavutil/common.h index 5814297cf2..493c3139aa 100644 --- a/libavutil/common.h +++ b/libavutil/common.h @@ -47,6 +47,8 @@ #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 FFUDIV(a,b) (((a)>0 ?(a):(a)-(b)+1) / (b)) +#define FFUMOD(a,b) ((a)-(b)*FFUDIV(a,b)) #define FFABS(a) ((a) >= 0 ? (a) : (-(a))) #define FFSIGN(a) ((a) > 0 ? 1 : -1) |