Index: /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComDataCU.h	(revision 1000)
+++ /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComDataCU.h	(revision 1001)
@@ -766,4 +766,10 @@
 
 #endif
+
+#if SHARP_DMM1_I0110
+  Bool         isDMM1UpscaleMode       ( UInt uiWidth ){ Bool bDMM1UpsampleModeFlag = true; UInt uiBaseWidth = 16; if( uiBaseWidth >= uiWidth ){ bDMM1UpsampleModeFlag = false; } return bDMM1UpsampleModeFlag; };
+  UInt         getDMM1BasePatternWidth ( UInt uiWidth ){ UInt uiBaseWidth = 16; if( uiBaseWidth >= uiWidth ){ uiBaseWidth =  uiWidth; } return uiBaseWidth; }
+#endif
+
 };
 
Index: /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComPrediction.cpp	(revision 1000)
+++ /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComPrediction.cpp	(revision 1001)
@@ -440,5 +440,11 @@
     case( DMM1_IDX ): 
       {
+#if SHARP_DMM1_I0110
+        dmmSegmentation = pcCU->isDMM1UpscaleMode((UInt)iWidth) ? 
+            &(g_dmmWedgeLists[ g_aucConvertToBit[pcCU->getDMM1BasePatternWidth((UInt)iWidth)] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]) : 
+            &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]);
+#else
         dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]);
+#endif
       } break;
     case( DMM4_IDX ): 
@@ -458,6 +464,19 @@
     }
     assert( dmmSegmentation );
+#if SHARP_DMM1_I0110
+    if( dimType == DMM1_IDX && pcCU->isDMM1UpscaleMode((UInt)iWidth) ) 
+    {
+        biSegPattern = dmmSegmentation->getScaledPattern((UInt)iWidth);
+        patternStride = iWidth;
+    } 
+    else 
+    { 
+        biSegPattern  = dmmSegmentation->getPattern();
+        patternStride = dmmSegmentation->getStride ();
+    }
+#else
     biSegPattern  = dmmSegmentation->getPattern();
     patternStride = dmmSegmentation->getStride ();
+#endif
   }
 #endif
Index: /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComRom.cpp
===================================================================
--- /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComRom.cpp	(revision 1000)
+++ /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComRom.cpp	(revision 1001)
@@ -336,7 +336,13 @@
   HALF_PEL,    //   8x8
   FULL_PEL,    //  16x16
+#if SHARP_DMM1_I0110
+  FULL_PEL,    //  32x32
+  FULL_PEL,    //  64x64
+  FULL_PEL     // 128x128
+#else
   DOUBLE_PEL,  //  32x32
   DOUBLE_PEL,  //  64x64
   DOUBLE_PEL   // 128x128
+#endif
 };
 
@@ -348,4 +354,8 @@
 { //2x2   4x4   8x8 16x16 32x32 64x64
      0,    4,    7,    8,    8,    0 };
+
+#if SHARP_DMM1_I0110
+Bool g_wedgePattern[32*32];
+#endif
 
 extern std::vector< std::vector<TComWedgelet> >   g_dmmWedgeLists;
@@ -646,5 +656,9 @@
   if( !g_dmmWedgeLists.empty() ) return;
 
+#if SHARP_DMM1_I0110
+  for( UInt ui = g_aucConvertToBit[DIM_MIN_SIZE]; ui < (g_aucConvertToBit[DIM_MAX_SIZE]); ui++ )
+#else
   for( UInt ui = g_aucConvertToBit[DIM_MIN_SIZE]; ui < (g_aucConvertToBit[DIM_MAX_SIZE]+1); ui++ )
