Index: branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 712)
@@ -1396,5 +1396,9 @@
     }
 #if H_3D_IC
+#if SEC_ONLY_TEXTURE_IC_F0151
+    else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) && !pcSlice->getIsDepth())
+#else
     else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) )
+#endif
     {
       WRITE_FLAG( pcSlice->getApplyIC() ? 1 : 0, "slice_ic_enable_flag" );
Index: branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncCfg.h	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncCfg.h	(revision 712)
@@ -412,5 +412,7 @@
 #if H_3D_DIM
   Bool      m_useDMM;
+#if !SEC_DMM3_RBC_F0147
   Bool      m_useRBC;
+#endif
   Bool      m_useSDC;
   Bool      m_useDLT;
@@ -983,6 +985,8 @@
   Bool      getUseDMM                       ()        { return m_useDMM; }
   Void      setUseDMM                       ( Bool b) { m_useDMM = b;    }
+#if !SEC_DMM3_RBC_F0147
   Bool      getUseRBC                       ()        { return m_useRBC; }
   Void      setUseRBC                       ( Bool b) { m_useRBC = b;    }
+#endif
   Bool      getUseSDC                       ()        { return m_useSDC; }
   Void      setUseSDC                       ( Bool b) { m_useSDC = b;    }
Index: branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncCu.cpp	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncCu.cpp	(revision 712)
@@ -497,5 +497,9 @@
 #endif
 #if H_3D_IC
+#if SEC_ONLY_TEXTURE_IC_F0151
+  Bool bICEnabled = rpcTempCU->getSlice()->getViewIndex() && ( rpcTempCU->getSlice()->getSliceType() == P_SLICE || rpcTempCU->getSlice()->getSliceType() == B_SLICE ) && !rpcTempCU->getSlice()->getIsDepth();
+#else
   Bool bICEnabled = rpcTempCU->getSlice()->getViewIndex() && ( rpcTempCU->getSlice()->getSliceType() == P_SLICE || rpcTempCU->getSlice()->getSliceType() == B_SLICE );
+#endif
   bICEnabled = bICEnabled && rpcTempCU->getSlice()->getApplyIC();
 #endif
Index: branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 712)
@@ -160,5 +160,9 @@
 Void TEncEntropy::encodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
 {
+#if SEC_ONLY_TEXTURE_IC_F0151
+  if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() )
+#else
   if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) )
+#endif
   {
     return;
Index: branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 712)
@@ -95,5 +95,7 @@
 #if H_3D_DIM_DMM
 , m_cDmm1DataSCModel          ( 1,             1,               NUM_DMM1_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
+#if !SEC_DMM3_RBC_F0147
 , m_cDmm3DataSCModel          ( 1,             1,               NUM_DMM3_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -174,5 +176,7 @@
 #if H_3D_DIM_DMM
   m_cDmm1DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );
+#if !SEC_DMM3_RBC_F0147
   m_cDmm3DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA );
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -262,5 +266,7 @@
 #if H_3D_DIM_DMM
       curCost += m_cDmm1DataSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_DMM1_DATA );
+#if !SEC_DMM3_RBC_F0147
       curCost += m_cDmm3DataSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_DMM3_DATA );
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -331,5 +337,7 @@
 #if H_3D_DIM_DMM
   m_cDmm1DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );
+#if !SEC_DMM3_RBC_F0147
   m_cDmm3DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA );
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -518,4 +526,15 @@
 }
 
+#if QC_DIM_DELTADC_UNIFY_F0132
+Void TEncSbac::xCodeDimDeltaDC( Pel valDeltaDC, UInt uiNumSeg )
+{
+  xWriteExGolombLevel( UInt( abs( valDeltaDC ) - ( uiNumSeg > 1 ? 0 : 1 ) ), m_cDdcDataSCModel.get(0, 0, 0) );
+  if( valDeltaDC != 0 )
+  {
+    UInt uiSign = valDeltaDC > 0 ? 0 : 1;
+    m_pcBinIf->encodeBinEP( uiSign );
+  }
+}
+#else
 Void TEncSbac::xCodeDimDeltaDC( Pel valDeltaDC, UInt dimType )
 {
@@ -527,4 +546,5 @@
   }
 }
+#endif
 
 #if H_3D_DIM_DMM
@@ -537,4 +557,5 @@
 }
 
+#if !SEC_DMM3_RBC_F0147
 Void TEncSbac::xCodeDmm3WedgeIdx( UInt uiIntraIdx, Int iNumBit )
 {
@@ -544,4 +565,5 @@
   }
 }
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -1209,8 +1231,10 @@
       xCodeDmm1WedgeIdx( pcCU->getDmmWedgeTabIdx( dimType, absPartIdx ), g_dmm1TabIdxBits[pcCU->getIntraSizeIdx(absPartIdx)] );
     } break;
+#if !SEC_DMM3_RBC_F0147
   case( DMM3_IDX ):
     {
       xCodeDmm3WedgeIdx( pcCU->getDmm3IntraTabIdx( absPartIdx ), g_dmm3IntraTabIdxBits[pcCU->getIntraSizeIdx(absPartIdx)] );
     } break;
+#endif
   case( DMM4_IDX ): break;
 #endif
@@ -1225,5 +1249,5 @@
   }
 
-#if H_3D_DIM_SDC
+#if H_3D_DIM_SDC && !QC_DIM_DELTADC_UNIFY_F0132
   if( pcCU->getSDCFlag( absPartIdx ) )
   {
@@ -1238,6 +1262,41 @@
   {
 #endif
+#if QC_DIM_DELTADC_UNIFY_F0132
+    if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) )
+#else
     if( dimType < DIM_NUM_TYPE )
-    {
+#endif
+    {
+#if QC_DIM_DELTADC_UNIFY_F0132
+      UInt dimDeltaDC;
+      Pel  deltaDC;
+      UInt uiNumSegments = ( dir == PLANAR_IDX ) ? 1 : 2;
+      if( pcCU->getSDCFlag( absPartIdx ) )
+    {
+        if( uiNumSegments==1 )
+        {
+          dimDeltaDC = pcCU->getSDCSegmentDCOffset(0, absPartIdx) ? 1 : 0;
+        }
+        else
+        {
+          dimDeltaDC = ( pcCU->getSDCSegmentDCOffset(0, absPartIdx) || pcCU->getSDCSegmentDCOffset(1, absPartIdx) ) ? 1 : 0;
+        }
+      }
+      else
+      {
+        dimDeltaDC = isDimDeltaDC( dir );
+      }
+
+      m_pcBinIf->encodeBin( dimDeltaDC, m_cDdcFlagSCModel.get(0, 0, uiNumSegments-1) );
+
+      if( dimDeltaDC ) 
+      {
+        for( UInt segment = 0; segment < uiNumSegments; segment++ )
+        {
+          deltaDC = pcCU->getSDCFlag( absPartIdx ) ? pcCU->getSDCSegmentDCOffset(segment, absPartIdx) : pcCU->getDimDeltaDC( dimType, segment, absPartIdx );
+          xCodeDimDeltaDC( deltaDC, uiNumSegments );
+        }
+      }
+#else
       UInt dimDeltaDC = isDimDeltaDC( dir );
       m_pcBinIf->encodeBin( dimDeltaDC, m_cDdcFlagSCModel.get(0, 0, (RBC_IDX == dimType) ? 1 : 0) );
@@ -1249,6 +1308,7 @@
         }
       }
-    }
-#if H_3D_DIM_SDC
+#endif
+    }
+#if H_3D_DIM_SDC && !QC_DIM_DELTADC_UNIFY_F0132
   }
 #endif
@@ -1257,6 +1317,11 @@
 Void TEncSbac::codeIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx )
 {
+#if SEC_DMM3_RBC_F0147
+  UInt codeWordTable[3][7] =    {{0, 0, 0, 1, 0, 0, 0},{0, 2, 6, 14, 15, 0, 0},{0, 1, 0, 0, 0, 0, 0}};
+  UInt codeWordLenTable[3][7] = {{0, 1, 0, 1, 0, 0, 0},{1, 2, 3,  4,  4, 0, 0},{1, 1, 0, 0, 0, 0, 0}};
+#else
     UInt codeWordTable[3][7] =    {{0, 0, 0, 2, 0,6, 7},{0, 0, 2, 7, 3, 6, 2},{0, 1, 0, 0, 0, 0, 0}};
     UInt codeWordLenTable[3][7] = {{0, 1, 0, 2, 0,3, 3},{1, 1, 2, 3, 2, 3, 2},{1, 1, 0, 0, 0, 0, 0}};
+#endif
   UInt dir = pcCU->getLumaIntraDir( absPartIdx );
   UInt puIdx = (pcCU->getWidth(absPartIdx) == 64) ? 2 : ( (pcCU->getPartitionSize(absPartIdx) == SIZE_NxN && pcCU->getWidth(absPartIdx) == 8) ? 0 : 1 );
@@ -1273,6 +1338,8 @@
     case DMM1_IDX: codeIdx = 3; break;
     case DMM4_IDX: codeIdx = 4; break;
+#if !SEC_DMM3_RBC_F0147
     case DMM3_IDX: codeIdx = 5; break;
     case  RBC_IDX: codeIdx = 6; break;
+#endif
     default:                    break;
     }
@@ -1289,4 +1356,5 @@
   }
 #endif
+#if !SEC_DMM3_RBC_F0147 
   if( puIdx==1 )
   {
@@ -1300,4 +1368,5 @@
       }
   }
+#endif
   //mode coding
   for( UInt i = 0; i < codeWordLenTable[puIdx][codeIdx]; i++ )
Index: branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncSbac.h
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncSbac.h	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncSbac.h	(revision 712)
@@ -118,8 +118,14 @@
   #if H_3D_DIM
   Void  xWriteExGolombLevel  ( UInt uiSymbol, ContextModel& rcSCModel  );
