Index: /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/NonCTC/allintra/baseCfg_2view+depth_AllIntra.cfg
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/NonCTC/allintra/baseCfg_2view+depth_AllIntra.cfg	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/NonCTC/allintra/baseCfg_2view+depth_AllIntra.cfg	(revision 697)
@@ -145,5 +145,4 @@
 VSO                       : 1                                      # use of view synthesis optimization for depth coding
 DMM                                : 1
-RBC                                : 1
 SDC                                : 1
 DLT                                : 1
Index: /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/NonCTC/allintra/baseCfg_3view+depth_AllIntra.cfg
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/NonCTC/allintra/baseCfg_3view+depth_AllIntra.cfg	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/NonCTC/allintra/baseCfg_3view+depth_AllIntra.cfg	(revision 697)
@@ -152,5 +152,4 @@
 VSO                       : 1                                      # use of view synthesis optimization for depth coding
 DMM                                : 1
-RBC                                : 1
 SDC                                : 1
 DLT                                : 1
Index: /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/NonCTC/fco/baseCfg_3view+depth.cfg
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/NonCTC/fco/baseCfg_3view+depth.cfg	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/NonCTC/fco/baseCfg_3view+depth.cfg	(revision 697)
@@ -237,5 +237,4 @@
 VSO                       : 1                                      # use of view synthesis optimization for depth coding
 DMM                                : 1
-RBC                                : 1
 SDC                                : 1
 DLT                                : 1
Index: /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/NonCTC/rc/baseCfg_3view+depth_rate_control.cfg
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/NonCTC/rc/baseCfg_3view+depth_rate_control.cfg	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/NonCTC/rc/baseCfg_3view+depth_rate_control.cfg	(revision 697)
@@ -249,5 +249,4 @@
 VSO                       : 1                                      # use of view synthesis optimization for depth coding
 DMM                                : 1
-RBC                                : 1
 SDC                                : 1
 DLT                                : 1
Index: /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/baseCfg_2view+depth.cfg
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/baseCfg_2view+depth.cfg	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/baseCfg_2view+depth.cfg	(revision 697)
@@ -205,5 +205,4 @@
 VSO                       : 1                                      # use of view synthesis optimization for depth coding
 DMM                                : 1
-RBC                                : 1
 SDC                                : 1
 DLT                                : 1
Index: /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/baseCfg_3view+depth.cfg
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/baseCfg_3view+depth.cfg	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/baseCfg_3view+depth.cfg	(revision 697)
@@ -237,5 +237,4 @@
 VSO                       : 1                                      # use of view synthesis optimization for depth coding
 DMM                                : 1
-RBC                                : 1
 SDC                                : 1
 DLT                                : 1
Index: /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/fullCfg.cfg
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/fullCfg.cfg	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/cfg/3D-HEVC/fullCfg.cfg	(revision 697)
@@ -262,5 +262,4 @@
 VSO                       : 1                          # use of view synthesis optimization for depth coding
 DMM                                : 1
-RBC                                : 1
 SDC                                : 1
 DLT                                : 1
Index: /branches/HTM-8.2-dev3-Samsung/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 697)
@@ -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")
@@ -2433,5 +2435,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-dev3-Samsung/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/App/TAppEncoder/TAppEncCfg.h	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/App/TAppEncoder/TAppEncCfg.h	(revision 697)
@@ -461,5 +461,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-dev3-Samsung/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/App/TAppEncoder/TAppEncTop.cpp	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/App/TAppEncoder/TAppEncTop.cpp	(revision 697)
@@ -182,5 +182,7 @@
 #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 );
@@ -1641,5 +1643,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-dev3-Samsung/source/Lib/TLibCommon/ContextTables.h
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/ContextTables.h	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/ContextTables.h	(revision 697)
@@ -116,5 +116,7 @@
 #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
@@ -433,4 +435,5 @@
   { CNU }, 
 };
+#if !SEC_DMM3_RBC_F0147
 static const UChar
 INIT_DMM3_DATA[3][NUM_DMM3_DATA_CTX] = 
@@ -440,4 +443,5 @@
   { CNU }, 
 };
+#endif
 #endif
 #if H_3D_DIM_RBC
