Index: /trunk/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /trunk/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 115)
+++ /trunk/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 116)
@@ -336,11 +336,11 @@
 #endif
 #if LGE_WVSO_A0119
-  ("WVSO",                            m_bWVSO                   , true         , "Use WVSO" )
-  ("VSOWeight",                       m_iVSOWeight              , 10 					 , "VSO Weight" )
-  ("VSDWeight",                       m_iVSDWeight             , 1 					  , "SAIT Weight" )
-  ("DWeight",									        m_iDWeight						    , 1						 , "SSE Weight" )
-#endif
-
-#if OL_DEPTHLIMIT
+  ("WVSO",                            m_bWVSO                   , true          , "Use WVSO" )
+  ("VSOWeight",                       m_iVSOWeight              , 10            , "VSO Weight" )
+  ("VSDWeight",                       m_iVSDWeight              , 1             , "SAIT Weight" )
+  ("DWeight",                         m_iDWeight                , 1             , "SSE Weight" )
+#endif
+
+#if OL_DEPTHLIMIT_A0044
   ("DPL",   m_bDepthPartitionLimiting           , false         , "Use DepthPartitionLimiting" )
 #endif
@@ -1705,5 +1705,5 @@
   printf("WVSO:%d ", m_bWVSO );
 #endif
-#if OL_DEPTHLIMIT
+#if OL_DEPTHLIMIT_A0044
   printf("DPL:%d ", m_bDepthPartitionLimiting);
 #endif
Index: /trunk/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- /trunk/source/App/TAppEncoder/TAppEncCfg.h	(revision 115)
+++ /trunk/source/App/TAppEncoder/TAppEncCfg.h	(revision 116)
@@ -299,7 +299,7 @@
 #if LGE_WVSO_A0119
   Bool      m_bWVSO;                                    ///< flag for using View Synthesis Optimization  
-  Int				m_iVSOWeight;
+  Int       m_iVSOWeight;
   Int       m_iVSDWeight;
-  Int				m_iDWeight;
+  Int       m_iDWeight;
 #endif
   // coding tools (depth intra modes)
@@ -308,5 +308,5 @@
 #endif
 
-#if OL_DEPTHLIMIT
+#if OL_DEPTHLIMIT_A0044
   Bool      m_bDepthPartitionLimiting;
 #endif
Index: /trunk/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /trunk/source/App/TAppEncoder/TAppEncTop.cpp	(revision 115)
+++ /trunk/source/App/TAppEncoder/TAppEncTop.cpp	(revision 116)
@@ -208,5 +208,5 @@
 #endif
 #if LGE_WVSO_A0119
-    m_acTEncTopList[iViewIdx]->setWVSO												 ( false ); 
+    m_acTEncTopList[iViewIdx]->setWVSO                         ( false ); 
 #endif
 #endif
@@ -364,6 +364,6 @@
     m_acTEncTopList[iViewIdx]->setUseDMM                     ( false );
 #endif
-#if OL_DEPTHLIMIT
-	m_acTEncTopList[iViewIdx]->setUseDPL                     ( false );
+#if OL_DEPTHLIMIT_A0044
+    m_acTEncTopList[iViewIdx]->setUseDPL                     ( false );
 #endif
 #if HHI_MPI
@@ -643,6 +643,6 @@
     m_acTEncDepthTopList[iViewIdx]->setUseDMM                     ( m_bUseDMM );
 #endif
-#if OL_DEPTHLIMIT
-	m_acTEncDepthTopList[iViewIdx]->setUseDPL                      (m_bDepthPartitionLimiting);
+#if OL_DEPTHLIMIT_A0044
+    m_acTEncDepthTopList[iViewIdx]->setUseDPL                      (m_bDepthPartitionLimiting);
 #endif
 #if HHI_MPI
Index: /trunk/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /trunk/source/Lib/TLibCommon/TComDataCU.cpp	(revision 115)
+++ /trunk/source/Lib/TLibCommon/TComDataCU.cpp	(revision 116)
@@ -152,13 +152,15 @@
 #endif
 #endif
-#if OL_DEPTHLIMIT
+#if OL_DEPTHLIMIT_A0044
   //add a variable to store the partition information
-  //a 2D array in part_symbol,uidepth format
+  //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;
-	}
+  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
 }
@@ -466,5 +468,5 @@
 Void TComDataCU::initCU( TComPic* pcPic, UInt iCUAddr )
 {
-#if OL_DEPTHLIMIT
+#if OL_DEPTHLIMIT_A0044
   TComDataCU* pcCU     = pcPic->getCU(iCUAddr);
 #endif
@@ -685,5 +687,5 @@
     m_apcCUColocated[1] = getSlice()->getRefPic( REF_PIC_LIST_1, 0)->getCU( m_uiCUAddr );
   }
-#if OL_DEPTHLIMIT
+#if OL_DEPTHLIMIT_A0044
   setPartDumpFlag (pcCU->getPartDumpFlag());
 #endif
@@ -1017,5 +1019,5 @@
   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
+#if OL_DEPTHLIMIT_A0044
   setPartDumpFlag (pcCU->getPartDumpFlag());
 #endif
Index: /trunk/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- /trunk/source/Lib/TLibCommon/TComDataCU.h	(revision 115)
+++ /trunk/source/Lib/TLibCommon/TComDataCU.h	(revision 116)
@@ -238,10 +238,10 @@
   UInt*         m_uiEntropySliceStartCU; ///< Start CU address of current slice
 
-#if OL_DEPTHLIMIT 
+#if OL_DEPTHLIMIT_A0044 
   //add a variable to store the partition information
-  //a 2D array in uidepth,part_symbol format
+  //a 2D array in uidepth, part_symbol format
   UInt          m_uiPartInfo[OL_PART_BUF_SIZE][2];
   UInt          m_uiPartNum;
