From: Jason Garrett-Glaser Date: Tue, 9 Nov 2010 06:14:58 +0000 (-0800) Subject: Fix CBR ratecontrol bug with extremely high qscales X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=66407441fe12116e3061437ecdcda1ca91cbccff;p=x264.git Fix CBR ratecontrol bug with extremely high qscales Caused CBR ratecontrol to take a very long time to recover from extreme situations (e.g. /dev/urandom). --- diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c index e9f62886..df117cad 100644 --- a/encoder/ratecontrol.c +++ b/encoder/ratecontrol.c @@ -1977,7 +1977,7 @@ static double clip_qscale( x264_t *h, int pict_type, double q ) { q *= X264_MAX( pbbits / space, bits / (0.5 * rcc->buffer_size) ); } - q = X264_MAX( q0-5, q ); + q = X264_MAX( q0/2, q ); } if( !rcc->b_vbv_min_rate )