Index: /branches/HTM-4.1-dev2-Orange/CommonTestConditionsCfgs/baseCfg_2view+depth.cfg
===================================================================
--- /branches/HTM-4.1-dev2-Orange/CommonTestConditionsCfgs/baseCfg_2view+depth.cfg	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/CommonTestConditionsCfgs/baseCfg_2view+depth.cfg	(revision 181)
@@ -201,4 +201,5 @@
 MVI                       : 1                                      # motion parameter inheritance
 VSO                       : 1                                      # use of view synthesis optimization for depth coding
+QTLPC                     : 1                                      # use of quadtree limitation + predictive coding of the quadtree for depth coding
 
 
Index: /branches/HTM-4.1-dev2-Orange/CommonTestConditionsCfgs/baseCfg_3view+depth.cfg
===================================================================
--- /branches/HTM-4.1-dev2-Orange/CommonTestConditionsCfgs/baseCfg_3view+depth.cfg	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/CommonTestConditionsCfgs/baseCfg_3view+depth.cfg	(revision 181)
@@ -205,4 +205,5 @@
 MVI                       : 1                                      # motion parameter inheritance
 VSO                       : 1                                      # use of view synthesis optimization for depth coding
+QTLPC                     : 1                                      # use of quadtree limitation + predictive coding of the quadtree for depth coding
 
 
Index: /branches/HTM-4.1-dev2-Orange/cfg/encoder_mvd.cfg
===================================================================
--- /branches/HTM-4.1-dev2-Orange/cfg/encoder_mvd.cfg	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/cfg/encoder_mvd.cfg	(revision 181)
@@ -204,4 +204,5 @@
 MVI                       : 1                                      # motion parameter inheritance
 VSO                       : 1                                      # use of view synthesis optimization for depth coding
+QTLPC                     : 1                                      # use of quadtree limitation + predictive coding of the quadtree for depth coding
 
 
Index: /branches/HTM-4.1-dev2-Orange/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 181)
@@ -370,6 +370,6 @@
 #endif
 
-#if OL_DEPTHLIMIT_A0044
-  ("DPL",                             m_bDepthPartitionLimiting , false         , "Use DepthPartitionLimiting" )
+#if OL_QTLIMIT_PREDCODING_B0068
+  ("QTLPC",                           m_bUseQTLPC               , true         , "Use depth Quadtree Limitation + Predictive Coding" )
 #endif
 
@@ -1740,7 +1740,6 @@
   printf("WVSO:%d ", m_bUseWVSO );
 #endif
-
-#if OL_DEPTHLIMIT_A0044
-  printf("DPL:%d ", m_bDepthPartitionLimiting);
+#if OL_QTLIMIT_PREDCODING_B0068
+  printf("QTLPC:%d ", m_bUseQTLPC);
 #endif
 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
Index: /branches/HTM-4.1-dev2-Orange/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/App/TAppEncoder/TAppEncCfg.h	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/App/TAppEncoder/TAppEncCfg.h	(revision 181)
@@ -315,6 +315,6 @@
 #endif
 
-#if OL_DEPTHLIMIT_A0044
-  Bool      m_bDepthPartitionLimiting;
+#if OL_QTLIMIT_PREDCODING_B0068
+  Bool      m_bUseQTLPC;                                      ///< flag for using depth QuadTree Limitation + Predictive Coding
 #endif
 
Index: /branches/HTM-4.1-dev2-Orange/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/App/TAppEncoder/TAppEncTop.cpp	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/App/TAppEncoder/TAppEncTop.cpp	(revision 181)
@@ -367,6 +367,6 @@
     m_acTEncTopList[iViewIdx]->setUseDMM                     ( false );
 #endif
-#if OL_DEPTHLIMIT_A0044
-    m_acTEncTopList[iViewIdx]->setUseDPL                     ( false );
+#if OL_QTLIMIT_PREDCODING_B0068
+    m_acTEncTopList[iViewIdx]->setUseQTLPC                   ( false );
 #endif
 #if HHI_MPI
@@ -653,6 +653,6 @@
     m_acTEncDepthTopList[iViewIdx]->setUseDMM                     ( m_bUseDMM );
 #endif
-#if OL_DEPTHLIMIT_A0044
-    m_acTEncDepthTopList[iViewIdx]->setUseDPL                      (m_bDepthPartitionLimiting);
+#if OL_QTLIMIT_PREDCODING_B0068
+    m_acTEncDepthTopList[iViewIdx]->setUseQTLPC                   (m_bUseQTLPC);
 #endif
 #if HHI_MPI
Index: /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComDataCU.cpp	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComDataCU.cpp	(revision 181)
@@ -163,16 +163,4 @@
   m_apSegmentDCOffset[1] = NULL;
 #endif
-#if OL_DEPTHLIMIT_A0044
-  //add a variable to store the partition information
-  //a 2D array in part_symbol, uidepth format
-  //initialize m_partInfo to OL_END_CU
-  for (Int i=0; i < OL_PART_BUF_SIZE; i++)
-  {
-    for (Int j=0; j < 2; j++)
-    {
-      m_uiPartInfo[i][j] = OL_END_CU;
-    }
-  }
-#endif
 }
 
@@ -507,8 +495,4 @@
 Void TComDataCU::initCU( TComPic* pcPic, UInt iCUAddr )
 {
-#if OL_DEPTHLIMIT_A0044
-  TComDataCU* pcCU     = pcPic->getCU(iCUAddr);
-#endif
-
   m_pcPic              = pcPic;
   m_pcSlice            = pcPic->getSlice(pcPic->getCurrSliceIdx());
@@ -740,7 +724,4 @@
     m_apcCUColocated[1] = getSlice()->getRefPic( REF_PIC_LIST_1, 0)->getCU( m_uiCUAddr );
   }
-#if OL_DEPTHLIMIT_A0044
-  setPartDumpFlag (pcCU->getPartDumpFlag());
-#endif
 }
 
@@ -1096,7 +1077,4 @@
   memcpy(m_uiSliceStartCU,pcCU->m_uiSliceStartCU+uiPartOffset,sizeof(UInt)*m_uiNumPartition);
   memcpy(m_uiEntropySliceStartCU,pcCU->m_uiEntropySliceStartCU+uiPartOffset,sizeof(UInt)*m_uiNumPartition);
-#if OL_DEPTHLIMIT_A0044
-  setPartDumpFlag (pcCU->getPartDumpFlag());
-#endif
 }
 
Index: /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComDataCU.h	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComDataCU.h	(revision 181)
@@ -244,12 +244,4 @@
   UInt*         m_uiSliceStartCU;    ///< Start CU address of current slice
   UInt*         m_uiEntropySliceStartCU; ///< Start CU address of current slice
-
-#if OL_DEPTHLIMIT_A0044 
-  //add a variable to store the partition information
-  //a 2D array in uidepth, part_symbol format
-  UInt          m_uiPartInfo[OL_PART_BUF_SIZE][2];
-  UInt          m_uiPartNum;
-  Bool          m_dumpPartInfo;
-#endif 
   
   // -------------------------------------------------------------------------------------------------------------------
@@ -624,13 +616,4 @@
   
   Void          compressMV            ();
-
-#if OL_DEPTHLIMIT_A0044
-  Void        resetPartInfo     () {m_uiPartNum = 0;};
-  Void        incrementPartInfo () {m_uiPartNum ++;};
-  Void        updatePartInfo(UInt uiSymbol, UInt uiDepth) { m_uiPartInfo[m_uiPartNum][0] = uiSymbol; m_uiPartInfo[m_uiPartNum][1] = uiDepth;};
-  UInt*       readPartInfo()                              { return (UInt*)m_uiPartInfo;};
-  Void        setPartDumpFlag(Bool flag)                  { m_dumpPartInfo = flag; };
-  Bool        getPartDumpFlag()                           { return m_dumpPartInfo; };
-#endif
   
   // -------------------------------------------------------------------------------------------------------------------
Index: /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComPic.cpp
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComPic.cpp	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComPic.cpp	(revision 181)
@@ -81,4 +81,7 @@
   m_aaiCodedScale     = 0;
   m_aaiCodedOffset    = 0;
+#if OL_QTLIMIT_PREDCODING_B0068
+  m_bReduceBitsQTL    = 0;
+#endif
 }
 
Index: /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComPic.h
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComPic.h	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComPic.h	(revision 181)
@@ -113,7 +113,6 @@
   Int**                 m_aaiCodedOffset;
 
-#if OL_DEPTHLIMIT_A0044
-  UInt*                 m_texPartInfo;
-  UInt                  m_uiTexPartIndex;
+#if OL_QTLIMIT_PREDCODING_B0068
+  Bool                  m_bReduceBitsQTL;
 #endif
 
@@ -179,4 +178,10 @@
   Int           getViewOrderIdx()                             { return m_iViewOrderIdx; }
 #endif
+
+#if OL_QTLIMIT_PREDCODING_B0068
+  Bool          getReduceBitsFlag ()             { return m_bReduceBitsQTL;     }
+  Void          setReduceBitsFlag ( Bool bFlag ) { m_bReduceBitsQTL = bFlag;    }
+#endif
+
   Void          setScaleOffset( Int** pS, Int** pO )  { m_aaiCodedScale = pS; m_aaiCodedOffset = pO; }
   Int**         getCodedScale ()                      { return m_aaiCodedScale;  }
@@ -249,12 +254,4 @@
 #endif
 
-#if OL_DEPTHLIMIT_A0044
-  UInt        accessPartInfo        ( UInt count )   { return m_texPartInfo[m_uiTexPartIndex + count]; };
-  Void        incrementTexPartIndex (            )   { m_uiTexPartIndex += 2;    };
-  UInt        getTexPartIndex       ()               { return m_uiTexPartIndex;  };
-  Void        setTexPartIndex       ( UInt idx   )   { m_uiTexPartIndex = idx; };
-  Void        setPartInfo           ( UInt* texPart) { m_texPartInfo    = texPart;  };
-#endif
-
   Bool          getValidSlice                                  (Int sliceID)  {return m_pbValidSlice[sliceID];}
   Int           getSliceGranularityForNDBFilter                ()             {return m_sliceGranularityForNDBFilter;}
Index: /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComSlice.cpp	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComSlice.cpp	(revision 181)
@@ -1523,6 +1523,6 @@
 , m_bUseDMM                   (false)
 #endif
-#if OL_DEPTHLIMIT_A0044
-, m_bDepthPartitionLimiting   (false)
+#if OL_QTLIMIT_PREDCODING_B0068
+, m_bUseQTLPC                 (false)
 #endif
 {
Index: /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComSlice.h	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TComSlice.h	(revision 181)
@@ -363,6 +363,6 @@
 #endif
 
-#if OL_DEPTHLIMIT_A0044
-  Bool m_bDepthPartitionLimiting;
+#if OL_QTLIMIT_PREDCODING_B0068
+  Bool m_bUseQTLPC;
 #endif
 
@@ -643,7 +643,7 @@
 #endif
 
-#if OL_DEPTHLIMIT_A0044
-  Void setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; }
-  Bool getUseDPL()       {return m_bDepthPartitionLimiting;}
+#if OL_QTLIMIT_PREDCODING_B0068
+  Void setUseQTLPC( Bool b ) { m_bUseQTLPC = b;    }
+  Bool getUseQTLPC()         { return m_bUseQTLPC; }
 #endif
 
Index: /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TypeDef.h	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/Lib/TLibCommon/TypeDef.h	(revision 181)
@@ -42,4 +42,6 @@
 //! \{
 
+#define OL_QTLIMIT_PREDCODING_B0068       1    //JCT3V-B0068
+
 #define MTK_UNCONSTRAINED_MVI             1    //JCT3V-B0083
 
@@ -108,12 +110,4 @@
 #define LGE_ILLUCOMP_B0045_ENCSIMP        1
 #endif
-#define LGE_CLEAN_UP                      1
-
-#define OL_DEPTHLIMIT_A0044               1 //JCT2-A0044
-#if OL_DEPTHLIMIT_A0044
-#define OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1 //Turn this on to not perform depth limiting for I-SLICES.
-#define OL_END_CU                         MAX_INT //Default for initializing the partition information buffer
-#define OL_PART_BUF_SIZE                  86 //maximum number of possible partition bits in a CU
-#endif
 
 #define HHI_INTERVIEW_SKIP                1
@@ -134,5 +128,5 @@
 #endif
 
-#define RWTH_SDC_DLT_B0036                1   // JCT3V-B0036: Simplified Depth Coding + Depth Lookup Table
+#define RWTH_SDC_DLT_B0036                0   // JCT3V-B0036: Simplified Depth Coding + Depth Lookup Table
 #if RWTH_SDC_DLT_B0036
 #define Log2( n ) ( log((double)n) / log(2.0) )
Index: /branches/HTM-4.1-dev2-Orange/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 181)
@@ -1674,4 +1674,11 @@
     }
 #endif
+#if OL_QTLIMIT_PREDCODING_B0068
+    if( bIsDepth )
+    {
+      READ_FLAG( uiCode, "use_qtlpc_flag" );
+      pcSPS->setUseQTLPC( uiCode );
+    }
+#endif
     
 #if RWTH_SDC_DLT_B0036
Index: /branches/HTM-4.1-dev2-Orange/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 181)
@@ -753,7 +753,32 @@
   
   UInt uiSymbol;
-  m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSplitFlagSCModel.get( 0, 0, pcCU->getCtxSplitFlag( uiAbsPartIdx, uiDepth ) ) );
-  DTRACE_CABAC_VL( g_nSymbolCounter++ )
-  DTRACE_CABAC_T( "\tSplitFlag\n" )
+
+#if OL_QTLIMIT_PREDCODING_B0068
+  Bool bParseSplitFlag    = true;
+
+  TComSPS *sps            = pcCU->getPic()->getSlice(0)->getSPS();
+  TComPic *pcTexture      = pcCU->getSlice()->getTexturePic();
+  Bool bDepthMapDetect    = (pcTexture != NULL);
+  Bool bIntraSliceDetect  = (pcCU->getSlice()->getSliceType() == I_SLICE);
+
+  if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())
+  {
+    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
+    assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth);
+    bParseSplitFlag         = (pcTextureCU->getDepth(uiAbsPartIdx) > uiDepth);
+  }
+
+  if(bParseSplitFlag)
+  {
+#endif
+    m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSplitFlagSCModel.get( 0, 0, pcCU->getCtxSplitFlag( uiAbsPartIdx, uiDepth ) ) );
+    DTRACE_CABAC_VL( g_nSymbolCounter++ )
+    DTRACE_CABAC_T( "\tSplitFlag\n" )
+#if OL_QTLIMIT_PREDCODING_B0068
+  }
+  else
+    uiSymbol = 0;
+#endif
+
   pcCU->setDepthSubParts( uiDepth + uiSymbol, uiAbsPartIdx );
   
@@ -771,13 +796,39 @@
   UInt uiSymbol, uiMode = 0;
   PartSize eMode;
+
+#if OL_QTLIMIT_PREDCODING_B0068
+  Bool bParsePartSize    = true;
+  TComSPS *sps           = pcCU->getPic()->getSlice(0)->getSPS();
+  TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
+  Bool bDepthMapDetect   = (pcTexture != NULL);
+  Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE);
+
+  if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())
+  {
+    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
+    assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth);
+    if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN)
+    {
+      bParsePartSize = false;
+      eMode          = SIZE_2Nx2N;
+    }
+  }
+#endif
   
   if ( pcCU->isIntra( uiAbsPartIdx ) )
   {
-    uiSymbol = 1;
-    if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
-    {
-      m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 0) );
-    }
-    eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN;
+#if OL_QTLIMIT_PREDCODING_B0068
+    if(bParsePartSize)
+    {
+#endif
+      uiSymbol = 1;
+      if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
+      {
+        m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 0) );
+      }
+      eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN;
+#if OL_QTLIMIT_PREDCODING_B0068
+    }
+#endif
     UInt uiTrLevel = 0;    
     UInt uiWidthInBit  = g_aucConvertToBit[pcCU->getWidth(uiAbsPartIdx)]+2;
@@ -795,56 +846,63 @@
   else
   {
-    UInt uiMaxNumBits = 2;
-    if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getSlice()->getSPS()->getDisInter4x4() && (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)
-      {
+#if OL_QTLIMIT_PREDCODING_B0068
+    if(bParsePartSize)
+    {
+#endif
+      UInt uiMaxNumBits = 2;
+      if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getSlice()->getSPS()->getDisInter4x4() && (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)
+        {
+#if AMP_CTX
+            m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 ));
+#else
+          m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 0 ));
+#endif
+          if (uiSymbol == 0)
+          {
+#if AMP_CTX
+            m_pcTDecBinIf->decodeBinEP(uiSymbol);
+#else
+            m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 1 ));
+#endif
+            eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD);
+          }
+        }
+        else if (eMode == SIZE_Nx2N)
+        {
 #if AMP_CTX
           m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 ));
 #else
