Index: branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 668)
+++ branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 669)
@@ -1015,4 +1015,48 @@
  */
 #if NO_CLRAS_OUTPUT_FLAG
+Void TComSlice::decodingRefreshMarking( TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag )
+{
+  if( !isIRAP() )
+  {
+    return;
+  }
+
+  // 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( m_layerId == 0 && noClrasOutputFlag )
+  {
+    Int pocCurr = getPOC();
+    TComPic* rpcPic;
+
+    // mark all pictures for all layers as not used for reference
+    TComList<TComPic*>::iterator        iterPic       = rcListPic.begin();
+    while( iterPic != rcListPic.end() )
+    {
+      if( rpcPic->getPOC() != pocCurr )
+      {
+        rpcPic->getSlice(0)->setReferenced(false);
+      }
+    }
+  }
+
+  // When the current picture is an IRAP picture with NoRaslOutputFlag equal to 1, 
+  // all reference pictures with nuh_layer_id equal to currPicLayerId currently in the DPB (if any) are marked as "unused for reference".
+  if( m_noRaslOutputFlag )
+  {
+    Int pocCurr = getPOC();
+    TComPic* rpcPic;
+
+    // mark all pictures of a current layer as not used for reference
+    TComList<TComPic*>::iterator        iterPic       = rcListPic.begin();
+    while( iterPic != rcListPic.end() )
+    {
+      if( rpcPic->getPOC() != pocCurr && rpcPic->getLayerId() == m_layerId )
+      {
+        rpcPic->getSlice(0)->setReferenced(false);
+      }
+    }
+  }
+}
+
 Void TComSlice::decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag)
 #else
Index: branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.h	(revision 668)
+++ branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.h	(revision 669)
@@ -2135,4 +2135,5 @@
   Void      checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, NalUnitType& associatedIRAPType, TComList<TComPic *>& rcListPic);
 #if NO_CLRAS_OUTPUT_FLAG
+  Void      decodingRefreshMarking( TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag );
   Void      decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag);
 #else
Index: branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h	(revision 668)
+++ branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h	(revision 669)
@@ -272,7 +272,5 @@
 #define HARMONIZE_GOP_FIRST_FIELD_COUPLE  1
 #define FIX_FIELD_DEPTH                 1
-#if !SVC_EXTENSION
 #define EFFICIENT_FIELD_IRAP            1
-#endif
 #define ALLOW_RECOVERY_POINT_AS_RAP     1
 #define BUGFIX_INTRAPERIOD 1
Index: branches/SHM-6-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 668)
+++ branches/SHM-6-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 669)
@@ -89,5 +89,4 @@
   m_layerInitializedFlag       = false;
   m_firstPicInLayerDecodedFlag = false;  
-  m_bRefreshPending            = false;
 #endif
 #if RESOLUTION_BASED_DPB
@@ -1023,5 +1022,5 @@
   }
 
-  m_apcSlicePilot->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, m_cListPic, getNoClrasOutputFlag());
+  m_apcSlicePilot->decodingRefreshMarking( m_cListPic, m_noClrasOutputFlag );
 #endif
 
Index: branches/SHM-6-dev/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 668)
+++ branches/SHM-6-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 669)
@@ -146,5 +146,4 @@
   Bool                    m_layerInitializedFlag;
   Bool                    m_firstPicInLayerDecodedFlag;
-  Bool                    m_bRefreshPending;
 #endif
 #if RESOLUTION_BASED_DPB
