Index: branches/HTM-5.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 284)
+++ branches/HTM-5.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 287)
@@ -340,5 +340,9 @@
   ("LoopFilterTcOffset_div2", m_loopFilterTcOffsetDiv2, 0 )
 #if LGE_ILLUCOMP_B0045
+#if LGE_ILLUCOMP_DEPTH_C0046
+  ("IlluCompEnable", m_abUseIC, std::vector<Bool>(2, true), "Enable illumination compensation for inter-view prediction")
+#else
   ("IlluCompEnable",                  m_bUseIC                  , true         , "Use illumination compensation for inter-view prediction" )
+#endif
 #endif
 #if INTER_VIEW_VECTOR_SCALING_C0115
@@ -1807,5 +1811,9 @@
 #endif
 #if LGE_ILLUCOMP_B0045
+#if LGE_ILLUCOMP_DEPTH_C0046
+  printf("IlluCompEnable: %d %d", m_abUseIC[0] ? 1 : 0, m_abUseIC[1] ? 1 : 0);
+#else
   printf("IlluCompEnable: %d ", m_bUseIC);
+#endif
 #endif
 #if INTER_VIEW_VECTOR_SCALING_C0115
Index: branches/HTM-5.1-dev0/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- branches/HTM-5.1-dev0/source/App/TAppEncoder/TAppEncCfg.h	(revision 284)
+++ branches/HTM-5.1-dev0/source/App/TAppEncoder/TAppEncCfg.h	(revision 287)
@@ -170,5 +170,9 @@
   vector<Bool> m_abUseSAO;
 #if LGE_ILLUCOMP_B0045
+#if LGE_ILLUCOMP_DEPTH_C0046
+  vector<Bool> m_abUseIC;                                    ///< flag for using illumination compensation for inter-view prediction
+#else
   Bool      m_bUseIC;                                     ///< flag for using illumination compensation for inter-view prediction
+#endif
 #endif
 #if INTER_VIEW_VECTOR_SCALING_C0115
Index: branches/HTM-5.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 284)
+++ branches/HTM-5.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 287)
@@ -318,5 +318,9 @@
     m_acTEncTopList[iViewIdx]->setUseSAO               ( m_abUseSAO[0]     );
 #if LGE_ILLUCOMP_B0045
+#if LGE_ILLUCOMP_DEPTH_C0046
+    m_acTEncTopList[iViewIdx]->setUseIC                ( m_abUseIC[0]      );
+#else
     m_acTEncTopList[iViewIdx]->setUseIC                ( m_bUseIC          );
+#endif
 #endif
 #if INTER_VIEW_VECTOR_SCALING_C0115
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/ContextTables.h
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/ContextTables.h	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/ContextTables.h	(revision 287)
@@ -153,5 +153,9 @@
 #define NUM_DMM_FLAG_CTX              1       ///< number of context models for DMM flag
 #define NUM_DMM_MODE_CTX              1       ///< number of context models for DMM mode
+#if LGE_DMM3_SIMP_C0044
+#define NUM_DMM_DATA_CTX              4       ///< number of context models for DMM data
+#else
 #define NUM_DMM_DATA_CTX              3       ///< number of context models for DMM data
+#endif
 #endif
 
@@ -1261,5 +1265,9 @@
 
 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
+#if FIX_DMM_CTX_INIT_C0034
+static const UChar
+#else
 static const Short
+#endif
 INIT_DMM_FLAG[3][NUM_DMM_FLAG_CTX] =
 {
@@ -1275,5 +1283,9 @@
 };
 
+#if FIX_DMM_CTX_INIT_C0034
+static const UChar
+#else
 static const Short
+#endif
 INIT_DMM_MODE[3][NUM_DMM_MODE_CTX] =
 {
@@ -1289,7 +1301,22 @@
 };
 
+#if FIX_DMM_CTX_INIT_C0034
+static const UChar
+#else
 static const Short
+#endif
 INIT_DMM_DATA[3][NUM_DMM_DATA_CTX] = 
 {
+#if LGE_DMM3_SIMP_C0044
+  {
+    CNU, CNU, CNU, CNU
+  },
+  {
+    CNU, CNU, CNU, CNU
+  },
+  {
+    CNU, CNU, CNU, CNU
+  }
+#else
   {
     CNU, CNU, CNU
@@ -1301,4 +1328,5 @@
     CNU, CNU, CNU
   }
+#endif
 };
 
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 287)
@@ -207,4 +207,7 @@
 #if HHI_DMM_PRED_TEX
   m_puiWedgePredTexTabIdx    = NULL;
+#if LGE_DMM3_SIMP_C0044
+  m_puiWedgePredTexIntraTabIdx = NULL;
+#endif
   m_piWedgePredTexDeltaDC1   = NULL;
   m_piWedgePredTexDeltaDC2   = NULL;
@@ -358,4 +361,7 @@
 #if HHI_DMM_PRED_TEX
     m_puiWedgePredTexTabIdx    = (UInt*)xMalloc(UInt, uiNumPartition);
+#if LGE_DMM3_SIMP_C0044
+    m_puiWedgePredTexIntraTabIdx    = (UInt*)xMalloc(UInt, uiNumPartition);
+#endif
     m_piWedgePredTexDeltaDC1   = (Int* )xMalloc(Int,  uiNumPartition);
     m_piWedgePredTexDeltaDC2   = (Int* )xMalloc(Int,  uiNumPartition);
@@ -486,4 +492,7 @@
 #if HHI_DMM_PRED_TEX
     if ( m_puiWedgePredTexTabIdx    ) { xFree(m_puiWedgePredTexTabIdx   ); m_puiWedgePredTexTabIdx    = NULL; }
+#if LGE_DMM3_SIMP_C0044
+    if ( m_puiWedgePredTexIntraTabIdx ) { xFree(m_puiWedgePredTexIntraTabIdx); m_puiWedgePredTexIntraTabIdx    = NULL; }
+#endif
     if ( m_piWedgePredTexDeltaDC1   ) { xFree(m_piWedgePredTexDeltaDC1  ); m_piWedgePredTexDeltaDC1   = NULL; }
     if ( m_piWedgePredTexDeltaDC2   ) { xFree(m_piWedgePredTexDeltaDC2  ); m_piWedgePredTexDeltaDC2   = NULL; }
@@ -702,4 +711,7 @@
 #if HHI_DMM_PRED_TEX
     memset( m_puiWedgePredTexTabIdx    + firstElement, 0, sizeof( UInt ) * numElements );
+#if LGE_DMM3_SIMP_C0044
+    memset( m_puiWedgePredTexIntraTabIdx + firstElement, 0, sizeof( UInt ) * numElements );
+#endif
     memset( m_piWedgePredTexDeltaDC1   + firstElement, 0, sizeof( Int  ) * numElements );
     memset( m_piWedgePredTexDeltaDC2   + firstElement, 0, sizeof( Int  ) * numElements );
@@ -890,4 +902,7 @@
 #if HHI_DMM_PRED_TEX
     m_puiWedgePredTexTabIdx   [ui] = 0;
+#if LGE_DMM3_SIMP_C0044
+    m_puiWedgePredTexIntraTabIdx [ui] = 0;
+#endif
     m_piWedgePredTexDeltaDC1  [ui] = 0;
     m_piWedgePredTexDeltaDC2  [ui] = 0;
@@ -1014,4 +1029,7 @@
 #if HHI_DMM_PRED_TEX
   memset( m_puiWedgePredTexTabIdx,    0, sizeof( UInt ) * m_uiNumPartition );
+#if LGE_DMM3_SIMP_C0044
+  memset( m_puiWedgePredTexIntraTabIdx, 0, sizeof( UInt ) * m_uiNumPartition );
+#endif
   memset( m_piWedgePredTexDeltaDC1,   0, sizeof( Int  ) * m_uiNumPartition );
   memset( m_piWedgePredTexDeltaDC2,   0, sizeof( Int  ) * m_uiNumPartition );
@@ -1088,4 +1106,7 @@
 #if HHI_DMM_PRED_TEX
       m_puiWedgePredTexTabIdx   [ui]=pcCU->getWedgePredTexTabIdx    (uiPartOffset+ui);
+#if LGE_DMM3_SIMP_C0044
+      m_puiWedgePredTexIntraTabIdx [ui]=pcCU->getWedgePredTexIntraTabIdx (uiPartOffset+ui);
+#endif
       m_piWedgePredTexDeltaDC1  [ui]=pcCU->getWedgePredTexDeltaDC1  (uiPartOffset+ui);
       m_piWedgePredTexDeltaDC2  [ui]=pcCU->getWedgePredTexDeltaDC2  (uiPartOffset+ui);
@@ -1292,4 +1313,7 @@
 #if HHI_DMM_PRED_TEX
   m_puiWedgePredTexTabIdx    = pcCU->getWedgePredTexTabIdx()     + uiPart;   