-  Bool	        b_dumpPartInfo;
+  Bool          b_dumpPartInfo;
 #endif 
   
@@ -605,14 +605,11 @@
   Void          compressMV            ();
 
-#if OL_DEPTHLIMIT
-	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;};
-//	UInt		getPartNumIdx() {return m_uiPartNum;}; //added this to get the index
-//flag to signal to start dumping
-	Void		setPartDumpFlag(bool flag)	{b_dumpPartInfo = flag;};
-	Bool		getPartDumpFlag()	{return b_dumpPartInfo;};
+#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)                  { b_dumpPartInfo = flag; };
+  Bool        getPartDumpFlag()                           { return b_dumpPartInfo; };
 #endif
   
Index: /trunk/source/Lib/TLibCommon/TComRdCost.h
===================================================================
--- /trunk/source/Lib/TLibCommon/TComRdCost.h	(revision 115)
+++ /trunk/source/Lib/TLibCommon/TComRdCost.h	(revision 116)
@@ -378,6 +378,6 @@
 #endif
 #if LGE_WVSO_A0119
-  Int											m_iDWeight;
-  Int											m_iVSOWeight;
+  Int                     m_iDWeight;
+  Int                     m_iVSOWeight;
   Int                     m_iVSDWeight;
   Bool                    m_bWVSO;
@@ -417,12 +417,12 @@
   UInt    getVSOMode( )                  { return m_uiVSOMode; }
 #if LGE_WVSO_A0119
-  Void    setWVSO ( Bool bIn )         { m_bWVSO = bIn; }; 
-  Bool    getWVSO ( )                  { return m_bWVSO;};
-  Void		setDWeight ( Int iDWeight )			{ m_iDWeight = iDWeight; };
-  Int			getDWeight ()										{ return m_iDWeight; };
-  Void		setVSOWeight ( Int iVSOWeight ) { m_iVSOWeight = iVSOWeight; };
-  Int			getVSOWeight ()									{ return m_iVSOWeight; };
-  Void		setVSDWeight ( Int iVSDWeight ) { m_iVSDWeight = iVSDWeight; };
-  Int			getVSDWeight ()									{ return m_iVSDWeight; };
+  Void    setWVSO ( Bool bIn )            { m_bWVSO = bIn; }; 
+  Bool    getWVSO ( )                     { return m_bWVSO;};
+  Void    setDWeight   ( Int iDWeight   ) { m_iDWeight = iDWeight; };
+  Int     getDWeight   ()                 { return m_iDWeight; };
+  Void    setVSOWeight ( Int iVSOWeight ) { m_iVSOWeight = iVSOWeight; };
+  Int     getVSOWeight ()                 { return m_iVSOWeight; };
+  Void    setVSDWeight ( Int iVSDWeight ) { m_iVSDWeight = iVSDWeight; };
+  Int     getVSDWeight ()                 { return m_iVSDWeight; };
 #endif 
 #if HHI_VSO_DIST_INT
Index: /trunk/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /trunk/source/Lib/TLibCommon/TComSlice.cpp	(revision 115)
+++ /trunk/source/Lib/TLibCommon/TComSlice.cpp	(revision 116)
@@ -1441,5 +1441,5 @@
 , m_bUseDMM                   (false)
 #endif
-#if OL_DEPTHLIMIT
+#if OL_DEPTHLIMIT_A0044
 , m_bDepthPartitionLimiting   (false)
 #endif
Index: /trunk/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /trunk/source/Lib/TLibCommon/TComSlice.h	(revision 115)
+++ /trunk/source/Lib/TLibCommon/TComSlice.h	(revision 116)
@@ -354,5 +354,5 @@
 #endif
 
-#if OL_DEPTHLIMIT
+#if OL_DEPTHLIMIT_A0044
   Bool m_bDepthPartitionLimiting;
 #endif
@@ -623,5 +623,5 @@
 #endif
 
-#if OL_DEPTHLIMIT
+#if OL_DEPTHLIMIT_A0044
   Void setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; }
   Bool getUseDPL()       {return m_bDepthPartitionLimiting;}
Index: /trunk/source/Lib/TLibCommon/TComWedgelet.h
===================================================================
--- /trunk/source/Lib/TLibCommon/TComWedgelet.h	(revision 115)
+++ /trunk/source/Lib/TLibCommon/TComWedgelet.h	(revision 116)
@@ -198,5 +198,4 @@
   static UInt xGetSAD16         ( WedgeDistParam* pcDtParam );
   static UInt xGetSAD32         ( WedgeDistParam* pcDtParam );
-  //static UInt xGetSAD64         ( WedgeDistParam* pcDtParam );
 
   static UInt xGetSSE4          ( WedgeDistParam* pcDtParam );
@@ -204,5 +203,4 @@
   static UInt xGetSSE16         ( WedgeDistParam* pcDtParam );
   static UInt xGetSSE32         ( WedgeDistParam* pcDtParam );
-  //static UInt xGetSSE64         ( WedgeDistParam* pcDtParam );
 
 };// END CLASS DEFINITION TComWedgeDist
Index: /trunk/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /trunk/source/Lib/TLibCommon/TypeDef.h	(revision 115)
+++ /trunk/source/Lib/TLibCommon/TypeDef.h	(revision 116)
@@ -96,8 +96,8 @@
 #define LGE_WVSO_A0119                    1 // JCT2-A0119 Depth Metric with a weighted depth fidelity term
 
-#define OL_DEPTHLIMIT                     1 //JCT2-A0044
-#if OL_DEPTHLIMIT
+#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 initialising the partition information buffer
+#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
Index: /trunk/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncCfg.h	(revision 115)
+++ /trunk/source/Lib/TLibEncoder/TEncCfg.h	(revision 116)
@@ -206,7 +206,7 @@
 #if LGE_WVSO_A0119
   Bool      m_bWVSO;
