Index: branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 173)
+++ branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 174)
@@ -895,5 +895,5 @@
   }
 #endif
-#if JCTVC_M0458        
+#if JCTVC_M0458_INTERLAYER_RPS_SIG        
     vps->setMaxOneActiveRefLayerFlag(true); 
 #endif 
Index: branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 173)
+++ branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 174)
@@ -126,10 +126,10 @@
   m_numILRRefIdx = 0;
 #endif
-#if JCTVC_M0458
-  m_aiActiveNumILRRefIdx      = 0; 
-  m_InterLayerPredEnabledFlag = 0;
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
+  m_activeNumILRRefIdx      = 0; 
+  m_bInterLayerPredEnabledFlag = 0;
 
   for ( Int idx = 0; idx < MAX_VPS_LAYER_ID_PLUS1; idx++ )
-    m_interLayerPredLayerIdc[idx] = 0; 
+    m_aiInterLayerPredLayerIdc[idx] = 0; 
 #endif 
 
@@ -186,16 +186,16 @@
   {
     m_numILRRefIdx              = m_pcVPS->getNumDirectRefLayers( layerId );
-#if JCTVC_M0458
-    m_aiActiveNumILRRefIdx      = 1;         
-    m_InterLayerPredEnabledFlag = 1;   
-#endif 
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
+    m_activeNumILRRefIdx         = m_pcVPS->getNumDirectRefLayers( layerId );         
+    m_bInterLayerPredEnabledFlag = 1;   
+#endif  
   }
   else
   {
     m_numILRRefIdx              = 0;
-#if JCTVC_M0458
-    m_aiActiveNumILRRefIdx      = 0;
-    m_InterLayerPredEnabledFlag = 0;
-#endif 
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
+    m_activeNumILRRefIdx      = 0;
+    m_bInterLayerPredEnabledFlag = 0;
+#endif  
   }
 #endif
@@ -544,6 +544,6 @@
   TComPic*  rpsCurrList1[MAX_NUM_REF+1];
 #if REF_IDX_FRAMEWORK
-#if JCTVC_M0458
-  Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + m_aiActiveNumILRRefIdx;
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
+  Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + m_activeNumILRRefIdx;
 #else
   Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + m_numILRRefIdx;
