History

fix a UT function

Sijia Chen committed 11 years ago

Commit 87c83c01 parent 155a9141 file · +3 −2Browse files

Showing the changes to test/api/encode_decode_api_test.cpp (1 of 1 file). Show all

Unified · Split

test/api/encode_decode_api_test.cpp+3−2
@@ -96,6 +96,7 @@ class EncodeDecodeTestBase : public ::testing::TestWithParam<EncodeDecodeFilePar · 95 unmodified lines
9696 param_.fMaxFrameRate = framerate;
9797 param_.iRCMode = RC_OFF_MODE; //rc off
9898 param_.iMultipleThreadIdc = 1; //single thread
99+ param_.iSpatialLayerNum = iLayers;
99100 for (int i = 0; i < iLayers; i++) {
100101 param_.sSpatialLayers[i].iVideoWidth = width >> (iLayers - i - 1);
101102 param_.sSpatialLayers[i].iVideoHeight = height >> (iLayers - i - 1);
@@ -2055,8 +2056,8 @@ TEST_F (EncodeDecodeTestAPI, Engine_SVC_Switch_P) { · 1953 unmodified lines
20552056 }
20562057
20572058 TEST_F (EncodeDecodeTestAPI, SetOptionEncParamExt) {
2058− int iWidth = (((rand() % MAX_WIDTH) >> 1) + 16) << 1;
2059− int iHeight = (((rand() % MAX_HEIGHT) >> 1) + 16) << 1;
2059+ int iWidth = WELS_CLIP3 ((((rand() % MAX_WIDTH) >> 1) + 1) << 1, 2, MAX_WIDTH);
2060+ int iHeight = WELS_CLIP3 ((((rand() % MAX_HEIGHT) >> 1) + 1) << 1, 2, MAX_HEIGHT);
20602061 float fFrameRate = rand() + 0.5f;
20612062 int iEncFrameNum = WELS_CLIP3 ((rand() % ENCODE_FRAME_NUM) + 1, 1, ENCODE_FRAME_NUM);
20622063 int iSpatialLayerNum = 4;

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