Index: trunk/source/Lib/TLibDecoder/AnnexBread.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/AnnexBread.cpp	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/AnnexBread.cpp	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/AnnexBread.h
===================================================================
--- trunk/source/Lib/TLibDecoder/AnnexBread.h	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/AnnexBread.h	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/NALread.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/NALread.cpp	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/NALread.cpp	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/NALread.h
===================================================================
--- trunk/source/Lib/TLibDecoder/NALread.h	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/NALread.h	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/SEIread.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/SEIread.cpp	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/SEIread.cpp	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/SEIread.h
===================================================================
--- trunk/source/Lib/TLibDecoder/SEIread.h	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/SEIread.h	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/SyntaxElementParser.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/SyntaxElementParser.cpp	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/SyntaxElementParser.cpp	(revision 1179)
@@ -4,5 +4,5 @@
 * granted under this license.  
 *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
 * All rights reserved.
 *
@@ -54,6 +54,12 @@
     return; 
   }
-#endif
-  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
+  if ( !g_disableNumbering )
+  {
+#endif
+  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
+#if H_MV_ENC_DEC_TRAC
+  }
+#endif
+
   if (length < 10)
   {
@@ -75,6 +81,11 @@
     return; 
   }
-#endif
-  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
+  if ( !g_disableNumbering )
+  {
+#endif
+  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
+#if H_MV_ENC_DEC_TRAC
+  }
+#endif
   fprintf( g_hTrace, "%-50s ue(v) : %u\n", pSymbolName, rValue ); 
   fflush ( g_hTrace );
@@ -89,6 +100,12 @@
     return; 
   }
-#endif
-  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
+  if ( !g_disableNumbering )
+  {
+#endif
+  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
+#if H_MV_ENC_DEC_TRAC
+  }
+#endif
+
   fprintf( g_hTrace, "%-50s se(v) : %d\n", pSymbolName, rValue ); 
   fflush ( g_hTrace );
@@ -103,6 +120,11 @@
     return; 
   }
-#endif
-  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
+  if ( !g_disableNumbering )
+  {
+#endif
+  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
+#if H_MV_ENC_DEC_TRAC
+  }
+#endif
   fprintf( g_hTrace, "%-50s u(1)  : %d\n", pSymbolName, rValue ); 
   fflush ( g_hTrace );
Index: trunk/source/Lib/TLibDecoder/SyntaxElementParser.h
===================================================================
--- trunk/source/Lib/TLibDecoder/SyntaxElementParser.h	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/SyntaxElementParser.h	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecBinCoder.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecBinCoder.h	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/TDecBinCoder.h	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.h	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.h	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1179)
@@ -4,5 +4,5 @@
 * granted under this license.  
 *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
 * All rights reserved.
 *
@@ -39,5 +39,7 @@
 #include "SEIread.h"
 #include "TDecSlice.h"
-
+#if H_3D_ANNEX_SELECTION_FIX
+#include "TDecTop.h"
+#endif
 //! \ingroup TLibDecoder
 //! \{
@@ -91,4 +93,5 @@
 TDecCavlc::TDecCavlc()
 {
+#if !HHI_CAM_PARA_K0052
 #if H_3D
   m_aaiTempScale            = new Int* [ MAX_NUM_LAYERS ];
@@ -100,8 +103,10 @@
   }
 #endif
+#endif
 }
 
 TDecCavlc::~TDecCavlc()
 {
+#if !HHI_CAM_PARA_K0052
 #if H_3D
   for( UInt uiVId = 0; uiVId < MAX_NUM_LAYERS; uiVId++ )
@@ -112,4 +117,5 @@
   delete [] m_aaiTempScale;
   delete [] m_aaiTempOffset;
+#endif
 #endif
 }
@@ -777,5 +783,7 @@
     assert(uiCode <= 3);
     // in the first version we only support chroma_format_idc equal to 1 (4:2:0), so separate_colour_plane_flag cannot appear in the bitstream
+#if !H_3D_DISABLE_CHROMA
     assert (uiCode == 1);
+#endif
     if( uiCode == 3 )
     {
@@ -1040,5 +1048,9 @@
       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
     }
   }
@@ -1051,5 +1063,12 @@
   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;; 
@@ -1317,4 +1336,9 @@
   }
 
+#if HHI_INTER_COMP_PRED_K0052
+#if H_3D
+  pcVPS->initViewCompLayer( ); 
+#endif
+#endif
 
   for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )
@@ -1466,5 +1490,5 @@
     for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <=  pcVPS->getMaxLayersMinus1(); i++ )
     {
-        READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
+      READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
     }
   }
