Changeset 983 in 3DVCSoftware for branches/HTM-11.2-dev3-MediaTek/source/Lib/TLibCommon/TComDataCU.cpp
- Timestamp:
- 11 Jul 2014, 03:49:39 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-11.2-dev3-MediaTek/source/Lib/TLibCommon/TComDataCU.cpp
r976 r983 60 60 61 61 m_skipFlag = NULL; 62 62 #if MTK_SINGLE_DEPTH_MODE_I0095 63 m_singleDepthFlag = NULL; 64 m_apSingleDepthValue = NULL; 65 #endif 63 66 m_pePartSize = NULL; 64 67 m_pePredMode = NULL; … … 182 185 183 186 m_skipFlag = new Bool[ uiNumPartition ]; 184 187 #if MTK_SINGLE_DEPTH_MODE_I0095 188 m_singleDepthFlag = new Bool[ uiNumPartition ]; 189 m_apSingleDepthValue = (Pel*)xMalloc(Pel, uiNumPartition); 190 #endif 185 191 m_pePartSize = new Char[ uiNumPartition ]; 186 192 memset( m_pePartSize, SIZE_NONE,uiNumPartition * sizeof( *m_pePartSize ) ); … … 329 335 330 336 if ( m_skipFlag ) { delete[] m_skipFlag; m_skipFlag = NULL; } 331 337 #if MTK_SINGLE_DEPTH_MODE_I0095 338 if ( m_singleDepthFlag ) { delete[] m_singleDepthFlag; m_singleDepthFlag = NULL; } 339 if ( m_apSingleDepthValue ) { xFree(m_apSingleDepthValue); m_apSingleDepthValue = NULL; } 340 #endif 332 341 if ( m_pePartSize ) { delete[] m_pePartSize; m_pePartSize = NULL; } 333 342 if ( m_pePredMode ) { delete[] m_pePredMode; m_pePredMode = NULL; } … … 494 503 TComDataCU * pcFrom = pcPic->getCU(getAddr()); 495 504 m_skipFlag[ui] = pcFrom->getSkipFlag(ui); 505 #if MTK_SINGLE_DEPTH_MODE_I0095 506 m_singleDepthFlag[ui] = pcFrom->getSingleDepthFlag(ui); 507 m_apSingleDepthValue[ui] = pcFrom->getSingleDepthValue(ui); 508 #endif 496 509 m_pePartSize[ui] = pcFrom->getPartitionSize(ui); 497 510 m_pePredMode[ui] = pcFrom->getPredictionMode(ui); … … 550 563 { 551 564 memset( m_skipFlag + firstElement, false, numElements * sizeof( *m_skipFlag ) ); 552 565 #if MTK_SINGLE_DEPTH_MODE_I0095 566 memset( m_singleDepthFlag + firstElement, false, numElements * sizeof( *m_singleDepthFlag ) ); 567 memset( m_apSingleDepthValue + firstElement, 0, numElements * sizeof( *m_apSingleDepthValue ) ); 568 #endif 553 569 memset( m_pePartSize + firstElement, SIZE_NONE, numElements * sizeof( *m_pePartSize ) ); 554 570 memset( m_pePredMode + firstElement, MODE_NONE, numElements * sizeof( *m_pePredMode ) ); … … 738 754 m_puhTransformSkip[2][ui] = 0; 739 755 m_skipFlag[ui] = false; 756 #if MTK_SINGLE_DEPTH_MODE_I0095 757 m_singleDepthFlag[ui] = false; 758 m_apSingleDepthValue[ui] = 0; 759 #endif 740 760 m_pePartSize[ui] = SIZE_NONE; 741 761 m_pePredMode[ui] = MODE_NONE; … … 913 933 { 914 934 m_skipFlag[ui] = false; 935 #if MTK_SINGLE_DEPTH_MODE_I0095 936 m_singleDepthFlag[ui] = false; 937 m_apSingleDepthValue[ui]= 0; 938 #endif 915 939 m_pePartSize[ui] = SIZE_NONE; 916 940 m_pePredMode[ui] = MODE_NONE; … … 934 958 m_puhTransformSkip[2][ui] = pcCU->getTransformSkip(uiPartOffset+ui,TEXT_CHROMA_V); 935 959 m_skipFlag[ui] = pcCU->getSkipFlag(uiPartOffset+ui); 960 #if MTK_SINGLE_DEPTH_MODE_I0095 961 m_singleDepthFlag[ui] = pcCU->getSingleDepthFlag(uiPartOffset+ui); 962 m_apSingleDepthValue[ui] = pcCU->getSingleDepthValue(uiPartOffset+ui); 963 #endif 936 964 m_pePartSize[ui] = pcCU->getPartitionSize(uiPartOffset+ui); 937 965 m_pePredMode[ui] = pcCU->getPredictionMode(uiPartOffset+ui); … … 1083 1111 1084 1112 m_skipFlag=pcCU->getSkipFlag() + uiPart; 1085 1113 #if MTK_SINGLE_DEPTH_MODE_I0095 1114 m_singleDepthFlag = pcCU->getSingleDepthFlag() + uiPart; 1115 m_apSingleDepthValue = pcCU->getSingleDepthValue() + uiPart; 1116 #endif 1086 1117 m_phQP=pcCU->getQP() + uiPart; 1087 1118 m_pePartSize = pcCU->getPartitionSize() + uiPart; … … 1221 1252 1222 1253 m_skipFlag = pcCU->getSkipFlag () + uiAbsPartIdx; 1223 1254 #if MTK_SINGLE_DEPTH_MODE_I0095 1255 m_singleDepthFlag = pcCU->getSingleDepthFlag () + uiAbsPartIdx; 1256 m_apSingleDepthValue = pcCU->getSingleDepthValue () + uiAbsPartIdx; 1257 #endif 1224 1258 m_pePartSize = pcCU->getPartitionSize () + uiAbsPartIdx; 1225 1259 #if H_3D_NBDV … … 1297 1331 Int sizeInChar = sizeof( Char ) * uiNumPartition; 1298 1332 memcpy( m_skipFlag + uiOffset, pcCU->getSkipFlag(), sizeof( *m_skipFlag ) * uiNumPartition ); 1333 #if MTK_SINGLE_DEPTH_MODE_I0095 1334 memcpy( m_singleDepthFlag + uiOffset, pcCU->getSingleDepthFlag(), sizeof( *m_singleDepthFlag ) * uiNumPartition ); 1335 memcpy( m_apSingleDepthValue + uiOffset, pcCU->getSingleDepthValue(), sizeof( *m_apSingleDepthValue ) * uiNumPartition); 1336 #endif 1299 1337 memcpy( m_phQP + uiOffset, pcCU->getQP(), sizeInChar ); 1300 1338 memcpy( m_pePartSize + uiOffset, pcCU->getPartitionSize(), sizeof( *m_pePartSize ) * uiNumPartition ); … … 1417 1455 1418 1456 memcpy( rpcCU->getSkipFlag() + m_uiAbsIdxInLCU, m_skipFlag, sizeof( *m_skipFlag ) * m_uiNumPartition ); 1419 1457 #if MTK_SINGLE_DEPTH_MODE_I0095 1458 memcpy( rpcCU->getSingleDepthFlag() + m_uiAbsIdxInLCU, m_singleDepthFlag, sizeof( *m_singleDepthFlag ) * m_uiNumPartition ); 1459 memcpy( rpcCU->getSingleDepthValue() + m_uiAbsIdxInLCU, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * m_uiNumPartition); 1460 #endif 1420 1461 memcpy( rpcCU->getQP() + m_uiAbsIdxInLCU, m_phQP, sizeInChar ); 1421 1462 #if H_3D_NBDV … … 1533 1574 Int sizeInChar = sizeof( Char ) * uiQNumPart; 1534 1575 memcpy( rpcCU->getSkipFlag() + uiPartOffset, m_skipFlag, sizeof( *m_skipFlag ) * uiQNumPart ); 1535 1576 #if MTK_SINGLE_DEPTH_MODE_I0095 1577 memcpy( rpcCU->getSingleDepthFlag() + uiPartOffset, m_singleDepthFlag, sizeof( *m_singleDepthFlag ) * uiQNumPart ); 1578 memcpy( rpcCU->getSingleDepthValue() + uiPartOffset, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * uiQNumPart); 1579 #endif 1536 1580 memcpy( rpcCU->getQP() + uiPartOffset, m_phQP, sizeInChar ); 1537 1581 memcpy( rpcCU->getPartitionSize() + uiPartOffset, m_pePartSize, sizeof( *m_pePartSize ) * uiQNumPart ); … … 2453 2497 memset( m_skipFlag + absPartIdx, skip, m_pcPic->getNumPartInCU() >> ( 2 * depth ) ); 2454 2498 } 2455 2499 #if MTK_SINGLE_DEPTH_MODE_I0095 2500 Void TComDataCU::setSingleDepthFlagSubParts( Bool singleDepth, UInt absPartIdx, UInt depth ) 2501 { 2502 assert( sizeof( *m_singleDepthFlag) == 1 ); 2503 memset( m_singleDepthFlag + absPartIdx, singleDepth, m_pcPic->getNumPartInCU() >> ( 2 * depth ) ); 2504 } 2505 2506 Void TComDataCU::setSingleDepthValueSubParts(Pel singleDepthValue, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ) 2507 { 2508 setSubPartT<Pel>( singleDepthValue, m_apSingleDepthValue, uiAbsPartIdx, uiDepth, uiPUIdx ); 2509 } 2510 #endif 2456 2511 Void TComDataCU::setPredModeSubParts( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth ) 2457 2512 { … … 6092 6147 } 6093 6148 #endif 6149 6150 #if MTK_SINGLE_DEPTH_MODE_I0095 6151 Bool TComDataCU::getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index) 6152 { 6153 6154 Bool bDepAvail = false; 6155 Pel *pDepth = this->getPic()->getPicYuvRec()->getLumaAddr(); 6156 Int iDepStride = this->getPic()->getPicYuvRec()->getStride(); 6157 6158 Int xP, yP, nPSW, nPSH; 6159 this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH); 6160 UInt PicHeight=this->getPic()->getPicYuvRec()->getHeight(); 6161 UInt PicWidth=this->getPic()->getPicYuvRec()->getWidth(); 6162 switch(index) 6163 { 6164 case 0: // Mid Left 6165 if( ( xP != 0 ) && ( ( yP + ( nPSH >> 1 ) ) < PicHeight ) ) 6166 { 6167 *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ]; 6168 bDepAvail = true; 6169 } 6170 break; 6171 case 1: // Mid Above 6172 if( ( yP != 0 ) && ( ( xP + ( nPSW >> 1 ) ) < PicWidth ) ) 6173 { 6174 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ]; 6175 bDepAvail = true; 6176 } 6177 break; 6178 case 2: // Above 6179 if(yP != 0) 6180 { 6181 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP) ]; 6182 bDepAvail = true; 6183 } 6184 break; 6185 case 3: // Left 6186 if(xP != 0) 6187 { 6188 *pNeighDepth = pDepth[ (yP) * iDepStride + (xP-1) ]; 6189 bDepAvail = true; 6190 } 6191 break; 6192 case 4: // Above_Left 6193 if(xP != 0 && yP != 0) 6194 { 6195 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP-1) ]; 6196 bDepAvail = true; 6197 } 6198 break; 6199 default: 6200 break; 6201 } 6202 return bDepAvail; 6203 } 6204 6205 #endif 6094 6206 #if H_3D_NBDV 6095 6207 //Notes from QC:
Note: See TracChangeset for help on using the changeset viewer.