Index: trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1179)
+++ trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1196)
@@ -39,5 +39,5 @@
 #include "SEIread.h"
 #include "TDecSlice.h"
-#if H_3D_ANNEX_SELECTION_FIX
+#if H_3D
 #include "TDecTop.h"
 #endif
@@ -93,30 +93,8 @@
 TDecCavlc::TDecCavlc()
 {
-#if !HHI_CAM_PARA_K0052
-#if H_3D
-  m_aaiTempScale            = new Int* [ MAX_NUM_LAYERS ];
-  m_aaiTempOffset           = new Int* [ MAX_NUM_LAYERS ];
-  for( UInt uiVId = 0; uiVId < MAX_NUM_LAYERS; uiVId++ )
-  {
-    m_aaiTempScale            [ uiVId ] = new Int [ MAX_NUM_LAYERS ];
-    m_aaiTempOffset           [ uiVId ] = new Int [ MAX_NUM_LAYERS ];
-  }
-#endif
-#endif
 }
 
 TDecCavlc::~TDecCavlc()
 {
-#if !HHI_CAM_PARA_K0052
-#if H_3D
-  for( UInt uiVId = 0; uiVId < MAX_NUM_LAYERS; uiVId++ )
-  {
-    delete [] m_aaiTempScale            [ uiVId ];
-    delete [] m_aaiTempOffset           [ uiVId ];
-  }
-  delete [] m_aaiTempScale;
-  delete [] m_aaiTempOffset;
-#endif
-#endif
 }
 
@@ -1048,9 +1026,5 @@
       READ_FLAG( uiCode, "qt_pred_flag" ); sps3dExt->setQtPredFlag( d, uiCode == 1 );
       READ_FLAG( uiCode, "inter_sdc_flag" ); sps3dExt->setInterSdcFlag( d, uiCode == 1 );
-#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
       READ_FLAG( uiCode, "intra_skip_flag" ); sps3dExt->setDepthIntraSkipFlag( d, uiCode == 1 );
-#else
-      READ_FLAG( uiCode, "intra_single_flag" ); sps3dExt->setIntraSingleFlag( d, uiCode == 1 );
-#endif
     }
   }
@@ -1063,12 +1037,8 @@
   READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 );
   READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 );
-#if FIX_TICKET_95
   if (pcPPS->getPpsInferScalingListFlag())
   {
   READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode );
   }
-#else
-  READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode );
-#endif
 
   UInt numRefLocOffsets;; 
@@ -1336,8 +1306,6 @@
   }
 
-#if HHI_INTER_COMP_PRED_K0052
 #if H_3D
   pcVPS->initViewCompLayer( ); 
-#endif
 #endif
 
@@ -1929,5 +1897,4 @@
 Void TDecCavlc::parseVPS3dExtension( TComVPS* pcVPS )
 {
-#if HHI_CAM_PARA_K0052
   UInt uiCode;   
   READ_UVLC( uiCode, "cp_precision"); pcVPS->setCpPrecision( uiCode ) ;
@@ -1959,55 +1926,4 @@
   }
   pcVPS->deriveCpPresentFlag(); 
-#else
-  UInt uiCode; 
-
-  UInt uiCamParPrecision = 0; 
-  Bool bCamParSlice      = false; 
-  Bool bCamParPresentFlag = false;
-
-  READ_UVLC( uiCamParPrecision, "cp_precision" );
-#if HHI_VIEW_ID_LIST_I5_J0107
-  for (Int n = 1; n < pcVPS->getNumViews(); n++)
-  {
-    Int viewIndex = pcVPS->getViewOIdxList( n ); 
-#else
-  for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++)
-  {
-#endif
-    pcVPS->setCamParPresent         ( viewIndex, false );
-    pcVPS->setHasCamParInSliceHeader( viewIndex, false );
-    READ_FLAG( uiCode, "cp_present_flag[i]" );                  bCamParPresentFlag = ( uiCode == 1);
-    if ( bCamParPresentFlag )
-    {
-      READ_FLAG( uiCode, "cp_in_slice_segment_header_flag[i]" );          bCamParSlice = ( uiCode == 1);
-      if ( !bCamParSlice )
-      {
-#if HHI_VIEW_ID_LIST_I5_J0107
-        for( UInt m = 0; m < n; n++ )
-        {
-          Int uiBaseIndex = pcVPS->getViewOIdxList ( m ); 
-          Int iCode; 
-          READ_SVLC( iCode, "vps_cp_scale" );                m_aaiTempScale  [ uiBaseIndex ][ viewIndex ]   = iCode;
-          READ_SVLC( iCode, "vps_cp_off" );                  m_aaiTempOffset [ uiBaseIndex ][ viewIndex ]   = iCode;
-          READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); m_aaiTempScale  [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];
-          READ_SVLC( iCode, "vps_cp_inv_off_plus_off" );     m_aaiTempOffset [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];
-        }
-      }
-      pcVPS->initCamParaVPS( viewIndex, bCamParPresentFlag, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset ); 
-#else
-        for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ )
-        {
-          Int iCode; 
-          READ_SVLC( iCode, "vps_cp_scale" );                m_aaiTempScale  [ uiBaseIndex ][ viewIndex ]   = iCode;
-          READ_SVLC( iCode, "vps_cp_off" );                  m_aaiTempOffset [ uiBaseIndex ][ viewIndex ]   = iCode;
-          READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); m_aaiTempScale  [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];
-          READ_SVLC( iCode, "vps_cp_inv_off_plus_off" );     m_aaiTempOffset [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];
-        }
-      }
-      pcVPS->initCamParaVPS( viewIndex, bCamParPresentFlag, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset ); 
-#endif
-    }
-  }
-#endif
 }
 #endif
@@ -2070,9 +1986,4 @@
 #endif
   rpcSlice->setSPS(sps);
-#if !HHI_INTER_COMP_PRED_K0052
-#if H_3D
-  rpcSlice->init3dToolParameters();
-#endif
-#endif
   rpcSlice->setPPS(pps);
   if( pps->getDependentSliceSegmentsEnabledFlag() && ( !firstSliceSegmentInPic ))
@@ -2468,5 +2379,4 @@
       }
     }
-#if HHI_INTER_COMP_PRED_K0052
 #if H_3D
     if ( getDecTop()->decProcAnnexI() )
@@ -2481,5 +2391,4 @@
 #endif
 #endif
-#endif
     if(sps->getUseSAO())
     {
@@ -2488,11 +2397,10 @@
       if( rpcSlice->getSPS()->getChromaFormatIdc() != 0 )
       {
-      READ_FLAG(uiCode, "slice_sao_chroma_flag");  rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode);
-    }
+        READ_FLAG(uiCode, "slice_sao_chroma_flag");  rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode);
+      }
       else
       {
         rpcSlice->setSaoEnabledFlagChroma( false );
       }
-      
 #else
       READ_FLAG(uiCode, "slice_sao_chroma_flag");  rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode);
@@ -2662,12 +2570,8 @@
     }
 #if H_3D_IC
-#if H_3D_ANNEX_SELECTION_FIX
     else if(    rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) 
              && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 
              && getDecTop()->decProcAnnexI()
            )
-#else
-    else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 )
-#endif
     {
       UInt uiCodeTmp = 0;
@@ -2766,5 +2670,4 @@
     rpcSlice->setLFCrossSliceBoundaryFlag( (uiCode==1)?true:false);
 
-#if HHI_CAM_PARA_K0052
 #if H_3D
     if ( getDecTop()->decProcAnnexI() )
@@ -2784,5 +2687,4 @@
     }
 #endif
