Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/ContextTables.h
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/ContextTables.h	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/ContextTables.h	(revision 782)
@@ -119,5 +119,7 @@
 #if QC_GENERIC_SDC_G0122
 #define NUM_ANGLE_FLAG_CTX            3
+#if !QC_SDC_UNIFY_G0130
 #define NUM_INTRASDC_FLAG_CTX         3
+#endif
 #endif
 #endif
@@ -128,8 +130,11 @@
 #endif
 
-#if H_3D_INTER_SDC
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
 #define NUM_INTER_SDC_FLAG_CTX        1      ///< number of context models for inter SDC flag
 #define NUM_INTER_SDC_SIGN_FLAG_CTX   1      ///< number of context models for sign of inter SDC residual
 #define NUM_INTER_SDC_RESIDUAL_CTX    1      ///< number of context models for abs of inter SDC residual
+#endif
+#if QC_SDC_UNIFY_G0130
+#define NUM_SDC_FLAG_CTX              1      ///< number of context models for inter SDC flag
 #endif
 // ====================================================================================================================
@@ -417,4 +422,5 @@
   { 155, 170, 157 },
 };
+#if !QC_SDC_UNIFY_G0130
 static const UChar 
 INIT_INTRASDC_FLAG[3][NUM_INTRASDC_FLAG_CTX] =
@@ -425,4 +431,5 @@
 };
 #endif
+#endif
 
 static const UChar 
@@ -467,5 +474,5 @@
 #endif
 
-#if H_3D_INTER_SDC
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
 static const UChar 
 INIT_INTER_SDC_FLAG[3][NUM_INTER_SDC_FLAG_CTX] =
@@ -493,5 +500,13 @@
 #endif
 //! \}
-
-
-#endif
+#if QC_SDC_UNIFY_G0130
+static const UChar 
+INIT_SDC_FLAG[3][NUM_SDC_FLAG_CTX] =
+{
+  { 154 },  
+  { 154 },
+  { 154 },
+};
+#endif
+
+#endif
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp	(revision 782)
@@ -123,6 +123,13 @@
 #if H_3D_DIM_SDC
   m_pbSDCFlag             = NULL;
+#if QC_SDC_UNIFY_G0130
+  for( Int i = 0; i < 4; i++ )
+  {
+    m_apSegmentDCOffset[i]  = NULL;
+  }
+#else
   m_apSegmentDCOffset[0]  = NULL;
   m_apSegmentDCOffset[1]  = NULL;
+#endif
 #endif
 #endif
@@ -146,4 +153,5 @@
 #endif
 #if H_3D_INTER_SDC
+#if !QC_SDC_UNIFY_G0130
   m_pbInterSDCFlag       = NULL;
   for( Int i = 0; i < 4; i++ )
@@ -151,4 +159,5 @@
     m_apSegmentInterDCOffset[i] = NULL;
   }
+#endif
   m_pucInterSDCMask       = NULL;
 #endif
@@ -272,9 +281,16 @@
 #if H_3D_DIM_SDC
     m_pbSDCFlag             = (Bool*)xMalloc(Bool, uiNumPartition);
+#if QC_SDC_UNIFY_G0130
+    for( Int i = 0; i < 4; i++ )
+    {
+      m_apSegmentDCOffset[i]  = (Pel*)xMalloc(Pel, uiNumPartition);
+    }
+#else
     m_apSegmentDCOffset[0]  = (Pel*)xMalloc(Pel, uiNumPartition);
     m_apSegmentDCOffset[1]  = (Pel*)xMalloc(Pel, uiNumPartition);
 #endif
 #endif
-#if H_3D_INTER_SDC
+#endif
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
     m_pbInterSDCFlag     = (Bool*  )xMalloc(Bool,   uiNumPartition);
     for( Int i = 0; i < 4; i++ )
@@ -400,9 +416,16 @@
 #if H_3D_DIM_SDC
     if ( m_pbSDCFlag            ) { xFree(m_pbSDCFlag);             m_pbSDCFlag             = NULL; }
+#if QC_SDC_UNIFY_G0130
+    for( Int i = 0; i < 4; i++ )
+    {
+      if ( m_apSegmentDCOffset[i] ) { xFree(m_apSegmentDCOffset[i]);  m_apSegmentDCOffset[i]  = NULL; }
+    }
+#else
     if ( m_apSegmentDCOffset[0] ) { xFree(m_apSegmentDCOffset[0]);  m_apSegmentDCOffset[0]  = NULL; }
     if ( m_apSegmentDCOffset[1] ) { xFree(m_apSegmentDCOffset[1]);  m_apSegmentDCOffset[1]  = NULL; }
 #endif
+#endif
 #endif    
-#if H_3D_INTER_SDC
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
     if ( m_pbInterSDCFlag     ) { xFree(m_pbInterSDCFlag);      m_pbInterSDCFlag    = NULL; }
     for(Int i = 0; i < 4; i++ )
@@ -554,5 +577,5 @@
     m_pbSDCFlag[ui] = pcFrom->m_pbSDCFlag[ui];
 #endif
-#if H_3D_INTER_SDC
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
     m_pbInterSDCFlag[ui] = pcFrom->m_pbInterSDCFlag[ui];
 #endif
@@ -616,9 +639,16 @@
 #if H_3D_DIM_SDC
     memset( m_pbSDCFlag             + firstElement,     0,                numElements * sizeof( *m_pbSDCFlag            ) );
+#if QC_SDC_UNIFY_G0130
+    for( Int i = 0; i < 4; i++ )
+    {
+      memset( m_apSegmentDCOffset[i]  + firstElement,     0,                numElements * sizeof( *m_apSegmentDCOffset[i] ) );
+    }
+#else
     memset( m_apSegmentDCOffset[0]  + firstElement,     0,                numElements * sizeof( *m_apSegmentDCOffset[0] ) );
     memset( m_apSegmentDCOffset[1]  + firstElement,     0,                numElements * sizeof( *m_apSegmentDCOffset[1] ) );
 #endif
 #endif
-#if H_3D_INTER_SDC
+#endif
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
     memset( m_pbInterSDCFlag   + firstElement,     0,                    numElements * sizeof( *m_pbInterSDCFlag ) );
     for( Int i = 0; i < 4; i++ )
@@ -788,9 +818,16 @@
 #if H_3D_DIM_SDC
       m_pbSDCFlag           [ui] = false;
