Changeset 468 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComDataCU.cpp
- Timestamp:
- 16 Jun 2013, 05:33:39 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComDataCU.cpp
r464 r468 119 119 m_puhARPW = NULL; 120 120 #endif 121 122 #if H_3D_IC 123 m_pbICFlag = NULL; 124 #endif 121 125 } 122 126 … … 214 218 #if H_3D_ARP 215 219 m_puhARPW = new UChar[ uiNumPartition]; 220 #endif 221 #if H_3D_IC 222 m_pbICFlag = (Bool* )xMalloc(Bool, uiNumPartition); 216 223 #endif 217 224 } … … 304 311 if ( m_puhARPW ) { delete[] m_puhARPW; m_puhARPW = NULL; } 305 312 #endif 306 313 #if H_3D_IC 314 if ( m_pbICFlag ) { xFree(m_pbICFlag); m_pbICFlag = NULL; } 315 #endif 307 316 m_acCUMvField[0].destroy(); 308 317 m_acCUMvField[1].destroy(); … … 437 446 m_puhCbf[2][ui]=pcFrom->m_puhCbf[2][ui]; 438 447 m_pbIPCMFlag[ui] = pcFrom->m_pbIPCMFlag[ui]; 448 #if H_3D_IC 449 m_pbICFlag[ui] = pcFrom->m_pbICFlag[ui]; 450 #endif 439 451 } 440 452 … … 472 484 #if H_3D_ARP 473 485 memset( m_puhARPW + firstElement, 0, numElements * sizeof( UChar ) ); 486 #endif 487 #if H_3D_IC 488 memset( m_pbICFlag + firstElement, false, numElements * sizeof( *m_pbICFlag ) ); 474 489 #endif 475 490 } … … 611 626 m_puhARPW[ui] = 0; 612 627 #endif 628 #if H_3D_IC 629 m_pbICFlag[ui] = false; 630 #endif 613 631 } 614 632 } … … 692 710 memset( m_puhHeight, uhHeight, iSizeInUchar ); 693 711 memset( m_pbIPCMFlag, 0, iSizeInBool ); 712 #if H_3D_IC 713 memset( m_pbICFlag, 0, iSizeInBool ); 714 #endif 694 715 for (UInt ui = 0; ui < m_uiNumPartition; ui++) 695 716 { … … 733 754 m_puhARPW [ui] = pcCU->getARPW( uiPartOffset+ui ); 734 755 #endif 756 #if H_3D_IC 757 m_pbICFlag[ui] = pcCU->m_pbICFlag[uiPartOffset+ui]; 758 #endif 735 759 } 736 760 } … … 846 870 m_puhARPW = pcCU->getARPW() + uiPart; 847 871 #endif 872 #if H_3D_IC 873 m_pbICFlag = pcCU->getICFlag() + uiPart; 874 #endif 848 875 849 876 m_puhLumaIntraDir = pcCU->getLumaIntraDir() + uiPart; … … 973 1000 #if H_3D_NBDV 974 1001 } 1002 #endif 1003 #if H_3D_IC 1004 m_pbICFlag = pcCU->getICFlag() + uiAbsPartIdx; 975 1005 #endif 976 1006 } … … 1058 1088 memcpy( m_puhARPW + uiOffset, pcCU->getARPW(), iSizeInUchar ); 1059 1089 #endif 1090 #if H_3D_IC 1091 memcpy( m_pbICFlag + uiOffset, pcCU->getICFlag(), iSizeInBool ); 1092 #endif 1060 1093 } 1061 1094 … … 1136 1169 #if H_3D_ARP 1137 1170 memcpy( rpcCU->getARPW() + m_uiAbsIdxInLCU, m_puhARPW, iSizeInUchar ); 1171 #endif 1172 #if H_3D_IC 1173 memcpy( rpcCU->getICFlag() + m_uiAbsIdxInLCU, m_pbICFlag, iSizeInBool ); 1138 1174 #endif 1139 1175 } … … 1213 1249 memcpy( rpcCU->getARPW() + uiPartOffset, m_puhARPW, iSizeInUchar ); 1214 1250 #endif 1251 #if H_3D_IC 1252 memcpy( rpcCU->getICFlag() + uiPartOffset, m_pbICFlag, iSizeInBool ); 1253 #endif 1215 1254 } 1216 1255 … … 1872 1911 #endif 1873 1912 1913 #if H_3D_IC 1914 UInt TComDataCU::getCtxICFlag( UInt uiAbsPartIdx ) 1915 { 1916 UInt uiCtx = 0; 1917 1918 return uiCtx; 1919 } 1920 #endif 1921 1874 1922 UInt TComDataCU::getCtxInterDir( UInt uiAbsPartIdx ) 1875 1923 { … … 2170 2218 } 2171 2219 2220 #if H_3D_IC 2221 Void TComDataCU::getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx, Bool bLCU) 2222 { 2223 UInt uiNumPartition = bLCU ? (getWidth(uiAbsPartIdx)*getHeight(uiAbsPartIdx) >> 4) : m_uiNumPartition; 2224 UInt uiTmpAbsPartIdx = bLCU ? uiAbsPartIdx : 0; 2225 2226 switch ( m_pePartSize[uiTmpAbsPartIdx] ) 2227 { 2228 case SIZE_2NxN: 2229 riWidth = getWidth( uiTmpAbsPartIdx ); riHeight = getHeight( uiTmpAbsPartIdx ) >> 1; ruiPartAddr = ( uiPartIdx == 0 )? 0 : uiNumPartition >> 1; 2230 break; 2231 case SIZE_Nx2N: 2232 riWidth = getWidth( uiTmpAbsPartIdx ) >> 1; riHeight = getHeight( uiTmpAbsPartIdx ); ruiPartAddr = ( uiPartIdx == 0 )? 0 : uiNumPartition >> 2; 2233 break; 2234 case SIZE_NxN: 2235 riWidth = getWidth( uiTmpAbsPartIdx ) >> 1; riHeight = getHeight( uiTmpAbsPartIdx ) >> 1; ruiPartAddr = ( uiNumPartition >> 2 ) * uiPartIdx; 2236 break; 2237 case SIZE_2NxnU: 2238 riWidth = getWidth( uiTmpAbsPartIdx ); 2239 riHeight = ( uiPartIdx == 0 ) ? getHeight( uiTmpAbsPartIdx ) >> 2 : ( getHeight( uiTmpAbsPartIdx ) >> 2 ) + ( getHeight( uiTmpAbsPartIdx ) >> 1 ); 2240 ruiPartAddr = ( uiPartIdx == 0 ) ? 0 : uiNumPartition >> 3; 2241 break; 2242 case SIZE_2NxnD: 2243 riWidth = getWidth( uiTmpAbsPartIdx ); 2244 riHeight = ( uiPartIdx == 0 ) ? ( getHeight( uiTmpAbsPartIdx ) >> 2 ) + ( getHeight( uiTmpAbsPartIdx ) >> 1 ) : getHeight( uiTmpAbsPartIdx ) >> 2; 2245 ruiPartAddr = ( uiPartIdx == 0 ) ? 0 : (uiNumPartition >> 1) + (uiNumPartition >> 3); 2246 break; 2247 case SIZE_nLx2N: 2248 riWidth = ( uiPartIdx == 0 ) ? getWidth( uiTmpAbsPartIdx ) >> 2 : ( getWidth( uiTmpAbsPartIdx ) >> 2 ) + ( getWidth( uiTmpAbsPartIdx ) >> 1 ); 2249 riHeight = getHeight( uiTmpAbsPartIdx ); 2250 ruiPartAddr = ( uiPartIdx == 0 ) ? 0 : uiNumPartition >> 4; 2251 break; 2252 case SIZE_nRx2N: 2253 riWidth = ( uiPartIdx == 0 ) ? ( getWidth( uiTmpAbsPartIdx ) >> 2 ) + ( getWidth( uiTmpAbsPartIdx ) >> 1 ) : getWidth( uiTmpAbsPartIdx ) >> 2; 2254 riHeight = getHeight( uiTmpAbsPartIdx ); 2255 ruiPartAddr = ( uiPartIdx == 0 ) ? 0 : (uiNumPartition >> 2) + (uiNumPartition >> 4); 2256 break; 2257 default: 2258 assert ( m_pePartSize[uiTmpAbsPartIdx] == SIZE_2Nx2N ); 2259 riWidth = getWidth( uiTmpAbsPartIdx ); riHeight = getHeight( uiTmpAbsPartIdx ); ruiPartAddr = 0; 2260 break; 2261 } 2262 } 2263 #else 2172 2264 Void TComDataCU::getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight ) 2173 2265 { … … 2209 2301 } 2210 2302 } 2303 #endif 2211 2304 2212 2305 … … 3111 3204 { 3112 3205 Int iMvShift = 2; 3206 #if H_3D_IC 3207 if( getSlice()->getIsDepth() ) 3208 iMvShift = 0; 3209 #endif 3113 3210 Int iOffset = 8; 3114 3211 Int iHorMax = ( m_pcSlice->getSPS()->getPicWidthInLumaSamples() + iOffset - m_uiCUPelX - 1 ) << iMvShift; … … 4317 4414 } 4318 4415 #endif 4416 4417 #if H_3D_IC 4418 Void TComDataCU::setICFlagSubParts( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 4419 { 4420 memset( m_pbICFlag + uiAbsPartIdx, bICFlag, (m_pcPic->getNumPartInCU() >> ( 2 * uiDepth ))*sizeof(Bool) ); 4421 } 4422 4423 Bool TComDataCU::isICFlagRequired( UInt uiAbsPartIdx ) 4424 { 4425 UInt uiPartAddr; 4426 UInt iNumbPart; 4427 4428 if( !( getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ) 4429 { 4430 return false; 4431 } 4432 4433 if( getSlice()->getIcSkipParseFlag() ) 4434 { 4435 if( getMergeFlag( uiAbsPartIdx ) && getMergeIndex( uiAbsPartIdx ) == 0 ) 4436 { 4437 return false; 4438 } 4439 } 4440 4441 if( getMergeFlag( uiAbsPartIdx ) ) 4442 { 4443 return true; 4444 } 4445 4446 4447 Int iWidth, iHeight; 4448 4449 iNumbPart = ( getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ? 1 : ( getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ? 4 : 2 ) ); 4450 4451 for(UInt i = 0; i < iNumbPart; i++) 4452 { 4453 getPartIndexAndSize( i, uiPartAddr, iWidth, iHeight, uiAbsPartIdx, true ); 4454 uiPartAddr += uiAbsPartIdx; 4455 4456 for(UInt uiRefIdx = 0; uiRefIdx < 2; uiRefIdx++) 4457 { 4458 RefPicList eRefList = uiRefIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0; 4459 Int iBestRefIdx = getCUMvField(eRefList)->getRefIdx(uiPartAddr); 4460 4461 if( ( getInterDir( uiPartAddr ) & ( uiRefIdx+1 ) ) && iBestRefIdx >= 0 && getSlice()->getViewIndex() != getSlice()->getRefPic( eRefList, iBestRefIdx )->getViewIndex() ) 4462 { 4463 return true; 4464 } 4465 } 4466 } 4467 4468 return false; 4469 } 4470 #endif 4319 4471 //! \}
Note: See TracChangeset for help on using the changeset viewer.