Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -447,16 +447,20 @@ static int decode_slice(AVCodecContext *c, void *arg) · 446 unmodified lines | |||
| 447 | decode_plane(f, sc, &gb, p->data[0] + ps*x + y*p->linesize[0] , width, height, p->linesize[0], 0, 0, 2, ac); | 447 | decode_plane(f, sc, &gb, p->data[0] + ps*x + y*p->linesize[0] , width, height, p->linesize[0], 0, 0, 2, ac); |
| 448 | decode_plane(f, sc, &gb, p->data[0] + ps*x + y*p->linesize[0] + (ps>>1), width, height, p->linesize[0], 1, 1, 2, ac); | 448 | decode_plane(f, sc, &gb, p->data[0] + ps*x + y*p->linesize[0] + (ps>>1), width, height, p->linesize[0], 1, 1, 2, ac); |
| 449 | } else if (f->use32bit) { | 449 | } else if (f->use32bit) { |
| 450 | uint8_t *planes[4] = { p->data[0] + ps * x + y * p->linesize[0], | 450 | uint8_t *planes[4] = { p->data[0] + ps * x + y * p->linesize[0] }; |
| 451 | p->data[1] + ps * x + y * p->linesize[1], | 451 | if (f->chroma_planes) { |
| 452 | p->data[2] + ps * x + y * p->linesize[2] }; | 452 | planes[1] = p->data[1] + ps * x + y * p->linesize[1]; |
| 453 | planes[2] = p->data[2] + ps * x + y * p->linesize[2]; | ||
| 454 | } | ||
| 453 | if (f->transparency) | 455 | if (f->transparency) |
| 454 | planes[3] = p->data[3] + ps * x + y * p->linesize[3]; | 456 | planes[3] = p->data[3] + ps * x + y * p->linesize[3]; |
| 455 | decode_rgb_frame32(f, sc, &gb, planes, width, height, p->linesize); | 457 | decode_rgb_frame32(f, sc, &gb, planes, width, height, p->linesize); |
| 456 | } else { | 458 | } else { |
| 457 | uint8_t *planes[4] = { p->data[0] + ps * x + y * p->linesize[0], | 459 | uint8_t *planes[4] = { p->data[0] + ps * x + y * p->linesize[0] }; |
| 458 | p->data[1] + ps * x + y * p->linesize[1], | 460 | if (f->chroma_planes) { |
| 459 | p->data[2] + ps * x + y * p->linesize[2] }; | 461 | planes[1] = p->data[1] + ps * x + y * p->linesize[1]; |
| 462 | planes[2] = p->data[2] + ps * x + y * p->linesize[2]; | ||
| 463 | } | ||
| 460 | if (f->transparency) | 464 | if (f->transparency) |
| 461 | planes[3] = p->data[3] + ps * x + y * p->linesize[3]; | 465 | planes[3] = p->data[3] + ps * x + y * p->linesize[3]; |
| 462 | decode_rgb_frame(f, sc, &gb, planes, width, height, p->linesize); | 466 | decode_rgb_frame(f, sc, &gb, planes, width, height, p->linesize); |