Index: branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibCommon/TComDataCU.cpp	(revision 556)
+++ branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibCommon/TComDataCU.cpp	(revision 557)
@@ -2489,5 +2489,9 @@
   // check prediction mode
   UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx );  
+#if LGE_SDC_REMOVE_DC_E0158
+  if( uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX && !isDimDeltaDC( uiLumaPredMode ) ) )
+#else
   if( uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX && !isDimDeltaDC( uiLumaPredMode ) ) )
+#endif
     return true;
   
Index: branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibCommon/TComRom.cpp
===================================================================
--- branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibCommon/TComRom.cpp	(revision 556)
+++ branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibCommon/TComRom.cpp	(revision 557)
@@ -347,7 +347,13 @@
 { //2x2   4x4   8x8 16x16 32x32 64x64
      0,    7,   10,   11,   11,   13 };
+#if LGE_PKU_DMM3_OVERLAP_E0159
+const UChar g_dmm3IntraTabIdxBits[6] =
+{ //2x2   4x4   8x8 16x16 32x32 64x64
+     0,    4,    7,    8,    8,    0 };
+#else
 const UChar g_dmm3IntraTabIdxBits[6] =
 { //2x2   4x4   8x8 16x16 32x32 64x64
      0,    6,    9,    9,    9,    0 };
+#endif
 
 extern std::vector< std::vector<TComWedgelet> >   g_dmmWedgeLists;
Index: branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibCommon/TypeDef.h	(revision 556)
+++ branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibCommon/TypeDef.h	(revision 557)
@@ -179,4 +179,10 @@
                                               // HHI_DEPTH_INTRA_SEARCH_RAU_C0160
                                               // LG_ZEROINTRADEPTHRESI_A0087
+#if H_3D_DIM_SDC
+#define LGE_SDC_REMOVE_DC_E0158           1   // Removal of DC mode from SDC
+#endif
+#if H_3D_DIM_DMM
+#define LGE_PKU_DMM3_OVERLAP_E0159        1   // Removal of overlap between DMM3 and DMM1
+#endif
 #endif
 
Index: branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 556)
+++ branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 557)
@@ -1222,5 +1222,7 @@
   if( puIdx == 2 )
   {
+#if !LGE_SDC_REMOVE_DC_E0158
     while( binNum < 2 && symbol )
+#endif
     {
       ctxDepthMode = puIdx*3 + binNum;
@@ -1230,6 +1232,10 @@
     }
          if( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;}
+#if LGE_SDC_REMOVE_DC_E0158
+    else if( modeCode == 1 ) { dir = 0;          sdcFlag = 0;}
+#else
     else if( modeCode == 2 ) { dir = 0;          sdcFlag = 0;}
     else if( modeCode == 3 ) { dir =     DC_IDX; sdcFlag = 1;}
+#endif
   }
   else if( puIdx == 0 )