-  Int				m_iVSOWeight;
+  Int       m_iVSOWeight;
   Int       m_iVSDWeight;
-  Int				m_iDWeight;
+  Int       m_iDWeight;
 #endif
 #endif
@@ -315,9 +315,9 @@
 #endif
 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
-  Bool      m_bUseDMM;
-#endif
-
-#if OL_DEPTHLIMIT
-  Bool      m_bDepthPartitionLimiting;
+  Bool     m_bUseDMM;
+#endif
+
+#if OL_DEPTHLIMIT_A0044
+  Bool     m_bDepthPartitionLimiting;
 #endif
 
@@ -477,8 +477,8 @@
 #endif
 #if LGE_WVSO_A0119
-  Void      setWVSO													( Bool  b )     { m_bWVSO				= b; }
-  Void      setVSOWeight										( Int   i )     { m_iVSOWeight  = i; }
-  Void      setVSDWeight										( Int   i )     { m_iVSDWeight  = i; }
-  Void      setDWeight											( Int   i )     { m_iDWeight  = i; }
+  Void      setWVSO                         ( Bool  b )     { m_bWVSO      = b; }
+  Void      setVSOWeight                    ( Int   i )     { m_iVSOWeight = i; }
+  Void      setVSDWeight                    ( Int   i )     { m_iVSDWeight = i; }
+  Void      setDWeight                      ( Int   i )     { m_iDWeight   = i; }
 #endif
 #endif
@@ -566,5 +566,5 @@
   Int       getVSOWeight                    ()      { return m_iVSOWeight;    }
   Int       getVSDWeight                    ()      { return m_iVSDWeight;    }
-  Int       getDWeight									    ()      { return m_iDWeight;    }
+  Int       getDWeight                      ()      { return m_iDWeight;    }
 #endif
 #endif
@@ -821,5 +821,5 @@
 #endif
 
-#if OL_DEPTHLIMIT
+#if OL_DEPTHLIMIT_A0044
   Void setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; }
   Bool getUseDPL()       {return m_bDepthPartitionLimiting;}
Index: /trunk/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncCu.cpp	(revision 115)
+++ /trunk/source/Lib/TLibEncoder/TEncCu.cpp	(revision 116)
@@ -451,12 +451,14 @@
   TComPic* pcPic = rpcBestCU->getPic();
 
-#if OL_DEPTHLIMIT
+#if OL_DEPTHLIMIT_A0044
   TComSPS *sps = pcPic->getSlice(0)->getSPS();
   TComPic *pcTexture;
-  TComDataCU *pcTextureCU;
+  TComDataCU * pcTextureCU;
+
   static UInt* texPartInfo;
-  static UInt uiTexPartIndex;
-  static Bool depthMapDetect =  false;
-  UInt uiPrevTexPartIndex = 0;
+  static UInt  uiTexPartIndex;
+  static Bool  depthMapDetect =  false;
+
+  UInt         uiPrevTexPartIndex = 0;
 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
   static Bool bIntraSliceDetect = false;
@@ -466,19 +468,19 @@
   if(uiDepth == 0)
   {
-	pcTexture = rpcBestCU->getSlice()->getTexturePic();
-	if(pcTexture != NULL) //depth map being encoded
-	{
+    pcTexture = rpcBestCU->getSlice()->getTexturePic();
+    if(pcTexture != NULL) //depth map being encoded
+    {
 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
-		bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType()==I_SLICE);
-#endif
-		pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() );
-		texPartInfo = pcTextureCU -> readPartInfo();
-		uiTexPartIndex = 0;
-		depthMapDetect = true;
-	}
-	else
-	{
-		depthMapDetect = false;
-	}
+      bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType()==I_SLICE);
+#endif
+      pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() );
+      texPartInfo = pcTextureCU -> readPartInfo();
+      uiTexPartIndex = 0;
+      depthMapDetect = true;
+    }
+    else
+    {
+      depthMapDetect = false;
+    }
   }
 #endif
@@ -488,5 +490,5 @@
   // variables for fast encoder decision
   Bool    bEarlySkip  = false;
-  Bool    bTrySplit    = true;
+  Bool    bTrySplit   = true;
   Double  fRD_Skip    = MAX_DOUBLE;
 
@@ -499,5 +501,5 @@
   Bool    bTrySplitDQP  = true;
 
-  static  Double  afCost[ MAX_CU_DEPTH ];
+  static  Double  afCost [ MAX_CU_DEPTH ];
   static  Int      aiNum [ MAX_CU_DEPTH ];
 
@@ -581,5 +583,5 @@
       isAddLowestQP = true; 
       iMinQP = iMinQP - 1;
-       
+
     }
 #endif
@@ -625,75 +627,75 @@
       rpcTempCU->initEstData( uiDepth, iQP );
 
