Index: branches/SHM-4.1-dev/cfg/layers.cfg
===================================================================
--- branches/SHM-4.1-dev/cfg/layers.cfg	(revision 523)
+++ branches/SHM-4.1-dev/cfg/layers.cfg	(revision 524)
@@ -5,4 +5,5 @@
 ScalabilityMask3              : 0           # Auxiliary pictures
 AdaptiveResolutionChange      : 0           # Resolution change frame (0: disable)
+SkipPictureAtArcSwitch        : 0           # Code higher layer picture as skip at ARC switching (0: disable (default), 1: enable)
 MaxTidRefPresentFlag          : 1           # max_tid_ref_present_flag (0=not present, 1=present(default))
 CrossLayerIrapAlignFlag       : 1           # Align IRAP across layers
Index: branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 523)
+++ branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 524)
@@ -968,4 +968,7 @@
 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
   ("AdaptiveResolutionChange",     m_adaptiveResolutionChange, 0, "Adaptive resolution change frame number. Should coincide with EL RAP picture. (0: disable)")
+#endif
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+  ("SkipPictureAtArcSwitch",     m_skipPictureAtArcSwitch, false, "Code the higher layer picture in ARC up-switching as a skip picture. (0: disable)")
 #endif
 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI
@@ -2324,4 +2327,14 @@
   }
 #endif
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+  if (m_adaptiveResolutionChange > 0)
+  {
+    xConfirmPara(m_crossLayerIrapAlignFlag != 0, "Cross layer IRAP alignment must be disabled when using adaptive resolution change.");
+  }
+  if (m_skipPictureAtArcSwitch)
+  {
+    xConfirmPara(m_adaptiveResolutionChange <= 0, "Skip picture at ARC switching only works when Adaptive Resolution Change is active (AdaptiveResolutionChange > 0)");
+  }
+#endif
 #if N0120_MAX_TID_REF_CFG
   for (UInt layer=0; layer < MAX_LAYERS-1; layer++)
@@ -2426,4 +2439,7 @@
 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
   printf("Adaptive Resolution Change    : %d\n", m_adaptiveResolutionChange );
+#endif
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+  printf("Skip picture at ARC switch    : %d\n", m_skipPictureAtArcSwitch );
 #endif
 #if N0147_IRAP_ALIGN_FLAG
Index: branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 523)
+++ branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 524)
@@ -377,4 +377,7 @@
   Int       m_adaptiveResolutionChange;                       ///< Indicate adaptive resolution change frame
 #endif
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+  Bool      m_skipPictureAtArcSwitch;                         ///< Indicates that when ARC up-switching is performed the higher layer picture is a skip picture
+#endif
 #if REPN_FORMAT_IN_VPS
   RepFormatCfg m_repFormatCfg[16];                            ///< Rep_format structures
Index: branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 523)
+++ branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 524)
@@ -170,4 +170,7 @@
     repFormat->setBitDepthVpsLuma           ( getInternalBitDepthY()                        );  // Need modification to change for each layer
     repFormat->setBitDepthVpsChroma         ( getInternalBitDepthC()                        );  // Need modification to change for each layer
+#endif
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+    m_acTEncTop[mapIdxToLayer[idx]].setSkipPictureAtArcSwitch( m_skipPictureAtArcSwitch );
 #endif
   }
@@ -1361,4 +1364,7 @@
 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
   vps->setSingleLayerForNonIrapFlag(m_adaptiveResolutionChange > 0 ? true : false);
+#endif 
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+  vps->setHigherLayerIrapSkipFlag(m_skipPictureAtArcSwitch);
 #endif
 #if !VPS_EXTN_OFFSET_CALC
