From fc404ca572526bd7ca46eb90e88d10892259a285 Mon Sep 17 00:00:00 2001 From: "hm.jang" <hm.jang@lge.com> Date: Tue, 11 Aug 2020 14:13:05 +0900 Subject: [PATCH] - Modify configuration file format and related code. - Add brace after conditions or loop in order to enclose single line. --- .../two_layers_max_tid_ref_pic.cfg | 26 +++++++++---------- source/App/EncoderApp/EncApp.cpp | 6 +++-- source/App/EncoderApp/EncAppCfg.cpp | 2 +- source/Lib/CommonLib/Slice.cpp | 4 ++- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/cfg/multi-layer/two_layers_max_tid_ref_pic.cfg b/cfg/multi-layer/two_layers_max_tid_ref_pic.cfg index 0e9454cbcd..08e97f8029 100644 --- a/cfg/multi-layer/two_layers_max_tid_ref_pic.cfg +++ b/cfg/multi-layer/two_layers_max_tid_ref_pic.cfg @@ -8,23 +8,23 @@ DefaultPtlDpbHrdMaxTidFlag : 0 AllIndependentLayersFlag : 0 #======== OLSs =============== -EachLayerIsAnOlsFlag : 0 -OlsModeIdc : 2 -NumOutputLayerSets : 2 -OlsOutputLayer1 : 1 # only one output layer in OLS #1 -NumPTLsInVPS : 2 +EachLayerIsAnOlsFlag : 0 +OlsModeIdc : 2 +NumOutputLayerSets : 2 +OlsOutputLayer1 : 1 # only one output layer in OLS #1 +NumPTLsInVPS : 2 #======== Layer-0 =============== -LayerId0 : 0 +LayerId0 : 0 #======== Layer-1 =============== -LayerId1 : 1 -NumRefLayers1 : 1 -RefLayerIdx1 : 0 -MaxTidILRefPicsPlus11 : layer-0:3 # don't use pictures with temoporal_id > 2 for inter-layer reference +LayerId1 : 1 +NumRefLayers1 : 1 +RefLayerIdx1 : 0 +MaxTidILRefPicsPlusOneLayerId1 : 3 # don't use pictures with temoporal_id > 2 for inter-layer reference #======== OLS-0 =============== -OlsPTLIdx0 : 0 +OlsPTLIdx0 : 0 #======== OLS-1 =============== -LevelPTL1 : 6.2 -OlsPTLIdx1 : 1 +LevelPTL1 : 6.2 +OlsPTLIdx1 : 1 diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 5737dc1ab2..09ae16c54b 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -144,14 +144,16 @@ void EncApp::xInitLibCfg() bool bSetMaxTid = false; for (int t = 0; t < vps.getMaxSubLayers(); t++) { - if (m_cfgVPSParameters.m_maxTidILRefPicsPlus1Str[i].find("layer-"+to_string(j)+":"+to_string(t)) != std::string::npos) + if (m_cfgVPSParameters.m_maxTidILRefPicsPlus1Str[i].find(to_string(t)) != std::string::npos) { vps.setMaxTidIlRefPicsPlus1(i, j, t); bSetMaxTid = true; } } - if(!bSetMaxTid) + if (!bSetMaxTid) + { vps.setMaxTidIlRefPicsPlus1(i, j, vps.getMaxSubLayers()); + } #endif } } diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 47959f321d..d95d6e2946 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -1401,7 +1401,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ( "NumPTLsInVPS", m_numPtlsInVps, 1, "Number of profile_tier_level structures in VPS" ) ( "AvoidIntraInDepLayers", m_avoidIntraInDepLayer, true, "Replaces I pictures in dependent layers with B pictures" ) #if JVET_R0193 - ( "MaxTidILRefPicsPlus1%d", m_cfgVPSParameters.m_maxTidILRefPicsPlus1Str, string(""), MAX_VPS_LAYERS, "Maximum temporal ID for inter-layer reference pictures plus 1 of i-th layer, 0 for IRAP only") + ( "MaxTidILRefPicsPlusOneLayerId%d", m_cfgVPSParameters.m_maxTidILRefPicsPlus1Str, string(""), MAX_VPS_LAYERS, "Maximum temporal ID for inter-layer reference pictures plus 1 of i-th layer, 0 for IRAP only") #else ( "MaxTidILRefPicsPlus1", m_cfgVPSParameters.m_maxTidILRefPicsPlus1, -1, "Maximum temporal ID for inter-layer reference pictures plus 1, 0 for IRAP only" ) #endif diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index 0e2c0ecd75..b9280bfd77 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -2322,8 +2322,10 @@ void VPS::deriveOutputLayerSets() m_numOutputLayersInOls[i] = 1; m_outputLayerIdInOls[i][0] = m_vpsLayerId[i]; #if JVET_R0193_S0141 - if (m_vpsEachLayerIsAnOlsFlag) + if (m_vpsEachLayerIsAnOlsFlag) + { m_numSubLayersInLayerInOLS[i][0] = m_ptlMaxTemporalId[m_olsPtlIdx[i]] + 1; + } else { m_numSubLayersInLayerInOLS[i][i] = m_ptlMaxTemporalId[m_olsPtlIdx[i]] + 1; -- GitLab