aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/libxvid.c
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 /libavcodec/libxvid.c
parent185164398763b76729d6169bea35d08c48d1d32f (diff)
parent6484149158b6fc6d13d2b2ef84cb26a2d3275400 (diff)
downloadandroid_external_ffmpeg-e40ae8cc00ae7e485a64a5b3b40b73dbfd32b631.tar.gz
android_external_ffmpeg-e40ae8cc00ae7e485a64a5b3b40b73dbfd32b631.tar.bz2
android_external_ffmpeg-e40ae8cc00ae7e485a64a5b3b40b73dbfd32b631.zip
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>
Diffstat (limited to 'libavcodec/libxvid.c')
-rw-r--r--libavcodec/libxvid.c9
1 files changed, 8 insertions, 1 deletions
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 },
};