Changeset 1243 in 3DVCSoftware
- Timestamp:
- 1 Jun 2015, 18:57:12 (9 years ago)
- 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 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 -
branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1239 r1243 500 500 // 501 501 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.503 502 504 503 READ_FLAG(uiCode, "dlt_present_flag"); -
branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibDecoder/TDecCu.cpp
r1227 r1243 1186 1186 Void TDecCu::xReconIntraSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1187 1187 { 1188 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for DMM and SDC1189 1188 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; 1190 1189 TComYuv* pcPredYuv = m_ppcYuvReco[uiDepth]; … … 1324 1323 } 1325 1324 #endif 1326 #else1327 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 else1389 {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 mode1424 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 segment1447 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 else1454 {1455 m_pcPrediction->analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode);1456 }1457 #endif1458 1325 1459 1326 // reconstruct residual based on mask + DC residuals … … 1515 1382 } 1516 1383 #if NH_3D_DMM 1517 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for DMM and SDC1518 1384 if( pbMask ) { delete[] pbMask; } 1519 #else1520 dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg;1521 #endif1522 1385 #endif 1523 1386 } -
branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibEncoder/TEncCavlc.cpp
r1237 r1243 372 372 Void TEncCavlc::codePps3dExtension ( const TComPPS* pcPPS ) 373 373 { 374 // Assuming that all PPS indirectly refer to the same VPS via different SPS375 // 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 of378 // Step 1) decoding DLT tables based on the number of depth layers, and379 // Step 2) mapping DLT tables to the depth layers380 // 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 386 374 #if NH_3D_DLT 387 375 WRITE_FLAG( pcPPS->getDLT()->getDltPresentFlag() ? 1 : 0, "dlt_present_flag" ); -
branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibEncoder/TEncSearch.cpp
r1239 r1243 1971 1971 Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi ) 1972 1972 { 1973 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for DMM and SDC1974 1973 UInt uiWidth = pcCU->getWidth ( 0 ); 1975 1974 UInt uiHeight = pcCU->getHeight( 0 ); … … 2110 2109 } 2111 2110 #endif 2112 #else2113 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 16x162165 }2166 else2167 {2168 patternID = patternID >> 1; // Other cases2169 }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 else2181 {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 mode2216 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 segment2239 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 else2246 {2247 analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode );2248 }2249 2250 2251 // get original DC for each segment2252 Pel apDCOrigValues[2];2253 analyzeSegmentsSDC(piOrg, uiStride, uiWidth, apDCOrigValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode, true );2254 #endif2255 2111 2256 2112 for( UInt uiSegment = 0; uiSegment < uiNumSegments; uiSegment++ ) … … 2337 2193 } 2338 2194 2339 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for DMM and SDC2340 2195 #if NH_3D_DMM 2341 2196 if( pbMask ) { delete[] pbMask; } 2342 #endif2343 2197 #endif 2344 2198 … … 2392 2246 #endif 2393 2247 dRDCost = m_pcRdCost->calcRdCost( uiBits, ruiDist ); 2394 #if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup2395 dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg;2396 #endif2397 2248 } 2398 2249 #endif … … 3142 2993 #endif 3143 2994 3144 #if NH_3D_DMM 2995 #if NH_3D_DMM || NH_3D_ENC_DEPTH 3145 2996 const TComRectangle &puRect=tuRecurseWithPU.getRect(COMPONENT_Y); 3146 2997 const UInt uiAbsPartIdx=tuRecurseWithPU.GetAbsPartIdxTU(); 3147 2998 3148 2999 Pel* piOrg = pcOrgYuv ->getAddr( COMPONENT_Y, uiAbsPartIdx ); 3000 UInt uiStride = pcPredYuv->getStride( COMPONENT_Y ); 3001 #endif 3002 #if NH_3D_DMM 3149 3003 Pel* piPred = pcPredYuv->getAddr( COMPONENT_Y, uiAbsPartIdx ); 3150 UInt uiStride = pcPredYuv->getStride( COMPONENT_Y );3151 3004 if( m_pcEncCfg->getIsDepth() ) 3152 3005 { … … 3623 3476 if( !tuRecurseWithPU.IsLastSection() ) 3624 3477 { 3625 //const TComRectangle &puRect=tuRecurseWithPU.getRect(COMPONENT_Y);3478 const TComRectangle &puRect=tuRecurseWithPU.getRect(COMPONENT_Y); 3626 3479 const UInt uiCompWidth = puRect.width; 3627 3480 const UInt uiCompHeight = puRect.height; … … 7780 7633 7781 7634 #endif 7782 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for SDC7783 7635 #if NH_3D_SDC_INTRA 7784 7636 Void TEncSearch::xCalcConstantSDC( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& valDC ) … … 7804 7656 } 7805 7657 #endif 7806 #endif7807 7658 //! \} -
branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibEncoder/TEncSearch.h
r1227 r1243 358 358 #if NH_3D_SDC_INTRA 359 359 Void xIntraCodingSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi ); 360 #endif361 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for SDC362 #if NH_3D_SDC_INTRA363 360 Void xCalcConstantSDC ( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& valDC ); 364 #endif365 361 #endif 366 362
Note: See TracChangeset for help on using the changeset viewer.