Changeset 968 in 3DVCSoftware
- Timestamp:
- 5 Jul 2014, 09:11:50 (10 years ago)
- Location:
- branches/HTM-11.1-dev0/source/Lib
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-11.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r967 r968 2358 2358 2359 2359 TComMv cDv = depthRefineFlag ? DvInfo.m_acDoNBDV : DvInfo.m_acNBDV; 2360 #if SEC_VER_DONBDV_H01032361 2360 if( depthRefineFlag ) 2362 2361 { 2363 2362 cDv.setVer(0); 2364 2363 } 2365 #endif2366 2364 2367 2365 Int depthPosX = Clip3(0, iPictureWidth - iWidth, iBlkX + ((cDv.getHor()+2)>>2)); … … 3254 3252 * false: otherwise 3255 3253 */ 3256 #if ETRIKHU_CLEANUP_H00833257 3254 inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount) 3258 #else3259 inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount,3260 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo )3261 #endif3262 3255 { 3263 3256 if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() || pDInfo->m_aVIdxCan == -1) … … 3275 3268 } 3276 3269 3277 #if ETRIKHU_CLEANUP_H00833278 3270 TComMvField mvVSP[2]; 3279 3271 UChar dirVSP; 3280 #else3281 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV);3282 #endif3283 3284 3272 Bool refViewAvailFlag = false; 3285 3273 UChar predFlag[2] = {0, 0}; … … 3295 3283 refViewAvailFlag = true; 3296 3284 predFlag[iRefListIdX] = 1; 3297 #if ETRIKHU_CLEANUP_H00833298 3285 mvVSP[0+iRefListIdX].setMvField( pDInfo->m_acNBDV, i ); 3299 3286 #if H_3D_NBDV 3300 3287 mvVSP[0+iRefListIdX].getMv().setIDVFlag (false); 3301 3288 #endif 3302 #else 3303 pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].setMvField( pDInfo->m_acNBDV, i ); 3304 #if H_3D_NBDV 3305 pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].getMv().setIDVFlag (false); 3306 #endif 3307 #endif 3308 } 3309 } 3310 } 3311 3312 #if ETRIKHU_CLEANUP_H0083 3289 } 3290 } 3291 } 3292 3313 3293 dirVSP = (predFlag[0] | (predFlag[1] << 1)); 3314 3294 m_mergCands[MRG_VSP].setCand( mvVSP, dirVSP, true, false); 3315 #else3316 // Set values to be returned3317 abCandIsInter [iCount] = true;3318 puhInterDirNeighbours[iCount] = (predFlag[0] | (predFlag[1] << 1));3319 vspFlag [iCount] = 1;3320 #endif3321 3322 3295 if ( mrgCandIdx == iCount ) 3323 3296 { … … 3333 3306 3334 3307 #if H_3D_IV_MERGE 3335 #if ETRIKHU_CLEANUP_H00833336 3308 inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int* ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx ) 3337 #else3338 inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv,3339 Int* ivCandRefIdx, Int iPosIvDC, Int* vspFlag, Int &iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo )3340 #endif3341 3309 { 3342 3310 for(Int iLoop = 0; iLoop < 2; iLoop ++ ) … … 3346 3314 { 3347 3315 Int iFirDispCand = -1; 3348 #if ETRIKHU_CLEANUP_H00833349 3316 TComMvField mvIvDcShift[2]; 3350 3317 UChar dirIvDcShift; 3351 3318 3352 3319 if (xGetPosFirstAvailDmvCand(MRG_IVSHIFT, iFirDispCand)) 3353 #else3354 if (xGetPosFirstAvailDmvCand(iCount, pcMvFieldNeighbours, ivCandDir, iPosIvDC, vspFlag, iFirDispCand))3355 #endif3356 3320 { 3357 3321 TComMv cMv; 3358 #if ETRIKHU_CLEANUP_H00833359 3322 cMv = m_mergCands[iFirDispCand].m_cMvField[0].getMv(); 3360 #else3361 cMv = pcMvFieldNeighbours[(iFirDispCand<<1)].getMv();3362 #endif3363 3323 cMv.setHor(cMv.getHor()+4); 3364 3324 if(m_pcSlice->getVPS()->getViewSynthesisPredFlag(m_pcSlice->getLayerIdInVps())) … … 3370 3330 #endif 3371 3331 3372 #if ETRIKHU_CLEANUP_H00833373 3332 dirIvDcShift = m_mergCands[iFirDispCand].m_uDir; 3374 3333 mvIvDcShift[0].setMvField(cMv, m_mergCands[iFirDispCand].m_cMvField[0].getRefIdx() ); 3375 3334 mvIvDcShift[1].setMvField(m_mergCands[iFirDispCand].m_cMvField[1].getMv(), m_mergCands[iFirDispCand].m_cMvField[1].getRefIdx() ); 3376 3335 m_mergCands[MRG_IVSHIFT].setCand(mvIvDcShift, dirIvDcShift, false, false); 3377 #else3378 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV);3379 3380 abCandIsInter [ iCount ] = true;3381 puhInterDirNeighbours[ iCount ] = puhInterDirNeighbours[iFirDispCand];3382 pcMvFieldNeighbours [ iCount << 1 ].setMvField(cMv, pcMvFieldNeighbours[( iFirDispCand << 1)].getRefIdx() );3383 pcMvFieldNeighbours [(iCount << 1) + 1 ].setMvField(pcMvFieldNeighbours[(iFirDispCand << 1) + 1].getMv(), pcMvFieldNeighbours[( iFirDispCand << 1) + 1].getRefIdx() );3384 #endif3385 3336 3386 3337 if( mrgCandIdx == iCount ) … … 3388 3339 return true; 3389 3340 } 3390 3391 3341 iCount++; 3392 3342 break; … … 3413 3363 if( !iLoop && ivCandDir[0] > 0) 3414 3364 { 3415 #if ETRIKHU_CLEANUP_H00833416 3365 if(tmpDir == m_mergCands[MRG_IVMC].m_uDir && m_mergCands[MRG_IVMC].m_cMvField[0]==tmpMV[0] && m_mergCands[MRG_IVMC].m_cMvField[1]==tmpMV[1]) 3417 #else3418 if(tmpDir == puhInterDirNeighbours[0] && pcMvFieldNeighbours[0]==tmpMV[0] && pcMvFieldNeighbours[1]==tmpMV[1])3419 #endif3420 3366 { 3421 3367 bRemove = true; … … 3424 3370 if(!bRemove) 3425 3371 { 3426 #if ETRIKHU_CLEANUP_H00833427 3372 #if H_3D_NBDV 3428 3373 if(iLoop) // For IvMcShift candidate … … 3433 3378 #endif 3434 3379 m_mergCands[MRG_IVSHIFT].setCand(tmpMV, tmpDir, false, false); 3435 #else3436 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV);3437 3438 abCandIsInter[ iCount ] = true;3439 puhInterDirNeighbours[ iCount ] = ivCandDir[iLoop + 2];3440 if( ( ivCandDir[iLoop + 2] & 1 ) == 1 )3441 {3442 pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ (iLoop<<1) + 4 ], ivCandRefIdx[ (iLoop<<1) + 4 ] );3443 }3444 if( ( ivCandDir[iLoop + 2] & 2 ) == 2 )3445 {3446 pcMvFieldNeighbours[ (iCount<<1)+1 ].setMvField( ivCandMv[ (iLoop<<1) + 5 ], ivCandRefIdx[ (iLoop<<1) + 5 ] );3447 }3448 #if H_3D_NBDV3449 if(iLoop) // For IvMcShift candidate3450 {3451 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);3452 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);3453 }3454 #endif3455 #endif3456 3380 if( mrgCandIdx == iCount ) 3457 3381 { … … 3466 3390 } 3467 3391 3468 #if ETRIKHU_CLEANUP_H00833469 3392 inline Bool TComDataCU::xGetPosFirstAvailDmvCand(Int iCount, Int& posFirstAvailDmvCand ) 3470 3393 { … … 3483 3406 return false; 3484 3407 } 3485 #else3486 inline Bool TComDataCU::xGetPosFirstAvailDmvCand( Int iCount, TComMvField* pcMvFieldNeighbours, Int* ivCandDir, Int posIvDC, Int* vspFlag, Int& posFirstAvailDmvCand )3487 {3488 // ivCandDir[0] == true --> IvMC is available and excluded in loop over merge list.3489 for ( Int currListPos = (ivCandDir[0] ? 1 : 0); currListPos < iCount; currListPos++ )3490 {3491 if ( ( currListPos == posIvDC ) || ( vspFlag[ currListPos ] != 0 ) )3492 {3493 continue;3494 }3495 else if((pcMvFieldNeighbours[currListPos<<1].getRefIdx() != -1 ) && (getSlice()->getViewIndex() != getSlice()->getRefPic(RefPicList(0), pcMvFieldNeighbours[currListPos<<1].getRefIdx())->getViewIndex()))3496 {3497 posFirstAvailDmvCand = currListPos;3498 return true;3499 }3500 }3501 return false;3502 }3503 #endif3504 3408 3505 3409 #endif 3506 3410 3507 3411 #if H_3D 3508 #if ETRIKHU_CLEANUP_H00833509 3510 3412 Void TComDataCU::buildMCL(TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours 3511 3413 #if H_3D_VSP … … 3580 3482 assert(iCount == getSlice()->getMaxNumMergeCand()); 3581 3483 } 3582 #else3583 Void TComDataCU::rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo* inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV)3584 {3585 iCount3DV++;3586 for (int i=num; i>0; i--)3587 {3588 pcMvFieldNeighbours[(start+i)<<1].setMvField(pcMvFieldNeighbours[(start+i-1)<<1].getMv(), pcMvFieldNeighbours[(start+i-1)<<1].getRefIdx());3589 pcMvFieldNeighbours[((start+i)<<1)+1].setMvField(pcMvFieldNeighbours[((start+i-1)<<1)+1].getMv(), pcMvFieldNeighbours[((start+i-1)<<1)+1].getRefIdx());3590 puhInterDirNeighbours[start+i] = puhInterDirNeighbours[start+i-1];3591 iVSPIndexTrue[start+i] = iVSPIndexTrue[start+i-1];3592 inheritedVSPDisInfo[start+i].m_acDvInfo = inheritedVSPDisInfo[start+i-1].m_acDvInfo;3593 }3594 TComMv cZeroMv;3595 pcMvFieldNeighbours[start<<1].setMvField( cZeroMv, NOT_VALID );3596 pcMvFieldNeighbours[(start<<1)+1].setMvField( cZeroMv, NOT_VALID );3597 puhInterDirNeighbours[start] = 0;3598 iVSPIndexTrue[start] = 0;3599 inheritedVSPDisInfo[start].m_acDvInfo = m_cDefaultDisInfo;3600 3601 return;3602 }3603 #endif3604 3484 3605 3485 /** Constructs a list of merging candidates … … 3975 3855 #endif 3976 3856 #if H_3D_VSP 3977 #if !ETRIKHU_CLEANUP_H00833978 , Int* vspFlag3979 #endif3980 3857 , InheritedVSPDisInfo* inheritedVSPDisInfo 3981 3858 #endif 3982 3859 #if H_3D_SPIVMP 3983 #if ETRIKHU_CLEANUP_H00833984 3860 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 3985 #else3986 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP3987 #endif3988 3861 #endif 3989 3862 , Int& numValidMergeCand, Int mrgCandIdx … … 3996 3869 //////////////////////////// 3997 3870 TComMv cZeroMv; 3998 #if !ETRIKHU_CLEANUP_H00833999 Bool abCandIsInter[ MRG_MAX_NUM_CANDS_MEM ];4000 #endif4001 3871 #else 4002 3872 Bool abCandIsInter[ MRG_MAX_NUM_CANDS ]; … … 4064 3934 #if H_3D_DBBP 4065 3935 Bool bDBBPFlag = getDBBPFlag(uiAbsPartIdx); 4066 #if MTK_DIS_SPBIP8X4_H02054067 3936 assert(bDBBPFlag == getDBBPFlag(0)); 4068 3937 #endif 4069 #endif4070 3938 4071 3939 #if H_3D 4072 #if !ETRIKHU_CLEANUP_H00834073 Int iPosLeftAbove[2] = {-1, -1};4074 4075 Int iCountHEVC = 0;4076 Int iCount3DV = 0;4077 Int numA1B1B0 = 0;4078 Int numA0B2 = 0;4079 #endif4080 3940 #if H_3D_NBDV 4081 3941 for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++) … … 4085 3945 } 4086 3946 #endif 4087 4088 4089 #if ETRIKHU_CLEANUP_H00834090 4091 4092 3947 // Clean version for MCL construction align with WD 4093 3948 // init mergCands list … … 4233 4088 } 4234 4089 4235 4236 #if !ETRIKHU_BUGFIX_H00834237 Bool A1_was_available = m_mergCands[MRG_A1].m_bAvailable;4238 Bool B1_was_available = m_mergCands[MRG_B1].m_bAvailable;4239 #endif4240 4241 4242 #else4243 //left4244 UInt uiLeftPartIdx = 0;4245 TComDataCU* pcCULeft = 0;4246 pcCULeft = getPULeft( uiLeftPartIdx, uiPartIdxLB );4247 if (getAvailableFlagA1())4248 {4249 iPosLeftAbove[0] = numA1B1B0;4250 #if H_3D_VSP4251 if (pcCULeft->getVSPFlag(uiLeftPartIdx) != 04252 #if H_3D_IC4253 && !bICFlag4254 #endif4255 #if H_3D_ARP4256 && !bARPFlag4257 #endif4258 #if H_3D_DBBP4259 && !bDBBPFlag4260 #endif4261 )4262 {4263 vspFlag[numA1B1B0] = 1;4264 }4265 #endif4266 numA1B1B0++;4267 }4268 4269 // above4270 UInt uiAbovePartIdx = 0;4271 TComDataCU* pcCUAbove = 0;4272 pcCUAbove = getPUAbove( uiAbovePartIdx, uiPartIdxRT );4273 if ( getAvailableFlagB1())4274 {4275 iPosLeftAbove[1] = numA1B1B0;4276 #if H_3D_VSP4277 if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) != 0)4278 #if H_3D_IC4279 && !bICFlag4280 #endif4281 #if H_3D_ARP4282 && !bARPFlag4283 #endif4284 #if H_3D_DBBP4285 && !bDBBPFlag4286 #endif4287 )4288 {4289 vspFlag[numA1B1B0] = 1;4290 }4291 #endif4292 4293 numA1B1B0++;4294 }4295 4296 // above right4297 UInt uiAboveRightPartIdx = 0;4298 TComDataCU* pcCUAboveRight = 0;4299 pcCUAboveRight = getPUAboveRight( uiAboveRightPartIdx, uiPartIdxRT );4300 if ( getAvailableFlagB0())4301 {4302 #if H_3D_VSP4303 if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) != 0)4304 #if H_3D_IC4305 && !bICFlag4306 #endif4307 #if H_3D_ARP4308 && !bARPFlag4309 #endif4310 #if H_3D_DBBP4311 && !bDBBPFlag4312 #endif4313 )4314 {4315 vspFlag[numA1B1B0] = 1;4316 }4317 #endif4318 numA1B1B0++;4319 }4320 4321 // left bottom4322 UInt uiLeftBottomPartIdx = 0;4323 TComDataCU* pcCULeftBottom = getPUBelowLeft( uiLeftBottomPartIdx, uiPartIdxLB );4324 if ( getAvailableFlagA0())4325 {4326 #if H_3D_VSP4327 if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) != 04328 #if H_3D_IC4329 && !bICFlag4330 #endif4331 #if H_3D_ARP4332 && !bARPFlag4333 #endif4334 #if H_3D_DBBP4335 && !bDBBPFlag4336 #endif4337 )4338 {4339 vspFlag[numA1B1B0] = 1;4340 }4341 #endif4342 iCountHEVC++;4343 numA0B2++;4344 }4345 4346 // above left4347 UInt uiAboveLeftPartIdx = 0;4348 TComDataCU* pcCUAboveLeft = 0;4349 pcCUAboveLeft = getPUAboveLeft( uiAboveLeftPartIdx, uiAbsPartAddr );4350 if (getAvailableFlagB2())4351 {4352 #if H_3D_VSP4353 if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) != 0)4354 #if H_3D_IC4355 && !bICFlag4356 #endif4357 #if H_3D_ARP4358 && !bARPFlag4359 #endif4360 #if H_3D_DBBP4361 && !bDBBPFlag4362 #endif4363 )4364 {4365 vspFlag[numA1B1B0+iCountHEVC] = 1;4366 }4367 #endif4368 iCountHEVC++;4369 numA0B2++;4370 }4371 4372 iCountHEVC = numValidMergeCand;4373 #endif4374 4090 #endif 4375 4091 … … 4381 4097 ///////////////////////////////////////////// 4382 4098 4383 #if SHARP_SIMPLE_MERGE_H00624384 4099 bMPIFlag &= (nPSW + nPSH > 12); 4385 #endif4386 4100 if( bMPIFlag) 4387 4101 { … … 4390 4104 tmpDir = 0; 4391 4105 4392 #if ETRIKHU_CLEANUP_H00834393 4106 Bool bSPIVMPFlag = false; 4394 #endif4395 4107 4396 4108 TComPic * pcTexPic = m_pcSlice->getTexturePic(); … … 4449 4161 if( pcDefaultCU->getPredictionMode( iTexCenterAbsPartIdx ) != MODE_INTRA ) 4450 4162 { 4451 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 4163 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 4164 { 4165 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 4166 4167 TComMvField cDefaultMvField; 4168 pcDefaultCU->getMvField( pcDefaultCU, iTexCenterAbsPartIdx, eCurrRefPicList, cDefaultMvField ); 4169 Int iDefaultRefIdx = cDefaultMvField.getRefIdx(); 4170 if (iDefaultRefIdx >= 0) 4452 4171 { 4453 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 4454 4455 TComMvField cDefaultMvField; 4456 pcDefaultCU->getMvField( pcDefaultCU, iTexCenterAbsPartIdx, eCurrRefPicList, cDefaultMvField ); 4457 Int iDefaultRefIdx = cDefaultMvField.getRefIdx(); 4458 if (iDefaultRefIdx >= 0) 4172 Int iDefaultRefPOC = pcDefaultCU->getSlice()->getRefPOC(eCurrRefPicList, iDefaultRefIdx); 4173 for (Int iRefPicList = 0; iRefPicList < m_pcSlice->getNumRefIdx( eCurrRefPicList ); iRefPicList++) 4174 { 4175 if (iDefaultRefPOC == m_pcSlice->getRefPOC(eCurrRefPicList, iRefPicList)) 4459 4176 { 4460 Int iDefaultRefPOC = pcDefaultCU->getSlice()->getRefPOC(eCurrRefPicList, iDefaultRefIdx); 4461 for (Int iRefPicList = 0; iRefPicList < m_pcSlice->getNumRefIdx( eCurrRefPicList ); iRefPicList++) 4462 { 4463 if (iDefaultRefPOC == m_pcSlice->getRefPOC(eCurrRefPicList, iRefPicList)) 4464 { 4465 #if ETRIKHU_CLEANUP_H0083 4466 bSPIVMPFlag = true; 4467 #else 4468 pbSPIVMPFlag[iCount] = true; 4469 #endif 4470 TComMv cMv = cDefaultMvField.getMv() + cMvRounding; 4471 cMv >>= 2; 4472 clipMv( cMv ); 4473 cMvFieldSaved[eCurrRefPicList].setMvField(cMv, iRefPicList) ; 4474 break; 4475 } 4476 } 4177 bSPIVMPFlag = true; 4178 TComMv cMv = cDefaultMvField.getMv() + cMvRounding; 4179 cMv >>= 2; 4180 clipMv( cMv ); 4181 cMvFieldSaved[eCurrRefPicList].setMvField(cMv, iRefPicList) ; 4182 break; 4477 4183 } 4184 } 4478 4185 } 4479 }4480 #if ETRIKHU_CLEANUP_H0083 4186 } 4187 } 4481 4188 if ( bSPIVMPFlag == true ) 4482 #else4483 if ( pbSPIVMPFlag[iCount] == true )4484 #endif4485 4189 { 4486 4190 iInterDirSaved = (cMvFieldSaved[0].getRefIdx()!=-1 ? 1: 0) + (cMvFieldSaved[1].getRefIdx()!=-1 ? 2: 0); … … 4492 4196 if ( iInterDirSaved != 0 ) 4493 4197 { 4494 for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iPUHeight) 4495 { 4496 for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iPUWidth) 4198 for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iPUHeight) 4497 4199 { 4498 iTexPosX = j + iOffsetX; 4499 iTexPosY = i + iOffsetY; 4500 pcTexRec->getCUAddrAndPartIdx( iTexPosX, iTexPosY, iTexCUAddr, iTexAbsPartIdx ); 4501 pcTexCU = pcTexPic->getCU( iTexCUAddr ); 4502 4503 if( pcTexCU && !pcTexCU->isIntra(iTexAbsPartIdx) ) 4200 for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iPUWidth) 4504 4201 { 4505 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 4202 iTexPosX = j + iOffsetX; 4203 iTexPosY = i + iOffsetY; 4204 pcTexRec->getCUAddrAndPartIdx( iTexPosX, iTexPosY, iTexCUAddr, iTexAbsPartIdx ); 4205 pcTexCU = pcTexPic->getCU( iTexCUAddr ); 4206 4207 if( pcTexCU && !pcTexCU->isIntra(iTexAbsPartIdx) ) 4506 4208 { 4507 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 4508 TComMvField cTexMvField; 4509 pcTexCU->getMvField( pcTexCU, iTexAbsPartIdx, eCurrRefPicList, cTexMvField ); 4510 Int iValidDepRef = getPic()->isTextRefValid( eCurrRefPicList, cTexMvField.getRefIdx() ); 4511 if( (cTexMvField.getRefIdx()>=0) && ( iValidDepRef >= 0 ) ) 4209 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 4512 4210 { 4513 TComMv cMv = cTexMvField.getMv() + cMvRounding; 4514 cMv >>=2; 4211 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 4212 TComMvField cTexMvField; 4213 pcTexCU->getMvField( pcTexCU, iTexAbsPartIdx, eCurrRefPicList, cTexMvField ); 4214 Int iValidDepRef = getPic()->isTextRefValid( eCurrRefPicList, cTexMvField.getRefIdx() ); 4215 if( (cTexMvField.getRefIdx()>=0) && ( iValidDepRef >= 0 ) ) 4216 { 4217 TComMv cMv = cTexMvField.getMv() + cMvRounding; 4218 cMv >>=2; 4515 4219 #if !(NTT_BUG_FIX_TK54) 4516 this->clipMv( cMv ); 4517 #endif 4518 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iValidDepRef); 4220 this->clipMv( cMv ); 4221 #endif 4222 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iValidDepRef); 4223 } 4519 4224 } 4520 4225 } 4226 puhInterDirSP[iPartition] = (pcMvFieldSP[2*iPartition].getRefIdx()!=-1 ? 1: 0) + (pcMvFieldSP[2*iPartition+1].getRefIdx()!=-1 ? 2: 0); 4227 if (puhInterDirSP[iPartition] == 0) 4228 { 4229 if (iInterDirSaved != 0) 4230 { 4231 puhInterDirSP[iPartition] = iInterDirSaved; 4232 pcMvFieldSP[2*iPartition] = cMvFieldSaved[0]; 4233 pcMvFieldSP[2*iPartition + 1] = cMvFieldSaved[1]; 4234 } 4235 } 4236 if (iPUHeight + iPUWidth == 12) 4237 { 4238 if (puhInterDirSP[iPartition] == 3) 4239 { 4240 puhInterDirSP[iPartition] = 1; 4241 pcMvFieldSP[2*iPartition + 1].setMvField(TComMv(0,0), -1); 4242 } 4243 } 4244 4245 iPartition ++; 4521 4246 } 4522 puhInterDirSP[iPartition] = (pcMvFieldSP[2*iPartition].getRefIdx()!=-1 ? 1: 0) + (pcMvFieldSP[2*iPartition+1].getRefIdx()!=-1 ? 2: 0);4523 if (puhInterDirSP[iPartition] == 0)4524 {4525 if (iInterDirSaved != 0)4526 {4527 puhInterDirSP[iPartition] = iInterDirSaved;4528 pcMvFieldSP[2*iPartition] = cMvFieldSaved[0];4529 pcMvFieldSP[2*iPartition + 1] = cMvFieldSaved[1];4530 }4531 }4532 #if MTK_DIS_SPBIP8X4_H02054533 if (iPUHeight + iPUWidth == 12)4534 {4535 if (puhInterDirSP[iPartition] == 3)4536 {4537 puhInterDirSP[iPartition] = 1;4538 pcMvFieldSP[2*iPartition + 1].setMvField(TComMv(0,0), -1);4539 }4540 }4541 #endif4542 4543 iPartition ++;4544 4247 } 4545 }4546 4248 #if H_3D 4547 4249 } … … 4553 4255 { 4554 4256 Int iCnloop = 0; 4555 #if ETRIKHU_CLEANUP_H00834556 4257 for(iCnloop = 0; iCnloop < 2; iCnloop ++) 4557 4258 { … … 4568 4269 m_mergCands[MRG_T].setCand( tmpMV, tmpDir, false, bSPIVMPFlag); 4569 4270 4570 #else4571 Bool bRemoveSpa = false; //pruning4572 4573 for(Int i = 0; i < 2; i ++)4574 {4575 iCnloop = iPosLeftAbove[i];4576 if ( iCnloop == -1 )4577 {4578 continue;4579 }4580 if(tmpDir == puhInterDirNeighbours[iCnloop] && tmpMV[0]==pcMvFieldNeighbours[(iCnloop<<1)] && tmpMV[1]==pcMvFieldNeighbours[(iCnloop<<1)+1])4581 {4582 bRemoveSpa = true;4583 break;4584 }4585 }4586 4587 if (!bRemoveSpa)4588 {4589 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV);4590 }4591 else4592 {4593 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (iCnloop-iCount), iCount3DV);4594 if (iCnloop<numA1B1B0)4595 {4596 numA1B1B0--;4597 }4598 iCountHEVC--;4599 4600 if (iPosLeftAbove[0] != -1)4601 {4602 if (iCnloop == iPosLeftAbove[0])4603 {4604 iPosLeftAbove[0] = -1;4605 }4606 else4607 {4608 iPosLeftAbove[0]++;4609 }4610 }4611 if (iPosLeftAbove[1] != -1)4612 {4613 if (iCnloop == iPosLeftAbove[1])4614 {4615 iPosLeftAbove[1] = -1;4616 }4617 else4618 {4619 if (iCnloop > iPosLeftAbove[1])4620 {4621 iPosLeftAbove[1]++;4622 }4623 }4624 }4625 }4626 pcMvFieldNeighbours[iCount<<1].setMvField(tmpMV[0].getMv(), tmpMV[0].getRefIdx());4627 pcMvFieldNeighbours[(iCount<<1)+1].setMvField(tmpMV[1].getMv(), tmpMV[1].getRefIdx());4628 4629 puhInterDirNeighbours[iCount] = tmpDir;4630 #endif4631 4271 if ( mrgCandIdx == iCount ) 4632 4272 { … … 4707 4347 if( tmpDir != 0 ) 4708 4348 { 4709 #if !ETRIKHU_CLEANUP_H00834710 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV);4711 #endif4712 4349 m_ucDDTmpDepth = m_pcSlice->getDepthFromDV( iDV, iViewIdx ); 4713 4350 m_iUseDDDCandIdx = iCount; 4714 4351 4715 #if ETRIKHU_CLEANUP_H00834716 4352 m_mergCands[MRG_D].setCand( tmpMV, tmpDir, false, false); 4717 4353 if ( mrgCandIdx == iCount ) … … 4720 4356 } 4721 4357 iCount ++; 4722 #else4723 if( tmpDir == 1 )4724 {4725 pcMvFieldNeighbours[ iCount << 1 ] = tmpMV[ 0 ];4726 }4727 else if( tmpDir == 2 )4728 {4729 pcMvFieldNeighbours[( iCount << 1 ) + 1 ] = tmpMV[ 1 ];4730 }4731 4732 abCandIsInter [ iCount ] = true;4733 puhInterDirNeighbours[ iCount ] = tmpDir;4734 4735 if ( mrgCandIdx == iCount )4736 {4737 return;4738 }4739 iCount ++;4740 4741 Int iLeftAboveAvail = 0;4742 if( iPosLeftAbove[ 0 ] != -1 )4743 {4744 iPosLeftAbove[ 0 ] = iCount;4745 iLeftAboveAvail = 1;4746 }4747 if( iPosLeftAbove[ 1 ] != -1 )4748 {4749 iPosLeftAbove[ 1 ] = iCount + iLeftAboveAvail;4750 }4751 #endif4752 4358 } 4753 4359 } … … 4757 4363 //////// DERIVE IvMC, IvMCShift,IvDCShift, IvDC Candidates ///// 4758 4364 ///////////////////////////////////////////////////////////////// 4759 4760 #if !ETRIKHU_CLEANUP_H00834761 Int posIvDC = -1;4762 #endif4763 4365 4764 4366 // { IvMCL0, IvMCL1, IvDCL0, IvDCL1, IvMCL0Shift, IvMCL1Shift, IvDCL0Shift, IvDCL1Shift }; … … 4772 4374 Bool ivMvPredFlag = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() ); 4773 4375 4774 #if SHARP_SIMPLE_MERGE_H00624775 4376 ivMvPredFlag &= (nPSW + nPSH > 12); 4776 #endif4777 4377 if ( ivMvPredFlag && cDisInfo.m_aVIdxCan!=-1) 4778 4378 { … … 4807 4407 4808 4408 Bool bRemoveSpa = false; //pruning 4809 #if !ETRIKHU_CLEANUP_H00834810 Bool bIvMC = false;4811 Int iCnloop=0;4812 #endif4813 4409 4814 4410 if (!bIsDepth) … … 4816 4412 for(Int i = 0; i < 2; i ++) 4817 4413 { 4818 #if ETRIKHU_CLEANUP_H00834819 4414 if ( !m_mergCands[MRG_A1 + i].m_bAvailable ) // prunning to A1, B1 4820 4415 { … … 4826 4421 break; 4827 4422 } 4828 #else4829 iCnloop = iPosLeftAbove[i];4830 if ( iCnloop == -1 )4831 {4832 continue;4833 }4834 if(ivCandDir[0] == puhInterDirNeighbours[iCnloop] && tmpMV[0]==pcMvFieldNeighbours[(iCnloop<<1)] && tmpMV[1]==pcMvFieldNeighbours[(iCnloop<<1)+1])4835 {4836 bRemoveSpa = true;4837 break;4838 }4839 #endif4840 4423 } 4841 4424 } 4842 4425 if (bIsDepth) 4843 4426 { 4844 #if ETRIKHU_CLEANUP_H00834845 4427 if (m_mergCands[MRG_T].m_bAvailable && ivCandDir[0] == m_mergCands[MRG_T].m_uDir && tmpMV[0]==m_mergCands[MRG_T].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_T].m_cMvField[1]) 4846 4428 { 4847 4429 bRemoveSpa = true; 4848 4430 } 4849 #else 4850 iCnloop = iCount-1; 4851 for(; iCnloop >= 0; iCnloop --) 4852 { 4853 #if H_3D_DDD 4854 if( iCnloop == m_iUseDDDCandIdx ) 4855 { 4856 continue; 4857 } 4858 #endif 4859 if(ivCandDir[0] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==tmpMV[0] && pcMvFieldNeighbours[(iCnloop<<1)+1]==tmpMV[1]) // F0125 compatible with F0093 4860 { 4861 bRemoveSpa = true; 4862 break; 4863 } 4864 } 4865 #endif 4866 } 4867 4431 } 4868 4432 if (!bRemoveSpa) 4869 4433 { 4870 #if !ETRIKHU_CLEANUP_H00834871 bIvMC = true;4872 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV);4873 4874 if (iPosLeftAbove[0] != -1)4875 {4876 iPosLeftAbove[0]++;4877 }4878 if (iPosLeftAbove[1] != -1)4879 {4880 iPosLeftAbove[1]++;4881 }4882 }4883 else if (bRemoveSpa && !bIsDepth)4884 {4885 bIvMC = true;4886 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (iCnloop-iCount), iCount3DV);4887 4888 if (iCnloop<numA1B1B0)4889 {4890 numA1B1B0--;4891 }4892 iCountHEVC--;4893 4894 if (iPosLeftAbove[0] != -1)4895 {4896 if (iCnloop == iPosLeftAbove[0])4897 {4898 iPosLeftAbove[0] = -1;4899 }4900 else4901 {4902 iPosLeftAbove[0]++;4903 }4904 }4905 if (iPosLeftAbove[1] != -1)4906 {4907 if (iCnloop == iPosLeftAbove[1])4908 {4909 iPosLeftAbove[1] = -1;4910 }4911 else4912 {4913 if (iCnloop > iPosLeftAbove[1])4914 {4915 iPosLeftAbove[1]++;4916 }4917 }4918 }4919 }4920 4921 if (bIvMC)4922 {4923 #endif4924 #if ETRIKHU_CLEANUP_H00834925 4434 Bool SPIVMPFlag = false; 4926 #if MTK_DIS_SPBIP8X4_H02054927 4435 if(!m_pcSlice->getIsDepth()) 4928 #else4929 if(!m_pcSlice->getIsDepth() && getPartitionSize(0) == SIZE_2Nx2N )4930 #endif4931 4436 { 4932 4437 SPIVMPFlag = true; … … 4935 4440 SPIVMPFlag &= !bDBBPFlag; 4936 4441 #endif 4937 #else 4938 if(!m_pcSlice->getIsDepth() && getPartitionSize(0) == SIZE_2Nx2N ) 4939 { 4940 pbSPIVMPFlag[iCount] = true; 4941 } 4942 #if H_3D_DBBP 4943 pbSPIVMPFlag[iCount] &= !bDBBPFlag; 4944 #endif 4945 #endif 4946 #if ETRIKHU_CLEANUP_H0083 4442 4947 4443 m_mergCands[MRG_IVMC].setCand( tmpMV, ivCandDir[0], false, SPIVMPFlag); 4948 #else4949 if( ( ivCandDir[0] & 1 ) == 1 )4950 {4951 pcMvFieldNeighbours[iCount<<1].setMvField( ivCandMv[ 0 ], ivCandRefIdx[ 0 ] );4952 }4953 if( ( ivCandDir[0] & 2 ) == 2 )4954 {4955 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( ivCandMv[ 1 ], ivCandRefIdx[ 1 ] );4956 }4957 4958 puhInterDirNeighbours[ iCount ] = ivCandDir[0];4959 #endif4960 4444 4961 4445 if ( mrgCandIdx == iCount ) … … 4975 4459 4976 4460 #if H_3D 4977 #if ETRIKHU_CLEANUP_H00834978 4461 iCount += m_mergCands[MRG_A1].m_bAvailable + m_mergCands[MRG_B1].m_bAvailable + m_mergCands[MRG_B0].m_bAvailable; 4979 #else4980 iCount += numA1B1B0;4981 #endif4982 4462 #else 4983 4463 //left … … 5108 4588 for(Int i = 0; i < 2; i ++) 5109 4589 { 5110 #if ETRIKHU_CLEANUP_H00835111 4590 if ( !m_mergCands[MRG_A1+i].m_bAvailable ) 5112 #else5113 Int iCnloop = iPosLeftAbove[i];5114 if ( iCnloop == -1 )5115 #endif5116 4591 { 5117 4592 continue; 5118 4593 } 5119 #if ETRIKHU_CLEANUP_H00835120 #if ETRIKHU_BUGFIX_H00835121 4594 if (ivCandDir[1] == m_mergCands[MRG_A1+i].m_uDir && tmpMV[0]==m_mergCands[MRG_A1+i].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_A1+i].m_cMvField[1]) 5122 #else5123 Int offset = 0;5124 offset += A1_was_available;5125 offset += B1_was_available;5126 offset += m_mergCands[MRG_B0].m_bAvailable;5127 if (puhInterDirNeighbours[offset] == m_mergCands[MRG_A1+i].m_uDir && pcMvFieldNeighbours[(offset<<1)]==m_mergCands[MRG_A1+i].m_cMvField[0] && pcMvFieldNeighbours[(offset<<1)+1]==m_mergCands[MRG_A1+i].m_cMvField[1])5128 #endif5129 #else5130 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])5131 #endif5132 4595 { 5133 4596 bRemoveSpa = true; … … 5137 4600 if(!bRemoveSpa) 5138 4601 { 5139 #if ETRIKHU_CLEANUP_H00835140 4602 #if H_3D_NBDV 5141 4603 tmpMV[0].getMv().setIDVFlag (false); … … 5143 4605 #endif 5144 4606 m_mergCands[MRG_IVDC].setCand( tmpMV, ivCandDir[1], false, false); 5145 #else 5146 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 5147 puhInterDirNeighbours[ iCount ] = ivCandDir[1]; 5148 if( ( ivCandDir[1] & 1 ) == 1 ) 5149 { 5150 pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ 2 ], ivCandRefIdx[ 2 ] ); 5151 } 5152 if( ( ivCandDir[1] & 2 ) == 2 ) 5153 { 5154 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] ); 5155 } 5156 #if H_3D_NBDV 5157 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); 5158 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false); 5159 #endif 5160 posIvDC = iCount; 5161 #endif 4607 5162 4608 if ( mrgCandIdx == iCount ) 5163 4609 return; … … 5187 4633 !bARPFlag && 5188 4634 #endif 5189 #if SHARP_SIMPLE_MERGE_H00624635 #if H_3D 5190 4636 (nPSW + nPSH > 12) && 5191 4637 #endif … … 5193 4639 !bDBBPFlag && 5194 4640 #endif 5195 #if ETRIKHU_CLEANUP_H00835196 4641 xAddVspCand( mrgCandIdx, &cDisInfo, iCount ) ) 5197 #else5198 xAddVspCand( mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, iCount3DV, inheritedVSPDisInfo ) )5199 #endif5200 4642 { 5201 4643 return; … … 5213 4655 5214 4656 #if H_3D 5215 #if ETRIKHU_CLEANUP_H00835216 4657 iCount += m_mergCands[MRG_A0].m_bAvailable + m_mergCands[MRG_B2].m_bAvailable; 5217 #else5218 iCount += numA0B2;5219 #endif5220 4658 #else 5221 4659 //left bottom … … 5291 4729 if( ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() ) 5292 4730 { 5293 #if ETRIKHU_CLEANUP_H00835294 4731 if(xAddIvMRGCand( mrgCandIdx, iCount, ivCandDir, ivCandMv, ivCandRefIdx ) ) 5295 #else5296 if(xAddIvMRGCand( mrgCandIdx, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag, iCount3DV, inheritedVSPDisInfo ) )5297 #endif5298 4732 { 5299 4733 return; … … 5306 4740 } 5307 4741 #endif 5308 5309 #if H_3D 5310 #if !ETRIKHU_CLEANUP_H0083 5311 if (iCountHEVC + iCount3DV > getSlice()->getMaxNumMergeCand()) 5312 { 5313 iCount = getSlice()->getMaxNumMergeCand(); 5314 } 5315 else 5316 { 5317 iCount = iCountHEVC + iCount3DV; 5318 } 5319 numValidMergeCand = iCount; 5320 #endif 5321 #else 4742 #if !H_3D 5322 4743 if ( getSlice()->getEnableTMVPFlag()) 5323 4744 { … … 5407 4828 } 5408 4829 } 5409 // early termination 4830 // early termination 5410 4831 if (iCount == getSlice()->getMaxNumMergeCand()) 5411 4832 { … … 7176 6597 7177 6598 TComMv cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; 7178 #if SEC_VER_DONBDV_H01037179 6599 if( depthRefineFlag ) 7180 6600 { 7181 6601 cDv.setVer(0); 7182 6602 } 7183 #endif7184 6603 7185 6604 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); … … 7321 6740 7322 6741 TComMv cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; 7323 #if SEC_VER_DONBDV_H01037324 6742 if( depthRefineFlag ) 7325 6743 { 7326 6744 cDv.setVer(0); 7327 6745 } 7328 #endif7329 6746 7330 6747 Bool abPdmAvailable[8] = {false, false, false, false, false, false, false, false}; … … 7347 6764 if(!m_pcSlice->getIsDepth()) 7348 6765 { 7349 #if MTK_DIS_SPBIP8X4_H02057350 6766 if (!getDBBPFlag(0)) 7351 #else7352 if( getPartitionSize(0) == SIZE_2Nx2N )7353 #endif7354 6767 { 7355 6768 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; … … 7508 6921 7509 6922 } 7510 #if MTK_DIS_SPBIP8X4_H02057511 6923 if (iSPHeight + iSPWidth == 12) 7512 6924 { … … 7517 6929 } 7518 6930 } 7519 #endif7520 6931 iPartition ++; 7521 6932 } … … 7539 6950 iCurrPosY += ( iHeight >> 1 ); 7540 6951 } 7541 #if MTK_DIS_SPBIP8X4_H02057542 6952 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7543 #else7544 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getPartitionSize(uiPartAddr) != SIZE_2Nx2N) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)7545 #endif7546 6953 #else 7547 6954 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) -
branches/HTM-11.1-dev0/source/Lib/TLibCommon/TComDataCU.h
r967 r968 231 231 #endif 232 232 233 #if ETRIKHU_CLEANUP_H0083233 #if H_3D_IV_MERGE 234 234 TComMotionCand m_mergCands[MRG_IVSHIFT+1]; 235 235 Int m_baseListidc; … … 242 242 Bool xAddMVPCandOrder ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); 243 243 #if H_3D_VSP 244 #if ETRIKHU_CLEANUP_H0083245 244 Bool xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount); 246 #else247 Bool xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount,248 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo);249 #endif250 245 #endif 251 246 #if H_3D_IV_MERGE 252 #if ETRIKHU_CLEANUP_H0083253 247 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int* ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx ); 254 #else255 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv,256 Int* ivCandRefIdx, Int posIvDC, Int* vspFlag, Int &iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo );257 #endif258 #if ETRIKHU_CLEANUP_H0083259 248 Bool xGetPosFirstAvailDmvCand( Int iCount, Int& iFirDispCand ); 260 #else261 Bool xGetPosFirstAvailDmvCand( Int iCount, TComMvField* pcMvFieldNeighbours, Int* ivCandDir, Int posIvDC, Int* vspFlag, Int& iFirDispCand );262 #endif263 249 #endif 264 250 … … 500 486 501 487 #if H_3D 502 #if !ETRIKHU_CLEANUP_H0083503 Void rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo* inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV);504 #endif505 488 Bool getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 506 489 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); … … 656 639 Bool getAvailableFlagA0() { return m_bAvailableFlagA0;} 657 640 Bool getAvailableFlagB2() { return m_bAvailableFlagB2;} 658 #if ETRIKHU_CLEANUP_H0083659 641 Void initAvailableFlags() { m_bAvailableFlagA1 = m_bAvailableFlagB1 = m_bAvailableFlagB0 = m_bAvailableFlagA0 = m_bAvailableFlagB2 = 0; } 660 642 Void buildMCL(TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours … … 667 649 , Int& numValidMergeCand 668 650 ); 669 #else670 Void initAvailableFlags() { m_bAvailableFlagA1 = m_bAvailableFlagB1 = m_bAvailableFlagB0 = m_bAvailableFlagA0 = m_bAvailableFlagB2 = 0; }671 #endif672 651 Void getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1); 673 652 Void xGetInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours … … 676 655 #endif 677 656 #if H_3D_VSP 678 #if !ETRIKHU_CLEANUP_H0083679 , Int* vspFlag680 #endif681 657 , InheritedVSPDisInfo* inheritedVSPDisInfo 682 658 #endif 683 659 #if H_3D_SPIVMP 684 #if ETRIKHU_CLEANUP_H0083685 660 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 686 #else687 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP688 #endif689 661 #endif 690 662 , Int& numValidMergeCand, Int mrgCandIdx = -1 -
branches/HTM-11.1-dev0/source/Lib/TLibCommon/TComMotionInfo.h
r950 r968 198 198 //! \} 199 199 200 #if ETRIKHU_CLEANUP_H0083200 #if H_3D_IV_MERGE 201 201 class TComMotionCand 202 202 { -
branches/HTM-11.1-dev0/source/Lib/TLibCommon/TypeDef.h
r967 r968 328 328 #define MTK_DMM_SIMP_CODE_H0092 1 // Remove CABAC context for DMM1 mode coding 329 329 330 331 330 #define QC_IV_PRED_CONSTRAINT_H0137 1 // Constraint on inter-view (motion) prediction tools 332 #define ETRIKHU_BUGFIX_H0083 1 // bug-fix for DV candidate pruning333 331 #define ETRIKHU_CLEANUP_H0083 1 // cleaned-up source code for constructing merging candidate list 334 #define ETRIKHU_CLEANUP_H0083_MISSING 1 // missing guard macros added by GT335 #define SHARP_SIMPLE_MERGE_H0062 1 // Restrict 3D-HEVC merge cand in small PUs336 #define MTK_DIS_SPBIP8X4_H0205 1 // Disable bi-prediction for 8x4 and 4x8 sub PU and remove the SPIVMP 2Nx2N restriction337 338 #if H_3D_NBDV339 #define SEC_VER_DONBDV_H0103 1 // Vertical DV Restriction for DoNBDV340 #endif341 332 #endif 342 333 … … 919 910 920 911 /// merging candidates 921 #if ETRIKHU_CLEANUP_H0083912 #if H_3D 922 913 enum DefaultMergCandOrder 923 914 { -
branches/HTM-11.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp
r967 r968 432 432 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 433 433 m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 434 #if !ETRIKHU_CLEANUP_H0083435 ,vspFlag436 #endif437 434 , inheritedVSPDisInfo 438 435 #if H_3D_SPIVMP 439 #if !ETRIKHU_CLEANUP_H0083_MISSING440 , bSPIVMPFlag441 #endif442 436 , pcMvFieldSP, puhInterDirSP 443 437 #endif 444 438 , numValidMergeCand, uiMergeIndex ); 445 439 446 #if ETRIKHU_CLEANUP_H0083447 440 m_ppcCU[uiDepth]->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 448 441 #if H_3D_SPIVMP … … 450 443 #endif 451 444 , numValidMergeCand ); 452 #endif453 445 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 454 446 #else -
branches/HTM-11.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
r967 r968 300 300 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 301 301 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 302 #if !ETRIKHU_CLEANUP_H0083303 ,vspFlag304 #endif305 302 , inheritedVSPDisInfo 306 303 #if H_3D_SPIVMP 307 #if !ETRIKHU_CLEANUP_H0083_MISSING308 , bSPIVMPFlag309 #endif310 304 , pcMvFieldSP, puhInterDirSP 311 305 #endif 312 306 , numValidMergeCand ); 313 314 #if ETRIKHU_CLEANUP_H0083315 307 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 316 308 #if H_3D_SPIVMP … … 318 310 #endif 319 311 , numValidMergeCand ); 320 #endif321 312 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 322 313 … … 352 343 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 353 344 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours 354 #if !ETRIKHU_CLEANUP_H0083355 , vspFlag356 #endif357 345 , inheritedVSPDisInfo 358 346 #if H_3D_SPIVMP 359 #if !ETRIKHU_CLEANUP_H0083_MISSING360 , bSPIVMPFlag361 #endif362 347 , pcMvFieldSP, puhInterDirSP 363 348 #endif 364 349 ,numValidMergeCand, uiMergeIndex ); 365 366 #if ETRIKHU_CLEANUP_H0083367 350 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 368 351 #if H_3D_SPIVMP … … 370 353 #endif 371 354 ,numValidMergeCand ); 372 #endif373 355 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 374 356 if(vspFlag[uiMergeIndex]) -
branches/HTM-11.1-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
r967 r968 2158 2158 { 2159 2159 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx, 0, uiDepth); 2160 #if MTK_DIS_SPBIP8X4_H02052161 2160 UInt uiCurrPartNumQ = (pcCU->getPic()->getNumPartInCU() >> (2 * uiDepth)) >> 2; 2162 2161 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx + 2*uiCurrPartNumQ, 1, uiDepth); 2163 #endif2164 2162 } 2165 2163 } -
branches/HTM-11.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp
r967 r968 1815 1815 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 1816 1816 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 1817 #if !ETRIKHU_CLEANUP_H00831818 , vspFlag1819 #endif1820 1817 , inheritedVSPDisInfo 1821 1818 #if H_3D_SPIVMP 1822 #if !ETRIKHU_CLEANUP_H0083_MISSING1823 , bSPIVMPFlag1824 #endif1825 1819 , pcMvFieldSP, puhInterDirSP 1826 1820 #endif … … 1828 1822 ); 1829 1823 1830 #if ETRIKHU_CLEANUP_H00831831 1824 rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours, vspFlag 1832 1825 #if H_3D_SPIVMP … … 1835 1828 , numValidMergeCand 1836 1829 ); 1837 #endif1838 1830 1839 1831 #else -
branches/HTM-11.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
r967 r968 3681 3681 pcCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 3682 3682 #if H_3D_VSP 3683 #if !ETRIKHU_CLEANUP_H00833684 , vspFlag3685 #endif3686 3683 , inheritedVSPDisInfo 3687 3684 #endif 3688 3685 #if H_3D_SPIVMP 3689 #if !ETRIKHU_CLEANUP_H0083_MISSING3690 , pbSPIVMPFlag3691 #endif3692 3686 , pcMvFieldSP, puhInterDirSP 3693 3687 #endif … … 3695 3689 ); 3696 3690 3697 #if ETRIKHU_CLEANUP_H00833698 3691 pcCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours 3699 3692 #if H_3D_VSP … … 3705 3698 , numValidMergeCand 3706 3699 ); 3707 #endif3708 3700 #else 3709 3701 pcCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand ); … … 3719 3711 pcCU->xGetInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours 3720 3712 #if H_3D_VSP 3721 #if !ETRIKHU_CLEANUP_H00833722 , vspFlag3723 #endif3724 3713 , inheritedVSPDisInfo 3725 3714 #endif 3726 3715 #if H_3D_SPIVMP 3727 #if !ETRIKHU_CLEANUP_H0083_MISSING3728 , pbSPIVMPFlag3729 #endif3730 3716 , pcMvFieldSP, puhInterDirSP 3731 3717 #endif … … 3733 3719 ); 3734 3720 3735 #if ETRIKHU_CLEANUP_H00833736 3721 pcCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours 3737 3722 #if H_3D_VSP … … 3743 3728 , numValidMergeCand 3744 3729 ); 3745 #endif3746 3730 #else 3747 3731 pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand
Note: See TracChangeset for help on using the changeset viewer.