avcodec/mpegvideoenc: Remove ineffective options

This commit removes the ineffective FF_MPV_DEPRECATED_ options,
namely mpeg_quant (this is only an option for MPEG-4), a53cc
(this is only an option for MPEG-2), force_duplicated_matrix
(applies only to MJPEG) and b_strategy, b_sensitivity and brd_scale
(these options only make sense for encoders supporting B-frames,
which currently means the MPEG-1/2 and MPEG-4 encoders).
Given that these options never changed the outcome of encoding,
they are removed at once.

Notice that the options for the encoders for which it made sense
are not affected by this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-02-17 09:02:27 +01:00
parent de640d2b53
commit d587b1c323
9 changed files with 3 additions and 53 deletions

View File

@ -886,12 +886,6 @@ static const AVOption h263_options[] = {
{ "mb_info", "emit macroblock info for RFC 2190 packetization, the parameter value is the maximum payload size", OFFSET(mb_info), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
FF_MPV_COMMON_OPTS
FF_MPV_COMMON_MOTION_EST_OPTS
#if FF_API_MPEGVIDEO_OPTS
FF_MPV_DEPRECATED_MPEG_QUANT_OPT
FF_MPV_DEPRECATED_A53_CC_OPT
FF_MPV_DEPRECATED_MATRIX_OPT
FF_MPV_DEPRECATED_BFRAME_OPTS
#endif
{ NULL },
};
@ -923,12 +917,6 @@ static const AVOption h263p_options[] = {
{ "structured_slices", "Write slice start position at every GOB header instead of just GOB number.", OFFSET(h263_slice_structured), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE},
FF_MPV_COMMON_OPTS
FF_MPV_COMMON_MOTION_EST_OPTS
#if FF_API_MPEGVIDEO_OPTS
FF_MPV_DEPRECATED_MPEG_QUANT_OPT
FF_MPV_DEPRECATED_A53_CC_OPT
FF_MPV_DEPRECATED_MATRIX_OPT
FF_MPV_DEPRECATED_BFRAME_OPTS
#endif
{ NULL },
};
static const AVClass h263p_class = {

View File

@ -637,11 +637,6 @@ FF_MPV_COMMON_OPTS
{ "default", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = HUFFMAN_TABLE_DEFAULT }, INT_MIN, INT_MAX, VE, "huffman" },
{ "optimal", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = HUFFMAN_TABLE_OPTIMAL }, INT_MIN, INT_MAX, VE, "huffman" },
{ "force_duplicated_matrix", "Always write luma and chroma matrix for mjpeg, useful for rtp streaming.", OFFSET(force_duplicated_matrix), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, VE },
#if FF_API_MPEGVIDEO_OPTS
FF_MPV_DEPRECATED_MPEG_QUANT_OPT
FF_MPV_DEPRECATED_A53_CC_OPT
FF_MPV_DEPRECATED_BFRAME_OPTS
#endif
{ NULL},
};

View File