@@ -1905,6 +1929,36 @@
 Void TDecCavlc::parseVPS3dExtension( TComVPS* pcVPS )
 {
+#if HHI_CAM_PARA_K0052
+  UInt uiCode;   
+  READ_UVLC( uiCode, "cp_precision"); pcVPS->setCpPrecision( uiCode ) ;
+  
+  for (Int n = 1; n < pcVPS->getNumViews(); n++)
+  {
+    Int i      = pcVPS->getViewOIdxList( n );
+    Int iInVps = pcVPS->getVoiInVps( i ); 
+    READ_CODE( 6, uiCode, "num_cp" ); pcVPS->setNumCp( iInVps, uiCode );
+
+    if( pcVPS->getNumCp( iInVps ) > 0 )
+    {
+      READ_FLAG( uiCode, "cp_in_slice_segment_header_flag" ); pcVPS->setCpInSliceSegmentHeaderFlag( iInVps, uiCode == 1 );
+      for( Int m = 0; m < pcVPS->getNumCp( iInVps ); m++ )
+      {
+        READ_UVLC( uiCode, "cp_ref_voi" ); pcVPS->setCpRefVoi( iInVps, m, uiCode );
+        if( !pcVPS->getCpInSliceSegmentHeaderFlag( iInVps ) )
+        {
+          Int j      = pcVPS->getCpRefVoi( iInVps, m );
+          Int jInVps = pcVPS->getVoiInVps( j ); 
+          Int iCode;
+          READ_SVLC( iCode, "vps_cp_scale" );                pcVPS->setVpsCpScale   ( iInVps, jInVps, iCode );
+          READ_SVLC( iCode, "vps_cp_off" );                  pcVPS->setVpsCpOff     ( iInVps, jInVps, iCode );
+          READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); pcVPS->setVpsCpInvScale( iInVps, jInVps, iCode - pcVPS->getVpsCpScale( iInVps, jInVps ) );
+          READ_SVLC( iCode, "vps_cp_inv_off_plus_off" );     pcVPS->setVpsCpInvOff  ( iInVps, jInVps, iCode - pcVPS->getVpsCpOff  ( iInVps, jInVps ) );
+        }
+      }
+    }    
+  }
+  pcVPS->deriveCpPresentFlag(); 
+#else
   UInt uiCode; 
-
 
   UInt uiCamParPrecision = 0; 
@@ -1955,4 +2009,5 @@
     }
   }
+#endif
 }
 #endif
@@ -2015,6 +2070,8 @@
 #endif
   rpcSlice->setSPS(sps);
+#if !HHI_INTER_COMP_PRED_K0052
 #if H_3D
   rpcSlice->init3dToolParameters();
+#endif
 #endif
   rpcSlice->setPPS(pps);
@@ -2108,5 +2165,11 @@
     }
     // in the first version chroma_format_idc is equal to one, thus colour_plane_id will not be present
+
+#if H_3D_DISABLE_CHROMA
+    assert (sps->getChromaFormatIdc() == 1 || rpcSlice->getIsDepth() );
+    assert (sps->getChromaFormatIdc() == 0 || !rpcSlice->getIsDepth() );
+#else
     assert (sps->getChromaFormatIdc() == 1 );
+#endif
     // if( separate_colour_plane_flag  ==  1 )
     //   colour_plane_id                                      u(2)
@@ -2405,9 +2468,34 @@
       }
     }
+#if HHI_INTER_COMP_PRED_K0052
+#if H_3D
+    if ( getDecTop()->decProcAnnexI() )
+    {    
+      rpcSlice->deriveInCmpPredAndCpAvailFlag();
+      if ( rpcSlice->getInCmpPredAvailFlag() )
+      {
+        READ_FLAG(uiCode, "in_comp_pred_flag");  rpcSlice->setInCompPredFlag((Bool)uiCode);      
+      }
+      rpcSlice->init3dToolParameters(); 
+    }
+#endif
+#endif
 #endif
     if(sps->getUseSAO())
     {
       READ_FLAG(uiCode, "slice_sao_luma_flag");  rpcSlice->setSaoEnabledFlag((Bool)uiCode);
+#if H_3D_DISABLE_CHROMA
+      if( rpcSlice->getSPS()->getChromaFormatIdc() != 0 )
+      {
       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);
+#endif
     }
 
@@ -2574,5 +2662,12 @@
     }
 #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;
@@ -2671,4 +2766,23 @@
     rpcSlice->setLFCrossSliceBoundaryFlag( (uiCode==1)?true:false);
 
+#if HHI_CAM_PARA_K0052
+#if H_3D
+    if ( getDecTop()->decProcAnnexI() )
+    {
+      Int voiInVps = vps->getVoiInVps( rpcSlice->getViewIndex() ); 
+      if( vps->getCpInSliceSegmentHeaderFlag( voiInVps ) && !rpcSlice->getIsDepth() )
+      {
+        for( Int m = 0; m < vps->getNumCp( voiInVps ); m++ )
+        {
+          Int jInVps = vps->getVoiInVps( vps->getCpRefVoi( voiInVps, m ));
+          READ_SVLC( iCode, "cp_scale" );                rpcSlice->setCpScale   ( jInVps, iCode );
+          READ_SVLC( iCode, "cp_off" );                  rpcSlice->setCpOff     ( jInVps, iCode );
+          READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); rpcSlice->setCpInvScale( jInVps, iCode - rpcSlice->getCpScale   ( jInVps ));
+          READ_SVLC( iCode, "cp_inv_off_plus_off" );     rpcSlice->setCpInvOff  ( jInVps, iCode - rpcSlice->getCpOff     ( jInVps ));
+        }
+      }
+    }
+#endif
+#endif
   }
   
@@ -2694,4 +2808,5 @@
   }
 
+#if !HHI_CAM_PARA_K0052
 #if H_3D
 #if H_3D_FCO
@@ -2711,4 +2826,5 @@
     rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset );
   }
+#endif
 #endif
 
@@ -2984,4 +3100,11 @@
   assert(0);
 }
+
+#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+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*/ )
@@ -2990,4 +3113,6 @@
 }
 #endif
