ref: 59aee6052acb4787aa80d059ebbbf8a536cae26c
parent: 9cc395fc4ee34208971f407010d75a96dec76d09
parent: 2e4fd4248a84fd9ef17f404c183a00fccee9a2d9
author: ruil2 <ruil2@cisco.com>
date: Tue Dec 23 12:19:49 EST 2014
Merge pull request #1667 from lyao2/ut_fix3 fix a spatial layer index error
--- a/test/encoder/EncUT_EncoderExt.cpp
+++ b/test/encoder/EncUT_EncoderExt.cpp
@@ -143,7 +143,7 @@
pParamExt->sSpatialLayers[0].iSpatialBitrate = 50000;
}
-TEST_F (EncoderInterfaceTest, EncoderAdditionalOptionSetTest) {
+TEST_F (EncoderInterfaceTest, EncoderOptionSetTest) {
int iResult, iValue, iReturn;
float fValue, fReturn;
int uiTraceLevel = WELS_LOG_QUIET;
@@ -210,7 +210,7 @@
eOptionId = ENCODER_OPTION_BITRATE;
SBitrateInfo sInfo, sReturn;
sInfo.iBitrate = rand() % 100000 - 100;
- sInfo.iLayer = static_cast<LAYER_NUM> (pParamExt->iSpatialLayerNum);
+ sInfo.iLayer = SPATIAL_LAYER_0;
iResult = pPtrEnc->SetOption (eOptionId, &sInfo);
pPtrEnc->GetOption (ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, pParamExt);
if (sInfo.iBitrate <= 0)
@@ -220,7 +220,7 @@
EXPECT_EQ (iResult, static_cast<int> (cmInitParaError));
} else {
EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess));
- sReturn.iLayer = static_cast<LAYER_NUM> (pParamExt->iSpatialLayerNum);
+ sReturn.iLayer = SPATIAL_LAYER_0;
iResult = pPtrEnc->GetOption (eOptionId, &sReturn);
EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess));
EXPECT_EQ (WELS_CLIP3 (sInfo.iBitrate, 1, 2147483647), sReturn.iBitrate);
@@ -232,7 +232,7 @@
eOptionId = ENCODER_OPTION_MAX_BITRATE;
sInfo.iBitrate = rand() % 100000 - 100;
- sInfo.iLayer = static_cast<LAYER_NUM> (pParamExt->iSpatialLayerNum);
+ sInfo.iLayer = SPATIAL_LAYER_0;
iResult = pPtrEnc->SetOption (eOptionId, &sInfo);
pPtrEnc->GetOption (ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, pParamExt);
if (sInfo.iBitrate <= 0)
@@ -242,7 +242,7 @@
EXPECT_EQ (iResult, static_cast<int> (cmInitParaError));
} else {
EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess));
- sReturn.iLayer = static_cast<LAYER_NUM> (pParamExt->iSpatialLayerNum);
+ sReturn.iLayer = SPATIAL_LAYER_0;
iResult = pPtrEnc->GetOption (eOptionId, &sReturn);
EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess));
EXPECT_EQ (WELS_CLIP3 (sInfo.iBitrate, 1, 2147483647), sReturn.iBitrate);