+#if QC_SDC_UNIFY_G0130
+      for( Int i = 0; i < 4; i++ )
+      {
+        m_apSegmentDCOffset[i][ui] = 0;
+      }
+#else
       m_apSegmentDCOffset[0][ui] = 0;
       m_apSegmentDCOffset[1][ui] = 0;
 #endif
 #endif
-#if H_3D_INTER_SDC
+#endif
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
       m_pbInterSDCFlag[ui] = false;
       for( Int i = 0; i < 4; i++ )
@@ -901,9 +938,16 @@
 #if H_3D_DIM_SDC
   memset( m_pbSDCFlag,            0, sizeof(Bool) * m_uiNumPartition  );
+#if QC_SDC_UNIFY_G0130
+  for( Int i = 0; i < 4; i++ )
+  {
+    memset( m_apSegmentDCOffset[i], 0, sizeof(Pel) * m_uiNumPartition   );
+  }
+#else
   memset( m_apSegmentDCOffset[0], 0, sizeof(Pel) * m_uiNumPartition   );
   memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition   );
 #endif
 #endif
-#if H_3D_INTER_SDC
+#endif
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
   memset( m_pbInterSDCFlag,           0, sizeof( Bool ) * m_uiNumPartition );
   for( Int i = 0; i < 4; i++ )
@@ -978,9 +1022,16 @@
 #if H_3D_DIM_SDC
       m_pbSDCFlag           [ui] = pcCU->m_pbSDCFlag            [ uiPartOffset + ui ];
+#if QC_SDC_UNIFY_G0130
+      for( Int i = 0; i < 4; i++ )
+      {
+        m_apSegmentDCOffset[i][ui] = pcCU->m_apSegmentDCOffset[i] [ uiPartOffset + ui ];
+      }
+#else
       m_apSegmentDCOffset[0][ui] = pcCU->m_apSegmentDCOffset[0] [ uiPartOffset + ui ];
       m_apSegmentDCOffset[1][ui] = pcCU->m_apSegmentDCOffset[1] [ uiPartOffset + ui ];
 #endif
 #endif
-#if H_3D_INTER_SDC
+#endif
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
       m_pbInterSDCFlag      [ui] = pcCU->m_pbInterSDCFlag    [ uiPartOffset + ui ];
       for( Int i = 0; i < 4; i++ )
@@ -1134,9 +1185,16 @@
 #if H_3D_DIM_SDC
   m_pbSDCFlag               = pcCU->getSDCFlag()              + uiPart;
+#if QC_SDC_UNIFY_G0130
+  for( Int i = 0; i < 4; i++ )
+  {
+    m_apSegmentDCOffset[i]    = pcCU->getSDCSegmentDCOffset(i)  + uiPart;
+  }
+#else
   m_apSegmentDCOffset[0]    = pcCU->getSDCSegmentDCOffset(0)  + uiPart;
   m_apSegmentDCOffset[1]    = pcCU->getSDCSegmentDCOffset(1)  + uiPart;
 #endif
+#endif
 #endif  
-#if H_3D_INTER_SDC
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
   m_pbInterSDCFlag          = pcCU->getInterSDCFlag()       + uiPart;
   for( Int i = 0; i < 4; i++ )
@@ -1328,9 +1386,16 @@
 #if H_3D_DIM_SDC
   memcpy( m_pbSDCFlag             + uiOffset, pcCU->getSDCFlag(),             iSizeInBool  );
+#if QC_SDC_UNIFY_G0130
+  for( Int i = 0; i < 4; i++ )
+  {
+    memcpy( m_apSegmentDCOffset[i]  + uiOffset, pcCU->getSDCSegmentDCOffset(i), sizeof( Pel ) * uiNumPartition);
+  }
+#else
   memcpy( m_apSegmentDCOffset[0]  + uiOffset, pcCU->getSDCSegmentDCOffset(0), sizeof( Pel ) * uiNumPartition);
   memcpy( m_apSegmentDCOffset[1]  + uiOffset, pcCU->getSDCSegmentDCOffset(1), sizeof( Pel ) * uiNumPartition);
 #endif
 #endif
-#if H_3D_INTER_SDC
+#endif
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
   memcpy( m_pbInterSDCFlag  + uiOffset, pcCU->getInterSDCFlag(),      iSizeInBool  );
   for( Int i = 0; i < 4; i++ )
@@ -1450,9 +1515,16 @@
 #if H_3D_DIM_SDC
   memcpy( rpcCU->getSDCFlag()             + m_uiAbsIdxInLCU, m_pbSDCFlag,      iSizeInBool  );
+#if QC_SDC_UNIFY_G0130
+  for( Int i = 0; i < 4; i++ )
+  {
+    memcpy( rpcCU->getSDCSegmentDCOffset(i) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[i], sizeof( Pel ) * m_uiNumPartition);
+  }
+#else
   memcpy( rpcCU->getSDCSegmentDCOffset(0) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[0], sizeof( Pel ) * m_uiNumPartition);
   memcpy( rpcCU->getSDCSegmentDCOffset(1) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[1], sizeof( Pel ) * m_uiNumPartition);
 #endif
 #endif
-#if H_3D_INTER_SDC
+#endif
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
   memcpy( rpcCU->getInterSDCFlag() + m_uiAbsIdxInLCU, m_pbInterSDCFlag,      iSizeInBool  );
   for( Int i = 0;i < 4; i++ )
@@ -1558,9 +1630,16 @@
 #if H_3D_DIM_SDC
   memcpy( rpcCU->getSDCFlag()             + uiPartOffset, m_pbSDCFlag,      iSizeInBool  );
+#if QC_SDC_UNIFY_G0130
+  for( Int i = 0; i < 4; i++ )
+  {
+    memcpy( rpcCU->getSDCSegmentDCOffset(i) + uiPartOffset, m_apSegmentDCOffset[i], sizeof( Pel ) * uiQNumPart);
+  }
+#else
   memcpy( rpcCU->getSDCSegmentDCOffset(0) + uiPartOffset, m_apSegmentDCOffset[0], sizeof( Pel ) * uiQNumPart);
   memcpy( rpcCU->getSDCSegmentDCOffset(1) + uiPartOffset, m_apSegmentDCOffset[1], sizeof( Pel ) * uiQNumPart);
 #endif
 #endif
-#if H_3D_INTER_SDC
+#endif
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
   memcpy( rpcCU->getInterSDCFlag() + uiPartOffset, m_pbInterSDCFlag,      iSizeInBool  );
   for( Int i = 0; i < 4; i++ )
