1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

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.
This commit is contained in:
averne
2025-07-31 19:39:31 +02:00
committed by Lynne
parent a49108fd29
commit bf79148cbb

View File

@ -397,14 +397,12 @@ static av_always_inline unsigned encode_slice_data(AVCodecContext *avctx,
*y_data_size = encode_slice_plane(blocks_y, mb_count, *y_data_size = encode_slice_plane(blocks_y, mb_count,
buf, data_size, ctx->qmat_luma[qp - 1], 0, ctx->scantable); 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,
*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);
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, *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, data_size - *y_data_size - *u_data_size,
ctx->qmat_chroma[qp - 1], ctx->is_422, ctx->scantable); ctx->qmat_chroma[qp - 1], ctx->is_422, ctx->scantable);
}
return *y_data_size + *u_data_size + *v_data_size; return *y_data_size + *u_data_size + *v_data_size;
} }