[FFmpeg-cvslog] avcodec/hqx: Use av_clip_uintp2()

Michael Niedermayer git at videolan.org
Fri Apr 10 12:50:39 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Apr 10 12:32:44 2015 +0200| [599dc8fee18f997fd79272fc43b71cdedd7fbba0] | committer: Michael Niedermayer

avcodec/hqx: Use av_clip_uintp2()

Suggested-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/hqx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/hqx.c b/libavcodec/hqx.c
index 1e5a018..13c74f9 100644
--- a/libavcodec/hqx.c
+++ b/libavcodec/hqx.c
@@ -182,7 +182,7 @@ static void hqx_idct_put(uint16_t *dst, ptrdiff_t stride,
 
     for (i = 0; i < 8; i++) {
         for (j = 0; j < 8; j++) {
-            int v = av_clip(block[j + i * 8] + 0x800, 0, 0xFFF);
+            int v = av_clip_uintp2(block[j + i * 8] + 0x800, 12);
             dst[j] = (v << 4) | (v >> 8);
         }
         dst += stride >> 1;



More information about the ffmpeg-cvslog mailing list