Commit 82a60de3 authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ed9be7dd
...@@ -272,7 +272,8 @@ static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type, ...@@ -272,7 +272,8 @@ static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type,
if (bpp > 2 && size > 4) { if (bpp > 2 && size > 4) {
/* would write off the end of the array if we let it process /* would write off the end of the array if we let it process
* the last pixel with bpp=3 */ * the last pixel with bpp=3 */
int w = bpp == 4 ? size : size - 3; int w = (bpp & 3) ? size - 3 : size;
if (w > i) { if (w > i) {
dsp->add_paeth_prediction(dst + i, src + i, last + i, size - i, bpp); dsp->add_paeth_prediction(dst + i, src + i, last + i, size - i, bpp);
i = w; i = w;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment