Index: branches/HTM-8.2-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/HTM-8.2-dev0/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 711)
+++ branches/HTM-8.2-dev0/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 712)
@@ -378,5 +378,7 @@
 #if H_3D_DIM
   ("DMM",                   m_useDMM,           true,  "Depth intra model modes")
+#if !SEC_DMM3_RBC_F0147
   ("RBC",                   m_useRBC,           true,  "Region boundary chain mode")
+#endif
   ("SDC",                   m_useSDC,           true,  "Simplified depth coding")
   ("DLT",                   m_useDLT,           true,  "Depth lookup table")
@@ -509,5 +511,9 @@
 #endif
 #if H_3D_IC
+#if SEC_ONLY_TEXTURE_IC_F0151
+  ("IlluCompEnable",           m_abUseIC, true, "Enable illumination compensation")
+#else
   ("IlluCompEnable",           m_abUseIC, std::vector<Bool>(2, true), "Enable illumination compensation")
+#endif
 #endif
 #if H_3D_INTER_SDC
@@ -2431,5 +2437,9 @@
 #endif
 #if H_3D_IC
+#if SEC_ONLY_TEXTURE_IC_F0151
+  printf( "IlluCompEnable: %d ", m_abUseIC);
+#else
   printf( "IlluCompEnable: %d %d ", m_abUseIC[0] ? 1 : 0, m_abUseIC[1] ? 1 : 0 );
+#endif
 #endif
 #if H_3D_NBDV_REF
@@ -2444,5 +2454,7 @@
 #if H_3D_DIM
   printf("DMM:%d ", m_useDMM );
+#if !SEC_DMM3_RBC_F0147
   printf("RBC:%d ", m_useRBC );
+#endif
   printf("SDC:%d ", m_useSDC );
   printf("DLT:%d ", m_useDLT );
Index: branches/HTM-8.2-dev0/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- branches/HTM-8.2-dev0/source/App/TAppEncoder/TAppEncCfg.h	(revision 711)
+++ branches/HTM-8.2-dev0/source/App/TAppEncoder/TAppEncCfg.h	(revision 712)
@@ -126,5 +126,9 @@
 #endif
 #if H_3D_IC
+#if SEC_ONLY_TEXTURE_IC_F0151
+  Bool   m_abUseIC;
+#else
   vector<Bool> m_abUseIC;                                    ///< flag for using illumination compensation for inter-view prediction
+#endif
 #endif
 #if H_3D_NBDV_REF
@@ -465,5 +469,7 @@
 #if H_3D_DIM
   Bool      m_useDMM;                                        ///< flag for using DMM
+#if !SEC_DMM3_RBC_F0147
   Bool      m_useRBC;                                        ///< flag for using RBC
+#endif
   Bool      m_useSDC;                                        ///< flag for using SDC
   Bool      m_useDLT;                                        ///< flag for using DLT
Index: branches/HTM-8.2-dev0/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/HTM-8.2-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 711)
+++ branches/HTM-8.2-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 712)
@@ -184,10 +184,16 @@
 #endif
 #if H_3D_IC
+#if SEC_ONLY_TEXTURE_IC_F0151
+    m_cTEncTop.setUseIC                        ( vps.getViewIndex( layerId ) == 0 || isDepth ? false : m_abUseIC );
+#else
     m_cTEncTop.setUseIC                        ( vps.getViewIndex( layerId ) == 0 ? false : m_abUseIC[isDepth ? 1 : 0] );
+#endif
 #endif
   //========== Depth intra modes ==========
 #if H_3D_DIM
     m_cTEncTop.setUseDMM                       ( isDepth ? m_useDMM               : false );
+#if !SEC_DMM3_RBC_F0147
     m_cTEncTop.setUseRBC                       ( isDepth ? m_useRBC               : false );
+#endif
     m_cTEncTop.setUseSDC                       ( isDepth ? m_useSDC               : false );
     m_cTEncTop.setUseDLT                       ( isDepth ? m_useDLT               : false );
@@ -1651,5 +1657,9 @@
 
 #if H_3D_DIM
+#if SEC_DMM3_RBC_F0147
+    vps.setVpsDepthModesFlag( layer, isDepth && !isLayerZero && (m_useDMM || m_useSDC || m_useDLT ) );
+#else
     vps.setVpsDepthModesFlag( layer, isDepth && !isLayerZero && (m_useDMM || m_useRBC || m_useSDC || m_useDLT ) );
