History

Set m_iPicResSize in PrepareOneSrcFrame

If the calling test hasn't set m_iPicResSize, it is set to the maximum frame size, which takes much longer to initialize than the current actual frame size. This reduces the runtime of EncoderInterfaceTest.SkipFrameCheck in valgrind from 229 seconds to 8 seconds, and the total runtime of all the test cases in EncoderInterfaceTest from 405 seconds to 89 seconds.

Martin Storsjö committed 11 years ago

Commit 4394d221 parent 9b442b31 file · +4 −0Browse files

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

Unified · Split

test/encoder/EncUT_EncoderExt.cpp+4−0
@@ -88,6 +88,10 @@ void EncoderInterfaceTest::PrepareOneSrcFrame() { · 87 unmodified lines
8888 pSrcPic->iPicWidth = pParamExt->iPicWidth;
8989 pSrcPic->iPicHeight = pParamExt->iPicHeight;
9090
91+ m_iWidth = pParamExt->iPicWidth;
92+ m_iHeight = pParamExt->iPicHeight;
93+ m_iPicResSize = m_iWidth * m_iHeight * 3 >> 1;
94+
9195 pYUV[0] = rand() % 256;
9296 for (int i = 1; i < m_iPicResSize; i++) {
9397 if ((i % 256) == 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