History

add test case for “LosslessLink = 0 && EnableLongTermReference=1 & screen_content “

sijchen@cisco.com committed 8 years ago

Commit a01c9261 parent 68ab6681 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
@@ -2158,3 +2158,34 @@ TEST_F (EncodeDecodeTestAPI, UnsupportedVideoSizeInput) { · 2157 unmodified lines
21582158 ASSERT_TRUE (iRet == cmResultSuccess) << "rv = " << iRet;
21592159
21602160 }
2161+
2162+TEST_F (EncodeDecodeTestAPI, ScreenContent_LosslessLink0_EnableLongTermReference) {
2163+ int iWidth = 2882;
2164+ int iHeight = 1808;
2165+ float fFrameRate = rand() % 30 + 0.5f;
2166+ int iSliceNum = 1;
2167+ int iRet;
2168+
2169+ SEncParamExt sParam;
2170+ encoder_->GetDefaultParams (&sParam);
2171+ prepareParamDefault (1, iSliceNum, iWidth, iHeight, fFrameRate, &sParam);
2172+ sParam.iUsageType = SCREEN_CONTENT_REAL_TIME;
2173+ sParam.bEnableLongTermReference = 1;
2174+ sParam.bIsLosslessLink = 0;
2175+ //int TraceLevel = WELS_LOG_INFO;
2176+ //encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &TraceLevel);
2177+ iRet = encoder_->InitializeExt (&sParam);
2178+ ASSERT_TRUE (iRet == cmResultSuccess) << "InitializeExt: iRet = " << iRet << " at " << sParam.iPicWidth << "x" <<
2179+ sParam.iPicHeight;
2180+
2181+
2182+ ASSERT_TRUE (InitialEncDec (iWidth, iHeight));
2183+
2184+ iRet = encoder_->EncodeFrame (&EncPic, &info);
2185+
2186+ ASSERT_TRUE (iRet == cmResultSuccess) << "rv = " << iRet;
2187+
2188+ iRet = encoder_->Uninitialize();
2189+ ASSERT_TRUE (iRet == cmResultSuccess) << "rv = " << iRet;
2190+
2191+}

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