History

Merge pull request #2887 from sijchen/master

[UT] test case for “LosslessLink = 0 && EnableLongTermReference=1 & sc…

ruil2 committed 8 years ago

Commit d2e57692 parents 202a4fb a01c9261 file · +31 −0Browse files

Showing the changes to test/api/encode_options_test.cpp (1 of 1 file). Show all

Unified · Split

test/api/encode_options_test.cpp+31−0
@@ -2163,3 +2163,34 @@ TEST_F (EncodeDecodeTestAPI, UnsupportedVideoSizeInput) { · 2162 unmodified lines
2163 ASSERT_TRUE (iRet == cmResultSuccess) << "rv = " << iRet;2163 ASSERT_TRUE (iRet == cmResultSuccess) << "rv = " << iRet;
2164 2164
2165}2165}
2166
2167TEST_F (EncodeDecodeTestAPI, ScreenContent_LosslessLink0_EnableLongTermReference) {
2168 int iWidth = 2882;
2169 int iHeight = 1808;
2170 float fFrameRate = rand() % 30 + 0.5f;
2171 int iSliceNum = 1;
2172 int iRet;
2173
2174 SEncParamExt sParam;
2175 encoder_->GetDefaultParams (&sParam);
2176 prepareParamDefault (1, iSliceNum, iWidth, iHeight, fFrameRate, &sParam);
2177 sParam.iUsageType = SCREEN_CONTENT_REAL_TIME;
2178 sParam.bEnableLongTermReference = 1;
2179 sParam.bIsLosslessLink = 0;
2180 //int TraceLevel = WELS_LOG_INFO;
2181 //encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &TraceLevel);
2182 iRet = encoder_->InitializeExt (&sParam);
2183 ASSERT_TRUE (iRet == cmResultSuccess) << "InitializeExt: iRet = " << iRet << " at " << sParam.iPicWidth << "x" <<
2184 sParam.iPicHeight;
2185
2186
2187 ASSERT_TRUE (InitialEncDec (iWidth, iHeight));
2188
2189 iRet = encoder_->EncodeFrame (&EncPic, &info);
2190
2191 ASSERT_TRUE (iRet == cmResultSuccess) << "rv = " << iRet;
2192
2193 iRet = encoder_->Uninitialize();
2194 ASSERT_TRUE (iRet == cmResultSuccess) << "rv = " << iRet;
2195
2196}

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