Originally committed as revision 4766 to svn://svn.ffmpeg.org/ffmpeg/trunk
s->no_rounding ^= 1;
}
- if(s->flags & CODEC_FLAG_PASS2)
+ if(s->flags & CODEC_FLAG_PASS2){
estimate_qp(s, 1);
- else if(!(s->flags & CODEC_FLAG_QSCALE)){
+ ff_get_2pass_fcode(s);
+ }else if(!(s->flags & CODEC_FLAG_QSCALE)){
RateControlContext *rcc= &s->rc_context;
if(s->pict_type==B_TYPE)
double (**func2)(void *, double, double), char **func2_name,
void *opaque);
int ff_vbv_update(MpegEncContext *s, int frame_size);
-
+void ff_get_2pass_fcode(MpegEncContext *s);
#endif /* AVCODEC_MPEGVIDEO_H */
s->lambda_table[mb_xy]= intq;
}
}
+
+void ff_get_2pass_fcode(MpegEncContext *s){
+ RateControlContext *rcc= &s->rc_context;
+ int picture_number= s->picture_number;
+ RateControlEntry *rce;
+
+ rce= &rcc->entry[picture_number];
+ s->f_code= rce->f_code;
+ s->b_code= rce->b_code;
+}
+
//FIXME rd or at least approx for dquant
float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)