aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-01 16:41:41 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-01 16:41:41 +0200
commitcac07d0e103656a2436ea04b700128ce436a4d06 (patch)
tree26ad63f72adfeb90f1f5857cb5c458cdd2d77ff1 /libavcodec
parentb7dd250b7545ece973bd4c92fd7f93ce042fa911 (diff)
parent5fccedaa67390ccddd6347c8e1c71b7664558bcd (diff)
downloadffmpeg-cac07d0e103656a2436ea04b700128ce436a4d06.tar.gz
Merge commit '5fccedaa67390ccddd6347c8e1c71b7664558bcd'
* commit '5fccedaa67390ccddd6347c8e1c71b7664558bcd': lavc: deprecate CODEC_FLAG_INPUT_PRESERVED Conflicts: doc/APIchanges Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avcodec.h7
-rw-r--r--libavcodec/mpegvideo_enc.c3
-rw-r--r--libavcodec/options_table.h2
-rw-r--r--libavcodec/version.h3
4 files changed, 10 insertions, 5 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index d3ad82edb4..d2028fa306 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -747,12 +747,13 @@ typedef struct RcOverride{
#define CODEC_FLAG_QPEL 0x0010 ///< Use qpel MC.
#define CODEC_FLAG_GMC 0x0020 ///< Use GMC.
#define CODEC_FLAG_MV0 0x0040 ///< Always try a MB with MV=<0,0>.
+#if FF_API_INPUT_PRESERVED
/**
- * The parent program guarantees that the input for B-frames containing
- * streams is not written to for at least s->max_b_frames+1 frames, if
- * this is not set the input will be copied.
+ * @deprecated passing reference-counted frames to the encoders replaces this
+ * flag
*/
#define CODEC_FLAG_INPUT_PRESERVED 0x0100
+#endif
#define CODEC_FLAG_PASS1 0x0200 ///< Use internal 2pass ratecontrol in first pass mode.
#define CODEC_FLAG_PASS2 0x0400 ///< Use internal 2pass ratecontrol in second pass mode.
#define CODEC_FLAG_GRAY 0x2000 ///< Only decode/encode grayscale.
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index cd5c19e1e3..38caf2da6e 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1217,8 +1217,7 @@ static int estimate_best_b_count(MpegEncContext *s)
c->width = s->width >> scale;
c->height = s->height >> scale;
- c->flags = CODEC_FLAG_QSCALE | CODEC_FLAG_PSNR |
- CODEC_FLAG_INPUT_PRESERVED;
+ c->flags = CODEC_FLAG_QSCALE | CODEC_FLAG_PSNR;
c->flags |= s->avctx->flags & CODEC_FLAG_QPEL;
c->mb_decision = s->avctx->mb_decision;
c->me_cmp = s->avctx->me_cmp;
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index efebd44d77..d4421ad45c 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -56,7 +56,9 @@ static const AVOption avcodec_options[] = {
{"qscale", "use fixed qscale", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_QSCALE }, INT_MIN, INT_MAX, 0, "flags"},
{"gmc", "use gmc", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_GMC }, INT_MIN, INT_MAX, V|E, "flags"},
{"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"},
+#endif
{"pass1", "use internal 2-pass ratecontrol in first pass mode", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_PASS1 }, INT_MIN, INT_MAX, 0, "flags"},
{"pass2", "use internal 2-pass ratecontrol in second pass mode", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_PASS2 }, INT_MIN, INT_MAX, 0, "flags"},
{"gray", "only decode/encode grayscale", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_GRAY }, INT_MIN, INT_MAX, V|E|D, "flags"},
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 44ec052198..290a0c4875 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -147,5 +147,8 @@
#ifndef FF_API_ARCH_SPARC
#define FF_API_ARCH_SPARC (LIBAVCODEC_VERSION_MAJOR < 56)
#endif
+#ifndef FF_API_INPUT_PRESERVED
+#define FF_API_INPUT_PRESERVED (LIBAVCODEC_VERSION_MAJOR < 57)
+#endif
#endif /* AVCODEC_VERSION_H */