Index: branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 563)
+++ branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 564)
@@ -117,11 +117,7 @@
 #if SVC_EXTENSION
   memset( m_pcBaseColPic, 0, sizeof( m_pcBaseColPic ) );
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
   m_activeNumILRRefIdx        = 0; 
   m_interLayerPredEnabledFlag = 0;
   ::memset( m_interLayerPredLayerIdc, 0, sizeof(m_interLayerPredLayerIdc) );
-#else
-  m_numILRRefIdx = 0;
-#endif 
 #endif //SVC_EXTENSION
 
@@ -167,10 +163,6 @@
 #if SVC_EXTENSION
   m_layerId = layerId;
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
   m_activeNumILRRefIdx        = 0;
   m_interLayerPredEnabledFlag = 0;
-#else
-  m_numILRRefIdx              = 0;
-#endif
 #endif
   m_aiNumRefIdx[0]      = 0;
@@ -485,5 +477,4 @@
       }
     }
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
     if (numInterLayerRPSPics < m_activeNumILRRefIdx)
     {
@@ -564,17 +555,7 @@
 #endif
     }
-#endif 
-#else
-    if (numInterLayerRPSPics < m_numILRRefIdx)
-    {
-      m_numILRRefIdx = numInterLayerRPSPics;
-    }
-#endif
-  }
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
+#endif
+  }
   Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + m_activeNumILRRefIdx;
-#else
-  Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + m_numILRRefIdx;
-#endif 
 #else //SVC_EXTENSION
   Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr;
