diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-05-29 20:15:38 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-05-29 20:15:38 +0000 |
commit | abeee5ccb8690d57c5f3fc9863f2e81a2bd0b159 (patch) | |
tree | 7b0ec936eb2c21a9a66be68f08a4f411c2c2527a | |
parent | 6f62e2c72d4ab9f645800e35214dbb9d45bb5494 (diff) | |
download | ffmpeg-streaming-abeee5ccb8690d57c5f3fc9863f2e81a2bd0b159.zip ffmpeg-streaming-abeee5ccb8690d57c5f3fc9863f2e81a2bd0b159.tar.gz |
Use av_clip_uint8 instead of equivalent but unoptimzed code,
Originally committed as revision 18985 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/lcldec.c | 6 |
1 files changed, 1 insertions, 5 deletions
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); } |