Changeset 881 in 3DVCSoftware for branches/HTM-10.1-dev0/source/Lib/TLibCommon
- Timestamp:
- 27 Mar 2014, 23:17:21 (11 years ago)
- Location:
- branches/HTM-10.1-dev0/source/Lib/TLibCommon
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r880 r881 151 151 #endif 152 152 153 #if MTK_DDD_G0063153 #if H_3D_DDD 154 154 m_pucDisparityDerivedDepth = NULL; 155 155 m_pbUseDDD = NULL; … … 293 293 m_pcPattern = (TComPattern*)xMalloc(TComPattern, 1); 294 294 295 #if MTK_DDD_G0063295 #if H_3D_DDD 296 296 m_pucDisparityDerivedDepth = (UChar* )xMalloc( UChar, uiNumPartition); 297 297 m_pbUseDDD = (Bool* ) xMalloc( Bool, uiNumPartition); … … 377 377 #endif 378 378 379 #if MTK_DDD_G0063379 #if H_3D_DDD 380 380 if ( m_pucDisparityDerivedDepth ) { xFree(m_pucDisparityDerivedDepth); m_pucDisparityDerivedDepth = NULL; } 381 381 if ( m_pbUseDDD ) { xFree(m_pbUseDDD); m_pbUseDDD = NULL; } … … 505 505 #endif 506 506 507 #if MTK_DDD_G0063507 #if H_3D_DDD 508 508 m_pucDisparityDerivedDepth[ui] = pcFrom->m_pucDisparityDerivedDepth[ui]; 509 509 m_pbUseDDD[ui] = pcFrom->m_pbUseDDD[ui]; … … 588 588 #endif 589 589 590 #if MTK_DDD_G0063590 #if H_3D_DDD 591 591 memset( m_pucDisparityDerivedDepth + firstElement, 0, numElements * sizeof( *m_pucDisparityDerivedDepth ) ); 592 592 memset( m_pbUseDDD + firstElement, 0, numElements * sizeof( *m_pbUseDDD ) ); … … 762 762 #endif 763 763 764 #if MTK_DDD_G0063764 #if H_3D_DDD 765 765 m_pucDisparityDerivedDepth[ui] = 0; 766 766 m_pbUseDDD[ui] = 0; … … 869 869 #endif 870 870 871 #if MTK_DDD_G0063871 #if H_3D_DDD 872 872 memset( m_pucDisparityDerivedDepth, 0, iSizeInUchar ); 873 873 memset( m_pbUseDDD, 0, iSizeInBool ); … … 956 956 #endif 957 957 958 #if MTK_DDD_G0063958 #if H_3D_DDD 959 959 m_pucDisparityDerivedDepth[ui] = pcCU->m_pucDisparityDerivedDepth[uiPartOffset+ui]; 960 960 m_pbUseDDD[ui] = pcCU->m_pbUseDDD[uiPartOffset+ui]; … … 1102 1102 #endif 1103 1103 1104 #if MTK_DDD_G00631104 #if H_3D_DDD 1105 1105 m_pucDisparityDerivedDepth = pcCU->getDDDepth() + uiPart; 1106 1106 m_pbUseDDD = pcCU->getUseDDD() + uiPart; … … 1252 1252 #endif 1253 1253 1254 #if MTK_DDD_G00631254 #if H_3D_DDD 1255 1255 m_pucDisparityDerivedDepth = pcCU->getDDDepth() + uiAbsPartIdx; 1256 1256 m_pbUseDDD = pcCU->getUseDDD() + uiAbsPartIdx; … … 1317 1317 memcpy( m_puhCbf[2] + uiOffset, pcCU->getCbf(TEXT_CHROMA_V), iSizeInUchar ); 1318 1318 1319 #if MTK_DDD_G00631319 #if H_3D_DDD 1320 1320 memcpy( m_pucDisparityDerivedDepth + uiOffset, pcCU->getDDDepth(), iSizeInUchar ); 1321 1321 memcpy( m_pbUseDDD + uiOffset, pcCU->getUseDDD(), iSizeInBool ); … … 1417 1417 #endif 1418 1418 1419 #if MTK_DDD_G00631419 #if H_3D_DDD 1420 1420 memcpy( rpcCU->getDDDepth() + m_uiAbsIdxInLCU, m_pucDisparityDerivedDepth, iSizeInUchar ); 1421 1421 memcpy( rpcCU->getUseDDD() + m_uiAbsIdxInLCU, m_pbUseDDD, iSizeInBool ); … … 1551 1551 memcpy( rpcCU->getCbf(TEXT_CHROMA_V) + uiPartOffset, m_puhCbf[2], iSizeInUchar ); 1552 1552 1553 #if MTK_DDD_G00631553 #if H_3D_DDD 1554 1554 memcpy( rpcCU->getDDDepth() + uiPartOffset, m_pucDisparityDerivedDepth, iSizeInUchar ); 1555 1555 memcpy( rpcCU->getUseDDD() + uiPartOffset, m_pbUseDDD, iSizeInBool ); … … 1621 1621 } 1622 1622 1623 #if MTK_DDD_G00631623 #if H_3D_DDD 1624 1624 Void TComDataCU::setDDDepthSubParts ( UChar ucDDD, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 1625 1625 { … … 3847 3847 UChar tmpDir; 3848 3848 3849 #if MTK_DDD_G00633849 #if H_3D_DDD 3850 3850 m_iUseDDDCandIdx = -1; 3851 3851 #endif … … 4225 4225 } 4226 4226 } 4227 #if MTK_DDD_G00634227 #if H_3D_DDD 4228 4228 if( m_pcSlice->getIsDepth() && m_pcSlice->getViewIndex() != 0 && bMPIFlag ) 4229 4229 { 4230 UInt uiPartIdx; 4231 TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() ); 4232 TComSlice *pcTextureSlice = pcTextureCU->getSlice(); 4233 4234 4235 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 4236 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); 4237 tmpDir = 0; 4238 4239 xDeriveCenterIdx( uiPUIdx, uiPartIdx); 4240 4241 if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdx ) ) 4242 { 4243 4244 TComMvField cMVField; 4245 #if !HTM10RC1_FIX 4246 UChar ucInterDir = pcTextureCU->getInterDir( uiPartIdx ); 4247 #endif 4248 Int iDV = 0; 4249 Int iViewIdx = 0; 4250 #if !HTM10RC1_FIX 4251 if( ucInterDir & 1 ) 4230 UInt uiPartIdx; 4231 TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() ); 4232 TComSlice *pcTextureSlice = pcTextureCU->getSlice(); 4233 4234 4235 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 4236 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); 4237 tmpDir = 0; 4238 4239 xDeriveCenterIdx( uiPUIdx, uiPartIdx); 4240 4241 if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdx ) ) 4242 { 4243 4244 TComMvField cMVField; 4245 Int iDV = 0; 4246 Int iViewIdx = 0; 4247 pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_0, cMVField ); 4248 if( cMVField.getRefIdx() >= 0 ) 4249 { 4250 if( pcTextureSlice->getRefPOC( REF_PIC_LIST_0, cMVField.getRefIdx()) == pcTextureSlice->getPOC() ) 4251 { 4252 iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_0, cMVField.getRefIdx())->getViewIndex(); 4253 iDV = cMVField.getHor(); 4254 4255 4256 Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_0, cMVField.getRefIdx() ); 4257 4258 if( iValidDepRef >= 0 ) 4252 4259 { 4253 #endif 4254 pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_0, cMVField ); 4255 #if HTM10RC1_FIX 4256 if( cMVField.getRefIdx() >= 0 ) 4257 { 4258 #endif 4259 if( pcTextureSlice->getRefPOC( REF_PIC_LIST_0, cMVField.getRefIdx()) == pcTextureSlice->getPOC() ) 4260 { 4261 iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_0, cMVField.getRefIdx())->getViewIndex(); 4262 iDV = cMVField.getHor(); 4263 4264 4265 Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_0, cMVField.getRefIdx() ); 4266 4267 if( iValidDepRef >= 0 ) 4268 { 4269 const TComMv cAdd( 2, 2 ); 4270 cMVField.getMv() += cAdd; 4271 cMVField.getMv() >>= 2; 4272 clipMv( cMVField.getMv() ); 4273 tmpMV[ 0 ].setMvField( cMVField.getMv(), iValidDepRef ); 4274 tmpDir = 1; 4275 } 4276 } 4260 const TComMv cAdd( 2, 2 ); 4261 cMVField.getMv() += cAdd; 4262 cMVField.getMv() >>= 2; 4263 clipMv( cMVField.getMv() ); 4264 tmpMV[ 0 ].setMvField( cMVField.getMv(), iValidDepRef ); 4265 tmpDir = 1; 4277 4266 } 4278 4279 #if !HTM10RC1_FIX 4280 if( !tmpDir && ( ucInterDir & 2 )) 4267 } 4268 } 4269 4270 pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_1, cMVField ); 4271 4272 if( !tmpDir && cMVField.getRefIdx() >= 0 ) 4273 { 4274 if( pcTextureSlice->getRefPOC( REF_PIC_LIST_1, cMVField.getRefIdx()) == pcTextureSlice->getPOC() ) 4275 { 4276 iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_1, cMVField.getRefIdx())->getViewIndex(); 4277 iDV = cMVField.getHor(); 4278 4279 Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_1, cMVField.getRefIdx() ); 4280 4281 if( iValidDepRef >= 0 ) 4281 4282 { 4282 #endif 4283 pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_1, cMVField ); 4284 4285 #if HTM10RC1_FIX 4286 if( !tmpDir && cMVField.getRefIdx() >= 0 ) 4287 { 4288 #endif 4289 if( pcTextureSlice->getRefPOC( REF_PIC_LIST_1, cMVField.getRefIdx()) == pcTextureSlice->getPOC() ) 4290 { 4291 iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_1, cMVField.getRefIdx())->getViewIndex(); 4292 iDV = cMVField.getHor(); 4293 4294 Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_1, cMVField.getRefIdx() ); 4295 4296 if( iValidDepRef >= 0 ) 4297 { 4298 const TComMv cAdd( 2, 2 ); 4299 cMVField.getMv() += cAdd; 4300 cMVField.getMv() >>= 2; 4301 clipMv( cMVField.getMv() ); 4302 tmpMV[ 1 ].setMvField( cMVField.getMv(), iValidDepRef ); 4303 tmpDir = 2; 4304 } 4305 } 4283 const TComMv cAdd( 2, 2 ); 4284 cMVField.getMv() += cAdd; 4285 cMVField.getMv() >>= 2; 4286 clipMv( cMVField.getMv() ); 4287 tmpMV[ 1 ].setMvField( cMVField.getMv(), iValidDepRef ); 4288 tmpDir = 2; 4306 4289 } 4307 if( tmpDir != 0 )4308 {4309 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV);4310 m_ucDDTmpDepth = m_pcSlice->getDepthFromDV( iDV, iViewIdx );4311 m_iUseDDDCandIdx = iCount;4312 4313 if( tmpDir == 1 )4314 { 4315 pcMvFieldNeighbours[ iCount << 1 ] = tmpMV[ 0 ];4316 }4317 else if( tmpDir == 2 )4318 {4319 pcMvFieldNeighbours[( iCount << 1 ) + 1 ] = tmpMV[ 1 ];4320 }4321 4322 abCandIsInter [ iCount ] = true;4323 puhInterDirNeighbours[ iCount ] = tmpDir; 4324 4325 if ( mrgCandIdx == iCount )4326 { 4327 return;4328 }4329 iCount ++;4330 4331 Int iLeftAboveAvail = 0;4332 if( iPosLeftAbove[ 0 ] != -1 ) 4333 {4334 iPosLeftAbove[ 0 ] = iCount;4335 iLeftAboveAvail = 1;4336 }4337 if( iPosLeftAbove[ 1 ] != -1 )4338 {4339 iPosLeftAbove[ 1 ] = iCount + iLeftAboveAvail;4340 }4341 4342 4343 } 4344 4290 } 4291 } 4292 if( tmpDir != 0 ) 4293 { 4294 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV); 4295 m_ucDDTmpDepth = m_pcSlice->getDepthFromDV( iDV, iViewIdx ); 4296 m_iUseDDDCandIdx = iCount; 4297 4298 if( tmpDir == 1 ) 4299 { 4300 pcMvFieldNeighbours[ iCount << 1 ] = tmpMV[ 0 ]; 4301 } 4302 else if( tmpDir == 2 ) 4303 { 4304 pcMvFieldNeighbours[( iCount << 1 ) + 1 ] = tmpMV[ 1 ]; 4305 } 4306 4307 abCandIsInter [ iCount ] = true; 4308 puhInterDirNeighbours[ iCount ] = tmpDir; 4309 4310 if ( mrgCandIdx == iCount ) 4311 { 4312 return; 4313 } 4314 iCount ++; 4315 4316 Int iLeftAboveAvail = 0; 4317 if( iPosLeftAbove[ 0 ] != -1 ) 4318 { 4319 iPosLeftAbove[ 0 ] = iCount; 4320 iLeftAboveAvail = 1; 4321 } 4322 if( iPosLeftAbove[ 1 ] != -1 ) 4323 { 4324 iPosLeftAbove[ 1 ] = iCount + iLeftAboveAvail; 4325 } 4326 } 4327 } 4345 4328 } 4346 4329 #endif … … 4413 4396 for(; iCnloop >= 0; iCnloop --) 4414 4397 { 4415 #if MTK_DDD_G00634398 #if H_3D_DDD 4416 4399 if( iCnloop == m_iUseDDDCandIdx ) 4417 4400 { … … 4614 4597 #endif 4615 4598 4616 #if MTK_DDD_G00634599 #if H_3D_DDD 4617 4600 // early termination 4618 4601 if ( iCount >= getSlice()->getMaxNumMergeCand()) -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComDataCU.h
r880 r881 226 226 #endif 227 227 228 #if MTK_DDD_G0063228 #if H_3D_DDD 229 229 UChar* m_pucDisparityDerivedDepth; 230 230 Bool* m_pbUseDDD; … … 723 723 UInt getCoefScanIdx(UInt uiAbsPartIdx, UInt uiWidth, Bool bIsLuma, Bool bIsIntra); 724 724 725 #if MTK_DDD_G0063725 #if H_3D_DDD 726 726 UChar* getDDDepth () { return m_pucDisparityDerivedDepth; } 727 727 UChar getDDDepth ( UInt uiIdx ) { return m_pucDisparityDerivedDepth[uiIdx]; } -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp
r880 r881 1090 1090 pcCU->clipMv(cMv); 1091 1091 1092 #if MTK_DDD_G00631092 #if H_3D_DDD 1093 1093 if( pcCU->getUseDDD( uiPartAddr ) ) 1094 1094 { -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComSlice.cpp
r876 r881 3359 3359 #endif 3360 3360 3361 #if MTK_DDD_G00633361 #if H_3D_DDD 3362 3362 if( getIsDepth() && getViewIndex() > 0 ) 3363 3363 { … … 3417 3417 } 3418 3418 3419 #if MTK_DDD_G00633419 #if H_3D_DDD 3420 3420 InitializeDDDPara( vps->getCamParPrecision(), codScale[ i ], codOffset[ i ], i ); 3421 3421 #endif … … 3425 3425 #endif 3426 3426 3427 #if MTK_DDD_G00633427 #if H_3D_DDD 3428 3428 Void TComSlice::InitializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx ) 3429 3429 { -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComSlice.h
r876 r881 2274 2274 #endif 2275 2275 2276 #if MTK_DDD_G00632276 #if H_3D_DDD 2277 2277 Int m_aiDDDInvScale [MAX_NUM_LAYERS]; 2278 2278 Int m_aiDDDInvOffset[MAX_NUM_LAYERS]; … … 2654 2654 2655 2655 #endif 2656 #if MTK_DDD_G00632656 #if H_3D_DDD 2657 2657 Void InitializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx ); 2658 2658 Int getDepthFromDV( Int iDV, Int iBaseViewIdx ) -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TypeDef.h
r880 r881 76 76 #if H_3D 77 77 #define H_3D_QTLPC 1 // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068 78 // HHI_QTLPC_RAU_OFF_C0160 // JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units 78 // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units 79 // MTK_TEX_DEP_PAR_G0055 Texture-partition-dependent depth partition. JCT3V-G0055 79 80 80 81 #define H_3D_VSO 1 // VSO, View synthesis optimization, includes: … … 205 206 #define H_3D_DBBP 1 // DBBP: Depth-based Block Partitioning and Merging 206 207 208 #define H_3D_DDD 1 // Disparity derived depth coding 207 209 208 210 #define H_3D_FCO 0 // Flexible coding order for 3D … … 303 305 #if H_3D 304 306 #define PPS_FIX_DEPTH 1 305 #endif306 307 308 /////////////////////////////////////////////////////////////////////////////////////////309 /////////////////////////////////// HTM-10.0 Integrations //////////////////////////////310 /////////////////////////////////////////////////////////////////////////////////////////311 #if H_3D312 #if H_3D_QTLPC313 #define MTK_TEX_DEP_PAR_G0055 1 // Texture-partition-dependent depth partition. JCT3V-G0055314 #endif315 316 #define MTK_DDD_G0063 1 // Disparity derived depth coding317 #define HTM10RC1_FIX 1 // Fix of DDD318 307 #endif 319 308
Note: See TracChangeset for help on using the changeset viewer.