Changeset 816 in 3DVCSoftware for branches/HTM-9.3-dev1-RWTH/source/Lib/TLibCommon/TComDataCU.cpp
- Timestamp:
- 3 Feb 2014, 11:35:43 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-9.3-dev1-RWTH/source/Lib/TLibCommon/TComDataCU.cpp
r809 r816 153 153 m_pucInterSDCMask = NULL; 154 154 #endif 155 #if H_3D_DBBP 156 m_pbDBBPFlag = NULL; 157 #endif 155 158 156 159 #if MTK_DDD_G0063 … … 288 291 } 289 292 #endif 293 #if H_3D_DBBP 294 m_pbDBBPFlag = (Bool* )xMalloc(Bool, uiNumPartition); 295 #endif 290 296 } 291 297 else … … 425 431 if ( m_apSegmentInterDCOffset[i] ) { xFree( m_apSegmentInterDCOffset[i] ); m_apSegmentInterDCOffset[i] = NULL; } 426 432 } 433 #endif 434 #if H_3D_DBBP 435 if ( m_pbDBBPFlag ) { xFree(m_pbDBBPFlag); m_pbDBBPFlag = NULL; } 427 436 #endif 428 437 } … … 577 586 #if H_3D_INTER_SDC 578 587 m_pbInterSDCFlag[ui] = pcFrom->m_pbInterSDCFlag[ui]; 588 #endif 589 #if H_3D_DBBP 590 m_pbDBBPFlag[ui] = pcFrom->m_pbDBBPFlag[ui]; 579 591 #endif 580 592 } … … 653 665 memset( m_apSegmentInterDCOffset[i] + firstElement, 0, numElements * sizeof( *m_apSegmentInterDCOffset[i] ) ); 654 666 } 667 #endif 668 #if H_3D_DBBP 669 memset( m_pbDBBPFlag + firstElement, false, numElements * sizeof( *m_pbDBBPFlag ) ); 655 670 #endif 656 671 } … … 832 847 } 833 848 #endif 849 #if H_3D_DBBP 850 m_pbDBBPFlag[ui] = false; 851 #endif 834 852 } 835 853 } … … 950 968 memset( m_apSegmentInterDCOffset[i], 0, sizeof( Int ) * m_uiNumPartition ); 951 969 } 970 #endif 971 #if H_3D_DBBP 972 memset( m_pbDBBPFlag, 0, iSizeInBool ); 952 973 #endif 953 974 … … 1034 1055 } 1035 1056 #endif 1057 #if H_3D_DBBP 1058 m_pbDBBPFlag[ui]=pcCU->m_pbDBBPFlag[uiPartOffset+ui]; 1059 #endif 1036 1060 } 1037 1061 } … … 1195 1219 } 1196 1220 #endif 1221 #if H_3D_DBBP 1222 m_pbDBBPFlag = pcCU->getDBBPFlag() + uiPart; 1223 #endif 1197 1224 m_puhDepth=pcCU->getDepth() + uiPart; 1198 1225 m_puhWidth=pcCU->getWidth() + uiPart; … … 1311 1338 m_pucDisparityDerivedDepth = pcCU->getDDDepth() + uiAbsPartIdx; 1312 1339 m_pbUseDDD = pcCU->getUseDDD() + uiAbsPartIdx; 1340 #endif 1341 1342 #if H_3D_DBBP 1343 m_pbDBBPFlag = pcCU->getDBBPFlag() + uiAbsPartIdx; 1313 1344 #endif 1314 1345 … … 1400 1431 } 1401 1432 #endif 1433 #if H_3D_DBBP 1434 memcpy( m_pbDBBPFlag + uiOffset, pcCU->getDBBPFlag(), iSizeInBool ); 1435 #endif 1402 1436 1403 1437 memcpy( m_puhDepth + uiOffset, pcCU->getDepth(), iSizeInUchar ); … … 1527 1561 } 1528 1562 #endif 1563 #if H_3D_DBBP 1564 memcpy( rpcCU->getDBBPFlag() + m_uiAbsIdxInLCU, m_pbDBBPFlag, iSizeInBool ); 1565 #endif 1566 1529 1567 memcpy( rpcCU->getDepth() + m_uiAbsIdxInLCU, m_puhDepth, iSizeInUchar ); 1530 1568 memcpy( rpcCU->getWidth() + m_uiAbsIdxInLCU, m_puhWidth, iSizeInUchar ); … … 1640 1678 } 1641 1679 #endif 1680 #if H_3D_DBBP 1681 memcpy( rpcCU->getDBBPFlag() + uiPartOffset, m_pbDBBPFlag, iSizeInBool ); 1682 #endif 1683 1642 1684 memcpy( rpcCU->getDepth() + uiPartOffset, m_puhDepth, iSizeInUchar ); 1643 1685 memcpy( rpcCU->getWidth() + uiPartOffset, m_puhWidth, iSizeInUchar ); … … 2378 2420 2379 2421 return uiCtx; 2422 } 2423 #endif 2424 2425 #if H_3D_DBBP 2426 Pel* TComDataCU::getVirtualDepthBlock(UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt& uiDepthStride) 2427 { 2428 // get coded and reconstructed depth view 2429 TComPicYuv* depthPicYuv = NULL; 2430 Pel* pDepthPels = NULL; 2431 2432 // DBBP is a texture coding tool 2433 if( getSlice()->getIsDepth() ) 2434 return NULL; 2435 2436 #if H_3D_FCO 2437 TComPic* depthPic = getSlice()->getIvPic(true, getSlice()->getViewIndex() ); 2438 2439 if( depthPic && depthPic->getPicYuvRec() != NULL && depthPic->getIsDepth() ) // depth first 2440 { 2441 depthPicYuv = depthPic->getPicYuvRec(); 2442 depthPicYuv->extendPicBorder(); 2443 2444 // get collocated depth block for current CU 2445 uiDepthStride = depthPicYuv->getStride(); 2446 pDepthPels = depthPicYuv->getLumaAddr( getAddr(), uiAbsPartIdx ); 2447 } 2448 else // texture first 2449 #else 2450 { 2451 DisInfo DvInfo = getDvInfo(uiAbsPartIdx); 2452 2453 TComPic* baseDepthPic = getSlice()->getIvPic (true, DvInfo.m_aVIdxCan); 2454 2455 if( baseDepthPic == NULL || baseDepthPic->getPicYuvRec() == NULL ) 2456 return NULL; 2457 2458 depthPicYuv = baseDepthPic->getPicYuvRec(); 2459 depthPicYuv->extendPicBorder(); 2460 uiDepthStride = depthPicYuv->getStride(); 2461 2462 Int iBlkX = ( getAddr() % baseDepthPic->getFrameWidthInCU() ) * g_uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ getZorderIdxInCU()+uiAbsPartIdx ] ]; 2463 Int iBlkY = ( getAddr() / baseDepthPic->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ getZorderIdxInCU()+uiAbsPartIdx ] ]; 2464 2465 Int iPictureWidth = depthPicYuv->getWidth(); 2466 Int iPictureHeight = depthPicYuv->getHeight(); 2467 2468 Int iWidth = uiWidth; 2469 Int iHeight = uiHeight; 2470 2471 Bool depthRefineFlag = false; 2472 #if H_3D_NBDV_REF 2473 depthRefineFlag = m_pcSlice->getVPS()->getDepthRefinementFlag( m_pcSlice->getLayerIdInVps() ); 2474 #endif // H_3D_NBDV_REF 2475 2476 TComMv cDv = depthRefineFlag ? DvInfo.m_acDoNBDV : DvInfo.m_acNBDV; 2477 2478 Int depthPosX = Clip3(0, iPictureWidth - iWidth, iBlkX + ((cDv.getHor()+2)>>2)); 2479 Int depthPosY = Clip3(0, iPictureHeight- iHeight, iBlkY + ((cDv.getVer()+2)>>2)); 2480 2481 pDepthPels = depthPicYuv->getLumaAddr() + depthPosX + depthPosY * uiDepthStride; 2482 } 2483 #endif 2484 2485 AOF( depthPicYuv != NULL ); 2486 AOF( pDepthPels != NULL ); 2487 AOF( uiDepthStride != 0 ); 2488 2489 return pDepthPels; 2490 } 2491 #endif 2492 2493 #if H_3D_DBBP 2494 Void TComDataCU::setDBBPFlagSubParts ( Bool bDBBPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2495 { 2496 setSubPart( bDBBPFlag, m_pbDBBPFlag, uiAbsPartIdx, uiDepth, uiPartIdx ); 2380 2497 } 2381 2498 #endif … … 4030 4147 #if H_3D_ARP 4031 4148 Bool bARPFlag = getARPW(uiAbsPartIdx)>0 ? true : false; 4149 #endif 4150 #if H_3D_DBBP 4151 Bool bDBBPFlag = getDBBPFlag(uiAbsPartIdx); 4032 4152 #endif 4033 4153 … … 4696 4816 pbSPIVMPFlag[iCount] = true; 4697 4817 #endif 4818 #if H_3D_DBBP 4819 pbSPIVMPFlag[iCount] &= !bDBBPFlag; 4820 #endif 4698 4821 if( ( ivCandDir[0] & 1 ) == 1 ) 4699 4822 { … … 5809 5932 Int height = 0; 5810 5933 UInt partAddr; 5934 5935 #if H_3D_DBBP 5936 if( getDBBPFlag(0) ) 5937 return true; 5938 #endif 5811 5939 5812 5940 getPartIndexAndSize( puIdx, partAddr, width, height );
Note: See TracChangeset for help on using the changeset viewer.