summaryrefslogtreecommitdiff
path: root/libavcodec/ratecontrol.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-22 20:12:51 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-22 20:24:41 +0200
commitd9b264bc73723ce538d72f28a4a8fb4f85af7eca (patch)
tree7a2f93dbd9adf87534c29c932ed157941a2c4af6 /libavcodec/ratecontrol.c
parent337aa17e61091500b95d6127c9ffd65d9086decb (diff)
parent848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42 (diff)
downloadffmpeg-d9b264bc73723ce538d72f28a4a8fb4f85af7eca.tar.gz
Merge commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42'
* commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42': mpegvideo: Drop flags and flags2 Conflicts: libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/ratecontrol.c libavcodec/vc1_block.c libavcodec/vc1_loopfilter.c libavcodec/vc1_mc.c libavcodec/vc1dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r--libavcodec/ratecontrol.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 178e193b70..4eb363013c 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -161,7 +161,7 @@ av_cold int ff_rate_control_init(MpegEncContext *s)
if (!rcc->buffer_index)
rcc->buffer_index = s->avctx->rc_buffer_size * 3 / 4;
- if (s->flags & CODEC_FLAG_PASS2) {
+ if (s->avctx->flags & CODEC_FLAG_PASS2) {
int i;
char *p;
@@ -227,7 +227,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
@@ -238,7 +238,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;
@@ -307,7 +307,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
}
@@ -760,7 +760,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
@@ -780,7 +780,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
s->frame_bits - s->stuffing_bits);
}
- if (s->flags & CODEC_FLAG_PASS2) {
+ if (s->avctx->flags & CODEC_FLAG_PASS2) {
av_assert0(picture_number >= 0);
if (picture_number >= rcc->num_entries) {
av_log(s, AV_LOG_ERROR, "Input is longer than 2-pass log file\n");
@@ -814,7 +814,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)
av_assert0(pict_type == rce->new_pict_type);