History

Make sure the random test bitrate is high enough

The ForceIntraFrame test will fail (giving up after 100 skipped frames) if the bitrate is not set high enough. Set the minimum bitrate to w*h/50, which is a very low value, but which still should allow getting a non-skipped frame within a few attempts.

Martin Storsjö committed 11 years ago

Commit 47df4111 parent a4370b81 file · +2 −0Browse files

Showing the changes to test/encoder/EncUT_EncoderExt.cpp (1 of 1 file). Show all

Unified · Split

test/encoder/EncUT_EncoderExt.cpp+2−0
@@ -455,6 +455,8 @@ void GetValidEncParamBase (SEncParamBase* pEncParamBase) { · 454 unmodified lines
455 pEncParamBase->iPicWidth = VALID_SIZE (pEncParamBase->iPicWidth);455 pEncParamBase->iPicWidth = VALID_SIZE (pEncParamBase->iPicWidth);
456 pEncParamBase->iPicHeight = VALID_SIZE (pEncParamBase->iPicHeight);456 pEncParamBase->iPicHeight = VALID_SIZE (pEncParamBase->iPicHeight);
457 pEncParamBase->iTargetBitrate = rand() + 1; //!=0457 pEncParamBase->iTargetBitrate = rand() + 1; //!=0
458 // Force a bitrate of at least w*h/50, otherwise we will only get skipped frames
459 pEncParamBase->iTargetBitrate = WELS_CLIP3 (pEncParamBase->iTargetBitrate, pEncParamBase->iPicWidth * pEncParamBase->iPicHeight / 50, 100000000);
458 int32_t iLevelMaxBitrate = WelsCommon::g_ksLevelLimits[LEVEL_5_0 - 1].uiMaxBR * CpbBrNalFactor;460 int32_t iLevelMaxBitrate = WelsCommon::g_ksLevelLimits[LEVEL_5_0 - 1].uiMaxBR * CpbBrNalFactor;
459 if (pEncParamBase->iTargetBitrate > iLevelMaxBitrate)461 if (pEncParamBase->iTargetBitrate > iLevelMaxBitrate)
460 pEncParamBase->iTargetBitrate = iLevelMaxBitrate;462 pEncParamBase->iTargetBitrate = iLevelMaxBitrate;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t