Showing the changes to test/api/encode_decode_api_test.cpp (1 of 1 file). Show all
Unified · Split
| @@ -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 off | 97 | param_.iRCMode = RC_OFF_MODE; //rc off |
| 98 | param_.iMultipleThreadIdc = 1; //single thread | 98 | 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 | ||
| 2057 | TEST_F (EncodeDecodeTestAPI, SetOptionEncParamExt) { | 2058 | TEST_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; |