This fixes warnings when building with MSVC.
Showing the changes to codec/encoder/core/src/ratectl.cpp (1 of 1 file). Show all
Unified · Split
| @@ -580,8 +580,7 @@ void RcDecideTargetBitsTimestamp (sWelsEncCtx* pEncCtx) { · 579 unmodified lines | ||
| 580 | 580 | pWelsSvcRc->iTargetBits = pTOverRc->iMinBitsTl; |
| 581 | 581 | } else { |
| 582 | 582 | int32_t iMaxTh = iBufferTh * 3 / 4; |
| 583 | − int32_t iMinTh = (pDLayerParam->fFrameRate < 8) ? iBufferTh * 1.0 / 4 : static_cast<int32_t> | |
| 584 | − (iBufferTh * 2 / pDLayerParam->fFrameRate); | |
| 583 | + int32_t iMinTh = static_cast<int32_t>((pDLayerParam->fFrameRate < 8) ? iBufferTh * 1.0 / 4 : iBufferTh * 2 / pDLayerParam->fFrameRate); | |
| 585 | 584 | if (pDLayerParam->fFrameRate < (IDR_BITRATE_RATIO + 1)) |
| 586 | 585 | pWelsSvcRc->iTargetBits = static_cast<int32_t> (((double) (pDLayerParam->iSpatialBitrate) / (double) ( |
| 587 | 586 | pDLayerParam->fFrameRate))); |
| @@ -612,8 +611,7 @@ void RcDecideTargetBitsTimestamp (sWelsEncCtx* pEncCtx) { · 24 unmodified lines | ||
| 612 | 611 | pWelsSvcRc->iTargetBits = WELS_DIV_ROUND (pTOverRc->iTlayerWeight * kiGopBits, INT_MULTIPLY * 10 * 2); |
| 613 | 612 | |
| 614 | 613 | int32_t iMaxTh = iBufferTh / 2; |
| 615 | − int32_t iMinTh = (pDLayerParam->fFrameRate < 8) ? iBufferTh * 1.0 / 4 : static_cast<int32_t> | |
| 616 | − (iBufferTh * 2 / pDLayerParam->fFrameRate); | |
| 614 | + int32_t iMinTh = static_cast<int32_t>((pDLayerParam->fFrameRate < 8) ? iBufferTh * 1.0 / 4 : iBufferTh * 2 / pDLayerParam->fFrameRate); | |
| 617 | 615 | WelsLog (& (pEncCtx->sLogCtx), WELS_LOG_DEBUG, |
| 618 | 616 | "iMaxTh = %d,iMinTh = %d,pWelsSvcRc->iTargetBits = %d,pWelsSvcRc->iBufferSizeSkip = %d, pWelsSvcRc->iBufferFullnessSkip= % " |
| 619 | 617 | PRId64, |