+#endif
 #if H_3D_DIM_DLT
     vps.setUseDLTFlag( layer , isDepth && m_useDLT );
Index: branches/HTM-8.2-dev0/source/Lib/TLibCommon/ContextTables.h
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibCommon/ContextTables.h	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibCommon/ContextTables.h	(revision 712)
@@ -109,8 +109,14 @@
 #define NUM_DEPTH_INTRA_MODE_CTX      8       ///< number of context models for depth intra modes
 #define NUM_DDC_FLAG_CTX              2       ///< number of context models for deltaDC flag (DMM or RBC)
+#if QC_DIM_DELTADC_UNIFY_F0132
+#define NUM_DDC_DATA_CTX              1       ///< number of context models for deltaDC data (DMM or RBC)
+#else
 #define NUM_DDC_DATA_CTX              2       ///< number of context models for deltaDC data (DMM or RBC)
+#endif
 #if H_3D_DIM_DMM
 #define NUM_DMM1_DATA_CTX             1       ///< number of context models for DMM1 data
+#if !SEC_DMM3_RBC_F0147
 #define NUM_DMM3_DATA_CTX             1       ///< number of context models for DMM3 data
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -387,7 +393,13 @@
 INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] =  
 {
+#if LGE_IC_CTX_F0160
+    { 154,  154,  154, },
+    { 154,  154,  154, },
+    { 154,  154,  154, },
+#else
   { CNU,  CNU,  CNU, }, 
   { 197,  185,  201, }, 
   { 197,  185,  201, }, 
+#endif
 };
 #endif
@@ -411,7 +423,13 @@
 INIT_DDC_DATA[3][NUM_DDC_DATA_CTX] = 
 {
+#if QC_DIM_DELTADC_UNIFY_F0132
+  { 154 }, 
+  { 154 }, 
+  { 154 }, 
+#else
   { CNU, CNU }, 
   { CNU, CNU }, 
   { CNU, CNU }, 
+#endif
 };
 #if H_3D_DIM_DMM
@@ -423,4 +441,5 @@
   { CNU }, 
 };
+#if !SEC_DMM3_RBC_F0147
 static const UChar
 INIT_DMM3_DATA[3][NUM_DMM3_DATA_CTX] = 
@@ -430,4 +449,5 @@
   { CNU }, 
 };
+#endif
 #endif
 #if H_3D_DIM_RBC
Index: branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 712)
@@ -120,5 +120,7 @@
     m_dmmWedgeTabIdx[i] = NULL;
   }
+#if !SEC_DMM3_RBC_F0147
   m_dmm3IntraTabIdx = NULL;
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -271,5 +273,7 @@
       m_dmmWedgeTabIdx[i]    = (UInt*)xMalloc(UInt, uiNumPartition);
     }
+#if !SEC_DMM3_RBC_F0147
     m_dmm3IntraTabIdx = (UInt*)xMalloc(UInt, uiNumPartition);
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -404,5 +408,7 @@
       if ( m_dmmWedgeTabIdx[i] ) { xFree( m_dmmWedgeTabIdx[i] ); m_dmmWedgeTabIdx[i] = NULL; }
     }
+#if !SEC_DMM3_RBC_F0147
     if ( m_dmm3IntraTabIdx ) { xFree( m_dmm3IntraTabIdx ); m_dmm3IntraTabIdx = NULL; }
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -622,5 +628,7 @@
       memset( m_dmmWedgeTabIdx[i] + firstElement, 0,                      numElements * sizeof( *m_dmmWedgeTabIdx[i] ) );
     }
+#if !SEC_DMM3_RBC_F0147
     memset( m_dmm3IntraTabIdx   + firstElement, 0,                        numElements * sizeof( *m_dmm3IntraTabIdx ) );
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -799,5 +807,7 @@
         m_dmmWedgeTabIdx[i] [ui] = 0;
       }
+#if !SEC_DMM3_RBC_F0147
       m_dmm3IntraTabIdx [ui] = 0;
+#endif
 #endif
 #if H_3D_DIM_SDC
@@ -910,5 +920,7 @@
     memset( m_dmmWedgeTabIdx[i], 0, sizeof(UInt) * m_uiNumPartition );
   }
+#if !SEC_DMM3_RBC_F0147
   memset( m_dmm3IntraTabIdx, 0, sizeof(UInt) * m_uiNumPartition );
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -992,5 +1004,7 @@
         m_dmmWedgeTabIdx[i] [ui] = pcCU->m_dmmWedgeTabIdx[i] [uiPartOffset+ui];
       }
+#if !SEC_DMM3_RBC_F0147
       m_dmm3IntraTabIdx [ui] = pcCU->m_dmm3IntraTabIdx[uiPartOffset+ui];
+#endif
 #endif
 #if H_3D_DIM_SDC
@@ -1146,5 +1160,7 @@
     m_dmmWedgeTabIdx[i] = pcCU->getDmmWedgeTabIdx( i ) + uiPart;
   }
+#if !SEC_DMM3_RBC_F0147
   m_dmm3IntraTabIdx = pcCU->getDmm3IntraTabIdx() + uiPart;
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -1342,5 +1358,7 @@
     memcpy( m_dmmWedgeTabIdx[i] + uiOffset, pcCU->getDmmWedgeTabIdx( i ), sizeof(UInt) * uiNumPartition );
   }
+#if !SEC_DMM3_RBC_F0147
   memcpy( m_dmm3IntraTabIdx + uiOffset, pcCU->getDmm3IntraTabIdx(), sizeof(UInt) * uiNumPartition );
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -1469,5 +1487,7 @@
     memcpy( rpcCU->getDmmWedgeTabIdx( i ) + m_uiAbsIdxInLCU, m_dmmWedgeTabIdx[i], sizeof(UInt) * m_uiNumPartition );
   }
+#if !SEC_DMM3_RBC_F0147
   memcpy( rpcCU->getDmm3IntraTabIdx() + m_uiAbsIdxInLCU, m_dmm3IntraTabIdx, sizeof(UInt) * m_uiNumPartition );
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -1582,5 +1602,7 @@
     memcpy( rpcCU->getDmmWedgeTabIdx( i ) + uiPartOffset, m_dmmWedgeTabIdx[i], sizeof(UInt) * uiQNumPart );
   }
+#if !SEC_DMM3_RBC_F0147
   memcpy( rpcCU->getDmm3IntraTabIdx() + uiPartOffset, m_dmm3IntraTabIdx, sizeof(UInt) * uiQNumPart );
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -2313,4 +2335,15 @@
 {
   UInt        uiCtx = 0;
+
+#if LGE_IC_CTX_F0160
+  TComDataCU* pcTempCU = NULL;
+  UInt        uiTempPartIdx = 0;
+
+  pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
+  uiCtx    = ( pcTempCU ) ? pcTempCU->isIC( uiTempPartIdx ) : 0;
+
+  pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
+  uiCtx    += ( pcTempCU ) ? pcTempCU->isIC( uiTempPartIdx ) : 0;
+#endif
 
   return uiCtx;
@@ -6647,4 +6680,15 @@
 }
 
+#if LGE_IC_CTX_F0160
+Bool TComDataCU::isIC( UInt uiPartIdx )
+{
+    if ( m_pcSlice->isIntra () )
+    {
+        return false;
+    }
+    return ( ( getSkipFlag(uiPartIdx) || getPredictionMode(uiPartIdx) == MODE_INTER) && getICFlag( uiPartIdx ) && isICFlagRequired( uiPartIdx ) );
+}
+#endif
+
 // ====================================================================================================================
 // Protected member functions
@@ -8304,4 +8348,5 @@
   for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmmWedgeTabIdx[dmmType][uiAbsPartIdx+ui] = tabIdx; }
 }
+#if !SEC_DMM3_RBC_F0147
 Void  TComDataCU::setDmm3IntraTabIdxSubParts( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth )
 {
@@ -8309,4 +8354,5 @@
   for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmm3IntraTabIdx[uiAbsPartIdx+ui] = uiTIdx; }
 }
+#endif
 #endif
 #if H_3D_DIM_RBC
Index: branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComDataCU.h	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComDataCU.h	(revision 712)
@@ -208,5 +208,7 @@
 #if H_3D_DIM_DMM
   UInt*         m_dmmWedgeTabIdx[DMM_NUM_TYPE]; 
