[FFmpeg-cvslog] pngdec: Do not use SIMD paeth prediction for bpp=2

Michael Niedermayer git at videolan.org
Sun Jan 22 01:18:47 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Jan 19 20:50:44 2012 +0100| [d1c48025a71e9e190d79115759c10f5807f4d0a7] | committer: Michael Niedermayer

pngdec: Do not use SIMD paeth prediction for bpp=2

Fixes decoding of basi4a08.png

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/pngdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index ec60454..e91bca4 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -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);



More information about the ffmpeg-cvslog mailing list