-        m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 0 ));
-#endif
-        if (uiSymbol == 0)
-        {
+          m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 0 ));
+#endif
+          if (uiSymbol == 0)
+          {
 #if AMP_CTX
-          m_pcTDecBinIf->decodeBinEP(uiSymbol);
-#else
-          m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 1 ));
-#endif
-          eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD);
+            m_pcTDecBinIf->decodeBinEP(uiSymbol);
+#else
+            m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 1 ));
+#endif
+            eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N);
+          }
         }
       }
-      else if (eMode == SIZE_Nx2N)
-      {
-#if AMP_CTX
-        m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 ));
-#else
-        m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 0 ));
-#endif
-        if (uiSymbol == 0)
-        {
-#if AMP_CTX
-          m_pcTDecBinIf->decodeBinEP(uiSymbol);
-#else
-          m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 1 ));
-#endif
-          eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N);
-        }
-      }
-    }
+#if OL_QTLIMIT_PREDCODING_B0068
+    }
+#endif
   }
   pcCU->setPartSizeSubParts( eMode, uiAbsPartIdx, uiDepth );
Index: /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 181)
@@ -644,4 +644,11 @@
   }
 #endif
+
+#if OL_QTLIMIT_PREDCODING_B0068
+  if( bIsDepth )
+  {
+    WRITE_FLAG( pcSPS->getUseQTLPC() ? 1 : 0, "use_qtlpc_flag");
+  }
+#endif
   
 #if RWTH_SDC_DLT_B0036
Index: /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncCfg.h	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncCfg.h	(revision 181)
@@ -328,6 +328,6 @@
 #endif
 
-#if OL_DEPTHLIMIT_A0044
-  Bool     m_bDepthPartitionLimiting;
+#if OL_QTLIMIT_PREDCODING_B0068
+  Bool     m_bUseQTLPC;
 #endif
 
@@ -838,13 +838,13 @@
   Bool      getUseDMM()        { return m_bUseDMM; }
 #endif
+
+#if OL_QTLIMIT_PREDCODING_B0068
+  Void      setUseQTLPC( Bool b ) { m_bUseQTLPC = b;    }
+  Bool      getUseQTLPC()         { return m_bUseQTLPC; }
+#endif
   
 #if RWTH_SDC_DLT_B0036
   Bool      getUseDLT()      { return m_bUseDLT;     }
   Bool      getUseSDC()      { return m_bUseSDC;     }
-#endif
-
-#if OL_DEPTHLIMIT_A0044
-  Void      setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; }
-  Bool      getUseDPL()       {return m_bDepthPartitionLimiting;}
 #endif
 
Index: /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncCu.cpp	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncCu.cpp	(revision 181)
@@ -451,36 +451,15 @@
   TComPic* pcPic = rpcBestCU->getPic();
 
-#if OL_DEPTHLIMIT_A0044
-  TComSPS *sps = pcPic->getSlice(0)->getSPS();
-  TComPic *pcTexture;
-  TComDataCU * pcTextureCU;
-  Bool  depthMapDetect =  false;
-#if !LGE_CLEAN_UP
-  UInt         uiPrevTexPartIndex = 0;
-#endif
-#if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
-  Bool bIntraSliceDetect = false;
-#endif
-  Bool bTry2NxN = false;
-  Bool bTryNx2N = false;
-    pcTexture = rpcBestCU->getSlice()->getTexturePic();
-    if(pcTexture != NULL) //depth map being encoded
-    {
-    depthMapDetect = true;
-#if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
-      bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType()==I_SLICE);
-#endif
-    if(uiDepth == 0)
-    {
-      pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() );
-      pcTexture->setPartInfo(pcTextureCU->readPartInfo());
-      pcTexture->setTexPartIndex(0); 
-    }
-    }
-    else
-    {
-      depthMapDetect = false;
-    }
-#endif
+#if OL_QTLIMIT_PREDCODING_B0068
+  TComSPS *sps         = pcPic->getSlice(0)->getSPS();
+  TComPic *pcTexture   = rpcBestCU->getSlice()->getTexturePic();
+
+  Bool  depthMapDetect    = (pcTexture != NULL);
+  Bool  bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType() == I_SLICE);
+
+  Bool bTry2NxN = true;
+  Bool bTryNx2N = true;
+#endif
+
   // get Original YUV data from picture
   m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() );
@@ -626,90 +605,30 @@
       // variables for fast encoder decision
       bEarlySkip  = false;
-      bTrySplit    = true;
+      bTrySplit   = true;
       fRD_Skip    = MAX_DOUBLE;
 
       rpcTempCU->initEstData( uiDepth, iQP );
 
-#if OL_DEPTHLIMIT_A0044
+#if OL_QTLIMIT_PREDCODING_B0068
       //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU
-#if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
-      if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL())
-#else
-      if(depthMapDetect && sps->getUseDPL()) //depth map being encoded
-#endif
-      {
-        assert(uiDepth == pcTexture->accessPartInfo(1));
-        if(pcTexture->accessPartInfo(0) == 1) //NxN modes
+      if(depthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())
+      {
+        TComDataCU* pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); //Corresponding texture LCU
+        UInt uiCUIdx            = rpcBestCU->getZorderIdxInCU();
+        assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth); //Depth cannot be more partitionned than the texture.
+        if (pcTextureCU->getDepth(uiCUIdx) > uiDepth || pcTextureCU->getPartitionSize(uiCUIdx) == SIZE_NxN) //Texture was split.
         {
           bTrySplit = true;
-          bTryNx2N = true;
-          bTry2NxN = true;
-#if !LGE_CLEAN_UP
-          uiPrevTexPartIndex = pcTexture->getTexPartIndex(); 
-#endif
-          pcTexture->incrementTexPartIndex(); 
+          bTryNx2N  = true;
+          bTry2NxN  = true;
         }