+#if QC_DIM_DELTADC_UNIFY_F0132
+  Void  xCodeDimDeltaDC      ( Pel valDeltaDC, UInt uiNumSeg );
+#else
   Void  xCodeDimDeltaDC      ( Pel valDeltaDC, UInt dimType );
+#endif
 #if H_3D_DIM_DMM
   Void  xCodeDmm1WedgeIdx    ( UInt uiTabIdx, Int iNumBit );
+#if !SEC_DMM3_RBC_F0147
   Void  xCodeDmm3WedgeIdx    ( UInt uiIntraIdx, Int iNumBit );
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -253,5 +259,7 @@
 #if H_3D_DIM_DMM
   ContextModel3DBuffer m_cDmm1DataSCModel;
+#if !SEC_DMM3_RBC_F0147
   ContextModel3DBuffer m_cDmm3DataSCModel;
+#endif
 #endif
 #if H_3D_DIM_RBC
Index: branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 712)
@@ -1126,5 +1126,16 @@
       for( UInt uiX = 0; uiX < uiWidth; uiX++ )
       {
+#if LGE_PRED_RES_CODING_DLT_DOMAIN_F0159
+          if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getVPS()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) )
+          {
+              pResi[ uiX ] = pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pOrg[ uiX ] ) - pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] );
+          }
+          else
+          {
+              pResi[ uiX ] = pOrg[ uiX ] - pPred[ uiX ];
+          }
+#else
         pResi[ uiX ] = pOrg[ uiX ] - pPred[ uiX ];
+#endif
       }
       pOrg  += uiStride;
@@ -1190,5 +1201,16 @@
       for( UInt uiX = 0; uiX < uiWidth; uiX++ )
       {
+#if LGE_PRED_RES_CODING_DLT_DOMAIN_F0159
+          if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getVPS()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) )
+          {
+              pReco    [ uiX ] = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getVPS()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) );
+          }
+          else
+          {
+              pReco    [ uiX ] = ClipY( pPred[ uiX ] + pResi[ uiX ] );
+          }
+#else
         pReco    [ uiX ] = ClipY( pPred[ uiX ] + pResi[ uiX ] );
+#endif
         pRecQt   [ uiX ] = pReco[ uiX ];
         pRecIPred[ uiX ] = pReco[ uiX ];
@@ -2876,4 +2898,5 @@
               biSegmentation = &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]);
             } break;
+#if !SEC_DMM3_RBC_F0147
           case( DMM3_IDX ):
             {
@@ -2893,4 +2916,5 @@
               }
             } break;
+#endif
           case( DMM4_IDX ):
             {
@@ -2928,5 +2952,9 @@
         {
           Pel deltaDC1 = 0; Pel deltaDC2 = 0;
+#if QC_DIM_DELTADC_UNIFY_F0132
+          xSearchDmmDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, pcCU->getEdgePartition( uiPartOffset ), uiWidth, uiWidth, uiHeight, deltaDC1, deltaDC2 );
+#else
           xSearchRbcDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, pcCU->getEdgePartition( uiPartOffset ), uiWidth, uiWidth, uiHeight, deltaDC1, deltaDC2 );
+#endif
           pcCU->setDimDeltaDC( RBC_IDX, 0, uiPartOffset, deltaDC1 );
           pcCU->setDimDeltaDC( RBC_IDX, 1, uiPartOffset, deltaDC2 );
@@ -2975,5 +3003,9 @@
       Bool bTestZeroResi = false;
 #if H_3D_DIM_ENC
+#if LGE_BUGFIX_F0158
+      bTestZeroResi |= pcCU->getSlice()->getIsDepth() && !pcCU->getSlice()->isIRAP();
+#else
       bTestZeroResi |= pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->isIRAP();
+#endif
 #endif
 #if H_3D_DIM_SDC
@@ -7324,4 +7356,5 @@
 }
 
+#if !SEC_DMM3_RBC_F0147
 Void TEncSearch::xSearchDmm3Wedge( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, UInt& ruiIntraTabIdx, UInt colTexIntraDir )
 {
@@ -7360,5 +7393,5 @@
   cPredYuv.destroy();
 }
-
+#endif
 #endif
 #if H_3D_DIM_RBC
Index: branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncSearch.h
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncSearch.h	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncSearch.h	(revision 712)
@@ -351,5 +351,7 @@
   Void xSearchDmmDeltaDCs         ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piOrig, Pel* piPredic, UInt uiStride, Bool* biSegPattern, Int patternStride, UInt uiWidth, UInt uiHeight, Pel& rDeltaDC1, Pel& rDeltaDC2 );
   Void xSearchDmm1Wedge           ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx );
+#if !SEC_DMM3_RBC_F0147
   Void xSearchDmm3Wedge           ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, UInt& ruiIntraTabIdx, UInt colTexIntraDir );
+#endif
 #endif
 #if H_3D_DIM_RBC
