From 66407441fe12116e3061437ecdcda1ca91cbccff Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Mon, 8 Nov 2010 22:14:58 -0800 Subject: [PATCH] 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). --- encoder/ratecontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) -- 2.47.3