aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-01 16:56:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-01 16:56:40 +0200
commite40ae8cc00ae7e485a64a5b3b40b73dbfd32b631 (patch)
tree4d1174389c3fc1fb3d8e1dafd0e6b7ba6fc4655f
parent185164398763b76729d6169bea35d08c48d1d32f (diff)
parent6484149158b6fc6d13d2b2ef84cb26a2d3275400 (diff)
downloadffmpeg-e40ae8cc00ae7e485a64a5b3b40b73dbfd32b631.tar.gz
Merge commit '6484149158b6fc6d13d2b2ef84cb26a2d3275400'
* commit '6484149158b6fc6d13d2b2ef84cb26a2d3275400': lavc: make the xvid-specific "gmc" flag a private option of libxvid Conflicts: libavcodec/libxvid.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--doc/APIchanges4
-rw-r--r--libavcodec/avcodec.h5
-rw-r--r--libavcodec/libxvid.c9
-rw-r--r--libavcodec/options_table.h2
-rw-r--r--libavcodec/version.h5
5 files changed, 23 insertions, 2 deletions
diff --git a/doc/APIchanges b/doc/APIchanges
index e4586ffd1e..bbb1331e6f 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,10 @@ libavutil: 2012-10-22
API changes, most recent first:
+2014-04-xx - xxxxxxx - lavc 55.50.2 - avcodec.h
+ Deprecate CODEC_FLAG_GMC. It is replaced by the "gmc" private option of the
+ libxvid encoder.
+
2014-04-xx - xxxxxxx - lavc 55.50.1 - avcodec.h
Deprecate CODEC_FLAG_NORMALIZE_AQP. It is replaced by the flag "naq" in the
"mpv_flags" private option of the mpegvideo encoders.
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 15e93ae52b..883f6cdf1c 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -745,7 +745,12 @@ typedef struct RcOverride{
#define CODEC_FLAG_4MV 0x0004 ///< 4 MV per MB allowed / advanced prediction for H.263.
#define CODEC_FLAG_OUTPUT_CORRUPT 0x0008 ///< Output even those frames that might be corrupted
#define CODEC_FLAG_QPEL 0x0010 ///< Use qpel MC.
+#if FF_API_GMC
+/**
+ * @deprecated use the "gmc" private option of the libxvid encoder
+ */
#define CODEC_FLAG_GMC 0x0020 ///< Use GMC.
+#endif
#define CODEC_FLAG_MV0 0x0040 ///< Always try a MB with MV=<0,0>.
#if FF_API_INPUT_PRESERVED
/**
diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c
index 44c8fc3e5d..c76a5cda2f 100644
--- a/libavcodec/libxvid.c
+++ b/libavcodec/libxvid.c
@@ -67,6 +67,7 @@ struct xvid_context {
int variance_aq; /**< Variance adaptive quantization */
int ssim; /**< SSIM information display mode */
int ssim_acc; /**< SSIM accuracy. 0: accurate. 4: fast. */
+ int gmc;
};
/**
@@ -422,8 +423,13 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) {
}
/* Bring in VOL flags from ffmpeg command-line */
+#if FF_API_GMC
+ if (avctx->flags & CODEC_FLAG_GMC)
+ x->gmc = 1;
+#endif
+
x->vol_flags = 0;
- if( xvid_flags & CODEC_FLAG_GMC ) {
+ if (x->gmc) {
x->vol_flags |= XVID_VOL_GMC;
x->me_flags |= XVID_ME_GME_REFINE;
}
@@ -815,6 +821,7 @@ static const AVOption options[] = {
{ "avg", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "ssim" },
{ "frame", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 2 }, INT_MIN, INT_MAX, VE, "ssim" },
{ "ssim_acc", "SSIM accuracy", OFFSET(ssim_acc), AV_OPT_TYPE_INT, { .i64 = 2 }, 0, 4, VE },
+ { "gmc", "use GMC", OFFSET(gmc), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
{ NULL },
};
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 8b4f54efd7..8d47828114 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -54,7 +54,9 @@ static const AVOption avcodec_options[] = {
{"qpel", "use 1/4-pel motion compensation", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_QPEL }, INT_MIN, INT_MAX, V|E, "flags"},
{"loop", "use loop filter", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_LOOP_FILTER }, INT_MIN, INT_MAX, V|E, "flags"},
{"qscale", "use fixed qscale", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_QSCALE }, INT_MIN, INT_MAX, 0, "flags"},
+#if FF_API_GMC
{"gmc", "use gmc", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_GMC }, INT_MIN, INT_MAX, V|E, "flags"},
+#endif
{"mv0", "always try a mb with mv=<0,0>", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_MV0 }, INT_MIN, INT_MAX, V|E, "flags"},
#if FF_API_INPUT_PRESERVED
{"input_preserved", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_INPUT_PRESERVED }, INT_MIN, INT_MAX, 0, "flags"},
diff --git a/libavcodec/version.h b/libavcodec/version.h
index b29cf08d95..a13d479026 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -30,7 +30,7 @@
#define LIBAVCODEC_VERSION_MAJOR 55
#define LIBAVCODEC_VERSION_MINOR 60
-#define LIBAVCODEC_VERSION_MICRO 101
+#define LIBAVCODEC_VERSION_MICRO 102
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
@@ -153,5 +153,8 @@
#ifndef FF_API_NORMALIZE_AQP
#define FF_API_NORMALIZE_AQP (LIBAVCODEC_VERSION_MAJOR < 57)
#endif
+#ifndef FF_API_GMC
+#define FF_API_GMC (LIBAVCODEC_VERSION_MAJOR < 57)
+#endif
#endif /* AVCODEC_VERSION_H */