From 5dfbfc357406e641c80d9de74c85fce4ece6b5ba Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Mon, 8 Nov 2010 19:56:29 -0800 Subject: [PATCH] Fix stupid bug in B-frame VBV size prediction --- encoder/ratecontrol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 */ -- 2.47.3