[x264-devel] commit: Fix CBR ratecontrol bug with extremely high qscales ( Jason Garrett-Glaser )

git at videolan.org git at videolan.org
Wed Nov 10 10:12:31 CET 2010


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Mon Nov  8 22:14:58 2010 -0800| [66407441fe12116e3061437ecdcda1ca91cbccff] | committer: Jason Garrett-Glaser 

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).

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=66407441fe12116e3061437ecdcda1ca91cbccff
---

 encoder/ratecontrol.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c
index e9f6288..df117ca 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 )



More information about the x264-devel mailing list