Unified · Split
| @@ -307,13 +307,13 @@ static void png_handle_row(PNGDecContext *s) · 306 unmodified lines | |||
| 307 | 307 | ||
| 308 | if (!s->interlace_type) { | 308 | if (!s->interlace_type) { |
| 309 | ptr = s->image_buf + s->image_linesize * (s->y + s->y_offset) + s->x_offset * s->bpp; | 309 | ptr = s->image_buf + s->image_linesize * (s->y + s->y_offset) + s->x_offset * s->bpp; |
| 310 | if (s->y == 0) | 310 | if (s->y == 0) |
| 311 | last_row = s->last_row; | 311 | last_row = s->last_row; |
| 312 | else | 312 | else |
| 313 | last_row = ptr - s->image_linesize; | 313 | last_row = ptr - s->image_linesize; |
| 314 | 314 | ||
| 315 | png_filter_row(&s->dsp, ptr, s->crow_buf[0], s->crow_buf + 1, | 315 | png_filter_row(&s->dsp, ptr, s->crow_buf[0], s->crow_buf + 1, |
| 316 | last_row, s->row_size, s->bpp); | 316 | last_row, s->row_size, s->bpp); |
| 317 | /* loco lags by 1 row so that it doesn't interfere with top prediction */ | 317 | /* loco lags by 1 row so that it doesn't interfere with top prediction */ |
| 318 | if (s->filter_type == PNG_FILTER_TYPE_LOCO && s->y > 0) { | 318 | if (s->filter_type == PNG_FILTER_TYPE_LOCO && s->y > 0) { |
| 319 | if (s->bit_depth == 16) { | 319 | if (s->bit_depth == 16) { |