-#if OL_DEPTHLIMIT
-  //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU
+#if OL_DEPTHLIMIT_A0044
+      //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 == (UInt)texPartInfo[uiTexPartIndex+1]);
-	if((UInt)texPartInfo[uiTexPartIndex+0] == 1) //NxN modes
-	{
-		bTrySplit = true;
-		bTryNx2N = true;
-		bTry2NxN = true;
-		uiPrevTexPartIndex = uiTexPartIndex; 
-		uiTexPartIndex += 2;
-	}
-	else if((UInt)texPartInfo[uiTexPartIndex+0] == 0) //2Nx2N modes
-	{
-		UInt uiTexdepth;
-		UInt temp_uiTexPartIndex;
-		bTrySplit = false;
-		//scan ahead till next depth
-		uiTexdepth = (UInt)texPartInfo[uiTexPartIndex+1];
-		uiPrevTexPartIndex = uiTexPartIndex;
-		uiTexPartIndex+=2;
-		temp_uiTexPartIndex = uiTexPartIndex; //store in case to rewind
-		//temp_uiTexPartIndex+=2;
-					while(uiTexdepth != (UInt)texPartInfo[uiTexPartIndex+1] && uiTexdepth != 0)
-					{
-						if((UInt)texPartInfo[uiTexPartIndex+1] < uiTexdepth)
-						{
-							break;
-						}
-						uiTexPartIndex+=2;
-						
-						if((UInt)texPartInfo[uiTexPartIndex+1] == OL_END_CU)
-						{
-							uiTexPartIndex = temp_uiTexPartIndex;
-							uiTexdepth++;
-							if(uiTexdepth >= g_uiMaxCUDepth)
-							{
-								//uiTexPartIndex-=2;
-								break;
-							}
-						}
-					}
-	}
-	else if((UInt)texPartInfo[uiTexPartIndex+0] == OL_END_CU)
-	{
-		bTrySplit = false;
-		bTryNx2N = false;
-		bTry2NxN = false;
-	}
-	else if((UInt)texPartInfo[uiTexPartIndex+0] == 2) //2NxN case
-	{
-		bTrySplit = false;
-		bTryNx2N = false;
-		bTry2NxN = true;
-		uiPrevTexPartIndex = uiTexPartIndex; 
-		uiTexPartIndex += 2;
-	}
-	else if((UInt)texPartInfo[uiTexPartIndex+0] == 3) //Nx2N case
-	{
-		bTrySplit = false;
-		bTryNx2N = true;
-		bTry2NxN = false;
-		uiPrevTexPartIndex = uiTexPartIndex; 
-		uiTexPartIndex += 2;
-	}
-  }
+      if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL())
+#else
+      if(depthMapDetect && sps->getUseDPL()) //depth map being encoded
+#endif
+      {
+        assert(uiDepth == (UInt)texPartInfo[uiTexPartIndex+1]);
+        if((UInt)texPartInfo[uiTexPartIndex] == 1) //NxN modes
+        {
+          bTrySplit = true;
+          bTryNx2N = true;
+          bTry2NxN = true;
+          uiPrevTexPartIndex = uiTexPartIndex; 
+          uiTexPartIndex += 2;
+        }
+        else if((UInt)texPartInfo[uiTexPartIndex] == 0) //2Nx2N modes
+        {
+          UInt uiTexdepth;
+          UInt temp_uiTexPartIndex;
+          bTrySplit = false;
+
+          //scan ahead till next depth
+          uiTexdepth = (UInt)texPartInfo[uiTexPartIndex+1];
+          uiPrevTexPartIndex = uiTexPartIndex;
+          uiTexPartIndex+=2;
+          temp_uiTexPartIndex = uiTexPartIndex; //store in case to rewind
+
+          while(uiTexdepth != (UInt)texPartInfo[uiTexPartIndex+1] && uiTexdepth != 0)
+          {
+            if((UInt)texPartInfo[uiTexPartIndex+1] < uiTexdepth)
+            {
+              break;
+            }
+            uiTexPartIndex+=2;
+
+            if((UInt)texPartInfo[uiTexPartIndex+1] == OL_END_CU)
+            {
+              uiTexPartIndex = temp_uiTexPartIndex;
+              uiTexdepth++;
+              if(uiTexdepth >= g_uiMaxCUDepth)
+              {      
+                break;
+              }
+            }
+          }
+        }
+        else if((UInt)texPartInfo[uiTexPartIndex] == OL_END_CU)
+        {
+          bTrySplit = false;
+          bTryNx2N = false;
+          bTry2NxN = false;
+        }
+        else if((UInt)texPartInfo[uiTexPartIndex] == 2) //2NxN case
+        {
+          bTrySplit = false;
+          bTryNx2N = false;
+          bTry2NxN = true;
+          uiPrevTexPartIndex = uiTexPartIndex; 
+          uiTexPartIndex += 2;
+        }
+        else if((UInt)texPartInfo[uiTexPartIndex] == 3) //Nx2N case
+        {
+          bTrySplit = false;
+          bTryNx2N = true;
+          bTry2NxN = false;
+          uiPrevTexPartIndex = uiTexPartIndex; 
+          uiTexPartIndex += 2;
+        }
+      }
 #endif
 
@@ -722,71 +724,71 @@
 #endif
 #if HHI_INTER_VIEW_RESIDUAL_PRED
-        rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
-#endif
-        // SKIP
-#if HHI_INTERVIEW_SKIP
-        xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, bFullyRenderedSec );
-#else
-        xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU );
-#endif
-        rpcTempCU->initEstData( uiDepth, iQP );
-
-        // fast encoder decision for early skip
-        if ( m_pcEncCfg->getUseFastEnc() )
+          rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
+#endif
+          // SKIP
+#if HHI_INTERVIEW_SKIP
+          xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, bFullyRenderedSec );
+#else
+          xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU );
+#endif
+          rpcTempCU->initEstData( uiDepth, iQP );
+
+          // fast encoder decision for early skip
+          if ( m_pcEncCfg->getUseFastEnc() )
+          {
+            Int iIdx = g_aucConvertToBit[ rpcBestCU->getWidth(0) ];
+            if ( aiNum [ iIdx ] > 5 && fRD_Skip < EARLY_SKIP_THRES*afCost[ iIdx ]/aiNum[ iIdx ] )
+            {
+              bEarlySkip = true;
+              bTrySplit  = false;
+            }
+          }
+
+          // 2Nx2N, NxN
+          if ( !bEarlySkip )
+          {
+#if HHI_INTER_VIEW_RESIDUAL_PRED
+            rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
+#endif
+#if HHI_INTERVIEW_SKIP
+            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec );
+
+#else
+            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N );
+#endif
+            rpcTempCU->initEstData( uiDepth, iQP );
+            if(m_pcEncCfg->getUseCbfFastMode())
+            {
+              doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
+            }
+          }
+#if HHI_INTER_VIEW_RESIDUAL_PRED
+        } // uiResPrdId
+#endif
+      } // != I_SLICE
+
+#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
+      {
+        bTrySplitDQP = bTrySplit;
+      }
+      else
+      {
+        if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() )
         {
-          Int iIdx = g_aucConvertToBit[ rpcBestCU->getWidth(0) ];
-          if ( aiNum [ iIdx ] > 5 && fRD_Skip < EARLY_SKIP_THRES*afCost[ iIdx ]/aiNum[ iIdx ] )
+          if(iQP == iBaseQP)
           {
-            bEarlySkip = true;
-            bTrySplit  = false;
+            bTrySplitDQP = bTrySplit;
           }
         }
