ref: cd0ffbd45b2c4b1a38aab8d4ab1dde27e01d4d1f
parent: 14725d43561724d2cc4bae1e85f7206aa7d8a527
parent: 52008a91e70a329f4045c8165ba462d3ebec1346
author: guangwei <GuangweiWang@users.noreply.github.com>
date: Tue Apr 25 11:01:19 EDT 2017
Merge pull request #2727 from mstorsjo/msvc-warnings Fix warnings with MSVC in EncUT_SliceBufferReallocate.cpp
--- a/test/encoder/EncUT_SliceBufferReallocate.cpp
+++ b/test/encoder/EncUT_SliceBufferReallocate.cpp
@@ -211,7 +211,7 @@
pCtx->pSvcParam->iMultipleThreadIdc = (pCtx->pSvcParam->iMultipleThreadIdc <= 1 )? 2 : pCtx->pSvcParam->iMultipleThreadIdc;
pCtx->iActiveThreadsNum = pCtx->pSvcParam->iMultipleThreadIdc;
pCtx->pSvcParam->iSpatialLayerNum = 1;
- pCtx->pSvcParam->bSimulcastAVC = (bool)rand() % 2;
+ pCtx->pSvcParam->bSimulcastAVC = rand() % 2 == 1;
pCtx->pSvcParam->iPicHeight = (((rand() % MAX_WIDTH ) >> 4 ) << 4) + 16;
pCtx->pSvcParam->iPicWidth = (((rand() % MAX_HEIGH ) >> 4) << 4) + 16;
@@ -321,7 +321,7 @@
int32_t iLayerBsSize = 0;
int32_t iSliceBufferSize = 0;
int32_t iRet = 0;
- int32_t iMaxFrameRate = 0.0;
+ int32_t iMaxFrameRate = 0;
pLayerCfg->iVideoWidth = pCtx->pSvcParam->iPicWidth >> (pCtx->pSvcParam->iSpatialLayerNum -1 - iLayerIdx);
pLayerCfg->iVideoHeight = pCtx->pSvcParam->iPicHeight >> (pCtx->pSvcParam->iSpatialLayerNum - 1 - iLayerIdx);
@@ -548,7 +548,7 @@
pCtx->iPosBsBuffer = rand() % pCtx->iFrameBsSize + 1;
pLayerBsInfo = &FrameBsInfo.sLayerInfo[iCurLayerIdx];
pLayerBsInfo->pBsBuf = pCtx->pFrameBs + pCtx->iPosBsBuffer;
- pCtx->bNeedPrefixNalFlag = rand() % 2;
+ pCtx->bNeedPrefixNalFlag = rand() % 2 == 1;
int32_t iCodedNalCount = pCtx->pOut->iCountNals;
iRet = FrameBsRealloc(pCtx, &FrameBsInfo, pLayerBsInfo, iCodedNalCount);
@@ -646,7 +646,7 @@
pCtx->iPosBsBuffer = rand() % pCtx->iFrameBsSize + 1;
pLayerBsInfo = &FrameBsInfo.sLayerInfo[iCurLayerIdx];
pLayerBsInfo->pBsBuf = pCtx->pFrameBs + pCtx->iPosBsBuffer;
- pCtx->bNeedPrefixNalFlag = rand() % 2;
+ pCtx->bNeedPrefixNalFlag = rand() % 2 == 1;
iRet = SliceLayerInfoUpdate(pCtx, &FrameBsInfo, pLayerBsInfo, eSlcMode);
EXPECT_TRUE(cmResultSuccess == iRet);