Index: /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1129)
+++ /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1130)
@@ -1685,7 +1685,5 @@
   ("SEITemporalMotionVectorPredictionConstraints",             m_TMVPConstraintsSEIEnabled,              0, "Control generation of TMVP constrants SEI message")
 #endif
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
   ("AdaptiveResolutionChange",     m_adaptiveResolutionChange, 0, "Adaptive resolution change frame number. Should coincide with EL RAP picture. (0: disable)")
-#endif
 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
   ("LayerSwitchOffBegin%d", cfg_layerSwitchOffBegin, 0, MAX_LAYERS, "Switch layer %d off after given poc")
@@ -4349,17 +4347,17 @@
   }
 #endif //VPS_EXTN_DIRECT_REF_LAYERS
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
-  if (m_adaptiveResolutionChange > 0)
+
+  if( m_adaptiveResolutionChange > 0 )
   {
     xConfirmPara(m_numLayers != 2, "Adaptive resolution change works with 2 layers only");
     xConfirmPara(m_acLayerCfg[1].m_iIntraPeriod == 0 || (m_adaptiveResolutionChange % m_acLayerCfg[1].m_iIntraPeriod) != 0, "Adaptive resolution change must happen at enhancement layer RAP picture");
   }
-#endif
-
-  if (m_adaptiveResolutionChange > 0)
+
+  if( m_adaptiveResolutionChange > 0 )
   {
     xConfirmPara(m_crossLayerIrapAlignFlag != 0, "Cross layer IRAP alignment must be disabled when using adaptive resolution change.");
   }
-  if (m_skipPictureAtArcSwitch)
+
+  if( m_skipPictureAtArcSwitch )
   {
     xConfirmPara(m_adaptiveResolutionChange <= 0, "Skip picture at ARC switching only works when Adaptive Resolution Change is active (AdaptiveResolutionChange > 0)");
@@ -4497,7 +4495,5 @@
   printf("Auxiliary pictures                : %d\n", m_scalabilityMask[AUX_ID] );
 #endif
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
   printf("Adaptive Resolution Change        : %d\n", m_adaptiveResolutionChange );
-#endif
   printf("Skip picture at ARC switch        : %d\n", m_skipPictureAtArcSwitch );
   printf("Align picture type                : %d\n", m_crossLayerPictureTypeAlignFlag );
Index: /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 1129)
+++ /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 1130)
@@ -473,7 +473,5 @@
   Void  xPrintUsage     ();                                   ///< print usage
 #if SVC_EXTENSION
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
   Int       m_adaptiveResolutionChange;                       ///< Indicate adaptive resolution change frame
-#endif
   Bool      m_skipPictureAtArcSwitch;                         ///< Indicates that when ARC up-switching is performed the higher layer picture is a skip picture
 #if REPN_FORMAT_IN_VPS
Index: /branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1129)
+++ /branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1130)
@@ -787,7 +787,5 @@
     }
 
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     m_acTEncTop[layer].setAdaptiveResolutionChange               ( m_adaptiveResolutionChange );
-#endif
 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     m_acTEncTop[layer].setLayerSwitchOffBegin                    (m_acLayerCfg[layer].m_layerSwitchOffBegin);
@@ -1769,7 +1767,5 @@
       }
     }
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
   vps->setSingleLayerForNonIrapFlag(m_adaptiveResolutionChange > 0 ? true : false);
-#endif 
   vps->setHigherLayerIrapSkipFlag(m_skipPictureAtArcSwitch);
 
@@ -2095,6 +2091,5 @@
 #endif
 
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
-    if (m_adaptiveResolutionChange)
+    if( m_adaptiveResolutionChange )
     {
       for(UInt layer = 0; layer < m_numLayers; layer++)
@@ -2108,5 +2103,4 @@
       }
     }
-#endif
 
     // loop through frames in one GOP
@@ -2509,9 +2503,5 @@
       TComPicYuv*  pcPicYuvRecBottom  = *(iterPicYuvRec++);
 
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
-      if (!m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRecTop->isReconstructed() && pcPicYuvRecBottom->isReconstructed())
-#else
-      if (!m_acLayerCfg[layer].getReconFile().empty())
-#endif
+      if( !m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRecTop->isReconstructed() && pcPicYuvRecBottom->isReconstructed() )
       {
 #if REPN_FORMAT_IN_VPS
@@ -2538,9 +2528,5 @@
     {
       TComPicYuv*  pcPicYuvRec  = *(iterPicYuvRec++);
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
-      if (!m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRec->isReconstructed())
-#else
-      if (!m_acLayerCfg[layer].getReconFile().empty())
-#endif
+      if( !m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRec->isReconstructed() )
       {
 #if REPN_FORMAT_IN_VPS
@@ -2564,9 +2550,5 @@
     list<AccessUnit>::const_iterator iterBitstream = accessUnits.begin();
 
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
-    for ( i = 0; i < iNumEncoded/2 && iterBitstream != accessUnits.end(); i++ )
-#else
-    for ( i = 0; i < iNumEncoded/2; i++ )
-#endif
+    for( i = 0; i < iNumEncoded/2 && iterBitstream != accessUnits.end(); i++ )
     {
       const AccessUnit& auTop = *(iterBitstream++);
@@ -2585,9 +2567,5 @@
     list<AccessUnit>::const_iterator iterBitstream = accessUnits.begin();
 
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
-    for ( i = 0; i < iNumEncoded && iterBitstream != accessUnits.end(); i++ )
-#else
-    for ( i = 0; i < iNumEncoded; i++ )
-#endif
+    for( i = 0; i < iNumEncoded && iterBitstream != accessUnits.end(); i++ )
     {
       const AccessUnit& au = *(iterBitstream++);
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComPicYuv.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComPicYuv.h	(revision 1129)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComPicYuv.h	(revision 1130)
@@ -85,8 +85,6 @@
 #if SVC_EXTENSION
   Window  m_conformanceWindow;
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
   Bool    m_isReconstructed;
 #endif
-#endif //SVC_EXTENSION
  
 public:
@@ -106,5 +104,5 @@
                                    const UInt uiMaxCUHeight,
                                    const UInt uiMaxCUDepth );
-#endif //SVC_EXTENSION
+#endif
   
   Void          destroy           ();
@@ -168,15 +166,14 @@
   
 #if SVC_EXTENSION
-  Void          setHeight   ( Int iPicHeight )     { m_iPicHeight = iPicHeight; }
+  Void          setHeight   ( Int iPicHeight )                   { m_iPicHeight = iPicHeight;               }
   Window&       getConformanceWindow()                           { return  m_conformanceWindow;             }
   Void          setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; }
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
-  Void          setReconstructed(Bool x) { m_isReconstructed = x;    }
-  Bool          isReconstructed()        { return m_isReconstructed; }
-#endif
+  Void          setReconstructed(Bool x)                         { m_isReconstructed = x;                   }
+  Bool          isReconstructed()                                { return m_isReconstructed;                }
 #if AUXILIARY_PICTURES  
   Void          convertToMonochrome();
 #endif
-#endif //SVC_EXTENSION
+#endif
+
   Void          dump( Char* pFileName, Bool bAdd, Int bitDepth );
 
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1129)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1130)
@@ -481,9 +481,5 @@
 #if SVC_EXTENSION
   Int numInterLayerRPSPics = 0;
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
   if( m_layerId > 0 && m_activeNumILRRefIdx > 0 )
-#else
-  if( m_layerId > 0 )
-#endif
   {
     for( i=0; i < m_pcVPS->getNumDirectRefLayers( m_layerId ); i++ )
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 1129)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 1130)
@@ -706,7 +706,5 @@
   UInt       m_maxTSLayerMinus1[MAX_LAYERS];
 #endif
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
   Bool       m_singleLayerForNonIrapFlag;
-#endif
   Bool       m_higherLayerIrapSkipFlag;
 #if VPS_VUI_TILES_NOT_IN_USE__FLAG