+#if LGE_DMM3_SIMP_C0044
+  m_puiWedgePredTexIntraTabIdx = pcCU->getWedgePredTexIntraTabIdx() + uiPart;   
+#endif
   m_piWedgePredTexDeltaDC1   = pcCU->getWedgePredTexDeltaDC1()   + uiPart;   
   m_piWedgePredTexDeltaDC2   = pcCU->getWedgePredTexDeltaDC2()   + uiPart;   
@@ -1483,4 +1507,7 @@
 #if HHI_DMM_PRED_TEX
   memcpy( m_puiWedgePredTexTabIdx    + uiOffset, pcCU->getWedgePredTexTabIdx(),     sizeof( UInt ) * uiNumPartition );
+#if LGE_DMM3_SIMP_C0044
+  memcpy( m_puiWedgePredTexIntraTabIdx + uiOffset, pcCU->getWedgePredTexIntraTabIdx(), sizeof( UInt ) * uiNumPartition );
+#endif
   memcpy( m_piWedgePredTexDeltaDC1   + uiOffset, pcCU->getWedgePredTexDeltaDC1(),   sizeof( Int  ) * uiNumPartition );
   memcpy( m_piWedgePredTexDeltaDC2   + uiOffset, pcCU->getWedgePredTexDeltaDC2(),   sizeof( Int  ) * uiNumPartition );
@@ -1615,4 +1642,7 @@
 #if HHI_DMM_PRED_TEX
   memcpy( rpcCU->getWedgePredTexTabIdx()     + m_uiAbsIdxInLCU, m_puiWedgePredTexTabIdx,    sizeof( UInt ) * m_uiNumPartition );
+#if LGE_DMM3_SIMP_C0044
+  memcpy( rpcCU->getWedgePredTexIntraTabIdx() + m_uiAbsIdxInLCU, m_puiWedgePredTexIntraTabIdx,    sizeof( UInt ) * m_uiNumPartition );
+#endif
   memcpy( rpcCU->getWedgePredTexDeltaDC1()   + m_uiAbsIdxInLCU, m_piWedgePredTexDeltaDC1,   sizeof( Int  ) * m_uiNumPartition );
   memcpy( rpcCU->getWedgePredTexDeltaDC2()   + m_uiAbsIdxInLCU, m_piWedgePredTexDeltaDC2,   sizeof( Int  ) * m_uiNumPartition );
@@ -1748,4 +1778,7 @@
 #if HHI_DMM_PRED_TEX
   memcpy( rpcCU->getWedgePredTexTabIdx()     + uiPartOffset, m_puiWedgePredTexTabIdx,    sizeof( UInt ) * uiQNumPart );
+#if LGE_DMM3_SIMP_C0044
+  memcpy( rpcCU->getWedgePredTexIntraTabIdx() + uiPartOffset, m_puiWedgePredTexIntraTabIdx, sizeof( UInt ) * uiQNumPart );
+#endif
   memcpy( rpcCU->getWedgePredTexDeltaDC1()   + uiPartOffset, m_piWedgePredTexDeltaDC1,   sizeof( Int  ) * uiQNumPart );
   memcpy( rpcCU->getWedgePredTexDeltaDC2()   + uiPartOffset, m_piWedgePredTexDeltaDC2,   sizeof( Int  ) * uiQNumPart );
@@ -3190,4 +3223,58 @@
 }
 
+#if LGE_ILLUCOMP_DEPTH_C0046
+//This modification is not needed after integrating JCT3V-C0137
+Bool TComDataCU::isICFlagRequired(UInt uiAbsPartIdx, UInt uiDepth)
+{
+  UInt uiPartAddr;
+  UInt iNumbPart;
+
+  if(!getSlice()->getIsDepth())
+  {
+    Int iWidth, iHeight;
+
+    iNumbPart = ( getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ? 1 : (getPartitionSize(uiAbsPartIdx) == SIZE_NxN ? 4 : 2) );
+
+    for(UInt i = 0; i < iNumbPart; i++)
+    {
+      getPartIndexAndSize(i, uiPartAddr, iWidth, iHeight, uiAbsPartIdx, true);
+      uiPartAddr += uiAbsPartIdx;
+
+      for(UInt uiRefIdx = 0; uiRefIdx < 2; uiRefIdx++)
+      {
+        RefPicList eRefList = uiRefIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
+        Int iBestRefIdx = getCUMvField(eRefList)->getRefIdx(uiPartAddr);
+
+        if((getInterDir(uiPartAddr) & (uiRefIdx+1)) && iBestRefIdx >= 0 && getSlice()->getViewId() != getSlice()->getRefViewId(eRefList, iBestRefIdx))
+        {
+          return true;
+        }
+      }
+    }
+  }
+  else
+  {
+    iNumbPart = getPic()->getNumPartInCU() >> (uiDepth << 1);
+
+    for(UInt i = 0; i < iNumbPart; i++)
+    {
+      uiPartAddr = uiAbsPartIdx + i;
+
+      for(UInt uiRefIdx = 0; uiRefIdx < 2; uiRefIdx++)
+      {
+        RefPicList eRefList = uiRefIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
+        Int iBestRefIdx = getCUMvField(eRefList)->getRefIdx(uiPartAddr);
+
+        if((getInterDir(uiPartAddr) & (uiRefIdx+1)) && iBestRefIdx >= 0 && getSlice()->getViewId() != getSlice()->getRefViewId(eRefList, iBestRefIdx))
+        {
+          return true;
+        }
+      }
+    }
+  }
+
+  return false;
+}
+#else
 Bool TComDataCU::isICFlagRequired(UInt uiAbsPartIdx)
 {
@@ -3211,9 +3298,12 @@
 
       if((getInterDir(uiPartAddr) & (uiRefIdx+1)) && iBestRefIdx >= 0 && getSlice()->getViewId() != getSlice()->getRefViewId(eRefList, iBestRefIdx))
+      {
         return true;
     }
   }
+  }
   return false;
 }
+#endif
 #endif
 
@@ -8925,4 +9015,16 @@
 }
 
+#if LGE_DMM3_SIMP_C0044
+Void TComDataCU::setWedgePredTexIntraTabIdxSubParts( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth )
+{
+  UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);
+
+  for ( UInt ui = 0; ui < uiCurrPartNumb; ui++ )
+  {
+    m_puiWedgePredTexIntraTabIdx[uiAbsPartIdx+ui] = uiTIdx;
+  }
+}
+#endif
+
 Void TComDataCU::setWedgePredTexDeltaDC1SubParts( Int iDC1, UInt uiAbsPartIdx, UInt uiDepth )
 {
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDataCU.h	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDataCU.h	(revision 287)
@@ -266,4 +266,7 @@
 #if HHI_DMM_PRED_TEX
   UInt*         m_puiWedgePredTexTabIdx;
+#if LGE_DMM3_SIMP_C0044
+  UInt*         m_puiWedgePredTexIntraTabIdx;
+#endif
   Int*          m_piWedgePredTexDeltaDC1;
   Int*          m_piWedgePredTexDeltaDC2;
@@ -500,5 +503,9 @@
   Void          setICFlag             ( UInt uiIdx, Bool  uh )  { m_pbICFlag[uiIdx] = uh;          }
   Void          setICFlagSubParts     ( Bool bICFlag,  UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
+#if LGE_ILLUCOMP_DEPTH_C0046
+  Bool          isICFlagRequired      (UInt uiAbsPartIdx, UInt uiDepth); //This modification is not needed after integrating JCT3V-C0137
+#else
   Bool          isICFlagRequired      (UInt uiAbsPartIdx);
+#endif
 #endif
 
@@ -838,4 +845,10 @@
   Void  setWedgePredTexTabIdx             ( UInt uiIdx, UInt uh ) { m_puiWedgePredTexTabIdx[uiIdx] = uh;      }
   Void  setWedgePredTexTabIdxSubParts     ( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth );
+#if LGE_DMM3_SIMP_C0044
+  UInt* getWedgePredTexIntraTabIdx             ()                      { return m_puiWedgePredTexIntraTabIdx;           }
+  UInt  getWedgePredTexIntraTabIdx             ( UInt uiIdx )          { return m_puiWedgePredTexIntraTabIdx[uiIdx];    }
+  Void  setWedgePredTexIntraTabIdx             ( UInt uiIdx, UInt uh ) { m_puiWedgePredTexIntraTabIdx[uiIdx] = uh;      }
+  Void  setWedgePredTexIntraTabIdxSubParts     ( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth );
+#endif 
   Int*  getWedgePredTexDeltaDC1           ()                      { return m_piWedgePredTexDeltaDC1;          }
   Int   getWedgePredTexDeltaDC1           ( UInt uiIdx )          { return m_piWedgePredTexDeltaDC1[uiIdx];   }
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp	(revision 287)
@@ -949,6 +949,13 @@
       UInt uiRShift = ( bi ? 14-g_uiBitDepth-g_uiBitIncrement : 0 );
       UInt uiOffset = bi ? IF_INTERNAL_OFFS : 0;
+#if LGE_ILLUCOMP_DEPTH_C0046
+    Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getRefViewId( eRefPicList, iRefIdx ) != pcCU->getSlice()->getViewId());
+#endif
 #if DEPTH_MAP_GENERATION
-      xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, 0, 0, rpcYuvPred, uiRShift, uiOffset );
+    xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, 0, 0, rpcYuvPred, uiRShift, uiOffset 
+#if LGE_ILLUCOMP_DEPTH_C0046
+        , bICFlag
+#endif
+        );
 #else
       xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, uiRShift, uiOffset );