-        else if(pcTexture->accessPartInfo(0) == 0) //2Nx2N modes
-        {
-          UInt uiTexdepth;
-          UInt temp_uiTexPartIndex;
-          bTrySplit = false;
-
-          //scan ahead till next depth
-          uiTexdepth = pcTexture->accessPartInfo(1);
-#if !LGE_CLEAN_UP
-          uiPrevTexPartIndex = pcTexture->getTexPartIndex(); 
-#endif
-          pcTexture->incrementTexPartIndex();
-          temp_uiTexPartIndex = pcTexture->getTexPartIndex(); //store in case to rewind
-
-          while(uiTexdepth != pcTexture->accessPartInfo(1) && uiTexdepth != 0)
-          {
-            if(pcTexture->accessPartInfo(1) < uiTexdepth)
-            {
-              break;
-            }
-            pcTexture->incrementTexPartIndex(); 
-
-            if(pcTexture->accessPartInfo(1) == OL_END_CU)
-            {
-              pcTexture->setTexPartIndex(temp_uiTexPartIndex); 
-              uiTexdepth++;
-              if(uiTexdepth >= g_uiMaxCUDepth)
-              {      
-                break;
-              }
-            }
-          }
-        }
-        else if(pcTexture->accessPartInfo(0) == OL_END_CU)
+        else
         {
           bTrySplit = false;
-          bTryNx2N = false;
-          bTry2NxN = false;
+          bTryNx2N  = false;
+          bTry2NxN  = false;
         }
-        else if(pcTexture->accessPartInfo(0) == 2) //2NxN case
-        {
-          bTrySplit = false;
-          bTryNx2N = false;
-          bTry2NxN = true;
-#if !LGE_CLEAN_UP
-          uiPrevTexPartIndex = pcTexture->getTexPartIndex();  
-#endif
-          pcTexture->incrementTexPartIndex(); ;
-        }
-        else if(pcTexture->accessPartInfo(0) == 3) //Nx2N case
-        {
-          bTrySplit = false;
-          bTryNx2N = true;
-          bTry2NxN = false;
-#if !LGE_CLEAN_UP
-          uiPrevTexPartIndex = pcTexture->getTexPartIndex();  
-#endif
-          pcTexture->incrementTexPartIndex(); ;
-        }
-      }
-#endif
-
+      }
+#endif
 
       // do inter modes, SKIP and 2Nx2N
@@ -799,10 +718,6 @@
 #endif
 
-#if OL_DEPTHLIMIT_A0044
-#if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
-      if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
-#else
-      if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
-#endif
+#if OL_QTLIMIT_PREDCODING_B0068
+      if(depthMapDetect && !bIntraSliceDetect  && sps->getUseQTLPC())
       {
         bTrySplitDQP = bTrySplit;
@@ -810,4 +725,5 @@
       else
       {
+#endif
         if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() )
         {
@@ -821,19 +737,8 @@
           bTrySplitDQP = bTrySplit;
         }
-      }
-#else
-
-      if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() )
-      {
-        if(iQP == iBaseQP)
-        {
-          bTrySplitDQP = bTrySplit;
-        }
-      }
-      else
-      {
-        bTrySplitDQP = bTrySplit;
-      }
-#endif
+#if OL_QTLIMIT_PREDCODING_B0068
+      }
+#endif
+
 #if LOSSLESS_CODING
       if (isAddLowestQP && (iQP == lowestQP))
@@ -891,28 +796,8 @@
               if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu)
               {
-#if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none
-#if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
-                if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
-#else
-                if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
-#endif
+#if OL_QTLIMIT_PREDCODING_B0068 //try InterNxN
+                if(bTrySplit)
                 {
-                  if (bTrySplit)
-                  {
-#endif
-#if HHI_INTER_VIEW_RESIDUAL_PRED
-                    rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
-#endif
-#if HHI_INTERVIEW_SKIP
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN, bFullyRenderedSec   );
-#else
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN   );
-#endif
-                    rpcTempCU->initEstData( uiDepth, iQP );
-#if OL_DEPTHLIMIT_A0044
-                  }//bTrySplit
-                }//depthMapDetect
-                else//do things normally
-                {
+#endif
 #if HHI_INTER_VIEW_RESIDUAL_PRED
                   rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
@@ -924,4 +809,5 @@
 #endif
                   rpcTempCU->initEstData( uiDepth, iQP );
+#if OL_QTLIMIT_PREDCODING_B0068
                 }
 #endif
@@ -931,35 +817,8 @@
 
           { // 2NxN, Nx2N
-#if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none
-#if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
-            if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
-#else
-            if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
-#endif
+#if OL_QTLIMIT_PREDCODING_B0068 //try Nx2N
+            if(bTryNx2N)
             {
-              if (bTryNx2N)
-              {
-#endif
-                if(doNotBlockPu)
-                {
-#if HHI_INTER_VIEW_RESIDUAL_PRED
-                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
-#endif
-#if HHI_INTERVIEW_SKIP
-                  xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFullyRenderedSec   );
-#else
-                  xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N  );
-#endif
-                  rpcTempCU->initEstData( uiDepth, iQP );
-                  if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_Nx2N )
-                  {
-                    doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
-                  }
-                }
-#if OL_DEPTHLIMIT_A0044
-              }//bTryNx2N
-            }//depthMapDetect
-            else//do things normally
-            {
+#endif
               if(doNotBlockPu)
               {
@@ -978,38 +837,12 @@
                 }
               }
+#if OL_QTLIMIT_PREDCODING_B0068
             }
 #endif
 