@ -1142,6 +1142,7 @@ av_cold void ff_mpeg1_encode_init(MpegEncContext *s)
} else {
s->min_qcoeff = -2047;
s->max_qcoeff = 2047;
s->mpeg_quant = 1;
}
if (s->intra_vlc_format) {
s->intra_ac_vlc_length =
@ -1173,11 +1174,6 @@ static const AVOption mpeg1_options[] = {
COMMON_OPTS
FF_MPV_COMMON_OPTS
FF_MPV_COMMON_MOTION_EST_OPTS
#if FF_API_MPEGVIDEO_OPTS
FF_MPV_DEPRECATED_MPEG_QUANT_OPT
FF_MPV_DEPRECATED_A53_CC_OPT
FF_MPV_DEPRECATED_MATRIX_OPT
#endif
{ NULL },
};
@ -1207,11 +1203,6 @@ static const AVOption mpeg2_options[] = {
#undef LEVEL
FF_MPV_COMMON_OPTS
FF_MPV_COMMON_MOTION_EST_OPTS
#if FF_API_MPEGVIDEO_OPTS
{ "mpeg_quant", "Deprecated, does nothing", FF_MPV_OFFSET(mpeg_quant),
AV_OPT_TYPE_INT, {.i64 = 1 }, 0, 1, VE | AV_OPT_FLAG_DEPRECATED },
FF_MPV_DEPRECATED_MATRIX_OPT
#endif
FF_MPEG2_PROFILE_OPTS
{ NULL },
};

View File

@ -1380,10 +1380,6 @@ static const AVOption options[] = {
FF_MPV_COMMON_BFRAME_OPTS
FF_MPV_COMMON_OPTS
FF_MPV_COMMON_MOTION_EST_OPTS
#if FF_API_MPEGVIDEO_OPTS
FF_MPV_DEPRECATED_A53_CC_OPT
FF_MPV_DEPRECATED_MATRIX_OPT
#endif
FF_MPEG4_PROFILE_OPTS
{ NULL },
};

View File

@ -537,7 +537,7 @@ typedef struct MpegEncContext {
int intra_penalty;
#if FF_API_MPEGVIDEO_OPTS || FF_API_MJPEG_PRED
#if FF_API_MJPEG_PRED
int dummy; ///< used as target for deprecated options
#endif
} MpegEncContext;

View File

@ -95,12 +95,6 @@ static uint8_t default_fcode_tab[MAX_MV * 2 + 1];
static const AVOption mpv_generic_options[] = {
FF_MPV_COMMON_OPTS
FF_MPV_COMMON_MOTION_EST_OPTS
#if FF_API_MPEGVIDEO_OPTS
FF_MPV_DEPRECATED_MPEG_QUANT_OPT
FF_MPV_DEPRECATED_A53_CC_OPT
FF_MPV_DEPRECATED_MATRIX_OPT
FF_MPV_DEPRECATED_BFRAME_OPTS
#endif
{ NULL },
};

View File

@ -114,19 +114,6 @@ FF_MPV_OPT_CMP_FUNC, \
{"mepre", "pre motion estimation", FF_MPV_OFFSET(me_pre), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \
{"intra_penalty", "Penalty for intra blocks in block decision", FF_MPV_OFFSET(intra_penalty), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX/2, FF_MPV_OPT_FLAGS }, \
#if FF_API_MPEGVIDEO_OPTS
#define FF_MPV_DEPRECATED_MPEG_QUANT_OPT \
{ "mpeg_quant", "Deprecated, does nothing", FF_MPV_OFFSET(mpeg_quant), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 0, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED },
#define FF_MPV_DEPRECATED_A53_CC_OPT \
{ "a53cc", "Deprecated, does nothing", FF_MPV_OFFSET(dummy), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED },
#define FF_MPV_DEPRECATED_MATRIX_OPT \
{ "force_duplicated_matrix", "Deprecated, does nothing", FF_MPV_OFFSET(dummy), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED },
#define FF_MPV_DEPRECATED_BFRAME_OPTS \
{ "b_strategy", "Deprecated, does nothing", FF_MPV_OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED }, \
{ "b_sensitivity", "Deprecated, does nothing", FF_MPV_OFFSET(b_sensitivity), AV_OPT_TYPE_INT, { .i64 = 40 }, 1, INT_MAX, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED }, \
{ "brd_scale", "Deprecated, does nothing", FF_MPV_OFFSET(brd_scale), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 3, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED },
#endif
extern const AVClass ff_mpv_enc_class;
int ff_mpv_encode_init(AVCodecContext *avctx);

View File

@ -29,7 +29,7 @@
#include "version_major.h"
#define LIBAVCODEC_VERSION_MINOR 30
#define LIBAVCODEC_VERSION_MINOR 31
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \

View File

@ -46,7 +46,6 @@
#define FF_API_AUTO_THREADS (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_MPEGVIDEO_OPTS (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_FLAG_TRUNCATED (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_SUB_TEXT_FORMAT (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_MJPEG_PRED (LIBAVCODEC_VERSION_MAJOR < 60)