@@ -1152,5 +1159,9 @@
 Void 
 #if DEPTH_MAP_GENERATION
-TComPrediction::xPredInterPrdDepthMap( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset )
+TComPrediction::xPredInterPrdDepthMap( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset 
+#if LGE_ILLUCOMP_DEPTH_C0046
+, Bool bICFlag
+#endif
+)
 #else
 TComPrediction::xPredInterPrdDepthMap( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset )
@@ -1204,4 +1215,31 @@
     }
   }
+
+#if LGE_ILLUCOMP_DEPTH_C0046
+  if(bICFlag)
+  {
+    Int a, b, iShift;
+    TComMv tTmpMV(pcMv->getHor()<<2, pcMv->getVer()<<2);
+
+    piRefY      = pcPicYuvRef->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr ) + iRefOffset;
+    piDstY      = rpcYuv->getLumaAddr( uiPartAddr );
+
+    xGetLLSICPrediction(pcCU, &tTmpMV, pcPicYuvRef, a, b, iShift);
+
+    for( Int y = 0; y < iHeight; y++, piDstY += iDstStride, piRefY += iRefStride )
+    {
+      for( Int x = 0; x < iWidth; x++ )
+      {
+        if(uiOffset)
+        {
+          Int iIFshift = IF_INTERNAL_PREC - ( g_uiBitDepth + g_uiBitIncrement );
+          piDstY[ x ] = ( (a*piDstY[ x ]+a*IF_INTERNAL_OFFS) >> iShift ) + b*(1<<iIFshift) - IF_INTERNAL_OFFS;
+        }
+        else
+          piDstY[ x ] = Clip( ( (a*piDstY[ x ]) >> iShift ) + b );
+      }
+    }
+  }
+#endif
 }
 
@@ -2339,6 +2377,11 @@
   iCUPelX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]];
   iCUPelY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]];
+#if FIX_LGE_ILLUCOMP_B0045
+  iRefX   = iCUPelX + (pMv->getHor() >> 2);
+  iRefY   = iCUPelY + (pMv->getVer() >> 2);
+#else
   iRefX   = iCUPelX + (pMv->getHor() >> 3);
   iRefY   = iCUPelY + (pMv->getVer() >> 3);
+#endif
   uiWidth = pcCU->getWidth(0) >> 1;
   uiHeight = pcCU->getHeight(0) >> 1;
@@ -2554,7 +2597,23 @@
   UInt  uiWedgeStride   = pcWedgelet->getStride();
 
+#if HS_REFERENCE_SUBSAMPLE_C0154
+  Int subSamplePix;
+  if ( pcWedgelet->getWidth() == 32 )
+  {
+    subSamplePix = 2;
+  }
+  else
+  {
+    subSamplePix = 1;
+  }
+#endif
+
   if( bAbove )
   {
+#if HS_REFERENCE_SUBSAMPLE_C0154
+    for( Int k = 0; k < pcWedgelet->getWidth(); k+=subSamplePix )
+#else
     for( Int k = 0; k < pcWedgelet->getWidth(); k++ )
+#endif
     {
       if( true == pabWedgePattern[k] )
@@ -2572,5 +2631,9 @@
   if( bLeft )
   {
+#if HS_REFERENCE_SUBSAMPLE_C0154
+    for( Int k = 0; k < pcWedgelet->getHeight(); k+=subSamplePix )
+#else
     for( Int k = 0; k < pcWedgelet->getHeight(); k++ )
+#endif
     {
       if( true == pabWedgePattern[k*uiWedgeStride] )
@@ -2751,5 +2814,43 @@
 }
 
+#if LGE_DMM3_SIMP_C0044
+/**
+ - fetch best Wedgelet pattern at decoder
+ */
+UInt TComPrediction::getBestWedgeFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt IntraTabIdx)
+{
+  assert( uiWidth >= DMM_WEDGEMODEL_MIN_SIZE && uiWidth <= DMM_WEDGEMODEL_MAX_SIZE );
+
+  UInt          uiBestTabIdx = 0;
+  TComPic*      pcPicTex = pcCU->getSlice()->getTexturePic();
+  TComDataCU*   pcColTexCU = pcPicTex->getCU(pcCU->getAddr());
+  UInt          uiTexPartIdx = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
+  Int           uiColTexIntraDir = pcColTexCU->isIntra( uiTexPartIdx ) ? pcColTexCU->getLumaIntraDir( uiTexPartIdx ) : 255;
+
+  std::vector< std::vector<UInt> > pauiWdgLstSz = g_aauiWdgLstM3[g_aucConvertToBit[uiWidth]];
+
+  if( uiColTexIntraDir > DC_IDX && uiColTexIntraDir < 35 )
+  {
+    std::vector<UInt>* pauiWdgLst = &pauiWdgLstSz[uiColTexIntraDir-2];
+    uiBestTabIdx    =   pauiWdgLst->at(IntraTabIdx);
+  }
+  else
+  {
+    WedgeNodeList* pacWedgeNodeList = &g_aacWedgeNodeLists[(g_aucConvertToBit[uiWidth])];
+    uiBestTabIdx = pacWedgeNodeList->at(IntraTabIdx).getPatternIdx();
+  }
+
+  return uiBestTabIdx;
+}
+#endif
+
+#if LGE_DMM3_SIMP_C0044
+/**
+ - calculate best Wedgelet pattern at encoder
+ */
+UInt TComPrediction::getBestWedgeFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Pel* piOrigi, UInt uiStride, UInt & ruiIntraTabIdx)
+#else
 UInt TComPrediction::getBestWedgeFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight )
+#endif
 {
   assert( uiWidth >= DMM_WEDGEMODEL_MIN_SIZE && uiWidth <= DMM_WEDGEMODEL_MAX_SIZE );
@@ -2779,5 +2880,7 @@
   Int  iDC2 = 0;
   WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])];
-
+#if LGE_DMM3_SIMP_C0044
+  ruiIntraTabIdx  = 0;
+#endif
 #if HHIQC_DMMFASTSEARCH_B0039
   TComPic*      pcPicTex = pcCU->getSlice()->getTexturePic();
@@ -2793,8 +2896,16 @@
     {
       UInt uiIdx     =   pauiWdgLst->at(uiIdxW);
+#if LGE_DMM3_SIMP_C0044
+      calcWedgeDCs       ( &(pacWedgeList->at(uiIdx)), piOrigi,   uiWidth,      iDC1, iDC2 );
+#else
       calcWedgeDCs       ( &(pacWedgeList->at(uiIdx)), piRefBlkY, uiWidth,      iDC1, iDC2 );
+#endif
       assignWedgeDCs2Pred( &(pacWedgeList->at(uiIdx)), piPred,    uiPredStride, iDC1, iDC2 );
 
+#if LGE_DMM3_SIMP_C0044
+      UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piOrigi, uiStride, uiWidth, uiHeight, WedgeDist_SAD );
+#else
       UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piRefBlkY, uiWidth, uiWidth, uiHeight, WedgeDist_SAD );
+#endif
 
       if( uiActDist < uiBestDist || uiBestDist == MAX_UINT )
@@ -2802,4 +2913,7 @@
         uiBestDist   = uiActDist;
         uiBestTabIdx = uiIdx;
+#if LGE_DMM3_SIMP_C0044
+        ruiIntraTabIdx = uiIdxW;
+#endif
       }
     }
@@ -2812,8 +2926,16 @@
     for( UInt uiNodeId = 0; uiNodeId < pacWedgeNodeList->size(); uiNodeId++ )
     {
+#if LGE_DMM3_SIMP_C0044
+      calcWedgeDCs       ( &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())), piOrigi, uiWidth,      iDC1, iDC2 );
+#else
       calcWedgeDCs       ( &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())), piRefBlkY, uiWidth,      iDC1, iDC2 );
+#endif
       assignWedgeDCs2Pred( &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())), piPred,    uiPredStride, iDC1, iDC2 );
 
+#if LGE_DMM3_SIMP_C0044
+      UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piOrigi, uiStride, uiWidth, uiHeight, WedgeDist_SAD );
+#else
       UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piRefBlkY, uiWidth, uiWidth, uiHeight, WedgeDist_SAD );
