[x265] [PATCH] encoder: force slicetype using analysis file
gopu at multicorewareinc.com
gopu at multicorewareinc.com
Mon Nov 17 12:09:02 CET 2014
# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1416222532 -19800
# Mon Nov 17 16:38:52 2014 +0530
# Node ID c327e1e5aec0e6da349e57d92a2da587027cf32a
# Parent 23bba9b2de1c930976a9018c5127b566ba31c44a
encoder: force slicetype using analysis file
diff -r 23bba9b2de1c -r c327e1e5aec0 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp Mon Nov 17 15:35:23 2014 +0530
+++ b/source/encoder/encoder.cpp Mon Nov 17 16:38:52 2014 +0530
@@ -452,6 +452,10 @@
else
m_rateControl->calcAdaptiveQuantFrame(inFrame);
}
+
+ /* Use the frame types from the first pass, if available */
+ int sliceType = (m_param->rc.bStatRead) ? m_rateControl->rateControlSliceType(inFrame->m_poc) : pic_in->sliceType;
+
/* In analysisSave mode, x265_analysis_data is allocated in pic_in and inFrame points to this */
/* Load analysis data before lookahead->addPicture, since sliceType has been decided */
if (m_param->analysisMode == X265_ANALYSIS_LOAD)
@@ -465,10 +469,9 @@
inFrame->m_analysisData.numPartitions = inputPic->analysisData.numPartitions;
inFrame->m_analysisData.interData = inputPic->analysisData.interData;
inFrame->m_analysisData.intraData = inputPic->analysisData.intraData;
+ sliceType = inputPic->analysisData.sliceType;
}
- /* Use the frame types from the first pass, if available */
- int sliceType = (m_param->rc.bStatRead) ? m_rateControl->rateControlSliceType(inFrame->m_poc) : pic_in->sliceType;
m_lookahead->addPicture(inFrame, sliceType);
m_numDelayedPic++;
}
More information about the x265-devel
mailing list