mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-02 05:56:46 +08:00
10l forgot #ifdef CONFIG_XVID
Originally committed as revision 4895 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -117,10 +117,11 @@ int ff_rate_control_init(MpegEncContext *s)
|
|||||||
|
|
||||||
p= next;
|
p= next;
|
||||||
}
|
}
|
||||||
|
#ifdef CONFIG_XVID
|
||||||
//FIXME maybe move to end
|
//FIXME maybe move to end
|
||||||
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID)
|
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID)
|
||||||
return ff_xvid_rate_control_init(s);
|
return ff_xvid_rate_control_init(s);
|
||||||
|
#endif
|
||||||
|
|
||||||
if(init_pass2(s) < 0) return -1;
|
if(init_pass2(s) < 0) return -1;
|
||||||
}
|
}
|
||||||
@ -187,8 +188,10 @@ void ff_rate_control_uninit(MpegEncContext *s)
|
|||||||
|
|
||||||
av_freep(&rcc->entry);
|
av_freep(&rcc->entry);
|
||||||
|
|
||||||
|
#ifdef CONFIG_XVID
|
||||||
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID)
|
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID)
|
||||||
ff_xvid_rate_control_uninit(s);
|
ff_xvid_rate_control_uninit(s);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline double qp2bits(RateControlEntry *rce, double qp){
|
static inline double qp2bits(RateControlEntry *rce, double qp){
|
||||||
@ -648,8 +651,10 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
|
|||||||
Picture * const pic= &s->current_picture;
|
Picture * const pic= &s->current_picture;
|
||||||
emms_c();
|
emms_c();
|
||||||
|
|
||||||
|
#ifdef CONFIG_XVID
|
||||||
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID)
|
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID)
|
||||||
return ff_xvid_rate_estimate_qscale(s, dry_run);
|
return ff_xvid_rate_estimate_qscale(s, dry_run);
|
||||||
|
#endif
|
||||||
|
|
||||||
get_qminmax(&qmin, &qmax, s, pict_type);
|
get_qminmax(&qmin, &qmax, s, pict_type);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user