+#if !SEC_DMM3_RBC_F0147
   UInt*         m_dmm3IntraTabIdx;
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -570,8 +572,10 @@
   Void  setDmmWedgeTabIdxSubParts     ( UInt tabIdx, UInt dmmType, UInt uiAbsPartIdx, UInt uiDepth );
 
+#if !SEC_DMM3_RBC_F0147
   UInt* getDmm3IntraTabIdx            ()                      { return m_dmm3IntraTabIdx;        }
   UInt  getDmm3IntraTabIdx            ( UInt uiIdx )          { return m_dmm3IntraTabIdx[uiIdx]; }
   Void  setDmm3IntraTabIdx            ( UInt uiIdx, UInt uh ) { m_dmm3IntraTabIdx[uiIdx] = uh;   }
   Void  setDmm3IntraTabIdxSubParts    ( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth );
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -725,4 +729,8 @@
   Bool          isSkipped ( UInt uiPartIdx );                                                     ///< SKIP (no residual)
   Bool          isBipredRestriction( UInt puIdx );
+
+#if LGE_IC_CTX_F0160
+  Bool          isIC      ( UInt uiPartIdx );
+#endif
 
   // -------------------------------------------------------------------------------------------------------------------
Index: branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp	(revision 712)
@@ -425,5 +425,7 @@
   Bool dimDeltaDC = isDimDeltaDC( uiIntraMode );    
   Bool isDmmMode  = (dimType <  DMM_NUM_TYPE);
+#if !SEC_DMM3_RBC_F0147
   Bool isRbcMode  = (dimType == RBC_IDX);
+#endif
 
   Bool* biSegPattern  = NULL;
@@ -441,4 +443,5 @@
         dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]);
       } break;
+#if !SEC_DMM3_RBC_F0147
     case( DMM3_IDX ): 
       {
@@ -452,4 +455,5 @@
         dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ uiTabIdx ]);
       } break;
+#endif
     case( DMM4_IDX ): 
       {
@@ -475,6 +479,10 @@
   assert( biSegPattern );
   Int* piMask = NULL;
+#if QC_DIM_DELTADC_UNIFY_F0132 || HHI_DIM_PREDSAMP_FIX_F0171
+  piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt ); // no filtering
+#else
   if( isDmmMode ) piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt ); // no filtering for DMM
   else            piMask = pcCU->getPattern()->getPredictorPtr( 0, g_aucConvertToBit[ iWidth ] + 2, m_piYuvExt );
+#endif
   assert( piMask );
   Int maskStride = 2*iWidth + 1;  
@@ -491,5 +499,9 @@
     Pel deltaDC2 = pcCU->getDimDeltaDC( dimType, 1, uiAbsPartIdx );
 #if H_3D_DIM_DMM
+#if QC_DIM_DELTADC_UNIFY_F0132 && !SEC_DMM3_RBC_F0147
+    if( isDmmMode || isRbcMode)
+#else
     if( isDmmMode )
+#endif
     {
 #if H_3D_DIM_DLT
@@ -502,5 +514,5 @@
     }
 #endif
-#if H_3D_DIM_RBC
+#if H_3D_DIM_RBC && !QC_DIM_DELTADC_UNIFY_F0132
     if( isRbcMode )
     {
@@ -2398,4 +2410,5 @@
 
 #if H_3D_DIM_DMM
+#if !SEC_DMM3_RBC_F0147
 UInt TComPrediction::xPredWedgeFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt intraTabIdx )
 {
@@ -2409,4 +2422,5 @@
   return g_aauiWdgLstM3[g_aucConvertToBit[uiWidth]][uiColTexIntraDir-2].at(intraTabIdx);
 }
+#endif
 
 Void TComPrediction::xPredContourFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, TComWedgelet* pcContourWedge )
Index: branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComRom.cpp
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComRom.cpp	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComRom.cpp	(revision 712)
@@ -604,5 +604,7 @@
 std::vector< std::vector<TComWedgeRef>  > g_dmmWedgeRefLists;
 std::vector< std::vector<TComWedgeNode> > g_dmmWedgeNodeLists;
