[x265] [PATCH] rc: change max value of ABR and disable the frame parallelism in first frame

Divya Manivannan divya at multicorewareinc.com
Thu Jun 30 14:58:35 CEST 2016


# HG changeset patch
# User Divya Manivannan <divya at multicorewareinc.com>
# Date 1467103421 -19800
#      Tue Jun 28 14:13:41 2016 +0530
# Node ID b8432c5792ba2c74a5ec47ab426edd2cf2c6b217
# Parent  626fcbac7ffba723dabd3a9f0507c4c80f3e7bc9
rc: change max value of ABR and disable the frame parallelism in first frame

diff -r 626fcbac7ffb -r b8432c5792ba source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp	Thu Jun 16 12:57:38 2016 +0530
+++ b/source/encoder/frameencoder.cpp	Tue Jun 28 14:13:41 2016 +0530
@@ -1213,7 +1213,9 @@
     uint32_t rowCount = 0;
     if (m_param->rc.rateControlMode == X265_RC_ABR || bIsVbv)
     {
-        if ((uint32_t)m_rce.encodeOrder <= 2 * (m_param->fpsNum / m_param->fpsDenom))
+        if (!m_rce.encodeOrder)
+            rowCount = m_numRows - 1;
+        else if ((uint32_t)m_rce.encodeOrder <= 2 * (m_param->fpsNum / m_param->fpsDenom))
             rowCount = X265_MIN((m_numRows + 1) / 2, m_numRows - 1);
         else
             rowCount = X265_MIN(m_refLagRows, m_numRows - 1);
diff -r 626fcbac7ffb -r b8432c5792ba source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Thu Jun 16 12:57:38 2016 +0530
+++ b/source/encoder/ratecontrol.cpp	Tue Jun 28 14:13:41 2016 +0530
@@ -279,7 +279,7 @@
 
     /* Adjust the first frame in order to stabilize the quality level compared to the rest */
 #define ABR_INIT_QP_MIN (24)
-#define ABR_INIT_QP_MAX (40)
+#define ABR_INIT_QP_MAX (37)
 #define ABR_INIT_QP_GRAIN_MAX (33)
 #define ABR_SCENECUT_INIT_QP_MIN (12)
 #define CRF_INIT_QP (int)m_param->rc.rfConstant


More information about the x265-devel mailing list