[x265] [PATCH] rc: fix bug in CRF caused by e0f834c69cb2

aarthi at multicorewareinc.com aarthi at multicorewareinc.com
Fri Mar 13 17:29:13 CET 2015


# HG changeset patch
# User Aarthi Thirumalai
# Date 1426264076 -19800
#      Fri Mar 13 21:57:56 2015 +0530
# Node ID 7b2212877f62fc4ad1db069f8351ece5be02b674
# Parent  c1a8eef8be143a40981ae6909c6c8c3a6b85901c
rc: fix bug in CRF caused by e0f834c69cb2

diff -r c1a8eef8be14 -r 7b2212877f62 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Fri Mar 13 16:40:06 2015 +0530
+++ b/source/encoder/ratecontrol.cpp	Fri Mar 13 21:57:56 2015 +0530
@@ -1526,7 +1526,7 @@
             else if (m_framesDone == 0 && !m_isVbv && m_param->rc.rateControlMode == X265_RC_ABR)
             {
                 /* for ABR alone, clip the first I frame qp */
-                double lqmax = x265_qp2qScale(ABR_INIT_QP_MAX) * m_lstep;
+                lqmax = x265_qp2qScale(ABR_INIT_QP_MAX) * m_lstep;
                 q = X265_MIN(lqmax, q);
             }
             q = x265_clip3(MIN_QPSCALE, MAX_MAX_QPSCALE, q);
@@ -1534,7 +1534,7 @@
             q = clipQscale(curFrame, rce, q);
             /*  clip qp to permissible range after vbv-lookahead estimation to avoid possible
              * mispredictions by initial frame size predictors */
-            if (m_pred[m_sliceType].count == 1)
+            if (m_isVbv && m_pred[m_sliceType].count == 1)
                 q = x265_clip3(lqmin, lqmax, q);
         }
         m_lastQScaleFor[m_sliceType] = q;


More information about the x265-devel mailing list