@@ -594,6 +594,6 @@
     if(getLayerId())
     {
-#if JCTVC_M0458
-      for( i = 0; i < m_aiActiveNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)      
+#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 ++)
@@ -622,6 +622,6 @@
     if(getLayerId())
     {
-#if JCTVC_M0458
-      for( i = 0; i < m_aiActiveNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)
+#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 ++)
@@ -696,6 +696,6 @@
     else
     {
-#if JCTVC_M0458
-      for(Int i = m_aiActiveNumILRRefIdx; i > 0; i-- )
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
+      for(Int i = m_activeNumILRRefIdx; i > 0; i-- )
 #else
       for(Int i = m_numILRRefIdx; i > 0; i-- )
@@ -726,6 +726,6 @@
     else
     {
-#if JCTVC_M0458
-      for(Int i = m_aiActiveNumILRRefIdx; i > 0; i-- )
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
+      for(Int i = m_activeNumILRRefIdx; i > 0; i-- )
 #else
       for(Int i = m_numILRRefIdx; i > 0; i-- )
@@ -753,6 +753,6 @@
   {
 #if REF_IDX_FRAMEWORK
-#if JCTVC_M0458
-    return m_aiActiveNumILRRefIdx;
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
+    return m_activeNumILRRefIdx;
 #else
     return m_numILRRefIdx;
@@ -772,5 +772,5 @@
   if(getLayerId())
   {
-#if JCTVC_M0458
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
     numRpsCurrTempList += getActiveNumILRRefIdx();
 #else
@@ -1589,5 +1589,5 @@
   ::memset(m_profileLevelTierIdx,  0, sizeof(m_profileLevelTierIdx));
 #endif
-#if JCTVC_M0458
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
   m_maxOneActiveRefLayerFlag = true;
 #endif
Index: branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.h	(revision 173)
+++ branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.h	(revision 174)
@@ -557,5 +557,5 @@
   Int        m_profileLevelTierIdx[64];     
 #endif
-#if JCTVC_M0458
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
   Bool       m_maxOneActiveRefLayerFlag;
 #endif
@@ -708,5 +708,5 @@
   Void   setProfileLevelTierIdx(Int i, Int x)                 { m_profileLevelTierIdx[i] = x   ; }
 #endif
-#if JCTVC_M0458
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
   Bool   getMaxOneActiveRefLayerFlag()                                          { return m_maxOneActiveRefLayerFlag;                      }
   Void   setMaxOneActiveRefLayerFlag(Bool x)                                    { m_maxOneActiveRefLayerFlag = x;                         }
@@ -1420,7 +1420,7 @@
   Int         m_numILRRefIdx;       //< for inter-layer reference picture ser
 #endif
-#if JCTVC_M0458
-  UInt         m_aiActiveNumILRRefIdx;        //< Active inter-layer reference pictures
-  UInt         m_interLayerPredLayerIdc  [MAX_VPS_LAYER_ID_PLUS1];
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
+  Int         m_activeNumILRRefIdx;        //< Active inter-layer reference pictures
+  Int         m_aiInterLayerPredLayerIdc  [MAX_VPS_LAYER_ID_PLUS1];
 #endif 
 #if L0034_COMBINED_LIST_CLEANUP
@@ -1516,7 +1516,7 @@
 
   Bool       m_enableTMVPFlag;
-#if JCTVC_M0458
-  Bool       m_InterLayerPredEnabledFlag;
-  UInt       m_NumInterLayerRefPics;
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
+  Bool       m_bInterLayerPredEnabledFlag;
+  Int        m_numInterLayerRefPics;
 #endif 
 public:
@@ -1579,10 +1579,10 @@
   Void      setNumILRRefIdx     ( Int i )               { m_numILRRefIdx = i;     }
 #endif
-#if JCTVC_M0458
-  Int       getActiveNumILRRefIdx     ( )               { return  m_aiActiveNumILRRefIdx; }
-  Void      setActiveNumILRRefIdx     ( Int i )         { m_aiActiveNumILRRefIdx = i; }  
-
-  Int       getInterLayerPredLayerIdc (UInt Idx )               { return  m_interLayerPredLayerIdc[Idx];       }
-  Void      setInterLayerPredLayerIdc (UInt val,UInt Idx)       { m_interLayerPredLayerIdc[Idx] = val;         }
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
+  Int       getActiveNumILRRefIdx     ( )               { return  m_activeNumILRRefIdx; }
+  Void      setActiveNumILRRefIdx     ( Int i )         { m_activeNumILRRefIdx = i; }  
+
+  Int       getInterLayerPredLayerIdc (UInt Idx )               { return  m_aiInterLayerPredLayerIdc[Idx];       }
+  Void      setInterLayerPredLayerIdc (UInt val,UInt Idx)       { m_aiInterLayerPredLayerIdc[Idx] = val;         }
 #endif 
   Int       getNumRefIdx        ( RefPicList e )                { return  m_aiNumRefIdx[e];             }
@@ -1789,10 +1789,10 @@
   Void      setEnableTMVPFlag     ( Bool   b )    { m_enableTMVPFlag = b; }
   Bool      getEnableTMVPFlag     ()              { return m_enableTMVPFlag;}
-#if JCTVC_M0458
-  Void      setInterLayerPredEnabledFlag     ( Bool   val )    { m_InterLayerPredEnabledFlag = val; }
-  Bool      getInterLayerPredEnabledFlag     ()                { return m_InterLayerPredEnabledFlag;}
-
-  Void      setNumInterLayerRefPics          ( UInt   val )    { m_NumInterLayerRefPics = val; }
-  UInt      getNumInterLayerRefPics          ()                { return m_NumInterLayerRefPics;}  
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
+  Void      setInterLayerPredEnabledFlag     ( Bool   val )    { m_bInterLayerPredEnabledFlag = val; }
+  Bool      getInterLayerPredEnabledFlag     ()                { return m_bInterLayerPredEnabledFlag;}
+
+  Void      setNumInterLayerRefPics          ( UInt   val )    { m_numInterLayerRefPics = val; }
+  UInt      getNumInterLayerRefPics          ()                { return m_numInterLayerRefPics;}  
 #endif 
 protected:
Index: branches/SHM-2.0-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/SHM-2.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 173)
+++ branches/SHM-2.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 174)
@@ -88,5 +88,5 @@
 #define ENCODER_FAST_MODE                1      ///< 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      ///< L0336: motion vector mapping of inter-layer reference picture
-#define JCTVC_M0458                      1      ///< implementation of JCTVC-L0178 (currently only one reference layer is supported )
+#define JCTVC_M0458_INTERLAYER_RPS_SIG   1      ///< implementation of JCTVC-L0178 (currently only one reference layer is supported )
 #else
 #define INTRA_BL                         1      ///< inter-layer texture prediction
Index: branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 173)
+++ branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 174)
@@ -1039,5 +1039,5 @@
 #endif
 #endif
-#if JCTVC_M0458
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
    READ_FLAG(uiCode, "max_one_active_ref_layer_flag" );
    vps->setMaxOneActiveRefLayerFlag(uiCode);   
@@ -1595,5 +1595,5 @@
   }
 
-  #if JCTVC_M0458    
+  #if JCTVC_M0458_INTERLAYER_RPS_SIG    
     rpcSlice->setActiveNumILRRefIdx(0); 
     if((sps->getLayerId() > 0)  &&  (rpcSlice->getNumILRRefIdx() > 0) ) 
Index: branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 173)
+++ branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 174)
@@ -1260,5 +1260,5 @@
   // currently only one reference layer is supported
   assert( vps->getNumDirectRefLayers( m_layerId ) == 1 );
