Browse Source

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.
tags/n2.4
Vittorio Giovara 11 years ago
parent
commit
2257165bff
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/pngdec.c

+ 1
- 1
libavcodec/pngdec.c View File

@@ -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;


Loading…
Cancel
Save