[x265] [PATCH] Set frame as keyint if scalinglist reconfigure

vignesh at multicorewareinc.com vignesh at multicorewareinc.com
Wed Dec 21 05:45:01 CET 2016


# HG changeset patch
# User Vignesh Vijayakumar <vignesh at multicorewareinc.com>
# Date 1482232112 -19800
#      Tue Dec 20 16:38:32 2016 +0530
# Node ID 97d011cd7fe2b7dc1ecd2cebb887e1536b810052
# Parent  88285bf550a4f88bb09ff5b49ec46b81140a025d
Set frame as keyint if scalinglist reconfigure

diff -r 88285bf550a4 -r 97d011cd7fe2 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Tue Dec 20 16:35:53 2016 +0530
+++ b/source/encoder/encoder.cpp	Tue Dec 20 16:38:32 2016 +0530
@@ -78,6 +78,7 @@
     m_iPPSQpMinus26 = 0;
     m_iLastSliceQp = 0;
     m_rpsInSpsCount = 0;
+    m_reconfigureScalingLists = false;
     for (int i = 0; i < X265_MAX_FRAME_THREADS; i++)
         m_frameEncoder[i] = NULL;
 
@@ -842,6 +843,12 @@
             frameEnc = m_lookahead->getDecidedPicture();
         if (frameEnc && !pass)
         {
+            if (m_param->bRepeatHeaders && m_reconfigure && m_latestParam != NULL && (m_latestParam->scalingLists != m_param->scalingLists) && !m_reconfigureScalingLists)
+            {
+                frameEnc->m_lowres.bKeyframe = true;
+                m_reconfigureScalingLists = true;
+            }
+
             if (curEncoder->m_reconfigure)
             {
                 /* One round robin cycle of FE reconfigure is complete */
diff -r 88285bf550a4 -r 97d011cd7fe2 source/encoder/encoder.h
--- a/source/encoder/encoder.h	Tue Dec 20 16:35:53 2016 +0530
+++ b/source/encoder/encoder.h	Tue Dec 20 16:38:32 2016 +0530
@@ -150,6 +150,7 @@
     bool               m_bZeroLatency;     // x265_encoder_encode() returns NALs for the input picture, zero lag
     bool               m_aborted;          // fatal error detected
     bool               m_reconfigure;      // Encoder reconfigure in progress
+    bool               m_reconfigureScalingLists;    // Change in scalinglists
 
     /* Begin intra refresh when one not in progress or else begin one as soon as the current 
      * one is done. Requires bIntraRefresh to be set.*/


More information about the x265-devel mailing list