From abeee5ccb8690d57c5f3fc9863f2e81a2bd0b159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Fri, 29 May 2009 20:15:38 +0000 Subject: [PATCH] Use av_clip_uint8 instead of equivalent but unoptimzed code, Originally committed as revision 18985 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/lcldec.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c index 8b31b5fa00..f880eb8b11 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); }