[FFmpeg-devel] [PATCH 40/41] avcodec/mpegvideo: Move dummy dst for depr. opts to MPVMainEncContext
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Sun Jan 30 08:27:48 EET 2022
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavcodec/mjpegenc.c | 2 +-
libavcodec/mpegvideo.h | 4 ----
libavcodec/mpegvideoenc.h | 8 ++++++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index a8efe72231..064562e6c5 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -631,7 +631,7 @@ static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
static const AVOption options[] = {
FF_MPV_COMMON_OPTS
#if FF_API_MJPEG_PRED
-{ "pred", "Deprecated, does nothing", FF_MPV_OFFSET(dummy), AV_OPT_TYPE_INT, { .i64 = 1 }, 1, 3, VE, "pred" },
+{ "pred", "Deprecated, does nothing", FF_MPV_MAIN_OFFSET(dummy), AV_OPT_TYPE_INT, { .i64 = 1 }, 1, 3, VE, "pred" },
{ "left", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "pred" },
{ "plane", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 2 }, INT_MIN, INT_MAX, VE, "pred" },
{ "median", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 3 }, INT_MIN, INT_MAX, VE, "pred" },
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 5c7654230a..bf71d6242b 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -485,10 +485,6 @@ typedef struct MPVContext {
int noise_reduction;
int intra_penalty;
-
-#if FF_API_MPEGVIDEO_OPTS || FF_API_MJPEG_PRED
- int dummy; ///< used as target for deprecated options
-#endif
} MPVContext;
typedef MPVContext MPVDecContext;
diff --git a/libavcodec/mpegvideoenc.h b/libavcodec/mpegvideoenc.h
index 662236c102..ad55448363 100644
--- a/libavcodec/mpegvideoenc.h
+++ b/libavcodec/mpegvideoenc.h
@@ -107,6 +107,10 @@ typedef struct MPVMainEncContext {
uint16_t q_inter_matrix16[32][2][64];
uint16_t q_intra_matrix16[32][2][64];
uint16_t q_chroma_intra_matrix16[32][2][64];
+
+#if FF_API_MPEGVIDEO_OPTS || FF_API_MJPEG_PRED
+ int dummy; ///< used as target for deprecated options
+#endif
} MPVMainEncContext;
/* mpegvideo_enc common options */
@@ -195,9 +199,9 @@ FF_MPV_OPT_CMP_FUNC, \
#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 },
+ { "a53cc", "Deprecated, does nothing", FF_MPV_MAIN_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 },
+ { "force_duplicated_matrix", "Deprecated, does nothing", FF_MPV_MAIN_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_MAIN_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_MAIN_OFFSET(b_sensitivity), AV_OPT_TYPE_INT, { .i64 = 40 }, 1, INT_MAX, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED }, \
--
2.32.0
More information about the ffmpeg-devel
mailing list