changeset 616:0fe52ab8042c libavcodec

forgot the const bits in 2pass curve matching (patch (with rounding removed) by Rmi Guyomarch <rguyom at pobox dot com>)
author michaelni
date Mon, 26 Aug 2002 08:14:36 +0000
parents 459a715f0661
children df2102629fef
files ratecontrol.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ratecontrol.c	Sun Aug 25 23:49:50 2002 +0000
+++ b/ratecontrol.c	Mon Aug 26 08:14:36 2002 +0000
@@ -658,7 +658,7 @@
         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 @@
             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);