ref: 268a0eb6f4d35682d44b86580c610dcc624a844c
parent: 515eeb41e4e8ad437c047d96990eaa32543d3326
author: Karina <ruil2@cisco.com>
date: Wed Jun 1 06:52:51 EDT 2016
remove redundant initialization
--- a/codec/encoder/core/src/ratectl.cpp
+++ b/codec/encoder/core/src/ratectl.cpp
@@ -118,6 +118,10 @@
pWelsSvcRc->iRcVaryPercentage = pEncCtx->pSvcParam->iBitsVaryPercentage; // % -- for temp
pWelsSvcRc->iRcVaryRatio = pWelsSvcRc->iRcVaryPercentage;
+ pWelsSvcRc->iBufferFullnessSkip = 0;
+ pWelsSvcRc->uiLastTimeStamp = 0;
+ pWelsSvcRc->iCost2BitsIntra = 1;
+ pWelsSvcRc->iAvgCost2Bits = 1;
pWelsSvcRc->iSkipBufferRatio = SKIP_RATIO;
pWelsSvcRc->iQpRangeUpperInFrame = (QP_RANGE_UPPER_MODE1 * MAX_BITS_VARY_PERCENTAGE - ((
@@ -1305,17 +1309,6 @@
pCurMb->uiChromaQp = g_kuiChromaQpTable[WELS_CLIP3 (pCurMb->uiLumaQp + pEncCtx->pPps->uiChromaQpIndexOffset, 0, 51)];
}
-void InitRcModuleTimeStamp (sWelsEncCtx* pEncCtx) {
- SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId];
- pWelsSvcRc->iBaseQp = 30;
-
- pWelsSvcRc->iBufferFullnessSkip = 0;
- pWelsSvcRc->uiLastTimeStamp = 0;
-
- pWelsSvcRc->iCost2BitsIntra = 1;
- pWelsSvcRc->iAvgCost2Bits = 1;
- pWelsSvcRc->iSkipBufferRatio = SKIP_RATIO;
-}
void WelsRcFrameDelayJudgeTimeStamp (sWelsEncCtx* pEncCtx, long long uiTimeStamp, int32_t iDidIdx) {
SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[iDidIdx];
SSpatialLayerConfig* pDLayerConfig = &pEncCtx->pSvcParam->sSpatialLayers[iDidIdx];
@@ -1550,7 +1543,6 @@
pRcf->pfWelsUpdateBufferWhenSkip = NULL;
pRcf->pfWelsUpdateMaxBrWindowStatus = NULL;
pRcf->pfWelsRcPostFrameSkipping = NULL;
- InitRcModuleTimeStamp (pEncCtx);
break;
case RC_QUALITY_MODE:
default: