Index: branches/SHM-6-dev/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/SHM-6-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 757)
+++ branches/SHM-6-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 758)
@@ -597,7 +597,5 @@
   ("CrossLayerPictureTypeAlignFlag", m_crossLayerPictureTypeAlignFlag, true, "align picture type across layers" )  
 #endif
-#if N0147_IRAP_ALIGN_FLAG
   ("CrossLayerIrapAlignFlag", m_crossLayerIrapAlignFlag, true, "align IRAP across layers" )  
-#endif
 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG
   ("CrossLayerAlignedIdrOnlyFlag", m_crossLayerAlignedIdrOnlyFlag, true, "only idr for IRAP across layers" )  
@@ -2412,7 +2410,5 @@
   printf("Align picture type            : %d\n", m_crossLayerPictureTypeAlignFlag );
 #endif
-#if N0147_IRAP_ALIGN_FLAG
   printf("Cross layer IRAP alignment    : %d\n", m_crossLayerIrapAlignFlag );
-#endif
 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG
   printf("IDR only for IRAP             : %d\n", m_crossLayerAlignedIdrOnlyFlag );
Index: branches/SHM-6-dev/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- branches/SHM-6-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 757)
+++ branches/SHM-6-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 758)
@@ -361,4 +361,5 @@
   Void  xPrintParameter ();                                   ///< print configuration values
   Void  xPrintUsage     ();                                   ///< print usage
+#if SVC_EXTENSION
 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
   Int       m_adaptiveResolutionChange;                       ///< Indicate adaptive resolution change frame
@@ -384,7 +385,5 @@
   Bool      m_crossLayerPictureTypeAlignFlag;
 #endif
-#if N0147_IRAP_ALIGN_FLAG
   Bool      m_crossLayerIrapAlignFlag;
-#endif
 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG
   Bool      m_crossLayerAlignedIdrOnlyFlag;
@@ -402,4 +401,5 @@
   Int  m_nCGSLUTBit;
 #endif
+#endif //SVC_EXTENSION
 public:
   TAppEncCfg();
Index: branches/SHM-6-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/SHM-6-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 757)
+++ branches/SHM-6-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 758)
@@ -1336,5 +1336,4 @@
     vps->setCrossLayerAlignedIdrOnlyFlag( m_crossLayerAlignedIdrOnlyFlag );
 #endif
-#if N0147_IRAP_ALIGN_FLAG
     vps->setCrossLayerIrapAlignFlag( m_crossLayerIrapAlignFlag );
     for(UInt layerCtr = 1;layerCtr <= vps->getMaxLayers() - 1; layerCtr++)
@@ -1352,5 +1351,4 @@
       }
     }
-#endif
 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
   vps->setSingleLayerForNonIrapFlag(m_adaptiveResolutionChange > 0 ? true : false);
Index: branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 757)
+++ branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 758)
@@ -775,11 +775,6 @@
 #endif
 
-#if N0147_IRAP_ALIGN_FLAG
   assert(m_aiNumRefIdx[REF_PIC_LIST_0] > 0);
   assert(m_aiNumRefIdx[REF_PIC_LIST_1] > 0);
-#else
-  assert(m_aiNumRefIdx[REF_PIC_LIST_0] > 1);
-  assert(m_aiNumRefIdx[REF_PIC_LIST_1] > 1);
-#endif
 
   //set L0 inter-layer reference picture modification
@@ -789,7 +784,5 @@
   Bool hasModification = (m_aiNumRefIdx[REF_PIC_LIST_0] == numberOfRpsCurrTempList) ? false : true;
 #endif
-#if N0147_IRAP_ALIGN_FLAG
   hasModification = hasModification && ( m_aiNumRefIdx[REF_PIC_LIST_0] > 1 );
-#endif
   refPicListModification->setRefPicListModificationFlagL0(hasModification);
   if(hasModification)
@@ -838,7 +831,5 @@
   //set L1 inter-layer reference picture modification
   hasModification = (m_aiNumRefIdx[REF_PIC_LIST_1] >= numberOfRpsCurrTempList) ? false : true;
-#if N0147_IRAP_ALIGN_FLAG
   hasModification = hasModification && ( m_aiNumRefIdx[REF_PIC_LIST_1] > 1 );
-#endif
 
   refPicListModification->setRefPicListModificationFlagL1(hasModification);
@@ -2332,7 +2323,5 @@
   m_crossLayerPictureTypeAlignFlag = true;
 #endif 
-#if N0147_IRAP_ALIGN_FLAG
   m_crossLayerIrapAlignFlag = true;
-#endif 
 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG
   m_crossLayerAlignedIdrOnlyFlag = false;
Index: branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.h	(revision 757)
+++ branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.h	(revision 758)
@@ -569,7 +569,5 @@
   Bool       m_crossLayerPictureTypeAlignFlag;
 #endif
