History

Get the actual used parameters in the codec in TemporalLayerSettingTest

Make sure that pOptions is initialized to the parameters that the codec actually uses, not the ones that we initially tried to set. When calling SetOption to update the codec parameters, this may cause a reset of the whole codec if e.g. the number of threads differs from what is set within the codec itself. If the number of threads was changed by the codec internally when inited (e.g. changed from 0 to 1), WelsEncoderParamAdjust may think the whole codec needs to be reset. This fixes running EncoderInterfaceTest.TemporalLayerSettingTest on machines where the detected number of cores is 1.

Martin Storsjö committed 12 years ago

Commit 352f5ee1 parent dacd22d1 file · +3 −2Browse files

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

Unified · Split

test/encoder/EncUT_EncoderExt.cpp+3−2
@@ -163,10 +163,11 @@ TEST_F (EncoderInterfaceTest, TemporalLayerSettingTest) { · 162 unmodified lines
163163 EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess));
164164 EXPECT_EQ (sFbi.eFrameType, static_cast<int> (videoFrameTypeP));
165165
166− memcpy (pOption, pParamExt, sizeof (SEncParamExt));
166+ ENCODER_OPTION eOptionId = ENCODER_OPTION_SVC_ENCODE_PARAM_EXT;
167+ iResult = pPtrEnc->GetOption (eOptionId, pOption);
168+ EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess));
167169 pOption ->iTemporalLayerNum = 4;
168170
169− ENCODER_OPTION eOptionId = ENCODER_OPTION_SVC_ENCODE_PARAM_EXT;
170171 iResult = pPtrEnc->SetOption (eOptionId, pOption);
171172 EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess));
172173

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