@@ -620,9 +601,5 @@
     if( m_layerId > 0 )
     {      
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
       for( i = 0; i < m_activeNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)      
-#else
-      for( i = 0; i < m_numILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)
-#endif 
       {
         Int refLayerIdc = m_interLayerPredLayerIdc[i];
@@ -652,9 +629,5 @@
     if( m_layerId > 0 )
     {
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
       for( i = 0; i < m_activeNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)      
-#else
-      for( i = 0; i < m_numILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)
-#endif 
       {
         Int refLayerIdc = m_interLayerPredLayerIdc[i];
@@ -693,9 +666,5 @@
     if( m_layerId > 0 )
     {
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
       for( i = 0; i < m_activeNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)
-#else
-      for( i = 0; i < m_numILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)
-#endif 
       {
         Int refLayerIdc = m_interLayerPredLayerIdc[i];
@@ -799,9 +768,5 @@
     else
     {
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
       for(Int i = m_activeNumILRRefIdx; i > 0; i-- )
-#else
-      for(Int i = m_numILRRefIdx; i > 0; i-- )
-#endif 
       {
 #if RPL_INIT_N0316_N0082
@@ -848,9 +813,5 @@
     else
     {
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
       for(Int i = m_activeNumILRRefIdx; i > 0; i-- )
-#else
-      for(Int i = m_numILRRefIdx; i > 0; i-- )
-#endif 
       {
         refPicListModification->setRefPicSetIdxL1(m_aiNumRefIdx[REF_PIC_LIST_1] - i, numberOfRpsCurrTempList - i);
@@ -894,9 +855,5 @@
   {
 #if SVC_EXTENSION
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
     return m_activeNumILRRefIdx;
-#else
-    return getNumILRRefIdx();
-#endif 
 #else
     return 0;
@@ -913,9 +870,5 @@
   if( m_layerId > 0 )
   {
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
     numRpsCurrTempList += m_activeNumILRRefIdx;
-#else
-    numRpsCurrTempList += getNumILRRefIdx();
-#endif
 }
 #endif
@@ -1146,9 +1099,7 @@
   m_pcVPS                = pSrc->m_pcVPS;
   m_layerId              = pSrc->m_layerId;
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
   m_activeNumILRRefIdx         = pSrc->m_activeNumILRRefIdx;
   m_interLayerPredEnabledFlag  = pSrc->m_interLayerPredEnabledFlag;
   memcpy( m_interLayerPredLayerIdc, pSrc->m_interLayerPredLayerIdc, sizeof( m_interLayerPredLayerIdc ) );
-#endif
 #endif
   m_pcSPS                = pSrc->m_pcSPS;
@@ -2076,7 +2027,5 @@
 #endif
   ::memset(m_profileLevelTierIdx,  0, sizeof(m_profileLevelTierIdx));
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
   m_maxOneActiveRefLayerFlag = true;
-#endif
 #if O0062_POC_LSB_NOT_PRESENT_FLAG
   ::memset(m_pocLsbNotPresentFlag, 0, sizeof(m_pocLsbNotPresentFlag));
Index: branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.h	(revision 563)
+++ branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.h	(revision 564)
@@ -546,7 +546,5 @@
 #endif
   Int        m_profileLevelTierIdx[64];     
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
   Bool       m_maxOneActiveRefLayerFlag;
-#endif
 #if O0062_POC_LSB_NOT_PRESENT_FLAG
   Bool       m_pocLsbNotPresentFlag[MAX_VPS_LAYER_ID_PLUS1];
@@ -655,5 +653,4 @@
 #endif
 
-#endif //SVC_EXTENSION
 #if !P0307_REMOVE_VPS_VUI_OFFSET
 #if VPS_VUI_OFFSET
@@ -664,4 +661,5 @@
   Int     m_vpsNonVuiExtLength;
 #endif
+#endif //SVC_EXTENSION
 public:
   TComVPS();
@@ -841,8 +839,6 @@
   Int    getProfileLevelTierIdx(Int i)                        { return m_profileLevelTierIdx[i]; }
   Void   setProfileLevelTierIdx(Int i, Int x)                 { m_profileLevelTierIdx[i] = x   ; }
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
   Bool   getMaxOneActiveRefLayerFlag()                                          { return m_maxOneActiveRefLayerFlag;                      }
   Void   setMaxOneActiveRefLayerFlag(Bool x)                                    { m_maxOneActiveRefLayerFlag = x;                         }
-#endif
 #if O0062_POC_LSB_NOT_PRESENT_FLAG
   UInt   getPocLsbNotPresentFlag(Int i)                                         { return m_pocLsbNotPresentFlag[i]; }
@@ -1871,13 +1867,7 @@
 #endif
 
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
   Bool        m_interLayerPredEnabledFlag;
   Int         m_activeNumILRRefIdx;        //< Active inter-layer reference pictures
   Int         m_interLayerPredLayerIdc  [MAX_VPS_LAYER_ID_PLUS1];
-#else
-#if SVC_EXTENSION
-  Int         m_numILRRefIdx;       //< for inter-layer reference picture ser
-#endif
-#endif 
 #if POC_RESET_FLAG
   Bool        m_bPocResetFlag;
@@ -2142,5 +2132,4 @@
 #endif
 
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
   Int       getActiveNumILRRefIdx     ( )               { return  m_activeNumILRRefIdx; }
   Void      setActiveNumILRRefIdx     ( Int i )         { m_activeNumILRRefIdx = i;     }  
@@ -2151,7 +2140,4 @@
   Void      setInterLayerPredEnabledFlag     ( Bool   val )    { m_interLayerPredEnabledFlag = val; }
   Bool      getInterLayerPredEnabledFlag     ()                { return m_interLayerPredEnabledFlag;}
-#else
-  Void      setNumILRRefIdx     ( Int i )               { m_numILRRefIdx = i;     }
-#endif 
 
   Void      setNumMotionPredRefLayers(int i)            { m_numMotionPredRefLayers = i; }
Index: branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 563)
+++ branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 564)
@@ -149,9 +149,6 @@
 #define ENCODER_FAST_MODE                1      ///< JCTVC-L0174: enable encoder fast mode. TestMethod 1 is enabled by setting to 1 and TestMethod 2 is enable by setting to 2. By default it is set to 1.
 #define REF_IDX_MFM                      1      ///< JCTVC-L0336: motion vector mapping of inter-layer reference picture
-#define JCTVC_M0458_INTERLAYER_RPS_SIG   1      ///< implementation of JCTVC-L0178
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
 #define MAX_ONE_RESAMPLING_DIRECT_LAYERS 1      ///< Allow maximum of one resampling process for direct reference layers
 #define MOTION_RESAMPLING_CONSTRAINT     1      ///< JCTVC-N0108: Allow maximum of one motion resampling process for direct reference layers, and use motion inter-layer prediction from the same layer as texture inter-layer prediction.
-#endif
 #define JCTVC_M0203_INTERLAYER_PRED_IDC  1      ///< JCTVC-M0203: implementation of Inter-layer Prediction Indication
 #if JCTVC_M0203_INTERLAYER_PRED_IDC
@@ -161,5 +158,4 @@
 #define O0225_MAX_TID_FOR_REF_LAYERS     1
 #define O0225_TID_BASED_IL_RPS_DERIV     1
-
 #define VPS_TSLAYERS                     1      ///< JCTVC-O0120 signal max temporal sub-layers for each layer
 #define TSLAYERS_IL_RPS                  1      ///< JCTVC-O0120 IL RPS based on max temporal sub-layers
Index: branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 563)
+++ branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 564)
@@ -1342,8 +1342,6 @@
   }
 #endif
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
   READ_FLAG(uiCode, "max_one_active_ref_layer_flag" );
   vps->setMaxOneActiveRefLayerFlag(uiCode);
-#endif
 #if O0062_POC_LSB_NOT_PRESENT_FLAG
   for(i = 1; i< vps->getMaxLayers(); i++)
@@ -2054,5 +2052,4 @@
 
 #if SVC_EXTENSION
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
     rpcSlice->setActiveNumILRRefIdx(0);
 #if ILP_SSH_SIG
@@ -2156,10 +2153,4 @@
     }
 #endif
-#else
-    if( rpcSlice->getLayerId() > 0 )
-    {
-      rpcSlice->setNumILRRefIdx( rpcSlice->getVPS()->getNumDirectRefLayers( rpcSlice->getLayerId() ) );
-    }
-#endif
 #endif
 
Index: branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 563)
+++ branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 564)
@@ -1021,7 +1021,5 @@
 #endif
 
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
-      WRITE_FLAG(vps->getMaxOneActiveRefLayerFlag(), "max_one_active_ref_layer_flag");
-#endif
+  WRITE_FLAG(vps->getMaxOneActiveRefLayerFlag(), "max_one_active_ref_layer_flag");
 #if O0062_POC_LSB_NOT_PRESENT_FLAG
   for(i = 1; i< vps->getMaxLayers(); i++)
@@ -1604,5 +1602,5 @@
     }
 
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
+#if SVC_EXTENSION
 #if ILP_SSH_SIG
 #if ILP_SSH_SIG_FIX
@@ -1643,5 +1641,5 @@
       }
     }     