Index: /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/TComDataCU.cpp	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/TComDataCU.cpp	(revision 697)
@@ -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
@@ -6176,4 +6198,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 )
 {
@@ -6181,4 +6204,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-dev3-Samsung/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/TComDataCU.h	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/TComDataCU.h	(revision 697)
@@ -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
@@ -538,8 +540,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
Index: /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/TComPrediction.cpp	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/TComPrediction.cpp	(revision 697)
@@ -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 ): 
       {
@@ -495,5 +499,5 @@
     Pel deltaDC2 = pcCU->getDimDeltaDC( dimType, 1, uiAbsPartIdx );
 #if H_3D_DIM_DMM
-#if QC_DIM_DELTADC_UNIFY_F0132
+#if QC_DIM_DELTADC_UNIFY_F0132 && !SEC_DMM3_RBC_F0147
     if( isDmmMode || isRbcMode)
 #else
@@ -1976,4 +1980,5 @@
 
 #if H_3D_DIM_DMM
+#if !SEC_DMM3_RBC_F0147
 UInt TComPrediction::xPredWedgeFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt intraTabIdx )
 {
@@ -1987,4 +1992,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-dev3-Samsung/source/Lib/TLibCommon/TComRom.cpp
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/TComRom.cpp	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/TComRom.cpp	(revision 697)
@@ -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-dev3-Samsung/source/Lib/TLibCommon/TComRom.h
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/TComRom.h	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/TComRom.h	(revision 697)
@@ -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-dev3-Samsung/source/Lib/TLibCommon/TComWedgelet.h
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/TComWedgelet.h	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/TComWedgelet.h	(revision 697)
@@ -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-dev3-Samsung/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/TypeDef.h	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibCommon/TypeDef.h	(revision 697)
@@ -39,4 +39,6 @@
 #define _TYPEDEF__
 
+
+
 //! \ingroup TLibCommon
 //! \{
@@ -159,4 +161,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
@@ -215,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
Index: /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibDecoder/TDecCu.cpp	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibDecoder/TDecCu.cpp	(revision 697)
@@ -695,11 +695,7 @@
 #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 ] );
Index: /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 697)
@@ -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
@@ -455,5 +461,5 @@
   ruiTabIdx = uiIdx;
 }
-
+#if !SEC_DMM3_RBC_F0147
 Void TDecSbac::xParseDmm3WedgeIdx( UInt& ruiIntraIdx, Int iNumBit )
 {
@@ -466,4 +472,5 @@
   ruiIntraIdx = uiIdx;
 }
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -1160,4 +1167,5 @@
       pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, absPartIdx, depth );
     } break;
+#if !SEC_DMM3_RBC_F0147
   case( DMM3_IDX ):
     {
@@ -1166,4 +1174,5 @@
       pcCU->setDmm3IntraTabIdxSubParts( uiIntraIdx, absPartIdx, depth );
     } break;
+#endif
   case( DMM4_IDX ): break;
 #endif
@@ -1280,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);
@@ -1287,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);
@@ -1325,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-dev3-Samsung/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibDecoder/TDecSbac.h	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibDecoder/TDecSbac.h	(revision 697)
@@ -106,5 +106,7 @@
 #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
@@ -217,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-dev3-Samsung/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibEncoder/TEncCfg.h	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibEncoder/TEncCfg.h	(revision 697)
@@ -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;
@@ -980,6 +982,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-dev3-Samsung/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 697)
@@ -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
@@ -549,4 +557,5 @@
 }
 
+#if !SEC_DMM3_RBC_F0147
 Void TEncSbac::xCodeDmm3WedgeIdx( UInt uiIntraIdx, Int iNumBit )
 {
@@ -556,4 +565,5 @@
   }
 }
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -1221,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
@@ -1305,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 );
@@ -1321,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;
     }
@@ -1337,4 +1356,5 @@
   }
 #endif
+#if !SEC_DMM3_RBC_F0147 
   if( puIdx==1 )
   {
@@ -1348,4 +1368,5 @@
       }
   }
+#endif
   //mode coding
   for( UInt i = 0; i < codeWordLenTable[puIdx][codeIdx]; i++ )
Index: /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibEncoder/TEncSbac.h
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibEncoder/TEncSbac.h	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibEncoder/TEncSbac.h	(revision 697)
@@ -125,5 +125,7 @@
 #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
@@ -257,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-dev3-Samsung/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 697)
@@ -1128,11 +1128,7 @@
 #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 ];
@@ -1203,11 +1199,7 @@
 #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 ] );
@@ -2898,4 +2890,5 @@
               biSegmentation = &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]);
             } break;
+#if !SEC_DMM3_RBC_F0147
           case( DMM3_IDX ):
             {
@@ -2915,4 +2908,5 @@
               }
             } break;
+#endif
           case( DMM4_IDX ):
             {
@@ -7330,4 +7324,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 )
 {
@@ -7366,5 +7361,5 @@
   cPredYuv.destroy();
 }
-
+#endif
 #endif
 #if H_3D_DIM_RBC
Index: /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibEncoder/TEncSearch.h
===================================================================
--- /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibEncoder/TEncSearch.h	(revision 696)
+++ /branches/HTM-8.2-dev3-Samsung/source/Lib/TLibEncoder/TEncSearch.h	(revision 697)
@@ -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