+#endif
+
 Void TDecCavlc::parseCUTransquantBypassFlag( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
 {
@@ -3145,10 +3270,14 @@
 {
   wpScalingParam  *wp;
+#if H_3D_DISABLE_CHROMA
+  Bool            bChroma     = ( pcSlice->getSPS()->getChromaFormatIdc() != 0 ); 
+#else
   Bool            bChroma     = true; // color always present in HEVC ?
+#endif
   SliceType       eSliceType  = pcSlice->getSliceType();
   Int             iNbRef       = (eSliceType == B_SLICE ) ? (2) : (1);
   UInt            uiLog2WeightDenomLuma, uiLog2WeightDenomChroma;
   UInt            uiTotalSignalledWeightFlags = 0;
-  
+
   Int iDeltaDenom;
   // decode delta_luma_log2_weight_denom :
@@ -3162,4 +3291,10 @@
     uiLog2WeightDenomChroma = (UInt)(iDeltaDenom + uiLog2WeightDenomLuma);
   }
+  else
+  { 
+    // For some reasons this is also needed to fix a compiler warning when H_3D_DISABLE_CHROMA is equal to 0.
+    uiLog2WeightDenomChroma = 0; 
+  }
+
 
   for ( Int iNumRef=0 ; iNumRef<iNbRef ; iNumRef++ ) 
Index: trunk/source/Lib/TLibDecoder/TDecCAVLC.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -52,4 +52,7 @@
 // Class definition
 // ====================================================================================================================
+#if H_3D_ANNEX_SELECTION_FIX
+class TDecTop;
+#endif
 
 /// CAVLC decoder class
@@ -63,8 +66,15 @@
   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
+
 
 public:
@@ -108,5 +118,7 @@
   Void  parsePPS            ( TComPPS* pcPPS);
 #endif
-
+#if H_3D_ANNEX_SELECTION_FIX
+  Void  setDecTop           ( TDecTop* decTop ) { m_decTop = decTop; }; 
+#endif
   Void  parseVUI            ( TComVUI* pcVUI, TComSPS* pcSPS );
   Void  parseSEI            ( SEIMessages& );
@@ -124,7 +136,11 @@
   
   Void  parseSkipFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
+#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+  Void  parseDIS            ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
+#else
 #if H_3D_SINGLE_DEPTH
   Void  parseSingleDepthMode        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
-#endif  
+#endif
+#endif
   Void  parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void parseMergeFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
@@ -166,4 +182,9 @@
   Void  parseScalingList               ( TComScalingList* scalingList );
   Void xDecodeScalingList    ( TComScalingList *scalingList, UInt sizeId, UInt listId);
+
+#if H_3D_ANNEX_SELECTION_FIX
+  TDecTop*  getDecTop()      { return m_decTop; };
+#endif
+
 protected:
   Bool  xMoreRbspData();
Index: trunk/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -290,4 +290,15 @@
 #if H_MV_ENC_DEC_TRAC
   DTRACE_CU_S("=========== coding_unit ===========\n")
+#if H_MV_ENC_DEC_TRAC
+#if ENC_DEC_TRACE
+    stopAtPos  ( pcCU->getSlice()->getPOC(), 
+    pcCU->getSlice()->getLayerId(), 
+    uiLPelX,
+    uiTPelY,
+    uiRPelX-uiLPelX+1, 
+    uiBPelY-uiTPelY+1);
+#endif
+#endif
+
 #endif
 
@@ -299,5 +310,7 @@
 #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;
@@ -334,5 +347,9 @@
       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
@@ -342,10 +359,18 @@
       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
@@ -520,4 +545,9 @@
     return;
   }
+#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+  m_pcEntropyDecoder->decodeDIS( pcCU, uiAbsPartIdx, uiDepth );
+  if(!pcCU->getDISFlag(uiAbsPartIdx))
+  {
+#else
 #if H_3D_SINGLE_DEPTH
   m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
@@ -525,10 +555,13 @@
   {
 #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 )
   {
@@ -537,4 +570,9 @@
     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 );
 #if H_3D_IV_MERGE
@@ -550,10 +588,15 @@
   // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
   m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
+
   // Coefficient decoding
   Bool bCodeDQP = getdQPFlag();
   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
 #endif
   xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
@@ -616,15 +659,4 @@
   
   m_ppcCU[uiDepth]->copySubCU( pcCU, uiAbsPartIdx, uiDepth );
-  
-#if H_MV_ENC_DEC_TRAC
-#if ENC_DEC_TRACE
-  stopAtPos  ( m_ppcCU[uiDepth]->getSlice()->getPOC(), 
-    m_ppcCU[uiDepth]->getSlice()->getLayerId(), 
-    m_ppcCU[uiDepth]->getCUPelX(),
-    m_ppcCU[uiDepth]->getCUPelY(),
-    m_ppcCU[uiDepth]->getWidth(0), 
-    m_ppcCU[uiDepth]->getHeight(0) );
-#endif
-#endif
 
   switch( m_ppcCU[uiDepth]->getPredictionMode(0) )
@@ -656,4 +688,17 @@
       break;
     case MODE_INTRA:
+#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+      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) )
@@ -671,4 +716,5 @@
 #endif
 #endif
+#endif
       xReconIntraQT( m_ppcCU[uiDepth], uiDepth );
       break;
@@ -704,4 +750,83 @@
   }
 }
+
+#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+Void TDecCu::xReconDIS( 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 );
+
+  Bool  bAboveAvail = false;
+  Bool  bLeftAvail  = false;
+  pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
+  pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, 
+    m_pcPrediction->getPredicBuf       (),
+    m_pcPrediction->getPredicBufWidth  (),
+    m_pcPrediction->getPredicBufHeight (),
+    bAboveAvail, bLeftAvail
+    );
+
+  if ( pcCU->getDISType(uiAbsPartIdx) == 0 )
+  {
+    m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), VER_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
+  }
+  else if ( pcCU->getDISType(uiAbsPartIdx) == 1 )
+  {
+    m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), HOR_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
+  }
+  else if ( pcCU->getDISType(uiAbsPartIdx) == 2 )
+  {
+    Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
+    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 0 );
+    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
+    {
+      for( UInt uiX = 0; uiX < uiWidth; uiX++ )
+      {
+        piReco[ uiX ] = pSingleDepth;
+      }
+      piReco+= uiStride;
+    }
+  }
+  else if ( pcCU->getDISType(uiAbsPartIdx) == 3 )
+  {
+    Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
+    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 1 );
+    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
+    {
+      for( UInt uiX = 0; uiX < uiWidth; uiX++ )
+      {
+        piReco[ uiX ] = pSingleDepth;
+      }
+      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;
+  }
+}
+#else
 #if H_3D_SINGLE_DEPTH
 Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
