From: Måns Rullgård Date: Thu, 10 Mar 2005 19:42:05 +0000 (+0000) Subject: Fix per-frame QP override broken in rev 137. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2fc52995de23f963e67ac408dc247ee3bf68c952;p=libx264 Fix per-frame QP override broken in rev 137. git-svn-id: svn://svn.videolan.org/x264/trunk@159 df754926-b1dd-0310-bc7b-ec298dee348c --- diff --git a/encoder/encoder.c b/encoder/encoder.c index 32e8c763..bfab88b7 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -1121,6 +1121,9 @@ do_encode: /* Init the rate control */ x264_ratecontrol_start( h, i_slice_type ); i_global_qp = x264_ratecontrol_qp( h ); + if( h->fenc->i_qpplus1 > 0) + i_global_qp = h->fenc->i_qpplus1 - 1; + pic_out->i_qpplus1 = h->fdec->i_qpplus1 = i_global_qp + 1;