]> git.videolan.org Git - x264.git/commitdiff
Fix stupid bug in B-frame VBV size prediction
authorJason Garrett-Glaser <darkshikari@gmail.com>
Tue, 9 Nov 2010 03:56:29 +0000 (19:56 -0800)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Tue, 9 Nov 2010 06:31:44 +0000 (22:31 -0800)
encoder/ratecontrol.c

index c6d78d3442906d84f336d22183cd787513e93168..290a9288185cdded45445e264f84e19f9e4c913c 100644 (file)
@@ -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 */