Index: branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.cpp
===================================================================
--- branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.cpp	(revision 1106)
+++ branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.cpp	(revision 1107)
@@ -259,11 +259,4 @@
       }
       fclose (targetDecLayerIdSetFile);
-#if !R0235_SMALLEST_LAYER_ID  // LayerId=0 is not required anymore in some cases
-      if ( m_targetDecLayerIdSet.size() > 0 && !isLayerIdZeroIncluded )
-      {
-        fprintf(stderr, "TargetDecLayerIdSet must contain LayerId=0, aborting" );
-        return false;
-      }
-#endif
     }
     else
Index: branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp	(revision 1106)
+++ branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp	(revision 1107)
@@ -1284,5 +1284,5 @@
     return true;
   }
-#if R0235_SMALLEST_LAYER_ID
+#if SVC_EXTENSION
   if (nalu->m_layerId == 0 && (nalu->m_nalUnitType == NAL_UNIT_VPS || nalu->m_nalUnitType == NAL_UNIT_SPS || nalu->m_nalUnitType == NAL_UNIT_PPS || nalu->m_nalUnitType == NAL_UNIT_EOS))
   {
@@ -1299,4 +1299,5 @@
   return false;
 }
+
 #if ALIGNED_BUMPING
 // Function outputs a picture, and marks it as not needed for output.
Index: branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1106)
+++ branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1107)
@@ -2611,5 +2611,5 @@
 #if MULTIPLE_PTL_SUPPORT
     Int olsToLsIndex = (olsCtr >= (m_numLayerSets + m_numAddLayerSets)) ? m_outputLayerSetIdx[olsCtr - (m_numLayerSets + m_numAddLayerSets)] : olsCtr;
-#if R0235_SMALLEST_LAYER_ID
+
     // This is a fix to allow setting of PTL for additional layer sets
     if (olsCtr >= m_numLayerSets && olsCtr < (m_numLayerSets + m_numAddLayerSets))
@@ -2621,7 +2621,5 @@
       scanStringToArray(cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsToLsIndex], "List of PTL for each layers in OLS", m_listOfLayerPTLofOlss[olsCtr]);
     }
-#else
-    scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsToLsIndex], "List of PTL for each layers in OLS", m_listOfLayerPTLofOlss[olsCtr] );
-#endif
+
     //For conformance checking
     //Conformance of a layer in an output operation point associated with an OLS in a bitstream to the Scalable Main profile is indicated as follows:
@@ -2630,20 +2628,16 @@
     //If OpTid of the output operation point is equal to vps_max_sub_layer_minus1, the conformance is indicated by general_profile_idc being equal to 7 or general_profile_compatibility_flag[ 7 ] being equal to 1
     //The following assert may be updated / upgraded to take care of general_profile_compatibility_flag.
-#if R0235_SMALLEST_LAYER_ID
     if (m_numAddLayerSets == 0)
     {
-#endif
-    for ( Int ii = 1; ii < m_numLayerInIdList[olsToLsIndex]; ii++)
-    {
-      if (m_layerSetLayerIdList[olsToLsIndex][ii - 1] != 0 && m_layerSetLayerIdList[olsToLsIndex][ii] != 0)  //Profile / profile compatibility of enhancement layers must indicate the same profile.
-      {
-        assert( (m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) ||
-                (m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileCompatibility[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) ||   
-                (m_profileCompatibility[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) );
-      }
-    }
-#if R0235_SMALLEST_LAYER_ID
-    }
-#endif
+      for ( Int ii = 1; ii < m_numLayerInIdList[olsToLsIndex]; ii++)
+      {
+        if (m_layerSetLayerIdList[olsToLsIndex][ii - 1] != 0 && m_layerSetLayerIdList[olsToLsIndex][ii] != 0)  //Profile / profile compatibility of enhancement layers must indicate the same profile.
+        {
+          assert( (m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) ||
+            (m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileCompatibility[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) ||   
+            (m_profileCompatibility[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) );
+        }
+      }
+    }
 #endif
   }
@@ -4854,5 +4848,4 @@
 #endif
 
-#if R0235_SMALLEST_LAYER_ID
 #if OUTPUT_LAYER_SETS_CONFIG
 Void TAppEncCfg::cfgStringToArrayNumEntries(Int **arr, string const cfgString, Int &numEntries, const char* logString)
@@ -4924,5 +4917,4 @@
 }
 #endif
-#endif // R0235
 #endif //SVC_EXTENSION
 //! \}
Index: branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 1106)
+++ branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 1107)
@@ -576,9 +576,7 @@
   Bool scanStringToArray(string const cfgString, Int const numEntries, const char* logString, std::vector<Int> &  returnVector);
   Void cfgStringToArray(Int **arr, string const cfgString, Int const numEntries, const char* logString);
-#if R0235_SMALLEST_LAYER_ID
   Bool scanStringToArrayNumEntries(string const cfgString, Int &numEntries, const char* logString, Int * const returnArray);
   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);
-#endif
 #else
   Void cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString);
