Changeset 1255 in 3DVCSoftware for branches/HTM-14.1-update-dev3-NTT/source/Lib/TLibCommon/TComDataCU.cpp
- Timestamp:
- 11 Jun 2015, 01:07:43 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev3-NTT/source/Lib/TLibCommon/TComDataCU.cpp
r1233 r1255 128 128 m_pDvInfo = NULL; 129 129 #endif 130 #if H_3D_VSP130 #if NH_3D_VSP 131 131 m_piVSPFlag = NULL; 132 132 #endif … … 185 185 m_pbMergeFlag = (Bool* )xMalloc(Bool, uiNumPartition); 186 186 m_puhMergeIndex = (UChar* )xMalloc(UChar, uiNumPartition); 187 #if H_3D_VSP187 #if NH_3D_VSP 188 188 m_piVSPFlag = (Char* )xMalloc(Char, uiNumPartition); 189 189 #endif … … 372 372 } 373 373 374 #if H_3D_VSP 375 if ( m_piVSPFlag ) { xFree(m_piVSPFlag); m_piVSPFlag = NULL; } 374 #if NH_3D_VSP 375 if ( m_piVSPFlag ) 376 { 377 xFree(m_piVSPFlag); 378 m_piVSPFlag = NULL; 379 } 376 380 #endif 377 381 #if H_3D_SPIVMP … … 623 627 memset( m_puhMergeIndex , 0, m_uiNumPartition * sizeof( *m_puhMergeIndex ) ); 624 628 625 #if H_3D_VSP626 m_piVSPFlag[ui] = pcFrom->m_piVSPFlag[ui];629 #if NH_3D_VSP 630 memset( m_piVSPFlag , 0, m_uiNumPartition * sizeof( *m_piVSPFlag ) ); 627 631 #endif 628 632 #if H_3D_SPIVMP … … 638 642 memset( m_bDISFlag + firstElement, false, numElements * sizeof( *m_bDISFlag ) ); 639 643 memset( m_uiDISType + firstElement, 0, numElements * sizeof( *m_uiDISType) ); 640 #endif641 #if H_3D_VSP642 memset( m_piVSPFlag + firstElement, 0, numElements * sizeof( *m_piVSPFlag ) );643 644 #endif 644 645 #if H_3D_SPIVMP … … 795 796 m_pbMergeFlag[ui] = 0; 796 797 m_puhMergeIndex[ui] = 0; 797 #if H_3D_VSP798 m_piVSPFlag[ui]= 0;798 #if NH_3D_VSP 799 m_piVSPFlag[ui] = 0; 799 800 #endif 800 801 #if H_3D_SPIVMP … … 896 897 memset( m_pbMergeFlag, 0, iSizeInBool ); 897 898 memset( m_puhMergeIndex, 0, iSizeInUchar ); 898 #if H_3D_VSP899 #if NH_3D_VSP 899 900 memset( m_piVSPFlag, 0, sizeof( Char ) * m_uiNumPartition ); 900 901 #endif … … 976 977 m_uiDISType[ui] = pcCU->getDISType(uiPartOffset+ui); 977 978 #endif 978 #if H_3D_VSP979 m_piVSPFlag[ui]=pcCU->m_piVSPFlag[uiPartOffset+ui];980 979 #if NH_3D_VSP 980 m_piVSPFlag[ui] = pcCU->m_piVSPFlag[uiPartOffset+ui]; 981 m_pDvInfo[ ui ] = pcCU->m_pDvInfo[uiPartOffset+ui]; 981 982 #endif 982 983 #if H_3D_SPIVMP … … 1084 1085 m_pbMergeFlag = pcCU->getMergeFlag() + uiPart; 1085 1086 m_puhMergeIndex = pcCU->getMergeIndex() + uiPart; 1086 #if H_3D_VSP1087 #if NH_3D_VSP 1087 1088 m_piVSPFlag = pcCU->getVSPFlag() + uiPart; 1088 1089 #endif … … 1238 1239 m_pbMergeFlag = pcCU->getMergeFlag() + uiAbsPartIdx; 1239 1240 m_puhMergeIndex = pcCU->getMergeIndex() + uiAbsPartIdx; 1240 #if H_3D_VSP1241 #if NH_3D_VSP 1241 1242 m_piVSPFlag = pcCU->getVSPFlag() + uiAbsPartIdx; 1242 1243 m_pDvInfo = pcCU->getDvInfo() + uiAbsPartIdx; … … 1296 1297 memcpy( m_pbMergeFlag + uiOffset, pcCU->getMergeFlag(), iSizeInBool ); 1297 1298 memcpy( m_puhMergeIndex + uiOffset, pcCU->getMergeIndex(), iSizeInUchar ); 1298 #if H_3D_VSP1299 #if NH_3D_VSP 1299 1300 memcpy( m_piVSPFlag + uiOffset, pcCU->getVSPFlag(), sizeof( Char ) * uiNumPartition ); 1300 1301 memcpy( m_pDvInfo + uiOffset, pcCU->getDvInfo(), sizeof( *m_pDvInfo ) * uiNumPartition ); … … 1423 1424 memcpy( pCtu->getMergeFlag() + m_absZIdxInCtu, m_pbMergeFlag, iSizeInBool ); 1424 1425 memcpy( pCtu->getMergeIndex() + m_absZIdxInCtu, m_puhMergeIndex, iSizeInUchar ); 1425 #if H_3D_VSP 1426 memcpy( rpcCU->getVSPFlag() + m_uiAbsIdxInLCU, m_piVSPFlag, sizeof( Char ) * m_uiNumPartition ); 1427 memcpy( rpcCU->getDvInfo() + m_uiAbsIdxInLCU, m_pDvInfo, sizeof( *m_pDvInfo ) * m_uiNumPartition ); 1426 #if NH_3D_VSP 1427 memcpy( pCtu->getVSPFlag() + m_absZIdxInCtu, m_piVSPFlag, sizeof( Char ) * m_uiNumPartition ); 1428 1428 #endif 1429 1429 #if H_3D_SPIVMP … … 1516 1516 #endif 1517 1517 1518 #if H_3D_VSP1519 memcpy( rpcCU->getVSPFlag() + uiPartOffset, m_piVSPFlag, sizeof(Char) * uiQNumPart );1520 #endif1521 1518 #if H_3D_SPIVMP 1522 1519 memcpy( rpcCU->getSPIVMPFlag() + uiPartOffset, m_pbSPIVMPFlag, sizeof(Bool) * uiQNumPart ); … … 2504 2501 #endif 2505 2502 2506 #if H_3D_VSP2503 #if NH_3D_VSP 2507 2504 Void TComDataCU::setVSPFlagSubParts( Char iVSPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2508 2505 { 2509 2506 setSubPart<Char>( iVSPFlag, m_piVSPFlag, uiAbsPartIdx, uiDepth, uiPartIdx ); 2510 2507 } 2511 #if H_3D_VSP2512 2508 template<typename T> 2513 2509 Void TComDataCU::setSubPartT( T uiParameter, T* puhBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx ) 2514 2510 { 2515 UInt uiCurrPartNumQ = (m_pcPic->getNumPart InCU() >> (2 * uiCUDepth)) >> 2;2511 UInt uiCurrPartNumQ = (m_pcPic->getNumPartitionsInCtu() >> (2 * uiCUDepth)) >> 2; 2516 2512 switch ( m_pePartSize[ uiCUAddr ] ) 2517 2513 { … … 2645 2641 } 2646 2642 #endif 2647 #endif2648 2643 2649 2644 Void TComDataCU::setInterDirSubParts( UInt uiDir, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) … … 2731 2726 2732 2727 // This is for use by a leaf/sub CU object only, with no additional AbsPartIdx 2733 #if H_3D_IC 2728 #if H_3D_IC | NH_3D_VSP 2734 2729 Void TComDataCU::getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx, Bool bLCU) 2735 2730 { … … 3065 3060 } 3066 3061 3067 #if H_3D_VSP 3068 3062 #if NH_3D_VSP 3069 3063 /** Add a VSP merging candidate 3070 3064 * \Inputs … … 3128 3122 3129 3123 dirVSP = (predFlag[0] | (predFlag[1] << 1)); 3130 m_mergCands[MRG_VSP].setCand( mvVSP, dirVSP, true, false); 3124 m_mergCands[MRG_VSP].setCand( mvVSP, dirVSP, true 3125 #if H_3D_SPIVMP 3126 , false 3127 #endif 3128 ); 3131 3129 if ( mrgCandIdx == iCount ) 3132 3130 { … … 3138 3136 return false; 3139 3137 } 3140 3141 3138 #endif 3142 3139 … … 3202 3199 */ 3203 3200 Void TComDataCU::buildMCL(TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours 3204 #if H_3D_VSP3201 #if NH_3D_VSP 3205 3202 , Int* vspFlag 3206 3203 #endif … … 3227 3224 extMergeCandList[ui<<1].setMvField(cZeroMv, NOT_VALID); 3228 3225 extMergeCandList[(ui<<1)+1].setMvField(cZeroMv, NOT_VALID); 3229 #if H_3D_VSP3226 #if NH_3D_VSP 3230 3227 vspFlag[ui] = 0; 3231 3228 #endif … … 3238 3235 { 3239 3236 m_mergCands[i].getCand(iCount, extMergeCandList, uhInterDirNeighboursExt 3240 #if H_3D_VSP3237 #if NH_3D_VSP 3241 3238 , vspFlag 3242 3239 #endif … … 3313 3310 DisInfo cDisInfo = getDvInfo(uiAbsPartIdx); 3314 3311 m_cDefaultDisInfo = cDisInfo; 3312 #elif NH_3D_VSP 3313 // for xAddVspCand() 3314 DisInfo cDisInfo = getDvInfo(uiAbsPartIdx); 3315 3315 #endif 3316 3316 … … 3371 3371 { 3372 3372 m_mergCands[MRG_A1].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands] 3373 #if H_3D_VSP3373 #if NH_3D_VSP 3374 3374 , (pcCULeft->getVSPFlag(uiLeftPartIdx) != 0 3375 3375 #if H_3D_IC … … 3395 3395 { 3396 3396 m_mergCands[MRG_B1].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands] 3397 #if H_3D_VSP3397 #if NH_3D_VSP 3398 3398 , false 3399 3399 #endif … … 3409 3409 { 3410 3410 m_mergCands[MRG_B0].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands] 3411 #if H_3D_VSP 3412 , 3413 false 3411 #if NH_3D_VSP 3412 , false 3414 3413 #endif 3415 3414 #if H_3D_SPIVMP … … 3424 3423 { 3425 3424 m_mergCands[MRG_A0].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands] 3426 #if H_3D_VSP3425 #if NH_3D_VSP 3427 3426 , false 3428 3427 #endif … … 3438 3437 { 3439 3438 m_mergCands[MRG_B2].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands] 3440 #if H_3D_VSP3439 #if NH_3D_VSP 3441 3440 , false 3442 3441 #endif … … 3718 3717 iCount += m_mergCands[MRG_A1].m_bAvailable + m_mergCands[MRG_B1].m_bAvailable; 3719 3718 3720 #if H_3D_VSP3719 #if NH_3D_VSP 3721 3720 ///////////////////////////////////////////////// 3722 3721 //////// VIEW SYNTHESIS PREDICTION (VSP) //////// … … 3748 3747 return; 3749 3748 } 3750 #endif3751 #if H_3D_VSP3752 3749 } 3753 3750 #endif … … 5467 5464 Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiDepth ) 5468 5465 { 5466 #if NH_3D_VSP // bug fix 5467 UInt uiCurrPartNumb = m_pcPic->getNumPartitionsInCtu() >> (uiDepth << 1); 5468 #else 5469 5469 UInt uiCurrPartNumb = m_pcPic->getNumPartInCtuWidth() >> (uiDepth << 1); 5470 #endif 5470 5471 for (UInt ui = 0; ui < uiCurrPartNumb; ui++ ) 5471 5472 { … … 5473 5474 } 5474 5475 } 5475 #if H_3D_VSP5476 #if NH_3D_VSP 5476 5477 Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ) 5477 5478 { … … 6084 6085 #endif 6085 6086 6086 #if H_3D_VSP6087 #if NH_3D_VSP 6087 6088 Void TComDataCU::setMvFieldPUForVSP( TComDataCU* pcCU, UInt partAddr, Int width, Int height, RefPicList eRefPicList, Int iRefIdx, Int &vspSize ) 6088 6089 { … … 6140 6141 TComCUMvField *cuMvField = cu->getCUMvField( refPicList ); 6141 6142 Int partAddrRasterSubPULine = g_auiZscanToRaster[ partAddr ]; 6142 Int numPartsLine = cu->getPic()->getNumPartIn Width();6143 Int numPartsLine = cu->getPic()->getNumPartInCtuWidth(); 6143 6144 6144 6145 Int nTxtPerMvInfoX = 4; // cu->getPic()->getMinCUWidth(); 6145 6146 Int nTxtPerMvInfoY = 4; // cu->getPic()->getMinCUHeight(); 6146 6147 6147 Int refDepStride = picRefDepth->getStride( );6148 Int refDepStride = picRefDepth->getStride( COMPONENT_Y ); 6148 6149 6149 6150 TComMv tmpMv(0, 0); … … 6151 6152 6152 6153 Int refDepOffset = ( (dv->getHor()+2) >> 2 ) + ( (dv->getVer()+2) >> 2 ) * refDepStride; 6153 Pel *refDepth = picRefDepth->get LumaAddr( cu->getAddr(), cu->getZorderIdxInCU() + partAddr ) + refDepOffset;6154 Pel *refDepth = picRefDepth->getAddr( COMPONENT_Y, cu->getCtuRsAddr(), cu->getZorderIdxInCtu() + partAddr ) + refDepOffset; 6154 6155 6155 6156 if ((height % 8))
Note: See TracChangeset for help on using the changeset viewer.