diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-07 12:36:10 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-08 18:24:58 +0100 |
commit | 82a60de3b78f527cca80d4ccf6b62c6d6b8f628b (patch) | |
tree | a30f3fcc46e2ef9e8de855a99f59967c4eb2c153 /libavcodec | |
parent | ed9be7dd470cd32fdb5baa886b048266f4cba28f (diff) | |
download | ffmpeg-streaming-82a60de3b78f527cca80d4ccf6b62c6d6b8f628b.zip ffmpeg-streaming-82a60de3b78f527cca80d4ccf6b62c6d6b8f628b.tar.gz |
avcodec/pngdec: handle 4 more bytes with SIMD for RGB64 in paeth prediction
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/pngdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |