Index: branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 765)
+++ branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 766)
@@ -556,7 +556,5 @@
 
   READ_FLAG(     uiCode, "video_signal_type_present_flag");           pcVUI->setVideoSignalTypePresentFlag(uiCode);
-#if H_MV_6_PS_O0118_33
   assert( pcSPS->getLayerId() == 0 || !pcVUI->getVideoSignalTypePresentFlag() ); 
-#endif
 
   if (pcVUI->getVideoSignalTypePresentFlag())
@@ -746,5 +744,4 @@
   {
     READ_FLAG( uiCode, "update_rep_format_flag" );               pcSPS->setUpdateRepFormatFlag( uiCode == 1 );
-#if H_MV_6_PS_REP_FORM_18_19_20
     if ( pcSPS->getUpdateRepFormatFlag() )
     { 
@@ -754,10 +751,4 @@
   else
   {
-#else
-  }
-  
-  if ( pcSPS->getUpdateRepFormatFlag() )
-  { 
-#endif
 #endif
   READ_UVLC(     uiCode, "chroma_format_idc" );                  pcSPS->setChromaFormatIdc( uiCode );
@@ -795,9 +786,5 @@
 
 #if H_MV
-#if H_MV_6_PS_REP_FORM_18_19_20
   if ( pcSPS->getLayerId() == 0 )
-#else
-  if ( pcSPS->getUpdateRepFormatFlag() )
-#endif
   { 
 #endif
@@ -948,23 +935,7 @@
 
   READ_FLAG( uiCode, "sps_extension_flag");
-#if H_MV_6_PSEM_O0142_3
   pcSPS->setSpsExtensionFlag( uiCode ); 
-#endif
   if (pcSPS->getSpsExtensionFlag( ) )
   {
-#if !H_MV_6_PSEM_O0142_3
-#if H_MV
-    parseSPSExtension( pcSPS ); 
-    READ_FLAG( uiCode, "sps_extension2_flag");
-    if ( uiCode )
-    {
-#if H_3D
-      parseSPSExtension2( pcSPS, viewIndex, depthFlag ); 
-      READ_FLAG( uiCode, "sps_extension3_flag");
-      if ( uiCode )
-      {
-#endif
-#endif
-#else    
     for (Int i = 0; i < PS_EX_T_MAX_NUM; i++)
     {
@@ -991,19 +962,9 @@
     if ( pcSPS->getSpsExtensionTypeFlag( PS_EX_T_ESC ))
     {   
-#endif
         while ( xMoreRbspData() )
         {
           READ_FLAG( uiCode, "sps_extension_data_flag");
         }
-#if H_MV_6_PSEM_O0142_3
-    }
-#else
-#if H_MV      
-#if H_3D
-      }
-#endif
-    }
-#endif
-#endif
+    }
   }
 }
@@ -1014,7 +975,4 @@
   UInt uiCode; 
   READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" );    pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false);
-#if !H_MV_6_SHVC_O0098_36
-  READ_UVLC( uiCode, "sps_shvc_reserved_zero_idc" ); 
-#else
   
   READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcSPS->setNumScaledRefLayerOffsets( uiCode );
@@ -1031,5 +989,4 @@
     READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); pcSPS->setScaledRefLayerBottomOffset( j, iCode );
   }
-#endif  
 }
 
@@ -1081,9 +1038,5 @@
   READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
 #if H_MV
-#if H_MV_6_LAYER_ID_32
   READ_CODE( 6,  uiCode,  "vps_max_layers_minus1" );              pcVPS->setMaxLayersMinus1( std::min( uiCode, (UInt) ( MAX_NUM_LAYER_IDS-1) )  );
-#else
-  READ_CODE( 6,  uiCode,  "vps_max_layers_minus1" );              pcVPS->setMaxLayersMinus1( uiCode  );
-#endif
 #else
   READ_CODE( 6,  uiCode,  "vps_reserved_zero_6bits" );            assert(uiCode == 0);
@@ -1140,7 +1093,5 @@
     }
   }
-#if H_MV_6_HRD_O0217_13
   pcVPS->deriveLayerSetLayerIdList(); 
-#endif
   TimingInfo *timingInfo = pcVPS->getTimingInfo();
   READ_FLAG(       uiCode, "vps_timing_info_present_flag");         timingInfo->setTimingInfoPresentFlag      (uiCode ? true : false);
@@ -1209,12 +1160,8 @@
   UInt uiCode; 
   READ_FLAG( uiCode, "avc_base_layer_flag" );                     pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false );
-#if H_MV_6_PS_O0109_24
   READ_FLAG( uiCode, "vps_vui_present_flag" );                    pcVPS->setVpsVuiPresentFlag( uiCode == 1 );  if ( pcVPS->getVpsVuiPresentFlag() )
   {  
-#endif
   READ_CODE( 16, uiCode, "vps_vui_offset" );                      pcVPS->setVpsVuiOffset( uiCode );
-#if H_MV_6_PS_O0109_24
-  }
-#endif
+  }
 
   READ_FLAG( uiCode, "splitting_flag" );                          pcVPS->setSplittingFlag( uiCode == 1 ? true : false );
@@ -1263,5 +1210,4 @@
   }
 
-#if H_MV_6_PS_O0109_22
   READ_CODE( 4, uiCode, "view_id_len" ); pcVPS->setViewIdLen( uiCode );
 
@@ -1280,17 +1226,4 @@
     }
   }
-#else
-  // GT spec says: trac #39
-  // if ( pcVPS->getNumViews() > 1 )  
-  //   However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val. 
-  {
-    READ_CODE( 4, uiCode, "view_id_len_minus1" ); pcVPS->setViewIdLenMinus1( uiCode );
-  }
-
-  for( Int i = 0; i < pcVPS->getNumViews(); i++ )
-  {
-    READ_CODE( pcVPS->getViewIdLenMinus1( ) + 1, uiCode, "view_id_val[i]" ); pcVPS->setViewIdVal( i, uiCode );
-  }
-#endif
 
 
@@ -1302,8 +1235,5 @@
     }
   }
-#if H_MV_6_MISC_O0062_31
   pcVPS->setRefLayers(); 
-#endif
-#if H_MV_6_ILDSD_O0120_26
   READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag" ); pcVPS->setVpsSubLayersMaxMinus1PresentFlag( uiCode == 1 );
   if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() )
@@ -1323,5 +1253,4 @@
     }
   }
-#endif
   READ_FLAG( uiCode, "max_tid_ref_present_flag" ); pcVPS->setMaxTidRefPresentFlag( uiCode == 1 );
 
@@ -1330,5 +1259,4 @@
     for( Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ )
     {
-#if H_MV_6_ILDDS_O0225_30
       for( Int j = i + 1; j <= pcVPS->getMaxLayersMinus1(); j++ )
       {
@@ -1338,7 +1266,4 @@
         }
       }
-#else
-      READ_CODE( 3, uiCode,       "max_tid_il_ref_pics_plus1[i]" );      pcVPS->setMaxTidIlRefPicPlus1( i , uiCode ); 
-#endif
     }
   }
@@ -1354,7 +1279,5 @@
     {
       READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); pcVPS->setProfileRefMinus1( i, uiCode );
-#if H_MV_6_PS_O0109_23
       pcVPS->checkProfileRefMinus1( i );      
-#endif
     }
     parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1);
@@ -1379,16 +1302,10 @@
   if( numOutputLayerSets > 1)
   {
-#if H_MV_6_PS_0109_25
     READ_CODE( 2, uiCode, "default_one_target_output_layer_idc" ); pcVPS->setDefaultOneTargetOutputLayerIdc( uiCode );
     pcVPS->checkDefaultOneTargetOutputLayerIdc(); 
-#else
-    READ_FLAG( uiCode, "default_one_target_output_layer_flag" ); pcVPS->setDefaultOneTargetOutputLayerFlag(  uiCode == 1); 
-#endif
   }  
 
-#if H_MV_6_HRD_O0217_13
   pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 )); 
   pcVPS->setOutputLayerSetIdxMinus1(0, -1); 
-#endif
   for( Int i = 1; i < numOutputLayerSets; i++ )
   {
@@ -1401,5 +1318,4 @@
       }        
     }
-#if H_MV_6_HRD_O0217_13
     else
     { // These inference rules would also be helpful in spec text
@@ -1410,5 +1326,4 @@
       }
     }
-#endif
 
     if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
@@ -1417,13 +1332,9 @@
     }
   }
-#if H_MV_6_GEN_0153_28
   if( pcVPS->getMaxLayersMinus1() > 0 )
   {
     READ_FLAG( uiCode, "alt_output_layer_flag" ); pcVPS->setAltOutputLayerFlag( uiCode == 1 );
   }
-#endif
-#if H_MV_6_HRD_O0217_13
   pcVPS->deriveTargetLayerIdLists(); 
-#endif
   READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 );
   if ( pcVPS->getRepFormatIdxPresentFlag() )
@@ -1434,5 +1345,4 @@
   for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ )
   { 
-#if H_MV_6_PS_REP_FORM_18_19_20
     assert( pcVPS->getRepFormat(i) == NULL ); 
     TComRepFormat* curRepFormat = new TComRepFormat(); 
@@ -1440,10 +1350,4 @@
     parseRepFormat( i, curRepFormat ,  prevRepFormat); 
     pcVPS->setRepFormat(i, curRepFormat ); 
-#else
-    assert( pcVPS->getRepFormat(i) == NULL ); 
-    TComRepFormat* repFormat = new TComRepFormat(); 
-    parseRepFormat( repFormat );
-    pcVPS->setRepFormat(i, repFormat ); 
-#endif
   }
 
@@ -1454,9 +1358,5 @@
       if( pcVPS->getVpsNumRepFormatsMinus1() > 0 )
       {
-#if H_MV_6_PS_REP_FORM_18_19_20
         READ_CODE( 8, uiCode, "vps_rep_format_idx" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
-#else
-        READ_CODE( 4, uiCode, "vps_rep_format_idx" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
-#endif
       }
     }
@@ -1464,5 +1364,4 @@
 
   READ_FLAG( uiCode, "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag ( uiCode == 1 ); 
-#if H_MV_6_MISC_O0062_31
   for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
   {
@@ -1472,16 +1371,9 @@
     }
   }
-#endif
-
-#if H_MV_6_HRD_O0217_13
+
   parseDpbSize( pcVPS ); 
-#endif
-
-#if !H_MV_6_PS_O0223_29
-  READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPS->setCrossLayerIrapAlignedFlag( uiCode == 1 );
-#endif
+
   READ_UVLC( uiCode, "direct_dep_type_len_minus2")    ; pcVPS->setDirectDepTypeLenMinus2   ( uiCode ); 
 
-#if H_MV_6_PS_O0096_21
   READ_FLAG( uiCode, "default_direct_dependency_flag" ); pcVPS->setDefaultDirectDependencyFlag( uiCode == 1 );
   if ( pcVPS->getDefaultDirectDependencyFlag( ) )
@@ -1507,21 +1399,6 @@
     }
   }  
-#else
-  for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )
-  {
-    for( Int j = 0; j < i; j++ )
-    {
-      if (pcVPS->getDirectDependencyFlag( i, j) )
-      {        
-        READ_CODE( pcVPS->getDirectDepTypeLenMinus2( ) + 2,  uiCode, "direct_dependency_type[i][j]" ); pcVPS->setDirectDependencyType( i, j , uiCode);
-      }
-    }
-  }
-#endif
 
   READ_FLAG( uiCode, "vps_shvc_reserved_zero_flag" ); 
-#if !H_MV_6_PS_O0109_24
-  READ_FLAG( uiCode, "vps_vui_present_flag" )       ; pcVPS->setVpsVuiPresentFlag( uiCode == 1 );
-#endif
 
   if( pcVPS->getVpsVuiPresentFlag() )
@@ -1532,14 +1409,7 @@
 
   pcVPS->checkVPSExtensionSyntax(); 
-#if !H_MV_6_MISC_O0062_31
-  pcVPS->setRefLayers(); 
-#endif
-}
-
-#if H_MV_6_PS_REP_FORM_18_19_20
+}
+
 Void TDecCavlc::parseRepFormat( Int i, TComRepFormat* pcRepFormat, TComRepFormat* pcPrevRepFormat )
