From 42c895ef5cf93e755e338aa01be536ce2bd9106c Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Tue, 6 Apr 2021 17:20:57 +0200 Subject: avcodec/mpegvideo: Deprecate mpeg_quant option for codecs != MPEG-4 mpeg_quant may only be set for MPEG-4 and MPEG-2, yet for the latter it is no option as the code acts as if it were always set. So deprecate the option for all codecs for which it makes no sense. Furthermore, given that the code already errors out if the option is set for a codec that doesn't support it we can restrict the range of the option for all these codecs without breaking something. This means that the checks for whether mpeg_quant is set for these codecs can be removed as soon as AVCodecContext.mpeg_quant is removed. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg4videoenc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavcodec/mpeg4videoenc.c') diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index 2bf65305ad..e2792e1161 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -1375,6 +1375,8 @@ void ff_mpeg4_encode_video_packet_header(MpegEncContext *s) static const AVOption options[] = { { "data_partitioning", "Use data partitioning.", OFFSET(data_partitioning), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, { "alternate_scan", "Enable alternate scantable.", OFFSET(alternate_scan), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, + { "mpeg_quant", "Use MPEG quantizers instead of H.263", + OFFSET(mpeg_quant), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, VE }, FF_MPV_COMMON_OPTS FF_MPEG4_PROFILE_OPTS { NULL }, -- cgit v1.2.3