From bf79148cbb8719314e5ea53c9597f8cd35f9c0b5 Mon Sep 17 00:00:00 2001 From: averne Date: Thu, 31 Jul 2025 19:39:31 +0200 Subject: [PATCH] avcodec/proresenc_anatoliy: Remove support for grayscale flag This results in the encoder producing empty scans for chroma planes, which is illegal according to the ProRes SMPTE document. --- libavcodec/proresenc_anatoliy.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index 4fc40abaac..1d40410199 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -397,14 +397,12 @@ static av_always_inline unsigned encode_slice_data(AVCodecContext *avctx, *y_data_size = encode_slice_plane(blocks_y, mb_count, buf, data_size, ctx->qmat_luma[qp - 1], 0, ctx->scantable); - if (!(avctx->flags & AV_CODEC_FLAG_GRAY)) { - *u_data_size = encode_slice_plane(blocks_u, mb_count, buf + *y_data_size, data_size - *y_data_size, - ctx->qmat_chroma[qp - 1], ctx->is_422, ctx->scantable); + *u_data_size = encode_slice_plane(blocks_u, mb_count, buf + *y_data_size, data_size - *y_data_size, + ctx->qmat_chroma[qp - 1], ctx->is_422, ctx->scantable); - *v_data_size = encode_slice_plane(blocks_v, mb_count, buf + *y_data_size + *u_data_size, - data_size - *y_data_size - *u_data_size, - ctx->qmat_chroma[qp - 1], ctx->is_422, ctx->scantable); - } + *v_data_size = encode_slice_plane(blocks_v, mb_count, buf + *y_data_size + *u_data_size, + data_size - *y_data_size - *u_data_size, + ctx->qmat_chroma[qp - 1], ctx->is_422, ctx->scantable); return *y_data_size + *u_data_size + *v_data_size; }