From: Jason Garrett-Glaser Date: Tue, 9 Nov 2010 03:56:29 +0000 (-0800) Subject: Fix stupid bug in B-frame VBV size prediction X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=5dfbfc357406e641c80d9de74c85fce4ece6b5ba;p=x264.git Fix stupid bug in B-frame VBV size prediction --- diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c index c6d78d34..290a9288 100644 --- a/encoder/ratecontrol.c +++ b/encoder/ratecontrol.c @@ -2053,9 +2053,9 @@ static float rate_estimate_qscale( x264_t *h ) q += rcc->pb_offset; if( rcc->b_2pass && rcc->b_vbv ) - rcc->frame_size_planned = qscale2bits( &rce, q ); + rcc->frame_size_planned = qscale2bits( &rce, qp2qscale( q ) ); else - rcc->frame_size_planned = predict_size( rcc->pred_b_from_p, q, h->fref1[h->i_ref1-1]->i_satd ); + rcc->frame_size_planned = predict_size( rcc->pred_b_from_p, qp2qscale( q ), h->fref1[h->i_ref1-1]->i_satd ); h->rc->frame_size_estimated = rcc->frame_size_planned; /* For row SATDs */