-#else
-Void TDecCavlc::parseRepFormat( TComRepFormat* pcRepFormat )
-#endif
 {
   assert( pcRepFormat ); 
@@ -1547,5 +1417,4 @@
   UInt uiCode; 
 
-#if H_MV_6_PS_REP_FORM_18_19_20
   READ_CODE( 16, uiCode, "pic_width_vps_in_luma_samples" );  pcRepFormat->setPicWidthVpsInLumaSamples ( uiCode );
   READ_CODE( 16, uiCode, "pic_height_vps_in_luma_samples" ); pcRepFormat->setPicHeightVpsInLumaSamples( uiCode );
@@ -1556,5 +1425,4 @@
   if ( pcRepFormat->getChromaAndBitDepthVpsPresentFlag() )
   {  
-#endif
   READ_CODE( 2,  uiCode, "chroma_format_vps_idc" );          pcRepFormat->setChromaFormatVpsIdc       ( uiCode );
   if ( pcRepFormat->getChromaFormatVpsIdc() == 3 )
@@ -1562,11 +1430,6 @@
     READ_FLAG( uiCode, "separate_colour_plane_vps_flag" ); pcRepFormat->setSeparateColourPlaneVpsFlag( uiCode == 1 ); 
   }
-#if !H_MV_6_PS_REP_FORM_18_19_20
-  READ_CODE( 16, uiCode, "pic_width_vps_in_luma_samples" );  pcRepFormat->setPicWidthVpsInLumaSamples ( uiCode );
-  READ_CODE( 16, uiCode, "pic_height_vps_in_luma_samples" ); pcRepFormat->setPicHeightVpsInLumaSamples( uiCode );
-#endif
   READ_CODE( 4,  uiCode, "bit_depth_vps_luma_minus8" );      pcRepFormat->setBitDepthVpsLumaMinus8    ( uiCode );
   READ_CODE( 4,  uiCode, "bit_depth_vps_chroma_minus8" );    pcRepFormat->setBitDepthVpsChromaMinus8  ( uiCode );
-#if H_MV_6_PS_REP_FORM_18_19_20
   }
   else
@@ -1574,5 +1437,4 @@
     pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, false ); 
   }
-#endif
 }
 
@@ -1587,5 +1449,4 @@
 
   UInt uiCode; 
-#if H_MV_6_PS_O0223_29
   READ_FLAG( uiCode, "cross_layer_pic_type_aligned_flag" ); pcVPSVUI->setCrossLayerPicTypeAlignedFlag( uiCode == 1 );
   if ( !pcVPSVUI->getCrossLayerPicTypeAlignedFlag() )
@@ -1593,5 +1454,4 @@
     READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPSVUI->setCrossLayerIrapAlignedFlag( uiCode == 1 );
   }
-#endif
   READ_FLAG( uiCode, "bit_rate_present_vps_flag" ); pcVPSVUI->setBitRatePresentVpsFlag( uiCode == 1 );
   READ_FLAG( uiCode, "pic_rate_present_vps_flag" ); pcVPSVUI->setPicRatePresentVpsFlag( uiCode == 1 );
@@ -1624,5 +1484,4 @@
   }
 
-#if H_MV_6_O0226_37
   READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 );
   if( !pcVPSVUI->getTilesNotInUseFlag() ) 
@@ -1659,13 +1518,4 @@
     }
   }
-#else
-  for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
-  {
-    for( Int  j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 
-    {
-      READ_FLAG( uiCode, "tile_boundaries_aligned_flag" ); pcVPSVUI->setTileBoundariesAlignedFlag( i, j, uiCode == 1 );
-    }
-  }
-#endif
 
   READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 );
@@ -1690,5 +1540,4 @@
   }
 
-#if H_MV_6_PS_O0118_33
   READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 );
   if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
@@ -1724,6 +1573,4 @@
     }
   }
-#endif
-#if H_MV_6_HRD_O0164_15
   READ_FLAG( uiCode, "vps_vui_bsp_hrd_present_flag" ); pcVPSVUI->setVpsVuiBspHrdPresentFlag( uiCode == 1 );
   if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) )
@@ -1731,8 +1578,6 @@
     parseVpsVuiBspHrdParameters( pcVPS ); 
 }
-#endif
-}
-
-#if H_MV_6_HRD_O0164_15
+}
+
 Void TDecCavlc::parseVpsVuiBspHrdParameters( TComVPS* pcVPS )
 {
@@ -1791,7 +1636,5 @@
   }  
 }  
-#endif
-
-#if H_MV_6_PS_O0118_33
+
 Void TDecCavlc::parseVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo ) 
 {
@@ -1803,7 +1646,5 @@
   READ_CODE( 8, uiCode, "matrix_coeffs_vps" );            pcVideoSignalInfo->setMatrixCoeffsVps( uiCode );
 }
-#endif
-
-#if H_MV_6_HRD_O0217_13
+
 Void TDecCavlc::parseDpbSize( TComVPS* vps )
 {
@@ -1846,5 +1687,4 @@
   }  
 }
