summaryrefslogtreecommitdiff
path: root/libavcodec/ratecontrol.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2017-02-01 14:21:36 +0100
committerClément Bœsch <u@pkh.me>2017-02-01 14:21:36 +0100
commit566bfd59c963938e183d523be9216b3f95ad8a09 (patch)
tree1c22e7de6792dbe4477340cbc2fc5722fad2153b /libavcodec/ratecontrol.c
parente4d65434633b67fd03d379fe9d0ab9dc97d767dc (diff)
parentd639dcdae022130078c9c84b7b691c5e9694786c (diff)
downloadffmpeg-566bfd59c963938e183d523be9216b3f95ad8a09.tar.gz
Merge commit 'd639dcdae022130078c9c84b7b691c5e9694786c'
* commit 'd639dcdae022130078c9c84b7b691c5e9694786c': ratecontrol: Move Xvid-related functions to the place they are actually used Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r--libavcodec/ratecontrol.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 507dcbb33a..b731f72a14 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -136,13 +136,6 @@ av_cold int ff_rate_control_init(MpegEncContext *s)
return res;
}
-#if FF_API_RC_STRATEGY
-FF_DISABLE_DEPRECATION_WARNINGS
- if (!s->rc_strategy)
- s->rc_strategy = s->avctx->rc_strategy;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
for (i = 0; i < 5; i++) {
rcc->pred[i].coeff = FF_QP2LAMBDA * 7.0;
rcc->pred[i].count = 1.0;
@@ -226,21 +219,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
ff_rate_control_uninit(s);
return -1;
}
-
-#if FF_API_RC_STRATEGY
- av_assert0(MPV_RC_STRATEGY_XVID == FF_RC_STRATEGY_XVID);
-#endif
-
- // FIXME maybe move to end
- if ((s->avctx->flags & AV_CODEC_FLAG_PASS2) && s->rc_strategy == MPV_RC_STRATEGY_XVID) {
-#if CONFIG_LIBXVID
- return ff_xvid_rate_control_init(s);
-#else
- av_log(s->avctx, AV_LOG_ERROR,
- "Xvid ratecontrol requires libavcodec compiled with Xvid support.\n");
- return -1;
-#endif
- }
}
if (!(s->avctx->flags & AV_CODEC_FLAG_PASS2)) {
@@ -310,11 +288,6 @@ av_cold void ff_rate_control_uninit(MpegEncContext *s)
av_expr_free(rcc->rc_eq_eval);
av_freep(&rcc->entry);
-
-#if CONFIG_LIBXVID
- if ((s->avctx->flags & AV_CODEC_FLAG_PASS2) && s->rc_strategy == MPV_RC_STRATEGY_XVID)
- ff_xvid_rate_control_uninit(s);
-#endif
}
int ff_vbv_update(MpegEncContext *s, int frame_size)
@@ -758,11 +731,6 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
Picture * const pic = &s->current_picture;
emms_c();
-#if CONFIG_LIBXVID
- if ((s->avctx->flags & AV_CODEC_FLAG_PASS2) && s->rc_strategy == MPV_RC_STRATEGY_XVID)
- return ff_xvid_rate_estimate_qscale(s, dry_run);
-#endif
-
get_qminmax(&qmin, &qmax, s, pict_type);
fps = get_fps(s->avctx);