Index: /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1161)
+++ /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1162)
@@ -111,8 +111,6 @@
 #endif
 , m_maxTidRefPresentFlag(1)
-#if OUTPUT_LAYER_SETS_CONFIG
 , m_defaultTargetOutputLayerIdc (-1)
 , m_numOutputLayerSets          (-1)
-#endif
 , m_inputColourSpaceConvert(IPCOLOURSPACE_UNCHANGED)
 , m_snrInternalColourSpace(false)
@@ -952,9 +950,7 @@
   }
 #endif
-#if OUTPUT_LAYER_SETS_CONFIG
   string* cfg_numOutputLayersInOutputLayerSet = new string;
   string* cfg_listOfOutputLayers     = new string[MAX_VPS_OUTPUT_LAYER_SETS_PLUS1];
   string* cfg_outputLayerSetIdx      = new string;
-#endif
 #if MULTIPLE_PTL_SUPPORT
   string* cfg_listOfLayerPTLOfOlss   = new string[MAX_VPS_OUTPUT_LAYER_SETS_PLUS1];
@@ -1064,9 +1060,5 @@
   ("NumLayers",                                     m_numLayers,                                             1, "Number of layers to code")  
 #if Q0078_ADD_LAYER_SETS
-#if OUTPUT_LAYER_SETS_CONFIG
   ("NumLayerSets",                                  m_numLayerSets,                                          1, "Number of layer sets")
-#else
-  ("NumLayerSets",                                  m_numLayerSets,                                          0, "Number of layer sets")
-#endif
   ("NumLayerInIdList%d",                            cfg_numLayerInIdList,            0, MAX_VPS_LAYER_IDX_PLUS1, "Number of layers in the set")
   ("LayerSetLayerIdList%d",                         cfg_layerSetLayerIdListPtr, string(""), MAX_VPS_LAYER_IDX_PLUS1, "Layer IDs for the set")
@@ -1075,5 +1067,4 @@
   ("HighestLayerIdx%d",                             cfg_highestLayerIdxPtr, string(""), MAX_VPS_LAYER_IDX_PLUS1, "Highest layer idx for an additional layer set")
 #endif
-#if OUTPUT_LAYER_SETS_CONFIG
   ("DefaultTargetOutputLayerIdc",                   m_defaultTargetOutputLayerIdc,                           1, "Default target output layers. 0: All layers are output layer, 1: Only highest layer is output layer, 2 or 3: No default output layers")
   ("NumOutputLayerSets",                            m_numOutputLayerSets,                                    1, "Number of output layer sets excluding the 0-th output layer set")
@@ -1081,5 +1072,4 @@
   ("ListOfOutputLayers%d",                          cfg_listOfOutputLayers, string(""), MAX_VPS_LAYER_IDX_PLUS1, "Layer IDs for the set, in terms of layer ID in the output layer set Range: [0..NumLayersInOutputLayerSet-1]")
   ("OutputLayerSetIdx",                             cfg_outputLayerSetIdx,                       string(""), 1, "Corresponding layer set index, only for non-default output layer sets")
-#endif
 #if AUXILIARY_PICTURES
   ("AuxId%d",                                       cfg_auxId,                                   0, MAX_LAYERS, "Auxilary picture ID for layer %d (0: Not aux pic, 1: Alpha plane, 2: Depth picture, 3: Cb enh, 4: Cr enh")
@@ -2440,70 +2430,16 @@
 
 #if Q0078_ADD_LAYER_SETS
