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.
Showing the changes to test/encoder/EncUT_EncoderExt.cpp (1 of 1 file). Show all
Unified · Split
| @@ -138,8 +138,10 @@ void EncoderInterfaceTest::InitializeParamExt() { · 137 unmodified lines | ||
| 138 | 138 | |
| 139 | 139 | TEST_F (EncoderInterfaceTest, TemporalLayerSettingTest) { |
| 140 | 140 | |
| 141 | − pParamExt->iPicWidth = m_iWidth; | |
| 142 | − pParamExt->iPicHeight = m_iHeight; | |
| 141 | + pParamExt->iPicWidth = 1280; | |
| 142 | + pParamExt->iPicHeight = 720; | |
| 143 | + m_iWidth = pParamExt->iPicWidth; | |
| 144 | + m_iHeight = pParamExt->iPicHeight; | |
| 143 | 145 | pParamExt->iTargetBitrate = 60000; |
| 144 | 146 | pParamExt->sSpatialLayers[0].iVideoHeight = pParamExt->iPicHeight; |
| 145 | 147 | pParamExt->sSpatialLayers[0].iVideoWidth = pParamExt->iPicWidth; |