-#endif
   }
   
@@ -2808,24 +2710,4 @@
   }
 
-#if !HHI_CAM_PARA_K0052
-#if H_3D
-#if H_3D_FCO
-  if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() )  && rpcSlice->getIsDepth() )
-#else
-  if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() )  && !rpcSlice->getIsDepth() )
-#endif
-  {
-    UInt uiViewIndex = rpcSlice->getViewIndex();
-    for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )
-    {
-      READ_SVLC( iCode, "cp_scale" );                m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ] = iCode;
-      READ_SVLC( iCode, "cp_off" );                  m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ] = iCode;
-      READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale [ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ];
-      READ_SVLC( iCode, "cp_inv_off_plus_off" );     m_aaiTempOffset[ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ];
-    }
-    rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset );
-  }
-#endif
-#endif
 
   if(pps->getSliceHeaderExtensionPresentFlag())
@@ -3100,17 +2982,9 @@
   assert(0);
 }
-
-#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+#if H_3D
 Void TDecCavlc::parseDIS( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
 {
   assert(0);
 }
-#else
-#if H_3D_SINGLE_DEPTH
-Void TDecCavlc::parseSingleDepthMode( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
-{
-  assert(0);
-}
-#endif
 #endif
 
Index: trunk/source/Lib/TLibDecoder/TDecCAVLC.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1179)
+++ trunk/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1196)
@@ -52,8 +52,7 @@
 // Class definition
 // ====================================================================================================================
-#if H_3D_ANNEX_SELECTION_FIX
+#if H_3D
 class TDecTop;
 #endif
-
 /// CAVLC decoder class
 class TDecCavlc : public SyntaxElementParser, public TDecEntropyIf
@@ -66,12 +65,5 @@
   void  parseShortTermRefPicSet            (TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Int idx);
   
-
-#if !HHI_CAM_PARA_K0052
 #if H_3D
-  Int**    m_aaiTempScale;
-  Int**    m_aaiTempOffset;
-#endif
-#endif
-#if H_3D_ANNEX_SELECTION_FIX
   TDecTop*  m_decTop;
 #endif
@@ -118,5 +110,5 @@
   Void  parsePPS            ( TComPPS* pcPPS);
 #endif
-#if H_3D_ANNEX_SELECTION_FIX
+#if H_3D
   Void  setDecTop           ( TDecTop* decTop ) { m_decTop = decTop; }; 
 #endif
@@ -136,10 +128,6 @@
   
   Void  parseSkipFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
-#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+#if H_3D
   Void  parseDIS            ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
-#else
-#if H_3D_SINGLE_DEPTH
-  Void  parseSingleDepthMode        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
-#endif
 #endif
   Void  parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
@@ -182,6 +170,5 @@
   Void  parseScalingList               ( TComScalingList* scalingList );
   Void xDecodeScalingList    ( TComScalingList *scalingList, UInt sizeId, UInt listId);
-
-#if H_3D_ANNEX_SELECTION_FIX
+#if H_3D
   TDecTop*  getDecTop()      { return m_decTop; };
 #endif
Index: trunk/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1179)
+++ trunk/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1196)
@@ -310,7 +310,4 @@
 #if H_3D_NBDV 
   DisInfo DvInfo; 
-#if !SEC_ARP_REM_ENC_RESTRICT_K0035
-  DvInfo.bDV = false;
-#endif
   DvInfo.m_acNBDV.setZero();
   DvInfo.m_aVIdxCan = 0;
@@ -347,9 +344,5 @@
       if( pcCU->getSlice()->getIsDepth())
       {
-#if SEC_ARP_REM_ENC_RESTRICT_K0035
         m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo);
-#else
-        DvInfo.bDV = m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo);
-#endif
       }
       else
@@ -359,18 +352,10 @@
       if( pcCU->getSlice()->getDepthBasedBlkPartFlag() )  //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done.
       {
-#if SEC_ARP_REM_ENC_RESTRICT_K0035
         m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true);
-#else
-        DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true);
-#endif
       }
       else
 #endif
       {
-#if SEC_ARP_REM_ENC_RESTRICT_K0035
         m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo);
-#else
-        DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo);
-#endif
       }
 #if H_3D_IV_MERGE
@@ -545,23 +530,12 @@
     return;
   }
-#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+#if H_3D
   m_pcEntropyDecoder->decodeDIS( pcCU, uiAbsPartIdx, uiDepth );
   if(!pcCU->getDISFlag(uiAbsPartIdx))
   {
-#else
-#if H_3D_SINGLE_DEPTH
-  m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
-  if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
-  {
-#endif
 #endif
   m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth );
   m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth );
 
-#if !HHI_MOVE_SYN_K0052
-#if H_3D_DIM_SDC
-  m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
-#endif
-#endif
   if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N )
   {
@@ -570,8 +544,6 @@
     if(pcCU->getIPCMFlag(uiAbsPartIdx))
     {
-#if HHI_MOVE_SYN_K0052
 #if H_3D_DIM_SDC
       m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
-#endif
 #endif
       xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
@@ -593,10 +565,6 @@
   m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP );
   setdQPFlag( bCodeDQP );
-#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
-  }
-#else
-#if H_3D_SINGLE_DEPTH
-  }
-#endif
+#if H_3D
+  }
 #endif
   xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
@@ -625,5 +593,5 @@
   UInt uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
   UInt uiBPelY   = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1;
-  
+
   UInt uiCurNumParts    = pcPic->getNumPartInCU() >> (uiDepth<<1);
   TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx());
@@ -633,5 +601,5 @@
     bBoundary = true;
   }
-  
+
   if( ( ( uiDepth < pcCU->getDepth( uiAbsPartIdx ) ) && ( uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth ) ) || bBoundary )
   {
@@ -643,5 +611,5 @@
       uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiIdx] ];
       uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiIdx] ];
-      
+
       Bool binSlice = (pcCU->getSCUAddr()+uiIdx+uiQNumParts>pcSlice->getSliceSegmentCurStartCUAddr())&&(pcCU->getSCUAddr()+uiIdx<pcSlice->getSliceSegmentCurEndCUAddr());
       if(binSlice&&( uiLPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
@@ -649,5 +617,5 @@
         xDecompressCU(pcCU, uiIdx, uiNextDepth );
       }
-      
+
       uiIdx += uiQNumParts;
     }
@@ -657,17 +625,17 @@
   // Residual reconstruction
   m_ppcYuvResi[uiDepth]->clear();
