Changeset 1258 in 3DVCSoftware for branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibCommon/TComDataCU.cpp
- Timestamp:
- 16 Jun 2015, 04:13:09 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibCommon/TComDataCU.cpp
r1243 r1258 55 55 56 56 m_skipFlag = NULL; 57 #if H_3D57 #if NH_3D_DIS 58 58 m_bDISFlag = NULL; 59 m_u iDISType = NULL;59 m_ucDISType = NULL; 60 60 #endif 61 61 m_pePartSize = NULL; … … 169 169 m_ChromaQpAdj = new UChar[ uiNumPartition ]; 170 170 m_skipFlag = new Bool[ uiNumPartition ]; 171 #if H_3D171 #if NH_3D_DIS 172 172 m_bDISFlag = new Bool[ uiNumPartition ]; 173 m_u iDISType = (UInt*)xMalloc(UInt, uiNumPartition);173 m_ucDISType = (UChar*)xMalloc(UChar, uiNumPartition); 174 174 #endif 175 175 m_pePartSize = new Char[ uiNumPartition ]; … … 321 321 } 322 322 323 #if H_3D323 #if NH_3D_DIS 324 324 if ( m_bDISFlag ) { delete[] m_bDISFlag; m_bDISFlag = NULL; } 325 if ( m_u iDISType ) { xFree(m_uiDISType); m_uiDISType = NULL; }325 if ( m_ucDISType ) { xFree(m_ucDISType); m_ucDISType = NULL; } 326 326 #endif 327 327 … … 570 570 memset( m_skipFlag , false, m_uiNumPartition * sizeof( *m_skipFlag ) ); 571 571 572 #if H_3D573 m _bDISFlag[ui] = pcFrom->getDISFlag(ui);574 m _uiDISType[ui] = pcFrom->getDISType(ui);572 #if NH_3D_DIS 573 memset( m_bDISFlag , false, m_uiNumPartition * sizeof( *m_bDISFlag ) ); 574 memset( m_ucDISType , false, m_uiNumPartition * sizeof( *m_ucDISType ) ); 575 575 #endif 576 576 … … 619 619 #if H_3D_DBBP 620 620 m_pbDBBPFlag[ui] = pcFrom->m_pbDBBPFlag[ui]; 621 #endif622 #if H_3D623 memset( m_bDISFlag + firstElement, false, numElements * sizeof( *m_bDISFlag ) );624 memset( m_uiDISType + firstElement, 0, numElements * sizeof( *m_uiDISType) );625 621 #endif 626 622 #if H_3D_VSP … … 762 758 } 763 759 m_skipFlag[ui] = false; 764 #if H_3D765 m_bDISFlag[ui]= false;766 m_uiDISType[ui]= 0;760 #if NH_3D_DIS 761 m_bDISFlag[ui] = false; 762 m_ucDISType[ui] = 0; 767 763 #endif 768 764 m_pePartSize[ui] = NUMBER_OF_PART_SIZES; … … 921 917 { 922 918 m_skipFlag[ui] = false; 923 #if H_3D919 #if NH_3D_DIS 924 920 m_bDISFlag[ui] = false; 925 m_u iDISType[ui] = 0;921 m_ucDISType[ui] = 0; 926 922 #endif 927 923 … … 937 933 m_apiMVPNum[rpl][ui] = -1; 938 934 } 939 #if H_3D935 #if NH_3D_DIS 940 936 m_bDISFlag[ui] = pcCU->getDISFlag(uiPartOffset+ui); 941 m_u iDISType[ui] = pcCU->getDISType(uiPartOffset+ui);937 m_ucDISType[ui] = pcCU->getDISType(uiPartOffset+ui); 942 938 #endif 943 939 #if H_3D_VSP … … 1028 1024 1029 1025 m_skipFlag=pcCU->getSkipFlag() + uiPart; 1030 #if H_3D1026 #if NH_3D_DIS 1031 1027 m_bDISFlag = pcCU->getDISFlag() + uiPart; 1032 m_u iDISType = pcCU->getDISType() + uiPart;1028 m_ucDISType = pcCU->getDISType() + uiPart; 1033 1029 #endif 1034 1030 … … 1166 1162 1167 1163 m_skipFlag = pcCU->getSkipFlag () + uiAbsPartIdx; 1168 #if H_3D1164 #if NH_3D_DIS 1169 1165 m_bDISFlag = pcCU->getDISFlag () + uiAbsPartIdx; 1170 m_u iDISType = pcCU->getDISType() + uiAbsPartIdx;1166 m_ucDISType = pcCU->getDISType() + uiAbsPartIdx; 1171 1167 #endif 1172 1168 … … 1240 1236 Int sizeInChar = sizeof( Char ) * uiNumPartition; 1241 1237 memcpy( m_skipFlag + uiOffset, pcCU->getSkipFlag(), sizeof( *m_skipFlag ) * uiNumPartition ); 1242 #if H_3D1243 memcpy( m_bDISFlag + uiOffset, pcCU->getDISFlag(), sizeof( *m_bDISFlag ) * uiNumPartition );1244 memcpy( m_u iDISType + uiOffset, pcCU->getDISType(), sizeof( *m_uiDISType ) * uiNumPartition);1238 #if NH_3D_DIS 1239 memcpy( m_bDISFlag + uiOffset, pcCU->getDISFlag(), sizeof( *m_bDISFlag ) * uiNumPartition ); 1240 memcpy( m_ucDISType + uiOffset, pcCU->getDISType(), sizeof( *m_ucDISType ) * uiNumPartition); 1245 1241 #endif 1246 1242 memcpy( m_phQP + uiOffset, pcCU->getQP(), sizeInChar ); … … 1357 1353 1358 1354 memcpy( pCtu->getSkipFlag() + m_absZIdxInCtu, m_skipFlag, sizeof( *m_skipFlag ) * m_uiNumPartition ); 1359 #if H_3D1360 memcpy( rpcCU->getDISFlag() + m_uiAbsIdxInLCU, m_bDISFlag,sizeof( *m_bDISFlag ) * m_uiNumPartition );1361 memcpy( rpcCU->getDISType() + m_uiAbsIdxInLCU, m_uiDISType, sizeof( *m_uiDISType ) * m_uiNumPartition );1355 #if NH_3D_DIS 1356 memcpy( pCtu->getDISFlag() + m_absZIdxInCtu, m_bDISFlag, sizeof( *m_bDISFlag ) * m_uiNumPartition ); 1357 memcpy( pCtu->getDISType() + m_absZIdxInCtu, m_ucDISType, sizeof( *m_ucDISType ) * m_uiNumPartition ); 1362 1358 #endif 1363 1359 … … 1455 1451 pCtu->getTotalBins() = m_uiTotalBins; 1456 1452 } 1457 1458 #if H_3D1459 memcpy( rpcCU->getDISFlag() + uiPartOffset, m_bDISFlag, sizeof( *m_bDISFlag ) * uiQNumPart );1460 memcpy( rpcCU->getDISType() + uiPartOffset, m_uiDISType, sizeof( *m_uiDISType ) * uiQNumPart );1461 #endif1462 1463 1453 #if H_3D_VSP 1464 1454 memcpy( rpcCU->getVSPFlag() + uiPartOffset, m_piVSPFlag, sizeof(Char) * uiQNumPart ); … … 2205 2195 } 2206 2196 2207 #if H_3D2208 Void TComDataCU::setDISFlagSubParts( Bool bDIS, UInt absPartIdx, UInt depth )2197 #if NH_3D_DIS 2198 Void TComDataCU::setDISFlagSubParts( Bool bDIS, UInt uiAbsPartIdx, UInt uiDepth ) 2209 2199 { 2210 2200 assert( sizeof( *m_bDISFlag) == 1 ); 2211 memset( m_bDISFlag + absPartIdx, bDIS, m_pcPic->getNumPartInCU() >> ( 2 * depth ) ); 2212 } 2213 2214 Void TComDataCU::setDISTypeSubParts(UInt uiDISType, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ) 2215 { 2216 setSubPartT( uiDISType, m_uiDISType, uiAbsPartIdx, uiDepth, uiPUIdx ); 2201 memset( m_bDISFlag + uiAbsPartIdx, bDIS, m_pcPic->getNumPartitionsInCtu() >> ( 2 * uiDepth ) ); 2202 } 2203 2204 Void TComDataCU::setDISTypeSubParts(UChar ucDISType, UInt uiAbsPartIdx, UInt uiDepth ) 2205 { 2206 assert( sizeof( *m_ucDISType) == 1 ); 2207 memset( m_ucDISType + uiAbsPartIdx, ucDISType, m_pcPic->getNumPartitionsInCtu() >> ( 2 * uiDepth ) ); 2217 2208 } 2218 2209 #endif … … 5604 5595 #endif 5605 5596 5606 #if H_3D5597 #if NH_3D_DIS 5607 5598 Bool TComDataCU::getNeighDepth ( UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index ) 5608 5599 { 5609 UInt uiPartIdxLT, uiPartIdxRT; 5610 this->deriveLeftRightTopIdxAdi( uiPartIdxLT, uiPartIdxRT, 0, 0 ); 5600 assert(uiPartIdx==0); 5601 const UInt uiPartIdxLT = getZorderIdxInCtu() + uiPartAddr; 5602 const Int iPartIdxStride = getPic()->getNumPartInCtuWidth(); 5603 5611 5604 UInt uiMidPart, uiPartNeighbor; 5612 5605 TComDataCU* pcCUNeighbor; 5613 5606 Bool bDepAvail = false; 5614 Pel *pDepth = this->getPic()->getPicYuvRec()->get LumaAddr();5615 Int iDepStride = this->getPic()->getPicYuvRec()->getStride( );5607 Pel *pDepth = this->getPic()->getPicYuvRec()->getAddr(COMPONENT_Y); 5608 Int iDepStride = this->getPic()->getPicYuvRec()->getStride(COMPONENT_Y); 5616 5609 5617 5610 Int xP, yP, nPSW, nPSH; … … 5621 5614 { 5622 5615 case 0: // Mid Left 5623 uiMidPart = g_auiZscanToRaster[uiPartIdxLT] + (nPSH>>1) / this->getPic()->getMinCUHeight() * this->getPic()->getNumPartInWidth();5616 uiMidPart = g_auiZscanToRaster[uiPartIdxLT] + (nPSH>>1) / this->getPic()->getMinCUHeight() * iPartIdxStride; 5624 5617 pcCUNeighbor = this->getPULeft( uiPartNeighbor, g_auiRasterToZscan[uiMidPart] ); 5625 5618 if ( pcCUNeighbor )
Note: See TracChangeset for help on using the changeset viewer.