[x265] encoder: the first frame encoder resets reconfigure for itself and all other FEs
Deepthi Nandakumar
deepthi at multicorewareinc.com
Fri Mar 18 09:57:22 CET 2016
# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1458199897 -19800
# Thu Mar 17 13:01:37 2016 +0530
# Node ID 63748dea60675d5a029ca0b1b8a92de2aaad94b0
# Parent 4b0da550a69cb237f1042d913f0d40fd9c8e293e
encoder: the first frame encoder resets reconfigure for itself and all
other FEs
Reconfigure also now prints the next frame ID to be queued (and not the
next one
to be encoded)
diff -r 4b0da550a69c -r 63748dea6067 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp Thu Mar 17 17:04:10 2016 +0530
+++ b/source/encoder/encoder.cpp Thu Mar 17 13:01:37 2016 +0530
@@ -821,22 +821,17 @@
if (curEncoder->m_reconfigure)
{
/* One round robin cycle of FE reconfigure is complete */
- if (m_reconfigure)
- {
- /* Safe to copy m_latestParam to Encoder::m_param,
encoder reconfigure complete */
- memcpy (m_param, m_latestParam, sizeof(x265_param));
- m_reconfigure = false;
- }
- /* Reset current FEs to default */
- curEncoder->m_param = m_param;
- curEncoder->m_reconfigure = false;
+ /* Safe to copy m_latestParam to Encoder::m_param, encoder
reconfigure complete */
+ for (int frameEncId = 0; frameEncId <
m_param->frameNumThreads; frameEncId++)
+ m_frameEncoder[frameEncId]->m_reconfigure = false;
+ memcpy (m_param, m_latestParam, sizeof(x265_param));
+ m_reconfigure = false;
}
- else
- {
- /* Initiate reconfigure for this FE if necessary */
- curEncoder->m_param = m_reconfigure ? m_latestParam :
m_param;
- curEncoder->m_reconfigure = m_reconfigure;
- }
+
+ /* Initiate reconfigure for this FE if necessary */
+ curEncoder->m_param = m_reconfigure ? m_latestParam : m_param;
+ curEncoder->m_reconfigure = m_reconfigure;
+
/* give this frame a FrameData instance before encoding */
if (m_dpb->m_frameDataFreeList)
{
@@ -2174,7 +2169,7 @@
x265_param* oldParam = m_param;
x265_param* newParam = m_latestParam;
- x265_log(newParam, X265_LOG_INFO, "Reconfigured param options, input
Frame: %d\n", m_encodedFrameNum + 1);
+ x265_log(newParam, X265_LOG_INFO, "Reconfigured param options, input
Frame: %d\n", m_pocLast + 1);
char tmp[40];
#define TOOLCMP(COND1, COND2, STR) if (COND1 != COND2) { sprintf(tmp,
STR, COND1, COND2); x265_log(newParam, X265_LOG_INFO, tmp); }
--
Deepthi Nandakumar
Engineering Manager, x265
Multicoreware, Inc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20160318/4f023159/attachment.html>
More information about the x265-devel
mailing list