-  
+
   m_ppcCU[uiDepth]->copySubCU( pcCU, uiAbsPartIdx, uiDepth );
 
   switch( m_ppcCU[uiDepth]->getPredictionMode(0) )
   {
-    case MODE_INTER:
+  case MODE_INTER:
 #if H_3D_DBBP
-      if( m_ppcCU[uiDepth]->getDBBPFlag(0) )
-      {
-        xReconInterDBBP( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
-      }
-      else
-      {
+    if( m_ppcCU[uiDepth]->getDBBPFlag(0) )
+    {
+      xReconInterDBBP( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
+    }
+    else
+    {
 #endif
 #if H_3D_INTER_SDC
@@ -679,47 +647,31 @@
       {
 #endif
-      xReconInter( m_ppcCU[uiDepth], uiDepth );
+        xReconInter( m_ppcCU[uiDepth], uiDepth );
 #if H_3D_INTER_SDC
       }
 #endif
 #if H_3D_DBBP
-      }
-#endif
-      break;
-    case MODE_INTRA:
-#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
-      if( m_ppcCU[uiDepth]->getDISFlag(0) )
-      {
-        xReconDIS( m_ppcCU[uiDepth], 0, uiDepth );
-      }
+    }
+#endif
+    break;
+  case MODE_INTRA:
+#if H_3D
+    if( m_ppcCU[uiDepth]->getDISFlag(0) )
+    {
+      xReconDIS( m_ppcCU[uiDepth], 0, uiDepth );
+    }
 #if H_3D_DIM_SDC
-      else if( m_ppcCU[uiDepth]->getSDCFlag(0) )
-      {
-        xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth );
-      }
-#endif
-      else
-#else
-#if H_3D_SINGLE_DEPTH
-      if( m_ppcCU[uiDepth]->getSingleDepthFlag(0) )
-        xReconIntraSingleDepth( m_ppcCU[uiDepth], 0, uiDepth );
-#if H_3D_DIM_SDC
-      else if( m_ppcCU[uiDepth]->getSDCFlag(0) )
-        xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth );
-#endif
-      else
-#else
-#if H_3D_DIM_SDC
-      if( m_ppcCU[uiDepth]->getSDCFlag(0) )
-        xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth );
-      else
-#endif
-#endif
+    else if( m_ppcCU[uiDepth]->getSDCFlag(0) )
+    {
+      xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth );
+    }
+#endif
+    else
 #endif
       xReconIntraQT( m_ppcCU[uiDepth], uiDepth );
-      break;
-    default:
-      assert(0);
-      break;
+    break;
+  default:
+    assert(0);
+    break;
   }
   if ( m_ppcCU[uiDepth]->isLosslessCoded(0) && (m_ppcCU[uiDepth]->getIPCMFlag(0) == false))
@@ -727,5 +679,5 @@
     xFillPCMBuffer(m_ppcCU[uiDepth], uiDepth);
   }
-  
+
   xCopyToPic( m_ppcCU[uiDepth], pcPic, uiAbsPartIdx, uiDepth );
 }
@@ -751,5 +703,5 @@
 }
 
-#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+#if H_3D
 Void TDecCu::xReconDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
@@ -828,75 +780,5 @@
   }
 }
-#else
-#if H_3D_SINGLE_DEPTH
-Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
-{
-  UInt uiWidth        = pcCU->getWidth  ( 0 );
-  UInt uiHeight       = pcCU->getHeight ( 0 );
-
-  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
-
-  UInt    uiStride    = pcRecoYuv->getStride  ();
-  Pel*    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
-
-
-  AOF( uiWidth == uiHeight );
-  AOF( uiAbsPartIdx == 0 );
-
-  //construction of depth candidates
-  Pel testDepth;
-  Pel DepthNeighbours[2];
-  Int index =0;
-  for( Int i = 0; (i < 2) && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ )
-  {
-    if(!pcCU->getNeighDepth (0, uiAbsPartIdx, &testDepth, i))
-    {
-      continue;
-    }
-    DepthNeighbours[index]=testDepth;
-    index++;
-  }
-
-  if(index==0)
-  {
-    DepthNeighbours[index]=1<<(g_bitDepthY-1);
-    index++;
-  }
-
-  if(index==1)
-  {
-    DepthNeighbours[index]=ClipY(DepthNeighbours[0] + 1 );
-    index++;
-  }
-
-  for( UInt uiY = 0; uiY < uiHeight; uiY++ )
-  {
-    for( UInt uiX = 0; uiX < uiWidth; uiX++ )
-    {
-      piReco[ uiX ] =DepthNeighbours[(Int)pcCU->getSingleDepthValue(uiAbsPartIdx)];
-    }
-    piReco     += uiStride;
-  }
-
-  // clear UV
-  UInt  uiStrideC     = pcRecoYuv->getCStride();
-  Pel   *pRecCb       = pcRecoYuv->getCbAddr();
-  Pel   *pRecCr       = pcRecoYuv->getCrAddr();
-
-  for (Int y=0; y<uiHeight/2; y++)
-  {
-    for (Int x=0; x<uiWidth/2; x++)
-    {
-      pRecCb[x] = 1<<(g_bitDepthC-1);
-      pRecCr[x] = 1<<(g_bitDepthC-1);
-    }
-
-    pRecCb += uiStrideC;
-    pRecCr += uiStrideC;
-  }
-}
-#endif
-#endif
-
+#endif
 #if H_3D_INTER_SDC
 Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
@@ -962,12 +844,8 @@
   // compute mask by segmenting depth block
   Bool pMask[MAX_CU_SIZE*MAX_CU_SIZE];
-#if HS_DBBP_CLEAN_K0048
   Bool bValidMask = m_pcPrediction->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(0), pcCU->getHeight(0), pMask, pcCU);
-#else
-  Bool bValidMask = m_pcPrediction->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(0), pcCU->getHeight(0), pMask);
-#endif
   AOF(bValidMask);
   
-  DBBPTmpData* pDBBPTmpData = pcCU->getDBBPTmpData();
+  DbbpTmpData* pDBBPTmpData = pcCU->getDBBPTmpData();
   TComYuv* apSegPredYuv[2] = { m_ppcYuvReco[uiDepth], m_ppcYuvRecoDBBP[uiDepth] };
   
Index: trunk/source/Lib/TLibDecoder/TDecCu.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecCu.h	(revision 1179)
+++ trunk/source/Lib/TLibDecoder/TDecCu.h	(revision 1196)
@@ -123,10 +123,6 @@
   Void setdQPFlag               ( Bool b )                { m_bDecodeDQP = b;           }
   Void xFillPCMBuffer           (TComDataCU* pCU, UInt depth);
-#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+#if H_3D
   Void xReconDIS               ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
-#else
-#if H_3D_SINGLE_DEPTH
-  Void xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
-#endif
 #endif
 #if H_3D_DIM_SDC
Index: trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 1179)
+++ trunk/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 1196)
@@ -52,6 +52,5 @@
   m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth );
 }
-
-#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+#if H_3D
 Void TDecEntropy::decodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
@@ -63,16 +62,4 @@
   m_pcEntropyDecoderIf->parseDIS( pcCU, uiAbsPartIdx, uiDepth );
 }
-#else
-#if H_3D_SINGLE_DEPTH
-Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
-{
-  if( !pcCU->getSlice()->getIntraSingleFlag() )
-  {
-    return;
-  }  
-
-  m_pcEntropyDecoderIf->parseSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
-}
-#endif
 #endif
 
@@ -161,12 +148,4 @@
 {
   m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth );
-#if !HHI_MOVE_SYN_K0052  
-#if H_3D_DBBP
-if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
-  {
-    decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth);
-  }
-#endif
-#endif
 }
 
