This is the same fix as in 47df41 (for the ForceIntraFrame test) applied to the ForceIntraFrameWithTemporal test.
Showing the changes to test/encoder/EncUT_EncoderExt.cpp (1 of 1 file). Show all
Unified · Split
| @@ -643,6 +643,8 @@ TEST_F (EncoderInterfaceTest, ForceIntraFrameWithTemporal) { · 642 unmodified lines | ||
| 643 | 643 | sEncParamExt.iPicWidth = MB_SIZE + abs ((rand() * 2) % (MAX_WIDTH - MB_SIZE)); |
| 644 | 644 | sEncParamExt.iPicHeight = MB_SIZE + abs ((rand() * 2) % (MAX_HEIGHT - MB_SIZE)); |
| 645 | 645 | sEncParamExt.iTargetBitrate = rand() + 1; //!=0 |
| 646 | + // Force a bitrate of at least w*h/50, otherwise we will only get skipped frames | |
| 647 | + sEncParamExt.iTargetBitrate = WELS_CLIP3 (sEncParamExt.iTargetBitrate, sEncParamExt.iPicWidth * sEncParamExt.iPicHeight / 50, 100000000); | |
| 646 | 648 | int32_t iLevelMaxBitrate = WelsCommon::g_ksLevelLimits[LEVEL_5_0 - 1].uiMaxBR * CpbBrNalFactor; |
| 647 | 649 | if (sEncParamExt.iTargetBitrate > iLevelMaxBitrate) |
| 648 | 650 | sEncParamExt.iTargetBitrate = iLevelMaxBitrate; |