Commit c6741159 authored by Michael Niedermayer's avatar Michael Niedermayer

10l

Originally committed as revision 336 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 001e3f55
...@@ -1675,6 +1675,7 @@ static int rate_estimate_qscale(MpegEncContext *s) ...@@ -1675,6 +1675,7 @@ static int rate_estimate_qscale(MpegEncContext *s)
diff= s->total_bits - wanted_bits; diff= s->total_bits - wanted_bits;
br_compensation= (s->bit_rate_tolerance - diff)/s->bit_rate_tolerance; br_compensation= (s->bit_rate_tolerance - diff)/s->bit_rate_tolerance;
if(br_compensation<=0.0) br_compensation=0.001;
q/=br_compensation; q/=br_compensation;
qscale= (int)(q + 0.5); qscale= (int)(q + 0.5);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment