Changeset 566 in 3DVCSoftware
- Timestamp:
- 12 Aug 2013, 11:11:06 (11 years ago)
- Location:
- branches/HTM-DEV-2.0-dev1-Mediatek
- Files:
-
- 2 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibCommon/TComDataCU.cpp
r542 r566 144 144 #if H_3D_VSP 145 145 m_piVSPFlag = NULL; 146 #if MTK_VSP_FIX_E0172 147 m_piVSPDir = NULL; 148 #endif 146 149 #endif 147 150 #if H_3D_ARP … … 187 190 #if H_3D_VSP 188 191 m_piVSPFlag = (Char* )xMalloc(Char, uiNumPartition); 192 #if MTK_VSP_FIX_E0172 193 m_piVSPDir = (Char* )xMalloc(Char, uiNumPartition); 194 #endif 189 195 #endif 190 196 m_puhLumaIntraDir = (UChar* )xMalloc(UChar, uiNumPartition); … … 336 342 #if H_3D_VSP 337 343 if ( m_piVSPFlag ) { xFree(m_piVSPFlag); m_piVSPFlag = NULL; } 344 #if MTK_VSP_FIX_E0172 345 if ( m_piVSPDir ) { xFree(m_piVSPDir ); m_piVSPDir = NULL; } 346 #endif 338 347 #endif 339 348 if ( m_puhLumaIntraDir ) { xFree(m_puhLumaIntraDir); m_puhLumaIntraDir = NULL; } … … 532 541 #if H_3D_VSP 533 542 m_piVSPFlag[ui] = pcFrom->m_piVSPFlag[ui]; 543 #if MTK_VSP_FIX_E0172 544 m_piVSPDir [ui] = pcFrom->m_piVSPDir[ui]; 545 #endif 534 546 #endif 535 547 m_puhLumaIntraDir[ui]=pcFrom->m_puhLumaIntraDir[ui]; … … 571 583 #if H_3D_VSP 572 584 memset( m_piVSPFlag + firstElement, 0, numElements * sizeof( *m_piVSPFlag ) ); 585 #if MTK_VSP_FIX_E0172 586 memset( m_piVSPDir + firstElement, 0, numElements * sizeof( *m_piVSPDir ) ); 587 #endif 573 588 #endif 574 589 memset( m_puhLumaIntraDir + firstElement, DC_IDX, numElements * sizeof( *m_puhLumaIntraDir ) ); … … 743 758 #if H_3D_VSP 744 759 m_piVSPFlag[ui] = 0; 760 #if MTK_VSP_FIX_E0172 761 m_piVSPDir [ui] = 0; 762 #endif 745 763 #endif 746 764 m_puhLumaIntraDir[ui] = DC_IDX; … … 835 853 #if H_3D_VSP 836 854 memset( m_piVSPFlag, 0, sizeof( Char ) * m_uiNumPartition ); 855 #if MTK_VSP_FIX_E0172 856 memset( m_piVSPDir , 0, sizeInChar ); 857 #endif 837 858 #endif 838 859 memset( m_puhLumaIntraDir, DC_IDX, iSizeInUchar ); … … 922 943 #if H_3D_VSP 923 944 m_piVSPFlag[ui]=pcCU->m_piVSPFlag[uiPartOffset+ui]; 945 #if MTK_VSP_FIX_E0172 946 m_piVSPDir[ui]=pcCU->m_piVSPDir[uiPartOffset+ui]; 947 #endif 924 948 #endif 925 949 m_puhLumaIntraDir[ui]=pcCU->m_puhLumaIntraDir[uiPartOffset+ui]; … … 1064 1088 #if H_3D_VSP 1065 1089 m_piVSPFlag = pcCU->getVSPFlag() + uiPart; 1090 #if MTK_VSP_FIX_E0172 1091 m_piVSPDir = pcCU->getVSPDir () + uiPart; 1092 #endif 1066 1093 #endif 1067 1094 … … 1211 1238 #if H_3D_VSP 1212 1239 m_piVSPFlag = pcCU->getVSPFlag() + uiAbsPartIdx; 1240 #if MTK_VSP_FIX_E0172 1241 m_piVSPDir = pcCU->getVSPDir () + uiAbsPartIdx; 1242 #endif 1213 1243 #endif 1214 1244 … … 1258 1288 #if H_3D_VSP 1259 1289 memcpy( m_piVSPFlag + uiOffset, pcCU->getVSPFlag(), sizeof( Char ) * uiNumPartition ); 1290 #if MTK_VSP_FIX_E0172 1291 memcpy( m_piVSPDir + uiOffset, pcCU->getVSPDir (), sizeInChar ); 1292 #endif 1260 1293 #endif 1261 1294 memcpy( m_puhLumaIntraDir + uiOffset, pcCU->getLumaIntraDir(), iSizeInUchar ); … … 1378 1411 #if H_3D_VSP 1379 1412 memcpy( rpcCU->getVSPFlag() + m_uiAbsIdxInLCU, m_piVSPFlag, sizeof( Char ) * m_uiNumPartition ); 1413 #if MTK_VSP_FIX_E0172 1414 memcpy( rpcCU->getVSPDir () + m_uiAbsIdxInLCU, m_piVSPDir , sizeInChar ); 1415 #endif 1380 1416 #endif 1381 1417 memcpy( rpcCU->getLumaIntraDir() + m_uiAbsIdxInLCU, m_puhLumaIntraDir, iSizeInUchar ); … … 1486 1522 #if H_3D_VSP 1487 1523 memcpy( rpcCU->getVSPFlag() + uiPartOffset, m_piVSPFlag, sizeof(Char) * uiQNumPart ); 1524 #if MTK_VSP_FIX_E0172 1525 memcpy( rpcCU->getVSPDir () + uiPartOffset, m_piVSPDir , sizeInChar ); 1526 #endif 1488 1527 #endif 1489 1528 memcpy( rpcCU->getLumaIntraDir() + uiPartOffset, m_puhLumaIntraDir, iSizeInUchar ); … … 2489 2528 setSubPart<Char>( iVSPFlag, m_piVSPFlag, uiAbsPartIdx, uiDepth, uiPartIdx ); 2490 2529 } 2530 #if MTK_VSP_FIX_E0172 2531 Void TComDataCU::setVSPDirSubParts ( Char iVSPDir, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2532 { 2533 setSubPart<Char>( iVSPDir, m_piVSPDir, uiAbsPartIdx, uiDepth, uiPartIdx ); 2534 } 2535 #endif 2491 2536 #endif 2492 2537 Void TComDataCU::setChromIntraDirSubParts( UInt uiDir, UInt uiAbsPartIdx, UInt uiDepth ) … … 2941 2986 * false: otherwise 2942 2987 */ 2988 #if MTK_VSP_FIX_E0172 2989 inline Bool TComDataCU::xAddVspCand( UChar ucVspMergePos, Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 2990 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int* vspDir ) 2991 #else 2943 2992 inline Bool TComDataCU::xAddVspCand( UChar ucVspMergePos, Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 2944 2993 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag ) 2994 #endif 2945 2995 { 2946 2996 if ( ucVspMergePos != H_3D_VSP_POSITION || 0 == m_pcSlice->getViewIndex() || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() ) … … 2957 3007 Int iRefListIdY = 0; 2958 3008 Int i; 2959 3009 #if MTK_VSP_FIX_E0172 3010 Int currViewId = m_pcSlice->getViewId(); 3011 Int derivedViewId = -1; 3012 Int otherViewId = -1; 3013 #endif 2960 3014 for( iRefListIdX = 0; iRefListIdX < 2 && !refViewAvailFlag; iRefListIdX++ ) 2961 3015 { … … 2968 3022 refViewAvailFlag = true; 2969 3023 predFlag[iRefListIdX] = 1; 3024 #if MTK_VSP_FIX_E0172 3025 vspDir[iCount] = iRefListIdX; 3026 derivedViewId = m_pcSlice->getRefPic(eRefPicList, i)->getViewId(); 3027 #endif 2970 3028 iRefListIdY = 1 - iRefListIdX; 2971 3029 pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].setMvField( pDInfo->m_acDoNBDV, i ); … … 2988 3046 refViewAvailFlag = true; 2989 3047 predFlag[iRefListIdY] = 1; 3048 #if MTK_VSP_FIX_E0172 3049 TComMv cMv = pDInfo->m_acDoNBDV; 3050 otherViewId = m_pcSlice->getRefPic( eRefPicList, i)->getViewId(); 3051 Int iScale = xGetDistScaleFactor( currViewId, otherViewId, currViewId, derivedViewId ); 3052 if ( iScale != 4096 && m_pcSlice->getVPS()->getIvMvScalingFlag() ) 3053 { 3054 cMv = cMv.scaleMv( iScale ); 3055 } 3056 else 3057 { 3058 3059 cMv = cMv; 3060 } 3061 clipMv( cMv ); 3062 pcMvFieldNeighbours[(iCount<<1)+iRefListIdY].setMvField( cMv, i ); 3063 #else 2990 3064 pcMvFieldNeighbours[(iCount<<1)+iRefListIdY].setMvField( pDInfo->m_acDoNBDV, i ); 3065 #endif 2991 3066 #if H_3D_NBDV 2992 3067 pcMvFieldNeighbours[(iCount<<1)+iRefListIdY].getMv().setIDVFlag (false); … … 3021 3096 #if H_3D_VSP 3022 3097 , Int* vspFlag 3098 #if MTK_VSP_FIX_E0172 3099 , Int* vspDir 3100 #endif 3023 3101 #endif 3024 3102 , Int& numValidMergeCand, Int mrgCandIdx … … 3210 3288 #if H_3D_VSP 3211 3289 if (pcCULeft->getVSPFlag(uiLeftPartIdx) == 1) 3290 #if MTK_VSP_FIX_E0172 3291 { 3292 #endif 3212 3293 vspFlag[iCount] = 1; 3294 #if MTK_VSP_FIX_E0172 3295 vspDir[iCount] = pcCULeft->getVSPDir( uiLeftPartIdx ); 3296 } 3297 #endif 3213 3298 #endif 3214 3299 if ( mrgCandIdx == iCount ) … … 3278 3363 #if H_3D_VSP 3279 3364 if (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1) 3365 #if MTK_VSP_FIX_E0172 3366 { 3367 #endif 3280 3368 vspFlag[iCount] = 1; 3369 #if MTK_VSP_FIX_E0172 3370 vspDir[iCount] = pcCUAbove->getVSPDir( uiAbovePartIdx ); 3371 } 3372 #endif 3281 3373 #endif 3282 3374 if ( mrgCandIdx == iCount ) … … 3324 3416 #if H_3D_VSP 3325 3417 if (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1) 3418 #if MTK_VSP_FIX_E0172 3419 { 3420 #endif 3326 3421 vspFlag[iCount] = 1; 3422 #if MTK_VSP_FIX_E0172 3423 vspDir[iCount] = pcCUAboveRight->getVSPDir( uiAboveRightPartIdx); 3424 } 3425 #endif 3327 3426 #endif 3328 3427 if ( mrgCandIdx == iCount ) … … 3390 3489 3391 3490 #if H_3D_VSP 3491 #if MTK_VSP_FIX_E0172 3492 if ( xAddVspCand( H_3D_VSP_POSITION, mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, vspDir ) ) 3493 #else 3392 3494 if ( xAddVspCand( H_3D_VSP_POSITION, mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag ) ) 3495 #endif 3393 3496 return; 3394 3497 // early termination … … 3421 3524 #if H_3D_VSP 3422 3525 if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) == 1) 3526 #if MTK_VSP_FIX_E0172 3527 { 3528 #endif 3423 3529 vspFlag[iCount] = 1; 3530 #if MTK_VSP_FIX_E0172 3531 vspDir[iCount] = pcCULeftBottom->getVSPDir( uiLeftBottomPartIdx); 3532 } 3533 #endif 3424 3534 #endif 3425 3535 if ( mrgCandIdx == iCount ) … … 3461 3571 #if H_3D_VSP 3462 3572 if (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1) 3573 #if MTK_VSP_FIX_E0172 3574 { 3575 #endif 3463 3576 vspFlag[iCount] = 1; 3577 #if MTK_VSP_FIX_E0172 3578 vspDir[iCount] = pcCUAboveLeft->getVSPDir( uiAboveLeftPartIdx); 3579 } 3580 #endif 3464 3581 #endif 3465 3582 if ( mrgCandIdx == iCount ) … … 4914 5031 Bool bCheck = false; 4915 5032 if ( curPosition == 0 && iLCUIdxRBNb >= 0 ) 5033 #if MTK_NBDV_TN_FIX_E0172 5034 bCheck = xGetColDisMV( curCandPic, eCurRefPicList, curCandPicRefIdx, iLCUIdxRBNb, iPartIdxRBNb, cColMv, iTargetViewIdx, iTStartViewIdx); 5035 #else 4916 5036 bCheck = xGetColDisMV( eCurRefPicList, curCandPicRefIdx, iLCUIdxRBNb, iPartIdxRBNb, cColMv, iTargetViewIdx, iTStartViewIdx); 5037 #endif 4917 5038 4918 5039 if (curPosition == 1 ) 5040 #if MTK_NBDV_TN_FIX_E0172 5041 bCheck = xGetColDisMV( curCandPic, eCurRefPicList, curCandPicRefIdx, uiLCUIdx, uiPartIdxCenter, cColMv, iTargetViewIdx, iTStartViewIdx ); 5042 #else 4919 5043 bCheck = xGetColDisMV( eCurRefPicList, curCandPicRefIdx, uiLCUIdx, uiPartIdxCenter, cColMv, iTargetViewIdx, iTStartViewIdx ); 5044 #endif 4920 5045 4921 5046 if( bCheck ) … … 5021 5146 pDInfo->m_acNBDV = cDispVec; 5022 5147 pDInfo->m_aVIdxCan = cIDVInfo.m_aVIdxCan[iList][ curPos ]; 5148 #if !MTK_DVMCP_FIX_E0172 5023 5149 assert(pDInfo->m_aVIdxCan == 0); //Notes from QC: only works for CTC 5150 #endif 5024 5151 #if H_3D_NBDV_REF 5025 5152 TComPic* picDepth = getSlice()->getIvPic( true, pDInfo->m_aVIdxCan ); … … 5145 5272 paIDVInfo->m_acMvCand[iList][ uiMvpDvPos ] = TComMv( cMvPred.getIDVHor(), cMvPred.getIDVVer() ); 5146 5273 //Notes from QC: DvMCP is implemented in a way that doesn�t carry the reference view identifier as NBDV. It only works for CTC and needs to be fixed to be aligned with other part of the NBDV design. 5274 #if MTK_DVMCP_FIX_E0172 5275 paIDVInfo->m_aVIdxCan[iList][ uiMvpDvPos ] = cMvPred.getIDVVId(); 5276 #else 5147 5277 paIDVInfo->m_aVIdxCan[iList][ uiMvpDvPos ] = 0; 5278 #endif 5148 5279 paIDVInfo->m_bAvailab[iList][ uiMvpDvPos ] = true; 5149 5280 paIDVInfo->m_bFound = true; … … 5210 5341 } 5211 5342 } 5212 5343 #if MTK_NBDV_TN_FIX_E0172 5344 Bool TComDataCU::xGetColDisMV( Int currCandPic, RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv , Int & iTargetViewIdx, Int & iStartViewIdx ) 5345 #else 5213 5346 Bool TComDataCU::xGetColDisMV( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv , Int & iTargetViewIdx, Int & iStartViewIdx ) 5347 #endif 5214 5348 { 5215 5349 … … 5245 5379 else 5246 5380 { 5381 #if MTK_NBDV_TN_FIX_E0172 5382 if(getPic()->isTempIVRefValid(currCandPic, ilist, iColRefIdx)) 5383 { 5384 #endif 5247 5385 rcMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiPartUnitIdx); 5248 5386 rcMv.setIDVFlag(0); … … 5250 5388 iStartViewIdx = iColViewIdx ; 5251 5389 return true; 5390 #if MTK_NBDV_TN_FIX_E0172 5391 } 5392 #endif 5252 5393 } 5253 5394 } … … 5328 5469 cMv.setIDVHor (cDv.getHor()); 5329 5470 cMv.setIDVVer (cDv.getVer()); 5471 #if MTK_DVMCP_FIX_E0172 5472 cMv.setIDVVId (iViewIndex); 5473 #endif 5330 5474 #endif 5331 5475 clipMv( cMv ); … … 5348 5492 for( Int iPdmRefIdx = 0; iPdmRefIdx < iNumRefPics; iPdmRefIdx++ ) 5349 5493 { 5494 #if MTK_DIVMC_FIX_E0172 5495 if(( pcSlice->getRefPOC( eRefPicListDMV, iPdmRefIdx ) == pcSlice->getPOC()) && (pcSlice->getRefPic( eRefPicListDMV, iPdmRefIdx )->getViewIndex() == pDInfo->m_aVIdxCan)) 5496 #else 5350 5497 if( pcSlice->getRefPOC( eRefPicListDMV, iPdmRefIdx ) == pcSlice->getPOC()) 5498 #endif 5351 5499 { 5352 5500 abPdmAvailable[ iRefListId+2 ] = true; -
branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibCommon/TComDataCU.h
r531 r566 197 197 Char* m_piVSPFlag; ///< array of VSP flags to indicate whehter a block uses VSP or not 198 198 ///< 0: non-VSP; 1: VSP 199 #if MTK_VSP_FIX_E0172 200 Char* m_piVSPDir; ///< 0: LIST0; 1: LIST1 201 #endif 199 202 #endif 200 203 #if H_3D_ARP … … 246 249 Bool xAddMVPCandOrder ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); 247 250 #if H_3D_VSP 251 #if MTK_VSP_FIX_E0172 252 Bool xAddVspCand( UChar ucVspMergePos, Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 253 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int* vspDir ); 254 #else 248 255 Bool xAddVspCand( UChar ucVspMergePos, Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 249 256 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag ); 257 #endif 250 258 #endif 251 259 … … 473 481 #endif 474 482 ); 483 #if MTK_NBDV_TN_FIX_E0172 484 Bool xGetColDisMV ( Int currCandPic, RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int & iTargetViewIdx, Int & iStartViewIdx ); 485 #else 475 486 Bool xGetColDisMV ( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int & iTargetViewIdx, Int & iStartViewIdx ); 487 #endif 476 488 Bool getDisMvpCandNBDV ( DisInfo* pDInfo 477 489 #if H_3D_NBDV_REF … … 632 644 #if H_3D_VSP 633 645 , Int* vspFlag 646 #if MTK_VSP_FIX_E0172 647 , Int* vspDir 648 #endif 634 649 #endif 635 650 , Int& numValidMergeCand, Int mrgCandIdx = -1 ); … … 639 654 Void setVSPFlag ( UInt uiIdx, Int n ) { m_piVSPFlag[uiIdx] = n; } 640 655 Void setVSPFlagSubParts( Char iVSPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 656 #if MTK_VSP_FIX_E0172 657 Char* getVSPDir () { return m_piVSPDir; } 658 Char getVSPDir ( UInt uiIdx ) { return m_piVSPDir[uiIdx]; } 659 Void setVSPDir ( UInt uiIdx, Int n ) { m_piVSPDir[uiIdx] = n; } 660 Void setVSPDirSubParts ( Char iVSPDir, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 661 #endif 641 662 #endif 642 663 Void deriveLeftRightTopIdxGeneral ( UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT ); -
branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibCommon/TComMv.h
r499 r566 58 58 Short m_iIDVHor; 59 59 Short m_iIDVVer; 60 #if MTK_DVMCP_FIX_E0172 61 Short m_iIDVVId; //view index of the IDV 62 #endif 60 63 #endif 61 64 public: … … 72 75 , m_iIDVHor(0) 73 76 , m_iIDVVer(0) 77 #if MTK_DVMCP_FIX_E0172 78 , m_iIDVVId(0) 79 #endif 74 80 #endif 75 81 { … … 83 89 , m_iIDVHor(0) 84 90 , m_iIDVVer(0) 91 #if MTK_DVMCP_FIX_E0172 92 , m_iIDVVId(0) 93 #endif 85 94 #endif 86 95 { … … 97 106 #if H_3D_NBDV 98 107 m_bIDV = false; m_iIDVHor = m_iIDVVer = 0; 108 #if MTK_DVMCP_FIX_E0172 109 m_iIDVVId = 0; 110 #endif 99 111 #endif 100 112 } … … 103 115 Void setIDVVer (Short i) {m_iIDVVer = i;} 104 116 Void setIDVFlag (Bool b ) {m_bIDV = b;} 117 #if MTK_DVMCP_FIX_E0172 118 Void setIDVVId (Short i) {m_iIDVVId = i;} 119 #endif 105 120 #endif 106 121 // ------------------------------------------------------------------------------------------------------------------ … … 116 131 Short getIDVVer () const { return m_iIDVVer; } 117 132 Bool getIDVFlag() const { return m_bIDV; } 133 #if MTK_DVMCP_FIX_E0172 134 Short getIDVVId () const { return m_iIDVVId; } 135 #endif 118 136 #endif 119 137 // ------------------------------------------------------------------------------------------------------------------ -
branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibCommon/TComPic.cpp
r539 r566 655 655 } 656 656 #endif 657 #if MTK_NBDV_TN_FIX_E0172 658 Void TComPic::checkTemporalIVRef() 659 { 660 TComSlice* currSlice = getSlice(getCurrSliceIdx()); 661 const Int numCandPics = this->getNumDdvCandPics(); 662 for(Int curCandPic = 0; curCandPic < numCandPics; curCandPic++) 663 { 664 RefPicList eCurRefPicList = REF_PIC_LIST_0 ; 665 Int curCandPicRefIdx = 0; 666 if( curCandPic == 0 ) 667 { 668 eCurRefPicList = RefPicList(currSlice->isInterB() ? 1-currSlice->getColFromL0Flag() : 0); 669 curCandPicRefIdx = currSlice->getColRefIdx(); 670 } 671 else 672 { 673 eCurRefPicList = this->getRapRefList(); 674 curCandPicRefIdx = this->getRapRefIdx(); 675 } 676 TComPic* pcCandColPic = currSlice->getRefPic( eCurRefPicList, curCandPicRefIdx); 677 TComSlice* pcCandColSlice = pcCandColPic->getSlice(0);// currently only support single slice 678 679 if(!pcCandColSlice->isIntra()) 680 { 681 for( Int iColRefDir = 0; iColRefDir < (pcCandColSlice->isInterB() ? 2: 1); iColRefDir ++ ) 682 { 683 for( Int iColRefIdx =0; iColRefIdx < pcCandColSlice->getNumRefIdx(( RefPicList )iColRefDir ); iColRefIdx++) 684 { 685 m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] = false; 686 Int iColViewIdx = pcCandColSlice->getViewIndex(); 687 Int iColRefViewIdx = pcCandColSlice->getRefPic( ( RefPicList )iColRefDir, iColRefIdx)->getViewIndex(); 688 if(iColViewIdx == iColRefViewIdx) 689 continue; 690 691 for(Int iCurrRefDir = 0;(iCurrRefDir < (currSlice->isInterB() ? 2: 1)) && (m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] == false ); iCurrRefDir++) 692 { 693 for( Int iCurrRefIdx =0; iCurrRefIdx < currSlice->getNumRefIdx(( RefPicList )iCurrRefDir ); iCurrRefIdx++) 694 { 695 if( currSlice->getRefPic( ( RefPicList )iCurrRefDir, iCurrRefIdx )->getViewIndex() == iColRefViewIdx ) 696 { 697 m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] = true; 698 break; 699 } 700 } 701 } 702 } 703 } 704 } 705 } 706 } 707 Bool TComPic::isTempIVRefValid(Int currCandPic, Int iColRefDir, Int iColRefIdx) 708 { 709 return m_abTIVRINCurrRL[currCandPic][iColRefDir][iColRefIdx]; 710 } 711 #endif 657 712 //! \} -
branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibCommon/TComPic.h
r541 r566 104 104 Int m_iNumDdvCandPics; 105 105 #endif 106 #if MTK_NBDV_TN_FIX_E0172 107 Bool m_abTIVRINCurrRL [2][2][MAX_NUM_REF]; //whether an inter-view reference picture with the same view index of the inter-view reference picture of temporal reference picture of current picture exists in current reference picture lists 108 #endif 106 109 public: 107 110 TComPic(); … … 215 218 RefPicList getRapRefList() {return m_eRapRefList; } 216 219 #endif 220 #if MTK_NBDV_TN_FIX_E0172 221 Void checkTemporalIVRef(); 222 Bool isTempIVRefValid(Int currCandPic, Int iTempRefDir, Int iTempRefIdx); 223 #endif 217 224 /** transfer ownership of seis to this picture */ 218 225 void setSEIs(SEIMessages& seis) { m_SEIs = seis; } -
branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibCommon/TComPrediction.cpp
r537 r566 697 697 { 698 698 // Get depth reference 699 #if MTK_VSP_FIX_E0172 700 Int vspDir = pcCU->getVSPDir( uiPartAddr ); 701 RefPicList privateRefPicList = (vspDir == 0) ? REF_PIC_LIST_0 : REF_PIC_LIST_1; 702 Int privateRefIdx = pcCU->getCUMvField( privateRefPicList )->getRefIdx( uiPartAddr ); 703 Int depthRefViewIdx = pcCU->getSlice()->getRefPic(privateRefPicList, privateRefIdx)->getViewIndex(); 704 #else 699 705 Int depthRefViewIdx = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan; 706 #endif 700 707 TComPic* pRefPicBaseDepth = pcCU->getSlice()->getIvPic (true, depthRefViewIdx ); 701 708 assert(pRefPicBaseDepth != NULL); … … 716 723 717 724 // Do compensation 725 #if MTK_VSP_FIX_E0172 726 TComMv cDv = pcCU->getCUMvField( privateRefPicList )->getMv( uiPartAddr ); 727 #else 718 728 TComMv cDv = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); // cDv is the disparity vector derived from the neighbors 729 #endif 719 730 pcCU->clipMv(cDv); 720 731 UInt uiAbsPartIdx = pcCU->getZorderIdxInCU(); -
branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibCommon/TypeDef.h
r543 r566 101 101 // MERL_D0166: Reference view selection in NBDV & Bi-VSP 102 102 // MERL_C0152: Basic VSP 103 #define MTK_RVS_BUGFIX_E0172 1 // Bug fix for issues caused by reference view selection, JCT3V-E0172 104 #if MTK_RVS_BUGFIX_E0172 105 #define MTK_DVMCP_FIX_E0172 1 // fix the mismatch between software and WD for DV derivation from DVMCP blocks, issue 2 in JCT3V-E0172 106 #define MTK_VSP_FIX_E0172 1 // fix the issues related to VSP merge candidate, issue 3, 4 in JCT3V-E0172 107 #define MTK_DIVMC_FIX_E0172 1 // fix the issue of derivation of disparity inter-view merge candidate, issue 5 in JCT3V-E0172 108 #define MTK_NBDV_TN_FIX_E0172 1 // fix the issue of DV derivation from the temporal neighboring blocks, issue 7 in JCT3V-E0172 109 #endif 103 110 #endif 104 111 #define H_3D_VSP 1 // View synthesis prediction -
branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibDecoder/TDecCu.cpp
r531 r566 366 366 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 367 367 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 368 368 #if MTK_VSP_FIX_E0172 369 Int vspDir[MRG_MAX_NUM_CANDS_MEM]; 370 memset(vspDir, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 371 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag,vspDir, numValidMergeCand, uiMergeIndex ); 372 pcCU->setVSPDirSubParts( vspDir[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 373 #else 369 374 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, numValidMergeCand, uiMergeIndex ); 375 #endif 370 376 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 371 377 #else -
branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibDecoder/TDecEntropy.cpp
r531 r566 243 243 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 244 244 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 245 #if MTK_VSP_FIX_E0172 246 Int vspDir[MRG_MAX_NUM_CANDS_MEM]; 247 memset(vspDir, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 248 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, vspDir, numValidMergeCand ); 249 pcCU->setVSPDirSubParts( vspDir[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 250 #else 245 251 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, numValidMergeCand ); 252 #endif 246 253 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 247 254 #else … … 258 265 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 259 266 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 267 #if MTK_VSP_FIX_E0172 268 Int vspDir[MRG_MAX_NUM_CANDS_MEM]; 269 memset(vspDir, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 270 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, vspDir,numValidMergeCand, uiMergeIndex ); 271 pcCU->setVSPDirSubParts( vspDir[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 272 #else 260 273 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, numValidMergeCand, uiMergeIndex ); 274 #endif 261 275 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 262 276 #else … … 291 305 } 292 306 } 307 #if MTK_VSP_FIX_E0172 308 if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == false)) 309 #else 293 310 if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) ) 311 #endif 294 312 { 295 313 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMv( TComMv(0,0), ePartSize, uiSubPartIdx, uiDepth, uiPartIdx); -
branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibDecoder/TDecGop.cpp
r542 r566 159 159 } 160 160 #endif 161 #if MTK_NBDV_TN_FIX_E0172 162 if(pcSlice->getViewIndex() && !pcSlice->getIsDepth() && !pcSlice->isIntra()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done. 163 { 164 rpcPic->checkTemporalIVRef(); 165 } 166 #endif 161 167 #if H_3D 162 168 pcSlice->setDepthToDisparityLUTs(); -
branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibEncoder/TEncCu.cpp
r541 r566 1615 1615 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 1616 1616 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 1617 #if MTK_VSP_FIX_E0172 1618 Int vspDir[MRG_MAX_NUM_CANDS_MEM]; 1619 memset(vspDir, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 1620 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag,vspDir, numValidMergeCand ); 1621 #else 1617 1622 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag, numValidMergeCand ); 1623 #endif 1618 1624 #else 1619 1625 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand ); … … 1683 1689 #if H_3D_VSP 1684 1690 rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth ); 1691 #if MTK_VSP_FIX_E0172 1692 rpcTempCU->setVSPDirSubParts( vspDir[uiMergeCand], 0, 0, uhDepth ); 1693 #endif 1685 1694 #endif 1686 1695 rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to LCU level -
branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibEncoder/TEncGOP.cpp
r542 r566 1078 1078 #endif 1079 1079 #endif 1080 #if MTK_NBDV_TN_FIX_E0172 1081 if(pcSlice->getViewIndex() && !pcSlice->getIsDepth() && !pcSlice->isIntra()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done. 1082 { 1083 pcPic->checkTemporalIVRef(); 1084 } 1085 #endif 1080 1086 while(nextCUAddr<uiRealEndAddress) // determine slice boundaries 1081 1087 { -
branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibEncoder/TEncSearch.cpp
r537 r566 3550 3550 #if H_3D_VSP 3551 3551 , Int* vspFlag 3552 #if MTK_VSP_FIX_E0172 3553 , Int* vspDir 3554 #endif 3552 3555 #endif 3553 3556 , Int& numValidMergeCand … … 3569 3572 #if H_3D_VSP 3570 3573 , vspFlag 3574 #if MTK_VSP_FIX_E0172 3575 , vspDir 3576 #endif 3571 3577 #endif 3572 3578 , numValidMergeCand … … 3580 3586 #if H_3D_VSP 3581 3587 , vspFlag 3588 #if MTK_VSP_FIX_E0172 3589 , vspDir 3590 #endif 3582 3591 #endif 3583 3592 , numValidMergeCand 3584 3593 ); 3585 3594 } 3595 #if MTK_VSP_FIX_E0172 3596 xRestrictBipredMergeCand( pcCU, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours,vspFlag, numValidMergeCand ); 3597 #else 3586 3598 xRestrictBipredMergeCand( pcCU, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 3599 #endif 3587 3600 3588 3601 ruiCost = MAX_UINT; … … 3600 3613 #if H_3D_VSP 3601 3614 pcCU->setVSPFlagSubParts( vspFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 3615 #if MTK_VSP_FIX_E0172 3616 pcCU->setVSPDirSubParts( vspDir[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 3617 #endif 3602 3618 #endif 3603 3619 … … 3629 3645 * \returns Void 3630 3646 */ 3647 #if MTK_VSP_FIX_E0172 3648 Void TEncSearch::xRestrictBipredMergeCand( TComDataCU* pcCU, UInt puIdx, TComMvField* mvFieldNeighbours, UChar* interDirNeighbours, Int* vspFlag, Int numValidMergeCand ) 3649 #else 3631 3650 Void TEncSearch::xRestrictBipredMergeCand( TComDataCU* pcCU, UInt puIdx, TComMvField* mvFieldNeighbours, UChar* interDirNeighbours, Int numValidMergeCand ) 3651 #endif 3632 3652 { 3633 3653 if ( pcCU->isBipredRestriction(puIdx) ) … … 3635 3655 for( UInt mergeCand = 0; mergeCand < numValidMergeCand; ++mergeCand ) 3636 3656 { 3657 #if MTK_VSP_FIX_E0172 3658 if ( (interDirNeighbours[mergeCand] == 3) && (vspFlag[mergeCand] == false) ) 3659 #else 3637 3660 if ( interDirNeighbours[mergeCand] == 3 ) 3661 #endif 3638 3662 { 3639 3663 interDirNeighbours[mergeCand] = 1; … … 3758 3782 #if H_3D_VSP 3759 3783 pcCU->setVSPFlagSubParts( 0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr) ); 3784 #if MTK_VSP_FIX_E0172 3785 pcCU->setVSPDirSubParts( 0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr) ); 3786 #endif 3760 3787 #endif 3761 3788 … … 4250 4277 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 4251 4278 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 4279 #if MTK_VSP_FIX_E0172 4280 Int vspDir[MRG_MAX_NUM_CANDS_MEM]; 4281 memset(vspDir, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 4282 #endif 4252 4283 #endif 4253 4284 … … 4255 4286 #if H_3D_VSP 4256 4287 , vspFlag 4288 #if MTK_VSP_FIX_E0172 4289 , vspDir 4290 #endif 4257 4291 #endif 4258 4292 , numValidMergeCand … … 4265 4299 #if H_3D_VSP 4266 4300 pcCU->setVSPFlagSubParts( vspFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4301 #if MTK_VSP_FIX_E0172 4302 pcCU->setVSPDirSubParts( vspDir[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4303 #endif 4267 4304 #endif 4268 4305 pcCU->setInterDirSubParts ( uiMRGInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); … … 4287 4324 #if H_3D_VSP 4288 4325 pcCU->setVSPFlagSubParts ( 0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4326 #if MTK_VSP_FIX_E0172 4327 pcCU->setVSPDirSubParts ( 0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4328 #endif 4289 4329 #endif 4290 4330 { -
branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibEncoder/TEncSearch.h
r531 r566 415 415 #if H_3D_VSP 416 416 , Int* vspFlag 417 #if MTK_VSP_FIX_E0172 418 , Int* vspDir 419 #endif 417 420 #endif 418 421 , Int& numValidMergeCand … … 423 426 TComMvField* mvFieldNeighbours, 424 427 UChar* interDirNeighbours, 428 #if MTK_VSP_FIX_E0172 429 Int* vspFlag, 430 #endif 425 431 Int numValidMergeCand ); 426 432
Note: See TracChangeset for help on using the changeset viewer.