diff options
author | Clément Bœsch <u@pkh.me> | 2016-01-08 00:34:04 +0300 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2016-01-08 00:34:04 +0300 |
commit | 04826b7ff02f3ad2b7ffa4257587df64ee88882c (patch) | |
tree | 6f939d53f80520040d4611cfbe3e2d2ea7da0ed8 /libavutil/common.h | |
parent | 5fbe57c027d09615fd8f435fb1af00613dc9f5fe (diff) |
lavu/common: add an explanation to FF_CEIL_RSHIFT()
Diffstat (limited to 'libavutil/common.h')
-rw-r--r-- | libavutil/common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/common.h b/libavutil/common.h index bc6842edc0..9ac04daf95 100644 --- a/libavutil/common.h +++ b/libavutil/common.h @@ -54,7 +54,7 @@ #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)) -/* assume a>=0 and b>=0 */ +/* 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)) \ : ((a) + (1<<(b)) - 1) >> (b)) #define FFUDIV(a,b) (((a)>0 ?(a):(a)-(b)+1) / (b)) |