History

Merge pull request #2879 from sijchen/fix_level3

[Encoder] adjust default profile and level setting

ruil2 committed 8 years ago

Commit 67555082 parents d2e5769 c0ef1bf10 files · +4662 −4652Browse files

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

Unified · Split

test/api/encode_options_test.cpp+15−7
@@ -1956,8 +1956,8 @@ TEST_F (EncodeDecodeTestAPI, ProfileLevelSetting) { · 1955 unmodified lines
19561956 sParam.iEntropyCodingModeFlag = rand() % 2;
19571957 sParam.sSpatialLayers[0].iSpatialBitrate = sParam.iTargetBitrate = 3000;
19581958
1959− //int TraceLevel = WELS_LOG_DEBUG;
1960− //encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &TraceLevel);
1959+ int TraceLevel = WELS_LOG_DEBUG;
1960+ encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &TraceLevel);
19611961 //decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &TraceLevel);
19621962 iEncProfileIdc = profileList[rand() % 11];
19631963 iEncLevelIdc = levelList[rand() % 18];
@@ -1971,11 +1971,15 @@ TEST_F (EncodeDecodeTestAPI, ProfileLevelSetting) { · 7 unmodified lines
19711971 decoder_->GetOption (DECODER_OPTION_PROFILE, &iDecProfileIdc);
19721972
19731973 if ((iEncProfileIdc != PRO_BASELINE) && (iEncProfileIdc != PRO_MAIN) && (iEncProfileIdc != PRO_HIGH)) {
1974− iEncProfileIdc = PRO_BASELINE;
1974+ if (sParam.iEntropyCodingModeFlag) {
1975+ iEncProfileIdc = PRO_HIGH;
1976+ } else {
1977+ iEncProfileIdc = PRO_BASELINE;
1978+ }
19751979 }
19761980
19771981 ASSERT_TRUE (iDecProfileIdc == iEncProfileIdc) << "enc_profile = " << iEncProfileIdc << " dec_profile = " <<
1978− iDecProfileIdc;
1982+ iDecProfileIdc;
19791983
19801984 //check whether the level is changed according to level limitation
19811985 ELevelIdc uiLevel = LEVEL_UNKNOWN;
@@ -1992,7 +1996,7 @@ TEST_F (EncodeDecodeTestAPI, ProfileLevelSetting) { · 10 unmodified lines
19921996 decoder_->GetOption (DECODER_OPTION_LEVEL, &iDecLevelIdc);
19931997
19941998 if (iEncLevelIdc == LEVEL_UNKNOWN)
1995− ASSERT_TRUE (iDecLevelIdc == LEVEL_5_2) << "enc_level = " << iEncLevelIdc << " dec_level = " << iDecLevelIdc;
1999+ ASSERT_TRUE (iDecLevelIdc != LEVEL_UNKNOWN) << "enc_level = " << iEncLevelIdc << " dec_level = " << iDecLevelIdc;
19962000 else
19972001 ASSERT_TRUE (iDecLevelIdc == iEncLevelIdc) << "enc_level = " << iEncLevelIdc << " dec_level = " << iDecLevelIdc;
19982002
@@ -2031,7 +2035,11 @@ TEST_F (EncodeDecodeTestAPI, ProfileLevelSetting) { · 32 unmodified lines
20312035 decoder_->GetOption (DECODER_OPTION_PROFILE, &iDecProfileIdc);
20322036
20332037 if ((iEncProfileIdc != PRO_BASELINE) && (iEncProfileIdc != PRO_MAIN) && (iEncProfileIdc != PRO_HIGH)) {
2034− iEncProfileIdc = PRO_BASELINE;
2038+ if (sParam.iEntropyCodingModeFlag) {
2039+ iEncProfileIdc = PRO_HIGH;
2040+ } else {
2041+ iEncProfileIdc = PRO_BASELINE;
2042+ }
20352043 }
20362044
20372045 ASSERT_TRUE (iDecProfileIdc == iEncProfileIdc) << "enc_profile = " << iEncProfileIdc << " dec_profile = " <<
@@ -2051,7 +2059,7 @@ TEST_F (EncodeDecodeTestAPI, ProfileLevelSetting) { · 13 unmodified lines
20512059 decoder_->GetOption (DECODER_OPTION_LEVEL, &iDecLevelIdc);
20522060
20532061 if (iEncLevelIdc == LEVEL_UNKNOWN)
2054− ASSERT_TRUE (iDecLevelIdc == LEVEL_5_2) << "enc_level = " << iEncLevelIdc << " dec_level = " << iDecLevelIdc;
2062+ ASSERT_TRUE (iDecLevelIdc != LEVEL_5_2) << "enc_level = " << iEncLevelIdc << " dec_level = " << iDecLevelIdc;
20552063 else
20562064 ASSERT_TRUE (iDecLevelIdc == iEncLevelIdc) << "enc_level = " << iEncLevelIdc << " dec_level = " << iDecLevelIdc;
20572065

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