@@ -772,4 +897,6 @@
 }
 #endif
+#endif
+
 #if H_3D_INTER_SDC
 Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
@@ -835,5 +962,9 @@
   // 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);
   
Index: trunk/source/Lib/TLibDecoder/TDecCu.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecCu.h	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/TDecCu.h	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -123,6 +123,10 @@
   Void setdQPFlag               ( Bool b )                { m_bDecodeDQP = b;           }
   Void xFillPCMBuffer           (TComDataCU* pCU, UInt depth);
+#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+  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 1133)
+++ trunk/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -52,4 +52,16 @@
   m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth );
 }
+
+#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+Void TDecEntropy::decodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
+{
+  if( !pcCU->getSlice()->getDepthIntraSkipFlag() )
+  {
+    return;
+  }  
+
+  m_pcEntropyDecoderIf->parseDIS( pcCU, uiAbsPartIdx, uiDepth );
+}
+#else
 #if H_3D_SINGLE_DEPTH
 Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
@@ -63,4 +75,6 @@
 }
 #endif
+#endif
+
 Void TDecEntropy::decodeCUTransquantBypassFlag(TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
@@ -147,5 +161,5 @@
 {
   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() )
@@ -154,4 +168,5 @@
   }
 #endif
+#endif
 }
 
@@ -161,6 +176,17 @@
   {
     decodeIntraDirModeLuma  ( pcCU, uiAbsPartIdx, uiDepth );
+#if HHI_MOVE_SYN_K0052
+    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))
+#endif
 #endif
     decodeIntraDirModeChroma( pcCU, uiAbsPartIdx, uiDepth );
@@ -239,4 +265,5 @@
   pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx);
 #endif
+#if HHI_MOVE_SYN_K0052
   for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
   {
@@ -247,15 +274,43 @@
     //DTRACE_PU("x1", uiTPelY)
 #endif
+
+    ////// Parse PUs syntax
     decodeMergeFlag( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
     if ( pcCU->getMergeFlag( uiSubPartIdx ) )
     {
-      decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );
+      decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );      
+    }
+    else
+    {
+      decodeInterDirPU( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
+      for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
+      {        
+        if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 )
+        {
+          decodeRefFrmIdxPU( pcCU,    uiSubPartIdx,              uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
+          decodeMvdPU      ( pcCU,    uiSubPartIdx,              uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
+          decodeMVPIdxPU   ( pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
+        }
+      }
+    }
+  }
+
+  ////// Parse CUs extension syntax
+  decodeDBBPFlag( pcCU, uiAbsPartIdx, uiDepth ); 
+  decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth ); 
+
+#if H_3D_ARP
+  decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
+#endif
+#if H_3D_IC
+  decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
+#endif
+
+  ////// Decode motion vectors
+  for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
+  {
+    if ( pcCU->getMergeFlag( uiSubPartIdx ) )
+    {
       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 )
@@ -390,4 +445,172 @@
     else
     {
+      for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
+      {        
+        if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 )
+        {
+          decodeMvsAMVP   ( pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
+        }
+      }
+    }
+
+    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) )
+    {
+      pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMv( TComMv(0,0), ePartSize, uiSubPartIdx, uiDepth, uiPartIdx);
+      pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllRefIdx( -1, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx);
+      pcCU->setInterDirSubParts( 1, uiSubPartIdx, uiPartIdx, uiDepth);
+    }
+  }
+#else
+  for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
+  {
+#if H_MV_ENC_DEC_TRAC
+    DTRACE_PU_S("=========== prediction_unit ===========\n")
+    // ToDo: 
+    //DTRACE_PU("x0", uiLPelX)
+    //DTRACE_PU("x1", uiTPelY)
+#endif
+    decodeMergeFlag( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
+    if ( pcCU->getMergeFlag( uiSubPartIdx ) )
+    {
+      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;
+        }
+        pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth );
+      }
+      else
+      {
+        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 );
+
+      TComMv cTmpMv( 0, 0 );
+      for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
+      {        
+        if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 )
+        {
+          pcCU->setMVPIdxSubParts( 0, RefPicList( uiRefListIdx ), uiSubPartIdx, uiPartIdx, uiDepth);
+          pcCU->setMVPNumSubParts( 0, RefPicList( uiRefListIdx ), uiSubPartIdx, uiPartIdx, uiDepth);
+          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
+    {
       decodeInterDirPU( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
       for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
@@ -414,4 +637,5 @@
     }
   }
+#endif
 #if H_3D_SPIVMP
   delete[] pcMvFieldSP;
@@ -482,17 +706,8 @@
 }
 
