Changeset 566 in 3DVCSoftware for branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibCommon
- Timestamp:
- 12 Aug 2013, 11:11:06 (11 years ago)
- Location:
- branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibCommon
- Files:
-
- 7 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
Note: See TracChangeset for help on using the changeset viewer.