Changeset 879 in 3DVCSoftware


Ignore:
Timestamp:
27 Mar 2014, 22:31:12 (11 years ago)
Author:
tech
Message:

Cleanups part 4.

Location:
branches/HTM-10.1-dev0/source/Lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp

    r878 r879  
    24722472  if( bL == bT )
    24732473  {
    2474 #if SCU_HS_DEPTH_DC_PRED_G0143
    24752474    const Int  iTRR = ( patternStride * 2 - 1  ) - srcStride;
    24762475    const Int  iLBB = ( patternStride * 2 - 1  ) * srcStride - 1;
    24772476    refDC1 = bL ? ( ptrSrc[iTR] + ptrSrc[iLB] )>>1 : (abs(ptrSrc[iTRR] - ptrSrc[-(Int)srcStride]) > abs(ptrSrc[iLBB] - ptrSrc[ -1]) ? ptrSrc[iTRR] : ptrSrc[iLBB]);
    2478 #else
    2479     refDC1 = bL ? ( ptrSrc[iTR] + ptrSrc[iLB] )>>1 : 1<<( g_bitDepthY - 1 );
    2480 #endif
    24812477    refDC2 =      ( ptrSrc[ -1] + ptrSrc[-(Int)srcStride] )>>1;
    24822478  }
  • branches/HTM-10.1-dev0/source/Lib/TLibCommon/TypeDef.h

    r878 r879  
    185185                                              // Unify intra SDC and inter SDC
    186186                                              // QC_GENERIC_SDC_G0122 Generalize SDC to all depth intra modes
     187                                              // SCU_HS_DEPTH_DC_PRED_G0143
     188                                              // HS_TSINGHUA_SDC_SPLIT_G0111
     189                                              // QC_PKU_SDC_SPLIT_G0123 Intra SDC Split
     190
    187191
    188192
     
    195199                                              // QC_SPIVMP_MPI_G0119 Sub-PU level MPI merge candidate
    196200                                              // Simplification on Sub-PU level temporal interview motion prediction
     201
     202
     203#define H_3D_DBBP                         1   // DBBP: Depth-based Block Partitioning and Merging
     204
     205
    197206#define H_3D_FCO                          0   // Flexible coding order for 3D
    198207
     
    276285
    277286
     287///// ***** DEPTH BASED BLOCK PARTITIONING *********
     288#if H_3D_DBBP
     289#define DBBP_INVALID_SHORT                (-4)
     290#define RWTH_DBBP_PACK_MODE               SIZE_2NxN
     291#endif
     292
     293
    278294///// ***** FCO *********
    279295#if H_3D_FCO
     
    305321#endif
    306322
    307 #define H_3D_DBBP                         1   // DBBP: Depth-based Block Partitioning and Merging
    308 
    309 #if H_3D_DBBP
    310 #define DBBP_INVALID_SHORT                (-4)
    311 #define RWTH_DBBP_PACK_MODE               SIZE_2NxN
    312 #endif
    313 
    314 #if H_3D_DIM
    315 #define QC_PKU_SDC_SPLIT_G0123            1   // Intra SDC Split
    316 #if QC_PKU_SDC_SPLIT_G0123
    317 #define HS_TSINGHUA_SDC_SPLIT_G0111       1
    318 #endif
    319 #define SCU_HS_DEPTH_DC_PRED_G0143        1
    320 
    321 #endif
    322323
    323324
  • branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp

    r878 r879  
    11171117  UInt uiWidth        = pcCU->getWidth  ( 0 );
    11181118  UInt uiHeight       = pcCU->getHeight ( 0 );
    1119 #if QC_PKU_SDC_SPLIT_G0123
    1120 #if HS_TSINGHUA_SDC_SPLIT_G0111
    11211119  TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight );
    1122 #else
    1123   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1124 #endif
    1125 #endif
    1126 #if QC_PKU_SDC_SPLIT_G0123
    11271120  UInt numParts = 1;
    1128   UInt i = 0;
    11291121  UInt sdcDepth    = 0;
    11301122  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
     
    11431135  UInt    uiLumaPredMode = 0; 
    11441136
    1145 #if HS_TSINGHUA_SDC_SPLIT_G0111
    11461137  if ((uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()) > 1)
    11471138  {
     
    11501141    uiWidth = uiHeight = (1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize());
    11511142  }
    1152 #else
    1153   if (uiWidth == 64)
    1154   {
    1155     numParts = 4;
    1156     sdcDepth = 1;
    1157     uiWidth = uiHeight = 32;
    1158   }
    1159 #endif
    1160 
    1161   for ( i = 0; i < numParts; i++ )
     1143
     1144  for ( Int i = 0; i < numParts; i++ )
    11621145  {
    11631146    uiStride    = pcRecoYuv->getStride  ();
     
    11651148    piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    11661149    piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
    1167  
     1150
    11681151    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    11691152    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
     
    11731156
    11741157    AOF( uiWidth == uiHeight );
    1175 #else
    1176   TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
    1177   TComYuv* pcPredYuv  = m_ppcYuvReco[uiDepth];
    1178   TComYuv* pcResiYuv  = m_ppcYuvResi[uiDepth];
    1179  
    1180   UInt    uiStride    = pcRecoYuv->getStride  ();
    1181   Pel*    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
    1182   Pel*    piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    1183   Pel*    piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
    1184  
    1185   UInt    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    1186   Pel*    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
    1187   UInt    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
    1188  
    1189   UInt    uiLumaPredMode    = pcCU->getLumaIntraDir     ( uiAbsPartIdx );
    1190  
    1191   AOF( uiWidth == uiHeight );
    1192   AOF( uiAbsPartIdx == 0 );
    1193   AOF( pcCU->getSDCAvailable(uiAbsPartIdx) );
    1194   AOF( pcCU->getSDCFlag(uiAbsPartIdx) );
    1195 #endif
    1196  
    1197   //===== init availability pattern =====
    1198   Bool  bAboveAvail = false;
    1199   Bool  bLeftAvail  = false;
    1200 #if QC_PKU_SDC_SPLIT_G0123
    1201   pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
    1202   pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
    1203 #else
    1204   pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
    1205   pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
    1206 #endif
    1207 #if !QC_PKU_SDC_SPLIT_G0123
    1208   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1209 #endif
    1210 #if HS_TSINGHUA_SDC_SPLIT_G0111
    1211   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1212 #endif
    1213   //===== get prediction signal =====
    1214 #if H_3D_DIM
    1215   if( isDimMode( uiLumaPredMode ) )
    1216   {
    1217     m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight
    1218       , false, dmm4Segmentation
    1219       );
    1220 #if HS_TSINGHUA_SDC_SPLIT_G0111
    1221     Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
    1222     Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
    1223     for( UInt k = 0; k < (uiWidth*uiHeight); k++ )
    1224     {
    1225       dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
    1226     }
    1227 #endif
    1228   }
    1229   else
    1230   {
    1231 #endif
    1232     m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
    1233 #if H_3D_DIM
    1234   }
    1235 #endif
    1236 #if QC_PKU_SDC_SPLIT_G0123
     1158
     1159    //===== init availability pattern =====
     1160    Bool  bAboveAvail = false;
     1161    Bool  bLeftAvail  = false;
     1162
     1163    pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
     1164    pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
     1165
     1166    TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
     1167    //===== get prediction signal =====
     1168    if( isDimMode( uiLumaPredMode ) )
     1169    {
     1170      m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, false, dmm4Segmentation  );
     1171      Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
     1172      Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
     1173      for( UInt k = 0; k < (uiWidth*uiHeight); k++ )
     1174      {
     1175        dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
     1176      }
     1177    }
     1178    else
     1179    {
     1180      m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     1181    }
     1182
    12371183    if ( numParts > 1 )
    12381184    {
     
    12501196    }
    12511197    uiAbsPartIdx += ( (uiWidth * uiWidth) >> 4 );
    1252 #if HS_TSINGHUA_SDC_SPLIT_G0111
    12531198    dmm4Segmentation->destroy(); delete dmm4Segmentation;
    1254 #endif
    12551199  }
    12561200  uiAbsPartIdx = 0;
     
    12671211  piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
    12681212  uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
    1269 #endif
    12701213  // number of segments depends on prediction mode
    12711214  UInt uiNumSegments = 1;
     
    12871230  {
    12881231    uiNumSegments = 2;
    1289 #if HS_TSINGHUA_SDC_SPLIT_G0111
    12901232    pbMask  = dmm4SegmentationOrg->getPattern();
    12911233    uiMaskStride = dmm4SegmentationOrg->getStride();
    1292 #else
    1293     pbMask  = dmm4Segmentation->getPattern();
    1294     uiMaskStride = dmm4Segmentation->getStride();
    1295 #endif
    12961234  }
    12971235  // get DC prediction for each segment
     
    13561294    pRecCr += uiStrideC;
    13571295  }
    1358 #if HS_TSINGHUA_SDC_SPLIT_G0111
    13591296  dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg;
    1360 #else
    1361   dmm4Segmentation->destroy(); delete dmm4Segmentation;
    1362 #endif
    13631297}
    13641298#endif
  • branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp

    r878 r879  
    18611861
    18621862#if H_3D_DIM_SDC
    1863 Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost,
    1864   Bool bZeroResidual, Int iSDCDeltaResi
    1865   )
     1863Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi  )
    18661864{
    18671865  UInt    uiLumaPredMode    = pcCU     ->getLumaIntraDir( uiAbsPartIdx );
    18681866  UInt    uiWidth           = pcCU     ->getWidth   ( 0 );
    18691867  UInt    uiHeight          = pcCU     ->getHeight  ( 0 );
    1870 #if QC_PKU_SDC_SPLIT_G0123
    1871 #if HS_TSINGHUA_SDC_SPLIT_G0111
    18721868  TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight );
    1873 #else
    1874 #endif
    1875 #endif
    1876 #if QC_PKU_SDC_SPLIT_G0123
    18771869  UInt numParts = 1;
    1878   UInt i = 0;
    18791870  UInt sdcDepth = 0;
    18801871  UInt uiStride;         
     
    18871878  UInt uiRecIPredStride;
    18881879
    1889 #if HS_TSINGHUA_SDC_SPLIT_G0111
    18901880  if ( ( uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() ) > 1 )
    18911881  {
     
    18941884    uiWidth = uiHeight = ( 1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() );
    18951885  }
    1896 #else
    1897   if (uiWidth == 64)
    1898   {
    1899     numParts = 4;
    1900     sdcDepth = 1;
    1901     uiWidth = uiHeight = 32;
    1902   }
    1903 #endif
    1904 
    1905   for ( i = 0; i < numParts; i++ )
     1886
     1887  for ( Int i = 0; i < numParts; i++ )
    19061888  {
    19071889    uiStride          = pcOrgYuv ->getStride  ();
     
    19151897
    19161898    AOF( uiWidth == uiHeight );
    1917 #else
    1918   UInt    uiStride          = pcOrgYuv ->getStride  ();
    1919   Pel*    piOrg             = pcOrgYuv ->getLumaAddr( uiAbsPartIdx );
    1920   Pel*    piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    1921   Pel*    piReco            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    1922  
    1923   UInt    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    1924   Pel*    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
    1925   UInt    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
    1926  
    1927   AOF( uiWidth == uiHeight );
    1928   AOF( uiAbsPartIdx == 0 );
    1929   AOF( pcCU->getSDCAvailable(uiAbsPartIdx) );
    1930   AOF( pcCU->getSDCFlag(uiAbsPartIdx) );
    1931 #endif
    1932  
    1933   //===== init availability pattern =====
    1934   Bool  bAboveAvail = false;
    1935   Bool  bLeftAvail  = false;
    1936 #if QC_PKU_SDC_SPLIT_G0123
    1937   pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
    1938   pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
    1939 #else
    1940   pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
    1941   pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
    1942  
    1943 #endif
    1944 #if !QC_PKU_SDC_SPLIT_G0123
    1945   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1946 #endif
    1947 #if HS_TSINGHUA_SDC_SPLIT_G0111
    1948   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1949 #endif
    1950   //===== get prediction signal =====
    1951 #if H_3D_DIM
    1952   if( isDimMode( uiLumaPredMode ) )
    1953   {
    1954 #if HS_TSINGHUA_SDC_SPLIT_G0111 
    1955     UInt dimType   = getDimType  ( uiLumaPredMode );
    1956     UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx);
    1957     if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiWidth]].size() && dimType == DMM1_IDX )
    1958     {
    1959       if (g_aucConvertToBit[uiWidth] == 2)  // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used.
    1960         patternID = 1349;  // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16
    1961       else
    1962         patternID = patternID >> 1;  // Other cases
    1963       pcCU->setDmmWedgeTabIdx(dimType, uiAbsPartIdx, patternID);
    1964     }
    1965 #endif
    1966     predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, true
    1967       , dmm4Segmentation
    1968       );
    1969 #if HS_TSINGHUA_SDC_SPLIT_G0111
    1970     Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
    1971     Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
    1972     for( UInt k = 0; k < (uiWidth*uiHeight); k++ )
    1973     {
    1974       dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
    1975     }
    1976 #endif
    1977   }
    1978   else
    1979   {
    1980 #endif
    1981     predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
    1982 #if H_3D_DIM
    1983   }
    1984 #endif
    1985 #if QC_PKU_SDC_SPLIT_G0123
     1899
     1900    //===== init availability pattern =====
     1901    Bool  bAboveAvail = false;
     1902    Bool  bLeftAvail  = false;
     1903    pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
     1904    pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
     1905    TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
     1906    //===== get prediction signal =====
     1907    if( isDimMode( uiLumaPredMode ) )
     1908    {
     1909      UInt dimType   = getDimType  ( uiLumaPredMode );
     1910      UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx);
     1911      if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiWidth]].size() && dimType == DMM1_IDX )
     1912      {
     1913        if (g_aucConvertToBit[uiWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used.
     1914        {                                   
     1915          patternID = 1349;  // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16
     1916        }
     1917        else
     1918        {
     1919          patternID = patternID >> 1;  // Other cases
     1920        }
     1921        pcCU->setDmmWedgeTabIdx(dimType, uiAbsPartIdx, patternID);
     1922      }
     1923      predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, true , dmm4Segmentation    );
     1924      Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
     1925      Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
     1926      for( UInt k = 0; k < (uiWidth*uiHeight); k++ )
     1927      {
     1928        dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
     1929      }
     1930    }
     1931    else
     1932    {
     1933      predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     1934    }
    19861935    if ( numParts > 1 )
    19871936    {
     
    19981947    }
    19991948    uiAbsPartIdx += ( ( uiWidth * uiWidth ) >> 4 );
    2000 #if HS_TSINGHUA_SDC_SPLIT_G0111
    20011949    dmm4Segmentation->destroy(); delete dmm4Segmentation;
    2002 #endif
    20031950  }
    20041951  uiAbsPartIdx = 0;
     
    20071954  piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    20081955  piReco            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    2009  
     1956
    20101957  uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    20111958  piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
     
    20171964    uiHeight = pcCU->getHeight( 0 );
    20181965  }
    2019 #endif
    20201966  // number of segments depends on prediction mode
    20211967  UInt uiNumSegments = 1;
    20221968  Bool* pbMask = NULL;
    20231969  UInt uiMaskStride = 0;
    2024    
     1970
    20251971  if( getDimType( uiLumaPredMode ) == DMM1_IDX )
    20261972  {
    20271973    Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx);
    2028    
     1974
    20291975    WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
    20301976    TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx ));
    2031    
     1977
    20321978    uiNumSegments = 2;
    20331979    pbMask = pcWedgelet->getPattern();
     
    20371983  {
    20381984    uiNumSegments = 2;
    2039 #if HS_TSINGHUA_SDC_SPLIT_G0111
    2040     pbMask  = dmm4SegmentationOrg->getPattern();
     1985    pbMask       = dmm4SegmentationOrg->getPattern();
    20411986    uiMaskStride = dmm4SegmentationOrg->getStride();
    2042 #else
    2043     pbMask  = dmm4Segmentation->getPattern();
    2044     uiMaskStride = dmm4Segmentation->getStride();
    2045 #endif
    2046   }
    2047  
     1987  }
     1988
    20481989  // get DC prediction for each segment
    20491990  Pel apDCPredValues[2];
    20501991  analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode );
    2051  
     1992
    20521993  // get original DC for each segment
    20531994  Pel apDCOrigValues[2];
    20541995  analyzeSegmentsSDC(piOrg, uiStride, uiWidth, apDCOrigValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode, true );
    2055  
     1996
    20561997  for( UInt uiSegment = 0; uiSegment < uiNumSegments; uiSegment++ )
    20571998  {
     
    20762017    pcCU->setSDCSegmentDCOffset(pResidualIdx, uiSegment, uiAbsPartIdx);
    20772018  }
    2078  
     2019
    20792020  // reconstruct residual based on mask + DC residuals
    20802021  Pel apDCResiValues[2];
     
    20912032#endif
    20922033  }
    2093  
     2034
    20942035  //===== reconstruction =====
    20952036  Bool* pMask     = pbMask;
     
    20972038  Pel* pReco      = piReco;
    20982039  Pel* pRecIPred  = piRecIPred;
    2099  
     2040
    21002041  for( UInt uiY = 0; uiY < uiHeight; uiY++ )
    21012042  {
     
    21062047
    21072048      Pel pResiDC = apDCResiValues[ucSegment];
    2108      
     2049
    21092050      pReco    [ uiX ] = ClipY( pPred[ uiX ] + pResiDC );
    21102051      pRecIPred[ uiX ] = pReco[ uiX ];
     
    21152056    pMask     += uiMaskStride;
    21162057  }
    2117  
     2058
    21182059  // clear UV
    21192060  UInt  uiStrideC     = pcPredYuv->getCStride();
    21202061  Pel   *pRecCb       = pcPredYuv->getCbAddr();
    21212062  Pel   *pRecCr       = pcPredYuv->getCrAddr();
    2122  
     2063
    21232064  for (Int y=0; y<uiHeight/2; y++)
    21242065  {
     
    21282069      pRecCr[x] = 128;
    21292070    }
    2130    
     2071
    21312072    pRecCb += uiStrideC;
    21322073    pRecCr += uiStrideC;
    21332074  }
    2134  
     2075
    21352076  //===== determine distortion =====
    21362077#if H_3D_VSO
     
    21402081#endif
    21412082    ruiDist = m_pcRdCost->getDistPart(g_bitDepthY, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight );
    2142  
     2083
    21432084  //===== determine rate and r-d cost =====
    21442085  m_pcEntropyCoder->resetBits();
    2145  
     2086
    21462087  // encode reduced intra header
    2147 #if H_3D_DIM_SDC
    21482088  if( !pcCU->getSlice()->isIntra() )
    21492089  {
     
    21582098  m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth( 0 ), true );
    21592099  m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
    2160 #else
    2161   m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
    2162 #endif
    2163  
     2100
    21642101  // encode pred direction + DC residual data
    21652102  m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
    2166 #if H_3D_DIM_SDC
    21672103  Bool bDummy = false;
    21682104  m_pcEntropyCoder->encodeCoeff( pcCU, 0, pcCU->getDepth( 0 ), uiWidth, uiHeight, bDummy );
    2169 #endif
    21702105  UInt uiBits = m_pcEntropyCoder->getNumberOfWrittenBits();
    2171  
     2106
    21722107#if H_3D_VSO
    21732108  if ( m_pcRdCost->getUseLambdaScaleVSO())
     
    21762111#endif
    21772112    dRDCost = m_pcRdCost->calcRdCost( uiBits, ruiDist );
    2178 #if HS_TSINGHUA_SDC_SPLIT_G0111
    21792113  dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg;
    2180 #else
    2181   dmm4Segmentation->destroy(); delete dmm4Segmentation;
    2182 #endif
    21832114}
    21842115#endif
Note: See TracChangeset for help on using the changeset viewer.