@@ -2293,4 +2372,5 @@
 
 #if H_3D_INTER_SDC
+#if !QC_SDC_UNIFY_G0130
 Void TComDataCU::setInterSDCFlagSubParts ( Bool bInterSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
 {
@@ -2302,4 +2382,5 @@
   return 0;
 }
+#endif
 
 Void TComDataCU::xSetInterSDCCUMask( TComDataCU *pcCU, UChar *pMask )
@@ -2404,4 +2485,7 @@
 UInt TComDataCU::getCtxSDCFlag( UInt uiAbsPartIdx )
 {
+#if QC_SDC_UNIFY_G0130
+  return 0;
+#else
   TComDataCU* pcTempCU;
   UInt        uiTempPartIdx;
@@ -2417,4 +2501,5 @@
 
   return uiCtx;
+#endif
 }
 
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/TComDataCU.h	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/TComDataCU.h	(revision 782)
@@ -215,10 +215,16 @@
 #if H_3D_DIM_SDC
   Bool*         m_pbSDCFlag;
+#if QC_SDC_UNIFY_G0130
+  Pel*          m_apSegmentDCOffset[4];
+#else
   Pel*          m_apSegmentDCOffset[2];
 #endif
 #endif
+#endif
 #if H_3D_INTER_SDC
+#if !QC_SDC_UNIFY_G0130
   Bool*         m_pbInterSDCFlag;
   Int*          m_apSegmentInterDCOffset[4];
+#endif
   UChar*        m_pucInterSDCMask;
 #endif
@@ -578,4 +584,5 @@
 #endif
 #if H_3D_INTER_SDC
+#if !QC_SDC_UNIFY_G0130
   Bool*         getInterSDCFlag     ()                        { return m_pbInterSDCFlag;               }
   Bool          getInterSDCFlag     ( UInt uiIdx )            { return m_pbInterSDCFlag[uiIdx];        }
@@ -585,5 +592,5 @@
   Int           getInterSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentInterDCOffset[uiSeg][uiPartIdx]; }
   Void          setInterSDCSegmentDCOffset( Int pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentInterDCOffset[uiSeg][uiPartIdx] = pOffset; }
-
+#endif
   Void          xSetInterSDCCUMask( TComDataCU *pcCU, UChar *pMask );
 
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/TypeDef.h	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/TypeDef.h	(revision 782)
@@ -236,5 +236,7 @@
 #endif
 #define QC_GENERIC_SDC_G0122              1  // Generalize SDC to all depth intra modes
-
+#if H_3D_DIM_SDC && H_3D_INTER_SDC
+#define QC_SDC_UNIFY_G0130                1  // Unify intra SDC and inter SDC
+#endif
 #define H_3D_DIM_ENC                      1   // Depth Intra encoder optimizations, includes:
                                               // HHI_DEPTH_INTRA_SEARCH_RAU_C0160
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 782)
@@ -2774,4 +2774,15 @@
 #endif
 #if H_3D_INTER_SDC
+#if QC_SDC_UNIFY_G0130
+Void TDecCavlc::parseDeltaDC( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
+{ 
+  assert(0);
+}
+
+Void TDecCavlc::parseSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
+{
+  assert(0);
+}
+#else
 Void TDecCavlc::parseInterSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
@@ -2783,4 +2794,5 @@
   assert(0);
 }
+#endif
 #endif
 // ====================================================================================================================
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.h
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 782)
@@ -124,6 +124,11 @@
 #endif
 #if H_3D_INTER_SDC
+#if QC_SDC_UNIFY_G0130
+  Void  parseDeltaDC        ( TComDataCU* pcCU, UInt absPartIdx, UInt depth );
+  Void  parseSDCFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
+#else
   Void  parseInterSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void  parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );
+#endif
 #endif
   Void parseSplitFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecCu.cpp	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecCu.cpp	(revision 782)
@@ -495,5 +495,7 @@
   m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth );
   m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth );
-
+#if QC_SDC_UNIFY_G0130
+  m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
+#endif
   if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N )
   {
@@ -515,5 +517,5 @@
   // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
   m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
-#if H_3D_INTER_SDC
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
   m_pcEntropyDecoder->decodeInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
 #endif
@@ -586,5 +588,9 @@
     case MODE_INTER:
 #if H_3D_INTER_SDC
+#if QC_SDC_UNIFY_G0130
+      if( m_ppcCU[uiDepth]->getSDCFlag( 0 ) )
+#else
       if( m_ppcCU[uiDepth]->getInterSDCFlag( 0 ) )
+#endif
       {
         xReconInterSDC( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
@@ -661,6 +667,9 @@
     {
       UChar uiSeg = pMask[ uiPelX + uiPelY*uiWidth ];
-
-      pResi[ uiPelX ] = pcCU->getInterSDCSegmentDCOffset( uiSeg, 0 );;
+#if QC_SDC_UNIFY_G0130
+      pResi[ uiPelX ] = pcCU->getSDCSegmentDCOffset( uiSeg, 0 );
+#else
+      pResi[ uiPelX ] = pcCU->getInterSDCSegmentDCOffset( uiSeg, 0 );
+#endif
     }
     pResi += uiResiStride;
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 782)
@@ -713,7 +713,7 @@
   UInt uiLumaOffset   = uiMinCoeffSize*uiAbsPartIdx;
   UInt uiChromaOffset = uiLumaOffset>>2;
-  
+#if QC_SDC_UNIFY_G0130
 #if H_3D_DIM_SDC
-  if( pcCU->getSDCFlag( uiAbsPartIdx ) )
+  if( pcCU->getSDCFlag( uiAbsPartIdx ) && pcCU->isIntra( uiAbsPartIdx) )
   {
     assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
@@ -722,4 +722,46 @@
     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
+  }
+#endif
+
+#if H_3D_INTER_SDC
+  if( pcCU->getSDCFlag( uiAbsPartIdx ) && !pcCU->isIntra( uiAbsPartIdx) )
+  {
+    assert( !pcCU->isSkipped( uiAbsPartIdx ) );
+    assert( !pcCU->isIntra( uiAbsPartIdx) );
+    assert( pcCU->getSlice()->getIsDepth() );
+  }
+#endif
+
+  if( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) )
+  {
+    Int iPartNum = ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) ? 4 : 1;
+    UInt uiPartOffset = ( pcCU->getPic()->getNumPartInCU() >> ( pcCU->getDepth( uiAbsPartIdx ) << 1 ) ) >> 2;
+
+    if( !pcCU->getSDCFlag( uiAbsPartIdx ) )
+    {
+      for( Int iPart = 0; iPart < iPartNum; iPart++ )
+      {
+        if( getDimType( pcCU->getLumaIntraDir( uiAbsPartIdx + uiPartOffset*iPart ) ) < DIM_NUM_TYPE ) 
+        {
+          m_pcEntropyDecoderIf->parseDeltaDC( pcCU, uiAbsPartIdx + uiPartOffset*iPart, uiDepth + ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) );
+        }
+      }
+    }
+    else
+    {
+      m_pcEntropyDecoderIf->parseDeltaDC( pcCU, uiAbsPartIdx, uiDepth );
+      return;
+    }
+  }
+#else
+#if H_3D_DIM_SDC
+  if( pcCU->getSDCFlag( uiAbsPartIdx ) )
+  {
+    assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
+    assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );
+    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );
+    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
+    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
     return;
   }