+#endif
 
       if( uiActDist < uiBestNodeDist || uiBestNodeDist == MAX_UINT )
@@ -2821,7 +2943,12 @@
         uiBestNodeDist = uiActDist;
         uiBestNodeId   = uiNodeId;
-      }
-    }
-
+#if LGE_DMM3_SIMP_C0044
+        ruiIntraTabIdx = uiNodeId;
+#endif
+      }
+    }
+#if LGE_DMM3_SIMP_C0044
+    uiBestTabIdx = pacWedgeNodeList->at(uiBestNodeId).getPatternIdx();
+#else
     // refinement
     uiBestDist   = uiBestNodeDist;
@@ -2843,4 +2970,5 @@
       }
     }
+#endif
   }
 #else
@@ -2897,5 +3025,11 @@
   {
     // decoder: get and store wedge pattern in CU
+      // decoder: get and store wedge pattern in CU
+#if LGE_DMM3_SIMP_C0044
+    UInt uiIntraTabIdx   = pcCU->getWedgePredTexIntraTabIdx ( uiAbsPartIdx );
+    uiTextureWedgeTabIdx = getBestWedgeFromTex( pcCU, uiAbsPartIdx, (UInt)iWidth, (UInt)iHeight, uiIntraTabIdx );
+#else
     uiTextureWedgeTabIdx = getBestWedgeFromTex( pcCU, uiAbsPartIdx, (UInt)iWidth, (UInt)iHeight );
+#endif
 
     UInt uiDepth = (pcCU->getDepth(0)) + (pcCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1);
@@ -2912,4 +3046,6 @@
   getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
 
+#if HHI_DMM_DELTADC_Q1_C0034
+#else
   if( bDelta ) 
   {
@@ -2917,4 +3053,5 @@
     xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
   }
+#endif
 
   // assign wedge pred DCs to prediction
@@ -2937,4 +3074,6 @@
   getWedgePredDCs( pcContourWedge, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
 
+#if HHI_DMM_DELTADC_Q1_C0034
+#else
   if( bDelta ) 
   {
@@ -2942,4 +3081,5 @@
     xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
   }
+#endif
 
   // assign wedge pred DCs to prediction
@@ -3118,4 +3258,6 @@
   getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
 
+#if HHI_DMM_DELTADC_Q1_C0034
+#else
   if( bDelta ) 
   {
@@ -3123,4 +3265,5 @@
     xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
   }
+#endif
 
   // assign wedge pred DCs to prediction
@@ -3159,4 +3302,6 @@
   getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
 
+#if HHI_DMM_DELTADC_Q1_C0034
+#else
   if( bDelta ) 
   {
@@ -3164,4 +3309,5 @@
     xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
   }
+#endif
 
   // assign wedge pred DCs to prediction
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComPrediction.h
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComPrediction.h	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComPrediction.h	(revision 287)
@@ -106,5 +106,9 @@
   Void xPredInterBi             ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap );
 #endif
-  Void xPredInterPrdDepthMap    ( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset );
+  Void xPredInterPrdDepthMap    ( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset 
+#if LGE_ILLUCOMP_DEPTH_C0046
+      , Bool bICFlag = false
+#endif
+      );
 #else
 #if MERL_VSP_C0152
@@ -218,5 +222,10 @@
 #if HHI_DMM_PRED_TEX
   Void  getBestContourFromTex   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, TComWedgelet* pcContourWedge );
+#if LGE_DMM3_SIMP_C0044
+  UInt  getBestWedgeFromTex     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Pel * piOrgi, UInt uiStride, UInt &ruiIntraTabIdx);//encoder
+  UInt  getBestWedgeFromTex     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt IntraTabIdx);//decoder
+#else 
   UInt  getBestWedgeFromTex     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight );
+#endif
   Void  copyTextureLumaBlock    ( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piDestBlockY, UInt uiWidth, UInt uiHeight );
 #endif
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComRom.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComRom.cpp	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComRom.cpp	(revision 287)
@@ -306,5 +306,9 @@
 
 #if RWTH_SDC_DLT_B0036
+#if SAIT_SDC_C0096
+UInt g_auiSDCPredModes[RWTH_SDC_NUM_PRED_MODES] = { DC_IDX, DMM_WEDGE_FULL_IDX, PLANAR_IDX };
+#else
 UInt g_auiSDCPredModes[RWTH_SDC_NUM_PRED_MODES] = { DC_IDX, DMM_WEDGE_FULL_IDX, DMM_WEDGE_PREDDIR_IDX, PLANAR_IDX };
+#endif
 #endif
 
@@ -587,4 +591,17 @@
 };
 
+#if LGE_DMM3_SIMP_C0044
+const UChar g_aucWedgeTexPredBitsListIdx[7] =
+{
+  0,   //   2x2
+  6,   //   4x4    
+  9,  //   8x8    
+  9,  //  16x16   
+  9,  //  32x32   
+  0,  //  64x64   
+  0    // 128x128  
+};
+#endif
+
 const UChar g_aucIntraSizeIdxToWedgeSize[7] =
 {
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComRom.h
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComRom.h	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComRom.h	(revision 287)
@@ -188,4 +188,7 @@
 extern const WedgeResolution g_aeWedgeResolutionList[5];
 extern const UChar           g_aucWedgeFullBitsListIdx[7];
+#if LGE_DMM3_SIMP_C0044
+extern const UChar           g_aucWedgeTexPredBitsListIdx[7];
+#endif
 extern const UChar           g_aucIntraSizeIdxToWedgeSize[7];
 
@@ -199,5 +202,9 @@
 
 #if RWTH_SDC_DLT_B0036
+#if SAIT_SDC_C0096
+#define RWTH_SDC_NUM_PRED_MODES 3
+#else
 #define RWTH_SDC_NUM_PRED_MODES 4
+#endif
 extern      UInt g_auiSDCPredModes[RWTH_SDC_NUM_PRED_MODES];
 #endif
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComSlice.cpp	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComSlice.cpp	(revision 287)
@@ -1408,5 +1408,9 @@
     Int iRefStride = pcRefPicYuvOrg->getStride();
     Int iSumOrgSAD = 0;
+#if LGE_ILLUCOMP_DEPTH_C0046
+    Double dThresholdOrgSAD = getIsDepth() ? 0.1 : 0.05;
+#else
     double dThresholdOrgSAD = 0.05;
+#endif
     // Histogram building - luminance
     for ( Int y = 0; y < iHeight; y++)
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 287)
@@ -71,4 +71,7 @@
 #define FIX_LGE_DVMCP_B0133               1
 
+// 3rd meeting
+#define FIX_DMM_CTX_INIT_C0034            1    // JCT3V-C0034 fix for wrong init type of DMM contexts (UChar instead of Short)
+#define FIX_SDC_ENC_C0143                 1    // JCT3V-C0143 fix for unnecessary encoder checks in case of SDC
 
 // FCO 
@@ -88,4 +91,12 @@
 #define RWTH_SDC_DLT_B0036                1   // JCT3V-B0036: Simplified Depth Coding + Depth Lookup Table
 #define HHIQC_DMMFASTSEARCH_B0039         1   // JCT3V-B0039: fast Wedgelet search for DMM modes 1 and 3
+#define HHI_DMM_DELTADC_Q1_C0034          1   // JCT3V-C0034: no quantization and fast encoder search for DMM delta DC values
+#if HHIQC_DMMFASTSEARCH_B0039 && HHI_DMM_PRED_TEX
+#define LGE_DMM3_SIMP_C0044               1
+#endif
+
+#if RWTH_SDC_DLT_B0036
+#define SAIT_SDC_C0096                    1   // JCT3V-C0096: Improved Simple Depth Coding(removal of DMM2 among four SDC modes(DC, Planar, DMM1 and DMM2))
+#endif
 
 ///// ***** INTERVIEW MOTION VECTOR PREDICTION *********
@@ -147,4 +158,9 @@
 #if LGE_ILLUCOMP_B0045
 #define LGE_ILLUCOMP_B0045_ENCSIMP        1
+#define FIX_LGE_ILLUCOMP_B0045            1
+#define LGE_ILLUCOMP_DEPTH_C0046          1   // JCT2-C0046 Apply illumination compensation to depth
+#if LGE_ILLUCOMP_DEPTH_C0046
+#define FIX_ILLUCOMP_DEPTH                1
+#endif
 #endif
 
@@ -154,4 +170,5 @@
 ///// ***** QUADTREE LIMITATION *********
 #define OL_QTLIMIT_PREDCODING_B0068       1    //JCT3V-B0068
+#define HHI_QTLPC_RAU_OFF_C0160           1   // JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units 
 
 ///// ***** OTHERS *********