+#if HHI_MOVE_SYN_K0052
 Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
 {
   Int iMVPIdx = -1;
-
-  TComMv cZeroMv( 0, 0 );
-  TComMv cMv     = cZeroMv;
-  Int    iRefIdx = -1;
-
-  TComCUMvField* pcSubCUMvField = pcSubCU->getCUMvField( eRefList );
-  AMVPInfo* pAMVPInfo = pcSubCUMvField->getAMVPInfo();
-
-  iRefIdx = pcSubCUMvField->getRefIdx(uiPartAddr);
-  cMv = cZeroMv;
 
   if ( (pcSubCU->getInterDir(uiPartAddr) & ( 1 << eRefList )) )
@@ -512,4 +727,62 @@
 #endif
   }
+  pcSubCU->setMVPIdxSubParts( iMVPIdx, eRefList, uiPartAddr, uiPartIdx, uiDepth );
+}
+
+Void TDecEntropy::decodeMvsAMVP( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
+{
+  TComMv cZeroMv( 0, 0 );
+  TComMv cMv     = cZeroMv;
+  Int    iRefIdx = -1;
+
+  TComCUMvField* pcSubCUMvField = pcSubCU->getCUMvField( eRefList );
+  AMVPInfo* pAMVPInfo = pcSubCUMvField->getAMVPInfo();
+
+  iRefIdx = pcSubCUMvField->getRefIdx(uiPartAddr);
+  cMv = cZeroMv;
+
+  pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo);
+  pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth);
+  if ( iRefIdx >= 0 )
+  {
+    m_pcPrediction->getMvPredAMVP( pcSubCU, uiPartIdx, uiPartAddr, eRefList, cMv);
+    cMv += pcSubCUMvField->getMvd( uiPartAddr );
+  }
+
+  PartSize ePartSize = pcSubCU->getPartitionSize( uiPartAddr );
+  pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx);
+}
+
+#else
+Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
+{
+  Int iMVPIdx = -1;
+
+  TComMv cZeroMv( 0, 0 );
+  TComMv cMv     = cZeroMv;
+  Int    iRefIdx = -1;
+
+  TComCUMvField* pcSubCUMvField = pcSubCU->getCUMvField( eRefList );
+  AMVPInfo* pAMVPInfo = pcSubCUMvField->getAMVPInfo();
+
+  iRefIdx = pcSubCUMvField->getRefIdx(uiPartAddr);
+  cMv = cZeroMv;
+
+  if ( (pcSubCU->getInterDir(uiPartAddr) & ( 1 << eRefList )) )
+  {
+    m_pcEntropyDecoderIf->parseMVPIdx( iMVPIdx );
+#if H_MV_ENC_DEC_TRAC
+#if ENC_DEC_TRACE
+    if ( eRefList == REF_PIC_LIST_0 )
+    {
+      DTRACE_PU("mvp_l0_flag", iMVPIdx)
+    }
+    else
+    {
+      DTRACE_PU("mvp_l1_flag", iMVPIdx)
+    }
+#endif
+#endif
+  }
   pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo);
   pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth);
@@ -524,7 +797,21 @@
   pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx);
 }
-
+#endif
 Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int quadtreeTULog2MinSizeInCU)
 {
+
+#if H_MV_ENC_DEC_TRAC
+#if ENC_DEC_TRACE
+  UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
+  UInt uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
+  
+  DTRACE_TU_S("=========== transform_tree ===========\n")
+  DTRACE_TU("x0", uiLPelX)
+  DTRACE_TU("x1", uiTPelY)
+  DTRACE_TU("log2TrafoSize", g_uiMaxCUWidth>>uiDepth)
+  DTRACE_TU("trafoDepth"  , uiDepth)
+#endif
+#endif
+
   UInt uiSubdiv;
   const UInt uiLog2TrafoSize = g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()]+2 - uiDepth;
@@ -579,4 +866,7 @@
     if( bFirstCbfOfCU || uiLog2TrafoSize > 2 )
     {
+#if H_3D_DISABLE_CHROMA
+      if (pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 )      
+      {
       if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
       {
@@ -587,4 +877,26 @@
         m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth );
       }
+    }
+    else
+    {
+        if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
+        {
+          pcCU->setCbfSubParts( 0, TEXT_CHROMA_U, uiAbsPartIdx, uiTrDepth - 1 );
+        }
+        if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) )
+        {
+          pcCU->setCbfSubParts( 0, TEXT_CHROMA_V, uiAbsPartIdx, uiTrDepth - 1 );
+        }
+      }
+#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 );
+      }
+#endif
     }
     else
@@ -748,6 +1060,14 @@
     assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );
     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );
+#if H_3D_DISABLE_CHROMA
+    if (pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 )
+    {
+      assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
+      assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
+    }
+#else
     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
+#endif
   }
 
@@ -811,4 +1131,11 @@
 {
   pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth );
+#if HHI_MOVE_SYN_K0052
+  if ( pcCU->isSkipped( uiAbsPartIdx ) )
+  {
+    return; 
+  }
+#endif
+
 
   if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getInterSdcFlag() ) || 
@@ -830,5 +1157,12 @@
 Void TDecEntropy::decodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
-  m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, 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 1133)
+++ trunk/source/Lib/TLibDecoder/TDecEntropy.h	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -85,6 +85,10 @@
 public:
   virtual Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