Index: branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.h	(revision 523)
+++ branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.h	(revision 524)
@@ -601,4 +601,7 @@
   Bool       m_singleLayerForNonIrapFlag;
 #endif
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+  Bool       m_higherLayerIrapSkipFlag;
+#endif
 #if TILE_BOUNDARY_ALIGNED_FLAG
   Bool       m_tileBoundariesAlignedFlag[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
@@ -863,4 +866,8 @@
   Bool   getSingleLayerForNonIrapFlag()                             { return m_singleLayerForNonIrapFlag; }
   Void   setSingleLayerForNonIrapFlag(Bool x)                       { m_singleLayerForNonIrapFlag = x;    }
+#endif
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+  Bool   getHigherLayerIrapSkipFlag()                             { return m_higherLayerIrapSkipFlag; }
+  Void   setHigherLayerIrapSkipFlag(Bool x)                       { m_higherLayerIrapSkipFlag = x;    }
 #endif
 #if TILE_BOUNDARY_ALIGNED_FLAG  
Index: branches/SHM-4.1-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/SHM-4.1-dev/source/Lib/TLibCommon/TypeDef.h	(revision 523)
+++ branches/SHM-4.1-dev/source/Lib/TLibCommon/TypeDef.h	(revision 524)
@@ -99,4 +99,7 @@
 #define N0160_VUI_EXT_ILP_REF            1      ///< VUI extension inter-layer dependency offset signalling
 #define VPS_VUI_BITRATE_PICRATE          1      ///< JCTVC-N0085: Signal bit rate and picture in VPS VUI
+#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
 #endif //VPS_VUI
 
Index: branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 523)
+++ branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 524)
@@ -1471,4 +1471,7 @@
   READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false);
 #endif
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+  READ_FLAG(uiCode, "higher_layer_irap_skip_flag" ); vps->setHigherLayerIrapSkipFlag(uiCode == 1 ? true : false);
+#endif
 
   READ_FLAG( uiCode,  "vps_vui_present_flag" );
Index: branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecCu.cpp	(revision 523)
+++ branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecCu.cpp	(revision 524)
@@ -317,4 +317,22 @@
   }
  
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+  if (pcCU->getSlice()->getVPS()->getHigherLayerIrapSkipFlag() && pcCU->getSlice()->getVPS()->getSingleLayerForNonIrapFlag() && pcCU->getLayerId() > 0)
+  {
+    Bool lowerLayerExist = false;
+    for(int i=0;i<pcCU->getLayerId();i++)
+    {
+      if(pcCU->getSlice()->getBaseColPic(pcCU->getSlice()->getInterLayerPredLayerIdc(i)))
+      {
+        lowerLayerExist = true;
+      }
+    }
+    if(lowerLayerExist)
+    {
+      assert(pcCU->isSkipped(uiAbsPartIdx));
+    }
+  }
+#endif
+ 
   if( pcCU->isSkipped(uiAbsPartIdx) )
   {
Index: branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 523)
+++ branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 524)
@@ -1149,4 +1149,7 @@
   WRITE_FLAG(vps->getSingleLayerForNonIrapFlag(), "single_layer_for_non_irap_flag" );
 #endif
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+  WRITE_FLAG(vps->getHigherLayerIrapSkipFlag(), "higher_layer_irap_skip_flag" );
+#endif
 
 #if !VPS_VUI
Index: branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCfg.h	(revision 523)
+++ branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCfg.h	(revision 524)
@@ -395,4 +395,7 @@
 #if O0153_ALT_OUTPUT_LAYER_FLAG
   Bool      m_altOutputLayerFlag;
+#endif
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+  Int       m_skipPictureAtArcSwitch;
 #endif
 #endif
@@ -937,4 +940,8 @@
   Int       getAdaptiveResolutionChange()      { return m_adaptiveResolutionChange; }
 #endif
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+  Void      setSkipPictureAtArcSwitch(Int x) { m_skipPictureAtArcSwitch = x;    }
+  Int       getSkipPictureAtArcSwitch()      { return m_skipPictureAtArcSwitch; }
+#endif
 #if AUXILIARY_PICTURES
   Void         setChromaFormatIDC(ChromaFormat x) { m_chromaFormatIDC = x;    }
Index: branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCu.cpp	(revision 523)
+++ branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCu.cpp	(revision 524)
@@ -460,4 +460,14 @@
   if(!bSliceEnd && !bSliceStart && bInsidePicture )
   {
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+    if (m_pcEncCfg->getSkipPictureAtArcSwitch() && m_pcEncCfg->getAdaptiveResolutionChange() > 0 && pcSlice->getLayerId() == 1 && pcSlice->getPOC() == m_pcEncCfg->getAdaptiveResolutionChange())
+    {
+      rpcTempCU->initEstData( uiDepth, iBaseQP );
+      
+      xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, &earlyDetectionSkipMode, true );
+    }
+    else
+    {
+#endif
 #if (ENCODER_FAST_MODE)
     Bool testInter = true;
@@ -779,4 +789,7 @@
       bSubBranch = true;
     }
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+    }
+#endif
   }
   else if(!(bSliceEnd && bInsidePicture))
