]> granicus.if.org Git - libx264/commitdiff
ratecontrol: patch by Loren Merritt <lorenm AT u DOT washington DOT edu>
authorLaurent Aimar <fenrir@videolan.org>
Sun, 8 Aug 2004 21:36:41 +0000 (21:36 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 8 Aug 2004 21:36:41 +0000 (21:36 +0000)
 "The new cbr mode fails to completely disable itself when encoding in
 constant QP mode. The per-block QPs are then randomized between QP+4 and
 QP-2 based on uninitialized ratecontrol parameters."

git-svn-id: svn://svn.videolan.org/x264/trunk@22 df754926-b1dd-0310-bc7b-ec298dee348c

encoder/ratecontrol.c

index d36c9c724e4285f620b4555532002593f4255e8c..8a4530512d059a5fb2eafe5e02ef1af6dfc417a0 100644 (file)
@@ -243,6 +243,9 @@ void x264_ratecontrol_mb( x264_t *h, int bits )
     int dqp;
     int i;
 
+    if( !h->param.b_cbr )
+        return;
+
     x264_cpu_restore( h->param.cpu );
 
     rc->qps += rc->qpm;