ref: 241700cb96256fda2e86b00be54cc027a8eac8ab
parent: 0f21b2b02e5b10707b4c271885b81437306876ac
parent: 350cafd69a3c2d79946a5ed86ee8c871c7714465
author: HaiboZhu <[email protected]>
date: Thu Jul 21 12:09:55 EDT 2016
Merge pull request #2537 from mstorsjo/msvc-warning-fix Silence warnings about conversions in MSVC
--- a/codec/encoder/core/src/ratectl.cpp
+++ b/codec/encoder/core/src/ratectl.cpp
@@ -570,7 +570,7 @@
pWelsSvcRc->iTargetBits = pTOverRc->iMinBitsTl;
} else {
int32_t iMaxTh = iBufferTh * 3 / 4;
- int32_t iMinTh = iBufferTh * 2 / pDLayerParam->fFrameRate;
+ int32_t iMinTh = static_cast<int32_t> (iBufferTh * 2 / pDLayerParam->fFrameRate);
pWelsSvcRc->iTargetBits = static_cast<int32_t> (((double) (pDLayerParam->iSpatialBitrate) / (double) (
pDLayerParam->fFrameRate) * IDR_BITRATE_RATIO));
WelsLog (& (pEncCtx->sLogCtx), WELS_LOG_DEBUG,
@@ -597,7 +597,7 @@
pWelsSvcRc->iTargetBits = WELS_DIV_ROUND (pTOverRc->iTlayerWeight * kiGopBits, INT_MULTIPLY * 10 * 2);
int32_t iMaxTh = iBufferTh / 2;
- int32_t iMinTh = iBufferTh * 2 / pDLayerParam->fFrameRate;
+ int32_t iMinTh = (int32_t) (iBufferTh * 2 / pDLayerParam->fFrameRate);
WelsLog (& (pEncCtx->sLogCtx), WELS_LOG_DEBUG,
"iMaxTh = %d,iMinTh = %d,pWelsSvcRc->iTargetBits = %d,pWelsSvcRc->iBufferSizeSkip = %d, pWelsSvcRc->iBufferFullnessSkip= % "
PRId64,
@@ -1081,7 +1081,7 @@
iAlpha = SMOOTH_FACTOR_MIN_VALUE;
if (0 == pTOverRc->iPFrameNum) {
pTOverRc->iLinearCmplx = ((int64_t)pWelsSvcRc->iFrameDqBits) * iQStep;
- pTOverRc->iFrameCmplxMean = pEncCtx->pVaa->sComplexityAnalysisParam.iFrameComplexity;
+ pTOverRc->iFrameCmplxMean = (int32_t)pEncCtx->pVaa->sComplexityAnalysisParam.iFrameComplexity;
} else {
pTOverRc->iLinearCmplx = WELS_DIV_ROUND64 (((LINEAR_MODEL_DECAY_FACTOR) * (int64_t)pTOverRc->iLinearCmplx
+ (INT_MULTIPLY - LINEAR_MODEL_DECAY_FACTOR) * ((int64_t)pWelsSvcRc->iFrameDqBits * iQStep)),