Make sure the input frame size is large enough that the downsampled layers also have a nonzero resolution.
Showing the changes to test/api/encode_decode_api_test.cpp (1 of 1 file). Show all
Unified · Split
| @@ -2057,11 +2057,11 @@ TEST_F (EncodeDecodeTestAPI, Engine_SVC_Switch_P) { · 2056 unmodified lines | ||
| 2057 | 2057 | } |
| 2058 | 2058 | |
| 2059 | 2059 | TEST_F (EncodeDecodeTestAPI, SetOptionEncParamExt) { |
| 2060 | − int iWidth = WelsClip3 ((((rand() % MAX_WIDTH) >> 1) + 1) << 1, 2, MAX_WIDTH); | |
| 2061 | − int iHeight = WelsClip3 ((((rand() % MAX_HEIGHT) >> 1) + 1) << 1, 2, MAX_HEIGHT); | |
| 2060 | + int iSpatialLayerNum = 4; | |
| 2061 | + int iWidth = WelsClip3 ((((rand() % MAX_WIDTH) >> 1) + 1) << 1, 1 << iSpatialLayerNum, MAX_WIDTH); | |
| 2062 | + int iHeight = WelsClip3 ((((rand() % MAX_HEIGHT) >> 1) + 1) << 1, 1 << iSpatialLayerNum, MAX_HEIGHT); | |
| 2062 | 2063 | float fFrameRate = rand() + 0.5f; |
| 2063 | 2064 | int iEncFrameNum = WelsClip3 ((rand() % ENCODE_FRAME_NUM) + 1, 1, ENCODE_FRAME_NUM); |
| 2064 | − int iSpatialLayerNum = 4; | |
| 2065 | 2065 | int iSliceNum = 1; |
| 2066 | 2066 | encoder_->GetDefaultParams (¶m_); |
| 2067 | 2067 | prepareParam (iSpatialLayerNum, iSliceNum, iWidth, iHeight, fFrameRate); |