+#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+  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;
@@ -148,5 +152,7 @@
   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  
   Void    setEntropyDecoder           ( TDecEntropyIf* p );
   Void    setBitstream                ( TComInputBitstream* p ) { m_pcEntropyDecoderIf->setBitstream(p);                    }
@@ -171,6 +177,10 @@
   Void decodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void decodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
+#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+  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.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecGop.cpp	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/TDecGop.cpp	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -92,5 +92,5 @@
   m_pcSliceDecoder        = pcSliceDecoder;
   m_pcLoopFilter          = pcLoopFilter;
-  m_pcSAO  = pcSAO;
+  m_pcSAO  = pcSAO;  
 }
 
Index: trunk/source/Lib/TLibDecoder/TDecGop.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecGop.h	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/TDecGop.h	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -56,4 +56,5 @@
 #include "TDecBinCoderCABAC.h"
 
+
 //! \ingroup TLibDecoder
 //! \{
@@ -62,4 +63,8 @@
 // Class definition
 // ====================================================================================================================
+#if H_3D_ANNEX_SELECTION_FIX
+class TDecTop; 
+#endif
+
 
 /// GOP decoder class
@@ -78,4 +83,7 @@
   TDecSlice*            m_pcSliceDecoder;
   TComLoopFilter*       m_pcLoopFilter;
+#if H_3D_ANNEX_SELECTION_FIX
+  TDecTop*              m_decTop; 
+#endif
   
   TComSampleAdaptiveOffset*     m_pcSAO;
Index: trunk/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -52,7 +52,12 @@
 , 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
+, 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)
@@ -136,7 +141,12 @@
   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
+  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 );
@@ -207,7 +217,12 @@
   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
+  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 );
@@ -486,4 +501,9 @@
     }
 
+
+#if H_3D_DISABLE_CHROMA
+    if( pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 )
+    {    
+#endif
     piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset;
     uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
@@ -517,4 +537,8 @@
       piPCMSample += uiWidth;
     }
+#if H_3D_DISABLE_CHROMA
+    }
+#endif
+
 
     m_pcTDecBinIf->start();
@@ -570,4 +594,50 @@
 #endif
 }
+
+#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+Void TDecSbac::parseDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
+{
+  pcCU->setDISFlagSubParts( false,        uiAbsPartIdx, uiDepth );
+  UInt uiSymbol = 0;
+  m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUDISFlagSCModel.get( 0, 0, 0 ) );
+  if( uiSymbol )
+  {
+    pcCU->setDISFlagSubParts( 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 uiUnaryIdx = 0;
+    UInt uiNumCand  = 4;
+
+    if ( uiNumCand > 1 )
+    {
+      for( ; uiUnaryIdx < uiNumCand - 1; ++uiUnaryIdx )
+      {
+        UInt uiSymbol2 = 0;
+        if ( uiUnaryIdx==0 )
+        {
+          m_pcTDecBinIf->decodeBin( uiSymbol2, m_cCUDISTypeSCModel.get( 0, 0, 0 ) );
+        }
+        else
+        {
+          m_pcTDecBinIf->decodeBinEP( uiSymbol2);
+        }
+        if( uiSymbol2 == 0 )
+        {
+          break;
+        }
+      }
+    }
+    pcCU->setDISTypeSubParts(uiUnaryIdx, uiAbsPartIdx, 0, uiDepth);
+  }
+}
+#else
 #if H_3D_SINGLE_DEPTH
 Void TDecSbac::parseSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
@@ -616,6 +686,7 @@
   }
 }