@@ -161,4 +178,5 @@
 #define HHI_FULL_PEL_DEPTH_MAP_MV_ACC     1   // full-pel mv accuracy for depth maps
 #define VIDYO_VPS_INTEGRATION             1
+#define HHI_DEPTH_INTRA_SEARCH_RAU_C0160  1   // JCT3V-C0160 change 1: full Intra search in depth random access units 
 
 ///// ***** VSP *********
@@ -237,4 +255,5 @@
 #if RWTH_SDC_DLT_B0036
 #define Log2( n ) ( log((double)n) / log(2.0) )
+#define HS_REFERENCE_SUBSAMPLE_C0154      1
 #endif
 
Index: branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 287)
@@ -1934,5 +1934,9 @@
   {
     UInt uiCodeTmp = 0;
-    if ( rpcSlice->getSPS()->getViewId() && !rpcSlice->getSPS()->isDepth() )
+    if ( rpcSlice->getSPS()->getViewId() 
+#if !LGE_ILLUCOMP_DEPTH_C0046
+        && !rpcSlice->getSPS()->isDepth()
+#endif
+        )
     {
       READ_FLAG (uiCodeTmp, "applying IC flag");
Index: branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp	(revision 287)
@@ -375,4 +375,7 @@
         pcCU->setHeight( uiAbsPartIdx + ui, g_uiMaxCUHeight>>uhNewDepth );
       }
+#if LGE_ILLUCOMP_DEPTH_C0046
+      m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
+#endif
     }
     else
@@ -473,4 +476,8 @@
   
 #if LGE_ILLUCOMP_B0045
+#if LGE_ILLUCOMP_DEPTH_C0046 && HHI_MPI
+  if( pcCU->getTextureModeDepth( uiAbsPartIdx ) != uiDepth )
+  {
+#endif
   m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
 #endif
@@ -480,4 +487,7 @@
   {
     m_pcEntropyDecoder->decodeResPredFlag    ( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 );
+  }
+#endif
+#if LGE_ILLUCOMP_DEPTH_C0046 && HHI_MPI
   }
 #endif
@@ -505,5 +515,7 @@
         pcCU->setHeight( uiAbsPartIdx + ui, g_uiMaxCUHeight>>uhNewDepth );
       }
-
+#if LGE_ILLUCOMP_DEPTH_C0046
+      m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
+#endif
       if( ( ( uiDepth < pcCU->getDepth( uiAbsPartIdx ) ) && ( uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth ) ) || bBoundary )
       {
@@ -1418,5 +1430,28 @@
   Int iSumPix[2];
   memset(iSumPix, 0, sizeof(Int)*2);
-  
+#if HS_REFERENCE_SUBSAMPLE_C0154
+  Int subSamplePix;
+  if ( uiSize == 64 || uiSize == 32 )
+  {
+    subSamplePix = 2;
+  }
+  else
+  {
+    subSamplePix = 1;
+  }
+  for (Int y=0; y<uiSize; y+=subSamplePix)
+  {
+    for (Int x=0; x<uiSize; x+=subSamplePix)
+    {
+      UChar ucSegment = pMask?(UChar)pMask[x]:0;
+      assert( ucSegment < uiNumSegments );
+  
+      iSumDepth[ucSegment] += pOrig[x];
+      iSumPix[ucSegment]   += 1;
+    }
+    pOrig  += uiStride*subSamplePix;
+    pMask  += uiMaskStride*subSamplePix;
+  }
+#else
   for (Int y=0; y<uiSize; y++)
   {
@@ -1433,5 +1468,5 @@
     pMask  += uiMaskStride;
   }
-  
+#endif
   // compute mean for each segment
   for( UChar ucSeg = 0; ucSeg < uiNumSegments; ucSeg++ )
Index: branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 287)
@@ -72,5 +72,9 @@
   pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
 
-  if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0) || pcCU->getSlice()->getSPS()->isDepth())
+  if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0) 
+#if !LGE_ILLUCOMP_DEPTH_C0046
+      || pcCU->getSlice()->getSPS()->isDepth()
+#endif
+      )
   {
     return;
@@ -80,5 +84,9 @@
     return;
 
+#if LGE_ILLUCOMP_DEPTH_C0046
+  if(pcCU->isICFlagRequired(uiAbsPartIdx, uiDepth)) //This modification is not needed after integrating JCT3V-C0137
+#else
   if(pcCU->isICFlagRequired(uiAbsPartIdx))
+#endif
     m_pcEntropyDecoderIf->parseICFlag( pcCU, uiAbsPartIdx, uiDepth );
 }
Index: branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 287)
@@ -762,5 +762,10 @@
   Bool bIntraSliceDetect  = (pcCU->getSlice()->getSliceType() == I_SLICE);
 
+#if HHI_QTLPC_RAU_OFF_C0160
+  Bool rapPic     = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
+  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC())
+#else
   if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())
+#endif
   {
     TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
@@ -804,5 +809,10 @@
   Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE);
 
+#if HHI_QTLPC_RAU_OFF_C0160
+  Bool rapPic     = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
+  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC())
+#else
   if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())
+#endif
   {
     TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
@@ -970,4 +980,7 @@
 #if HHI_DMM_PRED_TEX
     if( intraPredMode == DMM_WEDGE_PREDTEX_D_IDX )     { xParseWedgePredTexDeltaInfo  ( pcCU, uiAbsPartIdx, uiDepth ); }
+#if LGE_DMM3_SIMP_C0044
+    if( intraPredMode == DMM_WEDGE_PREDTEX_IDX )       { xParseWedgePredTexInfo       ( pcCU, uiAbsPartIdx, uiDepth ); }
+#endif
     if( intraPredMode == DMM_CONTOUR_PREDTEX_D_IDX )   { xParseContourPredTexDeltaInfo( pcCU, uiAbsPartIdx, uiDepth ); }
 #endif
@@ -2412,6 +2425,36 @@
 #endif
 #if HHI_DMM_PRED_TEX
+#if LGE_DMM3_SIMP_C0044
+Void TDecSbac::xParseWedgePredTexInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
+{
+  Int iIntraIdx = pcCU->getIntraSizeIdx(uiAbsPartIdx);
+  Int iBits = g_aucWedgeTexPredBitsListIdx[iIntraIdx];
+
+  UInt uiSymbol, uiTabIdx = 0;
+  for ( Int i = 0; i < iBits; i++ )
+  {
+    m_pcTDecBinIf->decodeBin( uiSymbol, m_cDmmDataSCModel.get(0, 0, 3) );
+    uiTabIdx += ( uiSymbol && i == 0 ) ? 1 : 0;
+    uiTabIdx += ( uiSymbol && i == 1 ) ? 2 : 0;
+    uiTabIdx += ( uiSymbol && i == 2 ) ? 4 : 0;
+    uiTabIdx += ( uiSymbol && i == 3 ) ? 8 : 0;
+    uiTabIdx += ( uiSymbol && i == 4 ) ? 16 : 0;
+    uiTabIdx += ( uiSymbol && i == 5 ) ? 32 : 0;
+    uiTabIdx += ( uiSymbol && i == 6 ) ? 64 : 0;
+    uiTabIdx += ( uiSymbol && i == 7 ) ? 128 : 0;
+    uiTabIdx += ( uiSymbol && i == 8 ) ? 256 : 0;
+    uiTabIdx += ( uiSymbol && i == 9 ) ? 512 : 0;
+    uiTabIdx += ( uiSymbol && i == 10 ) ? 1024 : 0;
+  }
+
+  pcCU->setWedgePredTexIntraTabIdxSubParts( uiTabIdx, uiAbsPartIdx, uiDepth );
+}
+#endif
+
 Void TDecSbac::xParseWedgePredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
+#if LGE_DMM3_SIMP_C0044
+  xParseWedgePredTexInfo( pcCU, uiAbsPartIdx, uiDepth );
+#endif
   UInt uiDC1, uiDC2;
   xReadExGolombLevel( uiDC1, m_cDmmDataSCModel.get(0, 0, 1) );
Index: branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecSbac.h	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecSbac.h	(revision 287)
@@ -152,4 +152,7 @@
 #endif
 #if HHI_DMM_PRED_TEX
+#if LGE_DMM3_SIMP_C0044
+  Void xParseWedgePredTexInfo       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
+#endif
   Void xParseWedgePredTexDeltaInfo  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void xParseContourPredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
Index: branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 287)
@@ -869,5 +869,9 @@
   if (address==0)
   {
-    if( pcSlice->getSPS()->getViewId() && !pcSlice->getIsDepth() )
+    if( pcSlice->getSPS()->getViewId() 
+#if !LGE_ILLUCOMP_DEPTH_C0046
+        && !pcSlice->getIsDepth()
+#endif
+        )
     {
       WRITE_FLAG( pcSlice->getApplyIC() ? 1 : 0, "applying IC flag" );
Index: branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp	(revision 287)
@@ -458,4 +458,8 @@
   Bool  bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType() == I_SLICE);
 
+#if HHI_QTLPC_RAU_OFF_C0160
+  Bool rapPic     = (rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
+#endif
+
   Bool bTry2NxN = true;
   Bool bTryNx2N = true;
@@ -494,5 +498,9 @@
 
 #if LGE_ILLUCOMP_B0045
-  Bool bICEnabled = (!rpcTempCU->getSlice()->getIsDepth() && rpcTempCU->getSlice()->getViewId());
+  Bool bICEnabled = (
+#if !LGE_ILLUCOMP_DEPTH_C0046
+      !rpcTempCU->getSlice()->getIsDepth() && 
+#endif
+      rpcTempCU->getSlice()->getViewId());
 
   bICEnabled = bICEnabled && rpcTempCU->getSlice()->getApplyIC();
@@ -612,5 +620,10 @@
 #if OL_QTLIMIT_PREDCODING_B0068
       //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU
+
+#if HHI_QTLPC_RAU_OFF_C0160
+      if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC())
+#else
       if(depthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())
+#endif
       {
         TComDataCU* pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); //Corresponding texture LCU
@@ -699,4 +712,7 @@
             rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
 #endif
+#if FIX_LGE_ILLUCOMP_B0045
+            rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
+#endif
 #if HHI_INTERVIEW_SKIP
             xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec );
@@ -724,5 +740,10 @@
 
 #if OL_QTLIMIT_PREDCODING_B0068
+
+#if HHI_QTLPC_RAU_OFF_C0160
+      if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC())
+#else
       if(depthMapDetect && !bIntraSliceDetect  && sps->getUseQTLPC())
+#endif
       {
         bTrySplitDQP = bTrySplit;
@@ -836,4 +857,7 @@
                 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
 #endif
+#if FIX_LGE_ILLUCOMP_B0045
+                rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
+#endif
 #if HHI_INTERVIEW_SKIP
                 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFullyRenderedSec   );
@@ -860,4 +884,7 @@
                 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
 #endif
+#if FIX_LGE_ILLUCOMP_B0045
+                rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
+#endif
 #if HHI_INTERVIEW_SKIP
                 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxN, bFullyRenderedSec   );
@@ -903,4 +930,7 @@
                   rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
 #endif
+#if FIX_LGE_ILLUCOMP_B0045
+                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
+#endif
 #if HHI_INTERVIEW_SKIP
                   xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec );
@@ -919,4 +949,7 @@
                   rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
 #endif
+#if FIX_LGE_ILLUCOMP_B0045
+                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
+#endif
 #if HHI_INTERVIEW_SKIP
                   xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec );
@@ -946,4 +979,7 @@
                   rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
 #endif
+#if FIX_LGE_ILLUCOMP_B0045
+                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
+#endif
 #if HHI_INTERVIEW_SKIP
                   xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec, true );
@@ -962,4 +998,7 @@
                   rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
 #endif
+#if FIX_LGE_ILLUCOMP_B0045
+                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
+#endif
 #if HHI_INTERVIEW_SKIP
                   xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec, true );
@@ -991,4 +1030,7 @@
                   rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
 #endif
+#if FIX_LGE_ILLUCOMP_B0045
+                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
+#endif
 #if HHI_INTERVIEW_SKIP
                   xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec );
@@ -1007,4 +1049,7 @@
                   rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
 #endif
+#if FIX_LGE_ILLUCOMP_B0045
+                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
+#endif
 #if HHI_INTERVIEW_SKIP
                   xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec );
@@ -1029,4 +1074,7 @@
 #if HHI_INTER_VIEW_RESIDUAL_PRED
                   rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
+#endif
+#if FIX_LGE_ILLUCOMP_B0045
+                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
 #endif
 #if HHI_INTERVIEW_SKIP
@@ -1046,4 +1094,7 @@
                   rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
 #endif
+#if FIX_LGE_ILLUCOMP_B0045
+                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
+#endif
 #if HHI_INTERVIEW_SKIP
                   xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec, true );
@@ -1113,5 +1164,9 @@
 
       // do normal intra modes
-      if ( !bEarlySkip )
+      if ( !bEarlySkip 
+#if HHI_DEPTH_INTRA_SEARCH_RAU_C0160
+        || ((rpcBestCU->getSlice()->getIsDepth() == true) && (rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA))
+#endif
+        )
       {
         // speedup for inter frames
@@ -1120,10 +1175,18 @@
           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
+          rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0 
+#if HHI_DEPTH_INTRA_SEARCH_RAU_C0160
+          || ((rpcBestCU->getSlice()->getIsDepth() == true) && (rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA))
+#endif            
+          ) && !bFullyRenderedSec ) // avoid very complex intra if it is unlikely
 #else
         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     ) // avoid very complex intra if it is unlikely
+          rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0     
+#if HHI_DEPTH_INTRA_SEARCH_RAU_C0160
+          || ((rpcBestCU->getSlice()->getIsDepth() == true) && (rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA))
+#endif     
+          ) // avoid very complex intra if it is unlikely
 #endif
         {
@@ -1178,8 +1241,20 @@
       if( rpcBestCU->getSlice()->getSPS()->getUseMVI() && rpcBestCU->getSlice()->getSliceType() != I_SLICE )
       {
+#if LGE_ILLUCOMP_DEPTH_C0046
+        for(UInt uiICId = 0; uiICId < (bICEnabled ? 2 : 1); uiICId++)
+        {
+          Bool bICFlag = (uiICId ? true : false);
+          rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
+#endif
         xCheckRDCostMvInheritance( rpcBestCU, rpcTempCU, uiDepth, false, false );
         rpcTempCU->initEstData( uiDepth, iQP );
+#if FIX_ILLUCOMP_DEPTH
+        rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
+#endif
         xCheckRDCostMvInheritance( rpcBestCU, rpcTempCU, uiDepth, true, false );
         rpcTempCU->initEstData( uiDepth, iQP );
+#if LGE_ILLUCOMP_DEPTH_C0046
+        }
+#endif
       }
 #endif
@@ -1738,4 +1813,7 @@
     {
       m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 );
+#if LGE_ILLUCOMP_DEPTH_C0046
+      m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx, false, uiDepth );
+#endif
       finishCU(pcCU,uiAbsPartIdx,uiDepth);
       xRestoreDepthWidthHeight( pcCU );
@@ -1749,4 +1827,7 @@
     // prediction Info ( Intra : direction mode, Inter : Mv, reference idx )
     m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx );
+#if LGE_ILLUCOMP_DEPTH_C0046
+    m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx, false, uiDepth );
+#endif
     xRestoreDepthWidthHeight( pcCU );
   }
@@ -1797,5 +1878,9 @@
     m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 );
 #if LGE_ILLUCOMP_B0045
-    m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx );
+    m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx
+#if LGE_ILLUCOMP_DEPTH_C0046
+        , false, uiDepth
+#endif
+        );
 #endif
 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
@@ -1828,5 +1913,9 @@
   m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx );
 #if LGE_ILLUCOMP_B0045
-    m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx );
+    m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx
+#if LGE_ILLUCOMP_DEPTH_C0046
+        ,false, uiDepth
+#endif
+        );
 #endif
 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
@@ -2943,5 +3032,9 @@
     m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, 0, true );
 #if LGE_ILLUCOMP_B0045
-    m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
+    m_pcEntropyCoder->encodeICFlag( pcCU, 0, true
+#if LGE_ILLUCOMP_DEPTH_C0046
+        , uhDepth
+#endif
+        );
 #endif
   }
@@ -2953,5 +3046,9 @@
     m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
 #if LGE_ILLUCOMP_B0045
-    m_pcEntropyCoder->encodeICFlag( pcCU, 0,          true );
+    m_pcEntropyCoder->encodeICFlag( pcCU, 0,          true 
+#if LGE_ILLUCOMP_DEPTH_C0046
+        , uhDepth
+#endif
+        );
 #endif
   }
Index: branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 287)
@@ -170,7 +170,15 @@
 
 #if LGE_ILLUCOMP_B0045
-Void TEncEntropy::encodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
-{
-  if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0) || pcCU->getSlice()->getSPS()->isDepth())
+Void TEncEntropy::encodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD 
+#if LGE_ILLUCOMP_DEPTH_C0046
+    , UInt uiDepth
+#endif
+    )
+{
+  if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0)
+#if !LGE_ILLUCOMP_DEPTH_C0046
+      || pcCU->getSlice()->getSPS()->isDepth()
+#endif
+      )
   {
     return;
@@ -185,5 +193,9 @@
   }
 
-  if(pcCU->isICFlagRequired(uiAbsPartIdx))
+  if(pcCU->isICFlagRequired(uiAbsPartIdx
+#if LGE_ILLUCOMP_DEPTH_C0046
+      , uiDepth //This modification is not needed after integrating JCT3V-C0137
+#endif
+      ))
     m_pcEntropyCoderIf->codeICFlag( pcCU, uiAbsPartIdx );
 }
