This results in the encoder producing empty scans for chroma planes, which is illegal according to the ProRes SMPTE document.
Unified · Split
| @@ -397,14 +397,12 @@ static av_always_inline unsigned encode_slice_data(AVCodecContext *avctx, · 396 unmodified lines | |||
| 397 | *y_data_size = encode_slice_plane(blocks_y, mb_count, | 397 | *y_data_size = encode_slice_plane(blocks_y, mb_count, |
| 398 | buf, data_size, ctx->qmat_luma[qp - 1], 0, ctx->scantable); | 398 | buf, data_size, ctx->qmat_luma[qp - 1], 0, ctx->scantable); |
| 399 | 399 | ||
| 400 | if (!(avctx->flags & AV_CODEC_FLAG_GRAY)) { | 400 | *u_data_size = encode_slice_plane(blocks_u, mb_count, buf + *y_data_size, data_size - *y_data_size, |
| 401 | *u_data_size = encode_slice_plane(blocks_u, mb_count, buf + *y_data_size, data_size - *y_data_size, | 401 | ctx->qmat_chroma[qp - 1], ctx->is_422, ctx->scantable); |
| 402 | ctx->qmat_chroma[qp - 1], ctx->is_422, ctx->scantable); | ||
| 403 | 402 | ||
| 404 | *v_data_size = encode_slice_plane(blocks_v, mb_count, buf + *y_data_size + *u_data_size, | 403 | *v_data_size = encode_slice_plane(blocks_v, mb_count, buf + *y_data_size + *u_data_size, |
| 405 | data_size - *y_data_size - *u_data_size, | 404 | data_size - *y_data_size - *u_data_size, |
| 406 | ctx->qmat_chroma[qp - 1], ctx->is_422, ctx->scantable); | 405 | ctx->qmat_chroma[qp - 1], ctx->is_422, ctx->scantable); |
| 407 | } | ||
| 408 | 406 | ||
| 409 | return *y_data_size + *u_data_size + *v_data_size; | 407 | return *y_data_size + *u_data_size + *v_data_size; |
| 410 | } | 408 | } |