diff options
author | Clément Bœsch <u@pkh.me> | 2015-11-21 21:28:31 +0100 |
---|---|---|
committer | Clément Bœsch <clement@stupeflix.com> | 2015-12-04 15:44:45 +0100 |
commit | 60532348d2544a6e32e84a2954b14170208d642d (patch) | |
tree | 4b78d5d0fe70b816861132db6f0b5377d45edec3 /libavcodec/ratecontrol.c | |
parent | 010caed261ac60671411f2413a50adc9ca67fa0c (diff) | |
download | ffmpeg-60532348d2544a6e32e84a2954b14170208d642d.tar.gz |
avcodec/mpegvideo: use constants for rc_strategy
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r-- | libavcodec/ratecontrol.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index e96550cc69..6c2b4af174 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -233,8 +233,12 @@ FF_ENABLE_DEPRECATION_WARNINGS 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 == 1) { + 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 @@ -314,7 +318,7 @@ av_cold void ff_rate_control_uninit(MpegEncContext *s) av_freep(&rcc->entry); #if CONFIG_LIBXVID - if ((s->avctx->flags & AV_CODEC_FLAG_PASS2) && s->rc_strategy == 1) + if ((s->avctx->flags & AV_CODEC_FLAG_PASS2) && s->rc_strategy == MPV_RC_STRATEGY_XVID) ff_xvid_rate_control_uninit(s); #endif } @@ -767,7 +771,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) emms_c(); #if CONFIG_LIBXVID - if ((s->avctx->flags & AV_CODEC_FLAG_PASS2) && s->rc_strategy == 1) + 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 |