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 | pWelsSvcRc->iTargetBits = pTOverRc->iMinBitsTl; | 580 | pWelsSvcRc->iTargetBits = pTOverRc->iMinBitsTl; |
| 581 | } else { | 581 | } else { |
| 582 | int32_t iMaxTh = iBufferTh * 3 / 4; | 582 | int32_t iMaxTh = iBufferTh * 3 / 4; |
| 583 | int32_t iMinTh = (pDLayerParam->fFrameRate < 8) ? iBufferTh * 1.0 / 4 : static_cast<int32_t> | 583 | int32_t iMinTh = static_cast<int32_t>((pDLayerParam->fFrameRate < 8) ? iBufferTh * 1.0 / 4 : iBufferTh * 2 / pDLayerParam->fFrameRate); |
| 584 | (iBufferTh * 2 / pDLayerParam->fFrameRate); | ||
| 585 | if (pDLayerParam->fFrameRate < (IDR_BITRATE_RATIO + 1)) | 584 | if (pDLayerParam->fFrameRate < (IDR_BITRATE_RATIO + 1)) |
| 586 | pWelsSvcRc->iTargetBits = static_cast<int32_t> (((double) (pDLayerParam->iSpatialBitrate) / (double) ( | 585 | pWelsSvcRc->iTargetBits = static_cast<int32_t> (((double) (pDLayerParam->iSpatialBitrate) / (double) ( |
| 587 | pDLayerParam->fFrameRate))); | 586 | pDLayerParam->fFrameRate))); |
| @@ -612,8 +611,7 @@ void RcDecideTargetBitsTimestamp (sWelsEncCtx* pEncCtx) { · 24 unmodified lines | |||
| 612 | pWelsSvcRc->iTargetBits = WELS_DIV_ROUND (pTOverRc->iTlayerWeight * kiGopBits, INT_MULTIPLY * 10 * 2); | 611 | pWelsSvcRc->iTargetBits = WELS_DIV_ROUND (pTOverRc->iTlayerWeight * kiGopBits, INT_MULTIPLY * 10 * 2); |
| 613 | 612 | ||
| 614 | int32_t iMaxTh = iBufferTh / 2; | 613 | int32_t iMaxTh = iBufferTh / 2; |
| 615 | int32_t iMinTh = (pDLayerParam->fFrameRate < 8) ? iBufferTh * 1.0 / 4 : static_cast<int32_t> | 614 | int32_t iMinTh = static_cast<int32_t>((pDLayerParam->fFrameRate < 8) ? iBufferTh * 1.0 / 4 : iBufferTh * 2 / pDLayerParam->fFrameRate); |
| 616 | (iBufferTh * 2 / pDLayerParam->fFrameRate); | ||
| 617 | WelsLog (& (pEncCtx->sLogCtx), WELS_LOG_DEBUG, | 615 | WelsLog (& (pEncCtx->sLogCtx), WELS_LOG_DEBUG, |
| 618 | "iMaxTh = %d,iMinTh = %d,pWelsSvcRc->iTargetBits = %d,pWelsSvcRc->iBufferSizeSkip = %d, pWelsSvcRc->iBufferFullnessSkip= % " | 616 | "iMaxTh = %d,iMinTh = %d,pWelsSvcRc->iTargetBits = %d,pWelsSvcRc->iBufferSizeSkip = %d, pWelsSvcRc->iBufferFullnessSkip= % " |
| 619 | PRId64, | 617 | PRId64, |