Index: branches/HTM-5.1-dev1-LG/CommonTestConditionsCfgs/baseCfg_2view+depth.cfg
===================================================================
--- branches/HTM-5.1-dev1-LG/CommonTestConditionsCfgs/baseCfg_2view+depth.cfg	(revision 252)
+++ branches/HTM-5.1-dev1-LG/CommonTestConditionsCfgs/baseCfg_2view+depth.cfg	(revision 253)
@@ -157,5 +157,5 @@
 SignHideFlag                   : 1                                 # sign hiding
 SignHideThreshold              : 4                                 # sign hiding threshold
-IlluCompEnable                 : 1                                 # illumination compensation (0: OFF, 1: ON)
+IlluCompEnable                 : 1 1                               # illumination compensation (0: OFF, 1: ON)
 
 #============ PCM ================
Index: branches/HTM-5.1-dev1-LG/CommonTestConditionsCfgs/baseCfg_3view+depth.cfg
===================================================================
--- branches/HTM-5.1-dev1-LG/CommonTestConditionsCfgs/baseCfg_3view+depth.cfg	(revision 252)
+++ branches/HTM-5.1-dev1-LG/CommonTestConditionsCfgs/baseCfg_3view+depth.cfg	(revision 253)
@@ -161,5 +161,5 @@
 SignHideFlag                   : 1                                 # sign hiding
 SignHideThreshold              : 4                                 # sign hiding threshold
-IlluCompEnable                 : 1                                 # illumination compensation (0: OFF, 1: ON)
+IlluCompEnable                 : 1 1                               # illumination compensation (0: OFF, 1: ON)
 
 #============ PCM ================
Index: branches/HTM-5.1-dev1-LG/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/HTM-5.1-dev1-LG/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 252)
+++ branches/HTM-5.1-dev1-LG/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 253)
@@ -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 DBL_CONTROL
@@ -1804,5 +1808,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
 
Index: branches/HTM-5.1-dev1-LG/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- branches/HTM-5.1-dev1-LG/source/App/TAppEncoder/TAppEncCfg.h	(revision 252)
+++ branches/HTM-5.1-dev1-LG/source/App/TAppEncoder/TAppEncCfg.h	(revision 253)
@@ -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 SAO_UNIT_INTERLEAVING
Index: branches/HTM-5.1-dev1-LG/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/HTM-5.1-dev1-LG/source/App/TAppEncoder/TAppEncTop.cpp	(revision 252)
+++ branches/HTM-5.1-dev1-LG/source/App/TAppEncoder/TAppEncTop.cpp	(revision 253)
@@ -315,5 +315,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 SAO_UNIT_INTERLEAVING
@@ -637,5 +641,9 @@
       m_acTEncDepthTopList[iViewIdx]->setUseSAO               ( m_abUseSAO[1]     );
 #if LGE_ILLUCOMP_B0045
+#if LGE_ILLUCOMP_DEPTH_C0046
+      m_acTEncDepthTopList[iViewIdx]->setUseIC                ( m_abUseIC[1] );
+#else
       m_acTEncDepthTopList[iViewIdx]->setUseIC                ( false     );
+#endif
 #endif
 #if SAO_UNIT_INTERLEAVING
Index: branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComDataCU.cpp	(revision 252)
+++ branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComDataCU.cpp	(revision 253)
@@ -3096,4 +3096,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)
 {
@@ -3124,4 +3178,5 @@
   return false;
 }
+#endif
 #endif
 
Index: branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComDataCU.h	(revision 252)
+++ branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComDataCU.h	(revision 253)
@@ -482,5 +482,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
 
Index: branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComPrediction.cpp	(revision 252)
+++ branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComPrediction.cpp	(revision 253)
@@ -786,6 +786,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 );
@@ -889,5 +896,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 )
@@ -941,4 +952,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
 }
 
@@ -1704,6 +1742,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;
Index: branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComPrediction.h
===================================================================
--- branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComPrediction.h	(revision 252)
+++ branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComPrediction.h	(revision 253)
@@ -90,5 +90,9 @@
 #if DEPTH_MAP_GENERATION
   Void xPredInterBi             ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap );
-  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
   Void xPredInterBi             ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight,                         TComYuv*& rpcYuvPred, Int iPartIdx          );
Index: branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComSlice.cpp	(revision 252)
+++ branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComSlice.cpp	(revision 253)
@@ -1382,5 +1382,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-dev1-LG/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TypeDef.h	(revision 252)
+++ branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TypeDef.h	(revision 253)
@@ -140,4 +140,6 @@
 #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
 #endif
 
Index: branches/HTM-5.1-dev1-LG/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/HTM-5.1-dev1-LG/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 252)
+++ branches/HTM-5.1-dev1-LG/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 253)
@@ -1927,5 +1927,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-dev1-LG/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- branches/HTM-5.1-dev1-LG/source/Lib/TLibDecoder/TDecCu.cpp	(revision 252)
+++ branches/HTM-5.1-dev1-LG/source/Lib/TLibDecoder/TDecCu.cpp	(revision 253)
@@ -370,4 +370,7 @@
         pcCU->setHeight( uiAbsPartIdx + ui, g_uiMaxCUHeight>>uhNewDepth );
       }
+#if LGE_ILLUCOMP_DEPTH_C0046
+      m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
+#endif
     }
     else
@@ -449,4 +452,8 @@
   
 #if LGE_ILLUCOMP_B0045
+#if LGE_ILLUCOMP_DEPTH_C0046
+  if( pcCU->getTextureModeDepth( uiAbsPartIdx ) != uiDepth )
+  {
+#endif
   m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
 #endif
@@ -456,4 +463,7 @@
   {
     m_pcEntropyDecoder->decodeResPredFlag    ( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 );
+  }
+#endif
+#if LGE_ILLUCOMP_DEPTH_C0046
   }
 #endif
@@ -476,5 +486,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 )
       {
Index: branches/HTM-5.1-dev1-LG/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- branches/HTM-5.1-dev1-LG/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 252)
+++ branches/HTM-5.1-dev1-LG/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 253)
@@ -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-dev1-LG/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/HTM-5.1-dev1-LG/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 252)
+++ branches/HTM-5.1-dev1-LG/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 253)
@@ -866,5 +866,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-dev1-LG/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- branches/HTM-5.1-dev1-LG/source/Lib/TLibEncoder/TEncCu.cpp	(revision 252)
+++ branches/HTM-5.1-dev1-LG/source/Lib/TLibEncoder/TEncCu.cpp	(revision 253)
@@ -498,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();
@@ -703,4 +707,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 );
@@ -840,4 +847,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   );
@@ -864,4 +874,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   );
@@ -907,4 +920,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 );
@@ -923,4 +939,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 );
@@ -950,4 +969,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 );
@@ -966,4 +988,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 );
@@ -995,4 +1020,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 );
@@ -1011,4 +1039,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 );
@@ -1033,4 +1064,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
@@ -1049,4 +1083,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
@@ -1194,8 +1231,17 @@
       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 );
         xCheckRDCostMvInheritance( rpcBestCU, rpcTempCU, uiDepth, true, false );
         rpcTempCU->initEstData( uiDepth, iQP );
+#if LGE_ILLUCOMP_DEPTH_C0046
+        }
+#endif
       }
 #endif
@@ -1754,4 +1800,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 );
@@ -1765,4 +1814,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 );
   }
@@ -1813,5 +1865,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
@@ -1844,5 +1900,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
@@ -2902,5 +2962,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
   }
@@ -2912,5 +2976,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-dev1-LG/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- branches/HTM-5.1-dev1-LG/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 252)
+++ branches/HTM-5.1-dev1-LG/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 253)
@@ -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-dev1-LG/source/Lib/TLibEncoder/TEncEntropy.h
===================================================================
--- branches/HTM-5.1-dev1-LG/source/Lib/TLibEncoder/TEncEntropy.h	(revision 252)
+++ branches/HTM-5.1-dev1-LG/source/Lib/TLibEncoder/TEncEntropy.h	(revision 253)
@@ -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-dev1-LG/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- branches/HTM-5.1-dev1-LG/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 252)
+++ branches/HTM-5.1-dev1-LG/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 253)
@@ -770,5 +770,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();
