Changeset 1243 in 3DVCSoftware


Ignore:
Timestamp:
1 Jun 2015, 18:57:12 (9 years ago)
Author:
rwth
Message:
  • fixed problem when NH_3D_DMM=0
  • cleaned TEMP_SDC_CLEANUP
Location:
branches/HTM-14.1-update-dev1-RWTH/source/Lib
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComDataCU.cpp

    r1227 r1243  
    657657    memset( m_apSegmentDCOffset[0],     0,                m_uiNumPartition * sizeof( *m_apSegmentDCOffset[0] ) );
    658658    memset( m_apSegmentDCOffset[1],     0,                m_uiNumPartition * sizeof( *m_apSegmentDCOffset[1] ) );
    659 #if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup
    660     m_apDmmPredictor[0] = 0;
    661     m_apDmmPredictor[1] = 0;
    662 #endif
    663659#endif
    664660#if H_3D_DBBP
     
    815811      m_apSegmentDCOffset[0][ui] = 0;
    816812      m_apSegmentDCOffset[1][ui] = 0;
    817 #if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup
    818       m_apDmmPredictor[0] = 0;
    819       m_apDmmPredictor[1] = 0;
    820 #endif
    821813#endif
    822814#if H_3D_DBBP
     
    921913  memset( m_apSegmentDCOffset[0], 0, sizeof(Pel) * m_uiNumPartition   );
    922914  memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition   );
    923 #if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup
    924   m_apDmmPredictor[0] = 0;
    925   m_apDmmPredictor[1] = 0;
    926 #endif
    927915#endif
    928916#if H_3D_DBBP
     
    23912379Bool TComDataCU::getSDCAvailable( UInt uiAbsPartIdx )
    23922380{
    2393 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for DMM and SDC
    23942381  if( getSlice()->getIsDepth() && isIntra(uiAbsPartIdx) && getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N )
    23952382  {
     
    24012388  }
    24022389  return false;
    2403 #else
    2404   // check general CU information
    2405   if( !getSlice()->getIsDepth() || !isIntra(uiAbsPartIdx) || getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N )
    2406   {
    2407     return false;
    2408   }
    2409 
    2410   if( isDmmMode( getLumaIntraDir( uiAbsPartIdx ) ) )
    2411   {
    2412     return true;
    2413   }
    2414  
    2415   if( getLumaIntraDir( uiAbsPartIdx ) < NUM_INTRA_MODE )
    2416   {
    2417     return true;
    2418   }
    2419 
    2420   return false;
    2421   // check prediction mode
    2422   UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx ); 
    2423   if( uiLumaPredMode == PLANAR_IDX || ( getDmmType( uiLumaPredMode ) == DMM1_IDX  ) )
    2424     return true;
    2425  
    2426   // else
    2427   return false;
    2428 #endif
    24292390}
    24302391#endif
  • branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComDataCU.h

    r1227 r1243  
    189189  Bool*         m_pbSDCFlag;
    190190  Pel*          m_apSegmentDCOffset[2];
    191 #if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup
    192   Pel           m_apDmmPredictor[2];
    193 #endif
    194191#endif
    195192#if H_3D_DBBP
     
    573570  Pel           getSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentDCOffset[uiSeg][uiPartIdx]; }
    574571  Void          setSDCSegmentDCOffset( Pel pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentDCOffset[uiSeg][uiPartIdx] = pOffset; }
    575 #if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup
    576   Void          setDmmPredictor ( Pel pOffset, UInt uiSeg) { m_apDmmPredictor[uiSeg] = pOffset; }
    577   Pel           getDmmPredictor ( UInt uiSeg) { return m_apDmmPredictor[uiSeg]; }
    578 #endif
    579572#endif
    580573 
     
    745738
    746739  UInt          getCoefScanIdx(const UInt uiAbsPartIdx, const UInt uiWidth, const UInt uiHeight, const ComponentID compID) const ;
    747 
    748 #if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup
    749 #if NH_3D_DMM
    750   Bool         isDMM1UpscaleMode       ( UInt uiWidth ){ Bool bDMM1UpsampleModeFlag = true; UInt uiBaseWidth = 16; if( uiBaseWidth >= uiWidth ){ bDMM1UpsampleModeFlag = false; } return bDMM1UpsampleModeFlag; };
    751   UInt         getDMM1BasePatternWidth ( UInt uiWidth ){ UInt uiBaseWidth = 16; if( uiBaseWidth >= uiWidth ){ uiBaseWidth =  uiWidth; } return uiBaseWidth; }
    752 #endif
    753 #endif
    754740};
    755741
  • branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComPrediction.cpp

    r1227 r1243  
    568568  Pel* pDst = piPred;
    569569  assignBiSegDCs( pDst, uiStride, biSegPattern, patternStride, segDC1, segDC2 );
    570 #if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup
    571 #if NH_3D_SDC_INTRA
    572   pcCU->setDmmPredictor(segDC1, 0);
    573   pcCU->setDmmPredictor(segDC2, 1);
    574 #endif
    575 #endif
     570 
    576571  delete[] biSegPattern;
    577572}
     
    23882383#endif
    23892384
    2390 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for SDC
    23912385#if NH_3D_SDC_INTRA
    23922386Void TComPrediction::predConstantSDC( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& predDC )
     
    23982392  predDC = (*pLeftTop + *pRightTop + *pLeftBottom + *pRightBottom + 2)>>2;
    23992393}
    2400 #endif
    2401 #else // PM: should be obsolete after cleanup
    2402 #if NH_3D_SDC_INTRA
    2403 Void TComPrediction::analyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride
    2404                                          ,UInt uiIntraMode
    2405                                          ,Bool orgDC
    2406                                         )
    2407 {
    2408   Int iSumDepth[2];
    2409   memset(iSumDepth, 0, sizeof(Int)*2);
    2410   Int iSumPix[2];
    2411   memset(iSumPix, 0, sizeof(Int)*2);
    2412 
    2413   for( Int i = 0; i < uiNumSegments; i++ )
    2414   {
    2415     rpSegMeans[i] = 0; 
    2416   }
    2417 
    2418   if ( !orgDC )
    2419   {
    2420     Pel* pLeftTop = pOrig;
    2421     Pel* pRightTop = pOrig + (uiSize-1);
    2422     Pel* pLeftBottom = (pOrig+ (uiStride*(uiSize-1)));
    2423     Pel* pRightBottom = (pOrig+ (uiStride*(uiSize-1)) + (uiSize-1));
    2424 
    2425     rpSegMeans[0] = (*pLeftTop + *pRightTop + *pLeftBottom + *pRightBottom + 2)>>2;
    2426     return;
    2427   }
    2428 
    2429   Int subSamplePix;
    2430   if ( uiSize == 64 || uiSize == 32 )
    2431   {
    2432     subSamplePix = 2;
    2433   }
    2434   else
    2435   {
    2436     subSamplePix = 1;
    2437   }
    2438 
    2439   for (Int y=0; y<uiSize; y+=subSamplePix)
    2440   {
    2441     for (Int x=0; x<uiSize; x+=subSamplePix)
    2442     {
    2443       UChar ucSegment = pMask?(UChar)pMask[x]:0;
    2444       assert( ucSegment < uiNumSegments );
    2445      
    2446       iSumDepth[ucSegment] += pOrig[x];
    2447       iSumPix[ucSegment]   += 1;
    2448     }
    2449    
    2450     pOrig  += uiStride*subSamplePix;
    2451     pMask  += uiMaskStride*subSamplePix;
    2452   }
    2453  
    2454   // compute mean for each segment
    2455   for( UChar ucSeg = 0; ucSeg < uiNumSegments; ucSeg++ )
    2456   {
    2457     if( iSumPix[ucSeg] > 0 )
    2458     {
    2459       rpSegMeans[ucSeg] = iSumDepth[ucSeg] / iSumPix[ucSeg];
    2460     }
    2461     else
    2462     {
    2463       rpSegMeans[ucSeg] = 0;  // this happens for zero-segments
    2464     }
    2465   }
    2466 }
    24672394#endif // NH_3D_SDC_INTRA
    2468 #endif
    24692395
    24702396#if NH_3D_DMM
  • branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComPrediction.h

    r1227 r1243  
    170170  Void assignBiSegDCs             ( Pel* ptrDst, UInt dstStride, Bool* biSegPattern, Int patternStride, Pel valDC1, Pel valDC2 );
    171171#endif
    172 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for SDC
    173172#if NH_3D_SDC_INTRA
    174173  Void predConstantSDC            ( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& predDC );
    175 #endif
    176 #else // PM: should be obsolete after cleanup
    177 #if NH_3D_SDC_INTRA
    178   Void analyzeSegmentsSDC         ( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride, UInt uiIntraMode, Bool orgDC=false );
    179 #endif
    180174#endif
    181175 
  • branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TypeDef.h

    r1236 r1243  
    7979                                              // H_3D_FAST_DEPTH_INTRA
    8080#endif
    81 
    82 #define TEMP_SDC_CLEANUP                  1   // PM: consider these cleanups for DMM and SDC
    8381
    8482#if H_3D
  • branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1239 r1243  
    500500  //
    501501  TComDLT* pcDLT = pcPPS->getDLT();
    502   //Ed.(GT): PPSs are copied in HM16.4. This would cause that the only the DLT pointer is copied. Therefore, a deep copy of the DLT needs to be implemented. Another option would be to use a vectors for the DLT arrays in TComDLT.
    503502
    504503  READ_FLAG(uiCode, "dlt_present_flag");
  • branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibDecoder/TDecCu.cpp

    r1227 r1243  
    11861186Void TDecCu::xReconIntraSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    11871187{
    1188 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for DMM and SDC
    11891188  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
    11901189  TComYuv* pcPredYuv  = m_ppcYuvReco[uiDepth];
     
    13241323  }
    13251324#endif
    1326 #else
    1327   UInt uiWidth        = pcCU->getWidth  ( 0 );
    1328   UInt uiHeight       = pcCU->getHeight ( 0 );
    1329   TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight );
    1330   UInt numParts = 1;
    1331   UInt sdcDepth    = 0;
    1332   TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
    1333   TComYuv* pcPredYuv  = m_ppcYuvReco[uiDepth];
    1334   TComYuv* pcResiYuv  = m_ppcYuvResi[uiDepth];
    1335 
    1336   UInt    uiStride = 0;
    1337   Pel*    piReco;
    1338   Pel*    piPred;
    1339   Pel*    piResi;
    1340 
    1341   UInt    uiZOrder;       
    1342   Pel*    piRecIPred;     
    1343   UInt    uiRecIPredStride;
    1344 
    1345   UInt    uiLumaPredMode = 0; 
    1346 
    1347   if ((uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()) > 1)
    1348   {
    1349     numParts = uiWidth * uiWidth >> (2 * pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize());
    1350     sdcDepth = g_aucConvertToBit[uiWidth] + 2 - pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize();
    1351     uiWidth = uiHeight = (1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize());
    1352   }
    1353 
    1354   for ( Int i = 0; i < numParts; i++ )
    1355   {
    1356     uiStride    = pcRecoYuv->getStride  ();
    1357     piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
    1358     piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    1359     piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
    1360 
    1361     uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    1362     piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
    1363     uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
    1364 
    1365     uiLumaPredMode    = pcCU->getLumaIntraDir     ( uiAbsPartIdx );
    1366 
    1367     AOF( uiWidth == uiHeight );
    1368 
    1369     //===== init availability pattern =====
    1370     Bool  bAboveAvail = false;
    1371     Bool  bLeftAvail  = false;
    1372 
    1373     pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
    1374     pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
    1375 
    1376     TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1377     //===== get prediction signal =====
    1378     if( isDmmMode( uiLumaPredMode ) )
    1379     {
    1380       m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, false, dmm4Segmentation  );
    1381       Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
    1382       Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
    1383       for( UInt k = 0; k < (uiWidth*uiHeight); k++ )
    1384       {
    1385         dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
    1386       }
    1387     }
    1388     else
    1389     {
    1390       m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
    1391     }
    1392 
    1393     if ( numParts > 1 )
    1394     {
    1395       for( UInt uiY = 0; uiY < uiHeight; uiY++ )
    1396       {
    1397         for( UInt uiX = 0; uiX < uiWidth; uiX++ )
    1398         {
    1399           piReco        [ uiX ] = ClipY( piPred[ uiX ] );
    1400           piRecIPred    [ uiX ] = piReco[ uiX ];
    1401         }
    1402         piPred     += uiStride;
    1403         piReco     += uiStride;
    1404         piRecIPred += uiRecIPredStride;
    1405       }
    1406     }
    1407     uiAbsPartIdx += ( (uiWidth * uiWidth) >> 4 );
    1408     dmm4Segmentation->destroy(); delete dmm4Segmentation;
    1409   }
    1410   uiAbsPartIdx = 0;
    1411  
    1412   if ( numParts > 1 )
    1413   {
    1414     uiWidth = pcCU->getWidth( 0 );
    1415     uiHeight = pcCU->getHeight( 0 );
    1416   }
    1417   piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
    1418   piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    1419   piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
    1420   uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    1421   piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
    1422   uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
    1423   // number of segments depends on prediction mode
    1424   UInt uiNumSegments = 1;
    1425   Bool* pbMask = NULL;
    1426   UInt uiMaskStride = 0;
    1427  
    1428   if( getDmmType( uiLumaPredMode ) == DMM1_IDX )
    1429   {
    1430     Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx);
    1431 
    1432     WedgeList* pacWedgeList  = pcCU->isDMM1UpscaleMode(uiWidth) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] :  &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
    1433     TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx ));
    1434 
    1435     uiNumSegments = 2;
    1436 
    1437     pbMask       = pcCU->isDMM1UpscaleMode( uiWidth ) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern();
    1438     uiMaskStride = pcCU->isDMM1UpscaleMode( uiWidth ) ? uiWidth : pcWedgelet->getStride();
    1439   }
    1440   if( getDmmType( uiLumaPredMode ) == DMM4_IDX )
    1441   {
    1442     uiNumSegments = 2;
    1443     pbMask  = dmm4SegmentationOrg->getPattern();
    1444     uiMaskStride = dmm4SegmentationOrg->getStride();
    1445   }
    1446   // get DC prediction for each segment
    1447   Pel apDCPredValues[2];
    1448   if ( getDmmType( uiLumaPredMode ) == DMM1_IDX || getDmmType( uiLumaPredMode ) == DMM4_IDX )
    1449   {
    1450     apDCPredValues[0] = pcCU->getDmmPredictor( 0 );
    1451     apDCPredValues[1] = pcCU->getDmmPredictor( 1 );
    1452   }
    1453   else
    1454   {
    1455     m_pcPrediction->analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode);
    1456   }
    1457 #endif
    14581325 
    14591326  // reconstruct residual based on mask + DC residuals
     
    15151382  }
    15161383#if NH_3D_DMM
    1517 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for DMM and SDC
    15181384  if( pbMask ) { delete[] pbMask; }
    1519 #else
    1520   dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg;
    1521 #endif
    15221385#endif
    15231386}
  • branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1237 r1243  
    372372Void  TEncCavlc::codePps3dExtension        ( const TComPPS* pcPPS )
    373373{
    374   // Assuming that all PPS indirectly refer to the same VPS via different SPS
    375   // There is no parsing dependency in decoding DLT in PPS.
    376   // The VPS information passed to decodePPS() is used to arrange the decoded DLT tables to their corresponding layers.
    377   // This is equivalent to the process of
    378   //   Step 1) decoding DLT tables based on the number of depth layers, and
    379   //   Step 2) mapping DLT tables to the depth layers
    380   // as described in the 3D-HEVC WD.
    381 
    382   // GT: Please remove dependency from VPS in the encoding as well as in the parsing function, e.g. using the equivalent process.
    383   // GT: Moreover this function should only carry out the coding of the DLT and NO rate based decisions.
    384   // GT: Please add a function e.g. xSetDLT in e.g. TEncSlice to find the best DLT syntax representation and do ONLY the coding of the DLT here !!
    385 
    386374#if NH_3D_DLT
    387375  WRITE_FLAG( pcPPS->getDLT()->getDltPresentFlag() ? 1 : 0, "dlt_present_flag" );
  • branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibEncoder/TEncSearch.cpp

    r1239 r1243  
    19711971Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi  )
    19721972{
    1973 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for DMM and SDC
    19741973  UInt uiWidth        = pcCU->getWidth ( 0 );
    19751974  UInt uiHeight       = pcCU->getHeight( 0 );
     
    21102109  }
    21112110#endif
    2112 #else
    2113   UInt    uiLumaPredMode    = pcCU     ->getLumaIntraDir( uiAbsPartIdx );
    2114   UInt    uiWidth           = pcCU     ->getWidth   ( 0 );
    2115   UInt    uiHeight          = pcCU     ->getHeight  ( 0 );
    2116   TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight );
    2117   UInt numParts = 1;
    2118   UInt sdcDepth = 0;
    2119   UInt uiStride;         
    2120   Pel* piOrg;         
    2121   Pel* piPred;         
    2122   Pel* piReco;       
    2123 
    2124   UInt uiZOrder;         
    2125   Pel* piRecIPred;       
    2126   UInt uiRecIPredStride;
    2127 
    2128   if ( ( uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() ) > 1 )
    2129   {
    2130     numParts = uiWidth * uiWidth >> ( 2 * pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() );
    2131     sdcDepth = g_aucConvertToBit[uiWidth] + 2 - pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize();
    2132     uiWidth = uiHeight = ( 1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() );
    2133   }
    2134 
    2135   for ( Int i = 0; i < numParts; i++ )
    2136   {
    2137     uiStride          = pcOrgYuv ->getStride  ();
    2138     piOrg             = pcOrgYuv ->getLumaAddr( uiAbsPartIdx );
    2139     piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    2140     piReco            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    2141 
    2142     uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    2143     piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
    2144     uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
    2145 
    2146     AOF( uiWidth == uiHeight );
    2147 
    2148     //===== init availability pattern =====
    2149     Bool  bAboveAvail = false;
    2150     Bool  bLeftAvail  = false;
    2151     pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
    2152     pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
    2153     TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    2154     //===== get prediction signal =====
    2155     if( isDmmMode( uiLumaPredMode ) )
    2156     {
    2157       UInt dimType   = getDmmType  ( uiLumaPredMode );
    2158       UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx);
    2159       UInt uiBaseWidth = pcCU->isDMM1UpscaleMode(uiWidth) ? pcCU->getDMM1BasePatternWidth(uiWidth) : uiWidth;
    2160       if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiBaseWidth]].size() && dimType == DMM1_IDX )
    2161       {
    2162         if (g_aucConvertToBit[uiBaseWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used.
    2163         {                                   
    2164           patternID = 1349;  // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16
    2165         }
    2166         else
    2167         {
    2168           patternID = patternID >> 1;  // Other cases
    2169         }
    2170         pcCU->setDmmWedgeTabIdx(dimType, uiAbsPartIdx, patternID);
    2171       }
    2172       predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, true , dmm4Segmentation    );
    2173       Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
    2174       Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
    2175       for( UInt k = 0; k < (uiWidth*uiHeight); k++ )
    2176       {
    2177         dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
    2178       }
    2179     }
    2180     else
    2181     {
    2182       predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
    2183     }
    2184     if ( numParts > 1 )
    2185     {
    2186       for( UInt uiY = 0; uiY < uiHeight; uiY++ )
    2187       {
    2188         for( UInt uiX = 0; uiX < uiWidth; uiX++ )
    2189         {
    2190           piPred        [ uiX ] = ClipY( piPred[ uiX ] );
    2191           piRecIPred    [ uiX ] = piPred[ uiX ];
    2192         }
    2193         piPred     += uiStride;
    2194         piRecIPred += uiRecIPredStride;
    2195       }
    2196     }
    2197     uiAbsPartIdx += ( ( uiWidth * uiWidth ) >> 4 );
    2198     dmm4Segmentation->destroy(); delete dmm4Segmentation;
    2199   }
    2200   uiAbsPartIdx = 0;
    2201   uiStride          = pcOrgYuv ->getStride  ();
    2202   piOrg             = pcOrgYuv ->getLumaAddr( uiAbsPartIdx );
    2203   piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    2204   piReco            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    2205 
    2206   uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    2207   piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
    2208   uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
    2209 
    2210   if (numParts > 1)
    2211   {
    2212     uiWidth = pcCU->getWidth( 0 );
    2213     uiHeight = pcCU->getHeight( 0 );
    2214   }
    2215   // number of segments depends on prediction mode
    2216   UInt uiNumSegments = 1;
    2217   Bool* pbMask = NULL;
    2218   UInt uiMaskStride = 0;
    2219 
    2220   if( getDmmType( uiLumaPredMode ) == DMM1_IDX )
    2221   {
    2222     Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx);
    2223 
    2224     WedgeList* pacWedgeList  = pcCU->isDMM1UpscaleMode( uiWidth ) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
    2225     TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx ));
    2226 
    2227     uiNumSegments = 2;
    2228     pbMask       = pcCU->isDMM1UpscaleMode( uiWidth ) ? pcWedgelet->getScaledPattern( uiWidth ) : pcWedgelet->getPattern();
    2229     uiMaskStride = pcCU->isDMM1UpscaleMode( uiWidth ) ? uiWidth : pcWedgelet->getStride();
    2230   }
    2231   if( getDmmType( uiLumaPredMode ) == DMM4_IDX )
    2232   {
    2233     uiNumSegments = 2;
    2234     pbMask       = dmm4SegmentationOrg->getPattern();
    2235     uiMaskStride = dmm4SegmentationOrg->getStride();
    2236   }
    2237 
    2238   // get DC prediction for each segment
    2239   Pel apDCPredValues[2];
    2240   if ( getDmmType( uiLumaPredMode ) == DMM1_IDX || getDmmType( uiLumaPredMode ) == DMM4_IDX )
    2241   {
    2242     apDCPredValues[0] = pcCU->getDmmPredictor( 0 );
    2243     apDCPredValues[1] = pcCU->getDmmPredictor( 1 );
    2244   }
    2245   else
    2246   {
    2247     analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode );
    2248   }
    2249 
    2250 
    2251   // get original DC for each segment
    2252   Pel apDCOrigValues[2];
    2253   analyzeSegmentsSDC(piOrg, uiStride, uiWidth, apDCOrigValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode, true );
    2254 #endif
    22552111
    22562112  for( UInt uiSegment = 0; uiSegment < uiNumSegments; uiSegment++ )
     
    23372193  }
    23382194
    2339 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for DMM and SDC
    23402195#if NH_3D_DMM
    23412196  if( pbMask ) { delete[] pbMask; }
    2342 #endif
    23432197#endif
    23442198
     
    23922246#endif
    23932247    dRDCost = m_pcRdCost->calcRdCost( uiBits, ruiDist );
    2394 #if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup
    2395   dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg;
    2396 #endif
    23972248}
    23982249#endif
     
    31422993#endif
    31432994
    3144 #if NH_3D_DMM
     2995#if NH_3D_DMM || NH_3D_ENC_DEPTH
    31452996    const TComRectangle &puRect=tuRecurseWithPU.getRect(COMPONENT_Y);
    31462997    const UInt uiAbsPartIdx=tuRecurseWithPU.GetAbsPartIdxTU();
    31472998   
    31482999    Pel* piOrg         = pcOrgYuv ->getAddr( COMPONENT_Y, uiAbsPartIdx );
     3000    UInt uiStride      = pcPredYuv->getStride( COMPONENT_Y );
     3001#endif
     3002#if NH_3D_DMM
    31493003    Pel* piPred        = pcPredYuv->getAddr( COMPONENT_Y, uiAbsPartIdx );
    3150     UInt uiStride      = pcPredYuv->getStride( COMPONENT_Y );
    31513004    if( m_pcEncCfg->getIsDepth() )
    31523005    {
     
    36233476    if( !tuRecurseWithPU.IsLastSection() )
    36243477    {
    3625       //const TComRectangle &puRect=tuRecurseWithPU.getRect(COMPONENT_Y);
     3478      const TComRectangle &puRect=tuRecurseWithPU.getRect(COMPONENT_Y);
    36263479      const UInt  uiCompWidth   = puRect.width;
    36273480      const UInt  uiCompHeight  = puRect.height;
     
    77807633
    77817634#endif
    7782 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for SDC
    77837635#if NH_3D_SDC_INTRA
    77847636Void TEncSearch::xCalcConstantSDC( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& valDC )
     
    78047656}
    78057657#endif
    7806 #endif
    78077658//! \}
  • branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibEncoder/TEncSearch.h

    r1227 r1243  
    358358#if NH_3D_SDC_INTRA
    359359  Void xIntraCodingSDC            ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi    );
    360 #endif
    361 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for SDC
    362 #if NH_3D_SDC_INTRA
    363360  Void xCalcConstantSDC           ( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& valDC );
    364 #endif
    365361#endif
    366362
Note: See TracChangeset for help on using the changeset viewer.