mirror of
https://github.com/openharmony/third_party_openh264.git
synced 2026-08-26 21:21:35 -04:00
Make sure the random test bitrate is high enough
This is the same fix as in 47df41 (for the ForceIntraFrame test) applied to the ForceIntraFrameWithTemporal test.
This commit is contained in:
@@ -643,6 +643,8 @@ TEST_F (EncoderInterfaceTest, ForceIntraFrameWithTemporal) {
|
||||
sEncParamExt.iPicWidth = MB_SIZE + abs ((rand() * 2) % (MAX_WIDTH - MB_SIZE));
|
||||
sEncParamExt.iPicHeight = MB_SIZE + abs ((rand() * 2) % (MAX_HEIGHT - MB_SIZE));
|
||||
sEncParamExt.iTargetBitrate = rand() + 1; //!=0
|
||||
// Force a bitrate of at least w*h/50, otherwise we will only get skipped frames
|
||||
sEncParamExt.iTargetBitrate = WELS_CLIP3 (sEncParamExt.iTargetBitrate, sEncParamExt.iPicWidth * sEncParamExt.iPicHeight / 50, 100000000);
|
||||
int32_t iLevelMaxBitrate = WelsCommon::g_ksLevelLimits[LEVEL_5_0 - 1].uiMaxBR * CpbBrNalFactor;
|
||||
if (sEncParamExt.iTargetBitrate > iLevelMaxBitrate)
|
||||
sEncParamExt.iTargetBitrate = iLevelMaxBitrate;
|
||||
|
||||
Reference in New Issue
Block a user