-#if JCTVC_M0458
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
   assert( vps->getMaxOneActiveRefLayerFlag() == 1 );
 #endif 
Index: branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 173)
+++ branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 174)
@@ -797,5 +797,5 @@
 #endif
 #endif
-#if JCTVC_M0458
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
       WRITE_FLAG(vps->getMaxOneActiveRefLayerFlag(), "max_one_active_ref_layer_flag");
 #endif 
@@ -1166,5 +1166,5 @@
     }
   }
-#if JCTVC_M0458    
+#if JCTVC_M0458_INTERLAYER_RPS_SIG    
     if((pcSlice->getSPS()->getLayerId() > 0)  &&  (pcSlice->getNumILRRefIdx() > 0) ) 
     {
@@ -1179,5 +1179,5 @@
           }       
           for(Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ ) 
-            WRITE_UVLC(pcSlice->getInterLayerPredEnabledFlag(),"inter_layer_pred_layer_idc[i]");          
+            WRITE_UVLC(pcSlice->getInterLayerPredLayerIdc(i),"inter_layer_pred_layer_idc[i]");     
         }
       }
Index: branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 173)
+++ branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 174)
@@ -669,4 +669,9 @@
         pcSlice->setNumRefIdx(REF_PIC_LIST_1, pcSlice->getNumRefIdx(REF_PIC_LIST_1)+pcSlice->getNumILRRefIdx());
       }
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
+        // currently only one reference layer is supported in software and no decision logic to select yet.
+        // hence num of active inter layer references is set to one always
+          pcSlice->setActiveNumILRRefIdx(1);
+#endif 
     }
 #endif
Index: branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 173)
+++ branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 174)
@@ -485,4 +485,10 @@
   rpcSlice->setMaxNumMergeCand        ( m_pcCfg->getMaxNumMergeCand()        );
   xStoreWPparam( pPPS->getUseWP(), pPPS->getWPBiPred() );
+
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
+  // currently only one reference layer is supported in software and no decision logic to select yet.
+  // hence num of active inter layer references is set to one always
+  rpcSlice->setActiveNumILRRefIdx(1);
+#endif 
 }
 