Index: branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1106)
+++ branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1107)
@@ -869,9 +869,5 @@
  */
 #if NO_CLRAS_OUTPUT_FLAG
-#if R0235_SMALLEST_LAYER_ID
 Void TComSlice::decodingRefreshMarking( TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag, UInt smallestLayerId )
-#else
-Void TComSlice::decodingRefreshMarking( TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag )
-#endif
 {
   if( !isIRAP() )
@@ -885,9 +881,5 @@
   // When the current picture is an IRAP picture with nuh_layer_id equal to 0 and NoClrasOutputFlag is equal to 1, 
   // all reference pictures with any value of nuh_layer_id currently in the DPB (if any) are marked as "unused for reference".
-#if R0235_SMALLEST_LAYER_ID
   if (m_layerId == smallestLayerId && noClrasOutputFlag)
-#else
-  if( m_layerId == 0 && noClrasOutputFlag )
-#endif
   {
     // mark all pictures for all layers as not used for reference
Index: branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 1106)
+++ branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 1107)
@@ -2405,9 +2405,5 @@
   Void      checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, NalUnitType& associatedIRAPType, TComList<TComPic *>& rcListPic);
 #if NO_CLRAS_OUTPUT_FLAG
-#if R0235_SMALLEST_LAYER_ID
   Void      decodingRefreshMarking( TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag, UInt smallestLayerId = 0 );
-#else
-  Void      decodingRefreshMarking( TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag );
-#endif
   Void      decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag);
 #else
Index: branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1106)
+++ branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1107)
@@ -77,5 +77,4 @@
 #define R0227_BR_PR_ADD_LAYER_SET        1      ///< JCTVC-R0227, Signalling of bit-rate and picture rate for additional layer set
 #define R0042_PROFILE_INDICATION         1      ///< JCTVC-R0042, Profile indication for additional layer sets
-#define R0235_SMALLEST_LAYER_ID          1      ///< JCTVC-R0235, SmallestLayerId semantics 
 
 #define Q0108_TSA_STSA                   1      ///< JCTVC-Q0108, Remove cross-layer alignment constraints of TSA and STSA pictures, enable to have different prediction structures in different layers
Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1106)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1107)
@@ -1475,9 +1475,5 @@
           for(Int kk = 0; kk < pcSlice->getVPS()->getNumLayersInIdList(layerSetIdxForOutputLayerSet); kk++)
           {
-#if R0235_SMALLEST_LAYER_ID
             if( pcSlice->getVPS()->getNecessaryLayerFlag(ii, kk) && pcSlice->getLayerId() == pcSlice->getVPS()->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, kk) )
-#else
-            if(pcSlice->getLayerId() == pcSlice->getVPS()->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, kk))
-#endif
             {
               chkAssert=1;
@@ -3102,18 +3098,15 @@
         //If OpTid of the output operation point is equal to vps_max_sub_layer_minus1, the conformance is indicated by general_profile_idc being equal to 7 or general_profile_compatibility_flag[ 7 ] being equal to 1
         //The following assert may be updated / upgraded to take care of general_profile_compatibility_flag.
-#if R0235_SMALLEST_LAYER_ID
+
         // The assertion below is not valid for independent non-base layers 
         if (vps->getNumAddLayerSets() == 0)
         {
-#endif
-        if( j > 0 && vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j) != 0 && vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j - 1) != 0 && vps->getNecessaryLayerFlag(i, j-1) )
-        {
-          assert(vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileIdc() == vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileIdc() ||
-                 vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileCompatibilityFlag(vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileIdc()) ||  
-                 vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileCompatibilityFlag(vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileIdc())  );
-        }
-#if R0235_SMALLEST_LAYER_ID
-        }
-#endif
+          if( j > 0 && vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j) != 0 && vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j - 1) != 0 && vps->getNecessaryLayerFlag(i, j-1) )
+          {
+            assert(vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileIdc() == vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileIdc() ||
+              vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileCompatibilityFlag(vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileIdc()) ||  
+              vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileCompatibilityFlag(vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileIdc())  );
+          }
+        }
 #endif
       }
Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1106)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1107)
@@ -91,7 +91,5 @@
 #if SVC_EXTENSION 
   m_layerId = 0;
-#if R0235_SMALLEST_LAYER_ID
   m_smallestLayerId = 0;
-#endif
 #if AVC_BASE
   m_pBLReconFile = NULL;
@@ -736,5 +734,4 @@
 #if OUTPUT_LAYER_SET_INDEX
   // Following check should go wherever the VPS is activated
-#if R0235_SMALLEST_LAYER_ID
   if (!m_apcSlicePilot->getVPS()->getBaseLayerAvailableFlag())
   {
@@ -747,7 +744,4 @@
     }
   }  
-#else
-  checkValueOfTargetOutputLayerSetIdx( m_apcSlicePilot->getVPS());
-#endif
 #endif
   m_apcSlicePilot->initSlice( nalu.m_layerId );
