Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1092)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1093)
@@ -126,7 +126,4 @@
 , m_bMFMEnabledFlag               ( false )
 #endif
-#if POC_RESET_FLAG
-, m_bPocResetFlag                 ( false )
-#endif
 , m_bDiscardableFlag              ( false )
 #if O0149_CROSS_LAYER_BLA_FLAG
@@ -320,5 +317,5 @@
     pcPic = *(iterPic);
   }
-#if POC_RESET_FLAG || POC_RESET_IDC_DECODER
+#if POC_RESET_IDC_DECODER
   assert( pcPic->getSlice(0)->isReferenced() );
 #endif
@@ -350,9 +347,5 @@
       }
       
-#if POC_RESET_RPS
-      if( ((!pocHasMsb) && ((poc & (pocCycle-1)) == picPoc)) || ( pocHasMsb && (poc == picPoc)) )
-#else
       if (poc == picPoc)
-#endif      
       {
         if(pcPic->getIsLongTerm())
@@ -4158,10 +4151,6 @@
     return false;
   }        
-#if POC_RESET_FLAG || POC_RESET_IDC_DECODER
 #if POC_RESET_IDC_DECODER
   TComPic* pic = xGetRefPic( rcListPic, getPOC() );
-#else
-  TComPic* pic = xGetRefPic( rcListPic, m_bPocResetFlag ? 0 : m_iPOC );
-#endif
 
   if( pic )
@@ -4184,9 +4173,5 @@
 TComPic* TComSlice::getBaseColPic(  TComList<TComPic*>& rcListPic )
 {
-#if POC_RESET_FLAG
-  return xGetRefPic( rcListPic, m_bPocResetFlag ? 0 : m_iPOC );
-#else
   return xGetRefPic( rcListPic, m_iPOC );
-#endif
 }
 #endif
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 1092)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 1093)
@@ -2331,8 +2331,4 @@
   Int         m_activeNumILRRefIdx;        //< Active inter-layer reference pictures
   Int         m_interLayerPredLayerIdc  [MAX_VPS_LAYER_IDX_PLUS1];
-#if POC_RESET_FLAG
-  Bool        m_bPocResetFlag;
-  Int         m_pocValueBeforeReset;
-#endif  
   Bool        m_bDiscardableFlag;
 #if O0149_CROSS_LAYER_BLA_FLAG
@@ -2478,7 +2474,4 @@
 
 #if SVC_EXTENSION
-#if PREVTID0_POC_RESET
-  Void      adjustPrevTid0POC      (Int adj)             { m_prevTid0POC=m_prevTid0POC-adj; }
-#endif
 #if POC_RESET_IDC_DECODER
   Void      setPrevTid0POC( Int x ) { m_prevTid0POC = x; }
@@ -2676,10 +2669,4 @@
                                   || m_eNalUnitType == NAL_UNIT_RESERVED_VCL_N14 ); }
 #endif
-#if POC_RESET_FLAG
-  Bool      getPocResetFlag  ()                              { return m_bPocResetFlag;       }
-  Void      setPocResetFlag  (Bool b)                        { m_bPocResetFlag = b;          }
-  Int       getPocValueBeforeReset ()                        { return m_pocValueBeforeReset; }
-  Void      setPocValueBeforeReset (Int x)                   { m_pocValueBeforeReset = x ;   }
-#endif
   Bool      getDiscardableFlag  ()                           { return m_bDiscardableFlag;    }
   Void      setDiscardableFlag  (Bool b)                     { m_bDiscardableFlag = b;       }
Index: /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1092)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1093)
@@ -134,6 +134,5 @@
 #endif
 #define O0194_WEIGHTED_PREDICTION_CGS    1      ///< JCTVC-O0194: Weighted prediction for colour gamut scalability
-#define POC_RESET_FLAG                   0      ///< JCTVC-N0244: POC reset flag for  layer pictures.
-#define POC_RESET_IDC                    1      ///< JCTVC-P0041: Include poc_reset_idc and related derivation - eventually will replace POC_RESET_FLAG
+#define POC_RESET_IDC                    1      ///< JCTVC-P0041: Include poc_reset_idc and related derivation
 #if POC_RESET_IDC
 #define POC_RESET_IDC_SIGNALLING         1      ///< JCTVC-P0041: Include signalling for poc_reset related syntax elements