+#endif
   {
     UInt uiWedgeBlockSize = ((UInt)DIM_MIN_SIZE)<<ui;
@@ -730,5 +744,7 @@
   switch( eWedgeRes )
   {
+#if !SHARP_DMM1_I0110
   case( DOUBLE_PEL ): { uiBlockSize = (uiWidth>>1); break; }
+#endif
   case(   FULL_PEL ): { uiBlockSize =  uiWidth;     break; }
   case(   HALF_PEL ): { uiBlockSize = (uiWidth<<1); break; }
Index: /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComRom.h
===================================================================
--- /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComRom.h	(revision 1000)
+++ /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComRom.h	(revision 1001)
@@ -166,4 +166,8 @@
 extern const UChar                                           g_dmm3IntraTabIdxBits[6];
 
+#if SHARP_DMM1_I0110
+extern Bool                                                  g_wedgePattern[32*32];
+#endif 
+
 extern       std::vector< std::vector<TComWedgelet> >        g_dmmWedgeLists;
 extern       std::vector< std::vector<TComWedgeRef> >        g_dmmWedgeRefLists;
Index: /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComWedgelet.cpp
===================================================================
--- /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComWedgelet.cpp	(revision 1000)
+++ /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComWedgelet.cpp	(revision 1001)
@@ -68,4 +68,7 @@
                                                             m_uiHeight ( rcWedge.m_uiHeight  ),
                                                             m_pbPattern( (Bool*)xMalloc( Bool, (m_uiWidth * m_uiHeight) ) )
+#if SHARP_DMM1_I0110
+                                                            ,m_pbScaledPattern( g_wedgePattern )
+#endif
 {
   ::memcpy( m_pbPattern, rcWedge.m_pbPattern, sizeof(Bool) * (m_uiWidth * m_uiHeight));
@@ -85,4 +88,7 @@
 
   m_pbPattern = (Bool*)xMalloc( Bool, (m_uiWidth * m_uiHeight) );
+#if SHARP_DMM1_I0110
+  m_pbScaledPattern = g_wedgePattern;
+#endif
 }
 
@@ -181,9 +187,12 @@
   switch( m_eWedgeRes )
   {
+#if !SHARP_DMM1_I0110
   case( DOUBLE_PEL ): { uiTempBlockSize =  m_uiWidth;     uhXs = (m_uhXs<<1); uhYs = (m_uhYs<<1); uhXe = (m_uhXe<<1); uhYe = (m_uhYe<<1); } break;
+#endif
   case(   FULL_PEL ): { uiTempBlockSize =  m_uiWidth;     uhXs =  m_uhXs;     uhYs =  m_uhYs;     uhXe =  m_uhXe;     uhYe =  m_uhYe;     } break;
   case(   HALF_PEL ): { uiTempBlockSize = (m_uiWidth<<1); uhXs =  m_uhXs;     uhYs =  m_uhYs;     uhXe =  m_uhXe;     uhYe =  m_uhYe;     } break;
   }
 
+#if !SHARP_DMM1_I0110
   if( m_eWedgeRes == DOUBLE_PEL) // adjust line-end for DOUBLE_PEL resolution
   {
@@ -194,4 +203,5 @@
     if( m_uhOri == 5 ) { uhXs = uiTempBlockSize-1; }
   }
+#endif
 
   Bool* pbTempPattern = new Bool[ (uiTempBlockSize * uiTempBlockSize) ];
@@ -223,5 +233,7 @@
   switch( m_eWedgeRes )
   {
+#if !SHARP_DMM1_I0110
   case( DOUBLE_PEL ): { for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ ) { m_pbPattern[k] = pbTempPattern[k]; }; } break;
+#endif
   case(   FULL_PEL ): { for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ ) { m_pbPattern[k] = pbTempPattern[k]; }; } break;
   case(   HALF_PEL ): // sub-sampling by factor 2
@@ -315,4 +327,25 @@
 }
 
