From: Laurent Aimar Date: Sun, 8 Aug 2004 21:36:41 +0000 (+0000) Subject: ratecontrol: patch by Loren Merritt X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=07a0494bd1b2c1ec05866d09bf84d0564d6e5080;p=libx264 ratecontrol: patch by Loren Merritt "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 --- diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c index d36c9c72..8a453051 100644 --- a/encoder/ratecontrol.c +++ b/encoder/ratecontrol.c @@ -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;