-#if OUTPUT_LAYER_SETS_CONFIG
   for (Int layerSet = 1; layerSet < m_numLayerSets; layerSet++)
   {
     // Simplifying the code in the #else section, and allowing 0-th layer set t
     assert( scanStringToArray( cfg_layerSetLayerIdList[layerSet], m_numLayerInIdList[layerSet], "NumLayerInIdList", m_layerSetLayerIdList[layerSet] ) );
-#else
-  for (Int layerSet = 0; layerSet < m_numLayerSets; layerSet++)
-  {
-    if (m_numLayerInIdList[layerSet] > 0)
-    {
-      Char* layerSetLayerIdListDup = cfg_layerSetLayerIdList[layerSet].empty() ? NULL : strdup(cfg_layerSetLayerIdList[layerSet].c_str());
-      Int  i = 0;
-      char *layerId = strtok(layerSetLayerIdListDup, " ,-");
-      while (layerId != NULL)
-      {
-        if (i >= m_numLayerInIdList[layerSet])
-        {
-          printf("NumLayerInIdList%d: The number of layers in the set is larger than the allowed number of layers.\n", layerSet);
-          exit(EXIT_FAILURE);
-        }
-        m_layerSetLayerIdList[layerSet][i] = atoi(layerId);
-        layerId = strtok(NULL, " ,-");
-        i++;
-      }
-
-      if( layerSetLayerIdListDup )
-      {
-        free( layerSetLayerIdListDup );
-        layerSetLayerIdListDup = NULL;
-      }
-    }
-#endif
   }
   for (Int addLayerSet = 0; addLayerSet < m_numAddLayerSets; addLayerSet++)
   {
-#if OUTPUT_LAYER_SETS_CONFIG
     // Simplifying the code in the #else section
     assert( scanStringToArray( cfg_highestLayerIdx[addLayerSet], m_numHighestLayerIdx[addLayerSet], "HighestLayerIdx", m_highestLayerIdx[addLayerSet] ) );
-#else
-    if (m_numHighestLayerIdx[addLayerSet] > 0)
-    {
-      Char* highestLayrIdxListDup = cfg_highestLayerIdx[addLayerSet].empty() ? NULL : strdup(cfg_highestLayerIdx[addLayerSet].c_str());
-      Int  i = 0;
-      char *layerIdx = strtok(highestLayrIdxListDup, " ,-");
-      while (layerIdx != NULL)
-      {
-        if (i >= m_numLayerInIdList[addLayerSet])
-        {
-          printf("NumLayerInIdList%d: The number of layer idx's in the highest layer idx list is larger than the allowed number of idx's.\n", addLayerSet);
-          exit(EXIT_FAILURE);
-        }
-        m_highestLayerIdx[addLayerSet][i] = atoi(layerIdx);
-        layerIdx = strtok(NULL, " ,-");
-        i++;
-      }
-
-      if( highestLayrIdxListDup )
-      {
-        free( highestLayrIdxListDup );
-        highestLayrIdxListDup = NULL;
-      }
-    }
-#endif
-  }
-#endif
-#if OUTPUT_LAYER_SETS_CONFIG
+  }
+#endif
+
   if( m_defaultTargetOutputLayerIdc != -1 )
   {
@@ -2593,5 +2529,4 @@
   delete [] cfg_listOfOutputLayers;
   delete cfg_outputLayerSetIdx;
-#endif
 #else //SVC_EXTENSION
   switch (m_conformanceWindowMode)
@@ -4684,9 +4619,5 @@
 
 #if SVC_EXTENSION
-#if OUTPUT_LAYER_SETS_CONFIG
 Void TAppEncCfg::cfgStringToArray(Int **arr, string const cfgString, Int const numEntries, const char* logString)
-#else
-Void TAppEncCfg::cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString)
-#endif
 {
   Char *tempChar = cfgString.empty() ? NULL : strdup(cfgString.c_str());
@@ -4697,5 +4628,4 @@
     *arr = new Int[numEntries];
 
-#if OUTPUT_LAYER_SETS_CONFIG
     if( tempChar == NULL )
     {
@@ -4706,7 +4636,5 @@
       arrayEntry = strtok( tempChar, " ,");
     }
-#else
-    arrayEntry = strtok( tempChar, " ,");
-#endif
+
     while(arrayEntry != NULL)
     {
@@ -4738,5 +4666,4 @@
 }
 
-#if OUTPUT_LAYER_SETS_CONFIG
 Bool TAppEncCfg::scanStringToArray(string const cfgString, Int const numEntries, const char* logString, Int * const returnArray)
 {
@@ -4755,4 +4682,5 @@
   return false;
 }
+
 Bool TAppEncCfg::scanStringToArray(string const cfgString, Int const numEntries, const char* logString, std::vector<Int> & returnVector)
 {
@@ -4772,7 +4700,5 @@
   return false;
 }
-#endif
-
-#if OUTPUT_LAYER_SETS_CONFIG
+
 Void TAppEncCfg::cfgStringToArrayNumEntries(Int **arr, string const cfgString, Int &numEntries, const char* logString)
 {
@@ -4842,5 +4768,4 @@
   return false;
 }
-#endif
 #endif //SVC_EXTENSION
 //! \}
Index: /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 1161)
+++ /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 1162)
@@ -81,11 +81,9 @@
   Int       m_highestLayerIdx[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_IDX_PLUS1];
 #endif
-#if OUTPUT_LAYER_SETS_CONFIG
-  std::vector<Int>                m_outputLayerSetIdx;
   Int       m_defaultTargetOutputLayerIdc;
   Int       m_numOutputLayerSets;
+  std::vector<Int>                m_outputLayerSetIdx;
   std::vector<Int>                m_numOutputLayersInOutputLayerSet;
   std::vector< std::vector<Int> > m_listOfOutputLayers;
-#endif
   Bool      m_isField;                                        ///< enable field coding
   Bool      m_isTopFieldFirst;
@@ -556,5 +554,5 @@
   Int  getWaveFrontSynchro(Int layerIdx)        { return m_acLayerCfg[layerIdx].m_waveFrontSynchro; }
   Void getDirFilename(string& filename, string& dir, const string path);