-#endif 
+#endif //SVC_EXTENSION
 
     if(pcSlice->getSPS()->getUseSAO())
Index: branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 563)
+++ branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 564)
@@ -1148,12 +1148,7 @@
 #endif
       {
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
         pcSlice->setActiveNumILRRefIdx(0);
         pcSlice->setInterLayerPredEnabledFlag(0);
-#else
-        pcSlice->setNumILRRefIdx(0);
-#endif
-      }
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
+      }
       if( pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA )
       {
@@ -1166,16 +1161,4 @@
         pcSlice->setNumRefIdx(REF_PIC_LIST_1, pcSlice->getNumRefIdx(REF_PIC_LIST_1)+pcSlice->getActiveNumILRRefIdx());
       }
-#else
-      if( pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA )
-      {
-        pcSlice->setNumRefIdx(REF_PIC_LIST_0, pcSlice->getNumILRRefIdx());
-        pcSlice->setNumRefIdx(REF_PIC_LIST_1, pcSlice->getNumILRRefIdx());
-      }
-      else
-      {
-        pcSlice->setNumRefIdx(REF_PIC_LIST_0, pcSlice->getNumRefIdx(REF_PIC_LIST_0)+pcSlice->getNumILRRefIdx());
-        pcSlice->setNumRefIdx(REF_PIC_LIST_1, pcSlice->getNumRefIdx(REF_PIC_LIST_1)+pcSlice->getNumILRRefIdx());
-      }
-#endif
     }
 #endif //SVC_EXTENSION
Index: branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 563)
+++ branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 564)
@@ -523,5 +523,4 @@
   if( layerId > 0 )
   {
-#if JCTVC_M0458_INTERLAYER_RPS_SIG
     if( rpcSlice->getNumILRRefIdx() > 0 )
     {
@@ -533,7 +532,4 @@
       rpcSlice->setInterLayerPredEnabledFlag(1);
     }
-#else
-    rpcSlice->setNumILRRefIdx( rpcSlice->getVPS()->getNumDirectRefLayers( layerId ) );
-#endif
     rpcSlice->setMFMEnabledFlag(m_ppcTEncTop[layerId]->getMFMEnabledFlag());
   }
