ref: a01c926b158ed2d1903888c6a6ebb2ae06b09394
parent: 68ab668707299c3a705135f5114fead8b0a1b0b7
author: sijchen@cisco.com <sijchen@cisco.com>
date: Thu Dec 21 05:21:41 EST 2017
add test case for “LosslessLink = 0 && EnableLongTermReference=1 & screen_content “
--- a/test/api/encode_options_test.cpp
+++ b/test/api/encode_options_test.cpp
@@ -2158,3 +2158,34 @@
ASSERT_TRUE (iRet == cmResultSuccess) << "rv = " << iRet;
}
+
+TEST_F (EncodeDecodeTestAPI, ScreenContent_LosslessLink0_EnableLongTermReference) {
+ int iWidth = 2882;
+ int iHeight = 1808;
+ float fFrameRate = rand() % 30 + 0.5f;
+ int iSliceNum = 1;
+ int iRet;
+
+ SEncParamExt sParam;
+ encoder_->GetDefaultParams (&sParam);
+ prepareParamDefault (1, iSliceNum, iWidth, iHeight, fFrameRate, &sParam);
+ sParam.iUsageType = SCREEN_CONTENT_REAL_TIME;
+ sParam.bEnableLongTermReference = 1;
+ sParam.bIsLosslessLink = 0;
+ //int TraceLevel = WELS_LOG_INFO;
+ //encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &TraceLevel);
+ iRet = encoder_->InitializeExt (&sParam);
+ ASSERT_TRUE (iRet == cmResultSuccess) << "InitializeExt: iRet = " << iRet << " at " << sParam.iPicWidth << "x" <<
+ sParam.iPicHeight;
+
+
+ ASSERT_TRUE (InitialEncDec (iWidth, iHeight));
+
+ iRet = encoder_->EncodeFrame (&EncPic, &info);
+
+ ASSERT_TRUE (iRet == cmResultSuccess) << "rv = " << iRet;
+
+ iRet = encoder_->Uninitialize();
+ ASSERT_TRUE (iRet == cmResultSuccess) << "rv = " << iRet;
+
+}