[x265] [PATCH] rc: add option for encoding the next gops in gop-parallel

Divya Manivannan divya at multicorewareinc.com
Thu Apr 14 12:32:18 CEST 2016


# HG changeset patch
# User Divya Manivannan <divya at multicorewareinc.com>
# Date 1460022711 -19800
#      Thu Apr 07 15:21:51 2016 +0530
# Node ID a4d75b11a3c413e968fe59b1ad33778b041b7250
# Parent  34a3d35c5f97c7ecf76bbb3311a9bbb66db0d695
rc: add option for encoding the next gops in gop-parallel

diff -r 34a3d35c5f97 -r a4d75b11a3c4 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Tue Apr 12 19:34:49 2016 +0530
+++ b/source/encoder/ratecontrol.cpp	Thu Apr 07 15:21:51 2016 +0530
@@ -230,6 +230,7 @@
     m_encOrder = NULL;
     m_lastBsliceSatdCost = 0;
     m_movingAvgSum = 0.0;
+    m_isNextGop = false;
 
     // vbv initialization
     m_param->rc.vbvBufferSize = x265_clip3(0, 2000000, m_param->rc.vbvBufferSize);
@@ -1786,8 +1787,8 @@
                     }
                 }
             }
-            if (m_sliceType == I_SLICE && m_param->keyframeMax > 1
-                && m_lastNonBPictType != I_SLICE && !m_isAbrReset)
+            if ((m_sliceType == I_SLICE && m_param->keyframeMax > 1
+                && m_lastNonBPictType != I_SLICE && !m_isAbrReset) || (m_isNextGop && !m_framesDone))
             {
                 if (!m_param->rc.bStrictCbr)
                     q = x265_qp2qScale(m_accumPQp / m_accumPNorm);
diff -r 34a3d35c5f97 -r a4d75b11a3c4 source/encoder/ratecontrol.h
--- a/source/encoder/ratecontrol.h	Tue Apr 12 19:34:49 2016 +0530
+++ b/source/encoder/ratecontrol.h	Thu Apr 07 15:21:51 2016 +0530
@@ -128,6 +128,7 @@
     bool   m_singleFrameVbv;
     bool   m_isGrainEnabled;
     bool   m_isAbrReset;
+    bool   m_isNextGop;
     int    m_lastAbrResetPoc;
 
     double m_rateTolerance;


More information about the x265-devel mailing list