Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 849)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 850)
@@ -106,4 +106,7 @@
 , m_temporalLayerNonReferenceFlag ( false )
 , m_enableTMVPFlag                ( true )
+#if R0226_SLICE_TMVP
+, m_availableForTMVPRefFlag       ( true )
+#endif
 #if SVC_EXTENSION
 , m_layerId                     ( 0 )
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 849)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 850)
@@ -2050,5 +2050,4 @@
   Int         m_associatedIrapPocBeforeReset;
 #endif
-
   NalUnitType m_iAssociatedIRAPType;
   static Int  m_prevTid0POC;
@@ -2141,4 +2140,7 @@
 
   Bool       m_enableTMVPFlag;
+#if R0226_SLICE_TMVP
+  Bool       m_availableForTMVPRefFlag;
+#endif
 
 #if SVC_EXTENSION
@@ -2448,4 +2450,9 @@
   Bool      getEnableTMVPFlag     ()              { return m_enableTMVPFlag;}
 
+#if R0226_SLICE_TMVP
+  Void      setAvailableForTMVPRefFlag     ( Bool   b )    { m_availableForTMVPRefFlag = b; }
+  Bool      getAvailableForTMVPRefFlag     ()              { return m_availableForTMVPRefFlag;}
+#endif
+
 #if SVC_EXTENSION
   Bool      setBaseColPic       ( TComList<TComPic*>& rcListPic , UInt refLayerIdc );
Index: /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 849)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 850)
@@ -51,4 +51,5 @@
 #define O0137_MAX_LAYERID                1      ///< JCTVC-O0137, JCTVC-O0200, JCTVC-O0223: restrict nuh_layer_id and vps_max_layers_minus1
 
+#define R0226_SLICE_TMVP                 1      ///< JCTVC-R0226, Regarding slice_temporal_mvp_enabled_flag
 #define R0279_REP_FORMAT_INBL            1      ///< JCTVC-R0279, For any independent non-base layer the used representation format is the one that is signalled in the active SPS for the layer
 #define R0227_VUI_BSP_HRD_FLAG           1      ///< JCTVC-R0227, Conformance checking such that VPS VUI HRD only present if VPS timing info is signalled
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 849)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 850)
@@ -2960,5 +2960,9 @@
     if (rpcSlice->getSPS()->getTMVPFlagsPresent())
     {
+#if R0226_SLICE_TMVP
+      READ_FLAG( uiCode, "slice_temporal_mvp_enabled_flag" );
+#else
       READ_FLAG( uiCode, "slice_temporal_mvp_enable_flag" );
+#endif
       rpcSlice->setEnableTMVPFlag( uiCode == 1 ? true : false );
     }
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 849)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 850)
@@ -1313,4 +1313,27 @@
 #endif
 
+#if R0226_SLICE_TMVP
+  if ( m_apcSlicePilot->getTLayer() == 0 && m_apcSlicePilot->getEnableTMVPFlag() == 0 )
+  {
+    //update all pics in the DPB such that they cannot be used for TMPV ref
+    TComList<TComPic*>::iterator  iterRefPic = m_cListPic.begin();  
+    while( iterRefPic != m_cListPic.end() )
+    {
+      TComPic *refPic = *iterRefPic;
+      if( ( refPic->getLayerId() == m_apcSlicePilot->getLayerId() ) && refPic->getReconMark() )
+      {
+        for(Int i = refPic->getNumAllocatedSlice()-1; i >= 0; i--)
+        {
+
+          TComSlice *refSlice = refPic->getSlice(i);
+          refSlice->setAvailableForTMVPRefFlag( false );
+        }
+      }
+      iterRefPic++;
+    }
+  }
+  m_apcSlicePilot->setAvailableForTMVPRefFlag( true );
+#endif
+
   // actual decoding starts here
     xActivateParameterSets();
@@ -1945,5 +1968,5 @@
       }
     }
-
+    
     if( m_layerId > 0 && !pcSlice->isIntra() && pcSlice->getEnableTMVPFlag() )
     {
@@ -1951,4 +1974,7 @@
 
       assert( refPic );
+#if R0226_SLICE_TMVP
+      assert ( refPic->getPicSym()->getSlice(0)->getAvailableForTMVPRefFlag() == true );
+#endif
 
       // It is a requirement of bitstream conformance when the collocated picture, used for temporal motion vector prediction, is an inter-layer reference picture, 
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 849)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 850)
@@ -165,5 +165,4 @@
   Bool                    m_isLastNALWasEos;
 #endif
-
 #if SVC_EXTENSION
   static UInt             m_prevPOC;        // POC of the previous slice
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 849)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 850)
@@ -2053,5 +2053,9 @@
       if (pcSlice->getSPS()->getTMVPFlagsPresent())
       {
+#if R0226_SLICE_TMVP
+        WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enabled_flag" );
+#else
         WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enable_flag" );
+#endif
       }
 #if N0065_LAYER_POC_ALIGNMENT && !SHM_FIX7