-
-#endif
+#endif
+#endif
+
 /** parse merge flag
  * \param pcCU
@@ -1304,4 +1375,6 @@
   DTRACE_CABAC_V( uiLog2TransformBlockSize )
   DTRACE_CABAC_T( "\n" )
+#else
+  DTRACE_TU("split_transform_flag", ruiSubdivFlag )
 #endif
 }
@@ -1382,4 +1455,17 @@
   DTRACE_CABAC_V( uiAbsPartIdx )
   DTRACE_CABAC_T( "\n" )
+#else
+  if ( eType == TEXT_CHROMA_U )
+  {
+    DTRACE_TU("cbf_cb", uiSymbol )
+  }
+  else if ( eType == TEXT_CHROMA_V )
+  {
+    DTRACE_TU("cbf_cr", uiSymbol )
+  }
+  else
+  {
+    DTRACE_TU("cbf_luma", uiSymbol )
+  }
 #endif
   
@@ -2105,5 +2191,5 @@
 
   m_pcTDecBinIf->decodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) );
-
+  DTRACE_CU("dc_only_flag", uiSymbol)
   if( uiSymbol )
   {
@@ -2129,5 +2215,5 @@
   
   m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) );
-  
+  DTRACE_CU("dbbp_flag", uiSymbol)
   PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
   AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N );
Index: trunk/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecSbac.h	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/TDecSbac.h	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -125,7 +125,11 @@
   
   Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
+#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+  Void parseDIS          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
+#else
 #if H_3D_SINGLE_DEPTH  
   Void parseSingleDepthMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
-#endif  
+#endif
+#endif
   Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void parseSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
@@ -178,7 +182,12 @@
   ContextModel3DBuffer m_cCUSplitFlagSCModel;
   ContextModel3DBuffer m_cCUSkipFlagSCModel;
+#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
+  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/TDecSlice.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecSlice.cpp	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/TDecSlice.cpp	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecSlice.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecSlice.h	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/TDecSlice.h	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -76,5 +76,9 @@
   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
 }
 
@@ -91,4 +95,44 @@
   m_firstReceivedPoc        = -2; 
 
+#if HHI_CAM_PARA_K0052  
+  for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++)
+  {
+    Int curViewIdxInVps = m_vps->getVoiInVps( m_vps->getViewIndex( m_vps->getLayerIdInNuh( i ) ) ) ; 
+    m_bCamParsVaryOverTime = m_bCamParsVaryOverTime || vps->getCpInSliceSegmentHeaderFlag( curViewIdxInVps );    
+  }
+
+  assert( m_receivedIdc == NULL ); 
+  m_receivedIdc = new Int*[ m_vps->getNumViews() ]; 
+  for (Int i = 0; i < m_vps->getNumViews(); i++)
+  {
+    m_receivedIdc[i] = new Int[ m_vps->getNumViews() ]; 
+  }
+
+  xResetReceivedIdc( true ); 
+
+  for (Int voiInVps = 0; voiInVps < m_vps->getNumViews(); voiInVps++ )
+  {
+    if( !m_vps->getCpInSliceSegmentHeaderFlag( voiInVps ) ) 
+    {
+      for (Int baseVoiInVps = 0; baseVoiInVps < m_vps->getNumViews(); baseVoiInVps++ )
+      { 
+        if( m_vps->getCpPresentFlag( voiInVps, baseVoiInVps ) )
+        {
+          m_receivedIdc   [ baseVoiInVps ][ voiInVps ] = -1; 
+          m_aaiCodedScale [ baseVoiInVps ][ voiInVps ] = m_vps->getCodedScale    (voiInVps) [ baseVoiInVps ];
+          m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ] = m_vps->getCodedOffset   (voiInVps) [ baseVoiInVps ];
+
+          m_receivedIdc   [ voiInVps ][ baseVoiInVps ] = -1; 
+          m_aaiCodedScale [ voiInVps ][ baseVoiInVps ] = m_vps->getInvCodedScale (voiInVps) [ baseVoiInVps ];
+          m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ] = m_vps->getInvCodedOffset(voiInVps) [ baseVoiInVps ];
+          xInitLUTs( baseVoiInVps, voiInVps, m_aaiCodedScale[ baseVoiInVps ][ voiInVps ], m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
+          xInitLUTs( voiInVps, baseVoiInVps, m_aaiCodedScale[ voiInVps ][ baseVoiInVps ], m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
+        }
+      }
+    }
+  }
+}
+
+#else
   m_uiMaxViewIndex            = -1; 
   for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++)
@@ -98,5 +142,4 @@
     m_uiMaxViewIndex = std::max( m_uiMaxViewIndex, curViewIdx  ) ; 
   }
-
   assert( m_receivedIdc == NULL ); 
   m_receivedIdc = new Int*[ m_uiMaxViewIndex + 1]; 
@@ -131,11 +174,22 @@
 }
 
+#endif
+
+
+
 Void
 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 ) )
       {
@@ -178,5 +232,9 @@
   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;
 
@@ -255,4 +313,40 @@
   }
 
+#if HHI_CAM_PARA_K0052
+  UInt voiInVps          = m_vps->getVoiInVps(pcSlice->getViewIndex());  
+  if( m_vps->getCpInSliceSegmentHeaderFlag( voiInVps ) ) // check consistency of slice parameters here
+  {   
+    for( Int baseVoiInVps = 0; baseVoiInVps < m_vps->getNumViews(); baseVoiInVps++ )
+    {        
+      if ( m_vps->getCpPresentFlag( voiInVps, baseVoiInVps ) )
+      {
+        if ( m_receivedIdc[ voiInVps ][ baseVoiInVps ] != 0 )
+        {      
+          AOF( m_aaiCodedScale [ voiInVps ][ baseVoiInVps ] == pcSlice->getInvCodedScale () [ baseVoiInVps ] );
+          AOF( m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ] == pcSlice->getInvCodedOffset() [ baseVoiInVps ] );
+        }
+        else
+        {          
+          m_receivedIdc   [ voiInVps ][ baseVoiInVps ]  = 1; 
+          m_aaiCodedScale [ voiInVps ][ baseVoiInVps ]  = pcSlice->getInvCodedScale () [ baseVoiInVps ];
+          m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ]  = pcSlice->getInvCodedOffset() [ baseVoiInVps ];
+          xInitLUTs( voiInVps, baseVoiInVps, m_aaiCodedScale[ voiInVps ][ baseVoiInVps ], m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);
+        }
+        if ( m_receivedIdc[ baseVoiInVps ][ voiInVps ] != 0 )
+        {      
+          AOF( m_aaiCodedScale [ baseVoiInVps ][ voiInVps ] == pcSlice->getCodedScale    () [ baseVoiInVps ] );
+          AOF( m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ] == pcSlice->getCodedOffset   () [ baseVoiInVps ] );
+        }
+        else
+        {        
+          m_receivedIdc   [ baseVoiInVps ][ voiInVps ]  = 1; 
+          m_aaiCodedScale [ baseVoiInVps ][ voiInVps ]  = pcSlice->getCodedScale    () [ baseVoiInVps ];
+          m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ]  = pcSlice->getCodedOffset   () [ baseVoiInVps ];
+          xInitLUTs( baseVoiInVps, voiInVps, m_aaiCodedScale[ baseVoiInVps ][ voiInVps ], m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);
+        }
+      }
+    }
+  }  
+#else
   UInt uiViewIndex          = pcSlice->getViewIndex();  
   if( m_vps->getCamParPresent( uiViewIndex ) )
@@ -289,4 +383,7 @@
     }
   }
+#endif
+
+
 }
 
@@ -311,4 +408,33 @@
     if( iPOC == m_firstReceivedPoc )
     {
+#if HHI_CAM_PARA_K0052
+      fprintf( m_pCodedScaleOffsetFile, "#ViewOrderIdx     ViewIdVal\n" );
+      fprintf( m_pCodedScaleOffsetFile, "#------------ -------------\n" );
+      
+      for( UInt voiInVps = 0; voiInVps < m_vps->getNumViews(); voiInVps++ )
+      {
+        fprintf( m_pCodedScaleOffsetFile, "%13d %13d\n", m_vps->getViewOIdxList( voiInVps ), m_vps->getViewIdVal( m_vps->getViewOIdxList( voiInVps ) ) );
+      }
+      fprintf( m_pCodedScaleOffsetFile, "\n\n");
+      fprintf( m_pCodedScaleOffsetFile, "# StartFrame     EndFrame    TargetVOI      BaseVOI   CodedScale  CodedOffset    Precision\n" );
+      fprintf( m_pCodedScaleOffsetFile, "#----------- ------------ ------------ ------------ ------------ ------------ ------------\n" );
+    }
+    if( iPOC == m_firstReceivedPoc || m_bCamParsVaryOverTime  )
+    {
+      Int iS = iPOC;
+      Int iE = ( m_bCamParsVaryOverTime ? iPOC : ~( 1 << 31 ) );
+      for( UInt voiInVps = 0; voiInVps < m_vps->getNumViews(); voiInVps++ )
+      {
+        for( UInt baseVoiInVps = 0; baseVoiInVps < m_vps->getNumViews(); baseVoiInVps++ )
+        {
+          if( voiInVps != baseVoiInVps )
+          {
+            if ( m_receivedIdc[baseVoiInVps][voiInVps] != 0 )
+            {            
+              fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n",
+                iS, iE, m_vps->getViewOIdxList( voiInVps ), m_vps->getViewOIdxList( baseVoiInVps ), 
+                m_aaiCodedScale [ baseVoiInVps ][ voiInVps ], 
+                m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_vps->getCpPrecision() );
+#else
       fprintf( m_pCodedScaleOffsetFile, "#  ViewIndex       ViewId\n" );
       fprintf( m_pCodedScaleOffsetFile, "#----------- ------------\n" );
@@ -325,7 +451,13 @@
       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 )
@@ -333,6 +465,12 @@
             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
             }            
           }
@@ -417,4 +555,7 @@
 #if !H_MV
   initROM();
+#endif
+#if H_3D_ANNEX_SELECTION_FIX
+  m_cCavlcDecoder.setDecTop( this ); 
 #endif
   m_cGopDecoder.init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cSAO );
@@ -727,5 +868,7 @@
 #endif
 #if H_3D
+#if !HHI_INTER_COMP_PRED_K0052
   m_apcSlicePilot->init3dToolParameters();
+#endif
 #endif
   pps->setSPS(sps);
@@ -955,4 +1098,19 @@
   xActivateParameterSets();
 
+#if SONY_MV_V_CONST_C0078
+  //Check Multiview Main profile constraint in G.11.1.1
+  //  When ViewOrderIdx[ i ] derived according to any active VPS is equal to 1 
+  //  for the layer with nuh_layer_id equal to i in subBitstream, 
+  //  inter_view_mv_vert_constraint_flag shall be equal to 1 
+  //  in the sps_multilayer_extension( ) syntax structure in each active SPS for that layer.
+  if( m_apcSlicePilot->getSPS()->getPTL()->getGeneralPTL()->getProfileIdc()==Profile::MULTIVIEWMAIN
+      &&
+      m_apcSlicePilot->getVPS()->getViewOrderIdx(m_apcSlicePilot->getVPS()->getLayerIdInNuh(getLayerId()))==1 
+     )
+  {
+    assert( m_apcSlicePilot->getSPS()->getInterViewMvVertConstraintFlag()==1 );
+  }
+#endif
+
   if (m_apcSlicePilot->isNextSlice()) 
   {
@@ -1074,4 +1232,8 @@
 #endif
 #endif
+#if HHI_RES_PRED_K0052
+  pcSlice->setIvPicLists( m_ivPicLists );         
+#endif
+
   if (bNextSlice)
   {
@@ -1109,5 +1271,10 @@
 
 #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
 #if H_3D_FCO
@@ -1117,4 +1284,13 @@
 #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
Index: trunk/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecTop.h	(revision 1133)
+++ trunk/source/Lib/TLibDecoder/TDecTop.h	(revision 1179)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2014, ITU/ISO/IEC
+* Copyright (c) 2010-2015, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -97,5 +97,7 @@
   TComVPS* m_vps; 
   Int**    m_receivedIdc; 
+#if!HHI_CAM_PARA_K0052
   Int      m_uiMaxViewIndex; 
+#endif
   Int      m_lastPoc; 
   Int      m_firstReceivedPoc; 
@@ -243,4 +245,7 @@
   CamParsCollector*       m_pcCamParsCollector;
 #endif
+#if H_3D_ANNEX_SELECTION_FIX
+  Int                     m_profileIdc;
+#endif
 #endif
 
@@ -301,4 +306,30 @@
   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;   
+    };
+  }
+  Bool                    decProcAnnexI()           { assert( m_profileIdc != -1 ); return ( m_profileIdc == 8); }    
+#endif
+
 #endif
 protected:
