changeset 11916:6ac1b12bcde9

Encoder: avoid blocking in getEncodedPicture() for zero latency when multiple slices are enabled Improved performance by 10 - 15 fps depending upon preset and number of slices.
author Ashok Kumar Mishra <ashok@multicorewareinc.com>
date Fri, 10 Nov 2017 19:02:48 +0530
parents 6774402ac28d
children dd9772385d15
files source/encoder/encoder.cpp
diffstat 1 files changed, 1 insertions(+-), 3 deletions(-) [+]
line wrap: on
line diff
--- a/source/encoder/encoder.cpp	Mon Nov 13 10:47:48 2017 +0530
+++ b/source/encoder/encoder.cpp	Fri Nov 10 19:02:48 2017 +0530
@@ -386,9 +386,7 @@ void Encoder::create()
             }
         }
     }
-
-    m_bZeroLatency = !m_param->bframes && !m_param->lookaheadDepth && m_param->frameNumThreads == 1;
-
+    m_bZeroLatency = !m_param->bframes && !m_param->lookaheadDepth && m_param->frameNumThreads == 1 && m_param->maxSlices == 1;
     m_aborted |= parseLambdaFile(m_param);
 
     m_encodeStartTime = x265_mdate();