@@ -158,8 +157,4 @@
 #define SCALINGLIST_INFERRING            1      ///< JCTVC-N0371: inter-layer scaling list
 #define O0142_CONDITIONAL_SPS_EXTENSION  1      ///< JCTVC-O0142: Conditional SPS extension
-#if POC_RESET_FLAG
-#define PREVTID0_POC_RESET               1      ///< JCTVC-O0117 Modification of the PicOrderCntVal of prevTid0Pic
-#define POC_RESET_RPS                    1      ///< JCTVC-O0117 Modification to the decoding process for rps
-#endif
 
 #define P0297_VPS_POC_LSB_ALIGNED_FLAG   1      ///< JCTVC-P0297: vps_poc_lsb_aligned_flag for cross-layer POC anchor picture derivation
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1092)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1093)
@@ -1242,32 +1242,4 @@
   {
 #if SVC_EXTENSION
-#if POC_RESET_FLAG
-    Int iBits = 0;
-    if(pcSlice->getPPS()->getNumExtraSliceHeaderBits() > iBits)
-    {
-      READ_FLAG(uiCode, "poc_reset_flag");      pcSlice->setPocResetFlag( uiCode ? true : false );
-      iBits++;
-    }
-    if(pcSlice->getPPS()->getNumExtraSliceHeaderBits() > iBits)
-    {
-#if DISCARDABLE_PIC_RPS
-      READ_FLAG(uiCode, "discardable_flag"); pcSlice->setDiscardableFlag( uiCode ? true : false );
-#else
-      READ_FLAG(uiCode, "discardable_flag"); // ignored
-#endif
-      iBits++;
-    }
-#if O0149_CROSS_LAYER_BLA_FLAG
-    if(pcSlice->getPPS()->getNumExtraSliceHeaderBits() > iBits)
-    {
-      READ_FLAG(uiCode, "cross_layer_bla_flag");  pcSlice->setCrossLayerBLAFlag( uiCode ? true : false );
-      iBits++;
-    }
-#endif
-    for (; iBits < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); iBits++)
-    {
-      READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored
-    }
-#else
 #if CROSS_LAYER_BLA_FLAG_FIX
     Int iBits = 0;
@@ -1306,5 +1278,4 @@
       READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored
     }
-#endif
 #else //SVC_EXTENSION
     for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1092)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1093)
@@ -736,9 +736,5 @@
 
 #if SVC_EXTENSION
-#if POC_RESET_FLAG
-Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int &iPOCLastDisplay, UInt& curLayerId, Bool& bNewPOC )
-#else
 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, UInt& curLayerId, Bool& bNewPOC )
-#endif
 #else
 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay )
@@ -1339,67 +1335,5 @@
   m_bFirstSliceInSequence = false;
   m_bFirstSliceInBitstream  = false;
