diff options
Diffstat (limited to 'libavutil/common.h')
-rw-r--r-- | libavutil/common.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavutil/common.h b/libavutil/common.h index 7b7bcbe8f3..8142b31fdb 100644 --- a/libavutil/common.h +++ b/libavutil/common.h @@ -55,8 +55,11 @@ /* assume b>0 */ #define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) /* Fast a/(1<<b) rounded toward +inf. Assume a>=0 and b>=0 */ -#define FF_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \ +#define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \ : ((a) + (1<<(b)) - 1) >> (b)) +/* Backwards compat. */ +#define FF_CEIL_RSHIFT AV_CEIL_RSHIFT + #define FFUDIV(a,b) (((a)>0 ?(a):(a)-(b)+1) / (b)) #define FFUMOD(a,b) ((a)-(b)*FFUDIV(a,b)) |