ref: 87c83c0d36862750778470acf5965cc870d2d92d
parent: 155a91406c795b525f20977422b3a8ccdbc94bc5
author: Sijia Chen <sijchen@cisco.com>
date: Wed Dec 10 05:49:58 EST 2014
fix a UT function
--- a/test/api/encode_decode_api_test.cpp
+++ b/test/api/encode_decode_api_test.cpp
@@ -96,6 +96,7 @@
param_.fMaxFrameRate = framerate;
param_.iRCMode = RC_OFF_MODE; //rc off
param_.iMultipleThreadIdc = 1; //single thread
+ param_.iSpatialLayerNum = iLayers;
for (int i = 0; i < iLayers; i++) {
param_.sSpatialLayers[i].iVideoWidth = width >> (iLayers - i - 1);
param_.sSpatialLayers[i].iVideoHeight = height >> (iLayers - i - 1);
@@ -2055,8 +2056,8 @@
}
TEST_F (EncodeDecodeTestAPI, SetOptionEncParamExt) {
- int iWidth = (((rand() % MAX_WIDTH) >> 1) + 16) << 1;
- int iHeight = (((rand() % MAX_HEIGHT) >> 1) + 16) << 1;
+ int iWidth = WELS_CLIP3 ((((rand() % MAX_WIDTH) >> 1) + 1) << 1, 2, MAX_WIDTH);
+ int iHeight = WELS_CLIP3 ((((rand() % MAX_HEIGHT) >> 1) + 1) << 1, 2, MAX_HEIGHT);
float fFrameRate = rand() + 0.5f;
int iEncFrameNum = WELS_CLIP3 ((rand() % ENCODE_FRAME_NUM) + 1, 1, ENCODE_FRAME_NUM);
int iSpatialLayerNum = 4;