[SCM] libav/experimental: Use av_clip_uint8 instead of equivalent but unoptimzed code,

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:46:43 UTC 2013


The following commit has been merged in the experimental branch:
commit abeee5ccb8690d57c5f3fc9863f2e81a2bd0b159
Author: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Date:   Fri May 29 20:15:38 2009 +0000

    Use av_clip_uint8 instead of equivalent but unoptimzed code,
    
    Originally committed as revision 18985 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index 8b31b5f..f880eb8 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -81,11 +81,7 @@ static inline unsigned char fix (int pix14)
     int tmp;
 
     tmp = (pix14 + 0x80000) >> 20;
-    if (tmp < 0)
-        return 0;
-    if (tmp > 255)
-        return 255;
-    return tmp;
+    return av_clip_uint8(tmp);
 }
 
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list