ref: 30820fd8b5cc428b1703cbd9a09a02fae622b0f6
parent: 7c0369da239abcbceba5bce857055f99e8d89329
author: ruil2 <ruil2@cisco.com>
date: Mon Dec 1 04:16:35 EST 2014
use iBitsVaryPercentage passed by the app instead of the macro
--- a/codec/encoder/core/src/ratectl.cpp
+++ b/codec/encoder/core/src/ratectl.cpp
@@ -125,7 +125,7 @@
pWelsSvcRc->iNumberMbFrame = iMbWidth * (pDLayerParam->iVideoHeight >> 4);
pWelsSvcRc->iSliceNum = pSliceCtx->iSliceNumInFrame;
- pWelsSvcRc->iRcVaryPercentage = _BITS_RANGE; // % -- for temp
+ pWelsSvcRc->iRcVaryPercentage = pEncCtx->pSvcParam->iBitsVaryPercentage; // % -- for temp
pWelsSvcRc->iRcVaryRatio = pWelsSvcRc->iRcVaryPercentage;
pWelsSvcRc->iSkipBufferRatio = SKIP_RATIO;
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -1074,10 +1074,10 @@
}
break;
case ENCODER_OPTION_BITS_VARY_PERCENTAGE: {
- bool bValue = * (static_cast<bool*> (pOption));
- m_pEncContext->pSvcParam->iBitsVaryPercentage = bValue;
+ int32_t iValue = * (static_cast<int32_t*> (pOption));
+ m_pEncContext->pSvcParam->iBitsVaryPercentage = iValue;
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
- "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITS_VARY_PERCENTAGE,iBitsVaryPercentage = %d", bValue);
+ "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITS_VARY_PERCENTAGE,iBitsVaryPercentage = %d", iValue);
}
break;