@@ -176,14 +155,8 @@
   {
     decodeIntraDirModeLuma  ( pcCU, uiAbsPartIdx, uiDepth );
-#if HHI_MOVE_SYN_K0052
+#if H_3D_DIM_SDC
     decodeSDCFlag   ( pcCU, uiAbsPartIdx, uiDepth );    
-#endif
-#if H_3D_DIM_SDC
 #if H_3D_DISABLE_CHROMA
-#if !HHI_MOVE_SYN_K0052
-    if(!pcCU->getSDCFlag(uiAbsPartIdx) && !pcCU->getSlice()->getIsDepth() )
-#else
     if(!pcCU->getSDCFlag(uiAbsPartIdx) && pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0  )
-#endif
 #else
     if(!pcCU->getSDCFlag(uiAbsPartIdx))
@@ -247,9 +220,7 @@
 #endif
 #if H_3D_SPIVMP
-  Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
-  TComMvField*  pcMvFieldSP;
-  UChar* puhInterDirSP;
-  pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2]; 
-  puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()]; 
+  Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];     
+  TComMvField*  pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2]; 
+  UChar* puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()]; 
 #endif
   for ( UInt ui = 0; ui < pcCU->getSlice()->getMaxNumMergeCand(); ui++ )
@@ -265,5 +236,5 @@
   pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx);
 #endif
-#if HHI_MOVE_SYN_K0052
+#if H_3D
   for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
   {
@@ -475,49 +446,10 @@
       decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );
       UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
-#if H_3D_ARP
-      decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
-#endif
-#if H_3D_IC
-      decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
-#endif
-#if H_3D_DBBP
-      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false )
-#else
       if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 ) 
-#endif
       {
         pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
         if ( !isMerged )
         {
-#if H_3D_VSP
-          Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
-          memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
-#if H_3D_SPIVMP
-          memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
-#endif
-          pcSubCU->initAvailableFlags();
-          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
-          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
-#if H_3D_SPIVMP
-            , pcMvFieldSP, puhInterDirSP
-#endif
-            , numValidMergeCand );
-          pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
-#if H_3D_SPIVMP
-            , bSPIVMPFlag
-#endif
-            , numValidMergeCand );
-          pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
-
-#else
-#if H_3D
-          pcSubCU->initAvailableFlags();
-          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
-          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
-
-#else
           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
-#endif
-#endif
           isMerged = true;
         }
@@ -527,32 +459,5 @@
       {
         uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
-#if H_3D_VSP
-        Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
-        memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
-#if H_3D_SPIVMP
-        memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
-#endif
-        pcSubCU->initAvailableFlags();
         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
-        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours
-#if H_3D_SPIVMP
-          , pcMvFieldSP, puhInterDirSP
-#endif
-          ,numValidMergeCand, uiMergeIndex );
-        pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
-#if H_3D_SPIVMP
-          , bSPIVMPFlag
-#endif
-          ,numValidMergeCand );
-        pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
-#else
-#if H_3D
-        pcSubCU->initAvailableFlags();
-        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
-        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
-#else
-        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
-#endif
-#endif
       }
       pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
@@ -567,47 +472,6 @@
           pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
           pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
-#if H_3D_VSP
-#if H_3D_DBBP
-          if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 && !pcCU->getDBBPFlag( uiAbsPartIdx ) )
-#else
-          if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 )
-#endif
-          {
-            if ( uhInterDirNeighbours[ uiMergeIndex ] & (1<<uiRefListIdx) )
-            {
-              UInt dummy;
-              Int vspSize;
-              Int width, height;
-              pcCU->getPartIndexAndSize( uiPartIdx, dummy, width, height, uiSubPartIdx, pcCU->getTotalNumPart()==256 );
-              pcCU->setMvFieldPUForVSP( pcCU, uiSubPartIdx, width, height, RefPicList( uiRefListIdx ), cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx(), vspSize );
-              pcCU->setVSPFlag( uiSubPartIdx, vspSize );
-            }
-          }
-#endif
-        }
-      }
-#if H_3D_SPIVMP
-      pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );  
-      if (bSPIVMPFlag[uiMergeIndex] != 0)
-      {
-        Int iWidth, iHeight;
-        UInt uiIdx;
-        pcCU->getPartIndexAndSize( uiPartIdx, uiIdx, iWidth, iHeight, uiSubPartIdx, true );
-
-        UInt uiSPAddr;
-
-        Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
-
-        pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight);
-
-        for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++)
-        {
-          pcCU->getSPAbsPartIdx(uiSubPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr);
-          pcCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight);
-          pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight);
-          pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight);
-        }
-      }
-#endif
+        }
+      }
     }
     else
@@ -623,10 +487,4 @@
         }
       }
-#if H_3D_ARP
-      decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
-#endif
-#if H_3D_IC
-      decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
-#endif
     }
     if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) )
@@ -706,5 +564,5 @@
 }
 
-#if HHI_MOVE_SYN_K0052
+#if H_3D
 Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
 {
@@ -753,5 +611,4 @@
   pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx);
 }
-
 #else
 Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
@@ -798,4 +655,5 @@
 }
 #endif
+
 Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int quadtreeTULog2MinSizeInCU)
 {
@@ -869,15 +727,15 @@
       if (pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 )      
       {
-      if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
-      {
-        m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth, uiDepth );
-      }
-      if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) )
-      {
-        m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth );
-      }
-    }
-    else
-    {
+        if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
+        {
+          m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth, uiDepth );
+        }
+        if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) )
+        {
+          m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth );
+        }
+      }
+      else
+      {
         if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
         {
@@ -1131,10 +989,8 @@
 {
   pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth );
-#if HHI_MOVE_SYN_K0052
   if ( pcCU->isSkipped( uiAbsPartIdx ) )
   {
     return; 
   }
-#endif
 
 
@@ -1157,12 +1013,8 @@
 Void TDecEntropy::decodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
-#if HHI_MOVE_SYN_K0052
   if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
   {
-#endif
     m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, uiDepth );
-#if HHI_MOVE_SYN_K0052
-  }
-#endif
+  }
 }
 #endif
Index: trunk/source/Lib/TLibDecoder/TDecEntropy.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecEntropy.h	(revision 1179)
+++ trunk/source/Lib/TLibDecoder/TDecEntropy.h	(revision 1196)
@@ -85,10 +85,6 @@
 public:
   virtual Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
-#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+#if H_3D
   virtual Void parseDIS           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
-#else
-#if H_3D_SINGLE_DEPTH
-  virtual Void parseSingleDepthMode       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
-#endif
 #endif
   virtual Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
@@ -152,7 +148,8 @@
   Void decodeMvdPU        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
   Void decodeMVPIdxPU     ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
-#if HHI_MOVE_SYN_K0052
-  Void decodeMvsAMVP       ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
-#endif  
+#if H_3D
+  Void decodeMvsAMVP       ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, 
+RefPicList eRefList );
+#endif
   Void    setEntropyDecoder           ( TDecEntropyIf* p );
   Void    setBitstream                ( TComInputBitstream* p ) { m_pcEntropyDecoderIf->setBitstream(p);                    }
@@ -177,10 +174,6 @@
   Void decodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void decodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
-#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+#if H_3D
   Void decodeDIS               ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ;
-#else
-#if H_3D_SINGLE_DEPTH
-  Void decodeSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ;
-#endif
 #endif
   Void decodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
Index: trunk/source/Lib/TLibDecoder/TDecGop.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecGop.h	(revision 1179)
+++ trunk/source/Lib/TLibDecoder/TDecGop.h	(revision 1196)
@@ -63,5 +63,5 @@
 // Class definition
 // ====================================================================================================================
-#if H_3D_ANNEX_SELECTION_FIX
+#if H_3D
 class TDecTop; 
 #endif
@@ -83,5 +83,5 @@
   TDecSlice*            m_pcSliceDecoder;
   TComLoopFilter*       m_pcLoopFilter;