@@ -737,4 +779,5 @@
   }
 #endif
+#endif
 
   if( pcCU->isIntra(uiAbsPartIdx) )
@@ -760,4 +803,26 @@
 
 #if H_3D_INTER_SDC
+#if QC_SDC_UNIFY_G0130
+Void TDecEntropy::decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
+{
+  pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth );
+
+  if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) || 
+    ( pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getVpsDepthModesFlag( pcCU->getSlice()->getLayerIdInVps() ) ) )
+  {
+    return;
+  }
+
+  if( !pcCU->getSlice()->getIsDepth() || ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N ) || pcCU->isSkipped( uiAbsPartIdx ) )
+  {
+    return;
+  }
+
+  assert( ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) );
+
+  m_pcEntropyDecoderIf->parseSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
+}
+
+#else
 Void TDecEntropy::decodeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
@@ -798,4 +863,5 @@
 }
 #endif
+#endif
 
 //! \}
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.h
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.h	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.h	(revision 782)
@@ -96,6 +96,11 @@
 #endif
 #if H_3D_INTER_SDC
+#if QC_SDC_UNIFY_G0130
+  virtual Void parseDeltaDC       ( TComDataCU* pcCU, UInt absPartIdx, UInt depth ) = 0;
+  virtual Void parseSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
+#else
   virtual Void parseInterSDCFlag  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
   virtual Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) = 0;
+#endif
 #endif
   virtual Void parsePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
@@ -179,7 +184,11 @@
 #endif
 #if H_3D_INTER_SDC
+#if QC_SDC_UNIFY_G0130
+  Void decodeSDCFlag           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
+#else
   Void decodeInterSDCFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void decodeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
 #endif
+#endif
   Void decodeIPCMInfo          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
 
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 782)
@@ -89,5 +89,7 @@
 #if QC_GENERIC_SDC_G0122
 , m_cAngleFlagSCModel         ( 1,             1,               NUM_ANGLE_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels)
+#if !QC_SDC_UNIFY_G0130
 , m_cIntraSdcFlagSCModel      ( 1,             1,               NUM_INTRASDC_FLAG_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
+#endif
 #endif
 #if H_3D_DIM_DMM
@@ -99,8 +101,11 @@
 #endif
 #endif
-#if H_3D_INTER_SDC
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
 , m_cInterSDCFlagSCModel             ( 1,             1,  NUM_INTER_SDC_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cInterSDCResidualSCModel         ( 1,             1,  NUM_INTER_SDC_RESIDUAL_CTX       , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cInterSDCResidualSignFlagSCModel ( 1,             1,  NUM_INTER_SDC_SIGN_FLAG_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
+#endif
+#if QC_SDC_UNIFY_G0130
+, m_cSDCFlagSCModel                  ( 1,             1,  NUM_SDC_FLAG_CTX                 , m_contextModels + m_numContextModels, m_numContextModels)
 #endif
 {
@@ -176,5 +181,7 @@
 #if QC_GENERIC_SDC_G0122
   m_cAngleFlagSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_ANGLE_FLAG );
+#if !QC_SDC_UNIFY_G0130
   m_cIntraSdcFlagSCModel.initBuffer      ( sliceType, qp, (UChar*)INIT_INTRASDC_FLAG );
+#endif
 #endif
 #if H_3D_DIM_DMM
@@ -186,8 +193,11 @@
 #endif
 #endif
-#if H_3D_INTER_SDC
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
   m_cInterSDCFlagSCModel.initBuffer       ( sliceType, qp, (UChar*)INIT_INTER_SDC_FLAG );
   m_cInterSDCResidualSCModel.initBuffer   ( sliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL );
   m_cInterSDCResidualSignFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_SIGN_FLAG );
+#endif
+#if QC_SDC_UNIFY_G0130
+  m_cSDCFlagSCModel.initBuffer            ( sliceType, qp, (UChar*)INIT_SDC_FLAG );
 #endif
   m_uiLastDQpNonZero  = 0;
@@ -249,5 +259,7 @@
 #if QC_GENERIC_SDC_G0122
   m_cAngleFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG );
+#if !QC_SDC_UNIFY_G0130
   m_cIntraSdcFlagSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_INTRASDC_FLAG );
+#endif
 #endif
 #if H_3D_DIM_DMM
@@ -259,8 +271,11 @@
 #endif
 #endif
-#if H_3D_INTER_SDC
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
   m_cInterSDCFlagSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG );
   m_cInterSDCResidualSCModel.initBuffer   ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL );
   m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG );
+#endif
+#if QC_SDC_UNIFY_G0130
+  m_cSDCFlagSCModel.initBuffer            ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
 #endif
   m_pcTDecBinIf->start();
@@ -1065,5 +1080,5 @@
   default: break;
   }
-
+#if !QC_SDC_UNIFY_G0130
   if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) )
   {
@@ -1109,5 +1124,5 @@
     }
   }
-
+#endif
   pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth );
 }
@@ -1128,5 +1143,5 @@
   uiIsDimMode = uiSymbol ? 0 : 1;
   pcCU->setLumaIntraDirSubParts( 0, absPartIdx, depth );
