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
96 param_.fMaxFrameRate = framerate;96 param_.fMaxFrameRate = framerate;
97 param_.iRCMode = RC_OFF_MODE; //rc off97 param_.iRCMode = RC_OFF_MODE; //rc off
98 param_.iMultipleThreadIdc = 1; //single thread98 param_.iMultipleThreadIdc = 1; //single thread
99 param_.iSpatialLayerNum = iLayers;
99 for (int i = 0; i < iLayers; i++) {100 for (int i = 0; i < iLayers; i++) {
100 param_.sSpatialLayers[i].iVideoWidth = width >> (iLayers - i - 1);101 param_.sSpatialLayers[i].iVideoWidth = width >> (iLayers - i - 1);
101 param_.sSpatialLayers[i].iVideoHeight = height >> (iLayers - i - 1);102 param_.sSpatialLayers[i].iVideoHeight = height >> (iLayers - i - 1);
@@ -2055,8 +2056,8 @@ TEST_F (EncodeDecodeTestAPI, Engine_SVC_Switch_P) { · 1953 unmodified lines
2055}2056}
2056 2057
2057TEST_F (EncodeDecodeTestAPI, SetOptionEncParamExt) {2058TEST_F (EncodeDecodeTestAPI, SetOptionEncParamExt) {
2058 int iWidth = (((rand() % MAX_WIDTH) >> 1) + 16) << 1;2059 int iWidth = WELS_CLIP3 ((((rand() % MAX_WIDTH) >> 1) + 1) << 1, 2, MAX_WIDTH);
2059 int iHeight = (((rand() % MAX_HEIGHT) >> 1) + 16) << 1;2060 int iHeight = WELS_CLIP3 ((((rand() % MAX_HEIGHT) >> 1) + 1) << 1, 2, MAX_HEIGHT);
2060 float fFrameRate = rand() + 0.5f;2061 float fFrameRate = rand() + 0.5f;
2061 int iEncFrameNum = WELS_CLIP3 ((rand() % ENCODE_FRAME_NUM) + 1, 1, ENCODE_FRAME_NUM);2062 int iEncFrameNum = WELS_CLIP3 ((rand() % ENCODE_FRAME_NUM) + 1, 1, ENCODE_FRAME_NUM);
2062 int iSpatialLayerNum = 4;2063 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