libavcodec/hqx: correct clipping error
authorferdo@bigroses.nl <ferdo@bigroses.nl>
Tue, 7 Apr 2015 10:42:17 +0000 (12:42 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 8 Apr 2015 07:53:59 +0000 (09:53 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/hqx.c
tests/ref/fate/canopus-hqx422a

index d7e605f..2407b7b 100644 (file)
@@ -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, 0x1000);
+            int v = av_clip(block[j + i * 8] + 0x800, 0, 0xFFF);
             dst[j] = (v << 4) | (v >> 8);
         }
         dst += stride >> 1;
index 29dc307..0fd2577 100644 (file)
@@ -1,2 +1,2 @@
 #tb 0: 1/25
-0,          0,          0,        1,  8294400, 0x9b38264d
+0,          0,          0,        1,  8294400, 0x9a22bebf