@@ -1128,8 +1126,6 @@
   Void   setMaxTSLayersMinus1(Int layerIdx, UInt maxTSublayer)         { m_maxTSLayerMinus1[layerIdx] = maxTSublayer;}
 #endif
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
   Bool   getSingleLayerForNonIrapFlag()                             { return m_singleLayerForNonIrapFlag; }
   Void   setSingleLayerForNonIrapFlag(Bool x)                       { m_singleLayerForNonIrapFlag = x;    }
-#endif
   Bool   getHigherLayerIrapSkipFlag()                             { return m_higherLayerIrapSkipFlag; }
   Void   setHigherLayerIrapSkipFlag(Bool x)                       { m_higherLayerIrapSkipFlag = x;    }
Index: /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1129)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1130)
@@ -138,5 +138,4 @@
 #define VPS_EXTN_PROFILE_INFO            1      ///< Include profile information for layer sets in VPS extension
 #define VPS_EXTN_DIRECT_REF_LAYERS       1      ///< Include indication of direct dependency of layers in VPS extension
-#define M0040_ADAPTIVE_RESOLUTION_CHANGE 1
 #define R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 1
 
@@ -244,7 +243,5 @@
 #define JCTVC_M0259_LAMBDAREFINEMENT     1      ///< JCTVC-M0259: lambda refinement (encoder only optimization)
 #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.
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
 #define HIGHER_LAYER_IRAP_SKIP_FLAG      1      ///< JCTVC-O0199: Indication that higher layer IRAP picture uses skip blocks only
-#endif
 #define LAYER_CTB                        0      ///< enable layer-specific CTB structure
 
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1129)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1130)
@@ -3463,8 +3463,6 @@
   vps->setCrossLayerIrapAlignFlag( false );
 
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
   // When single_layer_for_non_irap_flag is not present, it is inferred to be equal to 0.
   vps->setSingleLayerForNonIrapFlag( false );
-#endif
 
   // When higher_layer_irap_skip_flag is not present it is inferred to be equal to 0
@@ -3834,7 +3832,6 @@
 #endif
 
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
   READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false);
-#endif
+
   READ_FLAG(uiCode, "higher_layer_irap_skip_flag" ); vps->setHigherLayerIrapSkipFlag(uiCode == 1 ? true : false);
 
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1129)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1130)
@@ -1711,9 +1711,6 @@
     // Create upsampling reference layer pictures for all possible dependent layers and do it only once for the first slice. 
     // Other slices might choose which reference pictures to be used for inter-layer prediction