+#if !SEC_DMM3_RBC_F0147
 std::vector< std::vector< std::vector<UInt> > > g_aauiWdgLstM3;
+#endif
 
 Void initWedgeLists( Bool initNodeList )
@@ -723,4 +725,5 @@
   }
 
+#if !SEC_DMM3_RBC_F0147
   UInt uiThrSz = DMM3_SIMPLIFY_TR;
   std::vector< std::vector<UInt> > auiWdgListSz;
@@ -739,4 +742,5 @@
   }
   g_aauiWdgLstM3.push_back(auiWdgListSz);
+#endif
 }
 
Index: branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComRom.h
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComRom.h	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComRom.h	(revision 712)
@@ -172,5 +172,7 @@
 extern       std::vector< std::vector<TComWedgeRef> >        g_dmmWedgeRefLists;
 extern       std::vector< std::vector<TComWedgeNode> >       g_dmmWedgeNodeLists;
+#if !SEC_DMM3_RBC_F0147
 extern       std::vector< std::vector< std::vector<UInt> > > g_aauiWdgLstM3;
+#endif
 
 Void initWedgeLists( Bool initNodeList = false );
Index: branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComWedgelet.h
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComWedgelet.h	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibCommon/TComWedgelet.h	(revision 712)
@@ -50,13 +50,23 @@
 enum DIM_IDX
 {
+#if SEC_DMM3_RBC_F0147
+  DMM1_IDX = 0,
+  DMM4_IDX = 1,
+#else
   DMM1_IDX = 0,
   DMM3_IDX = 1,
   DMM4_IDX = 2,
   RBC_IDX  = 3
+#endif
 };
 
+#if SEC_DMM3_RBC_F0147
+#define DMM_NUM_TYPE   2
+#define DIM_NUM_TYPE   (DMM_NUM_TYPE)
+#else
 #define DMM_NUM_TYPE   3
 #define RBC_NUM_TYPE   1
 #define DIM_NUM_TYPE   (DMM_NUM_TYPE+RBC_NUM_TYPE)
+#endif
 #define DIM_NO_IDX     MAX_UINT
 
@@ -75,5 +85,7 @@
 #define DMM_NO_WEDGEINDEX       MAX_UINT
 #define DMM_NUM_WEDGE_REFINES   8
+#if !SEC_DMM3_RBC_F0147
 #define DMM3_SIMPLIFY_TR        1
+#endif
 
 enum WedgeResolution
Index: branches/HTM-8.2-dev0/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 712)
@@ -65,4 +65,5 @@
 #define H_3D          ( HEVC_EXT == 2)
 
+#define LGE_BUGFIX_F0158 1 //JCT3V-F0158
 /////////////////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////   MAJOR DEFINES   ///////////////////////////////////  
@@ -103,4 +104,7 @@
                                               // MTK_CLIPPING_ALIGN_IC_E0168       // To support simplify bi-prediction PU with identical motion checking, JCT3V-E0168
 
+#define LGE_IC_CTX_F0160 1 //JCT3V-F0160
+#define SEC_ONLY_TEXTURE_IC_F0151         1
+
 #if H_3D_NBDV
 #define H_3D_NBDV_REF                     1   // Depth oriented neighboring block disparity derivation
@@ -158,4 +162,5 @@
                                               // LGE_SDC_REMOVE_DC_E0158 Removal of DC mode from SDC
                                               // LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 1   Removal of overlap between DMM3 and DMM1
+#define SEC_DMM3_RBC_F0147                1   // Removal of DMM3 and RBC from DMMs
 
 #define H_3D_INTER_SDC                    1   // INTER SDC, Inter simplified depth coding
@@ -213,5 +218,7 @@
 #if H_3D_DIM
 #define H_3D_DIM_DMM                      1   // Depth Modeling Modes
+#if !SEC_DMM3_RBC_F0147
 #define H_3D_DIM_RBC                      1   // Region Boundary Chain mode
+#endif
 #define H_3D_DIM_SDC                      1   // Simplified Depth Coding method
 #define H_3D_DIM_DLT                      1   // Depth Lookup Table
@@ -219,4 +226,7 @@
                                               // HHI_DEPTH_INTRA_SEARCH_RAU_C0160
                                               // LG_ZEROINTRADEPTHRESI_A0087
