Index: /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TypeDef.h	(revision 652)
+++ /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TypeDef.h	(revision 653)
@@ -173,6 +173,4 @@
 #endif
 
-#endif // H_3D
-
 
 // Rate Control
@@ -180,4 +178,8 @@
 #define KWU_RC_VIEWRC_E0227               0  ///< JCT3V-E0227, view-wise target bitrate allocation
 #define KWU_RC_MADPRED_E0227              0  ///< JCT3V-E0227, inter-view MAD prediction
+
+#endif // H_3D
+
+
 
 /////////////////////////////////////////////////////////////////////////////////////////
Index: /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 652)
+++ /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 653)
@@ -730,4 +730,6 @@
 #endif
   //future extensions here..
+
+  return;
 }
 
Index: /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncCu.cpp	(revision 652)
+++ /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncCu.cpp	(revision 653)
@@ -272,6 +272,6 @@
 #if RATE_CONTROL_LAMBDA_DOMAIN
 #if !M0036_RC_IMPROVEMENT
+  m_addSADDepth      = 0;
   m_LCUPredictionSAD = 0;
-  m_addSADDepth      = 0;
   m_temporalSAD      = 0;
 #endif
@@ -1189,5 +1189,9 @@
 
     // further split
+#if H_3D_QTLPC
     if( bSubBranch && bTrySplitDQP && uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth )
+#else
+    if( bSubBranch && uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth )
+#endif
     {
 #if H_3D_VSO // M9
Index: /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 652)
+++ /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 653)
@@ -2355,5 +2355,8 @@
     iterPic++;
   }
-  
+
+#if !H_MV
+  assert( rpcPic != NULL );
+#endif
   assert (rpcPic->getPOC() == pocCurr);
   
Index: /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 652)
+++ /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 653)
@@ -7024,8 +7024,8 @@
 }
 
+#if H_3D_DIM
   // -------------------------------------------------------------------------------------------------------------------
   // Depth intra search
   // -------------------------------------------------------------------------------------------------------------------
-#if H_3D_DIM
 Void TEncSearch::xCalcBiSegDCs( Pel* ptrSrc, UInt srcStride, Bool* biSegPattern, Int patternStride, Pel& valDC1, Pel& valDC2 )
 {
Index: /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncSearch.h
===================================================================
--- /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncSearch.h	(revision 652)
+++ /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncSearch.h	(revision 653)
@@ -343,9 +343,8 @@
                                     UInt         stateU0V1Both2 );
 
-
+#if H_3D_DIM
   // -------------------------------------------------------------------------------------------------------------------
   // Depth intra search
   // -------------------------------------------------------------------------------------------------------------------
-#if H_3D_DIM
   Void xCalcBiSegDCs              ( Pel* ptrSrc, UInt srcStride, Bool* biSegPattern, Int patternStride, Pel& valDC1, Pel& valDC2 );
 #if H_3D_DIM_DMM
Index: /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncTop.cpp	(revision 652)
+++ /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncTop.cpp	(revision 653)
@@ -923,5 +923,16 @@
 #endif
   m_cPPS.setSignHideFlag(getSignHideFlag());
-  m_cPPS.setDeblockingFilterControlPresentFlag (m_DeblockingFilterControlPresent );
+  if ( getDeblockingFilterMetric() )
+  {
+    m_cPPS.setDeblockingFilterControlPresentFlag (true);
+    m_cPPS.setDeblockingFilterOverrideEnabledFlag(true);
+    m_cPPS.setPicDisableDeblockingFilterFlag(false);
+    m_cPPS.setDeblockingFilterBetaOffsetDiv2(0);
+    m_cPPS.setDeblockingFilterTcOffsetDiv2(0);
+  } 
+  else
+  {
+    m_cPPS.setDeblockingFilterControlPresentFlag (m_DeblockingFilterControlPresent );
+  }
   m_cPPS.setLog2ParallelMergeLevelMinus2   (m_log2ParallelMergeLevelMinus2 );
   m_cPPS.setCabacInitPresentFlag(CABAC_INIT_PRESENT_FLAG);
