History

fix param initialization bug in UT

lyao2 committed 12 years ago

Commit 4ee43461 parent d0d68421 file · +2 −2Browse files

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

Unified · Split

test/encoder/EncUT_EncoderExt.cpp+2−2
@@ -316,8 +316,8 @@ TEST_F (EncoderInterfaceTest, MemoryCheckTest) { · 315 unmodified lines
316316
317317 void GetValidEncParamBase (SEncParamBase* pEncParamBase) {
318318 pEncParamBase->iUsageType = CAMERA_VIDEO_REAL_TIME;
319− pEncParamBase->iPicWidth = 2 + ((rand() * 2) % (MAX_WIDTH - 2));
320− pEncParamBase->iPicHeight = 2 + ((rand() * 2) % (MAX_HEIGHT - 2));
319+ pEncParamBase->iPicWidth = 2 + ((rand() % ((MAX_WIDTH >> 1) - 1)) << 1);
320+ pEncParamBase->iPicHeight = 2 + ((rand() % ((MAX_HEIGHT >> 1) - 1)) << 1);
321321 pEncParamBase->iPicWidth = VALID_SIZE(pEncParamBase->iPicWidth);
322322 pEncParamBase->iPicHeight = VALID_SIZE(pEncParamBase->iPicHeight);
323323 pEncParamBase->iTargetBitrate = rand() + 1; //!=0

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