Set a specific frame size in TemporalLayerSettingTest

Previously, this test used whatever size was set in m_iWidth
and m_iHeight before, which depended on the order that the tests
were executed. When this test was the first one executed in the
EncoderInterfaceTest, the width and height were set to the max.

Instead of having the test behaviour depend on the test order,
set a specific size, just as InitializeParamExt and MemoryCheckTest
do.

This reduces the runtime of TemporalLayerSettingTest from 86 seconds
to 26 seconds, when run in valgrind.
This commit is contained in:
Martin Storsjö 2014-08-08 12:24:57 +03:00
parent c3702d9075
commit 38cc9acdd3

View File

@ -138,8 +138,10 @@ void EncoderInterfaceTest::InitializeParamExt() {
TEST_F (EncoderInterfaceTest, TemporalLayerSettingTest) {
pParamExt->iPicWidth = m_iWidth;
pParamExt->iPicHeight = m_iHeight;
pParamExt->iPicWidth = 1280;
pParamExt->iPicHeight = 720;
m_iWidth = pParamExt->iPicWidth;
m_iHeight = pParamExt->iPicHeight;
pParamExt->iTargetBitrate = 60000;
pParamExt->sSpatialLayers[0].iVideoHeight = pParamExt->iPicHeight;
pParamExt->sSpatialLayers[0].iVideoWidth = pParamExt->iPicWidth;