-#endif
 #endif
 
@@ -2000,10 +1840,8 @@
   sps->inferRepFormat  ( vps , rpcSlice->getLayerId() ); 
   sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) );   
-#if H_MV_6_PS_O0118_33
   if ( sps->getVuiParametersPresentFlag() )
   {
     sps->getVuiParameters()->inferVideoSignalInfo( vps, rpcSlice->getLayerId() ); 
   }
-#endif
   rpcSlice->setVPS(vps);      
   rpcSlice->setViewId   ( vps->getViewId   ( rpcSlice->getLayerId() )      );
@@ -2059,5 +1897,18 @@
 #if H_MV    
     Int esb = 0; //Don't use i, otherwise will shadow something below
-#if !H_MV_6_RALS_O0149_11
+
+    if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
+    {
+      esb++; 
+      READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 );
+    }
+
+    if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
+    {
+      esb++; 
+      READ_FLAG( uiCode, "cross_layer_bla_flag" ); rpcSlice->setCrossLayerBlaFlag( uiCode == 1 );
+    }
+    rpcSlice->checkCrossLayerBlaFlag( ); 
+
     if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
     {
@@ -2065,26 +1916,4 @@
       READ_FLAG( uiCode, "poc_reset_flag" ); rpcSlice->setPocResetFlag( uiCode == 1 );
     }
-#endif
-
-    if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
-    {
-      esb++; 
-      READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 );
-    }
-
-#if H_MV_6_RALS_O0149_11
-    if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
-    {
-      esb++; 
-      READ_FLAG( uiCode, "cross_layer_bla_flag" ); rpcSlice->setCrossLayerBlaFlag( uiCode == 1 );
-    }
-    rpcSlice->checkCrossLayerBlaFlag( ); 
-
-    if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
-    {
-      esb++; 
-      READ_FLAG( uiCode, "poc_reset_flag" ); rpcSlice->setPocResetFlag( uiCode == 1 );
-    }
-#endif
 
     for (; esb < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++)    
@@ -2111,5 +1940,4 @@
 
 
-#if H_MV_6_POC_31_35_38
     UInt slicePicOrderCntLsb = 0;
     Int iPOClsb = slicePicOrderCntLsb;  // Needed later
@@ -2158,11 +1986,7 @@
       rpcSlice->setPOC              ( 0 );
     }      
-#endif
 
     if( rpcSlice->getIdrPicFlag() )
     {
-#if !H_MV_6_POC_31_35_38
-      rpcSlice->setPOC(0);
-#endif
       TComReferencePictureSet* rps = rpcSlice->getLocalRPS();
       rps->setNumberOfNegativePictures(0);
@@ -2177,41 +2001,4 @@
     else
     {
-#if !H_MV_6_POC_31_35_38
-      READ_CODE(sps->getBitsForPOC(), uiCode, "pic_order_cnt_lsb");  
-      Int iPOClsb = uiCode;
-      Int iPrevPOC = rpcSlice->getPrevTid0POC();
-      Int iMaxPOClsb = 1<< sps->getBitsForPOC();
-      Int iPrevPOClsb = iPrevPOC & (iMaxPOClsb - 1);
-      Int iPrevPOCmsb = iPrevPOC-iPrevPOClsb;
-      Int iPOCmsb;
-      if( ( iPOClsb  <  iPrevPOClsb ) && ( ( iPrevPOClsb - iPOClsb )  >=  ( iMaxPOClsb / 2 ) ) )
-      {
-        iPOCmsb = iPrevPOCmsb + iMaxPOClsb;
-      }
-      else if( (iPOClsb  >  iPrevPOClsb )  && ( (iPOClsb - iPrevPOClsb )  >  ( iMaxPOClsb / 2 ) ) ) 
-      {
-        iPOCmsb = iPrevPOCmsb - iMaxPOClsb;
-      }
-      else
-      {
-        iPOCmsb = iPrevPOCmsb;
-      }
-      if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
-        || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
-        || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP )
-      {
-        // For BLA picture types, POCmsb is set to 0.
-        iPOCmsb = 0;
-      }
-      rpcSlice->setPOC              (iPOCmsb+iPOClsb);
-#if H_MV
-      if ( rpcSlice->getPocResetFlag() )  
-      {
-        rpcSlice->setPocBeforeReset   ( rpcSlice->getPOC() ); 
-        rpcSlice->setPOC              ( 0 );
-
-      }      
-#endif
-#endif
       TComReferencePictureSet* rps;
       rps = rpcSlice->getLocalRPS();
@@ -2347,7 +2134,5 @@
     }
 #if H_MV