-
+#if !QC_SDC_UNIFY_G0130
   if( pcCU->getPartitionSize( absPartIdx ) == SIZE_2Nx2N ) //SDC is allowed only in this case
   {
@@ -1139,5 +1154,5 @@
 
   pcCU->setSDCFlagSubParts( uiSymbol, absPartIdx, depth );
-
+#endif
   //decode DMM index
   if( uiIsDimMode )
@@ -2164,4 +2179,89 @@
 
 #if H_3D_INTER_SDC
+#if QC_SDC_UNIFY_G0130
+Void TDecSbac::parseDeltaDC( TComDataCU* pcCU, UInt absPartIdx, UInt depth )
+{
+  if( ! ( pcCU->getSDCFlag( absPartIdx ) || ( pcCU->isIntra( absPartIdx ) && getDimType( pcCU->getLumaIntraDir( absPartIdx ) ) < DIM_NUM_TYPE ) ) )
+  {
+    assert( 0 );
+  }
+
+  UInt symbol = 0;
+  UInt uiNumSegments = 0;
+
+  if( pcCU->isIntra( absPartIdx ) )
+  {
+    UInt dir     = pcCU->getLumaIntraDir( absPartIdx );
+    uiNumSegments = isDimMode( dir ) ? 2 : 1;
+
+    m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get( 0, 0, uiNumSegments-1 ) );
+
+    if( pcCU->getSDCFlag( absPartIdx ) )
+    {
+      assert( pcCU->getPartitionSize( absPartIdx ) == SIZE_2Nx2N );
+      pcCU->setTrIdxSubParts( 0, absPartIdx, depth );
+      pcCU->setCbfSubParts( 1, 1, 1, absPartIdx, depth );
+    }
+    else
+    {
+      pcCU->setLumaIntraDirSubParts( dir + symbol, absPartIdx, depth );
+    }
+  }
+  else
+  {
+    PartSize cPartSize = pcCU->getPartitionSize( absPartIdx );
+
+    uiNumSegments = ( cPartSize == SIZE_2Nx2N ) ? 1 : ( cPartSize == SIZE_NxN ? 4 : 2 );
+    symbol = 1;
+  }
+
+
+  for( UInt segment = 0; segment < uiNumSegments; segment++ )
+  {
+    Pel valDeltaDC = 0;
+    if( symbol )
+    {
+      xParseDimDeltaDC( valDeltaDC, uiNumSegments );
+    }
+
+    if( pcCU->isIntra( absPartIdx ) )
+    {
+      UInt dir     = pcCU->getLumaIntraDir( absPartIdx );
+
+      if( pcCU->getSDCFlag( absPartIdx ) )
+      {
+        pcCU->setSDCSegmentDCOffset( valDeltaDC, segment, absPartIdx );
+      }
+      else
+      {
+        pcCU->setDimDeltaDC( getDimType( dir ), segment, absPartIdx, valDeltaDC );
+      }
+    }
+    else
+    {
+      pcCU->setSDCSegmentDCOffset( valDeltaDC, segment, absPartIdx );
+    }
+  }
+}
+
+Void TDecSbac::parseSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
+{
+  UInt uiSymbol = 0;
+  UInt uiCtxSDCFlag = pcCU->getCtxSDCFlag( uiAbsPartIdx );
+
+  m_pcTDecBinIf->decodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) );
+
+  if( uiSymbol )
+  {
+    pcCU->setSDCFlagSubParts( true, uiAbsPartIdx, uiDepth );
+    pcCU->setTrIdxSubParts( 0, uiAbsPartIdx, uiDepth );
+    pcCU->setCbfSubParts( 1, 1, 1, uiAbsPartIdx, uiDepth );
+  }
+  else
+  {
+    pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth );
+  }
+}
+#else
 Void TDecSbac::parseInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
@@ -2198,4 +2298,5 @@
 }
 #endif
+#endif
 
 //! \}
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecSbac.h	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecSbac.h	(revision 782)
@@ -112,6 +112,11 @@
 #endif
 #if H_3D_INTER_SDC
+#if QC_SDC_UNIFY_G0130
+  Void  parseDeltaDC         ( TComDataCU* pcCU, UInt absPartIdx, UInt depth );
+  Void  parseSDCFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
+#else
   Void  parseInterSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void  parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );
+#endif
 #endif
 private:
@@ -213,5 +218,7 @@
 #if QC_GENERIC_SDC_G0122
   ContextModel3DBuffer m_cAngleFlagSCModel;
+#if !QC_SDC_UNIFY_G0130
   ContextModel3DBuffer m_cIntraSdcFlagSCModel;
+#endif
 #endif
 #if H_3D_DIM_DMM
@@ -223,9 +230,12 @@
 #endif
 #endif
-#if H_3D_INTER_SDC
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
   ContextModel3DBuffer m_cInterSDCFlagSCModel;
   ContextModel3DBuffer m_cInterSDCResidualSCModel;
   ContextModel3DBuffer m_cInterSDCResidualSignFlagSCModel;
 #endif
+#if QC_SDC_UNIFY_G0130
+  ContextModel3DBuffer m_cSDCFlagSCModel;
+#endif
 };
 
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 782)
@@ -2513,4 +2513,15 @@
 
 #if H_3D_INTER_SDC
+#if QC_SDC_UNIFY_G0130
+Void TEncCavlc::codeDeltaDC( TComDataCU* pcCU, UInt uiAbsPartIdx )
+{
+  assert(0);
+}
+
+Void TEncCavlc::codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx )
+{
+  assert(0);
+}
+#else
 Void TEncCavlc::codeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx )
 {
@@ -2523,3 +2534,4 @@
 }
 #endif
+#endif
 //! \}
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.h
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.h	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.h	(revision 782)
@@ -138,6 +138,11 @@
 #endif
 #if H_3D_INTER_SDC
+#if QC_SDC_UNIFY_G0130
+  Void codeDeltaDC       ( TComDataCU* pcCU, UInt uiAbsPartIdx );
+  Void codeSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx );
+#else
   Void codeInterSDCFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx );
   Void codeInterSDCResidualData  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment );
+#endif
 #endif
 
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp	(revision 782)
@@ -1588,5 +1588,7 @@
   
   m_pcEntropyCoder->encodePartSize( pcCU, uiAbsPartIdx, uiDepth );
-  
+#if QC_SDC_UNIFY_G0130
+  m_pcEntropyCoder->encodeSDCFlag( pcCU, uiAbsPartIdx, false );
+#endif
   if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N )
   {
@@ -1609,5 +1611,5 @@
   m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx );
 #endif
-#if H_3D_INTER_SDC
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
   m_pcEntropyCoder->encodeInterSDCFlag( pcCU, uiAbsPartIdx, false );
 #endif