-#if OUTPUT_LAYER_SETS_CONFIG
+
   Bool scanStringToArray(string const cfgString, Int const numEntries, const char* logString, Int * const returnArray);
   Bool scanStringToArray(string const cfgString, Int const numEntries, const char* logString, std::vector<Int> &  returnVector);
@@ -563,7 +561,5 @@
   Bool scanStringToArrayNumEntries(string const cfgString, Int &numEntries, const char* logString, std::vector<Int> &  returnVector);
   Void cfgStringToArrayNumEntries(Int **arr, string const cfgString, Int &numEntries, const char* logString);
-#else
-  Void cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString);
-#endif
+
 #if REPN_FORMAT_IN_VPS
   RepFormatCfg* getRepFormatCfg(Int i)  { return &m_repFormatCfg[i]; }
Index: /branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1161)
+++ /branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1162)
@@ -1258,13 +1258,8 @@
 
 #if Q0078_ADD_LAYER_SETS
-#if OUTPUT_LAYER_SETS_CONFIG
   if (m_numLayerSets > 1)
   {
     vps->setNumLayerSets(m_numLayerSets);
-#else
-  if (m_numLayerSets > 0)
-  {
-    vps->setNumLayerSets(m_numLayerSets+1);
-#endif
+
     for (Int setId = 1; setId < vps->getNumLayerSets(); setId++)
     {
@@ -1276,14 +1271,8 @@
     for (Int setId = 1; setId < vps->getNumLayerSets(); setId++)
     {
-#if OUTPUT_LAYER_SETS_CONFIG
       for( i = 0; i < m_numLayerInIdList[setId]; i++ )
       {
         Int layerId = m_layerSetLayerIdList[setId][i];
         Int layerIdx = vps->getLayerIdxInVps(m_layerSetLayerIdList[setId][i]);
-#else
-      for( i = 0; i < m_numLayerInIdList[setId-1]; i++ )
-      {
-        Int layerId = m_layerSetLayerIdList[setId-1][i];
-#endif
 #if O0194_DIFFERENT_BITDEPTH_EL_BL
         //4
@@ -1544,6 +1533,4 @@
 #endif
 
-#if OUTPUT_LAYER_SETS_CONFIG
-
   vps->setDefaultTargetOutputLayerIdc( m_defaultTargetOutputLayerIdc ); // As per configuration file
 
@@ -1569,5 +1556,5 @@
     }
   }
-#endif
+
   // Target output layer
 #if !MULTIPLE_PTL_SUPPORT
@@ -1585,56 +1572,39 @@
 
   // derive OutputLayerFlag[i][j] 
-#if !OUTPUT_LAYER_SETS_CONFIG
-  if( vps->getDefaultTargetOutputLayerIdc() == 1 )
-#endif
-  {
-    // default_output_layer_idc equal to 1 specifies that only the layer with the highest value of nuh_layer_id such that nuh_layer_id equal to nuhLayerIdA and 
-    // AuxId[ nuhLayerIdA ] equal to 0 in each of the output layer sets with index in the range of 1 to vps_num_layer_sets_minus1, inclusive, is an output layer of its output layer set.
-
-    // Include the highest layer as output layer for each layer set
-    for(Int lsIdx = 1; lsIdx <= vps->getVpsNumLayerSetsMinus1(); lsIdx++)
-    {
-      for( UInt layer = 0; layer < vps->getNumLayersInIdList(lsIdx); layer++ )
-      {
+  // default_output_layer_idc equal to 1 specifies that only the layer with the highest value of nuh_layer_id such that nuh_layer_id equal to nuhLayerIdA and 
+  // AuxId[ nuhLayerIdA ] equal to 0 in each of the output layer sets with index in the range of 1 to vps_num_layer_sets_minus1, inclusive, is an output layer of its output layer set.
+
+  // Include the highest layer as output layer for each layer set
+  for(Int lsIdx = 1; lsIdx <= vps->getVpsNumLayerSetsMinus1(); lsIdx++)
+  {
+    for( UInt layer = 0; layer < vps->getNumLayersInIdList(lsIdx); layer++ )
+    {
 #if !Q0078_ADD_LAYER_SETS  // the following condition is incorrect and is not needed anyway
-        if( vps->getLayerIdIncludedFlag(lsIdx, layer) )      
-#endif
+      if( vps->getLayerIdIncludedFlag(lsIdx, layer) )      
+#endif
+      {
+        switch(vps->getDefaultTargetOutputLayerIdc())
         {
-#if OUTPUT_LAYER_SETS_CONFIG
-          switch(vps->getDefaultTargetOutputLayerIdc())
-          {
-            case 0: vps->setOutputLayerFlag( lsIdx, layer, 1 );
-              break;
-            case 1: vps->setOutputLayerFlag( lsIdx, layer, layer == vps->getNumLayersInIdList(lsIdx) - 1 );
-              break;
-            case 2:
-            case 3: vps->setOutputLayerFlag( lsIdx, layer, (layer != vps->getNumLayersInIdList(lsIdx) - 1) ? std::find( m_listOfOutputLayers[lsIdx].begin(), m_listOfOutputLayers[lsIdx].end(), m_layerSetLayerIdList[lsIdx][layer]) != m_listOfOutputLayers[lsIdx].end() 
-                                                                                                           : m_listOfOutputLayers[lsIdx][m_listOfOutputLayers[lsIdx].size()-1] == m_layerSetLayerIdList[lsIdx][layer] );
-              break;
-          }
-#else
-          vps->setOutputLayerFlag( lsIdx, layer, layer == vps->getNumLayersInIdList(lsIdx) - 1 );
-#endif
+        case 0: vps->setOutputLayerFlag( lsIdx, layer, 1 );
+          break;
+        case 1: vps->setOutputLayerFlag( lsIdx, layer, layer == vps->getNumLayersInIdList(lsIdx) - 1 );
+          break;
+        case 2:
+        case 3: vps->setOutputLayerFlag( lsIdx, layer, (layer != vps->getNumLayersInIdList(lsIdx) - 1) ? std::find( m_listOfOutputLayers[lsIdx].begin(), m_listOfOutputLayers[lsIdx].end(), m_layerSetLayerIdList[lsIdx][layer]) != m_listOfOutputLayers[lsIdx].end() 
+                  : m_listOfOutputLayers[lsIdx][m_listOfOutputLayers[lsIdx].size()-1] == m_layerSetLayerIdList[lsIdx][layer] );
+          break;
         }
       }
     }
-#if OUTPUT_LAYER_SETS_CONFIG
-    for( Int olsIdx = vps->getVpsNumLayerSetsMinus1() + 1; olsIdx < vps->getNumOutputLayerSets(); olsIdx++ )
-    {
-      for( UInt layer = 0; layer < vps->getNumLayersInIdList(vps->getOutputLayerSetIdx(olsIdx)); layer++ )
-      {
-        vps->setOutputLayerFlag( olsIdx, layer, (layer != vps->getNumLayersInIdList(vps->getOutputLayerSetIdx(olsIdx)) - 1) ? std::find( m_listOfOutputLayers[olsIdx].begin(), m_listOfOutputLayers[olsIdx].end(), vps->getLayerSetLayerIdList(vps->getOutputLayerSetIdx(olsIdx), layer)) != m_listOfOutputLayers[olsIdx].end()
-                                                                                                                            : m_listOfOutputLayers[olsIdx][m_listOfOutputLayers[olsIdx].size()-1] == vps->getLayerSetLayerIdList(vps->getOutputLayerSetIdx(olsIdx), layer) );
-      }
-    }
-#endif
-  }
-#if !OUTPUT_LAYER_SETS_CONFIG
-  else
-  {
-    // cases when default_output_layer_idc is not equal to 1
-    assert(!"default_output_layer_idc not equal to 1 is not yet supported");
-  }
-#endif
+  }
+
+  for( Int olsIdx = vps->getVpsNumLayerSetsMinus1() + 1; olsIdx < vps->getNumOutputLayerSets(); olsIdx++ )
+  {
+    for( UInt layer = 0; layer < vps->getNumLayersInIdList(vps->getOutputLayerSetIdx(olsIdx)); layer++ )
+    {
+      vps->setOutputLayerFlag( olsIdx, layer, (layer != vps->getNumLayersInIdList(vps->getOutputLayerSetIdx(olsIdx)) - 1) ? std::find( m_listOfOutputLayers[olsIdx].begin(), m_listOfOutputLayers[olsIdx].end(), vps->getLayerSetLayerIdList(vps->getOutputLayerSetIdx(olsIdx), layer)) != m_listOfOutputLayers[olsIdx].end()
+        : m_listOfOutputLayers[olsIdx][m_listOfOutputLayers[olsIdx].size()-1] == vps->getLayerSetLayerIdList(vps->getOutputLayerSetIdx(olsIdx), layer) );
+    }
+  }
 
   vps->deriveNecessaryLayerFlag();
Index: /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1161)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1162)
@@ -53,5 +53,4 @@
 #define POC_RESET_RESTRICTIONS           1      ///< Restrictions on semantics of POC reset-related syntax elements, including one item from R0223
 #define POC_RESET_VALUE_RESTRICTION      1      ///< R0223: Restriction on the value of full_poc_reset_flag
-#define OUTPUT_LAYER_SETS_CONFIG         1
 #define PTL_SIGNALLING                   1      ///< Overall macro for all PTL-related signalling
 #if PTL_SIGNALLING