-#if H_MV_6_ILDDS_ILREFPICS_27_34
     Bool interLayerPredLayerIdcPresentFlag = false; 
-#endif
     Int layerId       = rpcSlice->getLayerId(); 
     if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 )
@@ -2362,7 +2147,5 @@
         if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) )
         {
-#if H_MV_6_ILDDS_ILREFPICS_27_34
           interLayerPredLayerIdcPresentFlag = true; 
-#endif
           for( Int idx = 0; idx < rpcSlice->getNumActiveRefLayerPics(); idx++ )   
           {
@@ -2372,5 +2155,4 @@
       }  
     }
-#if H_MV_6_ILDDS_ILREFPICS_27_34
     if ( !interLayerPredLayerIdcPresentFlag )
     {
@@ -2380,5 +2162,4 @@
       }
     }
-#endif
 #endif
     if(sps->getUseSAO())
Index: branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.h
===================================================================
--- branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 765)
+++ branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 766)
@@ -78,19 +78,9 @@
 #if H_MV
   Void  parseVPSExtension   ( TComVPS* pcVPS ); 
-#if H_MV_6_PS_REP_FORM_18_19_20
   Void  parseRepFormat      ( Int i, TComRepFormat* curRepFormat, TComRepFormat* prevRepFormat );
-#else
-  Void  parseRepFormat      ( TComRepFormat* pcRepFormat );
-#endif
   Void  parseVPSVUI         ( TComVPS* pcVPS );
-#if H_MV_6_PS_O0118_33
   Void parseVideoSignalInfo ( TComVideoSignalInfo* pcVideoSignalInfo ); 
-#endif
-#if H_MV_6_HRD_O0217_13
   Void  parseDpbSize        ( TComVPS* pcVPS ); 
-#endif
-#if H_MV_6_HRD_O0164_15
   Void parseVpsVuiBspHrdParameters( TComVPS* pcVPS ); 
-#endif
 #endif
 
Index: branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.cpp	(revision 765)
+++ branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.cpp	(revision 766)
@@ -656,10 +656,8 @@
 #if H_MV
   m_apcSlicePilot->setVPS(vps);  
-#if H_MV_6_PS_0092_17
   // The nuh_layer_id value of the NAL unit containing the PPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA.
   assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, pps->getLayerId() ) );   
   // The nuh_layer_id value of the NAL unit containing the SPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA.
   assert( sps->getLayerId() == m_layerId || sps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, sps->getLayerId() ) );
-#endif
   sps->inferRepFormat  ( vps , m_layerId ); 
   sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 
@@ -692,9 +690,5 @@
 
 #if H_MV
-#if H_MV_FIX_SKIP_PICTURES
 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag  )
-#else
-Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag )
-#endif
 {
   assert( nalu.m_layerId == m_layerId ); 
@@ -754,7 +748,5 @@
 #endif
 
-#if H_MV_LAYER_WISE_STARTUP
     xCeckNoClrasOutput();
-#endif
     // Skip pictures due to random access
     if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay))
@@ -762,7 +754,5 @@
     m_prevSliceSkipped = true;
     m_skippedPOC = m_apcSlicePilot->getPOC();
-#if H_MV_FIX_SKIP_PICTURES
       sliceSkippedFlag = true; 
-#endif
       return false;
     }
@@ -772,7 +762,5 @@
     m_prevSliceSkipped = true;
     m_skippedPOC = m_apcSlicePilot->getPOC();
-#if H_MV_FIX_SKIP_PICTURES
       sliceSkippedFlag = true; 
-#endif
       return false;
     }
@@ -1222,9 +1210,5 @@
 
 #if H_MV
-#if H_MV_FIX_SKIP_PICTURES
 Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag )
-#else
-Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayerFlag)
-#endif
 #else
 Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay)
@@ -1271,9 +1255,5 @@
     case NAL_UNIT_CODED_SLICE_RASL_R:
 #if H_MV
-#if H_MV_FIX_SKIP_PICTURES
       return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag, sliceSkippedFlag );
-#else
-      return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag);
-#endif
 #else
       return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay);