Index: branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncEntropy.h
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncEntropy.h	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncEntropy.h	(revision 287)
@@ -260,5 +260,9 @@
   Void encodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD = false );
 #if LGE_ILLUCOMP_B0045
-  Void encodeICFlag            ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
+  Void encodeICFlag            ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false 
+#if LGE_ILLUCOMP_DEPTH_C0046
+      , UInt uiDepth = 0
+#endif
+      );
 #endif
   Void encodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
Index: branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 287)
@@ -625,5 +625,10 @@
   Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE);
  
+#if HHI_QTLPC_RAU_OFF_C0160
+  Bool rapPic     = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
+  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())
+#else
   if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())
+#endif
   {
     TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
@@ -924,5 +929,10 @@
   Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE);
 
+#if HHI_QTLPC_RAU_OFF_C0160
+  Bool rapPic     = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
+  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())
+#else
   if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())
+#endif
   {
     TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
@@ -1086,4 +1096,7 @@
 
     if( uiDir == DMM_WEDGE_PREDTEX_D_IDX )     { xCodeWedgePredTexDeltaInfo  ( pcCU, uiAbsPartIdx ); }
+#if LGE_DMM3_SIMP_C0044
+    if( uiDir == DMM_WEDGE_PREDTEX_IDX )       { xCodeWedgePredTexInfo       ( pcCU, uiAbsPartIdx ); }
+#endif
     if( uiDir == DMM_CONTOUR_PREDTEX_D_IDX )   { xCodeContourPredTexDeltaInfo( pcCU, uiAbsPartIdx ); }
 #endif
@@ -2673,6 +2686,24 @@
 #endif
 #if HHI_DMM_PRED_TEX
+#if LGE_DMM3_SIMP_C0044
+Void TEncSbac::xCodeWedgePredTexInfo( TComDataCU* pcCU, UInt uiAbsPartIdx )
+{
+  Int iIntraIdx = pcCU->getIntraSizeIdx(uiAbsPartIdx);
+  Int iBits = g_aucWedgeTexPredBitsListIdx[iIntraIdx];
+
+  UInt uiTabIdx = pcCU->getWedgePredTexIntraTabIdx( uiAbsPartIdx );
+
+  for ( Int i = 0; i < iBits; i++ )
+  {
+    m_pcBinIf->encodeBin( ( uiTabIdx >> i ) & 1, m_cDmmDataSCModel.get(0, 0, 3) );
+  }
+}
+#endif
+
 Void TEncSbac::xCodeWedgePredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx )
 {
+#if LGE_DMM3_SIMP_C0044
+  xCodeWedgePredTexInfo( pcCU, uiAbsPartIdx );
+#endif
   Int iDeltaDC1 = pcCU->getWedgePredTexDeltaDC1( uiAbsPartIdx );
   Int iDeltaDC2 = pcCU->getWedgePredTexDeltaDC2( uiAbsPartIdx );
Index: branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSbac.h
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSbac.h	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSbac.h	(revision 287)
@@ -178,4 +178,7 @@
 #endif
 #if HHI_DMM_PRED_TEX
+#if LGE_DMM3_SIMP_C0044
+  Void  xCodeWedgePredTexInfo       ( TComDataCU* pcCU, UInt uiAbsPartIdx );
+#endif
   Void  xCodeWedgePredTexDeltaInfo  ( TComDataCU* pcCU, UInt uiAbsPartIdx );
   Void  xCodeContourPredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx );
Index: branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 287)
@@ -2253,5 +2253,11 @@
       Int  iTexDeltaDC1 = 0;
       Int  iTexDeltaDC2 = 0;
+#if LGE_DMM3_SIMP_C0044
+      UInt uiTexIntraIdx = 0;
+      findWedgeTexMinDist( pcCU, uiPartOffset, piOrg, piPred, uiStride, uiWidth, uiHeight, uiTexTabIdx, iTexDeltaDC1, iTexDeltaDC2, bAboveAvail, bLeftAvail, uiTexIntraIdx); 
+      pcCU->setWedgePredTexIntraTabIdxSubParts( uiTexIntraIdx, uiPartOffset, uiDepth + uiInitTrDepth );
+#else
       findWedgeTexMinDist( pcCU, uiPartOffset, piOrg, piPred, uiStride, uiWidth, uiHeight, uiTexTabIdx, iTexDeltaDC1, iTexDeltaDC2, bAboveAvail, bLeftAvail ); 
+#endif
       pcCU->setWedgePredTexTabIdxSubParts  ( uiTexTabIdx,  uiPartOffset, uiDepth + uiInitTrDepth );
       pcCU->setWedgePredTexDeltaDC1SubParts( iTexDeltaDC1, uiPartOffset, uiDepth + uiInitTrDepth );
@@ -2345,5 +2351,9 @@
       for( UInt uiSDC=0; uiSDC<=uiUseSDC; uiSDC++ )
       {
+#if FIX_SDC_ENC_C0143
+        for( UInt uiRes = 0; uiRes<=uiSDC; uiRes++ )
+#else
         for( UInt uiRes = 0; uiRes<=uiUseSDC; uiRes++ )
+#endif
         {
 #endif
@@ -4926,5 +4936,9 @@
     m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, 0, true );
 #if LGE_ILLUCOMP_B0045
-    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
+    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true
+#if FIX_ILLUCOMP_DEPTH
+      , pcCU->getDepth( 0 )
+#endif
+      );
 #endif
 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
@@ -6309,5 +6323,9 @@
     m_pcEntropyCoder->encodeMergeIndex(pcCU, 0, 0, true);
 #if LGE_ILLUCOMP_B0045
-    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
+    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true
+#if FIX_ILLUCOMP_DEPTH
+      , pcCU->getDepth( 0 )
+#endif
+      );
 #endif
 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
@@ -6332,5 +6350,9 @@
     m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
 #if LGE_ILLUCOMP_B0045
-    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
+    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true
+#if FIX_ILLUCOMP_DEPTH
+      , pcCU->getDepth( 0 )
+#endif
+      );
 #endif
 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
@@ -6671,6 +6693,9 @@
     Int iFullDeltaDC2 = riDeltaDC2;
 
+#if HHI_DMM_DELTADC_Q1_C0034
+#else
     xDeltaDCQuantScaleDown( pcCU, iFullDeltaDC1 );
     xDeltaDCQuantScaleDown( pcCU, iFullDeltaDC2 );
+#endif
 
     Dist uiBestDist     = RDO_DIST_MAX;
@@ -6685,4 +6710,152 @@
     uiDeltaDC2Max += (uiDeltaDC2Max>>1);
 