-
-        // 2Nx2N, NxN
-        if ( !bEarlySkip )
+        else
         {
-#if HHI_INTER_VIEW_RESIDUAL_PRED
-          rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
-#endif
-#if HHI_INTERVIEW_SKIP
-            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec );
-
-#else
-            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N );
-#endif
-          rpcTempCU->initEstData( uiDepth, iQP );
-          if(m_pcEncCfg->getUseCbfFastMode())
-          {
-            doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
-          }
+          bTrySplitDQP = bTrySplit;
         }
-#if HHI_INTER_VIEW_RESIDUAL_PRED
-        } // uiResPrdId
-#endif
-      } // != I_SLICE
-
-#if OL_DEPTHLIMIT
-#if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
-	  if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
-#else
-	  if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
-#endif
-	  {
-		  bTrySplitDQP = bTrySplit;
-	  }
-	  else
-	  {
-		if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() )
-		{
-			if(iQP == iBaseQP)
-			{
-				bTrySplitDQP = bTrySplit;
-			}
-		}
-		else
-		{
-			bTrySplitDQP = bTrySplit;
-		}
-	  }
+      }
 #else
 
@@ -844,544 +846,544 @@
           Bool bResPredFlag  = ( uiResPrdId > 0 );
 #endif
-        // 2Nx2N, NxN
-        if ( !bEarlySkip )
-        {
-
-        if(!( rpcBestCU->getSlice()->getSPS()->getDisInter4x4()  && (rpcBestCU->getWidth(0)==8) && (rpcBestCU->getHeight(0)==8) ))
-        {
-          if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu)
+          // 2Nx2N, NxN
+          if ( !bEarlySkip )
           {
-#if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none
+
+            if(!( rpcBestCU->getSlice()->getSPS()->getDisInter4x4()  && (rpcBestCU->getWidth(0)==8) && (rpcBestCU->getHeight(0)==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
-			{
-				assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);
-				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
-				}//bTrySplit
-			}//depthMapDetect
-			else//do things normally
-			{
-#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 );
-          }
-#endif
-          } 
-        }
-        }
-
-        { // 2NxN, Nx2N
-#if OL_DEPTHLIMIT //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
-			{
-				assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);
-				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(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
+#else
+                if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
+#endif
+                {
+                  assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);
+                  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
+                {
+#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 );
+                }
+#endif
+              } 
             }
           }
-#if OL_DEPTHLIMIT
-				}//bTryNx2N
-			}//depthMapDetect
-			else//do things normally
-			{
-          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 )
+
+          { // 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
             {
-              doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
-            }
-          }
-			}
-#endif
-
-#if OL_DEPTHLIMIT //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
-			{
-				assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);
-				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)
+              assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);
+              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
             {
-              doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
-            }
-          }
-#if OL_DEPTHLIMIT
-				}//bTryNx2N
-			}//depthMapDetect
-			else//do things normally
-			{
-				 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;
-            }
-          }
-  }
-#endif
-        }
-
-#if 1
-        //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N)
-        if( pcPic->getSlice(0)->getSPS()->getAMPAcc(uiDepth) )
-        {
-#if AMP_ENC_SPEEDUP        
-          Bool bTestAMP_Hor = false, bTestAMP_Ver = false;
-
-#if AMP_MRG
-          Bool bTestMergeAMP_Hor = false, bTestMergeAMP_Ver = false;
-
-          deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver, bTestMergeAMP_Hor, bTestMergeAMP_Ver);
-#else
-          deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver);
-#endif
-
-          //! Do horizontal AMP
-          if ( bTestAMP_Hor )
-          {
-#if OL_DEPTHLIMIT //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
-			{
-				assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);
-				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 )
+              if(doNotBlockPu)
               {
-                doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
+#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(doNotBlockPu)
+#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 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 )
+              assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);
+              if (bTry2NxN)
               {
-                doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
+#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
+            {
+              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
-				}//bTry2NxN
-			}//depthMapDetect
-			else//do things normally
-			{
-            if(doNotBlockPu)
+#endif
+          }
+
+#if 1
+          //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N)
+          if( pcPic->getSlice(0)->getSPS()->getAMPAcc(uiDepth) )
+          {
+#if AMP_ENC_SPEEDUP        
+            Bool bTestAMP_Hor = false, bTestAMP_Ver = false;
+
+#if AMP_MRG
+            Bool bTestMergeAMP_Hor = false, bTestMergeAMP_Ver = false;
+
+            deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver, bTestMergeAMP_Hor, bTestMergeAMP_Ver);
+#else
+            deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver);
+#endif
+
+            //! Do horizontal AMP
+            if ( bTestAMP_Hor )
             {
-#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 )
+#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
               {
-                doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
+                assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);
+                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
+              {
+                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;
+                  }
+                }
               }
+#endif
             }
-            if(doNotBlockPu)
+#if AMP_MRG
+            else if ( bTestMergeAMP_Hor ) 
             {
-#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 )
+#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
               {
-                doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
+                assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);
+                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
+              {
+                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;
+                  }
+                }
+
               }
+#endif
             }
