Changeset 1243 in 3DVCSoftware for branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComPrediction.cpp
- Timestamp:
- 1 Jun 2015, 18:57:12 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset for help on using the changeset viewer.