-#if POC_RESET_FLAG
-  // This operation would do the following:
-  // 1. Update the other picture in the DPB. This should be done only for the first slice of the picture.
-  // 2. Update the value of m_pocCRA.
-  // 3. Reset the POC values at the decoder for the current picture to be zero.
-  // 4. update value of POCLastDisplay
-  if( m_apcSlicePilot->getPocResetFlag() )
-  {
-    if( m_apcSlicePilot->getSliceIdx() == 0 )
-    {
-      Int pocAdjustValue = m_apcSlicePilot->getPOC();
-
-#if PREVTID0_POC_RESET
-      m_apcSlicePilot->adjustPrevTid0POC(pocAdjustValue);
-#endif
-      // If poc reset flag is set to 1, reset all POC for DPB -> basically do it for each slice in the picutre
-      TComList<TComPic*>::iterator  iterPic = m_cListPic.begin();  
-
-      // Iterate through all picture in DPB
-      while( iterPic != m_cListPic.end() )
-      {
-        TComPic *dpbPic = *iterPic;
-        // Check if the picture pointed to by iterPic is either used for reference or
-        // needed for output, are in the same layer, and not the current picture.
-        if( /*  ( ( dpbPic->getSlice(0)->isReferenced() ) || ( dpbPic->getOutputMark() ) )
-            &&*/ ( dpbPic->getLayerId() == m_apcSlicePilot->getLayerId() )
-              && ( dpbPic->getReconMark() ) 
-          )
-        {
-          for(Int i = dpbPic->getNumAllocatedSlice()-1; i >= 0; i--)
-          {
-
-            TComSlice *slice = dpbPic->getSlice(i);
-            TComReferencePictureSet *rps = slice->getRPS();
-            slice->setPOC( slice->getPOC() - pocAdjustValue );
-
-            // Also adjust the POC value stored in the RPS of each such slice
-            for(Int j = rps->getNumberOfPictures(); j >= 0; j--)
-            {
-              rps->setPOC( j, rps->getPOC(j) - pocAdjustValue );
-            }
-            // Also adjust the value of refPOC
-            for(Int k = 0; k < 2; k++)  // For List 0 and List 1
-            {
-              RefPicList list = (k == 1) ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
-              for(Int j = 0; j < slice->getNumRefIdx(list); j++)
-              {
-                slice->setRefPOC( slice->getRefPOC(list, j) - pocAdjustValue, list, j);
-              }
-            }
-          }
-        }
-        iterPic++;
-      }
-      // Update the value of pocCRA
-      m_pocCRA -= pocAdjustValue;
-      // Update value of POCLastDisplay
-      iPOCLastDisplay -= pocAdjustValue;
-    }
-    // Reset current poc for current slice and RPS
-    m_apcSlicePilot->setPOC( 0 );
-  }
-#endif
+
   // Alignment of TSA and STSA pictures across AU
 #if !Q0108_TSA_STSA
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 1092)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 1093)
@@ -312,9 +312,5 @@
   Void      xActivateParameterSets();
 #if SVC_EXTENSION
-#if POC_RESET_FLAG
-  Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int &iPOCLastDisplay, UInt& curLayerId, Bool& bNewPOC);
-#else
   Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, UInt& curLayerId, Bool& bNewPOC);
-#endif
   Void      xSetSpatialEnhLayerFlag(TComSlice* slice, TComPic* pic);
 #else
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1092)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1093)
@@ -975,31 +975,4 @@
   {
 #if SVC_EXTENSION
-#if POC_RESET_FLAG
-    Int iBits = 0;
-    if( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > iBits )
-    {
-      WRITE_FLAG( pcSlice->getPocResetFlag(), "poc_reset_flag" );
-      iBits++;
-    }
-    if( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > iBits )
-    {
-      assert(!!"discardable_flag");
-      WRITE_FLAG(pcSlice->getDiscardableFlag(), "discardable_flag");
-      iBits++;
-    }
-#if O0149_CROSS_LAYER_BLA_FLAG
-    if( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > iBits )
-    {
-      assert(!!"cross_layer_bla_flag");
-      WRITE_FLAG(pcSlice->getCrossLayerBLAFlag(), "cross_layer_bla_flag");
-      iBits++;
-    }
-#endif
-    for ( ; iBits < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); iBits++)
-    {
-      assert(!!"slice_reserved_undetermined_flag[]");
-      WRITE_FLAG(0, "slice_reserved_undetermined_flag[]");
-    }
-#else
 #if CROSS_LAYER_BLA_FLAG_FIX
     Int iBits = 0;
@@ -1040,5 +1013,4 @@
       WRITE_FLAG(0, "slice_reserved_undetermined_flag[]");
     }
-#endif
 #else //SVC_EXTENSION
     for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
