aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-07 12:36:10 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-08 18:24:58 +0100
commit82a60de3b78f527cca80d4ccf6b62c6d6b8f628b (patch)
treea30f3fcc46e2ef9e8de855a99f59967c4eb2c153 /libavcodec
parented9be7dd470cd32fdb5baa886b048266f4cba28f (diff)
downloadffmpeg-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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index bc32eab211..297e631ff5 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;