[FFmpeg-cvslog] avutil/common: minor simplification in av_clip_intp2_c()

Michael Niedermayer git at videolan.org
Mon Mar 2 01:15:28 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Feb 27 22:34:10 2015 +0100| [85108195c5619492b28c4133525de0dedc706794] | committer: Michael Niedermayer

avutil/common: minor simplification in av_clip_intp2_c()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavutil/common.h b/libavutil/common.h
index 2fca693..852c1de 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -192,7 +192,7 @@ static av_always_inline av_const int32_t av_clipl_int32_c(int64_t a)
  */
 static av_always_inline av_const int av_clip_intp2_c(int a, int p)
 {
-    if ((a + (1 << p)) & ~((1 << (p + 1)) - 1))
+    if ((a + (1 << p)) & ~((2 << p) - 1))
         return (a >> 31) ^ ((1 << p) - 1);
     else
         return a;



More information about the ffmpeg-cvslog mailing list