+#if HHI_DMM_DELTADC_Q1_C0034
+    // limit search range to [0, IBDI_MAX]
+    if( iFullDeltaDC1 <  0 && uiDeltaDC1Max >                abs(iPredDC1) ) { uiDeltaDC1Max =                abs(iPredDC1); }
+    if( iFullDeltaDC1 >= 0 && uiDeltaDC1Max > g_uiIBDI_MAX - abs(iPredDC1) ) { uiDeltaDC1Max = g_uiIBDI_MAX - abs(iPredDC1); }
+
+    if( iFullDeltaDC2 <  0 && uiDeltaDC2Max >                abs(iPredDC2) ) { uiDeltaDC2Max =                abs(iPredDC2); }
+    if( iFullDeltaDC2 >= 0 && uiDeltaDC2Max > g_uiIBDI_MAX - abs(iPredDC2) ) { uiDeltaDC2Max = g_uiIBDI_MAX - abs(iPredDC2); }
+
+    // init dist with original DCs
+    assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iDC1, iDC2 );
+
+    Dist uiOrgDist = RDO_DIST_MAX;
+#if SAIT_VSO_EST_A0033
+    if ( m_pcRdCost->getUseEstimatedVSD() )
+    {          
+      TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv();
+      TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
+      uiOrgDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight );
+#if LGE_WVSO_A0119
+      if ( m_pcRdCost->getUseWVSO() )
+      {    
+        Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
+        Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
+        Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
+        uiOrgDist = (iDWeight * iD + iVSDWeight * (Dist) uiOrgDist) / ( iDWeight + iVSDWeight);
+      }
+#endif // LGE_WVSO_A0119
+    }
+    else       
+#endif // SAIT_VSO_EST_A0033
+    {        
+      uiOrgDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride,  piOrig, uiStride, uiWidth, uiHeight, false, 0 );
+#if LGE_WVSO_A0119
+      if ( m_pcRdCost->getUseWVSO() )
+      {    
+        Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
+        Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
+        Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
+        uiOrgDist = (iDWeight * iD + iVSOWeight * (Dist) uiOrgDist) / ( iDWeight + iVSOWeight);
+      }
+#endif // LGE_WVSO_A0119
+    }
+    uiBestDist     = uiOrgDist;
+    uiBestQStepDC1 = abs(iFullDeltaDC1);
+    uiBestQStepDC2 = abs(iFullDeltaDC2);
+
+    // coarse search with step size 4
+    for( UInt uiQStepDC1 = 0; uiQStepDC1 < uiDeltaDC1Max; uiQStepDC1 += 4 )
+    {
+      Int iTestDC1 = Clip( iPredDC1 + ((Int)(uiQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1)) );
+      for( UInt uiQStepDC2 = 0; uiQStepDC2 < uiDeltaDC2Max; uiQStepDC2 += 4 )
+      {
+        Int iTestDC2 = Clip( iPredDC2 + ((Int)(uiQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1)) );
+
+        assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iTestDC1, iTestDC2 );
+
+        Dist uiAct4Dist = RDO_DIST_MAX;
+#if SAIT_VSO_EST_A0033
+        if ( m_pcRdCost->getUseEstimatedVSD() )
+        {          
+          TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv();
+          TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
+          uiAct4Dist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight );
+#if LGE_WVSO_A0119
+          if ( m_pcRdCost->getUseWVSO() )
+          {    
+            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
+            Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
+            Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
+            uiAct4Dist = (iDWeight * iD + iVSDWeight * (Dist) uiAct4Dist) / ( iDWeight + iVSDWeight);
+          }
+#endif // LGE_WVSO_A0119
+        }
+        else       
+#endif // SAIT_VSO_EST_A0033
+        {        
+          uiAct4Dist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride,  piOrig, uiStride, uiWidth, uiHeight, false, 0 );
+#if LGE_WVSO_A0119
+          if ( m_pcRdCost->getUseWVSO() )
+          {    
+            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
+            Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
+            Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
+            uiAct4Dist = (iDWeight * iD + iVSOWeight * (Dist) uiAct4Dist) / ( iDWeight + iVSOWeight);
+          }
+#endif // LGE_WVSO_A0119
+        }
+
+        if( uiAct4Dist < uiBestDist || uiBestDist == RDO_DIST_MAX )
+        {
+          uiBestDist     = uiAct4Dist;
+          uiBestQStepDC1 = uiQStepDC1;
+          uiBestQStepDC2 = uiQStepDC2;
+        }
+      }
+    }
+
+    // refinement +-3
+    for( UInt uiQStepDC1 = (UInt)max(0, ((Int)uiBestQStepDC1-3)); uiQStepDC1 <= (uiBestQStepDC1+3); uiQStepDC1++ )
+    {
+      Int iTestDC1 = Clip( iPredDC1 + ((Int)(uiQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1)) );
+      for( UInt uiQStepDC2 = (UInt)max(0, ((Int)uiBestQStepDC2-3)); uiQStepDC2 <= (uiBestQStepDC2+3); uiQStepDC2++ )
+      {
+        Int iTestDC2 = Clip( iPredDC2 + ((Int)(uiQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1)) );
+
+        assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iTestDC1, iTestDC2 );
+
+        Dist uiActDist = RDO_DIST_MAX;
+#if SAIT_VSO_EST_A0033
+        if ( m_pcRdCost->getUseEstimatedVSD() )
+        {          
+          TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv();
+          TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
+          uiActDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight );
+#if LGE_WVSO_A0119
+          if ( m_pcRdCost->getUseWVSO() )
+          {    
+            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
+            Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
+            Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
+            uiActDist = (iDWeight * iD + iVSDWeight * (Dist) uiActDist) / ( iDWeight + iVSDWeight);
+          }
+#endif // LGE_WVSO_A0119
+        }
+        else       
+#endif // SAIT_VSO_EST_A0033
+        {        
+          uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride,  piOrig, uiStride, uiWidth, uiHeight, false, 0 );
+#if LGE_WVSO_A0119
+          if ( m_pcRdCost->getUseWVSO() )
+          {    
+            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
+            Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
+            Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
+            uiActDist = (iDWeight * iD + iVSOWeight * (Dist) uiActDist) / ( iDWeight + iVSOWeight);
+          }
+#endif // LGE_WVSO_A0119
+        }
+
+        if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX )
+        {
+          uiBestDist     = uiActDist;
+          uiBestQStepDC1 = uiQStepDC1;
+          uiBestQStepDC2 = uiQStepDC2;
+        }
+      }
+    }
+#else
     for( UInt uiQStepDC1 = 1; uiQStepDC1 <= uiDeltaDC1Max; uiQStepDC1++  )
     {
@@ -6740,9 +6913,12 @@
       }
     }
-
+#endif
     iFullDeltaDC1 = (Int)(uiBestQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1);
     iFullDeltaDC2 = (Int)(uiBestQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1);
+#if HHI_DMM_DELTADC_Q1_C0034
+#else
     xDeltaDCQuantScaleUp( pcCU, iFullDeltaDC1 );
     xDeltaDCQuantScaleUp( pcCU, iFullDeltaDC2 );
+#endif
     riDeltaDC1 = iFullDeltaDC1;
     riDeltaDC2 = iFullDeltaDC2;
@@ -6750,6 +6926,9 @@
 #endif
 
+#if HHI_DMM_DELTADC_Q1_C0034
+#else
   xDeltaDCQuantScaleDown( pcCU, riDeltaDC1 );
   xDeltaDCQuantScaleDown( pcCU, riDeltaDC2 );
+#endif
 }
 #endif
@@ -7111,10 +7290,18 @@
                                       Int&         riDeltaDC2, 
                                       Bool         bAboveAvail, 
-                                      Bool         bLeftAvail )
+                                      Bool         bLeftAvail
+#if LGE_DMM3_SIMP_C0044
+                                      ,UInt&        ruiIntraTabIdx
+#endif
+                                      )
 {
   assert( uiWidth >= DMM_WEDGEMODEL_MIN_SIZE && uiWidth <= DMM_WEDGEMODEL_MAX_SIZE );
   WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])];
 
+#if LGE_DMM3_SIMP_C0044
+  ruiTabIdx = getBestWedgeFromTex( pcCU, uiAbsPtIdx, uiWidth, uiHeight, piOrig, uiStride, ruiIntraTabIdx );
+#else
   ruiTabIdx = getBestWedgeFromTex( pcCU, uiAbsPtIdx, uiWidth, uiHeight );
+#endif
 
   TComWedgelet* pcBestWedgelet = &(pacWedgeList->at(ruiTabIdx));
@@ -8261,5 +8448,29 @@
   Int iSumPix[2];
   memset(iSumPix, 0, sizeof(Int)*2);
-  
+#if HS_REFERENCE_SUBSAMPLE_C0154
+  Int subSamplePix;
+  if ( uiSize == 64 || uiSize == 32 )
+  {
+    subSamplePix = 2;
+  }
+  else
+  {
+    subSamplePix = 1;
+  }
+  for (Int y=0; y<uiSize; y+=subSamplePix)
+  {
+    for (Int x=0; x<uiSize; x+=subSamplePix)
+    {
+      UChar ucSegment = pMask?(UChar)pMask[x]:0;
+      assert( ucSegment < uiNumSegments );
+  
+      iSumDepth[ucSegment] += pOrig[x];
+      iSumPix[ucSegment]   += 1;
+    }
+
+    pOrig  += uiStride*subSamplePix;
+    pMask  += uiMaskStride*subSamplePix;
+  }
+#else
   for (Int y=0; y<uiSize; y++)
   {
@@ -8276,5 +8487,5 @@
     pMask  += uiMaskStride;
   }
-  
+#endif
   // compute mean for each segment
   for( UChar ucSeg = 0; ucSeg < uiNumSegments; ucSeg++ )
Index: branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSearch.h
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSearch.h	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSearch.h	(revision 287)
@@ -435,5 +435,9 @@
                                     Int&           riDeltaDC2,
                                     Bool           bAboveAvail,
-                                    Bool           bLeftAvail );
+                                    Bool           bLeftAvail
+#if LGE_DMM3_SIMP_C0044
+                                    ,UInt&         ruiIntraTabIdx
+#endif
+                                    );
   Void findContourPredTex         ( TComDataCU*    pcCU, 
                                     UInt           uiAbsPtIdx,
Index: branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 284)
+++ branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 287)
@@ -776,5 +776,9 @@
 
 #if LGE_ILLUCOMP_B0045
-  if (pcEncTop->getViewId() != 0 && !pcEncTop->isDepthCoder() && pcEncTop->getUseIC())   // DCP of ViewID 0 is not available
+  if (pcEncTop->getViewId() != 0 
+#if !LGE_ILLUCOMP_DEPTH_C0046
+      && !pcEncTop->isDepthCoder() 
+#endif
+      && pcEncTop->getUseIC())   // DCP of ViewID 0 is not available
   {
     pcSlice ->xSetApplyIC();