@@ -1324,9 +1304,5 @@
     return true;
   }
-#if H_MV_LAYER_WISE_STARTUP
   else if ( !m_layerInitilizedFlag[ m_layerId ] ) // start of random access point, m_pocRandomAccess has not been set yet.
-#else
-  else if (m_pocRandomAccess == MAX_INT) // start of random access point, m_pocRandomAccess has not been set yet.
-#endif
   {
     if (   m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA
@@ -1336,5 +1312,4 @@
     {
 
-#if H_MV_LAYER_WISE_STARTUP
       if ( xAllRefLayersInitilized() )
       {
@@ -1346,12 +1321,7 @@
         return true; 
       }
-#else
-      // set the POC random access since we need to skip the reordered pictures in the case of CRA/CRANT/BLA/BLANT.
-      m_pocRandomAccess = m_apcSlicePilot->getPOC();
-#endif
     }
     else if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP )
     {
-#if H_MV_LAYER_WISE_STARTUP
       if ( xAllRefLayersInitilized() )
       {
@@ -1363,11 +1333,7 @@
         return true; 
       }
-#else
-      m_pocRandomAccess = -MAX_INT; // no need to skip the reordered pictures in IDR, they are decodable.
-#endif
     }
     else 
     {
-#if H_MV_FIX_SKIP_PICTURES
       static Bool warningMessage[MAX_NUM_LAYERS];
       static Bool warningInitFlag = false;
@@ -1387,12 +1353,4 @@
         warningMessage[m_layerId] = false; 
       }
-#else
-      static Bool warningMessage = false;
-      if(!warningMessage)
-      {
-        printf("\nWarning: this is not a valid random access point and the data is discarded until the first CRA picture");
-        warningMessage = true;
-      }
-#endif
       return true;
     }
@@ -1404,10 +1362,5 @@
     return true;
   }
-#if H_MV_LAYER_WISE_STARTUP
   return !m_layerInitilizedFlag[ getLayerId() ]; 
-#else
-  // if we reach here, then the picture is not skipped.
-  return false; 
-#endif
 }
 
@@ -1451,5 +1404,4 @@
 }
 
-#if H_MV_LAYER_WISE_STARTUP
 Void TDecTop::xCeckNoClrasOutput()
 {
@@ -1486,4 +1438,3 @@
 }
 #endif
-#endif
 //! \}
Index: branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.h	(revision 765)
+++ branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.h	(revision 766)
@@ -186,7 +186,5 @@
   TComList<TComPic*>      m_cListPic;         //  Dynamic buffer
 #if H_MV
-#if H_MV_LAYER_WISE_STARTUP
   Bool*                    m_layerInitilizedFlag; // initialization Layers
-#endif
   static ParameterSetManagerDecoder m_parameterSetManagerDecoder;  // storage for parameter sets 
 #else
@@ -246,9 +244,5 @@
   Void  init();
 #if H_MV  
-#if H_MV_FIX_SKIP_PICTURES
   Bool  decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer, Bool& sliceSkippedFlag );
-#else
-  Bool  decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer );
-#endif
   Bool  decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer );
 #else  
@@ -268,10 +262,6 @@
   TComList<TComPic*>*     getListPic            ()               { return &m_cListPic;  }  
   Void                    setIvPicLists         ( TComPicLists* picLists) { m_ivPicLists = picLists; }
-#if H_MV_LAYER_WISE_STARTUP
   Void                    setLayerInitilizedFlags( Bool* val )    { m_layerInitilizedFlag = val; }
-#endif
-#if H_MV_6_HRD_O0217_13
   TComVPS*                getPrefetchedVPS      ()               { return m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); }; //Assuming that currently only one VPS is present. 
-#endif
   Int                     getCurrPoc            ()               { return m_apcSlicePilot->getPOC(); }
   Void                    setLayerId            ( Int layer)     { m_layerId = layer;   }
@@ -294,15 +284,9 @@
 #if H_MV  
   TComPic*  xGetPic( Int layerId, Int poc ); 
-#if H_MV_FIX_SKIP_PICTURES
   Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag );  
-#else
-  Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag );  
-#endif
   Void      xResetPocInPicBuffer();
-#if H_MV_LAYER_WISE_STARTUP
   Void      xCeckNoClrasOutput();
 
   Bool      xAllRefLayersInitilized();
-#endif
 #else
   Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay);