@@ -2285,4 +2287,7 @@
   m_pcEntropyCoder->encodePredMode( rpcTempCU, 0,          true );
   m_pcEntropyCoder->encodePartSize( rpcTempCU, 0, uiDepth, true );
+#if QC_SDC_UNIFY_G0130
+  m_pcEntropyCoder->encodeSDCFlag( rpcTempCU, 0, true );
+#endif
   m_pcEntropyCoder->encodePredInfo( rpcTempCU, 0,          true );
   m_pcEntropyCoder->encodeIPCMInfo(rpcTempCU, 0, true );
@@ -2374,4 +2379,7 @@
   m_pcEntropyCoder->encodePredMode ( rpcTempCU, 0,          true );
   m_pcEntropyCoder->encodePartSize ( rpcTempCU, 0, uiDepth, true );
+#if QC_SDC_UNIFY_G0130
+  m_pcEntropyCoder->encodeSDCFlag( rpcTempCU, 0, true );
+#endif
   m_pcEntropyCoder->encodeIPCMInfo ( rpcTempCU, 0, true );
 
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 782)
@@ -649,7 +649,7 @@
   UInt uiLumaOffset   = uiMinCoeffSize*uiAbsPartIdx;
   UInt uiChromaOffset = uiLumaOffset>>2;
-    
+#if QC_SDC_UNIFY_G0130
 #if H_3D_DIM_SDC
-  if( pcCU->getSDCFlag( uiAbsPartIdx ) )
+  if( pcCU->getSDCFlag( uiAbsPartIdx ) && pcCU->isIntra( uiAbsPartIdx ) )
   {
     assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
@@ -658,18 +658,61 @@
     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
-    return;
   }
 #endif
 
 #if H_3D_INTER_SDC
-  if( pcCU->getInterSDCFlag( uiAbsPartIdx ) )
+  if( pcCU->getSDCFlag( uiAbsPartIdx ) && !pcCU->isIntra( uiAbsPartIdx ) )
   {
     assert( !pcCU->isSkipped( uiAbsPartIdx ) );
     assert( !pcCU->isIntra( uiAbsPartIdx) );
     assert( pcCU->getSlice()->getIsDepth() );
+  }
+#endif
+
+  if( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) )
+  {
+    Int iPartNum = ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) ? 4 : 1;
+    UInt uiPartOffset = ( pcCU->getPic()->getNumPartInCU() >> ( pcCU->getDepth( uiAbsPartIdx ) << 1 ) ) >> 2;
+
+    if( !pcCU->getSDCFlag( uiAbsPartIdx ) )
+    {
+      for( Int iPart = 0; iPart < iPartNum; iPart++ )
+      {
+        if( getDimType( pcCU->getLumaIntraDir( uiAbsPartIdx + uiPartOffset*iPart ) ) < DIM_NUM_TYPE ) 
+        {
+          m_pcEntropyCoderIf->codeDeltaDC( pcCU, uiAbsPartIdx + uiPartOffset*iPart );
+        }
+      }
+    }
+    else
+    {
+      m_pcEntropyCoderIf->codeDeltaDC( pcCU, uiAbsPartIdx );
+      return;
+    }
+  }
+#else
+#if H_3D_DIM_SDC
+  if( pcCU->getSDCFlag( uiAbsPartIdx ) )
+  {
+    assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
+    assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );
+    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );
+    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
+    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
+    return;
+  }
+#endif
+
+#if H_3D_INTER_SDC
+  if( pcCU->getInterSDCFlag( uiAbsPartIdx ) )
+  {
+    assert( !pcCU->isSkipped( uiAbsPartIdx ) );
+    assert( !pcCU->isIntra( uiAbsPartIdx) );
+    assert( pcCU->getSlice()->getIsDepth() );
 
     encodeInterSDCResidualData( pcCU, uiAbsPartIdx, false );
     return;
   }
+#endif
 #endif
 
@@ -825,4 +868,33 @@
 
 #if H_3D_INTER_SDC
+#if QC_SDC_UNIFY_G0130
+Void TEncEntropy::encodeDeltaDC  ( TComDataCU* pcCU, UInt absPartIdx )
+{
+  m_pcEntropyCoderIf->codeDeltaDC( pcCU, absPartIdx );
+}
+
+Void TEncEntropy::encodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
+{
+  if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) || 
+    ( pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getVpsDepthModesFlag( pcCU->getSlice()->getLayerIdInVps() ) ) )
+  {
+    return;
+  }
+
+  if( !pcCU->getSlice()->getIsDepth() || ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N ) || pcCU->isSkipped( uiAbsPartIdx ) )
+  {
+    return;
+  }
+
+  assert( ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) );
+
+  if( bRD )
+  {
+    uiAbsPartIdx = 0;
+  }
+
+  m_pcEntropyCoderIf->codeSDCFlag( pcCU, uiAbsPartIdx );
+}
+#else
 Void TEncEntropy::encodeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
 {
@@ -872,4 +944,5 @@
 }
 #endif
+#endif
 
 //! \}
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.h
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.h	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.h	(revision 782)
@@ -95,6 +95,11 @@
 #endif
 #if H_3D_INTER_SDC
+#if QC_SDC_UNIFY_G0130
+  virtual Void codeDeltaDC       ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
+  virtual Void codeSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
+#else
   virtual Void codeInterSDCFlag  ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
   virtual Void codeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ) = 0;
+#endif
 #endif
   virtual Void codeSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
@@ -186,6 +191,11 @@
 #endif
 #if H_3D_INTER_SDC
+#if QC_SDC_UNIFY_G0130
+  Void encodeDeltaDC      ( TComDataCU* pcCU, UInt absPartIdx );
+  Void encodeSDCFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
+#else
   Void encodeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
   Void encodeInterSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD );
+#endif
 #endif
   Void encodePredMode          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 782)
@@ -95,5 +95,7 @@
 #if QC_GENERIC_SDC_G0122
 , m_cAngleFlagSCModel         ( 1,             1,               NUM_ANGLE_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels)