@@ -1066,15 +1038,4 @@
 #endif
     {
-#if POC_RESET_FLAG
-      Int picOrderCntLSB;
-      if( !pcSlice->getPocResetFlag() )
-      {
-        picOrderCntLSB = (pcSlice->getPOC()-pcSlice->getLastIDR()+(1<<pcSlice->getSPS()->getBitsForPOC())) & ((1<<pcSlice->getSPS()->getBitsForPOC())-1);
-      }
-      else
-      {
-        picOrderCntLSB = (pcSlice->getPocValueBeforeReset()-pcSlice->getLastIDR()+(1<<pcSlice->getSPS()->getBitsForPOC())) & ((1<<pcSlice->getSPS()->getBitsForPOC())-1);
-      }
-#else
 #if POC_RESET_IDC_ENCODER
       Int picOrderCntLSB;
@@ -1089,5 +1050,4 @@
 #else
       Int picOrderCntLSB = (pcSlice->getPOC()-pcSlice->getLastIDR()+(1<<pcSlice->getSPS()->getBitsForPOC())) & ((1<<pcSlice->getSPS()->getBitsForPOC())-1);
-#endif
 #endif
       WRITE_CODE( picOrderCntLSB, pcSlice->getSPS()->getBitsForPOC(), "pic_order_cnt_lsb");
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1092)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1093)
@@ -1144,68 +1144,4 @@
 
 #if SVC_EXTENSION
-#if POC_RESET_FLAG
-    if( !pcSlice->getPocResetFlag() ) // For picture that are not reset, we should adjust the value of POC calculated from the configuration files.
-    {
-      // Subtract POC adjustment value until now.
-      pcSlice->setPOC( pcSlice->getPOC() - m_pcEncTop->getPocAdjustmentValue() );
-    }
-    else
-    {
-      // Check if this is the first slice in the picture
-      // In the encoder, the POC values are copied along with copySliceInfo, so we only need
-      // to do this for the first slice.
-      Int pocAdjustValue = pcSlice->getPOC() - m_pcEncTop->getPocAdjustmentValue();
-      if( pcSlice->getSliceIdx() == 0 )
-      {
-        TComList<TComPic*>::iterator  iterPic = rcListPic.begin();  
-
-        // Iterate through all picture in DPB
-        while( iterPic != rcListPic.end() )
-        {              
-          TComPic *dpbPic = *iterPic;
-          if( dpbPic->getPOC() == pocCurr )
-          {
-            if( dpbPic->getReconMark() )
-            {
-              assert( !( dpbPic->getSlice(0)->isReferenced() ) && !( dpbPic->getOutputMark() ) );
-            }
-          }
-          // Check if the picture pointed to by iterPic is either used for reference or
-          // needed for output, are in the same layer, and not the current picture.
-          if( /* ( ( dpbPic->getSlice(0)->isReferenced() ) || ( dpbPic->getOutputMark() ) )
-              && */ ( dpbPic->getLayerId() == pcSlice->getLayerId() )
-              && ( dpbPic->getReconMark() ) 
-            )
-          {
-            for(Int i = dpbPic->getNumAllocatedSlice()-1; i >= 0; i--)
-            {
-              TComSlice *slice = dpbPic->getSlice(i);
-              TComReferencePictureSet *rps = slice->getRPS();
-              slice->setPOC( dpbPic->getSlice(i)->getPOC() - pocAdjustValue );
-
-              // Also adjust the POC value stored in the RPS of each such slice
-              for(Int j = rps->getNumberOfPictures(); j >= 0; j--)
-              {
-                rps->setPOC( j, rps->getPOC(j) - pocAdjustValue );
-              }
-              // Also adjust the value of refPOC
-              for(Int k = 0; k < 2; k++)  // For List 0 and List 1
-              {
-                RefPicList list = (k == 1) ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
-                for(Int j = 0; j < slice->getNumRefIdx(list); j++)
-                {
-                  slice->setRefPOC( slice->getRefPOC(list, j) - pocAdjustValue, list, j);
-                }
-              }
-            }
-          }
-          iterPic++;
-        }
-        m_pcEncTop->setPocAdjustmentValue( m_pcEncTop->getPocAdjustmentValue() + pocAdjustValue );
-      }
-      pcSlice->setPocValueBeforeReset( pcSlice->getPOC() - m_pcEncTop->getPocAdjustmentValue() + pocAdjustValue );
-      pcSlice->setPOC( 0 );
-    }
-#endif
 #if POC_RESET_IDC_ENCODER
     pcSlice->setPocValueBeforeReset( pocCurr );