-          }
-#endif
-          }
+#endif
+
+            //! Do horizontal AMP
+            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
+              {
+                assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);
+                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
+              {
+                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 );
+                }
+              }
+#endif
+            }
 #if AMP_MRG
-          else if ( bTestMergeAMP_Hor ) 
-          {
-#if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none
+            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
-			{
-				assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);
-				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 )
+              if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
+#else
+              if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
+#endif
               {
-                doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
+                assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);
+                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
+              {
+                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 );
+                }
               }
+#endif
             }
-            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
-				}//bTry2NxN
-			}//depthMapDetect
-			else//do things normally
-			{
-            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;
-              }
-            }
-
-			}
-#endif
-          }
-#endif
-
-          //! Do horizontal AMP
-          if ( bTestAMP_Ver )
-          {
-#if OL_DEPTHLIMIT //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
-			{
-				assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);
-				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
-				}//bTryNx2N
-			}//depthMapDetect
-			else//do things normally
-			{
-            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 );
-            }
-          }
-#endif
-          }
-#if AMP_MRG
-          else if ( bTestMergeAMP_Ver )
-          {
-#if OL_DEPTHLIMIT //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
-			{
-				assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);
-				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
-				}//bTryNx2N
-			}//depthMapDetect
-			else//do things normally
-			{
-            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 );
-            }
-          }
-#endif
-          }
-#endif
-
-#else
-#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 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 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 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 );
-
-#endif
-        } //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N)
+#endif
+
+#else
+#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 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 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 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 );
+
+#endif
+          } //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N)
 #endif
 #if HHI_INTER_VIEW_RESIDUAL_PRED
@@ -1399,8 +1401,8 @@
         // speedup for inter frames
 #if HHI_INTERVIEW_SKIP
-      if( ( rpcBestCU->getSlice()->getSliceType() == I_SLICE ||
-               rpcBestCU->getCbf( 0, TEXT_LUMA     ) != 0   ||
-               rpcBestCU->getCbf( 0, TEXT_CHROMA_U ) != 0   ||
-               rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0 ) && !bFullyRenderedSec ) // avoid very complex intra if it is unlikely
+        if( ( rpcBestCU->getSlice()->getSliceType() == I_SLICE ||
+          rpcBestCU->getCbf( 0, TEXT_LUMA     ) != 0   ||
+          rpcBestCU->getCbf( 0, TEXT_CHROMA_U ) != 0   ||
+          rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0 ) && !bFullyRenderedSec ) // avoid very complex intra if it is unlikely
 #else
         if( rpcBestCU->getSlice()->getSliceType() == I_SLICE || 
@@ -1414,32 +1416,32 @@
           if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
           {
-#if OL_DEPTHLIMIT //add code here to select or deselect NxN mode for Intra
+#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
-			{
-				assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);
-				if (bTrySplit)
-				{
-			
-#endif
-            if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) )
+            if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
+#else
+            if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
+#endif
             {
-              xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN   );
-              rpcTempCU->initEstData( uiDepth, iQP );
+              assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]);
+              if (bTrySplit)
+              {
+
+#endif
+                if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) )
+                {
+                  xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN   );
+                  rpcTempCU->initEstData( uiDepth, iQP );
+                }
+#if OL_DEPTHLIMIT_A0044
+              }//bTrySplit
+            }//depthMapDetect
+            else
+            {
+              if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) )
+              {
+                xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN   );
+                rpcTempCU->initEstData( uiDepth, iQP );
+              }
             }
-#if OL_DEPTHLIMIT
-				}//bTrySplit
-			 }//depthMapDetect
-			else
-			{
-				if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) )
-				{
-					xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN   );
-					rpcTempCU->initEstData( uiDepth, iQP );
-				}
-			}
 #endif
           }
@@ -1498,5 +1500,5 @@
 #endif
     {
-    rpcBestCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcBestCU->getTotalBits(), rpcBestCU->getTotalDistortion() );
+      rpcBestCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcBestCU->getTotalBits(), rpcBestCU->getTotalDistortion() );
     }
 
@@ -1522,5 +1524,5 @@
     }
 #if HHI_INTERVIEW_SKIP
-  rpcBestCU->setRenderableSubParts(bFullyRenderedSec,0,rpcBestCU->getDepth( 0 )) ;
+    rpcBestCU->setRenderableSubParts(bFullyRenderedSec,0,rpcBestCU->getDepth( 0 )) ;
 #endif
   }
@@ -1586,8 +1588,8 @@
   {
 #if LOSSLESS_CODING
-      if (isAddLowestQP && (iQP == iMinQP))
-      {
-        iQP = lowestQP;
-      }
+    if (isAddLowestQP && (iQP == iMinQP))
+    {
+      iQP = lowestQP;
+    }
 #endif
     rpcTempCU->initEstData( uiDepth, iQP );
@@ -1698,5 +1700,5 @@
 #endif
       {           
-      rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
+        rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
       }
 
@@ -1707,5 +1709,5 @@
         {
           if( ( pcPic->getCU( rpcTempCU->getAddr() )->getEntropySliceStartCU(uiBlkIdx+rpcTempCU->getZorderIdxInCU()) == rpcTempCU->getSlice()->getEntropySliceCurStartCUAddr() ) && 
-              ( rpcTempCU->getCbf( uiBlkIdx, TEXT_LUMA ) || rpcTempCU->getCbf( uiBlkIdx, TEXT_CHROMA_U ) || rpcTempCU->getCbf( uiBlkIdx, TEXT_CHROMA_V ) ) )
+            ( rpcTempCU->getCbf( uiBlkIdx, TEXT_LUMA ) || rpcTempCU->getCbf( uiBlkIdx, TEXT_CHROMA_U ) || rpcTempCU->getCbf( uiBlkIdx, TEXT_CHROMA_V ) ) )
           {
             bHasRedisual = true;
@@ -1741,5 +1743,5 @@
 #endif
           {
-          rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
+            rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
           }
 #endif
@@ -1790,8 +1792,8 @@
     }                                                                                  // with sub partitioned prediction.
 #if LOSSLESS_CODING
-      if (isAddLowestQP && (iQP == lowestQP))
-      {
-        iQP = iMinQP;
-      }
+    if (isAddLowestQP && (iQP == lowestQP))
+    {
+      iQP = iMinQP;
+    }
 #endif
   } // SPLIT- QP Loop
