1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-07-16 22:42:38 +02:00

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 <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2021-04-06 17:20:57 +02:00
parent dff774042a
commit 42c895ef5c
6 changed files with 31 additions and 4 deletions

View File

@ -1152,6 +1152,9 @@ av_cold void ff_mpeg1_encode_init(MpegEncContext *s)
static const AVOption mpeg1_options[] = {
COMMON_OPTS
FF_MPV_COMMON_OPTS
#if FF_API_MPEGVIDEO_OPTS
FF_MPV_DEPRECATED_MPEG_QUANT_OPT
#endif
{ NULL },
};
@ -1179,6 +1182,10 @@ static const AVOption mpeg2_options[] = {
{ LEVEL("low", 10) },
#undef LEVEL
FF_MPV_COMMON_OPTS
#if FF_API_MPEGVIDEO_OPTS
{ "mpeg_quant", "Deprecated, does nothing", OFFSET(mpeg_quant),
AV_OPT_TYPE_INT, {.i64 = 1 }, 0, 1, VE | AV_OPT_FLAG_DEPRECATED },
#endif
FF_MPEG2_PROFILE_OPTS
{ NULL },
};