When using 4 downsampled layers, make sure the random width/height is large enough that the downsampled layers don't have a zero size. Since the value never will be too small now, there's no need to use WELS_CLIP3 any longer.
Showing the changes to test/api/encode_decode_api_test.cpp (1 of 1 file). Show all
Unified · Split
| @@ -1985,8 +1985,8 @@ TEST_F (EncodeDecodeTestAPI, Engine_SVC_Switch_P) { · 1984 unmodified lines | ||
| 1985 | 1985 | |
| 1986 | 1986 | |
| 1987 | 1987 | TEST_F (EncodeDecodeTestAPI, SetOptionEncParamExt) { |
| 1988 | − int iWidth = WELS_CLIP3 ((((rand() % MAX_WIDTH) >> 1) + 1) << 1, 2, MAX_WIDTH); | |
| 1989 | − int iHeight = WELS_CLIP3 ((((rand() % MAX_HEIGHT) >> 1) + 1) << 1, 2, MAX_HEIGHT); | |
| 1988 | + int iWidth = (((rand() % MAX_WIDTH) >> 1) + 16) << 1; | |
| 1989 | + int iHeight = (((rand() % MAX_HEIGHT) >> 1) + 16) << 1; | |
| 1990 | 1990 | float fFrameRate = rand() + 0.5f; |
| 1991 | 1991 | int iEncFrameNum = WELS_CLIP3 ((rand() % ENCODE_FRAME_NUM) + 1, 1, ENCODE_FRAME_NUM); |
| 1992 | 1992 | int iSpatialLayerNum = 4; |