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;
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
}
}
- 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;
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
}
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
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");
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);