Ignore:
Timestamp:
1 Jun 2015, 18:57:12 (10 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/TLibCommon
Files:
5 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
Note: See TracChangeset for help on using the changeset viewer.