+#define QC_DIM_DELTADC_UNIFY_F0132        1   // Unify delta DC coding in depth intra modes
+#define HHI_DIM_PREDSAMP_FIX_F0171        1
+#define LGE_PRED_RES_CODING_DLT_DOMAIN_F0159 1 //JCT3V-F0159
 #endif
 ///// ***** VIEW SYNTHESIS PREDICTION *********
Index: branches/HTM-8.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 712)
@@ -1803,5 +1803,9 @@
     }
 #if H_3D_IC
+#if SEC_ONLY_TEXTURE_IC_F0151
+    else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth())
+#else
     else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) )
+#endif
     {
       UInt uiCodeTmp = 0;
Index: branches/HTM-8.2-dev0/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibDecoder/TDecCu.cpp	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibDecoder/TDecCu.cpp	(revision 712)
@@ -741,5 +741,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
       pRecIPred[ uiX ] = pReco[ uiX ];
     }
Index: branches/HTM-8.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 712)
@@ -111,5 +111,9 @@
   pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
 
+#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/TLibDecoder/TDecSbac.cpp
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 712)
@@ -89,5 +89,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
@@ -176,5 +178,7 @@
 #if H_3D_DIM_DMM
   m_cDmm1DataSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_DMM1_DATA );
+#if !SEC_DMM3_RBC_F0147
   m_cDmm3DataSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_DMM3_DATA );
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -249,5 +253,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
@@ -408,4 +414,22 @@
 }
 
+#if QC_DIM_DELTADC_UNIFY_F0132
+Void TDecSbac::xParseDimDeltaDC( Pel& rValDeltaDC, UInt uiNumSeg )
+{
+  UInt absValDeltaDC = 0;
+  xReadExGolombLevel( absValDeltaDC, m_cDdcDataSCModel.get(0, 0, 0) );
+  rValDeltaDC = (Pel)absValDeltaDC + ( uiNumSeg > 1 ? 0 : 1 );
+
+  if( rValDeltaDC != 0 )
+  {
+    UInt uiSign;
+    m_pcTDecBinIf->decodeBinEP( uiSign );
+    if ( uiSign )
+    {
+      rValDeltaDC = -rValDeltaDC;
+    }
+  }
+}
+#else
 Void TDecSbac::xParseDimDeltaDC( Pel& rValDeltaDC, UInt dimType )
 {
@@ -424,4 +448,6 @@
   }
 }
+#endif
+
 #if H_3D_DIM_DMM
 Void TDecSbac::xParseDmm1WedgeIdx( UInt& ruiTabIdx, Int iNumBit )
@@ -435,5 +461,5 @@
   ruiTabIdx = uiIdx;
 }
-
+#if !SEC_DMM3_RBC_F0147
 Void TDecSbac::xParseDmm3WedgeIdx( UInt& ruiIntraIdx, Int iNumBit )
 {
@@ -446,4 +472,5 @@
   ruiIntraIdx = uiIdx;
 }
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -1140,4 +1167,5 @@
       pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, absPartIdx, depth );
     } break;
+#if !SEC_DMM3_RBC_F0147
   case( DMM3_IDX ):
     {
@@ -1146,4 +1174,5 @@
       pcCU->setDmm3IntraTabIdxSubParts( uiIntraIdx, absPartIdx, depth );
     } break;
+#endif
   case( DMM4_IDX ): break;
 #endif
@@ -1157,5 +1186,5 @@
   }
 
-#if H_3D_DIM_SDC
+#if H_3D_DIM_SDC && !QC_DIM_DELTADC_UNIFY_F0132
   if( pcCU->getSDCFlag(absPartIdx) )
   {
@@ -1173,7 +1202,48 @@
   {
 #endif
+#if QC_DIM_DELTADC_UNIFY_F0132
+    if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) )
+#else
     if( dimType < DIM_NUM_TYPE )
