]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit '72dc7ddd18fe54ee68aec71590c3202ad009a8fc'
authorJames Almer <jamrial@gmail.com>
Mon, 23 Oct 2017 18:50:46 +0000 (15:50 -0300)
committerJames Almer <jamrial@gmail.com>
Mon, 23 Oct 2017 18:50:46 +0000 (15:50 -0300)
* commit '72dc7ddd18fe54ee68aec71590c3202ad009a8fc':
  lavc: Drop deprecated error rate option

Merged-by: James Almer <jamrial@gmail.com>
1  2 
libavcodec/avcodec.h
libavcodec/mpegvideo_enc.c
libavcodec/options_table.h
libavcodec/version.h

Simple merge
index 5765ef339f5546933e859d6c609d55c69807f088,4d72c01ec9e68c3062ca8d6f44d5b4708503d405..68e19966873a9393e560e6d73cdc524de7604541
@@@ -1053,29 -874,6 +1053,22 @@@ FF_ENABLE_DEPRECATION_WARNING
      if (ff_rate_control_init(s) < 0)
          return -1;
  
- #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_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_NORMALIZE_AQP
      FF_DISABLE_DEPRECATION_WARNINGS
      if (avctx->flags & CODEC_FLAG_NORMALIZE_AQP)
index 6e90c0d77c5c6d8b88db4831ad2649cd3204d31f,7531af0471c53a16fa2344366c1a428227829011..68dce2a9302732bf1a46b82119aef799ea220e6e
@@@ -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},
index 3c9356d8ce1b557b4b40a4eb517991b91f7c05ef,cfed83160f473ea280b751b1707ef83875739a3e..b0a90b8d195fbe96207397700c25828637669ef3
   * 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_ERROR_RATE
- #define FF_API_ERROR_RATE        (LIBAVCODEC_VERSION_MAJOR < 58)
- #endif
 +#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_QSCALE_TYPE
  #define FF_API_QSCALE_TYPE       (LIBAVCODEC_VERSION_MAJOR < 58)
  #endif