@@ -876,9 +870,5 @@
 #if NO_OUTPUT_OF_PRIOR_PICS
 #if NO_CLRAS_OUTPUT_FLAG
-#if R0235_SMALLEST_LAYER_ID
   if (m_layerId == m_smallestLayerId && m_apcSlicePilot->getRapPicFlag())
-#else
-  if (m_layerId == 0 && m_apcSlicePilot->getRapPicFlag() )
-#endif
   {
     if (m_bFirstSliceInSequence)
@@ -912,9 +902,5 @@
   }
 
-#if R0235_SMALLEST_LAYER_ID
   m_apcSlicePilot->decodingRefreshMarking( m_cListPic, m_noClrasOutputFlag, m_smallestLayerId );
-#else
-  m_apcSlicePilot->decodingRefreshMarking( m_cListPic, m_noClrasOutputFlag );
-#endif
 #endif
 
@@ -2067,5 +2053,5 @@
   m_cEntropyDecoder.decodeVPS( vps );
   m_parameterSetManagerDecoder.storePrefetchedVPS(vps);
-#if R0235_SMALLEST_LAYER_ID
+#if SVC_EXTENSION
   checkValueOfTargetOutputLayerSetIdx(vps);
 #endif
@@ -2243,4 +2229,5 @@
       TComCodingStatistics::IncrementStatisticEP(STATS__BYTE_ALIGNMENT_BITS,nalu.m_Bitstream->readByteAlignment(),0);
 #endif
+#if SVC_EXTENSION
 #if Q0177_EOS_CHECKS
       m_isLastNALWasEos = false;
@@ -2265,5 +2252,4 @@
       }
 #endif
-#if R0235_SMALLEST_LAYER_ID
       xDeriveSmallestLayerId(m_parameterSetManagerDecoder.getPrefetchedVPS(0));
 #endif
@@ -2696,7 +2682,5 @@
   {
     // Check if the target decoded layer is the highest layer in the list
-#if R0235_SMALLEST_LAYER_ID
     assert( params->getTargetOutputLayerSetIdx() < vps->getNumOutputLayerSets() );
-#endif
 #if !CONFORMANCE_BITSTREAM_MODE
     assert( params->getTargetOutputLayerSetIdx() < vps->getNumLayerSets() );
@@ -2705,18 +2689,4 @@
 #if !CONFORMANCE_BITSTREAM_MODE
     assert( params->getTargetLayerId() == vps->getNumLayersInIdList( layerSetIdx ) - 1);
-#endif
-    
-#if !R0235_SMALLEST_LAYER_ID
-    Bool layerSetMatchFlag = true;
-    for(Int j = 0; j < vps->getNumLayersInIdList( layerSetIdx ); j++)
-    {
-      if( vps->getLayerSetLayerIdList( layerSetIdx, j ) != j )
-      {
-        layerSetMatchFlag = false;
-        break;
-      }
-    }
-
-    assert(layerSetMatchFlag);    // Signaled output layer set index does not match targetOutputLayerId.
 #endif
     
@@ -2803,9 +2773,5 @@
 Void TDecTop::xCheckLayerReset()
 {
-#if R0235_SMALLEST_LAYER_ID
   if (m_apcSlicePilot->isIRAP() && m_layerId > m_smallestLayerId)
-#else
-  if (m_apcSlicePilot->isIRAP() && m_layerId > 0)
-#endif
   {
     Bool layerResetFlag;
@@ -2891,5 +2857,5 @@
 #endif
 
-#if R0235_SMALLEST_LAYER_ID
+#if SVC_EXTENSION
 Void TDecTop::xDeriveSmallestLayerId(TComVPS* vps)
 {
Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 1106)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 1107)
@@ -133,7 +133,5 @@
   UInt                    m_numLayer;
   TDecTop**               m_ppcTDecTop;
-#if R0235_SMALLEST_LAYER_ID
   UInt                    m_smallestLayerId;
-#endif
 #if P0297_VPS_POC_LSB_ALIGNED_FLAG
   Bool                    m_pocResettingFlag;
@@ -245,7 +243,5 @@
   Void      setLayerDec                     (TDecTop **p)                   { m_ppcTDecTop = p;                }
   TDecTop*  getLayerDec                     (UInt layerId)                  { return m_ppcTDecTop[layerId];    }
-#if R0235_SMALLEST_LAYER_ID
   Void      xDeriveSmallestLayerId(TComVPS* vps);
-#endif
 #if VPS_EXTN_DIRECT_REF_LAYERS
   TDecTop*  getRefLayerDec                  (UInt refLayerIdx);
@@ -288,5 +284,4 @@
 #if CONFORMANCE_BITSTREAM_MODE
   std::vector<TComPic>* getConfListPic() {return &m_confListPic; }
-  // std::string const getDecodedYuvLayerFileName(Int layerId) { return m_decodedYuvLayerFileName[layerId]; }
   Bool const getConfModeFlag() { return m_confModeFlag; }
   Void setConfModeFlag(Bool x) { m_confModeFlag = x; }