+#if SHARP_DMM1_I0110
+Bool* TComWedgelet::getScaledPattern(UInt uiDstSize)
+{
+    Bool *pbSrcPat = this->getPattern();
+    UInt uiSrcSize = this->getStride();
+
+    Int scale = (g_aucConvertToBit[uiDstSize] - g_aucConvertToBit[uiSrcSize]);
+    assert(scale>=0);
+    for (Int y=0; y<uiDstSize; y++)
+    {
+       for (Int x=0; x<uiDstSize; x++)
+       {
+           Int srcX = x>>scale;
+           Int srcY = y>>scale;
+           m_pbScaledPattern[y*uiDstSize + x] = pbSrcPat[ srcY*uiSrcSize + srcX ];
+       }
+   }
+   return m_pbScaledPattern;
+}
+#endif
+
 TComWedgeNode::TComWedgeNode()
 {
Index: /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComWedgelet.h
===================================================================
--- /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComWedgelet.h	(revision 1000)
+++ /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComWedgelet.h	(revision 1001)
@@ -79,5 +79,7 @@
 enum WedgeResolution
 {
+#if !SHARP_DMM1_I0110
   DOUBLE_PEL,
+#endif
   FULL_PEL,
   HALF_PEL
@@ -104,4 +106,7 @@
 
   Bool* m_pbPattern;
+#if SHARP_DMM1_I0110
+  Bool* m_pbScaledPattern;
+#endif
 
   Void  xGenerateWedgePattern();
@@ -129,4 +134,7 @@
   Bool            getIsCoarse() { return m_bIsCoarse; }
   UInt            getAng     () { return m_uiAng; }
+#if SHARP_DMM1_I0110
+  Bool*           getScaledPattern(UInt uiWidth);
+#endif
 
   Void  setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes, Bool bIsCoarse = false );
Index: /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TypeDef.h	(revision 1000)
+++ /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TypeDef.h	(revision 1001)
@@ -295,4 +295,5 @@
 #define H_3D_DIM_DLT                      1   // Depth Lookup Table
 #define HS_DMM_SIGNALLING_I0120  1   
+#define SHARP_DMM1_I0110                  1   // LUT size reduction for DMM1 proposed in JCT3V-I0110 
 #define FIX_WARNING                       1   // fix narrowing conversion of NumPocStCurr0,NumPocStCurr1 at TComSlice.cpp
 
Index: /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1000)
+++ /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1001)
@@ -1298,11 +1298,21 @@
   {
     Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx);
-    
+
+#if SHARP_DMM1_I0110
+    WedgeList* pacWedgeList  = pcCU->isDMM1UpscaleMode(uiWidth) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] :  &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
+#else
     WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
+#endif
     TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx ));
-    
+
     uiNumSegments = 2;
+
+#if SHARP_DMM1_I0110
+    pbMask       = pcCU->isDMM1UpscaleMode( uiWidth ) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern();
+    uiMaskStride = pcCU->isDMM1UpscaleMode( uiWidth ) ? uiWidth : pcWedgelet->getStride();
+#else
     pbMask = pcWedgelet->getPattern();
     uiMaskStride = pcWedgelet->getStride();
+#endif
   }
   if( getDimType( uiLumaPredMode ) == DMM4_IDX )
Index: /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1000)
+++ /branches/HTM-11.2-dev3-Sharp/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1001)
@@ -1970,7 +1970,16 @@
       UInt dimType   = getDimType  ( uiLumaPredMode );
       UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx);
+#if SHARP_DMM1_I0110
+      UInt uiBaseWidth = pcCU->isDMM1UpscaleMode(uiWidth) ? pcCU->getDMM1BasePatternWidth(uiWidth) : uiWidth;
+      if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiBaseWidth]].size() && dimType == DMM1_IDX )
+#else
       if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiWidth]].size() && dimType == DMM1_IDX )
-      {
+#endif
+      {
+#if SHARP_DMM1_I0110
+        if (g_aucConvertToBit[uiBaseWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used.
+#else
         if (g_aucConvertToBit[uiWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used.
+#endif
         {                                    
           patternID = 1349;  // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16
@@ -2034,10 +2043,19 @@
     Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx);
 
+#if SHARP_DMM1_I0110
+    WedgeList* pacWedgeList  = pcCU->isDMM1UpscaleMode( uiWidth ) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
+#else
     WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
+#endif
     TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx ));
 
     uiNumSegments = 2;
+#if SHARP_DMM1_I0110
+    pbMask       = pcCU->isDMM1UpscaleMode( uiWidth ) ? pcWedgelet->getScaledPattern( uiWidth ) : pcWedgelet->getPattern();
+    uiMaskStride = pcCU->isDMM1UpscaleMode( uiWidth ) ? uiWidth : pcWedgelet->getStride();
+#else
     pbMask = pcWedgelet->getPattern();
     uiMaskStride = pcWedgelet->getStride();
+#endif
   }
   if( getDimType( uiLumaPredMode ) == DMM4_IDX )
@@ -3138,5 +3156,10 @@
               xSearchDmm1Wedge( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight, uiTabIdx );
               pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dmmType,  uiPartOffset, uiDepth + uiInitTrDepth );
+#if SHARP_DMM1_I0110
+              biSegmentation = pcCU->isDMM1UpscaleMode( uiWidth ) ? 
+                  &(g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])][uiTabIdx]) : &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]);
+#else
               biSegmentation = &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]);