-#if H_3D_ANNEX_SELECTION_FIX
+#if H_3D
   TDecTop*              m_decTop; 
 #endif
Index: trunk/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 1179)
+++ trunk/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 1196)
@@ -52,12 +52,7 @@
 , m_cCUSplitFlagSCModel       ( 1,             1,               NUM_SPLIT_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels )
 , m_cCUSkipFlagSCModel        ( 1,             1,               NUM_SKIP_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
-#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+#if H_3D
 , m_cCUDISFlagSCModel         ( 1,             1,               NUM_DIS_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cCUDISTypeSCModel         ( 1,             1,               NUM_DIS_TYPE_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
-#else
-#if H_3D_SINGLE_DEPTH
-, m_cCUSingleDepthFlagSCModel        ( 1,             1,               NUM_SINGLEDEPTH_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
-, m_cSingleDepthValueSCModel         ( 1,             1,               NUM_SINGLE_DEPTH_VALUE_DATA_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
-#endif
 #endif
 , m_cCUMergeFlagExtSCModel    ( 1,             1,               NUM_MERGE_FLAG_EXT_CTX        , m_contextModels + m_numContextModels, m_numContextModels)
@@ -141,12 +136,7 @@
   m_cCUSplitFlagSCModel.initBuffer       ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG );
   m_cCUSkipFlagSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SKIP_FLAG );
-#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+#if H_3D
   m_cCUDISFlagSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_DIS_FLAG );
   m_cCUDISTypeSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_DIS_TYPE );
-#else
-#if H_3D_SINGLE_DEPTH
-  m_cCUSingleDepthFlagSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG );
-  m_cSingleDepthValueSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
-#endif
 #endif
   m_cCUMergeFlagExtSCModel.initBuffer    ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT );
@@ -217,12 +207,7 @@
   m_cCUSplitFlagSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG );
   m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
-#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+#if H_3D
   m_cCUDISFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG );
   m_cCUDISTypeSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE );
-#else
-#if H_3D_SINGLE_DEPTH
-  m_cCUSingleDepthFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG );
-  m_cSingleDepthValueSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
-#endif
 #endif
   m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT );
@@ -461,11 +446,11 @@
   UInt uiSymbol;
 
-    m_pcTDecBinIf->decodeBinTrm(uiSymbol);
+  m_pcTDecBinIf->decodeBinTrm(uiSymbol);
 
 #if H_MV_ENC_DEC_TRAC
-      DTRACE_CU("pcm_flag", uiSymbol)
-#endif
-    if (uiSymbol)
-    {
+  DTRACE_CU("pcm_flag", uiSymbol)
+#endif
+  if (uiSymbol)
+  {
     Bool bIpcmFlag = true;
 
@@ -500,46 +485,42 @@
       piPCMSample += uiWidth;
     }
-
-
 #if H_3D_DISABLE_CHROMA
     if( pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 )
     {    
 #endif
-    piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset;
-    uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
-    uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;
-    uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();
-
-    for(uiY = 0; uiY < uiHeight; uiY++)
-    {
-      for(uiX = 0; uiX < uiWidth; uiX++)
-      {
-        UInt uiSample;
-        m_pcTDecBinIf->xReadPCMCode(uiSampleBits, uiSample);
-        piPCMSample[uiX] = uiSample;
-      }
-      piPCMSample += uiWidth;
-    }
-
-    piPCMSample = pcCU->getPCMSampleCr() + uiChromaOffset;
-    uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
-    uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;
-    uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();
-
-    for(uiY = 0; uiY < uiHeight; uiY++)
-    {
-      for(uiX = 0; uiX < uiWidth; uiX++)
-      {
-        UInt uiSample;
-        m_pcTDecBinIf->xReadPCMCode(uiSampleBits, uiSample);
-        piPCMSample[uiX] = uiSample;
-      }
-      piPCMSample += uiWidth;
-    }
+      piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset;
+      uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
+      uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;
+      uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();
+
+      for(uiY = 0; uiY < uiHeight; uiY++)
+      {
+        for(uiX = 0; uiX < uiWidth; uiX++)
+        {
+          UInt uiSample;
+          m_pcTDecBinIf->xReadPCMCode(uiSampleBits, uiSample);
+          piPCMSample[uiX] = uiSample;
+        }
+        piPCMSample += uiWidth;
+      }
+
+      piPCMSample = pcCU->getPCMSampleCr() + uiChromaOffset;
+      uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
+      uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;
+      uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();
+
+      for(uiY = 0; uiY < uiHeight; uiY++)
+      {
+        for(uiX = 0; uiX < uiWidth; uiX++)
+        {
+          UInt uiSample;
+          m_pcTDecBinIf->xReadPCMCode(uiSampleBits, uiSample);
+          piPCMSample[uiX] = uiSample;
+        }
+        piPCMSample += uiWidth;
+      }
 #if H_3D_DISABLE_CHROMA
     }
 #endif
-
-
     m_pcTDecBinIf->start();
   }
@@ -594,6 +575,5 @@
 #endif
 }
-
-#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+#if H_3D
 Void TDecSbac::parseDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
@@ -639,54 +619,5 @@
   }
 }
