ref: 2e4fd4248a84fd9ef17f404c183a00fccee9a2d9
parent: 1c7d3d4b47bb9ddb855e6d3aa1b900370800e136
author: lyao2 <[email protected]>
date: Tue Dec 23 11:25:11 EST 2014
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);