Changeset 935 in 3DVCSoftware
- Timestamp:
- 22 Apr 2014, 15:17:54 (11 years ago)
- Location:
- branches/HTM-10.2-dev0/source/Lib
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-10.2-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r888 r935 3258 3258 * false: otherwise 3259 3259 */ 3260 #if ETRIKHU_CLEANUP_H0083 3261 inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount) 3262 #else 3260 3263 inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 3261 3264 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo ) 3265 #endif 3262 3266 { 3263 3267 if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() || pDInfo->m_aVIdxCan == -1) … … 3275 3279 } 3276 3280 3281 #if ETRIKHU_CLEANUP_H0083 3282 TComMvField mvVSP[2]; 3283 UChar dirVSP; 3284 #else 3277 3285 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 3286 #endif 3278 3287 3279 3288 Bool refViewAvailFlag = false; … … 3290 3299 refViewAvailFlag = true; 3291 3300 predFlag[iRefListIdX] = 1; 3301 #if ETRIKHU_CLEANUP_H0083 3302 mvVSP[0+iRefListIdX].setMvField( pDInfo->m_acNBDV, i ); 3303 #if H_3D_NBDV 3304 mvVSP[0+iRefListIdX].getMv().setIDVFlag (false); 3305 #endif 3306 #else 3292 3307 pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].setMvField( pDInfo->m_acNBDV, i ); 3293 3308 #if H_3D_NBDV 3294 3309 pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].getMv().setIDVFlag (false); 3295 3310 #endif 3296 } 3297 } 3298 } 3299 3311 #endif 3312 } 3313 } 3314 } 3315 3316 #if ETRIKHU_CLEANUP_H0083 3317 dirVSP = (predFlag[0] | (predFlag[1] << 1)); 3318 m_mergCands[MRG_VSP].setCand( mvVSP, dirVSP, true, false); 3319 #else 3300 3320 // Set values to be returned 3301 3321 abCandIsInter [iCount] = true; 3302 3322 puhInterDirNeighbours[iCount] = (predFlag[0] | (predFlag[1] << 1)); 3303 3323 vspFlag [iCount] = 1; 3324 #endif 3304 3325 3305 3326 if ( mrgCandIdx == iCount ) … … 3316 3337 3317 3338 #if H_3D_IV_MERGE 3339 #if ETRIKHU_CLEANUP_H0083 3340 inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int* ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx ) 3341 #else 3318 3342 inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv, 3319 3343 Int* ivCandRefIdx, Int iPosIvDC, Int* vspFlag, Int &iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo ) 3344 #endif 3320 3345 { 3321 3346 for(Int iLoop = 0; iLoop < 2; iLoop ++ ) … … 3325 3350 { 3326 3351 Int iFirDispCand = -1; 3352 #if ETRIKHU_CLEANUP_H0083 3353 TComMvField mvIvDcShift[2]; 3354 UChar dirIvDcShift; 3355 3356 if (xGetPosFirstAvailDmvCand(MRG_IVSHIFT, iFirDispCand)) 3357 #else 3327 3358 if (xGetPosFirstAvailDmvCand(iCount, pcMvFieldNeighbours, ivCandDir, iPosIvDC, vspFlag, iFirDispCand)) 3359 #endif 3328 3360 { 3329 3361 TComMv cMv; 3362 #if ETRIKHU_CLEANUP_H0083 3363 cMv = m_mergCands[iFirDispCand].m_cMvField[0].getMv(); 3364 #else 3330 3365 cMv = pcMvFieldNeighbours[(iFirDispCand<<1)].getMv(); 3366 #endif 3331 3367 cMv.setHor(cMv.getHor()+4); 3332 3368 if(m_pcSlice->getVPS()->getViewSynthesisPredFlag(m_pcSlice->getLayerIdInVps())) … … 3338 3374 #endif 3339 3375 3376 #if ETRIKHU_CLEANUP_H0083 3377 dirIvDcShift = m_mergCands[iFirDispCand].m_uDir; 3378 mvIvDcShift[0].setMvField(cMv, m_mergCands[iFirDispCand].m_cMvField[0].getRefIdx() ); 3379 mvIvDcShift[1].setMvField(m_mergCands[iFirDispCand].m_cMvField[1].getMv(), m_mergCands[iFirDispCand].m_cMvField[1].getRefIdx() ); 3380 m_mergCands[MRG_IVSHIFT].setCand(mvIvDcShift, dirIvDcShift, false, false); 3381 #else 3340 3382 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 3341 3383 … … 3344 3386 pcMvFieldNeighbours [ iCount << 1 ].setMvField(cMv, pcMvFieldNeighbours[( iFirDispCand << 1)].getRefIdx() ); 3345 3387 pcMvFieldNeighbours [(iCount << 1) + 1 ].setMvField(pcMvFieldNeighbours[(iFirDispCand << 1) + 1].getMv(), pcMvFieldNeighbours[( iFirDispCand << 1) + 1].getRefIdx() ); 3388 #endif 3346 3389 3347 3390 if( mrgCandIdx == iCount ) … … 3374 3417 if( !iLoop && ivCandDir[0] > 0) 3375 3418 { 3419 #if ETRIKHU_CLEANUP_H0083 3420 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]) 3421 #else 3376 3422 if(tmpDir == puhInterDirNeighbours[0] && pcMvFieldNeighbours[0]==tmpMV[0] && pcMvFieldNeighbours[1]==tmpMV[1]) 3423 #endif 3377 3424 { 3378 3425 bRemove = true; … … 3381 3428 if(!bRemove) 3382 3429 { 3430 #if ETRIKHU_CLEANUP_H0083 3431 #if H_3D_NBDV 3432 if(iLoop) // For IvMcShift candidate 3433 { 3434 tmpMV[0].getMv().setIDVFlag (false); 3435 tmpMV[1].getMv().setIDVFlag (false); 3436 } 3437 #endif 3438 m_mergCands[MRG_IVSHIFT].setCand(tmpMV, tmpDir, false, false); 3439 #else 3383 3440 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 3384 3441 … … 3400 3457 } 3401 3458 #endif 3459 #endif 3402 3460 if( mrgCandIdx == iCount ) 3403 3461 { … … 3412 3470 } 3413 3471 3472 #if ETRIKHU_CLEANUP_H0083 3473 inline Bool TComDataCU::xGetPosFirstAvailDmvCand(Int iCount, Int& posFirstAvailDmvCand ) 3474 { 3475 for ( Int currListPos = 0; currListPos < iCount; currListPos++ ) 3476 { 3477 if ( !m_mergCands[currListPos].m_bAvailable || ( currListPos == MRG_IVMC ) || ( currListPos == MRG_IVDC ) || ( m_mergCands[currListPos].m_iVspFlag != 0 )) 3478 { 3479 continue; 3480 } 3481 else if((m_mergCands[currListPos].m_bAvailable) && (m_mergCands[currListPos].m_cMvField[0].getRefIdx() != -1 ) && (getSlice()->getViewIndex() != getSlice()->getRefPic(RefPicList(0), m_mergCands[currListPos].m_cMvField[0].getRefIdx())->getViewIndex())) 3482 { 3483 posFirstAvailDmvCand = currListPos; 3484 return true; 3485 } 3486 } 3487 return false; 3488 } 3489 #else 3414 3490 inline Bool TComDataCU::xGetPosFirstAvailDmvCand( Int iCount, TComMvField* pcMvFieldNeighbours, Int* ivCandDir, Int posIvDC, Int* vspFlag, Int& posFirstAvailDmvCand ) 3415 3491 { … … 3429 3505 return false; 3430 3506 } 3507 #endif 3431 3508 3432 3509 #endif 3433 3510 3434 3511 #if H_3D 3512 #if ETRIKHU_CLEANUP_H0083 3513 3514 Void TComDataCU::buildMCL(TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours 3515 #if H_3D_VSP 3516 , Int* vspFlag 3517 #endif 3518 #if H_3D_SPIVMP 3519 , Bool* pbSPIVMPFlag 3520 #endif 3521 , Int& numValidMergeCand 3522 ) 3523 { 3524 if (!( getSlice()->getIsDepth() || getSlice()->getViewIndex()>0)) // for only dependent texture 3525 { 3526 return; 3527 } 3528 3529 Int iCount = 0; 3530 TComMv cZeroMv; 3531 3532 // init temporal list 3533 TComMvField extMergeCandList[MRG_MAX_NUM_CANDS_MEM << 1]; 3534 UChar uhInterDirNeighboursExt[MRG_MAX_NUM_CANDS_MEM]; 3535 for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ++ui ) 3536 { 3537 uhInterDirNeighboursExt[ui] = puhInterDirNeighbours[ui]; 3538 extMergeCandList[ui<<1].setMvField(cZeroMv, NOT_VALID); 3539 extMergeCandList[(ui<<1)+1].setMvField(cZeroMv, NOT_VALID); 3540 vspFlag[ui] = 0; 3541 } 3542 3543 // add candidates to temporal list 3544 // insert MPI ... IvShift candidate 3545 for (Int i=0; i<=MRG_IVSHIFT; i++) 3546 { 3547 if (m_mergCands[i].m_bAvailable) 3548 { 3549 m_mergCands[i].getCand(iCount, extMergeCandList, uhInterDirNeighboursExt, vspFlag, pbSPIVMPFlag); 3550 iCount++; 3551 if (iCount >= getSlice()->getMaxNumMergeCand()) 3552 break; 3553 } 3554 } 3555 3556 // insert remaining base candidates 3557 while (iCount < getSlice()->getMaxNumMergeCand() && m_baseListidc < getSlice()->getMaxNumMergeCand()) 3558 { 3559 uhInterDirNeighboursExt[iCount] = puhInterDirNeighbours[m_baseListidc]; 3560 extMergeCandList[iCount<<1].setMvField(pcMvFieldNeighbours[m_baseListidc<<1].getMv(), pcMvFieldNeighbours[m_baseListidc<<1].getRefIdx()); 3561 if ( getSlice()->isInterB() ) 3562 { 3563 extMergeCandList[(iCount<<1)+1].setMvField(pcMvFieldNeighbours[(m_baseListidc<<1)+1].getMv(), pcMvFieldNeighbours[(m_baseListidc<<1)+1].getRefIdx()); 3564 } 3565 m_baseListidc++; 3566 iCount++; 3567 } 3568 3569 for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ui++ ) 3570 { 3571 puhInterDirNeighbours[ui] = 0; 3572 pcMvFieldNeighbours[ui<<1].setMvField(cZeroMv, NOT_VALID); 3573 pcMvFieldNeighbours[(ui<<1)+1].setMvField(cZeroMv, NOT_VALID); 3574 } 3575 // copy extMergeCandList to output 3576 for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ui++ ) 3577 { 3578 puhInterDirNeighbours[ui] = uhInterDirNeighboursExt[ui]; 3579 pcMvFieldNeighbours[ui<<1].setMvField(extMergeCandList[ui<<1].getMv(), extMergeCandList[ui<<1].getRefIdx()); 3580 if ( getSlice()->isInterB() ) 3581 pcMvFieldNeighbours[(ui<<1)+1].setMvField(extMergeCandList[(ui<<1)+1].getMv(), extMergeCandList[(ui<<1)+1].getRefIdx()); 3582 } 3583 numValidMergeCand = iCount; 3584 assert(iCount == getSlice()->getMaxNumMergeCand()); 3585 } 3586 #else 3435 3587 Void TComDataCU::rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo* inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV) 3436 3588 { … … 3453 3605 return; 3454 3606 } 3607 #endif 3455 3608 3456 3609 /** Constructs a list of merging candidates … … 3826 3979 #endif 3827 3980 #if H_3D_VSP 3981 #if !ETRIKHU_CLEANUP_H0083 3828 3982 , Int* vspFlag 3983 #endif 3829 3984 , InheritedVSPDisInfo* inheritedVSPDisInfo 3830 3985 #endif 3831 3986 #if H_3D_SPIVMP 3987 #if ETRIKHU_CLEANUP_H0083 3988 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 3989 #else 3832 3990 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP 3991 #endif 3833 3992 #endif 3834 3993 , Int& numValidMergeCand, Int mrgCandIdx … … 3841 4000 //////////////////////////// 3842 4001 TComMv cZeroMv; 4002 #if !ETRIKHU_CLEANUP_H0083 3843 4003 Bool abCandIsInter[ MRG_MAX_NUM_CANDS_MEM ]; 4004 #endif 3844 4005 #else 3845 4006 Bool abCandIsInter[ MRG_MAX_NUM_CANDS ]; … … 3907 4068 #if H_3D_DBBP 3908 4069 Bool bDBBPFlag = getDBBPFlag(uiAbsPartIdx); 4070 #if MTK_DIS_SPBIP8X4_H0205 4071 assert(bDBBPFlag == getDBBPFlag(0)); 4072 #endif 3909 4073 #endif 3910 4074 3911 4075 #if H_3D 4076 #if !ETRIKHU_CLEANUP_H0083 3912 4077 Int iPosLeftAbove[2] = {-1, -1}; 3913 4078 … … 3916 4081 Int numA1B1B0 = 0; 3917 4082 Int numA0B2 = 0; 3918 4083 #endif 3919 4084 #if H_3D_NBDV 3920 4085 for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++) … … 3925 4090 #endif 3926 4091 4092 4093 #if ETRIKHU_CLEANUP_H0083 4094 4095 4096 // Clean version for MCL construction align with WD 4097 // init mergCands list 4098 for (Int i = 0; i<MRG_IVSHIFT+1; i++) 4099 { 4100 m_mergCands[i].init(); 4101 } 4102 4103 m_baseListidc = 0; 4104 4105 //left 4106 UInt uiLeftPartIdx = 0; 4107 TComDataCU* pcCULeft = 0; 4108 pcCULeft = getPULeft( uiLeftPartIdx, uiPartIdxLB ); 4109 4110 if (getAvailableFlagA1()) 4111 { 4112 m_mergCands[MRG_A1].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 4113 #if H_3D_VSP 4114 , 4115 (pcCULeft->getVSPFlag(uiLeftPartIdx) != 0 4116 #if H_3D_IC 4117 && !bICFlag 4118 #endif 4119 #if H_3D_ARP 4120 && !bARPFlag 4121 #endif 4122 ) 4123 #endif 4124 , false 4125 ); 4126 m_baseListidc++; 4127 } 4128 4129 // above 4130 UInt uiAbovePartIdx = 0; 4131 TComDataCU* pcCUAbove = 0; 4132 pcCUAbove = getPUAbove( uiAbovePartIdx, uiPartIdxRT ); 4133 4134 if (getAvailableFlagB1()) 4135 { 4136 m_mergCands[MRG_B1].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 4137 #if H_3D_VSP 4138 , 4139 ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) != 0) 4140 #if H_3D_IC 4141 && !bICFlag 4142 #endif 4143 #if H_3D_ARP 4144 && !bARPFlag 4145 #endif 4146 ) 4147 #endif 4148 , false 4149 ); 4150 m_baseListidc++; 4151 } 4152 4153 // above right 4154 UInt uiAboveRightPartIdx = 0; 4155 TComDataCU* pcCUAboveRight = 0; 4156 pcCUAboveRight = getPUAboveRight( uiAboveRightPartIdx, uiPartIdxRT ); 4157 4158 if (getAvailableFlagB0()) 4159 { 4160 m_mergCands[MRG_B0].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 4161 #if H_3D_VSP 4162 , 4163 ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) != 0) 4164 #if H_3D_IC 4165 && !bICFlag 4166 #endif 4167 #if H_3D_ARP 4168 && !bARPFlag 4169 #endif 4170 ) 4171 #endif 4172 , false 4173 ); 4174 m_baseListidc++; 4175 } 4176 4177 // left bottom 4178 UInt uiLeftBottomPartIdx = 0; 4179 TComDataCU* pcCULeftBottom = getPUBelowLeft( uiLeftBottomPartIdx, uiPartIdxLB ); 4180 4181 if (getAvailableFlagA0()) 4182 { 4183 m_mergCands[MRG_A0].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 4184 #if H_3D_VSP 4185 , 4186 (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) != 0 4187 #if H_3D_IC 4188 && !bICFlag 4189 #endif 4190 #if H_3D_ARP 4191 && !bARPFlag 4192 #endif 4193 ) 4194 #endif 4195 , false 4196 ); 4197 m_baseListidc++; 4198 } 4199 4200 // above left 4201 UInt uiAboveLeftPartIdx = 0; 4202 TComDataCU* pcCUAboveLeft = 0; 4203 pcCUAboveLeft = getPUAboveLeft( uiAboveLeftPartIdx, uiAbsPartAddr ); 4204 4205 if (getAvailableFlagB2()) 4206 { 4207 m_mergCands[MRG_B2].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 4208 #if H_3D_VSP 4209 , 4210 ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) != 0) 4211 #if H_3D_IC 4212 && !bICFlag 4213 #endif 4214 #if H_3D_ARP 4215 && !bARPFlag 4216 #endif 4217 ) 4218 #endif 4219 , false 4220 ); 4221 m_baseListidc++; 4222 } 4223 4224 4225 #if !ETRIKHU_BUGFIX_H0083 4226 Bool A1_was_available = m_mergCands[MRG_A1].m_bAvailable; 4227 Bool B1_was_available = m_mergCands[MRG_B1].m_bAvailable; 4228 #endif 4229 4230 4231 #else 3927 4232 //left 3928 4233 UInt uiLeftPartIdx = 0; … … 4041 4346 iCountHEVC = numValidMergeCand; 4042 4347 #endif 4348 #endif 4043 4349 4044 4350 … … 4049 4355 ///////////////////////////////////////////// 4050 4356 4357 #if SHARP_SIMPLE_MERGE_H0062 4358 bMPIFlag &= (nPSW + nPSH > 12); 4359 #endif 4051 4360 if( bMPIFlag) 4052 4361 { … … 4054 4363 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); 4055 4364 tmpDir = 0; 4365 4366 #if ETRIKHU_CLEANUP_H0083 4367 Bool bSPIVMPFlag = false; 4368 #endif 4056 4369 4057 4370 TComPic * pcTexPic = m_pcSlice->getTexturePic(); … … 4092 4405 Int iTexPosX, iTexPosY; 4093 4406 const TComMv cMvRounding( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 4407 #if MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133 4408 4409 Int iCenterPosX = iCurrPosX + ( ( iWidth / iPUWidth ) >> 1 ) * iPUWidth + ( iPUWidth >> 1 ); 4410 Int iCenterPosY = iCurrPosY + ( ( iHeight / iPUHeight ) >> 1 ) * iPUHeight + (iPUHeight >> 1); 4411 Int iTexCenterCUAddr, iTexCenterAbsPartIdx; 4412 4413 if(iWidth == iPUWidth && iHeight == iPUHeight) 4414 { 4415 iCenterPosX = iCurrPosX + (iWidth >> 1); 4416 iCenterPosY = iCurrPosY + (iHeight >> 1); 4417 } 4418 4419 // derivation of center motion parameters from the collocated texture CU 4420 4421 pcTexRec->getCUAddrAndPartIdx( iCenterPosX , iCenterPosY , iTexCenterCUAddr, iTexCenterAbsPartIdx ); 4422 TComDataCU* pcDefaultCU = pcTexPic->getCU( iTexCenterCUAddr ); 4423 4424 if( pcDefaultCU->getPredictionMode( iTexCenterAbsPartIdx ) != MODE_INTRA ) 4425 { 4426 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 4427 { 4428 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 4429 4430 TComMvField cDefaultMvField; 4431 pcDefaultCU->getMvField( pcDefaultCU, iTexCenterAbsPartIdx, eCurrRefPicList, cDefaultMvField ); 4432 Int iDefaultRefIdx = cDefaultMvField.getRefIdx(); 4433 if (iDefaultRefIdx >= 0) 4434 { 4435 Int iDefaultRefPOC = pcDefaultCU->getSlice()->getRefPOC(eCurrRefPicList, iDefaultRefIdx); 4436 for (Int iRefPicList = 0; iRefPicList < m_pcSlice->getNumRefIdx( eCurrRefPicList ); iRefPicList++) 4437 { 4438 if (iDefaultRefPOC == m_pcSlice->getRefPOC(eCurrRefPicList, iRefPicList)) 4439 { 4440 #if ETRIKHU_CLEANUP_H0083 4441 bSPIVMPFlag = true; 4442 #else 4443 pbSPIVMPFlag[iCount] = true; 4444 #endif 4445 TComMv cMv = cDefaultMvField.getMv() + cMvRounding; 4446 cMv >>= 2; 4447 clipMv( cMv ); 4448 cMvFieldSaved[eCurrRefPicList].setMvField(cMv, iRefPicList) ; 4449 break; 4450 } 4451 } 4452 } 4453 } 4454 } 4455 #if ETRIKHU_CLEANUP_H0083 4456 if ( bSPIVMPFlag == true ) 4457 #else 4458 if ( pbSPIVMPFlag[iCount] == true ) 4459 #endif 4460 { 4461 iInterDirSaved = (cMvFieldSaved[0].getRefIdx()!=-1 ? 1: 0) + (cMvFieldSaved[1].getRefIdx()!=-1 ? 2: 0); 4462 tmpDir = iInterDirSaved; 4463 tmpMV[0] = cMvFieldSaved[0]; 4464 tmpMV[1] = cMvFieldSaved[1]; 4465 } 4466 4467 if ( iInterDirSaved != 0 ) 4468 { 4469 #endif 4094 4470 for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iPUHeight) 4095 4471 { … … 4130 4506 } 4131 4507 } 4508 #if MTK_DIS_SPBIP8X4_H0205 4509 if (iPUHeight + iPUWidth == 12) 4510 { 4511 if (puhInterDirSP[iPartition] == 3) 4512 { 4513 puhInterDirSP[iPartition] = 1; 4514 pcMvFieldSP[2*iPartition + 1].setMvField(TComMv(0,0), -1); 4515 } 4516 } 4517 #endif 4518 #if !MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133 4132 4519 else 4133 4520 { 4134 4521 if (iInterDirSaved ==0) 4135 4522 { 4523 #if ETRIKHU_CLEANUP_H0083 4524 bSPIVMPFlag = true; 4525 #else 4136 4526 pbSPIVMPFlag[iCount] = true; 4527 #endif 4137 4528 tmpDir = puhInterDirSP[iPartition]; 4138 4529 tmpMV[0] = pcMvFieldSP[2*iPartition]; … … 4153 4544 cMvFieldSaved[1] = pcMvFieldSP[2*iPartition + 1]; 4154 4545 } 4546 #endif 4155 4547 iPartition ++; 4156 4548 } 4157 4549 } 4550 #if MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133 4551 } 4552 #endif 4158 4553 #if H_3D_FCO 4159 4554 } … … 4162 4557 { 4163 4558 Int iCnloop = 0; 4559 #if ETRIKHU_CLEANUP_H0083 4560 for(iCnloop = 0; iCnloop < 2; iCnloop ++) 4561 { 4562 if ( !m_mergCands[MRG_A1+iCnloop].m_bAvailable ) // prunning to A1, B1 4563 { 4564 continue; 4565 } 4566 if (tmpDir == m_mergCands[MRG_A1+iCnloop].m_uDir && tmpMV[0]==m_mergCands[MRG_A1+iCnloop].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_A1+iCnloop].m_cMvField[1]) 4567 { 4568 m_mergCands[MRG_A1+iCnloop].m_bAvailable = false; 4569 break; 4570 } 4571 } 4572 m_mergCands[MRG_T].setCand( tmpMV, tmpDir, false, bSPIVMPFlag); 4573 4574 #else 4164 4575 Bool bRemoveSpa = false; //pruning 4165 4576 … … 4221 4632 4222 4633 puhInterDirNeighbours[iCount] = tmpDir; 4223 4634 #endif 4224 4635 if ( mrgCandIdx == iCount ) 4225 4636 { … … 4300 4711 if( tmpDir != 0 ) 4301 4712 { 4713 #if !ETRIKHU_CLEANUP_H0083 4302 4714 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV); 4715 #endif 4303 4716 m_ucDDTmpDepth = m_pcSlice->getDepthFromDV( iDV, iViewIdx ); 4304 4717 m_iUseDDDCandIdx = iCount; 4305 4718 4719 #if ETRIKHU_CLEANUP_H0083 4720 m_mergCands[MRG_D].setCand( tmpMV, tmpDir, false, false); 4721 if ( mrgCandIdx == iCount ) 4722 { 4723 return; 4724 } 4725 iCount ++; 4726 #else 4306 4727 if( tmpDir == 1 ) 4307 4728 { … … 4332 4753 iPosLeftAbove[ 1 ] = iCount + iLeftAboveAvail; 4333 4754 } 4755 #endif 4334 4756 } 4335 4757 } … … 4340 4762 ///////////////////////////////////////////////////////////////// 4341 4763 4764 #if !ETRIKHU_CLEANUP_H0083 4342 4765 Int posIvDC = -1; 4766 #endif 4343 4767 4344 4768 // { IvMCL0, IvMCL1, IvDCL0, IvDCL1, IvMCL0Shift, IvMCL1Shift, IvDCL0Shift, IvDCL1Shift }; … … 4352 4776 Bool ivMvPredFlag = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() ); 4353 4777 4778 #if SHARP_SIMPLE_MERGE_H0062 4779 ivMvPredFlag &= (nPSW + nPSH > 12); 4780 #endif 4354 4781 if ( ivMvPredFlag && cDisInfo.m_aVIdxCan!=-1) 4355 4782 { 4783 #if SEC_ADAPT_DISABLE_IVMP 4784 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP, bICFlag ); 4785 #else 4356 4786 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP ); 4787 #endif 4357 4788 } 4358 4789 … … 4380 4811 4381 4812 Bool bRemoveSpa = false; //pruning 4813 #if !ETRIKHU_CLEANUP_H0083 4382 4814 Bool bIvMC = false; 4383 4815 Int iCnloop=0; 4816 #endif 4384 4817 4385 4818 if (!bIsDepth) … … 4387 4820 for(Int i = 0; i < 2; i ++) 4388 4821 { 4822 #if ETRIKHU_CLEANUP_H0083 4823 if ( !m_mergCands[MRG_A1 + i].m_bAvailable ) // prunning to A1, B1 4824 { 4825 continue; 4826 } 4827 if (ivCandDir[0] == 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]) 4828 { 4829 m_mergCands[MRG_A1+i].m_bAvailable = false; 4830 break; 4831 } 4832 #else 4389 4833 iCnloop = iPosLeftAbove[i]; 4390 4834 if ( iCnloop == -1 ) … … 4397 4841 break; 4398 4842 } 4843 #endif 4399 4844 } 4400 4845 } 4401 4846 if (bIsDepth) 4402 4847 { 4848 #if ETRIKHU_CLEANUP_H0083 4849 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]) 4850 { 4851 bRemoveSpa = true; 4852 } 4853 #else 4403 4854 iCnloop = iCount-1; 4404 4855 for(; iCnloop >= 0; iCnloop --) … … 4416 4867 } 4417 4868 } 4869 #endif 4418 4870 } 4419 4871 4420 4872 if (!bRemoveSpa) 4421 4873 { 4874 #if !ETRIKHU_CLEANUP_H0083 4422 4875 bIvMC = true; 4423 4876 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); … … 4472 4925 if (bIvMC) 4473 4926 { 4927 #endif 4928 #if ETRIKHU_CLEANUP_H0083 4929 Bool SPIVMPFlag = false; 4930 #if MTK_DIS_SPBIP8X4_H0205 4931 if(!m_pcSlice->getIsDepth()) 4932 #else 4933 if(!m_pcSlice->getIsDepth() && getPartitionSize(0) == SIZE_2Nx2N ) 4934 #endif 4935 { 4936 SPIVMPFlag = true; 4937 } 4938 #if H_3D_DBBP 4939 SPIVMPFlag &= !bDBBPFlag; 4940 #endif 4941 #else 4474 4942 if(!m_pcSlice->getIsDepth() && getPartitionSize(0) == SIZE_2Nx2N ) 4475 4943 { … … 4479 4947 pbSPIVMPFlag[iCount] &= !bDBBPFlag; 4480 4948 #endif 4949 #endif 4950 #if ETRIKHU_CLEANUP_H0083 4951 m_mergCands[MRG_IVMC].setCand( tmpMV, ivCandDir[0], false, SPIVMPFlag); 4952 #else 4481 4953 if( ( ivCandDir[0] & 1 ) == 1 ) 4482 4954 { … … 4489 4961 4490 4962 puhInterDirNeighbours[ iCount ] = ivCandDir[0]; 4963 #endif 4491 4964 4492 4965 if ( mrgCandIdx == iCount ) … … 4506 4979 4507 4980 #if H_3D 4981 #if ETRIKHU_CLEANUP_H0083 4982 iCount += m_mergCands[MRG_A1].m_bAvailable + m_mergCands[MRG_B1].m_bAvailable + m_mergCands[MRG_B0].m_bAvailable; 4983 #else 4508 4984 iCount += numA1B1B0; 4985 #endif 4509 4986 #else 4510 4987 //left … … 4635 5112 for(Int i = 0; i < 2; i ++) 4636 5113 { 5114 #if ETRIKHU_CLEANUP_H0083 5115 if ( !m_mergCands[MRG_A1+i].m_bAvailable ) 5116 #else 4637 5117 Int iCnloop = iPosLeftAbove[i]; 4638 5118 if ( iCnloop == -1 ) 5119 #endif 4639 5120 { 4640 5121 continue; 4641 5122 } 5123 #if ETRIKHU_CLEANUP_H0083 5124 #if ETRIKHU_BUGFIX_H0083 5125 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]) 5126 #else 5127 Int offset = 0; 5128 offset += A1_was_available; 5129 offset += B1_was_available; 5130 offset += m_mergCands[MRG_B0].m_bAvailable; 5131 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]) 5132 #endif 5133 #else 4642 5134 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 5135 #endif 4643 5136 { 4644 5137 bRemoveSpa = true; … … 4648 5141 if(!bRemoveSpa) 4649 5142 { 5143 #if ETRIKHU_CLEANUP_H0083 5144 #if H_3D_NBDV 5145 tmpMV[0].getMv().setIDVFlag (false); 5146 tmpMV[1].getMv().setIDVFlag (false); 5147 #endif 5148 m_mergCands[MRG_IVDC].setCand( tmpMV, ivCandDir[1], false, false); 5149 #else 4650 5150 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 4651 5151 puhInterDirNeighbours[ iCount ] = ivCandDir[1]; … … 4663 5163 #endif 4664 5164 posIvDC = iCount; 5165 #endif 4665 5166 if ( mrgCandIdx == iCount ) 4666 5167 return; … … 4690 5191 !bARPFlag && 4691 5192 #endif 5193 #if SHARP_SIMPLE_MERGE_H0062 5194 (nPSW + nPSH > 12) && 5195 #endif 5196 #if ETRIKHU_CLEANUP_H0083 5197 xAddVspCand( mrgCandIdx, &cDisInfo, iCount ) ) 5198 #else 4692 5199 xAddVspCand( mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, iCount3DV, inheritedVSPDisInfo ) ) 5200 #endif 4693 5201 { 4694 5202 return; … … 4706 5214 4707 5215 #if H_3D 5216 #if ETRIKHU_CLEANUP_H0083 5217 iCount += m_mergCands[MRG_A0].m_bAvailable + m_mergCands[MRG_B2].m_bAvailable; 5218 #else 4708 5219 iCount += numA0B2; 5220 #endif 4709 5221 #else 4710 5222 //left bottom … … 4780 5292 if( ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() ) 4781 5293 { 5294 #if ETRIKHU_CLEANUP_H0083 5295 if(xAddIvMRGCand( mrgCandIdx, iCount, ivCandDir, ivCandMv, ivCandRefIdx ) ) 5296 #else 4782 5297 if(xAddIvMRGCand( mrgCandIdx, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag, iCount3DV, inheritedVSPDisInfo ) ) 5298 #endif 4783 5299 { 4784 5300 return; … … 4793 5309 4794 5310 #if H_3D 5311 #if !ETRIKHU_CLEANUP_H0083 4795 5312 if (iCountHEVC + iCount3DV > getSlice()->getMaxNumMergeCand()) 4796 5313 { … … 4802 5319 } 4803 5320 numValidMergeCand = iCount; 5321 #endif 4804 5322 #else 4805 5323 if ( getSlice()->getEnableTMVPFlag()) … … 6759 7277 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 6760 7278 #endif 7279 #if SEC_ADAPT_DISABLE_IVMP 7280 , Bool bICFlag 7281 #endif 6761 7282 ) 6762 7283 { … … 6794 7315 pacPdmMv[i].setIDVFlag (false); 6795 7316 } 7317 #endif 7318 7319 #if SEC_ADAPT_DISABLE_IVMP 7320 if(!bICFlag) 7321 { 6796 7322 #endif 6797 7323 … … 6802 7328 if(!m_pcSlice->getIsDepth()) 6803 7329 { 7330 #if MTK_DIS_SPBIP8X4_H0205 7331 if (!getDBBPFlag(0)) 7332 #else 6804 7333 if( getPartitionSize(0) == SIZE_2Nx2N ) 7334 #endif 6805 7335 { 6806 7336 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; … … 6959 7489 6960 7490 } 7491 #if MTK_DIS_SPBIP8X4_H0205 7492 if (iSPHeight + iSPWidth == 12) 7493 { 7494 if (puhInterDirSP[iPartition] == 3) 7495 { 7496 puhInterDirSP[iPartition] = 1; 7497 pcMvFieldSP[2*iPartition + 1].setMvField(TComMv(0,0), -1); 7498 } 7499 } 7500 #endif 6961 7501 iPartition ++; 6962 7502 } … … 6980 7520 iCurrPosY += ( iHeight >> 1 ); 6981 7521 } 7522 #if MTK_DIS_SPBIP8X4_H0205 7523 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7524 #else 6982 7525 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getPartitionSize(uiPartAddr) != SIZE_2Nx2N) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7526 #endif 6983 7527 #else 6984 7528 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) … … 7062 7606 } 7063 7607 7608 #if SEC_ADAPT_DISABLE_IVMP 7609 } 7610 #endif 7064 7611 7065 7612 //////////////////////////////// -
branches/HTM-10.2-dev0/source/Lib/TLibCommon/TComDataCU.h
r884 r935 233 233 #endif 234 234 235 #if ETRIKHU_CLEANUP_H0083 236 TComMotionCand m_mergCands[MRG_IVSHIFT+1]; 237 Int m_baseListidc; 238 #endif 239 235 240 protected: 236 241 … … 239 244 Bool xAddMVPCandOrder ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); 240 245 #if H_3D_VSP 246 #if ETRIKHU_CLEANUP_H0083 247 Bool xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount); 248 #else 241 249 Bool xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 242 250 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo); 243 251 #endif 252 #endif 244 253 #if H_3D_IV_MERGE 254 #if ETRIKHU_CLEANUP_H0083 255 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int* ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx ); 256 #else 245 257 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv, 246 258 Int* ivCandRefIdx, Int posIvDC, Int* vspFlag, Int &iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo ); 259 #endif 260 #if ETRIKHU_CLEANUP_H0083 261 Bool xGetPosFirstAvailDmvCand( Int iCount, Int& iFirDispCand ); 262 #else 247 263 Bool xGetPosFirstAvailDmvCand( Int iCount, TComMvField* pcMvFieldNeighbours, Int* ivCandDir, Int posIvDC, Int* vspFlag, Int& iFirDispCand ); 264 #endif 248 265 #endif 249 266 … … 485 502 486 503 #if H_3D 504 #if !ETRIKHU_CLEANUP_H0083 487 505 Void rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo* inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV); 506 #endif 488 507 Bool getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 489 508 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); … … 508 527 #if H_3D_SPIVMP 509 528 , TComMvField* pcMFieldSP, UChar* puhInterDirSP 529 #endif 530 #if SEC_ADAPT_DISABLE_IVMP 531 , Bool bICFlag 510 532 #endif 511 533 ); … … 635 657 Bool getAvailableFlagA0() { return m_bAvailableFlagA0;} 636 658 Bool getAvailableFlagB2() { return m_bAvailableFlagB2;} 659 #if ETRIKHU_CLEANUP_H0083 637 660 Void initAvailableFlags() { m_bAvailableFlagA1 = m_bAvailableFlagB1 = m_bAvailableFlagB0 = m_bAvailableFlagA0 = m_bAvailableFlagB2 = 0; } 661 Void buildMCL(TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours 662 #if H_3D_VSP 663 , Int* vspFlag 664 #endif 665 #if H_3D_SPIVMP 666 , Bool* pbSPIVMPFlag 667 #endif 668 , Int& numValidMergeCand 669 ); 670 #else 671 Void initAvailableFlags() { m_bAvailableFlagA1 = m_bAvailableFlagB1 = m_bAvailableFlagB0 = m_bAvailableFlagA0 = m_bAvailableFlagB2 = 0; } 672 #endif 638 673 Void getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1); 639 674 Void xGetInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours … … 642 677 #endif 643 678 #if H_3D_VSP 679 #if !ETRIKHU_CLEANUP_H0083 644 680 , Int* vspFlag 681 #endif 645 682 , InheritedVSPDisInfo* inheritedVSPDisInfo 646 683 #endif 647 684 #if H_3D_SPIVMP 685 #if ETRIKHU_CLEANUP_H0083 686 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 687 #else 648 688 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP 689 #endif 649 690 #endif 650 691 , Int& numValidMergeCand, Int mrgCandIdx = -1 -
branches/HTM-10.2-dev0/source/Lib/TLibCommon/TComMotionInfo.h
r884 r935 198 198 //! \} 199 199 200 #if ETRIKHU_CLEANUP_H0083 201 class TComMotionCand 202 { 203 public: 204 Bool m_bAvailable; 205 TComMvField m_cMvField[2]; 206 UChar m_uDir; 207 #if H_3D_VSP 208 Int m_iVspFlag; 209 #endif 210 Bool m_bSPIVMPFlag; 211 212 public: 213 TComMotionCand() 214 { 215 m_bAvailable = false; 216 m_uDir = 0; 217 #if H_3D_VSP 218 m_iVspFlag = 0; 219 #endif 220 m_bSPIVMPFlag = false; 221 } 222 223 ~TComMotionCand() 224 { 225 226 } 227 228 Void init() 229 { 230 TComMv cZeroMv; 231 232 m_bAvailable = false; 233 m_uDir = 0; 234 #if H_3D_VSP 235 m_iVspFlag = 0; 236 #endif 237 m_bSPIVMPFlag = false; 238 m_cMvField[0].setMvField(cZeroMv, NOT_VALID); 239 m_cMvField[1].setMvField(cZeroMv, NOT_VALID); 240 } 241 242 Void setCand(TComMvField* pcMvFieldNeighbours, UChar uhInterDirNeighbours 243 #if H_3D_VSP 244 , Int vspFlag 245 #endif 246 , Bool bSPIVMPFlag 247 ) 248 { 249 m_bAvailable = true; 250 m_cMvField[0] = pcMvFieldNeighbours[0]; 251 m_cMvField[1] = pcMvFieldNeighbours[1]; 252 m_uDir = uhInterDirNeighbours; 253 #if H_3D_VSP 254 m_iVspFlag = vspFlag; 255 #endif 256 m_bSPIVMPFlag = bSPIVMPFlag; 257 } 258 259 260 Void getCand(Int iCount, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours 261 #if H_3D_VSP 262 , Int* vspFlag 263 #endif 264 , Bool* pbSPIVMPFlag 265 ) 266 { 267 pcMvFieldNeighbours[iCount<<1] = m_cMvField[0]; 268 pcMvFieldNeighbours[(iCount<<1) + 1] = m_cMvField[1]; 269 puhInterDirNeighbours[iCount] = m_uDir; 270 #if H_3D_VSP 271 vspFlag[iCount] = m_iVspFlag; 272 #endif 273 pbSPIVMPFlag[iCount] = m_bSPIVMPFlag; 274 } 275 }; 276 #endif 277 278 200 279 #endif // __TCOMMOTIONINFO__ -
branches/HTM-10.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp
r888 r935 519 519 Int RefPOCL0 = pcCU->getSlice()->getRefPic(REF_PIC_LIST_0, pcCU->getCUMvField(REF_PIC_LIST_0)->getRefIdx(PartAddr))->getPOC(); 520 520 Int RefPOCL1 = pcCU->getSlice()->getRefPic(REF_PIC_LIST_1, pcCU->getCUMvField(REF_PIC_LIST_1)->getRefIdx(PartAddr))->getPOC(); 521 #if MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085 522 if(!pcCU->getARPW(PartAddr) && RefPOCL0 == RefPOCL1 && pcCU->getCUMvField(REF_PIC_LIST_0)->getMv(PartAddr) == pcCU->getCUMvField(REF_PIC_LIST_1)->getMv(PartAddr)) 523 #else 521 524 if(RefPOCL0 == RefPOCL1 && pcCU->getCUMvField(REF_PIC_LIST_0)->getMv(PartAddr) == pcCU->getCUMvField(REF_PIC_LIST_1)->getMv(PartAddr)) 525 #endif 522 526 { 523 527 return true; -
branches/HTM-10.2-dev0/source/Lib/TLibCommon/TypeDef.h
r888 r935 108 108 // MTK_ARP_FLAG_CABAC_SIMP_G0061 Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061 109 109 // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053 110 #define MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085 1 // Align the SW and WD for the bi-prediction ARP PUs by disallowing non-normative fast bi-prediction for ARP PUs, JCT3V-H0085 110 111 111 112 #define H_3D_IC 1 // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060 … … 159 160 // SEC_DEPTH_DV_DERIVAITON_G0074, Simplification of DV derivation for depth, JCT3V-G0074 160 161 // QC_DEPTH_MERGE_SIMP_G0127 Remove DV candidate and shifting candidate for depth coding 162 163 #define SEC_ADAPT_DISABLE_IVMP 1 // Disalbing IVMP merge candidates when IC is enabled, JCT3V-H0070 161 164 162 165 #define H_3D_TMVP 1 // QC_TMVP_C0047 … … 224 227 #endif 225 228 229 #define ETRIKHU_BUGFIX_H0083 1 // bug-fix for DV candidate pruning 230 #define ETRIKHU_CLEANUP_H0083 1 // cleaned-up source code for constructing merging candidate list 231 #define SHARP_SIMPLE_MERGE_H0062 1 // Restrict 3D-HEVC merge cand in small PUs 232 #define MTK_DIS_SPBIP8X4_H0205 1 // Disable bi-prediction for 8x4 and 4x8 sub PU and remove the SPIVMP 2Nx2N restriction 233 226 234 // Rate Control 227 235 #define KWU_FIX_URQ 1 … … 325 333 326 334 #define H_MV_HLS7_GEN 0 // General changes (not tested) 327 335 #define MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133 1 328 336 329 337 … … 799 807 }; 800 808 809 /// merging candidates 810 #if ETRIKHU_CLEANUP_H0083 811 enum DefaultMergCandOrder 812 { 813 MRG_T = 0, ///< MPI 814 MRG_D, ///< DDD 815 MRG_IVMC, ///< Temporal inter-view 816 MRG_A1, ///< Left 817 MRG_B1, ///< Above 818 MRG_B0, ///< Above right 819 MRG_IVDC, ///< Disparity inter-view 820 MRG_VSP, ///< VSP 821 MRG_A0, ///< Left bottom 822 MRG_B2, ///< Above left 823 MRG_IVSHIFT, ///< Shifted IVMC of Shifted IVDC. (These are mutually exclusive) 824 MRG_COL ///< Temporal co-located 825 }; 826 #endif 827 801 828 /// coefficient scanning type used in ACS 802 829 enum COEFF_SCAN_TYPE -
branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecCu.cpp
r884 r935 431 431 m_ppcCU[uiDepth]->initAvailableFlags(); 432 432 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 433 m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo 433 m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 434 #if !ETRIKHU_CLEANUP_H0083 435 ,vspFlag 436 #endif 437 , inheritedVSPDisInfo 434 438 #if H_3D_SPIVMP 435 , bSPIVMPFlag,pcMvFieldSP, puhInterDirSP439 , pcMvFieldSP, puhInterDirSP 436 440 #endif 437 441 , numValidMergeCand, uiMergeIndex ); 442 443 #if ETRIKHU_CLEANUP_H0083 444 m_ppcCU[uiDepth]->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 445 #if H_3D_SPIVMP 446 , bSPIVMPFlag 447 #endif 448 , numValidMergeCand ); 449 #endif 438 450 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 439 451 #else -
branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
r884 r935 292 292 pcSubCU->initAvailableFlags(); 293 293 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 294 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo 294 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 295 #if !ETRIKHU_CLEANUP_H0083 296 ,vspFlag 297 #endif 298 , inheritedVSPDisInfo 295 299 #if H_3D_SPIVMP 296 , bSPIVMPFlag,pcMvFieldSP, puhInterDirSP300 , pcMvFieldSP, puhInterDirSP 297 301 #endif 298 302 , numValidMergeCand ); 303 304 #if ETRIKHU_CLEANUP_H0083 305 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 306 #if H_3D_SPIVMP 307 , bSPIVMPFlag 308 #endif 309 , numValidMergeCand ); 310 #endif 299 311 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 300 312 … … 329 341 pcSubCU->initAvailableFlags(); 330 342 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 331 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo 343 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours 344 #if !ETRIKHU_CLEANUP_H0083 345 , vspFlag 346 #endif 347 , inheritedVSPDisInfo 332 348 #if H_3D_SPIVMP 333 , bSPIVMPFlag,pcMvFieldSP, puhInterDirSP349 , pcMvFieldSP, puhInterDirSP 334 350 #endif 335 351 ,numValidMergeCand, uiMergeIndex ); 352 353 #if ETRIKHU_CLEANUP_H0083 354 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 355 #if H_3D_SPIVMP 356 , bSPIVMPFlag 357 #endif 358 ,numValidMergeCand ); 359 #endif 336 360 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 337 361 if(vspFlag[uiMergeIndex]) -
branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
r884 r935 2153 2153 { 2154 2154 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx, 0, uiDepth); 2155 #if MTK_DIS_SPBIP8X4_H0205 2156 UInt uiCurrPartNumQ = (pcCU->getPic()->getNumPartInCU() >> (2 * uiDepth)) >> 2; 2157 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx + 2*uiCurrPartNumQ, 1, uiDepth); 2158 #endif 2155 2159 } 2156 2160 } -
branches/HTM-10.2-dev0/source/Lib/TLibEncoder/TEncCu.cpp
r884 r935 1814 1814 rpcTempCU->initAvailableFlags(); 1815 1815 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 1816 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag,inheritedVSPDisInfo 1816 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 1817 #if !ETRIKHU_CLEANUP_H0083 1818 , vspFlag 1819 #endif 1820 , inheritedVSPDisInfo 1817 1821 #if H_3D_SPIVMP 1818 , bSPIVMPFlag,pcMvFieldSP, puhInterDirSP1822 , pcMvFieldSP, puhInterDirSP 1819 1823 #endif 1820 1824 , numValidMergeCand 1821 1825 ); 1826 1827 #if ETRIKHU_CLEANUP_H0083 1828 rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours, vspFlag 1829 #if H_3D_SPIVMP 1830 , bSPIVMPFlag 1831 #endif 1832 , numValidMergeCand 1833 ); 1834 #endif 1835 1822 1836 #else 1823 1837 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, numValidMergeCand ); -
branches/HTM-10.2-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
r884 r935 3697 3697 pcCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 3698 3698 #if H_3D_VSP 3699 #if !ETRIKHU_CLEANUP_H0083 3699 3700 , vspFlag 3701 #endif 3700 3702 , inheritedVSPDisInfo 3701 3703 #endif 3702 3704 #if H_3D_SPIVMP 3703 , pbSPIVMPFlag, pcMvFieldSP, puhInterDirSP 3705 , pcMvFieldSP, puhInterDirSP 3706 #endif 3707 , numValidMergeCand 3708 ); 3709 3710 #if ETRIKHU_CLEANUP_H0083 3711 pcCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours 3712 #if H_3D_VSP 3713 , vspFlag 3714 #endif 3715 #if H_3D_SPIVMP 3716 , pbSPIVMPFlag 3704 3717 #endif 3705 3718 , numValidMergeCand 3706 3719 ); 3720 #endif 3707 3721 #else 3708 3722 pcCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand ); … … 3718 3732 pcCU->xGetInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours 3719 3733 #if H_3D_VSP 3734 #if !ETRIKHU_CLEANUP_H0083 3720 3735 , vspFlag 3736 #endif 3721 3737 , inheritedVSPDisInfo 3722 3738 #endif 3723 3739 #if H_3D_SPIVMP 3724 , pbSPIVMPFlag, pcMvFieldSP, puhInterDirSP 3740 , pcMvFieldSP, puhInterDirSP 3741 #endif 3742 , numValidMergeCand 3743 ); 3744 3745 #if ETRIKHU_CLEANUP_H0083 3746 pcCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours 3747 #if H_3D_VSP 3748 , vspFlag 3749 #endif 3750 #if H_3D_SPIVMP 3751 , pbSPIVMPFlag 3725 3752 #endif 3726 3753 , numValidMergeCand 3727 3754 ); 3755 #endif 3728 3756 #else 3729 3757 pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand
Note: See TracChangeset for help on using the changeset viewer.