-#else
-#if H_3D_SINGLE_DEPTH
-Void TDecSbac::parseSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
-{
-  pcCU->setSingleDepthFlagSubParts( false,        uiAbsPartIdx, uiDepth );
-  UInt uiSymbol = 0;
-  m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSingleDepthFlagSCModel.get( 0, 0, 0 ) );
-  if( uiSymbol )
-  {
-    pcCU->setSingleDepthFlagSubParts( true,        uiAbsPartIdx, uiDepth );
-    pcCU->setSkipFlagSubParts( false,        uiAbsPartIdx, uiDepth );
-    pcCU->setSDCFlagSubParts( false,        uiAbsPartIdx, uiDepth );
-    pcCU->setPredModeSubParts( MODE_INTRA,  uiAbsPartIdx, uiDepth );
-    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
-    pcCU->setLumaIntraDirSubParts (DC_IDX, uiAbsPartIdx, uiDepth );
-    pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
-    pcCU->setMergeFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
-    pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth);
-    pcCU->setCbfSubParts(0, 1, 1, uiAbsPartIdx, uiDepth);
-
-    UInt absValDeltaDC = 0;
-
-    UInt uiUnaryIdx = 0;
-    UInt uiNumCand = SINGLE_DEPTH_MODE_CAND_LIST_SIZE;
-    if ( uiNumCand > 1 )
-    {
-      for( ; uiUnaryIdx < uiNumCand - 1; ++uiUnaryIdx )
-      {
-        UInt uiSymbol2 = 0;
-        if ( uiUnaryIdx==0 )
-        {
-          m_pcTDecBinIf->decodeBin( uiSymbol2, m_cSingleDepthValueSCModel.get( 0, 0, 0 ) );
-        }
-        else
-        {
-          m_pcTDecBinIf->decodeBinEP( uiSymbol2);
-        }
-        if( uiSymbol2 == 0 )
-        {
-          break;
-        }
-      }
-    }
-    absValDeltaDC = uiUnaryIdx;
-    pcCU->setSingleDepthValueSubParts((Pel)absValDeltaDC,uiAbsPartIdx, 0, uiDepth);
-  }
-}
-#endif
-#endif
-
+#endif
 /** parse merge flag
  * \param pcCU
@@ -772,6 +703,4 @@
 #if H_3D_QTLPC
   Bool bParseSplitFlag    = true;
-
-  
   Bool    bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag();
   TComPic *pcTexture      = pcCU->getSlice()->getTexturePic();
@@ -810,5 +739,5 @@
 #endif
   pcCU->setDepthSubParts( uiDepth + uiSymbol, uiAbsPartIdx );
-  
+
   return;
 }
@@ -827,5 +756,5 @@
 #if H_3D_QTLPC
   Bool bParsePartSize    = true;
-  
+
   Bool    bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag();
   TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
@@ -859,5 +788,5 @@
 #endif
 
-  
+
   if ( pcCU->isIntra( uiAbsPartIdx ) )
   {
@@ -866,5 +795,5 @@
     {
 #endif
-     uiSymbol = 1;
+      uiSymbol = 1;
       if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
       {
@@ -899,40 +828,40 @@
       {
 #endif
-      UInt uiMaxNumBits = 2;
-      if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) )
-      {
-        uiMaxNumBits ++;
-      }
-      for ( UInt ui = 0; ui < uiMaxNumBits; ui++ )
-      {
-        m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );
-        if ( uiSymbol )
-        {
-          break;
-        }
-        uiMode++;
-      }
-      eMode = (PartSize) uiMode;
-      if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
-      {
-        if (eMode == SIZE_2NxN)
-        {
-        m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 ));
-          if (uiSymbol == 0)
+        UInt uiMaxNumBits = 2;
+        if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) )
+        {
+          uiMaxNumBits ++;
+        }
+        for ( UInt ui = 0; ui < uiMaxNumBits; ui++ )
+        {
+          m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );
+          if ( uiSymbol )
           {
-            m_pcTDecBinIf->decodeBinEP(uiSymbol);
-            eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD);
+            break;
           }
-        }
-        else if (eMode == SIZE_Nx2N)
-        {
-        m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 ));
-          if (uiSymbol == 0)
+          uiMode++;
+        }
+        eMode = (PartSize) uiMode;
+        if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
+        {
+          if (eMode == SIZE_2NxN)
           {
-            m_pcTDecBinIf->decodeBinEP(uiSymbol);
-            eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N);
+            m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 ));
+            if (uiSymbol == 0)
+            {
+              m_pcTDecBinIf->decodeBinEP(uiSymbol);
+              eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD);
+            }
           }
-        }
-      }
+          else if (eMode == SIZE_Nx2N)
+          {
+            m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 ));
+            if (uiSymbol == 0)
+            {
+              m_pcTDecBinIf->decodeBinEP(uiSymbol);
+              eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N);
+            }
+          }
+        }
 #if H_3D_QTLPC
       }
@@ -1060,8 +989,8 @@
     {
 #endif
-    m_pcTDecBinIf->decodeBin( symbol, m_cCUIntraPredSCModel.get( 0, 0, 0) );
-    mpmPred[j] = symbol;
+      m_pcTDecBinIf->decodeBin( symbol, m_cCUIntraPredSCModel.get( 0, 0, 0) );
+      mpmPred[j] = symbol;
 #if H_MV_ENC_DEC_TRAC          
-    DTRACE_CU("prev_intra_luma_pred_flag", symbol)
+      DTRACE_CU("prev_intra_luma_pred_flag", symbol)
 #endif
 #if H_3D_DIM
@@ -1075,45 +1004,45 @@
     {
 #endif
-    Int preds[3] = {-1, -1, -1};
-    Int predNum = pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds);  
-    if (mpmPred[j])
-    {
-      m_pcTDecBinIf->decodeBinEP( symbol );
-      if (symbol)
+      Int preds[3] = {-1, -1, -1};
+      Int predNum = pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds);  
+      if (mpmPred[j])
       {
         m_pcTDecBinIf->decodeBinEP( symbol );
-        symbol++;
-      }
+        if (symbol)
+        {
+          m_pcTDecBinIf->decodeBinEP( symbol );
+          symbol++;
+        }
 #if H_MV_ENC_DEC_TRAC          
-      DTRACE_CU("mpm_idx", symbol)
-#endif
-      intraPredMode = preds[symbol];
-    }
-    else
-    {
-      m_pcTDecBinIf->decodeBinsEP( symbol, 5 );
-      intraPredMode = symbol;
+        DTRACE_CU("mpm_idx", symbol)
+#endif
+          intraPredMode = preds[symbol];
+      }
+      else
+      {
+        m_pcTDecBinIf->decodeBinsEP( symbol, 5 );
+        intraPredMode = symbol;
 #if H_MV_ENC_DEC_TRAC          
-      DTRACE_CU("rem_intra_luma_pred_mode", symbol)
+        DTRACE_CU("rem_intra_luma_pred_mode", symbol)
 #endif        
-      //postponed sorting of MPMs (only in remaining branch)
-      if (preds[0] > preds[1])
-      { 
-        std::swap(preds[0], preds[1]); 
-      }
-      if (preds[0] > preds[2])
-      {
-        std::swap(preds[0], preds[2]);
-      }
-      if (preds[1] > preds[2])
-      {
-        std::swap(preds[1], preds[2]);
-      }
-      for ( Int i = 0; i < predNum; i++ )
-      {
-        intraPredMode += ( intraPredMode >= preds[i] );
-      }
-    }
-    pcCU->setLumaIntraDirSubParts( (UChar)intraPredMode, absPartIdx+partOffset*j, depth );
+          //postponed sorting of MPMs (only in remaining branch)
+          if (preds[0] > preds[1])
+          { 
+            std::swap(preds[0], preds[1]); 
+          }
+          if (preds[0] > preds[2])
+          {
+            std::swap(preds[0], preds[2]);
+          }
+          if (preds[1] > preds[2])
+          {
+            std::swap(preds[1], preds[2]);
+          }
+          for ( Int i = 0; i < predNum; i++ )
+          {
+            intraPredMode += ( intraPredMode >= preds[i] );
+          }
+      }
+      pcCU->setLumaIntraDirSubParts( (UChar)intraPredMode, absPartIdx+partOffset*j, depth );
 #if H_3D_DIM
     }
@@ -1133,5 +1062,5 @@
     DTRACE_CU("intra_chroma_pred_mode", uiSymbol )
 #endif        
-    uiSymbol = DM_CHROMA_IDX;
+      uiSymbol = DM_CHROMA_IDX;
   } 
   else 
@@ -1143,5 +1072,5 @@
       DTRACE_CU("intra_chroma_pred_mode", uiIPredMode )
 #endif        
-      UInt uiAllowedChromaDir[ NUM_CHROMA_MODE ];
+        UInt uiAllowedChromaDir[ NUM_CHROMA_MODE ];
       pcCU->getAllowedChromaDir( uiAbsPartIdx, uiAllowedChromaDir );
       uiSymbol = uiAllowedChromaDir[ uiIPredMode ];
Index: trunk/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecSbac.h	(revision 1179)
+++ trunk/source/Lib/TLibDecoder/TDecSbac.h	(revision 1196)
@@ -125,10 +125,6 @@
   
   Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
-#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+#if H_3D
   Void parseDIS          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
-#else
-#if H_3D_SINGLE_DEPTH  
-  Void parseSingleDepthMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
-#endif
 #endif
   Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
@@ -182,12 +178,7 @@
   ContextModel3DBuffer m_cCUSplitFlagSCModel;
   ContextModel3DBuffer m_cCUSkipFlagSCModel;
-#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+#if H_3D
   ContextModel3DBuffer m_cCUDISFlagSCModel;
   ContextModel3DBuffer m_cCUDISTypeSCModel;
-#else
-#if H_3D_SINGLE_DEPTH
-  ContextModel3DBuffer m_cCUSingleDepthFlagSCModel;
-  ContextModel3DBuffer m_cSingleDepthValueSCModel;
-#endif
 #endif
   ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
Index: trunk/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1179)
+++ trunk/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1196)
@@ -76,9 +76,5 @@
   xDeleteArray( m_adBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 );
   xDeleteArray( m_aiBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 );
-#if HHI_CAM_PARA_K0052
   xDeleteArray( m_receivedIdc, m_vps->getNumViews() );
-#else
-  xDeleteArray( m_receivedIdc, m_uiMaxViewIndex + 1 );
-#endif
 }
 
@@ -95,5 +91,4 @@
   m_firstReceivedPoc        = -2; 
 
-#if HHI_CAM_PARA_K0052  
   for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++)
   {
@@ -134,45 +129,4 @@
 }
 
-#else
-  m_uiMaxViewIndex            = -1; 
-  for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++)
-  {
-    Int curViewIdx = m_vps->getViewIndex( m_vps->getLayerIdInNuh( i )); 
-    m_bCamParsVaryOverTime = m_bCamParsVaryOverTime || vps->hasCamParInSliceHeader( curViewIdx );
-    m_uiMaxViewIndex = std::max( m_uiMaxViewIndex, curViewIdx  ) ; 
-  }
-  assert( m_receivedIdc == NULL ); 
-  m_receivedIdc = new Int*[ m_uiMaxViewIndex + 1]; 
-  for (Int i = 0; i <= m_uiMaxViewIndex; i++)
-  {
-    m_receivedIdc[i] = new Int[ m_uiMaxViewIndex + 1 ]; 
-  }
-
-  xResetReceivedIdc( true ); 
-
-  for (Int viewIndex = 0; viewIndex <= m_uiMaxViewIndex ; viewIndex++ )
-  {
-    if (m_vps->getCamParPresent( viewIndex ) )
-    {    
-      if( !m_vps->hasCamParInSliceHeader( viewIndex ) ) 
-      {
-        for (Int baseViewIndex = 0; baseViewIndex < viewIndex ; baseViewIndex++ )
-        { 
-          m_receivedIdc   [ baseViewIndex ][ viewIndex ] = -1; 
-          m_aaiCodedScale [ baseViewIndex ][ viewIndex ] = m_vps->getCodedScale    (viewIndex) [ baseViewIndex ];
-          m_aaiCodedOffset[ baseViewIndex ][ viewIndex ] = m_vps->getCodedOffset   (viewIndex) [ baseViewIndex ];
-
-          m_receivedIdc   [ viewIndex ][ baseViewIndex ] = -1; 
-          m_aaiCodedScale [ viewIndex ][ baseViewIndex ] = m_vps->getInvCodedScale (viewIndex) [ baseViewIndex ];
-          m_aaiCodedOffset[ viewIndex ][ baseViewIndex ] = m_vps->getInvCodedOffset(viewIndex) [ baseViewIndex ];
-          xInitLUTs( baseViewIndex, viewIndex, m_aaiCodedScale[ baseViewIndex ][ viewIndex ], m_aaiCodedOffset[ baseViewIndex ][ viewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
-          xInitLUTs( viewIndex, baseViewIndex, m_aaiCodedScale[ viewIndex ][ baseViewIndex ], m_aaiCodedOffset[ viewIndex ][ baseViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
-        }
-      }
-    }
-  }
-}
-
-#endif
 
 
@@ -181,15 +135,8 @@
 CamParsCollector::xResetReceivedIdc( Bool overWriteFlag )
 {
-#if HHI_CAM_PARA_K0052
   for (Int i = 0; i < m_vps->getNumViews(); i++)
   {  
     for (Int j = 0; j < m_vps->getNumViews(); j++)
     {
-#else
-  for (Int i = 0; i <= m_uiMaxViewIndex; i++)
-  {  
-    for (Int j = 0; j <= m_uiMaxViewIndex; j++)
-    {
-#endif
       if ( overWriteFlag ||  ( m_receivedIdc[i][j] != -1 ) )
       {
@@ -232,9 +179,5 @@
   CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT)
 {
-#if HHI_CAM_PARA_K0052
   Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_vps->getCpPrecision() + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
-#else
-  Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_vps->getCamParPrecision() + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
-#endif
   Int     iLog2DivChroma = iLog2DivLuma + 1;
 
@@ -313,5 +256,4 @@
   }
 
-#if HHI_CAM_PARA_K0052
   UInt voiInVps          = m_vps->getVoiInVps(pcSlice->getViewIndex());  
   if( m_vps->getCpInSliceSegmentHeaderFlag( voiInVps ) ) // check consistency of slice parameters here
@@ -348,42 +290,4 @@
     }
   }  
-#else
-  UInt uiViewIndex          = pcSlice->getViewIndex();  
-  if( m_vps->getCamParPresent( uiViewIndex ) )
-  {    
-    if( m_vps->hasCamParInSliceHeader( uiViewIndex ) ) // check consistency of slice parameters here
-    {   
-      for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ )
-      {        
-        if ( m_receivedIdc[ uiViewIndex ][ uiBaseViewIndex ] != 0 )
-        {      
-          AOF( m_aaiCodedScale [ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedScale () [ uiBaseViewIndex ] );
-          AOF( m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedOffset() [ uiBaseViewIndex ] );
-        }
-        else
-        {          
-          m_receivedIdc   [ uiViewIndex ][ uiBaseViewIndex ]  = 1; 
-          m_aaiCodedScale [ uiViewIndex ][ uiBaseViewIndex ]  = pcSlice->getInvCodedScale () [ uiBaseViewIndex ];
-          m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ]  = pcSlice->getInvCodedOffset() [ uiBaseViewIndex ];
-          xInitLUTs( uiViewIndex, uiBaseViewIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseViewIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);
-        }
-        if ( m_receivedIdc[ uiBaseViewIndex ][ uiViewIndex ] != 0 )
-        {      
-          AOF( m_aaiCodedScale [ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedScale    () [ uiBaseViewIndex ] );
-          AOF( m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedOffset   () [ uiBaseViewIndex ] );
-        }
-        else
-        {        
-          m_receivedIdc   [ uiBaseViewIndex ][ uiViewIndex ]  = 1; 
-          m_aaiCodedScale [ uiBaseViewIndex ][ uiViewIndex ]  = pcSlice->getCodedScale    () [ uiBaseViewIndex ];
-          m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ]  = pcSlice->getCodedOffset   () [ uiBaseViewIndex ];
-          xInitLUTs( uiBaseViewIndex, uiViewIndex, m_aaiCodedScale[ uiBaseViewIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);
-        }
-      }
-    }
-  }
-#endif
-
-
 }
 
@@ -408,5 +312,4 @@
     if( iPOC == m_firstReceivedPoc )
     {
-#if HHI_CAM_PARA_K0052
       fprintf( m_pCodedScaleOffsetFile, "#ViewOrderIdx     ViewIdVal\n" );
       fprintf( m_pCodedScaleOffsetFile, "#------------ -------------\n" );
@@ -436,41 +339,4 @@
                 m_aaiCodedScale [ baseVoiInVps ][ voiInVps ], 
                 m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_vps->getCpPrecision() );
-#else
-      fprintf( m_pCodedScaleOffsetFile, "#  ViewIndex       ViewId\n" );
-      fprintf( m_pCodedScaleOffsetFile, "#----------- ------------\n" );
-      for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )
-      {
-        fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_vps->getViewIdVal( uiViewIndex ) );
-      }
-      fprintf( m_pCodedScaleOffsetFile, "\n\n");
-      fprintf( m_pCodedScaleOffsetFile, "# StartFrame     EndFrame   TargetView     BaseView   CodedScale  CodedOffset    Precision\n" );
-      fprintf( m_pCodedScaleOffsetFile, "#----------- ------------ ------------ ------------ ------------ ------------ ------------\n" );
-    }
-    if( iPOC == m_firstReceivedPoc || m_bCamParsVaryOverTime  )
-    {
-      Int iS = iPOC;
-      Int iE = ( m_bCamParsVaryOverTime ? iPOC : ~( 1 << 31 ) );
-#if HHI_CAM_PARA_K0052
-      for( UInt uiViewIndex = 0; uiViewIndex < m_vps->getNumViews(); uiViewIndex++ )
-      {
-        for( UInt uiBaseIndex = 0; uiBaseIndex < m_vps->getNumViews(); uiBaseIndex++ )
-#else
-      for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )
-      {
-        for( UInt uiBaseIndex = 0; uiBaseIndex <= m_uiMaxViewIndex; uiBaseIndex++ )
-#endif
-        {
-          if( uiViewIndex != uiBaseIndex )
-          {
-            if ( m_receivedIdc[uiBaseIndex][uiViewIndex] != 0 )
-            {            
-#if HHI_CAM_PARA_K0052
-              fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n",
-                iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCpPrecision() );
-#else
-              fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n",
-                iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCamParPrecision() );
-#endif
-#endif
             }            
           }
@@ -481,4 +347,5 @@
 }
 #endif
+
 TDecTop::TDecTop()
 {
@@ -556,5 +423,5 @@
   initROM();
 #endif
-#if H_3D_ANNEX_SELECTION_FIX
+#if H_3D
   m_cCavlcDecoder.setDecTop( this ); 
 #endif
@@ -867,9 +734,4 @@
 
 #endif
-#if H_3D
-#if !HHI_INTER_COMP_PRED_K0052
-  m_apcSlicePilot->init3dToolParameters();
-#endif
-#endif
   pps->setSPS(sps);
   pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumTileColumnsMinus1() + 1) : 1);
@@ -1098,5 +960,5 @@
   xActivateParameterSets();
 
-#if SONY_MV_V_CONST_C0078
+#if H_MV
   //Check Multiview Main profile constraint in G.11.1.1
   //  When ViewOrderIdx[ i ] derived according to any active VPS is equal to 1 
@@ -1230,9 +1092,10 @@
   pcPic->setViewIndex( getViewIndex() );
   pcPic->setIsDepth  ( getIsDepth  () );
-#endif
-#endif
-#if HHI_RES_PRED_K0052
   pcSlice->setIvPicLists( m_ivPicLists );         
 #endif
+#endif
+
+
+
 
   if (bNextSlice)
@@ -1271,9 +1134,4 @@
 
 #if H_3D
-#if !HHI_RES_PRED_K0052
-    pcSlice->setIvPicLists( m_ivPicLists );         
-#endif
-
-#if HHI_INTER_COMP_PRED_K0052
     pcSlice->checkInCompPredRefLayers(); 
 #if H_3D_IV_MERGE
@@ -1284,13 +1142,4 @@
 #endif
 #endif    
-#else
-#if H_3D_IV_MERGE
-#if H_3D_FCO
-    //assert( !getIsDepth() );
-#else
-    assert( !getIsDepth() || ( pcSlice->getTexturePic() != 0 ) );
-#endif
-#endif    
-#endif
 #endif
 #if H_MV
@@ -1347,5 +1196,7 @@
 #if  H_3D_TMVP
     if(pcSlice->getLayerId())
+    {
       pcSlice->generateAlterRefforTMVP();
+    }
 #endif
   }
@@ -1800,5 +1651,4 @@
 }
 
-#if H_MV
 Void TDecTop::xCeckNoClrasOutput()
 {
@@ -1834,4 +1684,28 @@
   return allRefLayersInitilizedFlag;
 }
+
+#if H_3D
+Void TDecTop::setProfileIdc()
+{
+  if (m_targetOptLayerSetIdx != -1 )
+  {    
+    TComVPS* vps = getPrefetchedVPS(); 
+    Int lsIdx = vps->olsIdxToLsIdx( m_targetOptLayerSetIdx );
+    Int lIdx = -1; 
+    for (Int j = 0; j < vps->getNumLayersInIdList( lsIdx ); j++ )
+    {
+      if ( vps->getLayerSetLayerIdList( lsIdx, j ) == getLayerId() )
+      {
+        lIdx = j; 
+        break; 
+      }        
+    }
+    assert( lIdx != -1 ); 
+
+    Int profileIdc = vps->getPTL( vps->getProfileTierLevelIdx( m_targetOptLayerSetIdx, lIdx ) )->getGeneralPTL()->getProfileIdc();
+    assert( profileIdc == 1 || profileIdc == 6 || profileIdc == 8 ); 
+    m_profileIdc = profileIdc;   
+  };
+}
 #endif
 #endif
Index: trunk/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecTop.h	(revision 1179)
+++ trunk/source/Lib/TLibDecoder/TDecTop.h	(revision 1196)
@@ -97,7 +97,4 @@
   TComVPS* m_vps; 
   Int**    m_receivedIdc; 
-#if!HHI_CAM_PARA_K0052
-  Int      m_uiMaxViewIndex; 
-#endif
   Int      m_lastPoc; 
   Int      m_firstReceivedPoc; 
@@ -244,6 +241,4 @@
   Bool                    m_isDepth;
   CamParsCollector*       m_pcCamParsCollector;
-#endif
-#if H_3D_ANNEX_SELECTION_FIX
   Int                     m_profileIdc;
 #endif
@@ -305,31 +300,8 @@
   Bool                    getIsDepth            ()               { return m_isDepth;    }
   Void                    setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; }
-#endif
-#if H_3D_ANNEX_SELECTION_FIX
-  Void                    setProfileIdc()
-  {        
-    if (m_targetOptLayerSetIdx != -1 )
-    {    
-      TComVPS* vps = getPrefetchedVPS(); 
-      Int lsIdx = vps->olsIdxToLsIdx( m_targetOptLayerSetIdx );
-      Int lIdx = -1; 
-      for (Int j = 0; j < vps->getNumLayersInIdList( lsIdx ); j++ )
-      {
-        if ( vps->getLayerSetLayerIdList( lsIdx, j ) == getLayerId() )
-        {
-          lIdx = j; 
-          break; 
-        }        
-      }
-      assert( lIdx != -1 ); 
-
-      Int profileIdc = vps->getPTL( vps->getProfileTierLevelIdx( m_targetOptLayerSetIdx, lIdx ) )->getGeneralPTL()->getProfileIdc();
-      assert( profileIdc == 1 || profileIdc == 6 || profileIdc == 8 ); 
-      m_profileIdc = profileIdc;   
-    };
-  }
+
+  Void                    setProfileIdc();
   Bool                    decProcAnnexI()           { assert( m_profileIdc != -1 ); return ( m_profileIdc == 8); }    
 #endif
-
 #endif
 protected:
