[FFmpeg-cvslog] lavu/common: add an explanation to FF_CEIL_RSHIFT()

Clément Bœsch git at videolan.org
Thu Jan 7 22:34:47 CET 2016


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Thu Jan  7 22:34:04 2016 +0100| [04826b7ff02f3ad2b7ffa4257587df64ee88882c] | committer: Clément Bœsch

lavu/common: add an explanation to FF_CEIL_RSHIFT()

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=04826b7ff02f3ad2b7ffa4257587df64ee88882c
---

 libavutil/common.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/common.h b/libavutil/common.h
index bc6842e..9ac04da 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))



More information about the ffmpeg-cvslog mailing list