History

Cast a float to integer

This fixes warnings with MSVC.

Martin Storsjö committed 11 years ago

Commit 54cc3da1 parent 8fb40481 file · +1 −1Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+1−1
@@ -538,7 +538,7 @@ int32_t WelsEncoderApplyBitVaryRang(SLogContext* pLogCtx, SWelsSvcCodingParam* p · 537 unmodified lines
538538 const int32_t iNumLayers = pParam->iSpatialLayerNum;
539539 for (int32_t i = 0; i < iNumLayers; i++) {
540540 pLayerParam = & (pParam->sSpatialLayers[i]);
541− pLayerParam->iMaxSpatialBitrate = WELS_MIN(pLayerParam->iSpatialBitrate * (1+ iRang/100.0),pLayerParam->iMaxSpatialBitrate);
541+ pLayerParam->iMaxSpatialBitrate = WELS_MIN((int) (pLayerParam->iSpatialBitrate * (1+ iRang/100.0)),pLayerParam->iMaxSpatialBitrate);
542542 if (WelsBitRateVerification (pLogCtx, pLayerParam, i) != ENC_RETURN_SUCCESS)
543543 return ENC_RETURN_UNSUPPORTED_PARA;
544544 WelsLog (pLogCtx, WELS_LOG_INFO,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t