[x265] [PATCH 2 of 2] function call for rateControlStart and End - enabled only in ABR mode fopr now

aarthi at multicorewareinc.com aarthi at multicorewareinc.com
Thu Aug 22 21:30:28 CEST 2013


# HG changeset patch
# User Aarthi<aarthi at multicorewareinc.com>
# Date 1377199779 -19800
#      Fri Aug 23 00:59:39 2013 +0530
# Node ID d633a649e2d6297d515e0260a61b6d6d0f0d3ae7
# Parent  41f20253a3b8f7b8aae5d83cb563af919249c0fc
 function call for rateControlStart and End - enabled only in ABR mode fopr now

diff -r 41f20253a3b8 -r d633a649e2d6 source/Lib/TLibEncoder/TEncTop.cpp
--- a/source/Lib/TLibEncoder/TEncTop.cpp	Fri Aug 23 00:58:28 2013 +0530
+++ b/source/Lib/TLibEncoder/TEncTop.cpp	Fri Aug 23 00:59:39 2013 +0530
@@ -249,8 +249,11 @@
         // determine references, set QP, etc
         m_dpb->prepareEncode(fenc, curEncoder);
 
-        //m_lookahead->getEstimatedPictureCost(fenc);  // TODO: move into rate control
-        //m_rateControl->rateControlStart(fenc);
+       // m_lookahead->getEstimatedPictureCost(fenc);  // TODO: move into rate control
+		if(m_rateControl->rateControlMode == X265_RC_ABR)
+		{
+			m_rateControl->rateControlStart(fenc);
+		}
 
         // main encode processing, TBD multi-threading
         curEncoder->compressFrame(fenc);
@@ -530,7 +533,11 @@
     {
         m_analyzeB.addResult(psnrY, psnrU, psnrV, (Double)bits);
     }
-    m_rateControl->rateControlEnd(bits);
+	//Rate control End is called here for now, as it needs encoded bits for each frame only as input
+	if(m_rateControl->rateControlMode == X265_RC_ABR)
+	{
+		m_rateControl->rateControlEnd(bits);
+	}
     if (param.logLevel >= X265_LOG_DEBUG)
     {
         Char c = (slice->isIntra() ? 'I' : slice->isInterP() ? 'P' : 'B');


More information about the x265-devel mailing list