@@ -1893,5 +1829,5 @@
     if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() )
     {
-#if POC_RESET_FLAG || POC_RESET_IDC_ENCODER
+#if POC_RESET_IDC_ENCODER
       if ( pocCurr > 0 && pcSlice->isRADL() && pcPic->getSlice(0)->getBaseColPic(pcPic->getSlice(0)->getInterLayerPredLayerIdc(0))->getSlice(0)->isRASL())
 #else
@@ -2302,5 +2238,5 @@
 
       Int sliceQP = m_pcCfg->getInitialQP();
-#if POC_RESET_FLAG || POC_RESET_IDC_ENCODER
+#if POC_RESET_IDC_ENCODER
       if ( ( pocCurr == 0 && m_pcCfg->getInitialQP() > 0 ) || ( frameLevel == 0 && m_pcCfg->getForceIntraQP() ) ) // QP is specified
 #else
@@ -2720,5 +2656,5 @@
       }
       pictureTimingSEI.m_auCpbRemovalDelay = std::min<Int>(std::max<Int>(1, m_totalCoded - m_lastBPSEI), static_cast<Int>(pow(2, static_cast<Double>(pcSlice->getSPS()->getVuiParameters()->getHrdParameters()->getCpbRemovalDelayLengthMinus1()+1)))); // Syntax element signalled as minus, hence the .
-#if POC_RESET_FLAG || POC_RESET_IDC_ENCODER
+#if POC_RESET_IDC_ENCODER
       pictureTimingSEI.m_picDpbOutputDelay = pcSlice->getSPS()->getNumReorderPics(pcSlice->getSPS()->getMaxTLayers()-1) + pocCurr - m_totalCoded;
 #else
@@ -2868,5 +2804,5 @@
       SEIRecoveryPoint sei_recovery_point;
       sei_recovery_point.m_recoveryPocCnt    = 0;
-#if POC_RESET_FLAG || POC_RESET_IDC_ENCODER
+#if POC_RESET_IDC_ENCODER
       sei_recovery_point.m_exactMatchingFlag = ( pocCurr == 0 ) ? (true) : (false);
 #else
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp	(revision 1092)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp	(revision 1093)
@@ -85,5 +85,5 @@
 #endif
   m_numRefLayerLocationOffsets = 0;
-#if POC_RESET_FLAG || POC_RESET_IDC_ENCODER
+#if POC_RESET_IDC_ENCODER
   m_pocAdjustmentValue     = 0;
 #endif
@@ -1065,7 +1065,4 @@
   m_cPPS.setPPSId( m_iPPSIdCnt );
   m_cPPS.setSPSId( m_iSPSIdCnt );
-#if POC_RESET_FLAG
-  m_cPPS.setNumExtraSliceHeaderBits( 2 );
-#endif
 #if O0149_CROSS_LAYER_BLA_FLAG
   if (m_crossLayerBLAFlag)
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.h	(revision 1092)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.h	(revision 1093)
@@ -137,5 +137,5 @@
   Int                     m_phaseVerChroma[MAX_LAYERS];
   Int                     m_resamplePhaseSetPresentFlag[MAX_LAYERS];
-#if POC_RESET_FLAG || POC_RESET_IDC_ENCODER
+#if POC_RESET_IDC_ENCODER
   Int                     m_pocAdjustmentValue;
 #endif
@@ -262,5 +262,5 @@
   TEncTop*  getRefLayerEnc(UInt refLayerIdx);
 #endif
-#if POC_RESET_FLAG || POC_RESET_IDC_ENCODER
+#if POC_RESET_IDC_ENCODER
   Int       getPocAdjustmentValue()      { return m_pocAdjustmentValue;}
   Void      setPocAdjustmentValue(Int x) { m_pocAdjustmentValue = x;   }