-#if N0147_IRAP_ALIGN_FLAG
   Bool       m_crossLayerIrapAlignFlag;
-#endif
 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG
   Bool       m_crossLayerAlignedIdrOnlyFlag;
@@ -931,8 +929,6 @@
   Void   setCrossLayerAlignedIdrOnlyFlag(Bool x)                              { m_crossLayerAlignedIdrOnlyFlag = x;                         }
 #endif 
-#if N0147_IRAP_ALIGN_FLAG
   Bool   getCrossLayerIrapAlignFlag()                                           { return m_crossLayerIrapAlignFlag;                      }
   Void   setCrossLayerIrapAlignFlag(Bool x)                                     { m_crossLayerIrapAlignFlag = x;                         }
-#endif 
 #if O0225_MAX_TID_FOR_REF_LAYERS
   UInt   getMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId)                     { return m_maxTidIlRefPicsPlus1[layerId][refLayerId];           }
Index: branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h	(revision 757)
+++ branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h	(revision 758)
@@ -211,9 +211,6 @@
 #define P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG   1  ///< a flag to indicatate whether picture types for IRAP are IDR across layers.
 
-#define N0147_IRAP_ALIGN_FLAG            1      ///< a flag to indicatate whether IRAPs are aligned across layers
-#if N0147_IRAP_ALIGN_FLAG
 #define O0223_O0139_IRAP_ALIGN_NO_CONTRAINTS  1  ///< Remove IRAP align depedency constraints on poc_Reset_flag.
 #define IRAP_ALIGN_FLAG_IN_VPS_VUI       1       ///< Move IRAP align flag to VPS VUI 
-#endif 
 #define FAST_INTRA_SHVC                  1      ///< JCTVC-M0115: reduction number of intra modes in the EL (encoder only)
 #if FAST_INTRA_SHVC
Index: branches/SHM-6-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 757)
+++ branches/SHM-6-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 758)
@@ -1631,8 +1631,6 @@
 #endif
 
-#if N0147_IRAP_ALIGN_FLAG && !IRAP_ALIGN_FLAG_IN_VPS_VUI
   READ_FLAG(uiCode, "cross_layer_irap_aligned_flag" );
   vps->setCrossLayerIrapAlignFlag(uiCode);
-#endif
 
 #if VPS_DPB_SIZE_TABLE
@@ -1829,8 +1827,6 @@
 Void TDecCavlc::defaultVPSVUI( TComVPS* vps )
 {
-#if N0147_IRAP_ALIGN_FLAG
   // When not present, the value of all_layers_idr_aligned_flag is inferred to be equal to 0.
   vps->setCrossLayerIrapAlignFlag( false );
-#endif
 
 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
Index: branches/SHM-6-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 757)
+++ branches/SHM-6-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 758)
@@ -1109,5 +1109,5 @@
   // actual decoding starts here
   xActivateParameterSets();
-#if !O0223_O0139_IRAP_ALIGN_NO_CONTRAINTS && N0147_IRAP_ALIGN_FLAG
+#if !O0223_O0139_IRAP_ALIGN_NO_CONTRAINTS
   //Note setting O0223_O0139_IRAP_ALIGN_NO_CONTRAINTS to 0 may cause decoder to crash.
   //When cross_layer_irap_aligned_flag is equal to 0, num_extra_slice_header_bits >=1 
@@ -1763,5 +1763,4 @@
 #endif
     
-#if N0147_IRAP_ALIGN_FLAG
     if( m_layerId > 0 && pcSlice->getVPS()->getCrossLayerIrapAlignFlag() )
     {
@@ -1779,5 +1778,4 @@
       }
     }
-#endif
 
     if( m_layerId > 0 && !pcSlice->isIntra() && pcSlice->getEnableTMVPFlag() )
Index: branches/SHM-6-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 757)
+++ branches/SHM-6-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 758)
@@ -1200,5 +1200,5 @@
   WRITE_FLAG(vps->getPhaseAlignFlag(), "cross_layer_phase_alignment_flag" );
 #endif
-#if N0147_IRAP_ALIGN_FLAG && !IRAP_ALIGN_FLAG_IN_VPS_VUI
+#if !IRAP_ALIGN_FLAG_IN_VPS_VUI
   WRITE_FLAG(vps->getCrossLayerIrapAlignFlag(), "cross_layer_irap_aligned_flag");
 #endif 
Index: branches/SHM-6-dev/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 757)
+++ branches/SHM-6-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 758)
@@ -1160,5 +1160,4 @@
       if( pocCurr % m_pcCfg->getIntraPeriod() == 0 )
       {
-#if N0147_IRAP_ALIGN_FLAG
         if(pcSlice->getVPS()->getCrossLayerIrapAlignFlag())
         {
@@ -1175,6 +1174,7 @@
         }
         else
-#endif 
+        {
           pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_CRA);
+        }
       }
 
