diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-04-27 21:13:25 +0300 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-05-22 17:34:39 +0300 |
commit | 848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42 (patch) | |
tree | e02dd312ec6d21fb183d1fda8172758156594e05 /libavcodec/ratecontrol.c | |
parent | 29216d7fd14d1cec16821867d17c90b5c49e8c07 (diff) |
mpegvideo: Drop flags and flags2
They are just duplicates of AVCodecContext members so use those instead.
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r-- | libavcodec/ratecontrol.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index aae75707f4..620c854ad4 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -150,7 +150,7 @@ av_cold int ff_rate_control_init(MpegEncContext *s) } rcc->buffer_index = s->avctx->rc_initial_buffer_occupancy; - if (s->flags & CODEC_FLAG_PASS2) { + if (s->avctx->flags & CODEC_FLAG_PASS2) { int i; char *p; @@ -214,7 +214,7 @@ av_cold int ff_rate_control_init(MpegEncContext *s) return -1; // FIXME maybe move to end - if ((s->flags & CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID) { + if ((s->avctx->flags & CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID) { #if CONFIG_LIBXVID return ff_xvid_rate_control_init(s); #else @@ -225,7 +225,7 @@ av_cold int ff_rate_control_init(MpegEncContext *s) } } - if (!(s->flags & CODEC_FLAG_PASS2)) { + if (!(s->avctx->flags & CODEC_FLAG_PASS2)) { rcc->short_term_qsum = 0.001; rcc->short_term_qcount = 0.001; @@ -294,7 +294,7 @@ av_cold void ff_rate_control_uninit(MpegEncContext *s) av_freep(&rcc->entry); #if CONFIG_LIBXVID - if ((s->flags & CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID) + if ((s->avctx->flags & CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID) ff_xvid_rate_control_uninit(s); #endif } @@ -744,7 +744,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) emms_c(); #if CONFIG_LIBXVID - if ((s->flags & CODEC_FLAG_PASS2) && + if ((s->avctx->flags & CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID) return ff_xvid_rate_estimate_qscale(s, dry_run); #endif @@ -761,7 +761,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) sqrt(last_var), s->frame_bits); } - if (s->flags & CODEC_FLAG_PASS2) { + if (s->avctx->flags & CODEC_FLAG_PASS2) { assert(picture_number >= 0); assert(picture_number < rcc->num_entries); rce = &rcc->entry[picture_number]; @@ -792,7 +792,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) var = pict_type == AV_PICTURE_TYPE_I ? pic->mb_var_sum : pic->mc_mb_var_sum; short_term_q = 0; /* avoid warning */ - if (s->flags & CODEC_FLAG_PASS2) { + if (s->avctx->flags & CODEC_FLAG_PASS2) { if (pict_type != AV_PICTURE_TYPE_I) assert(pict_type == rce->new_pict_type); |