Changeset 1243 in 3DVCSoftware for branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon
- Timestamp:
- 1 Jun 2015, 18:57:12 (10 years ago)
- 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 657 657 memset( m_apSegmentDCOffset[0], 0, m_uiNumPartition * sizeof( *m_apSegmentDCOffset[0] ) ); 658 658 memset( m_apSegmentDCOffset[1], 0, m_uiNumPartition * sizeof( *m_apSegmentDCOffset[1] ) ); 659 #if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup660 m_apDmmPredictor[0] = 0;661 m_apDmmPredictor[1] = 0;662 #endif663 659 #endif 664 660 #if H_3D_DBBP … … 815 811 m_apSegmentDCOffset[0][ui] = 0; 816 812 m_apSegmentDCOffset[1][ui] = 0; 817 #if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup818 m_apDmmPredictor[0] = 0;819 m_apDmmPredictor[1] = 0;820 #endif821 813 #endif 822 814 #if H_3D_DBBP … … 921 913 memset( m_apSegmentDCOffset[0], 0, sizeof(Pel) * m_uiNumPartition ); 922 914 memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition ); 923 #if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup924 m_apDmmPredictor[0] = 0;925 m_apDmmPredictor[1] = 0;926 #endif927 915 #endif 928 916 #if H_3D_DBBP … … 2391 2379 Bool TComDataCU::getSDCAvailable( UInt uiAbsPartIdx ) 2392 2380 { 2393 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for DMM and SDC2394 2381 if( getSlice()->getIsDepth() && isIntra(uiAbsPartIdx) && getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ) 2395 2382 { … … 2401 2388 } 2402 2389 return false; 2403 #else2404 // check general CU information2405 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 mode2422 UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx );2423 if( uiLumaPredMode == PLANAR_IDX || ( getDmmType( uiLumaPredMode ) == DMM1_IDX ) )2424 return true;2425 2426 // else2427 return false;2428 #endif2429 2390 } 2430 2391 #endif -
branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComDataCU.h
r1227 r1243 189 189 Bool* m_pbSDCFlag; 190 190 Pel* m_apSegmentDCOffset[2]; 191 #if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup192 Pel m_apDmmPredictor[2];193 #endif194 191 #endif 195 192 #if H_3D_DBBP … … 573 570 Pel getSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentDCOffset[uiSeg][uiPartIdx]; } 574 571 Void setSDCSegmentDCOffset( Pel pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentDCOffset[uiSeg][uiPartIdx] = pOffset; } 575 #if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup576 Void setDmmPredictor ( Pel pOffset, UInt uiSeg) { m_apDmmPredictor[uiSeg] = pOffset; }577 Pel getDmmPredictor ( UInt uiSeg) { return m_apDmmPredictor[uiSeg]; }578 #endif579 572 #endif 580 573 … … 745 738 746 739 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 cleanup749 #if NH_3D_DMM750 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 #endif753 #endif754 740 }; 755 741 -
branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComPrediction.cpp
r1227 r1243 568 568 Pel* pDst = piPred; 569 569 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 576 571 delete[] biSegPattern; 577 572 } … … 2388 2383 #endif 2389 2384 2390 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for SDC2391 2385 #if NH_3D_SDC_INTRA 2392 2386 Void TComPrediction::predConstantSDC( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& predDC ) … … 2398 2392 predDC = (*pLeftTop + *pRightTop + *pLeftBottom + *pRightBottom + 2)>>2; 2399 2393 } 2400 #endif2401 #else // PM: should be obsolete after cleanup2402 #if NH_3D_SDC_INTRA2403 Void TComPrediction::analyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride2404 ,UInt uiIntraMode2405 ,Bool orgDC2406 )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 else2435 {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 segment2455 for( UChar ucSeg = 0; ucSeg < uiNumSegments; ucSeg++ )2456 {2457 if( iSumPix[ucSeg] > 0 )2458 {2459 rpSegMeans[ucSeg] = iSumDepth[ucSeg] / iSumPix[ucSeg];2460 }2461 else2462 {2463 rpSegMeans[ucSeg] = 0; // this happens for zero-segments2464 }2465 }2466 }2467 2394 #endif // NH_3D_SDC_INTRA 2468 #endif2469 2395 2470 2396 #if NH_3D_DMM -
branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComPrediction.h
r1227 r1243 170 170 Void assignBiSegDCs ( Pel* ptrDst, UInt dstStride, Bool* biSegPattern, Int patternStride, Pel valDC1, Pel valDC2 ); 171 171 #endif 172 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for SDC173 172 #if NH_3D_SDC_INTRA 174 173 Void predConstantSDC ( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& predDC ); 175 #endif176 #else // PM: should be obsolete after cleanup177 #if NH_3D_SDC_INTRA178 Void analyzeSegmentsSDC ( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride, UInt uiIntraMode, Bool orgDC=false );179 #endif180 174 #endif 181 175 -
branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TypeDef.h
r1236 r1243 79 79 // H_3D_FAST_DEPTH_INTRA 80 80 #endif 81 82 #define TEMP_SDC_CLEANUP 1 // PM: consider these cleanups for DMM and SDC83 81 84 82 #if H_3D
Note: See TracChangeset for help on using the changeset viewer.