-#if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none
-#if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
-            if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
-#else
-            if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
-#endif
+#if OL_QTLIMIT_PREDCODING_B0068 //try 2NxN
+            if(bTry2NxN)
             {
-              if (bTry2NxN)
-              {
-#endif
-                if(doNotBlockPu)
-                {
-#if HHI_INTER_VIEW_RESIDUAL_PRED
-                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
-#endif
-#if HHI_INTERVIEW_SKIP
-                  xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxN, bFullyRenderedSec   );
-#else
-                  xCheckRDCostInter      ( rpcBestCU, rpcTempCU, SIZE_2NxN  );
-#endif
-                  rpcTempCU->initEstData( uiDepth, iQP );
-                  if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxN)
-                  {
-                    doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
-                  }
-                }
-#if OL_DEPTHLIMIT_A0044
-              }//bTryNx2N
-            }//depthMapDetect
-            else//do things normally
-            {
+#endif
               if(doNotBlockPu)
               {
@@ -1028,4 +861,5 @@
                 }
               }
+#if OL_QTLIMIT_PREDCODING_B0068
             }
 #endif
@@ -1050,51 +884,8 @@
             if ( bTestAMP_Hor )
             {
-#if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none
-#if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
-              if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
-#else
-              if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
-#endif
+#if OL_QTLIMIT_PREDCODING_B0068 //try 2NxnU & 2NxnD
+              if(bTry2NxN)
               {
-                if (bTry2NxN)
-                {
-#endif
-                  if(doNotBlockPu)
-                  {
-#if HHI_INTER_VIEW_RESIDUAL_PRED
-                    rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
-#endif
-#if HHI_INTERVIEW_SKIP
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec );
-#else
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU );
-#endif
-                    rpcTempCU->initEstData( uiDepth, iQP );
-                    if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU )
-                    {
-                      doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
-                    }
-                  }
-                  if(doNotBlockPu)
-                  {
-#if HHI_INTER_VIEW_RESIDUAL_PRED
-                    rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
-#endif
-#if HHI_INTERVIEW_SKIP
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec );
-#else
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD );
-#endif
-                    rpcTempCU->initEstData( uiDepth, iQP );
-                    if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD )
-                    {
-                      doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
-                    }
-                  }
-#if OL_DEPTHLIMIT_A0044
-                }//bTry2NxN
-              }//depthMapDetect
-              else//do things normally
-              {
+#endif
                 if(doNotBlockPu)
                 {
@@ -1129,4 +920,5 @@
                   }
                 }
+#if OL_QTLIMIT_PREDCODING_B0068
               }
 #endif
@@ -1135,51 +927,8 @@
             else if ( bTestMergeAMP_Hor ) 
             {
-#if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none
-#if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
-              if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
-#else
-              if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
-#endif
+#if OL_QTLIMIT_PREDCODING_B0068 //try 2NxnU & 2NxnD Merge
+              if(bTry2NxN)
               {
-                if (bTry2NxN)
-                {
-#endif
-                  if(doNotBlockPu)
-                  {
-#if HHI_INTER_VIEW_RESIDUAL_PRED
-                    rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
-#endif
-#if HHI_INTERVIEW_SKIP
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec, true );
-#else
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true );
-#endif
-                    rpcTempCU->initEstData( uiDepth, iQP );
-                    if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU )
-                    {
-                      doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
-                    }
-                  }
-                  if(doNotBlockPu)
-                  {
-#if HHI_INTER_VIEW_RESIDUAL_PRED
-                    rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
-#endif
-#if HHI_INTERVIEW_SKIP
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec, true );
-#else
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true );
-#endif
-                    rpcTempCU->initEstData( uiDepth, iQP );
-                    if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD )
-                    {
-                      doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
-                    }
-                  }
-#if OL_DEPTHLIMIT_A0044
-                }//bTry2NxN
-              }//depthMapDetect
-              else//do things normally
-              {
+#endif
                 if(doNotBlockPu)
                 {
@@ -1214,5 +963,5 @@
                   }
                 }
-
+#if OL_QTLIMIT_PREDCODING_B0068
               }
 #endif
@@ -1223,47 +972,8 @@
             if ( bTestAMP_Ver )
             {
-#if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none
-#if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
-              if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
-#else
-              if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
-#endif
+#if OL_QTLIMIT_PREDCODING_B0068 //try nLx2N & nRx2N
+              if(bTryNx2N)
               {
-                if (bTryNx2N)
-                {
-#endif
-                  if(doNotBlockPu)
-                  {
-#if HHI_INTER_VIEW_RESIDUAL_PRED
-                    rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
-#endif
-#if HHI_INTERVIEW_SKIP
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec );
-#else
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N );
-#endif
-                    rpcTempCU->initEstData( uiDepth, iQP );
-                    if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N )
-                    {
-                      doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
-                    }
-                  }
-                  if(doNotBlockPu)
-                  {
-#if HHI_INTER_VIEW_RESIDUAL_PRED
-                    rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
-#endif
-#if HHI_INTERVIEW_SKIP
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec );
-#else
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N );
-#endif
-                    rpcTempCU->initEstData( uiDepth, iQP );
-                  }
-#if OL_DEPTHLIMIT_A0044
-                }//bTryNx2N
-              }//depthMapDetect
-              else//do things normally
-              {
+#endif
                 if(doNotBlockPu)
                 {
@@ -1294,4 +1004,5 @@
                   rpcTempCU->initEstData( uiDepth, iQP );
                 }
+#if OL_QTLIMIT_PREDCODING_B0068
               }
 #endif