+#if !QC_SDC_UNIFY_G0130
 , m_cIntraSdcFlagSCModel      ( 1,             1,               NUM_INTRASDC_FLAG_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
+#endif
 #endif
 #if H_3D_DIM_DMM
@@ -105,8 +107,11 @@
 #endif
 #endif
-#if H_3D_INTER_SDC
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
 , m_cInterSDCFlagSCModel             ( 1,             1,  NUM_INTER_SDC_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cInterSDCResidualSCModel         ( 1,             1,  NUM_INTER_SDC_RESIDUAL_CTX       , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cInterSDCResidualSignFlagSCModel ( 1,             1,  NUM_INTER_SDC_SIGN_FLAG_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
+#endif
+#if QC_SDC_UNIFY_G0130
+, m_cSDCFlagSCModel                  ( 1,             1,  NUM_SDC_FLAG_CTX                 , m_contextModels + m_numContextModels, m_numContextModels)
 #endif
 {
@@ -174,5 +179,7 @@
 #if QC_GENERIC_SDC_G0122
   m_cAngleFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG );
+#if !QC_SDC_UNIFY_G0130
   m_cIntraSdcFlagSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_INTRASDC_FLAG );
+#endif
 #endif
 #if H_3D_DIM_DMM
@@ -184,8 +191,11 @@
 #endif
 #endif
-#if H_3D_INTER_SDC
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
   m_cInterSDCFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG );
   m_cInterSDCResidualSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL );
   m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG );
+#endif
+#if QC_SDC_UNIFY_G0130
+  m_cSDCFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
 #endif
   // new structure
@@ -226,8 +236,11 @@
       curCost += m_cCUICFlagSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_IC_FLAG );
 #endif
-#if H_3D_INTER_SDC
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
       curCost += m_cInterSDCFlagSCModel.calcCost      ( curSliceType, qp, (UChar*)INIT_INTER_SDC_FLAG );
       curCost += m_cInterSDCResidualSCModel.calcCost  ( curSliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL );
       curCost += m_cInterSDCResidualSignFlagSCModel.calcCost( curSliceType, qp, (UChar*)INIT_INTER_SDC_SIGN_FLAG );
+#endif
+#if QC_SDC_UNIFY_G0130
+      curCost += m_cSDCFlagSCModel.calcCost           ( curSliceType, qp, (UChar*)INIT_SDC_FLAG );
 #endif
       curCost += m_cCUPartSizeSCModel.calcCost        ( curSliceType, qp, (UChar*)INIT_PART_SIZE );
@@ -262,5 +275,7 @@
 #if QC_GENERIC_SDC_G0122
       curCost += m_cAngleFlagSCModel.calcCost         ( curSliceType, qp, (UChar*)INIT_ANGLE_FLAG );  
+#if !QC_SDC_UNIFY_G0130
       curCost += m_cIntraSdcFlagSCModel.calcCost      ( curSliceType, qp, (UChar*)INIT_INTRASDC_FLAG );  
+#endif
 #endif
 #if H_3D_DIM_DMM
@@ -331,5 +346,7 @@
 #if QC_GENERIC_SDC_G0122
   m_cAngleFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG );
+#if !QC_SDC_UNIFY_G0130
   m_cIntraSdcFlagSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_INTRASDC_FLAG );
+#endif
 #endif
 #if H_3D_DIM_DMM
@@ -341,8 +358,11 @@
 #endif
 #endif
-#if H_3D_INTER_SDC
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
   m_cInterSDCFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG );
   m_cInterSDCResidualSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL );
   m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG );
+#endif
+#if QC_SDC_UNIFY_G0130
+  m_cSDCFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
 #endif
   m_pcBinIf->start();
@@ -647,5 +667,7 @@
 #if QC_GENERIC_SDC_G0122
   this->m_cAngleFlagSCModel      .copyFrom( &pSrc->m_cAngleFlagSCModel );
+#if !QC_SDC_UNIFY_G0130
   this->m_cIntraSdcFlagSCModel   .copyFrom( &pSrc->m_cIntraSdcFlagSCModel );
+#endif
 #endif
 }
@@ -1169,5 +1191,5 @@
   default: break;
   }
-
+#if !QC_SDC_UNIFY_G0130
   if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) )
   {
@@ -1206,4 +1228,5 @@
     }
   }
+#endif
 }
 
@@ -1217,10 +1240,10 @@
     m_pcBinIf->encodeBin( isDimMode( dir ) ? 0 : 1, m_cAngleFlagSCModel.get( 0, 0, pcCU->getCtxAngleFlag( absPartIdx ) ) );
   }
-
+#if !QC_SDC_UNIFY_G0130
   if( pcCU->getPartitionSize( absPartIdx ) == SIZE_2Nx2N ) //SDC is allowed only in this case
   {
     m_pcBinIf->encodeBin( pcCU->getSDCFlag( absPartIdx ) ? 1 : 0, m_cIntraSdcFlagSCModel.get( 0, 0, pcCU->getCtxSDCFlag( absPartIdx ) ) );
   }
-
+#endif
   if( isDimMode( dir ) )
   {
@@ -2200,4 +2223,75 @@
 
 #if H_3D_INTER_SDC
+#if QC_SDC_UNIFY_G0130
+Void TEncSbac::codeDeltaDC( TComDataCU* pcCU, UInt absPartIdx )
+{
+  if( !( pcCU->getSDCFlag( absPartIdx ) || ( pcCU->isIntra( absPartIdx ) && getDimType( pcCU->getLumaIntraDir( absPartIdx ) ) < DIM_NUM_TYPE ) ) )
+  {
+    assert( 0 );
+  }
+
+  UInt uiNumSegments = 0;
+  UInt dimDeltaDC = 0;
+
+  if( pcCU->isIntra( absPartIdx ) )
+  {
+    UInt dir     = pcCU->getLumaIntraDir( absPartIdx );
+    uiNumSegments = isDimMode( dir ) ? 2 : 1;
+
+    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 ) );
+  }
+  else //all-zero inter SDC is not allowed
+  {
+    PartSize cPartSize = pcCU->getPartitionSize( absPartIdx );
+
+    uiNumSegments = ( cPartSize == SIZE_2Nx2N ) ? 1 : ( cPartSize == SIZE_NxN ? 4 : 2 );
+    dimDeltaDC = 1;
+  }
+
+  if( dimDeltaDC )
+  {
+    for( UInt segment = 0; segment < uiNumSegments; segment++ )
+    {
+      Pel deltaDC = 0;
+
+      if( pcCU->isIntra( absPartIdx ) )
+      {
+        UInt dir     = pcCU->getLumaIntraDir( absPartIdx );
+        deltaDC = pcCU->getSDCFlag( absPartIdx ) ? pcCU->getSDCSegmentDCOffset( segment, absPartIdx ) : pcCU->getDimDeltaDC( getDimType( dir ), segment, absPartIdx );
+      }
+      else
+      {
+        deltaDC = pcCU->getSDCSegmentDCOffset( segment, absPartIdx );
+      }
+
+      xCodeDimDeltaDC( deltaDC, uiNumSegments );
+    }
+  }
+}
+
+Void TEncSbac::codeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
+{
+  UInt uiSymbol = pcCU->getSDCFlag( uiAbsPartIdx ) ? 1 : 0;
+  UInt uiCtxSDCFlag = pcCU->getCtxSDCFlag( uiAbsPartIdx );
+
+  m_pcBinIf->encodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) );
+}
+#else
 Void TEncSbac::codeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
 {
@@ -2221,3 +2315,4 @@
 }
 #endif