-    if( m_layerId > 0 && m_uiSliceIdx == 0 )
-    {      
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
-      if( !pcSlice->getVPS()->getSingleLayerForNonIrapFlag() || ( pcSlice->getVPS()->getSingleLayerForNonIrapFlag() && pcSlice->isIRAP() ) )
-#endif
+    if( m_layerId > 0 && m_uiSliceIdx == 0 && ( !pcSlice->getVPS()->getSingleLayerForNonIrapFlag() || pcSlice->isIRAP() ) )
+    {
       for( Int i = 0; i < pcSlice->getNumILRRefIdx(); i++ )
       {
@@ -1865,10 +1862,8 @@
       pcSlice->setRefPicList( m_cListPic, false, m_cIlpPic);
     }
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     else if ( m_layerId > 0 )
     {
       pcSlice->setRefPicList( m_cListPic, false, NULL);
     }
-#endif
 #if MFM_ENCCONSTRAINT
     if( pcSlice->getMFMEnabledFlag() )
@@ -1889,9 +1884,6 @@
 #endif
     
-    if( m_layerId > 0 && pcSlice->getVPS()->getCrossLayerIrapAlignFlag() )
-    {
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
-      if( !pcSlice->getVPS()->getSingleLayerForNonIrapFlag() || ( pcSlice->getVPS()->getSingleLayerForNonIrapFlag() && pcSlice->isIRAP() ) )
-#endif
+    if( m_layerId > 0 && pcSlice->getVPS()->getCrossLayerIrapAlignFlag() && ( !pcSlice->getVPS()->getSingleLayerForNonIrapFlag() || pcSlice->isIRAP() ) )
+    {
       for(Int dependentLayerIdx = 0; dependentLayerIdx < pcSlice->getVPS()->getNumDirectRefLayers(m_layerId); dependentLayerIdx++)
       {
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1129)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1130)
@@ -2642,7 +2642,5 @@
 #endif
 
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
   WRITE_FLAG(vps->getSingleLayerForNonIrapFlag(), "single_layer_for_non_irap_flag" );
-#endif
 
   // When single_layer_for_non_irap_flag is equal to 0, higher_layer_irap_skip_flag shall be equal to 0
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h	(revision 1129)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h	(revision 1130)
@@ -370,7 +370,5 @@
   UInt      m_numLayer;
   Int       m_elRapSliceBEnabled;
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
   Int       m_adaptiveResolutionChange;
-#endif
 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
   int       m_layerSwitchOffBegin;
@@ -1007,15 +1005,13 @@
 #endif
 #if SVC_EXTENSION
-  UInt      getLayerId            () { return m_layerId;              }
-  Void      setLayerId            (UInt layer) { m_layerId = layer; }
-  UInt      getNumLayer           () { return m_numLayer;             }  
-  Void      setNumLayer           (UInt uiNum)   { m_numLayer = uiNum;  }
+  UInt      getLayerId()                                     { return m_layerId;    }
+  Void      setLayerId( UInt layer )                         { m_layerId = layer;   }
+  UInt      getNumLayer()                                    { return m_numLayer;   }  
+  Void      setNumLayer( UInt uiNum )                        { m_numLayer = uiNum;  }
   Void      setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; }
-  Void      setElRapSliceTypeB(Int bEnabled) {m_elRapSliceBEnabled = bEnabled;}
-  Int       getElRapSliceTypeB()              {return m_elRapSliceBEnabled;}
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
-  Void      setAdaptiveResolutionChange(Int x) { m_adaptiveResolutionChange = x;    }
-  Int       getAdaptiveResolutionChange()      { return m_adaptiveResolutionChange; }
-#endif
+  Void      setElRapSliceTypeB(Int bEnabled)                 { m_elRapSliceBEnabled = bEnabled;   }
+  Int       getElRapSliceTypeB()                             { return m_elRapSliceBEnabled;       }
+  Void      setAdaptiveResolutionChange(Int x)               { m_adaptiveResolutionChange = x;    }
+  Int       getAdaptiveResolutionChange()                    { return m_adaptiveResolutionChange; }
 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
   Void      setLayerSwitchOffBegin(Int x)    { m_layerSwitchOffBegin = x;    }
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1129)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1130)
@@ -1105,5 +1105,5 @@
     }
 
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
+#if SVC_EXTENSION
     if (m_pcEncTop->getAdaptiveResolutionChange() > 0 && ((m_layerId > 0 && pocCurr < m_pcEncTop->getAdaptiveResolutionChange()) ||
                                                           (m_layerId == 0 && pocCurr > m_pcEncTop->getAdaptiveResolutionChange())) )
@@ -1263,5 +1263,4 @@
     xSetLayerInitializedFlag(pcSlice);
 #endif
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     if (m_pcEncTop->getAdaptiveResolutionChange() > 0 && m_layerId > 0 && pocCurr > m_pcEncTop->getAdaptiveResolutionChange())
     {
@@ -1270,5 +1269,4 @@
       pcSlice->setMFMEnabledFlag(false);
     }
-#endif
 #endif //SVC_EXTENSION
 
@@ -3482,5 +3480,5 @@
     pcPic->getPicYuvRec()->copyToPic(pcPicYuvRecOut);
 
-#if M0040_ADAPTIVE_RESOLUTION_CHANGE
+#if SVC_EXTENSION
     pcPicYuvRecOut->setReconstructed(true);
 #endif