+#endif
             } break;
 
@@ -3153,5 +3176,15 @@
           if( biSegmentation )
           {
+#if SHARP_DMM1_I0110
+            if( dmmType == DMM1_IDX && pcCU->isDMM1UpscaleMode( uiWidth ) ){
+                xSearchDmmDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, biSegmentation->getScaledPattern(uiWidth), uiWidth, uiWidth, uiHeight, deltaDC1, deltaDC2 );
+            } 
+            else
+            {
+                xSearchDmmDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, biSegmentation->getPattern(), biSegmentation->getStride(), uiWidth, uiHeight, deltaDC1, deltaDC2 );
+            }
+#else
             xSearchDmmDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, biSegmentation->getPattern(), biSegmentation->getStride(), uiWidth, uiHeight, deltaDC1, deltaDC2 );
+#endif
             pcCU->setDimDeltaDC( dmmType, 0, uiPartOffset, deltaDC1 );
             pcCU->setDimDeltaDC( dmmType, 1, uiPartOffset, deltaDC2 );
@@ -7679,6 +7712,11 @@
 
   Pel refDC1 = 0; Pel refDC2 = 0;
+#if SHARP_DMM1_I0110
+  WedgeList*     pacWedgeList     = pcCU->isDMM1UpscaleMode( uiWidth ) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
+  WedgeNodeList* pacWedgeNodeList = pcCU->isDMM1UpscaleMode( uiWidth ) ? &g_dmmWedgeNodeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeNodeLists[(g_aucConvertToBit[uiWidth])];
+#else
   WedgeList*     pacWedgeList     = &g_dmmWedgeLists    [(g_aucConvertToBit[uiWidth])];
   WedgeNodeList* pacWedgeNodeList = &g_dmmWedgeNodeLists[(g_aucConvertToBit[uiWidth])];
+#endif
 
   // coarse wedge search
@@ -7688,6 +7726,13 @@
   {
     TComWedgelet* pcWedgelet = &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx()));
+#if SHARP_DMM1_I0110
+    Bool *pbPattern = pcCU->isDMM1UpscaleMode(uiWidth) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern();
+    UInt uiStride   = pcCU->isDMM1UpscaleMode(uiWidth) ? uiWidth : pcWedgelet->getStride();
+    xCalcBiSegDCs  ( piRef,  uiRefStride,  pbPattern, uiStride, refDC1, refDC2 );
+    xAssignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 );
+#else
     xCalcBiSegDCs  ( piRef,  uiRefStride,  pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );
     xAssignBiSegDCs( piPred, uiPredStride, pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );
+#endif
 
     Dist uiActDist = RDO_DIST_MAX;
@@ -7725,7 +7770,13 @@
     {
       TComWedgelet* pcWedgelet = &(pacWedgeList->at(pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId )));
+#if SHARP_DMM1_I0110
+      Bool *pbPattern = pcCU->isDMM1UpscaleMode(uiWidth) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern();
+      UInt uiStride   = pcCU->isDMM1UpscaleMode(uiWidth) ? uiWidth : pcWedgelet->getStride();
+      xCalcBiSegDCs  ( piRef,  uiRefStride,  pbPattern, uiStride, refDC1, refDC2 );
+      xAssignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 );
+#else
       xCalcBiSegDCs  ( piRef,  uiRefStride,  pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );
       xAssignBiSegDCs( piPred, uiPredStride, pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );
-
+#endif
       Dist uiActDist = RDO_DIST_MAX;
 #if H_3D_VSO
