# HG changeset patch
# User Aarthi Thirumalai<[email protected]>
# Date 1480440537 -19800
#      Tue Nov 29 22:58:57 2016 +0530
# Node ID ef337997ac0fe0553fa92a40494b7ddb1762068e
# Parent  3922fcbc4b79d068a9632dbf8a43354ba189992c
fix calculation for decideWaitTime

diff -r 3922fcbc4b79 -r ef337997ac0f source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp        Wed Sep 28 13:41:36 2016 +0530
+++ b/source/encoder/encoder.cpp        Tue Nov 29 22:58:57 2016 +0530
@@ -616,7 +616,12 @@
         }
 
         if (m_pocLast == 0)
+        {
             m_firstPts = inFrame->m_pts;
+            // Start computing time for SlicetypeDecide from now
+            for (int i = 0; i < m_param->frameNumThreads; i++)
+                m_frameEncoder[i]->m_prevOutputTime = x265_mdate();
+        }
         if (m_bframeDelay && m_pocLast == m_bframeDelay)
             m_bframeDelayTime = inFrame->m_pts - m_firstPts;
 
@@ -666,6 +671,7 @@
     m_curEncoder = (m_curEncoder + 1) % m_param->frameNumThreads;
     int ret = 0;
 
+
     /* Normal operation is to wait for the current frame encoder to complete 
its current frame
      * and then to give it a new frame to work on.  In zero-latency mode, we 
must encode this
      * input picture before returning so the order must be reversed. This 
do/while() loop allows
_______________________________________________
x265-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/x265-devel

Reply via email to