+#endif
     {
       UInt symbol;
+#if QC_DIM_DELTADC_UNIFY_F0132
+      UInt uiNumSegments = ( dir == PLANAR_IDX ) ? 1 : 2;
+
+      if( pcCU->getSDCFlag( absPartIdx ) )
+      {
+        assert(pcCU->getPartitionSize(absPartIdx)==SIZE_2Nx2N);
+        pcCU->setTrIdxSubParts(0, absPartIdx, depth);
+        pcCU->setCbfSubParts(1, 1, 1, absPartIdx, depth);
+      }
+
+      m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get(0, 0, uiNumSegments-1) );
+
+      if( symbol )
+      {
+        if( !pcCU->getSDCFlag( absPartIdx ) )
+        {
+          dir += symbol;
+        }
+      }
+      for( UInt segment = 0; segment < uiNumSegments; segment++ )
+      {
+        Pel valDeltaDC = 0;
+        if( symbol )
+        {
+          xParseDimDeltaDC( valDeltaDC, uiNumSegments );
+        }
+
+        if( pcCU->getSDCFlag( absPartIdx ) )
+        {
+          pcCU->setSDCSegmentDCOffset( valDeltaDC, segment, absPartIdx );
+        }
+        else
+        {
+          pcCU->setDimDeltaDC( dimType, segment, absPartIdx, valDeltaDC );
+        }
+      }
+#else
       m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get(0, 0, (RBC_IDX == dimType) ? 1 : 0) );
       if( symbol )
@@ -1187,6 +1257,7 @@
         }
       }
-    }
-#if H_3D_DIM_SDC
+#endif
+    }
+#if H_3D_DIM_SDC && !QC_DIM_DELTADC_UNIFY_F0132
   }
 #endif
@@ -1218,5 +1289,9 @@
   else if( puIdx == 0 )
   {
+#if SEC_DMM3_RBC_F0147
+    while( binNum < 1 && symbol )
+#else
     while( binNum < 3 && symbol )
+#endif
     {
       ctxDepthMode = puIdx*3 + ((binNum >= 2) ? 2 : binNum);
@@ -1225,11 +1300,30 @@
       binNum++;
     }
+#if SEC_DMM3_RBC_F0147
+    if( modeCode == 0 ) { dir = 0;                       sdcFlag = 0;}
+    else if( modeCode == 1 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}
+#else
          if( modeCode == 0 ) { dir = 0;                       sdcFlag = 0;}
     else if( modeCode == 2 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}
     else if( modeCode == 6 ) { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;}
     else if( modeCode == 7 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
+#endif
   }
   else
   {
+#if SEC_DMM3_RBC_F0147
+    while( binNum < 4 && symbol )
+    {
+      ctxDepthMode = puIdx*3 + ((binNum >= 2) ? 2 : binNum);
+      m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );
+      modeCode = (modeCode<<1) + symbol;
+      binNum++;
+    }
+    if ( modeCode == 0 )        { dir =  PLANAR_IDX;             sdcFlag = 1;}
+    else if ( modeCode == 2 )   { dir = 5;                       sdcFlag = 0;}
+    else if ( modeCode == 6 )   { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;}
+    else if ( modeCode == 14 )  { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}
+    else if ( modeCode == 15 )  { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;}
+#else
     UInt maxBinNum = 0;
     m_pcTDecBinIf->decodeBinEP(symbol);
@@ -1263,4 +1357,5 @@
       else if ( modeCode == 3 )  { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;}
     }
+#endif
   }
   pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth );
Index: branches/HTM-8.2-dev0/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- branches/HTM-8.2-dev0/source/Lib/TLibDecoder/TDecSbac.h	(revision 711)
+++ branches/HTM-8.2-dev0/source/Lib/TLibDecoder/TDecSbac.h	(revision 712)
@@ -99,8 +99,14 @@
 #if H_3D_DIM
   Void  xReadExGolombLevel   ( UInt& ruiSymbol, ContextModel& rcSCModel  );
+#if QC_DIM_DELTADC_UNIFY_F0132
+  Void  xParseDimDeltaDC     ( Pel& rValDeltaDC, UInt uiNumSeg );
+#else
   Void  xParseDimDeltaDC     ( Pel& rValDeltaDC, UInt dimType );
+#endif
 #if H_3D_DIM_DMM
   Void  xParseDmm1WedgeIdx   ( UInt& ruiTabIdx, Int iNumBit );
+#if !SEC_DMM3_RBC_F0147
   Void  xParseDmm3WedgeIdx   ( UInt& ruiIntraIdx, Int iNumBit );
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -213,5 +219,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/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
