]> git.sesse.net Git - ffmpeg/commitdiff
pngdec: Do not use SIMD paeth prediction for bpp=2
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 19 Jan 2012 19:50:44 +0000 (20:50 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Jan 2012 23:46:19 +0000 (00:46 +0100)
Fixes decoding of basi4a08.png

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/pngdec.c

index ec604546b184e42cd7820d270f931d06e596e860..e91bca4f9730bd2dfc0669e14aba13200d65cb5d 100644 (file)
@@ -228,7 +228,7 @@ static void png_filter_row(PNGDecContext *s, uint8_t *dst, int filter_type,
             p = last[i];
             dst[i] = p + src[i];
         }
-        if(bpp > 1 && size > 4) {
+        if(bpp > 2 && size > 4) {
             // would write off the end of the array if we let it process the last pixel with bpp=3
             int w = bpp==4 ? size : size-3;
             s->add_paeth_prediction(dst+i, src+i, last+i, w-i, bpp);