@@ -1300,47 +1011,8 @@
             else if ( bTestMergeAMP_Ver )
             {
-#if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none
-#if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
-              if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
-#else
-              if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
-#endif
+#if OL_QTLIMIT_PREDCODING_B0068 //try nLx2N & nRx2N (Merge)
+              if(bTryNx2N)
               {
-                if (bTryNx2N)
-                {
-#endif
-                  if(doNotBlockPu)
-                  {
-#if HHI_INTER_VIEW_RESIDUAL_PRED
-                    rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
-#endif
-#if HHI_INTERVIEW_SKIP
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec, true );
-#else
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true );
-#endif
-                    rpcTempCU->initEstData( uiDepth, iQP );
-                    if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N )
-                    {
-                      doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
-                    }
-                  }
-                  if(doNotBlockPu)
-                  {
-#if HHI_INTER_VIEW_RESIDUAL_PRED
-                    rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
-#endif
-#if HHI_INTERVIEW_SKIP
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec, true );
-#else
-                    xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true );
-#endif
-                    rpcTempCU->initEstData( uiDepth, iQP );
-                  }
-#if OL_DEPTHLIMIT_A0044
-                }//bTryNx2N
-              }//depthMapDetect
-              else//do things normally
-              {
+#endif
                 if(doNotBlockPu)
                 {
@@ -1371,4 +1043,5 @@
                   rpcTempCU->initEstData( uiDepth, iQP );
                 }
+#if OL_QTLIMIT_PREDCODING_B0068
               }
 #endif
@@ -1452,33 +1125,17 @@
           if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
           {
-#if OL_DEPTHLIMIT_A0044 //add code here to select or deselect NxN mode for Intra
-#if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
-            if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
-#else
-            if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
-#endif
+#if OL_QTLIMIT_PREDCODING_B0068 //Try IntraNxN
+            if(bTrySplit)
             {
-              if (bTrySplit)
-              {
-
-#endif
-                if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) )
-                {
-#if LGE_ILLUCOMP_B0045
-                  rpcTempCU->setICFlagSubParts(false, 0, 0, uiDepth);
-#endif
-                  xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN   );
-                  rpcTempCU->initEstData( uiDepth, iQP );
-                }
-#if OL_DEPTHLIMIT_A0044
-              }//bTrySplit
-            }//depthMapDetect
-            else
-            {
+#endif
               if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) )
               {
+#if LGE_ILLUCOMP_B0045
+                rpcTempCU->setICFlagSubParts(false, 0, 0, uiDepth);
+#endif
                 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN   );
                 rpcTempCU->initEstData( uiDepth, iQP );
               }
+#if OL_QTLIMIT_PREDCODING_B0068
             }
 #endif
@@ -2139,11 +1796,4 @@
   if( pcCU->isSkipped( uiAbsPartIdx ) )
   {
-#if OL_DEPTHLIMIT_A0044
-    if(pcCU->getPartDumpFlag())
-    {
-      pcCU->updatePartInfo(0,uiDepth);
-      pcCU->incrementPartInfo();
-    }
-#endif
     m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 );
 #if LGE_ILLUCOMP_B0045
Index: /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 181)
@@ -1137,22 +1137,10 @@
         if (!bEntropySlice)
         {
-#if OL_DEPTHLIMIT_A0044 //start dumping partition information
-          m_pcSliceEncoder->setPartDumpFlag(1);
-#endif
           pcSlice->setTileLocationCount ( 0 );
           m_pcSliceEncoder->encodeSlice(pcPic, pcBitstreamRedirect, pcSubstreamsOut); // redirect is only used for CAVLC tile position info.
-#if OL_DEPTHLIMIT_A0044 //stop dumping partition information
-          m_pcSliceEncoder->setPartDumpFlag(0);
-#endif
         }
         else
         {
-#if OL_DEPTHLIMIT_A0044 //start dumping partition information
-          m_pcSliceEncoder->setPartDumpFlag(1);
-#endif
           m_pcSliceEncoder->encodeSlice(pcPic, &nalu.m_Bitstream, pcSubstreamsOut); // nalu.m_Bitstream is only used for CAVLC tile position info.
-#if OL_DEPTHLIMIT_A0044 //stop dumping partition information
-          m_pcSliceEncoder->setPartDumpFlag(0);
-#endif
         }
 
Index: /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 181)
@@ -618,7 +618,24 @@
 {
   PartSize eSize         = pcCU->getPartitionSize( uiAbsPartIdx );
-#if OL_DEPTHLIMIT_A0044
-  UInt uiSymbol;
-#endif
+
+#if OL_QTLIMIT_PREDCODING_B0068
+  TComSPS *sps           = pcCU->getPic()->getSlice(0)->getSPS();
+  TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
+  Bool bDepthMapDetect   = (pcTexture != NULL);
+  Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE);
+ 
+  if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())
+  {
+    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
+    UInt uiCUIdx            = (pcCU->getZorderIdxInCU() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCU();
+    assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth);
+    if (pcTextureCU->getDepth(uiCUIdx) == uiDepth && pcTextureCU->getPartitionSize( uiCUIdx ) != SIZE_NxN)
+    {
+      assert( eSize == SIZE_2Nx2N );
+      return;
+    }
+  }
+#endif
+
   if ( pcCU->isIntra( uiAbsPartIdx ) )
   {
@@ -626,20 +643,5 @@
     {
       m_pcBinIf->encodeBin( eSize == SIZE_2Nx2N? 1 : 0, m_cCUPartSizeSCModel.get( 0, 0, 0 ) );
-#if OL_DEPTHLIMIT_A0044
-      if(pcCU->getPartDumpFlag())
-      {
-        uiSymbol = (UInt)(eSize == SIZE_2Nx2N? 1 : 0);
-        pcCU->updatePartInfo(uiSymbol?0:1,uiDepth); //0 for 2Nx2N and 1 for NxN
-        pcCU->incrementPartInfo();
-      }
-#endif
-    }
-#if OL_DEPTHLIMIT_A0044
-    if(pcCU->getPartDumpFlag() && uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth && !pcCU->getSlice()->isIntra())
-    {
-      pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N and 1 for NxN
-      pcCU->incrementPartInfo();
-    }
-#endif
+    }
     return;
   }
