[FFmpeg-cvslog] Merge commit '72dc7ddd18fe54ee68aec71590c3202ad009a8fc'
James Almer
git at videolan.org
Mon Oct 23 21:52:23 EEST 2017
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Oct 23 15:50:46 2017 -0300| [400ecd8e4059e0d6c587915bca5e7e11858cca33] | committer: James Almer
Merge commit '72dc7ddd18fe54ee68aec71590c3202ad009a8fc'
* commit '72dc7ddd18fe54ee68aec71590c3202ad009a8fc':
lavc: Drop deprecated error rate option
Merged-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=400ecd8e4059e0d6c587915bca5e7e11858cca33
---
libavcodec/avcodec.h | 9 ---------
libavcodec/mpegvideo_enc.c | 7 -------
libavcodec/options_table.h | 3 ---
libavcodec/version.h | 3 ---
4 files changed, 22 deletions(-)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 9d2127b21d..8b32ed7e77 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3336,15 +3336,6 @@ typedef struct AVCodecContext {
uint8_t *subtitle_header;
int subtitle_header_size;
-#if FF_API_ERROR_RATE
- /**
- * @deprecated use the 'error_rate' private AVOption of the mpegvideo
- * encoders
- */
- attribute_deprecated
- int error_rate;
-#endif
-
#if FF_API_VBV_DELAY
/**
* VBV delay coded in the last frame (in periods of a 27 MHz clock).
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 5765ef339f..68e1996687 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1069,13 +1069,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
return ret;
}
-#if FF_API_ERROR_RATE
- FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->error_rate)
- s->error_rate = avctx->error_rate;
- FF_ENABLE_DEPRECATION_WARNINGS;
-#endif
-
#if FF_API_NORMALIZE_AQP
FF_DISABLE_DEPRECATION_WARNINGS
if (avctx->flags & CODEC_FLAG_NORMALIZE_AQP)
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 6e90c0d77c..68dce2a930 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -348,9 +348,6 @@ static const AVOption avcodec_options[] = {
#endif
{"rc_init_occupancy", "number of bits which should be loaded into the rc buffer before decoding starts", OFFSET(rc_initial_buffer_occupancy), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
{"flags2", NULL, OFFSET(flags2), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT}, 0, UINT_MAX, V|A|E|D, "flags2"},
-#if FF_API_ERROR_RATE
-{"error", NULL, OFFSET(error_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
-#endif
{"threads", "set the number of threads", OFFSET(thread_count), AV_OPT_TYPE_INT, {.i64 = 1 }, 0, INT_MAX, V|A|E|D, "threads"},
{"auto", "autodetect a suitable number of threads to use", 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, INT_MIN, INT_MAX, V|E|D, "threads"},
#if FF_API_MPV_OPT
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 3c9356d8ce..b0a90b8d19 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -57,9 +57,6 @@
#ifndef FF_API_DEBUG_MV
#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
-#ifndef FF_API_ERROR_RATE
-#define FF_API_ERROR_RATE (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
#ifndef FF_API_QSCALE_TYPE
#define FF_API_QSCALE_TYPE (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
======================================================================
diff --cc libavcodec/mpegvideo_enc.c
index 5765ef339f,4d72c01ec9..68e1996687
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@@ -1053,29 -874,6 +1053,22 @@@ FF_ENABLE_DEPRECATION_WARNING
if (ff_rate_control_init(s) < 0)
return -1;
+#if FF_API_RC_STRATEGY
+ av_assert0(MPV_RC_STRATEGY_XVID == FF_RC_STRATEGY_XVID);
+#endif
+
+ if ((s->avctx->flags & AV_CODEC_FLAG_PASS2) && s->rc_strategy == MPV_RC_STRATEGY_XVID) {
+#if CONFIG_LIBXVID
+ ret = ff_xvid_rate_control_init(s);
+#else
+ ret = AVERROR(ENOSYS);
+ av_log(s->avctx, AV_LOG_ERROR,
+ "Xvid ratecontrol requires libavcodec compiled with Xvid support.\n");
+#endif
+ if (ret < 0)
+ return ret;
+ }
+
- #if FF_API_ERROR_RATE
- FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->error_rate)
- s->error_rate = avctx->error_rate;
- FF_ENABLE_DEPRECATION_WARNINGS;
- #endif
-
#if FF_API_NORMALIZE_AQP
FF_DISABLE_DEPRECATION_WARNINGS
if (avctx->flags & CODEC_FLAG_NORMALIZE_AQP)
diff --cc libavcodec/options_table.h
index 6e90c0d77c,7531af0471..68dce2a930
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@@ -348,10 -313,7 +348,7 @@@ static const AVOption avcodec_options[
#endif
{"rc_init_occupancy", "number of bits which should be loaded into the rc buffer before decoding starts", OFFSET(rc_initial_buffer_occupancy), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
{"flags2", NULL, OFFSET(flags2), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT}, 0, UINT_MAX, V|A|E|D, "flags2"},
- #if FF_API_ERROR_RATE
- {"error", NULL, OFFSET(error_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
- #endif
-{"threads", NULL, OFFSET(thread_count), AV_OPT_TYPE_INT, {.i64 = 1 }, 0, INT_MAX, V|E|D, "threads"},
+{"threads", "set the number of threads", OFFSET(thread_count), AV_OPT_TYPE_INT, {.i64 = 1 }, 0, INT_MAX, V|A|E|D, "threads"},
{"auto", "autodetect a suitable number of threads to use", 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, INT_MIN, INT_MAX, V|E|D, "threads"},
#if FF_API_MPV_OPT
{"me_threshold", "motion estimation threshold", OFFSET(me_threshold), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
diff --cc libavcodec/version.h
index 3c9356d8ce,cfed83160f..b0a90b8d19
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@@ -45,21 -45,8 +45,18 @@@
* FF_API_* defines may be placed below to indicate public API that will be
* dropped at a future version bump. The defines themselves are not part of
* the public API and may change, break or disappear at any time.
+ *
+ * @note, when bumping the major version it is recommended to manually
+ * disable each FF_API_* in its own commit instead of disabling them all
+ * at once through the bump. This improves the git bisect-ability of the change.
*/
+#ifndef FF_API_LOWRES
+#define FF_API_LOWRES (LIBAVCODEC_VERSION_MAJOR < 59)
+#endif
+#ifndef FF_API_DEBUG_MV
+#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 58)
+#endif
- #ifndef FF_API_ERROR_RATE
- #define FF_API_ERROR_RATE (LIBAVCODEC_VERSION_MAJOR < 58)
- #endif
#ifndef FF_API_QSCALE_TYPE
#define FF_API_QSCALE_TYPE (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
More information about the ffmpeg-cvslog
mailing list