@@ -1800,9 +1802,9 @@
   if( m_pcRdCost->getUseRenModel() )
   {
-      UInt  uiWidth     = m_ppcRecoYuvBest[uiDepth]->getWidth   ( );
-      UInt  uiHeight    = m_ppcRecoYuvBest[uiDepth]->getHeight  ( );
-      Pel*  piSrc       = m_ppcRecoYuvBest[uiDepth]->getLumaAddr( 0 );
-      UInt  uiSrcStride = m_ppcRecoYuvBest[uiDepth]->getStride  ( );
-      m_pcRdCost->setRenModelData( rpcBestCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
+    UInt  uiWidth     = m_ppcRecoYuvBest[uiDepth]->getWidth   ( );
+    UInt  uiHeight    = m_ppcRecoYuvBest[uiDepth]->getHeight  ( );
+    Pel*  piSrc       = m_ppcRecoYuvBest[uiDepth]->getLumaAddr( 0 );
+    UInt  uiSrcStride = m_ppcRecoYuvBest[uiDepth]->getStride  ( );
+    m_pcRdCost->setRenModelData( rpcBestCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
   }
 #endif
@@ -2027,7 +2029,8 @@
 
     if( ( uiRPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
-	{
+    {
       m_pcEntropyCoder->encodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth );
-	}
+    }
+
     if( !pcCU->getSlice()->isIntra() )
     {
@@ -2095,10 +2098,10 @@
   if( pcCU->isSkipped( uiAbsPartIdx ) )
   {
-#if OL_DEPTHLIMIT
-	if(pcCU->getPartDumpFlag())
-	{
-		pcCU->updatePartInfo(0,uiDepth);
-		pcCU->incrementPartInfo();
-	}
+#if OL_DEPTHLIMIT_A0044
+    if(pcCU->getPartDumpFlag())
+    {
+      pcCU->updatePartInfo(0,uiDepth);
+      pcCU->incrementPartInfo();
+    }
 #endif
     m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 );
Index: /trunk/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 115)
+++ /trunk/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 116)
@@ -1136,25 +1136,21 @@
         if (!bEntropySlice)
         {
-#if OL_DEPTHLIMIT //start dumping partition information
-		m_pcSliceEncoder->setPartDumpFlag(1);
-//		if(!(pcPic->getSlice(0)->getSPS()->getUseDPL()))
-//		{
-//			m_pcSliceEncoder->setPartDumpFlag(0);
-//		}
+#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 //stop dumping partition information
-		m_pcSliceEncoder->setPartDumpFlag(0);
+#if OL_DEPTHLIMIT_A0044 //stop dumping partition information
+          m_pcSliceEncoder->setPartDumpFlag(0);
 #endif
         }
         else
         {
-#if OL_DEPTHLIMIT //start dumping partition information
-		m_pcSliceEncoder->setPartDumpFlag(1);
+#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 //stop dumping partition information
-		m_pcSliceEncoder->setPartDumpFlag(0);
+#if OL_DEPTHLIMIT_A0044 //stop dumping partition information
+          m_pcSliceEncoder->setPartDumpFlag(0);
 #endif
         }
Index: /trunk/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 115)
+++ /trunk/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 116)
@@ -580,5 +580,5 @@
 {
   PartSize eSize         = pcCU->getPartitionSize( uiAbsPartIdx );
-#if OL_DEPTHLIMIT
+#if OL_DEPTHLIMIT_A0044
   UInt uiSymbol;
 #endif
@@ -588,19 +588,19 @@
     {
       m_pcBinIf->encodeBin( eSize == SIZE_2Nx2N? 1 : 0, m_cCUPartSizeSCModel.get( 0, 0, 0 ) );
-#if OL_DEPTHLIMIT
-		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
-	if(pcCU->getPartDumpFlag() && uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth && !pcCU->getSlice()->isIntra())
-	{
-		pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N and 1 for NxN
-		pcCU->incrementPartInfo();
-	}
+#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;
@@ -609,22 +609,19 @@
   switch(eSize)
   {
-    case SIZE_2Nx2N:
+  case SIZE_2Nx2N:
     {
       m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 0) );
-#if OL_DEPTHLIMIT
-	  if(pcCU->getPartDumpFlag())
-	  {
-//		if (!pcCU->isIntra( uiAbsPartIdx ))
-		{
-			pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N
-			pcCU->incrementPartInfo();
-		}
-	  }
+#if OL_DEPTHLIMIT_A0044
+      if(pcCU->getPartDumpFlag())
+      {
+        pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N
+        pcCU->incrementPartInfo();
+      }
 #endif
       break;
     }
-    case SIZE_2NxN:
-    case SIZE_2NxnU:
-    case SIZE_2NxnD:
+  case SIZE_2NxN:
+  case SIZE_2NxnU:
+  case SIZE_2NxnD:
     {
       m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) );
@@ -651,19 +648,16 @@
         }
       }
-#if OL_DEPTHLIMIT
-	  if(pcCU->getPartDumpFlag())
-	  {
-//		if (!pcCU->isIntra( uiAbsPartIdx ))
-		{
-			pcCU->updatePartInfo(2,uiDepth); //2 for 2NxN
-			pcCU->incrementPartInfo();
-		}
-	  }
+#if OL_DEPTHLIMIT_A0044
+      if(pcCU->getPartDumpFlag())
+      {
+        pcCU->updatePartInfo(2,uiDepth); //2 for 2NxN
+        pcCU->incrementPartInfo();
+      }
 #endif
       break;
     }