+#endif
 //! \}
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSbac.h
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSbac.h	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSbac.h	(revision 782)
@@ -154,6 +154,11 @@
 #endif
 #if H_3D_INTER_SDC
+#if QC_SDC_UNIFY_G0130
+  Void codeDeltaDC       ( TComDataCU* pcCU, UInt absPartIdx );
+  Void codeSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx );
+#else
   Void codeInterSDCFlag  ( TComDataCU* pcCU, UInt uiAbsPartIdx );
   Void codeInterSDCResidualData  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment );
+#endif
 #endif
   Void codeSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
@@ -249,5 +254,7 @@
 #if QC_GENERIC_SDC_G0122
   ContextModel3DBuffer m_cAngleFlagSCModel;
+#if !QC_SDC_UNIFY_G0130
   ContextModel3DBuffer m_cIntraSdcFlagSCModel;
+#endif
 #endif
 #if H_3D_DIM_DMM
@@ -259,9 +266,12 @@
 #endif
 #endif
-#if H_3D_INTER_SDC
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
   ContextModel3DBuffer m_cInterSDCFlagSCModel;
   ContextModel3DBuffer m_cInterSDCResidualSCModel;
   ContextModel3DBuffer m_cInterSDCResidualSignFlagSCModel;
 #endif
+#if QC_SDC_UNIFY_G0130
+  ContextModel3DBuffer m_cSDCFlagSCModel;
+#endif
 };
 
Index: branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 781)
+++ branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 782)
@@ -921,5 +921,7 @@
       
       m_pcEntropyCoder  ->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
-
+#if QC_SDC_UNIFY_G0130
+      m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
+#endif
       if (pcCU->isIntra(0) && pcCU->getPartitionSize(0) == SIZE_2Nx2N )
       {
@@ -956,4 +958,19 @@
       }
     }
+#if QC_SDC_UNIFY_G0130
+    Int iPartNum = ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) ? 4 : 1;
+    UInt uiPartOffset = ( pcCU->getPic()->getNumPartInCU() >> ( pcCU->getDepth( uiAbsPartIdx ) << 1 ) ) >> 2;
+
+    if( !pcCU->getSDCFlag( uiAbsPartIdx ) )
+    {
+      for( Int iPart = 0; iPart < iPartNum; iPart++ )
+      {
+        if( getDimType( pcCU->getLumaIntraDir( uiAbsPartIdx + uiPartOffset*iPart ) ) < DIM_NUM_TYPE ) 
+        {
+          m_pcEntropyCoder->encodeDeltaDC( pcCU, uiAbsPartIdx + uiPartOffset*iPart );
+        }
+      }
+    }
+#endif
   }
   if( bChroma )
@@ -2047,8 +2064,27 @@
   
   // encode reduced intra header
+#if QC_SDC_UNIFY_G0130
+  if( !pcCU->getSlice()->isIntra() )
+  {
+    if (pcCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
+    {
+      m_pcEntropyCoder->encodeCUTransquantBypassFlag( pcCU, 0, true );
+    }
+    m_pcEntropyCoder->encodeSkipFlag( pcCU, 0, true );
+    m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
+  }
+
+  m_pcEntropyCoder->encodePartSize( pcCU, 0, true );
+  m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
+#else
   m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
+#endif
   
   // encode pred direction + DC residual data
   m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
+#if QC_SDC_UNIFY_G0130
+  Bool bDummy = false;
+  m_pcEntropyCoder->encodeCoeff( pcCU, 0, pcCU->getDepth( 0 ), uiWidth, uiHeight, bDummy );
+#endif
   UInt uiBits = m_pcEntropyCoder->getNumberOfWrittenBits();
   
@@ -5603,6 +5639,9 @@
     return;
   }
-
+#if QC_SDC_UNIFY_G0130
+  pcCU->setSDCFlagSubParts( true, 0, uiDepth );
+#else
   pcCU->setInterSDCFlagSubParts( true, 0, 0, uiDepth );
+#endif
 
   UInt  uiWidth      = pcCU->getWidth ( 0 );
@@ -5642,6 +5681,9 @@
     Int iResiOffset = ( pResDC [uiSeg] > 0 ? ( uiSegSize[uiSeg] >> 1 ) : -1*( uiSegSize[uiSeg] >> 1 ) );
     pResDC [uiSeg]  = ( pResDC [uiSeg] + iResiOffset ) / (Int) uiSegSize[uiSeg];
-
+#if QC_SDC_UNIFY_G0130
+    pcCU->setSDCSegmentDCOffset( pResDC[uiSeg], uiSeg, 0 );
+#else
     pcCU->setInterSDCSegmentDCOffset( pResDC[uiSeg], uiSeg, 0 );
+#endif
   }
 
@@ -5698,8 +5740,16 @@
 #endif
 
+#if QC_SDC_UNIFY_G0130
+  Bool bNonSkip = false;
+#else
   Bool bNonSkip = true;
+#endif
   for( UInt uiSeg = 0; uiSeg < uiSegmentNum; uiSeg++ )
   {
+#if QC_SDC_UNIFY_G0130
+    bNonSkip |= ( pcCU->getSDCSegmentDCOffset( uiSeg, 0 ) != 0 ) ? 1 : 0;
+#else
     bNonSkip &= ( pcCU->getInterSDCSegmentDCOffset( uiSeg, 0 ) != 0 ) ? 1 : 0;
+#endif
   }
 
@@ -6912,4 +6962,7 @@
     m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
     m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
+#if QC_SDC_UNIFY_G0130
+    m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
+#endif
     m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
 #if H_3D_IC
@@ -6919,5 +6972,5 @@
     m_pcEntropyCoder->encodeARPW( pcCU , 0 );
 #endif
-#if H_3D_INTER_SDC
+#if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
     m_pcEntropyCoder->encodeInterSDCFlag( pcCU, 0, true );
 #endif