@@ -1278,8 +1284,14 @@
       {
         binNum = 0;
+#if LGE_SDC_REMOVE_DC_E0158
+#if !SEC_DMM2_E0146
+        while( symbol && binNum < 2 )
+#endif
+#else
 #if SEC_DMM2_E0146
         while( symbol && binNum < 2 )
 #else
         while( symbol && binNum < 3 )
+#endif
 #endif
         {
@@ -1297,4 +1309,12 @@
     else if( modeCode == 5  ) { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;}
     else if( modeCode == 6  ) { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;}
+#if LGE_SDC_REMOVE_DC_E0158
+#if SEC_DMM2_E0146
+    else if( modeCode == 7 )  { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
+#else
+    else if( modeCode == 14 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
+    else if( modeCode == 15 ) { dir = (2*DMM2_IDX+DIM_OFFSET); sdcFlag = 0;}
+#endif
+#else
     else if( modeCode == 14 ) { dir =      DC_IDX;             sdcFlag = 1;}
 #if SEC_DMM2_E0146
@@ -1303,4 +1323,5 @@
     else if( modeCode == 30 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
     else if( modeCode == 31 ) { dir = (2*DMM2_IDX+DIM_OFFSET); sdcFlag = 0;}
+#endif
 #endif
   }
Index: branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 556)
+++ branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 557)
@@ -1261,4 +1261,13 @@
 Void TEncSbac::codeIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx )
 {
+#if LGE_SDC_REMOVE_DC_E0158
+#if SEC_DMM2_E0146
+  UInt codeWordTable[3][7] =    {{0, 0, 0, 2, 0,6, 7},{0, 2, 3, 4, 5, 6, 7},{0, 1, 0, 0, 0, 0, 0}};
+  UInt codeWordLenTable[3][7] = {{0, 1, 0, 2, 0,3, 3},{2, 3, 3, 3, 3, 3, 3},{1, 1, 0, 0, 0, 0, 0}};
+#else
+  UInt codeWordTable[3][8] =    { { 0, 0, 0, 2, 0, 6, 0, 7 }, { 0, 2, 3, 4, 5, 6, 15, 14 }, { 0, 1, 0, 0, 0, 0, 0, 0 } };
+  UInt codeWordLenTable[3][8] = { { 0, 1, 0, 2, 0, 3, 0, 3 }, { 2, 3, 3, 3, 3, 3,  4,  4 }, { 1, 1, 0, 0, 0, 0, 0, 0 } };
+#endif
+#else
 #if SEC_DMM2_E0146
   UInt codeWordTable[3][8] =    {{0, 0, 0, 2, 0,6, 0, 7},{0, 2, 3, 4, 5, 6, 14, 15},{0, 2, 0, 0, 0, 0, 3, 0}};
@@ -1268,4 +1277,5 @@
   UInt codeWordLenTable[3][9] = {{0, 1, 0, 2, 0,3, 0, 0, 3},{2, 3, 3, 3, 3, 3,  4,  5,  5},{1, 2, 0, 0, 0, 0, 2, 0, 0}};
 #endif
+#endif
   UInt dir = pcCU->getLumaIntraDir( absPartIdx );
   UInt puIdx = (pcCU->getWidth(absPartIdx) == 64) ? 2 : ( (pcCU->getPartitionSize(absPartIdx) == SIZE_NxN && pcCU->getWidth(absPartIdx) == 8) ? 0 : 1 );
@@ -1283,4 +1293,12 @@
     case DMM4_IDX: codeIdx = 4; break;
     case DMM3_IDX: codeIdx = 5; break;
+#if LGE_SDC_REMOVE_DC_E0158
+#if SEC_DMM2_E0146
+    case  RBC_IDX: codeIdx = 6; break;
+#else
+    case DMM2_IDX: codeIdx = 6; break;
+    case  RBC_IDX: codeIdx = 7; break;
+#endif
+#else
 #if SEC_DMM2_E0146
     case  RBC_IDX: codeIdx = 7; break;
@@ -1289,4 +1307,5 @@
     case  RBC_IDX: codeIdx = 8; break;
 #endif
+#endif
     default:                    break;
     }
@@ -1299,5 +1318,7 @@
     {
       case PLANAR_IDX:  codeIdx = 0; break;
+#if !LGE_SDC_REMOVE_DC_E0158
       case DC_IDX:      codeIdx = 6; break;
+#endif
       default:          codeIdx = 2; break;
     }
Index: branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 556)
+++ branches/HTM-DEV-2.0-dev3-LG/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 557)
@@ -2864,4 +2864,13 @@
           case( DMM3_IDX ):
             {
+#if LGE_PKU_DMM3_OVERLAP_E0159
+              TComPic*      pcPicTex = pcCU->getSlice()->getTexturePic();
+              TComDataCU* pcColTexCU = pcPicTex->getCU( pcCU->getAddr() );
+              UInt      uiTexPartIdx = pcCU->getZorderIdxInCU() + uiPartOffset;
+              Int   uiColTexIntraDir = pcColTexCU->isIntra( uiTexPartIdx ) ? pcColTexCU->getLumaIntraDir( uiTexPartIdx ) : 255;
+
+              if( uiColTexIntraDir > DC_IDX && uiColTexIntraDir < 35 )
+              {
+#endif
               UInt uiIntraTabIdx = 0;
               xSearchDmm3Wedge( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight, uiTabIdx, uiIntraTabIdx );
@@ -2869,4 +2878,7 @@
               pcCU->setDmm3IntraTabIdxSubParts( uiIntraTabIdx, uiPartOffset, uiDepth + uiInitTrDepth );
               biSegmentation = &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]);
+#if LGE_PKU_DMM3_OVERLAP_E0159
+              }
+#endif
             } break;
           case( DMM4_IDX ):
