From 405469cefd240d997ea764fe63480d5ce8f4c3d9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 26 Aug 2002 08:14:36 +0000 Subject: [PATCH] =?UTF-8?q?forgot=20the=20const=20bits=20in=202pass=20curv?= =?UTF-8?q?e=20matching=20(patch=20(with=20rounding=20removed)=20by=20R?= =?UTF-8?q?=C3=A9mi=20Guyomarch=20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Originally committed as revision 866 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/ratecontrol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 1671c9f798..fc05cb535e 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -658,7 +658,7 @@ static int init_pass2(MpegEncContext *s) if(expected_bits < all_available_bits) avg_quantizer[P_TYPE]-= step; //printf("%f %lld %f\n", expected_bits, all_available_bits, avg_quantizer[P_TYPE]); } -printf("qp_i:%f, qp_p:%f, qp_b:%f\n", avg_quantizer[I_TYPE],avg_quantizer[P_TYPE],avg_quantizer[B_TYPE]); +//printf("qp_i:%f, qp_p:%f, qp_b:%f\n", avg_quantizer[I_TYPE],avg_quantizer[P_TYPE],avg_quantizer[B_TYPE]); for(i=0; i<5; i++){ available_bits[i]= const_bits[i] + complexity[i]/avg_quantizer[i]; @@ -723,7 +723,7 @@ printf("qp_i:%f, qp_p:%f, qp_b:%f\n", avg_quantizer[I_TYPE],avg_quantizer[P_TYPE RateControlEntry *rce= &rcc->entry[i]; double bits; rce->new_qscale= modify_qscale(s, rce, blured_qscale[i], i); - bits= qp2bits(rce, rce->new_qscale); + bits= qp2bits(rce, rce->new_qscale) + rce->mv_bits + rce->misc_bits; //printf("%d %f\n", rce->new_bits, blured_qscale[i]); update_rc_buffer(s, bits);