@@ -1143,4 +1156,10 @@
   
   TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx());
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+  if (m_pcEncCfg->getSkipPictureAtArcSwitch() && m_pcEncCfg->getAdaptiveResolutionChange() > 0 && pcSlice->getLayerId() == 1 && pcSlice->getPOC() == m_pcEncCfg->getAdaptiveResolutionChange())
+  {
+    pcCU->setSkipFlagSubParts(true, uiAbsPartIdx, uiDepth);
+  }
+#endif
   // If slice start is within this cu...
   Bool bSliceStart = pcSlice->getSliceSegmentCurStartCUAddr() > pcPic->getPicSym()->getInverseCUOrderMap(pcCU->getAddr())*pcCU->getPic()->getNumPartInCU()+uiAbsPartIdx && 
@@ -1353,5 +1372,9 @@
  * \returns Void
  */
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+Void TEncCu::xCheckRDCostMerge2Nx2N( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool *earlyDetectionSkipMode, Bool bUseSkip )
+#else
 Void TEncCu::xCheckRDCostMerge2Nx2N( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool *earlyDetectionSkipMode )
+#endif
 {
   assert( rpcTempCU->getSlice()->getSliceType() != I_SLICE );
@@ -1387,5 +1410,9 @@
   }
 
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+  for( UInt uiNoResidual = bUseSkip?1:0; uiNoResidual < iteration; ++uiNoResidual )
+#else
   for( UInt uiNoResidual = 0; uiNoResidual < iteration; ++uiNoResidual )
+#endif
   {
     for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand )
Index: branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCu.h
===================================================================
--- branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCu.h	(revision 523)
+++ branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCu.h	(revision 524)
@@ -146,6 +146,9 @@
   Int   xComputeQP          ( TComDataCU* pcCU, UInt uiDepth );
   Void  xCheckBestMode      ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, UInt uiDepth        );
-  
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+  Void  xCheckRDCostMerge2Nx2N( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool *earlyDetectionSkipMode, Bool bUseSkip=false);
+#else  
   Void  xCheckRDCostMerge2Nx2N( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool *earlyDetectionSkipMode);
+#endif
 
 #if AMP_MRG
Index: branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 523)
+++ branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 524)
@@ -2280,5 +2280,9 @@
             // set entropy coder for RD
             m_pcEntropyCoder->setEntropyCoder ( m_pcSbacCoder, pcSlice );
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+            if ( pcSlice->getSPS()->getUseSAO() && !( m_pcEncTop->getSkipPictureAtArcSwitch() && m_pcEncTop->getAdaptiveResolutionChange() > 0 && pcSlice->getLayerId() == 1 && pcSlice->getPOC() == m_pcEncTop->getAdaptiveResolutionChange()) )
+#else
             if ( pcSlice->getSPS()->getUseSAO() )
+#endif
             {
               m_pcEntropyCoder->resetEntropy();
@@ -2303,5 +2307,11 @@
 #endif
             processingState = ENCODE_SLICE;
-
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+            if ( ( m_pcEncTop->getSkipPictureAtArcSwitch() && m_pcEncTop->getAdaptiveResolutionChange() > 0 && pcSlice->getLayerId() == 1 && pcSlice->getPOC() == m_pcEncTop->getAdaptiveResolutionChange()) )
+            {
+              pcSlice->getPic()->getPicSym()->getSaoParam()->bSaoFlag[0]=0;
+              pcSlice->getPic()->getPicSym()->getSaoParam()->bSaoFlag[1]=0;
+            }
+#endif
             for(Int s=0; s< uiNumSlices; s++)
             {
Index: branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 523)
+++ branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 524)
@@ -517,4 +517,10 @@
   rpcSlice->setSliceSegmentArgument ( m_pcCfg->getSliceSegmentArgument() );
   rpcSlice->setMaxNumMergeCand        ( m_pcCfg->getMaxNumMergeCand()        );
+#if HIGHER_LAYER_IRAP_SKIP_FLAG
+  if (m_pcCfg->getSkipPictureAtArcSwitch() && m_pcCfg->getAdaptiveResolutionChange() > 0 && rpcSlice->getLayerId() == 1 && rpcSlice->getPOC() == m_pcCfg->getAdaptiveResolutionChange())
+  {
+    rpcSlice->setMaxNumMergeCand        ( 1 );
+  }
+#endif
   xStoreWPparam( pPPS->getUseWP(), pPPS->getWPBiPred() );
 
