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

Cleanups part 4.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.