Changeset 1270 in 3DVCSoftware for branches/HTM-14.1-update-dev3/source/Lib/TLibCommon/TComDataCU.cpp
- Timestamp:
- 13 Jul 2015, 15:22:02 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev3/source/Lib/TLibCommon/TComDataCU.cpp
r1268 r1270 134 134 m_pbSPIVMPFlag = NULL; 135 135 #endif 136 #if H_3D_ARP136 #if NH_3D_ARP 137 137 m_puhARPW = NULL; 138 138 #endif … … 142 142 #if H_3D_INTER_SDC 143 143 #endif 144 #if H_3D_DBBP144 #if NH_3D_DBBP 145 145 m_pbDBBPFlag = NULL; 146 146 #endif … … 249 249 } 250 250 251 #if H_3D_ARP252 m_puhARPW = new UChar[ uiNumPartition];251 #if NH_3D_ARP 252 m_puhARPW = (UChar* )xMalloc(UChar, uiNumPartition); 253 253 #endif 254 254 #if H_3D_IC … … 273 273 #endif 274 274 #endif 275 #if H_3D_DBBP275 #if NH_3D_DBBP 276 276 m_pbDBBPFlag = (Bool* )xMalloc(Bool, uiNumPartition); 277 277 #endif … … 472 472 473 473 474 #if H_3D_ARP475 if ( m_puhARPW ) { delete[] m_puhARPW;m_puhARPW = NULL; }474 #if NH_3D_ARP 475 if ( m_puhARPW ) { xFree(m_puhARPW); m_puhARPW = NULL; } 476 476 #endif 477 477 #if H_3D_IC … … 497 497 #endif 498 498 #endif 499 #if H_3D_DBBP499 #if NH_3D_DBBP 500 500 if ( m_pbDBBPFlag ) { xFree(m_pbDBBPFlag); m_pbDBBPFlag = NULL; } 501 501 #endif … … 602 602 memset( m_puhHeight , maxCUHeight, m_uiNumPartition * sizeof( *m_puhHeight ) ); 603 603 604 #if H_3D_ARP605 m_puhARPW [ui] = pcFrom->getARPW( ui );606 #endif607 604 #if H_3D_IC 608 605 m_pbICFlag[ui] = pcFrom->m_pbICFlag[ui]; … … 636 633 m_pbSDCFlag[ui] = pcFrom->m_pbSDCFlag[ui]; 637 634 #endif 638 #if H_3D_DBBP639 m_pbDBBPFlag[ui] = pcFrom->m_pbDBBPFlag[ui];635 #if NH_3D_DBBP 636 memset( m_pbDBBPFlag , false, m_uiNumPartition * sizeof( *m_pbDBBPFlag )); 640 637 #endif 641 638 #if H_3D … … 649 646 } 650 647 651 #if H_3D_ARP652 memset( m_puhARPW + firstElement, 0, numElements * sizeof( UChar) );648 #if NH_3D_ARP 649 memset( m_puhARPW , 0, m_uiNumPartition * sizeof( *m_puhARPW ) ); 653 650 #endif 654 651 #if H_3D_IC … … 676 673 m_apDmmPredictor[0] = 0; 677 674 m_apDmmPredictor[1] = 0; 678 #endif679 #if H_3D_DBBP680 memset( m_pbDBBPFlag + firstElement, false, numElements * sizeof( *m_pbDBBPFlag ) );681 675 #endif 682 676 … … 810 804 m_puhCbf[comp][ui] = 0; 811 805 } 812 #if H_3D_ARP806 #if NH_3D_ARP 813 807 m_puhARPW[ui] = 0; 814 808 #endif … … 838 832 m_apDmmPredictor[1] = 0; 839 833 #endif 840 #if H_3D_DBBP834 #if NH_3D_DBBP 841 835 m_pbDBBPFlag[ui] = false; 842 836 #endif … … 916 910 memset( m_explicitRdpcmMode[comp], NUMBER_OF_RDPCM_MODES, iSizeInUchar ); 917 911 } 918 #if H_3D_ARP919 memset( m_puhARPW, 0, iSizeInUchar );920 #endif921 912 922 913 memset( m_puhDepth, uiDepth, iSizeInUchar ); … … 924 915 memset( m_puhHeight, uhHeight, iSizeInUchar ); 925 916 memset( m_pbIPCMFlag, 0, iSizeInBool ); 917 #if NH_3D_ARP 918 memset( m_puhARPW, 0, iSizeInUchar ); 919 #endif 926 920 #if H_3D_IC 927 921 memset( m_pbICFlag, 0, iSizeInBool ); … … 947 941 m_apDmmPredictor[1] = 0; 948 942 #endif 949 #if H_3D_DBBP950 memset( m_pbDBBPFlag, 0, iSizeInBool);943 #if NH_3D_DBBP 944 memset( m_pbDBBPFlag, 0, sizeof(Bool) * m_uiNumPartition ); 951 945 #endif 952 946 … … 981 975 m_pbSPIVMPFlag[ui]=pcCU->m_pbSPIVMPFlag[uiPartOffset+ui]; 982 976 #endif 983 #if H_3D_ARP977 #if NH_3D_ARP 984 978 m_puhARPW [ui] = pcCU->getARPW( uiPartOffset+ui ); 985 979 #endif … … 1005 999 #endif 1006 1000 #endif 1007 #if H_3D_DBBP1001 #if NH_3D_DBBP 1008 1002 m_pbDBBPFlag[ui]=pcCU->m_pbDBBPFlag[uiPartOffset+ui]; 1009 1003 #endif … … 1088 1082 m_pbSPIVMPFlag = pcCU->getSPIVMPFlag() + uiPart; 1089 1083 #endif 1090 #if H_3D_ARP1084 #if NH_3D_ARP 1091 1085 m_puhARPW = pcCU->getARPW() + uiPart; 1092 1086 #endif … … 1128 1122 #endif 1129 1123 #endif 1130 #if H_3D_DBBP1124 #if NH_3D_DBBP 1131 1125 m_pbDBBPFlag = pcCU->getDBBPFlag() + uiPart; 1132 1126 #endif … … 1246 1240 m_apiMVPIdx[eRefPicList] = pcCU->getMVPIdx(eRefPicList) + uiAbsPartIdx; 1247 1241 m_apiMVPNum[eRefPicList] = pcCU->getMVPNum(eRefPicList) + uiAbsPartIdx; 1248 #if H_3D_ARP1242 #if NH_3D_ARP 1249 1243 m_puhARPW = pcCU->getARPW() + uiAbsPartIdx; 1250 1244 #endif 1251 #if H_3D_DBBP1245 #if NH_3D_DBBP 1252 1246 m_pbDBBPFlag = pcCU->getDBBPFlag() + uiAbsPartIdx; 1253 1247 #endif … … 1298 1292 memcpy( m_pDvInfo + uiOffset, pcCU->getDvInfo(), sizeof( *m_pDvInfo ) * uiNumPartition ); 1299 1293 #endif 1300 #if NH_3D_SPIVMP 1294 #if NH_3D_SPIVMP || NH_3D_DBBP 1301 1295 memcpy( m_pbSPIVMPFlag + uiOffset, pcCU->getSPIVMPFlag(), sizeof( Bool ) * uiNumPartition ); 1302 1296 #endif … … 1335 1329 #endif 1336 1330 #endif 1337 #if H_3D_DBBP1331 #if NH_3D_DBBP 1338 1332 memcpy( m_pbDBBPFlag + uiOffset, pcCU->getDBBPFlag(), iSizeInBool ); 1333 #endif 1334 #if NH_3D_ARP 1335 memcpy( m_puhARPW + uiOffset, pcCU->getARPW(), iSizeInUchar ); 1339 1336 #endif 1340 1337 … … 1378 1375 } 1379 1376 1380 #if H_3D_ARP1381 memcpy( m_puhARPW + uiOffset, pcCU->getARPW(), iSizeInUchar );1382 #endif1383 1377 #if H_3D_IC 1384 1378 memcpy( m_pbICFlag + uiOffset, pcCU->getICFlag(), iSizeInBool ); … … 1424 1418 memcpy( pCtu->getVSPFlag() + m_absZIdxInCtu, m_piVSPFlag, sizeof( Char ) * m_uiNumPartition ); 1425 1419 #endif 1420 #if NH_3D_DBBP 1421 memcpy( pCtu->getDvInfo() + m_absZIdxInCtu, m_pDvInfo, sizeof( *m_pDvInfo ) * m_uiNumPartition ); 1422 #endif 1426 1423 #if NH_3D_SPIVMP 1427 1424 memcpy( pCtu->getSPIVMPFlag() + m_absZIdxInCtu, m_pbSPIVMPFlag, sizeof( Bool ) * m_uiNumPartition ); … … 1462 1459 #endif 1463 1460 #endif 1464 #if H_3D_DBBP 1465 memcpy( rpcCU->getDBBPFlag() + m_uiAbsIdxInLCU, m_pbDBBPFlag, iSizeInBool ); 1461 #if NH_3D_DBBP 1462 memcpy( pCtu->getDBBPFlag() + m_absZIdxInCtu, m_pbDBBPFlag, iSizeInBool ); 1463 #endif 1464 #if NH_3D_ARP 1465 memcpy( pCtu->getARPW() + m_absZIdxInCtu, m_puhARPW, iSizeInUchar ); 1466 1466 #endif 1467 1467 … … 1498 1498 } 1499 1499 1500 #if H_3D_ARP1501 memcpy( rpcCU->getARPW() + m_uiAbsIdxInLCU, m_puhARPW, iSizeInUchar );1502 #endif1503 1500 #if H_3D_IC 1504 1501 memcpy( rpcCU->getICFlag() + m_uiAbsIdxInLCU, m_pbICFlag, iSizeInBool ); … … 1533 1530 memcpy( rpcCU->getSDCSegmentDCOffset(1) + uiPartOffset, m_apSegmentDCOffset[1], sizeof( Pel ) * uiQNumPart); 1534 1531 #endif 1535 #endif1536 #if H_3D_DBBP1537 memcpy( rpcCU->getDBBPFlag() + uiPartOffset, m_pbDBBPFlag, iSizeInBool );1538 #endif1539 #if H_3D_ARP1540 memcpy( rpcCU->getARPW() + uiPartOffset, m_puhARPW, iSizeInUchar );1541 1532 #endif 1542 1533 #if H_3D_IC … … 2094 2085 return uiCtx; 2095 2086 } 2096 #if H_3D_ARP2087 #if NH_3D_ARP 2097 2088 UInt TComDataCU::getCTXARPWFlag( UInt uiAbsPartIdx ) 2098 2089 { … … 2101 2092 UInt uiCtx = 0; 2102 2093 2103 pcTempCU = getPULeft( uiTempPartIdx, m_ uiAbsIdxInLCU+ uiAbsPartIdx );2094 pcTempCU = getPULeft( uiTempPartIdx, m_absZIdxInCtu + uiAbsPartIdx ); 2104 2095 uiCtx = ( pcTempCU ) ? ((pcTempCU->getARPW( uiTempPartIdx )==0)?0:1) : 0; 2105 2096 return uiCtx; 2106 2097 } 2107 2098 #endif 2108 #if H_3D_DBBP2099 #if NH_3D_DBBP 2109 2100 Pel* TComDataCU::getVirtualDepthBlock(UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt& uiDepthStride) 2110 2101 { 2102 const TComSPS* sps = getSlice()->getSPS(); 2103 UInt uiMaxCUWidth = sps->getMaxCUWidth(); 2104 UInt uiMaxCUHeight = sps->getMaxCUHeight(); 2105 2111 2106 // get coded and reconstructed depth view 2112 2107 TComPicYuv* depthPicYuv = NULL; … … 2114 2109 2115 2110 // DBBP is a texture coding tool 2116 if( getSlice()->getIsDepth() ) 2117 { 2118 return NULL; 2119 } 2111 assert( !getSlice()->getIsDepth() ); 2112 2120 2113 #if H_3D_FCO 2121 2114 TComPic* depthPic = getSlice()->getIvPic(true, getSlice()->getViewIndex() ); … … 2144 2137 depthPicYuv = baseDepthPic->getPicYuvRec(); 2145 2138 depthPicYuv->extendPicBorder(); 2146 uiDepthStride = depthPicYuv->getStride( );2139 uiDepthStride = depthPicYuv->getStride(COMPONENT_Y); 2147 2140 2148 Int iBlkX = ( get Addr() % baseDepthPic->getFrameWidthInCU() ) * g_uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ getZorderIdxInCU()+uiAbsPartIdx ] ];2149 Int iBlkY = ( get Addr() / baseDepthPic->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ getZorderIdxInCU()+uiAbsPartIdx ] ];2141 Int iBlkX = ( getCtuRsAddr() % baseDepthPic->getFrameWidthInCtus() ) * uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ getZorderIdxInCtu()+uiAbsPartIdx ] ]; 2142 Int iBlkY = ( getCtuRsAddr() / baseDepthPic->getFrameWidthInCtus() ) * uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ getZorderIdxInCtu()+uiAbsPartIdx ] ]; 2150 2143 2151 Int iPictureWidth = depthPicYuv->getWidth( );2152 Int iPictureHeight = depthPicYuv->getHeight( );2144 Int iPictureWidth = depthPicYuv->getWidth(COMPONENT_Y); 2145 Int iPictureHeight = depthPicYuv->getHeight(COMPONENT_Y); 2153 2146 2154 2147 … … 2167 2160 Int depthPosY = Clip3(0, iPictureHeight - 1, iBlkY + ((cDv.getVer()+2)>>2)); 2168 2161 2169 pDepthPels = depthPicYuv->get LumaAddr() + depthPosX + depthPosY * uiDepthStride;2162 pDepthPels = depthPicYuv->getAddr(COMPONENT_Y) + depthPosX + depthPosY * uiDepthStride; 2170 2163 } 2171 2164 #endif … … 2179 2172 #endif 2180 2173 2181 #if H_3D_DBBP2174 #if NH_3D_DBBP 2182 2175 Void TComDataCU::setDBBPFlagSubParts ( Bool bDBBPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2183 2176 { … … 2723 2716 2724 2717 // This is for use by a leaf/sub CU object only, with no additional AbsPartIdx 2725 #if H_3D_IC | NH_3D_VSP2718 #if H_3D_IC || NH_3D_VSP 2726 2719 Void TComDataCU::getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx, Bool bLCU) 2727 2720 { … … 3338 3331 Bool bICFlag = getICFlag(uiAbsPartIdx); 3339 3332 #endif 3340 #if H_3D_ARP3333 #if NH_3D_ARP 3341 3334 Bool bARPFlag = getARPW(uiAbsPartIdx) > 0; 3342 3335 #endif 3343 #if H_3D_DBBP3336 #if NH_3D_DBBP 3344 3337 Bool bDBBPFlag = getDBBPFlag(uiAbsPartIdx); 3345 3338 assert(bDBBPFlag == getDBBPFlag(0)); … … 3375 3368 && !bICFlag 3376 3369 #endif 3377 #if H_3D_ARP3370 #if NH_3D_ARP 3378 3371 && !bARPFlag 3379 3372 #endif 3380 #if H_3D_DBBP3373 #if NH_3D_DBBP 3381 3374 && !bDBBPFlag 3382 3375 #endif … … 3707 3700 spiMvpFlag = true; 3708 3701 } 3709 #if H_3D_DBBP3702 #if NH_3D_DBBP 3710 3703 spiMvpFlag &= !bDBBPFlag; 3711 3704 #endif … … 3741 3734 !bICFlag && 3742 3735 #endif 3743 #if H_3D_ARP3736 #if NH_3D_ARP 3744 3737 !bARPFlag && 3745 3738 #endif … … 3747 3740 (nPSW + nPSH > 12) && 3748 3741 #endif 3749 #if H_3D_DBBP3742 #if NH_3D_DBBP 3750 3743 !bDBBPFlag && 3751 3744 #endif … … 4476 4469 UInt partAddr; 4477 4470 4478 #if H_3D_DBBP4471 #if NH_3D_DBBP 4479 4472 if( getDBBPFlag(0) ) 4480 4473 { … … 5479 5472 #if NH_3D_VSP // bug fix 5480 5473 UInt uiCurrPartNumb = m_pcPic->getNumPartitionsInCtu() >> (uiDepth << 1); 5474 assert(m_pcPic->getNumPartitionsInCtu() ==m_pcPic->getNumPartInCtuWidth()*m_pcPic->getNumPartInCtuHeight()); 5475 5481 5476 #else 5482 5477 UInt uiCurrPartNumb = m_pcPic->getNumPartInCtuWidth() >> (uiDepth << 1); … … 5487 5482 } 5488 5483 } 5489 #if NH_3D_VSP 5484 #if NH_3D_VSP || NH_3D_DBBP 5490 5485 Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ) 5491 5486 { … … 6037 6032 } 6038 6033 #endif 6039 #if H_3D_ARP6034 #if NH_3D_ARP 6040 6035 Void TComDataCU::setARPWSubParts ( UChar w, UInt uiAbsPartIdx, UInt uiDepth ) 6041 6036 { 6042 assert( sizeof( *m_puhARPW) == 1 ); 6043 memset( m_puhARPW + uiAbsPartIdx, w, m_pcPic->getNumPartInCU() >> ( 2 * uiDepth ) ); 6037 setSubPart<UChar>( w, m_puhARPW, uiAbsPartIdx, uiDepth, 0 ); 6044 6038 } 6045 6039 #endif
Note: See TracChangeset for help on using the changeset viewer.