Merge pull request #2537 from mstorsjo/msvc-warning-fix

Silence warnings about conversions in MSVC
This commit is contained in:
HaiboZhu 2016-07-21 16:09:55 +08:00 committed by GitHub
commit 241700cb96

View File

@ -570,7 +570,7 @@ void RcDecideTargetBitsTimestamp (sWelsEncCtx* pEncCtx) {
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 @@ void RcDecideTargetBitsTimestamp (sWelsEncCtx* pEncCtx) {
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 @@ void RcUpdateFrameComplexity (sWelsEncCtx* pEncCtx) {
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)),