@@ -650,11 +652,4 @@
     {
       m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 0) );
-#if OL_DEPTHLIMIT_A0044
-      if(pcCU->getPartDumpFlag())
-      {
-        pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N
-        pcCU->incrementPartInfo();
-      }
-#endif
       break;
     }
@@ -686,11 +681,4 @@
         }
       }
-#if OL_DEPTHLIMIT_A0044
-      if(pcCU->getPartDumpFlag())
-      {
-        pcCU->updatePartInfo(2,uiDepth); //2 for 2NxN
-        pcCU->incrementPartInfo();
-      }
-#endif
       break;
     }
@@ -726,11 +714,4 @@
         }
       }
-#if OL_DEPTHLIMIT_A0044
-      if(pcCU->getPartDumpFlag())
-      {
-        pcCU->updatePartInfo(3,uiDepth); //3 for Nx2N
-        pcCU->incrementPartInfo();
-      }
-#endif
       break;
     }
@@ -742,21 +723,4 @@
         m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) );
         m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 2) );
-#if OL_DEPTHLIMIT_A0044
-        if(pcCU->getPartDumpFlag())
-        {
-          pcCU->updatePartInfo(1,uiDepth); //2Nx2N here since we disable NxN in Inter
-          pcCU->incrementPartInfo();         
-        }
-#endif
-      }
-      else
-      {
-#if OL_DEPTHLIMIT_A0044
-        if(pcCU->getPartDumpFlag())
-        {
-          pcCU->updatePartInfo(0,uiDepth); //2Nx2N here since we disable NxN in Inter
-          pcCU->incrementPartInfo();
-        }
-#endif
       }
       break;
@@ -951,15 +915,29 @@
   
   assert( uiCtx < 3 );
+
+#if OL_QTLIMIT_PREDCODING_B0068
+  Bool bCodeSplitFlag    = true;
+
+  TComSPS *sps           = pcCU->getPic()->getSlice(0)->getSPS();
+  TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
+  Bool bDepthMapDetect   = (pcTexture != NULL);
+  Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE);
+
+  if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())
+  {
+    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
+    UInt uiCUIdx            = (pcCU->getZorderIdxInCU() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCU();
+    assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth);
+    bCodeSplitFlag          = (pcTextureCU->getDepth(uiCUIdx) > uiDepth);
+  }
+
+  if(!bCodeSplitFlag)
+  {
+    assert(uiCurrSplitFlag == 0);
+    return;
+  }
+#endif
+
   m_pcBinIf->encodeBin( uiCurrSplitFlag, m_cCUSplitFlagSCModel.get( 0, 0, uiCtx ) );
-#if OL_DEPTHLIMIT_A0044
-  if(pcCU->getPartDumpFlag())
-  {
-    if(pcCU->getSlice()->isIntra() || (!pcCU->getSlice()->isIntra() && uiCurrSplitFlag!=0))
-    {
-      pcCU->updatePartInfo(uiCurrSplitFlag,uiDepth);
-      pcCU->incrementPartInfo();
-    }
-  }
-#endif
   DTRACE_CABAC_VL( g_nSymbolCounter++ )
   DTRACE_CABAC_T( "\tSplitFlag\n" )
Index: /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 181)
@@ -854,9 +854,4 @@
 #endif
 
-#if OL_DEPTHLIMIT_A0044 //stop dumping partition information
-    m_bDumpPartInfo = 0;
-    pcCU->setPartDumpFlag(m_bDumpPartInfo);
-#endif
-
     // inherit from TR if necessary, select substream to use.
     if( m_pcCfg->getUseSBACRD() )
@@ -1316,9 +1311,9 @@
     }
 
+#if OL_QTLIMIT_PREDCODING_B0068
+    rpcPic->setReduceBitsFlag(true);
+#endif
+
     TComDataCU*& pcCU = rpcPic->getCU( uiCUAddr );    
-#if OL_DEPTHLIMIT_A0044
-    pcCU->setPartDumpFlag(m_bDumpPartInfo);
-    pcCU->resetPartInfo();
-#endif
 #if !REMOVE_TILE_DEPENDENCE
     if( (rpcPic->getPicSym()->getTileBoundaryIndependenceIdr()==0) && (rpcPic->getPicSym()->getNumColumnsMinus1()!=0) )
@@ -1408,4 +1403,9 @@
     }
 #endif
+
+#if OL_QTLIMIT_PREDCODING_B0068
+    rpcPic->setReduceBitsFlag(false);
+#endif
+
   }
 
Index: /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncSlice.h
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncSlice.h	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncSlice.h	(revision 181)
@@ -101,7 +101,4 @@
   
   UInt                    m_uiSliceIdx;
-#if OL_DEPTHLIMIT_A0044 //flag to signal to start dumping
-  Bool                    m_bDumpPartInfo;
-#endif
 public:
   TEncSlice();
@@ -131,7 +128,4 @@
   UInt    getSliceIdx()         { return m_uiSliceIdx;                    }
   Void    setSliceIdx(UInt i)   { m_uiSliceIdx = i;                       }
-#if OL_DEPTHLIMIT_A0044 //flag to signal to start dumping
-  Void    setPartDumpFlag(Bool flag) { m_bDumpPartInfo = flag;};
-#endif
 };
 
Index: /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncTop.cpp	(revision 180)
+++ /branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncTop.cpp	(revision 181)
@@ -772,6 +772,6 @@
   m_cSPS.setUseDMM( m_bUseDMM );
 #endif
-#if OL_DEPTHLIMIT_A0044
-  m_cSPS.setUseDPL( m_bDepthPartitionLimiting );
+#if OL_QTLIMIT_PREDCODING_B0068
+  m_cSPS.setUseQTLPC( m_bUseQTLPC );
 #endif
 #if HHI_MPI