-    case SIZE_Nx2N:
-    case SIZE_nLx2N:
-    case SIZE_nRx2N:
+  case SIZE_Nx2N:
+  case SIZE_nLx2N:
+  case SIZE_nRx2N:
     {
       m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) );
@@ -694,17 +688,14 @@
         }
       }
-#if OL_DEPTHLIMIT
-	  if(pcCU->getPartDumpFlag())
-	  {
-//		if (!pcCU->isIntra( uiAbsPartIdx ))
-		{
-			pcCU->updatePartInfo(3,uiDepth); //3 for Nx2N
-			pcCU->incrementPartInfo();
-		}
-	  }
+#if OL_DEPTHLIMIT_A0044
+      if(pcCU->getPartDumpFlag())
+      {
+        pcCU->updatePartInfo(3,uiDepth); //3 for Nx2N
+        pcCU->incrementPartInfo();
+      }
 #endif
       break;
     }
-    case SIZE_NxN:
+  case SIZE_NxN:
     {
       if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getSlice()->getSPS()->getDisInter4x4() && pcCU->getWidth(uiAbsPartIdx) == 8 && pcCU->getHeight(uiAbsPartIdx) == 8 ) )
@@ -713,31 +704,25 @@
         m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) );
         m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 2) );
-#if OL_DEPTHLIMIT
-	  if(pcCU->getPartDumpFlag())
-	  {
-		//if (!pcCU->getSlice()->isIntra())
-		{
-			pcCU->updatePartInfo(1,uiDepth); //2Nx2N here since we disable NxN in Inter
-			pcCU->incrementPartInfo();
-		}
-	  }
-#endif
-      }
-	  else
-	  {
-#if OL_DEPTHLIMIT
-	  if(pcCU->getPartDumpFlag())
-	  {
-		//if (!pcCU->getSlice()->isIntra())
-		{
-			pcCU->updatePartInfo(0,uiDepth); //2Nx2N here since we disable NxN in Inter
-			pcCU->incrementPartInfo();
-		}
-	  }
+#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;
     }
-    default:
+  default:
     {
       assert(0);
@@ -899,12 +884,12 @@
   assert( uiCtx < 3 );
   m_pcBinIf->encodeBin( uiCurrSplitFlag, m_cCUSplitFlagSCModel.get( 0, 0, uiCtx ) );
-#if OL_DEPTHLIMIT
+#if OL_DEPTHLIMIT_A0044
   if(pcCU->getPartDumpFlag())
   {
-	if(pcCU->getSlice()->isIntra() || (!pcCU->getSlice()->isIntra() && uiCurrSplitFlag!=0))
-	{
-	pcCU->updatePartInfo(uiCurrSplitFlag,uiDepth);
-	pcCU->incrementPartInfo();
-	}
+    if(pcCU->getSlice()->isIntra() || (!pcCU->getSlice()->isIntra() && uiCurrSplitFlag!=0))
+    {
+      pcCU->updatePartInfo(uiCurrSplitFlag,uiDepth);
+      pcCU->incrementPartInfo();
+    }
   }
 #endif
Index: /trunk/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 115)
+++ /trunk/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 116)
@@ -849,7 +849,7 @@
 #endif
 
-#if OL_DEPTHLIMIT //stop dumping partition information
-	b_dumpPartInfo = 0;
-	pcCU->setPartDumpFlag(b_dumpPartInfo);
+#if OL_DEPTHLIMIT_A0044 //stop dumping partition information
+    m_bDumpPartInfo = 0;
+    pcCU->setPartDumpFlag(m_bDumpPartInfo);
 #endif
 
@@ -1312,7 +1312,7 @@
 
     TComDataCU*& pcCU = rpcPic->getCU( uiCUAddr );    
-#if OL_DEPTHLIMIT
-	pcCU->setPartDumpFlag(b_dumpPartInfo);
-	pcCU->resetPartInfo();
+#if OL_DEPTHLIMIT_A0044
+    pcCU->setPartDumpFlag(m_bDumpPartInfo);
+    pcCU->resetPartInfo();
 #endif
 #if !REMOVE_TILE_DEPENDENCE
Index: /trunk/source/Lib/TLibEncoder/TEncSlice.h
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncSlice.h	(revision 115)
+++ /trunk/source/Lib/TLibEncoder/TEncSlice.h	(revision 116)
@@ -101,6 +101,6 @@
   
   UInt                    m_uiSliceIdx;
-#if OL_DEPTHLIMIT //flag to signal to start dumping
-  bool					  b_dumpPartInfo;
+#if OL_DEPTHLIMIT_A0044 //flag to signal to start dumping
+  Bool                    m_bDumpPartInfo;
 #endif
 public:
@@ -131,6 +131,6 @@
   UInt    getSliceIdx()         { return m_uiSliceIdx;                    }
   Void    setSliceIdx(UInt i)   { m_uiSliceIdx = i;                       }
-#if OL_DEPTHLIMIT //flag to signal to start dumping
-  Void	  setPartDumpFlag(bool flag)	{b_dumpPartInfo = flag;};
+#if OL_DEPTHLIMIT_A0044 //flag to signal to start dumping
+  Void    setPartDumpFlag(Bool flag) { m_bDumpPartInfo = flag;};
 #endif
 };
Index: /trunk/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncTop.cpp	(revision 115)
+++ /trunk/source/Lib/TLibEncoder/TEncTop.cpp	(revision 116)
@@ -768,5 +768,5 @@
   m_cSPS.setUseDMM( m_bUseDMM );
 #endif
-#if OL_DEPTHLIMIT
+#if OL_DEPTHLIMIT_A0044
   m_cSPS.setUseDPL( m_bDepthPartitionLimiting );
 #endif
