]> granicus.if.org Git - libx264/commitdiff
Fix per-frame QP override broken in rev 137.
authorMåns Rullgård <mru@mru.ath.cx>
Thu, 10 Mar 2005 19:42:05 +0000 (19:42 +0000)
committerMåns Rullgård <mru@mru.ath.cx>
Thu, 10 Mar 2005 19:42:05 +0000 (19:42 +0000)
git-svn-id: svn://svn.videolan.org/x264/trunk@159 df754926-b1dd-0310-bc7b-ec298dee348c

encoder/encoder.c

index 32e8c763f5f7aca1841e46a2852b71a0d2922e09..bfab88b70c04edc1680c4e1431239ef104c4dd28 100644 (file)
@@ -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;