summaryrefslogtreecommitdiff
path: root/libavcodec/pngdec.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-08-01 19:13:55 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-08-04 12:57:38 +0100
commit2257165bff243534982f4ddabae4e65e2a35f2ab (patch)
tree2a773576427ef3f72161879a7da27f529ca3195f /libavcodec/pngdec.c
parentf84a1b597c29dc035b8d5529ef88c2d7ff057820 (diff)
png: disable broken MMX/SIMD code for bpp <= 2
The decoder was producing different results when ASM was disabled. Based on a long debug session with Kostya.
Diffstat (limited to 'libavcodec/pngdec.c')
-rw-r--r--libavcodec/pngdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 7bc2ad4847..0c4c91a612 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -240,7 +240,7 @@ static void png_filter_row(PNGDSPContext *dsp, 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;