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
File:
1 edited

Legend:

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