[FFmpeg-cvslog] avcodec/pngdec: handle 4 more bytes with SIMD for RGB64 in paeth prediction

Michael Niedermayer git at videolan.org
Mon Dec 8 18:41:33 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec  7 12:36:10 2014 +0100| [82a60de3b78f527cca80d4ccf6b62c6d6b8f628b] | committer: Michael Niedermayer

avcodec/pngdec: handle 4 more bytes with SIMD for RGB64 in paeth prediction

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

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

 libavcodec/pngdec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index bc32eab..297e631 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -272,7 +272,8 @@ static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type,
         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;
+            int w = (bpp & 3) ? size - 3 : size;
+
             if (w > i) {
                 dsp->add_paeth_prediction(dst + i, src + i, last + i, size - i, bpp);
                 i = w;



More information about the ffmpeg-cvslog mailing list