Merge pull request #1472 from mstorsjo/fix-test-random

Make sure the width/height is large enough in SetOptionEncParamExt
This commit is contained in:
sijchen 2014-10-31 13:50:10 +08:00
commit 66b1610114

View File

@ -1985,8 +1985,8 @@ TEST_F (EncodeDecodeTestAPI, Engine_SVC_Switch_P) {
TEST_F (EncodeDecodeTestAPI, SetOptionEncParamExt) {
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);
int iWidth = (((rand() % MAX_WIDTH) >> 1) + 16) << 1;
int iHeight = (((rand() % MAX_HEIGHT) >> 1) + 16) << 1;
float fFrameRate = rand() + 0.5f;
int iEncFrameNum = WELS_CLIP3 ((rand() % ENCODE_FRAME_NUM) + 1, 1, ENCODE_FRAME_NUM);
int iSpatialLayerNum = 4;