Changeset 317 in SHVCSoftware for branches/SHM-3.0-dev/source/Lib
- Timestamp:
- 2 Aug 2013, 22:09:00 (11 years ago)
- Location:
- branches/SHM-3.0-dev/source/Lib/TLibCommon
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-3.0-dev/source/Lib/TLibCommon/TComDataCU.cpp
r316 r317 2556 2556 deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT ); 2557 2557 deriveLeftBottomIdxGeneral ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB ); 2558 #if SVC_MVP2559 // BL collocated2560 TComDataCU *pcColCU = NULL;2561 UInt uiCUAddrBase = 0, uiAbsPartAddrBase = 0;2562 #if AVC_BASE2563 if( !this->getSlice()->getVPS()->getAvcBaseLayerFlag() || AVC_SYNTAX )2564 #endif2565 {2566 TComMvField cMvFieldBaseColCU[2];2567 if(m_layerId)2568 {2569 pcColCU = getBaseColCU( m_layerId - 1, xP + nPSW/2, yP + nPSH/2, uiCUAddrBase, uiAbsPartAddrBase );2570 2571 #if INTRA_BL2572 if( pcColCU && pcColCU->isIntraBL( uiAbsPartAddrBase ) )2573 {2574 pcColCU = NULL;2575 }2576 #endif2577 2578 if(pcColCU && !pcColCU->isIntra( uiAbsPartAddrBase ) )2579 {2580 abCandIsInter[iCount] = true;2581 2582 // get interDir2583 puhInterDirNeighbours[iCount] = pcColCU->getInterDir( uiAbsPartAddrBase );2584 2585 pcMvFieldNeighbours[(iCount << 1)].setMvField( TComMv(0,0), -1);2586 pcMvFieldNeighbours[(iCount << 1) + 1].setMvField( TComMv(0,0), -1);2587 2588 if( puhInterDirNeighbours[iCount] & 1 )2589 {2590 pcColCU->getMvField( pcColCU, uiAbsPartAddrBase, REF_PIC_LIST_0, cMvFieldBaseColCU[0]);2591 scaleBaseMV( m_layerId - 1, pcMvFieldNeighbours[iCount<<1], cMvFieldBaseColCU[0] );2592 }2593 2594 if ( getSlice()->isInterB() && puhInterDirNeighbours[iCount] & 2 )2595 {2596 pcColCU->getMvField( pcColCU, uiAbsPartAddrBase, REF_PIC_LIST_1, cMvFieldBaseColCU[1] );2597 scaleBaseMV( m_layerId - 1, pcMvFieldNeighbours[(iCount<<1)+1], cMvFieldBaseColCU[1] );2598 }2599 2600 if( puhInterDirNeighbours[iCount] > 0 )2601 {2602 if ( mrgCandIdx == iCount )2603 {2604 return;2605 }2606 iCount ++;2607 }2608 }2609 }2610 }2611 #endif2612 2558 2613 2559 //left … … 2623 2569 Bool isAvailableA1 = pcCULeft && 2624 2570 pcCULeft->isDiffMER(xP -1, yP+nPSH-1, xP, yP) && 2625 #if SVC_MVP2626 ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCULeft->hasEqualMotion( uiLeftPartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0])) &&2627 #endif2628 2571 !( uiPUIdx == 1 && (cCurPS == SIZE_Nx2N || cCurPS == SIZE_nLx2N || cCurPS == SIZE_nRx2N) ) && 2629 2572 !pcCULeft->isIntra( uiLeftPartIdx ) ; … … 2662 2605 #endif 2663 2606 Bool isAvailableB1 = pcCUAbove && 2664 #if SVC_MVP2665 ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0] )) &&2666 #endif2667 2607 pcCUAbove->isDiffMER(xP+nPSW-1, yP-1, xP, yP) && 2668 2608 !( uiPUIdx == 1 && (cCurPS == SIZE_2NxN || cCurPS == SIZE_2NxnU || cCurPS == SIZE_2NxnD) ) && … … 2702 2642 #endif 2703 2643 Bool isAvailableB0 = pcCUAboveRight && 2704 #if SVC_MVP && !IL_MRG_SIMPLIFIED_PRUNING2705 ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCUAboveRight->hasEqualMotion( uiAboveRightPartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0] )) &&2706 #endif2707 2644 pcCUAboveRight->isDiffMER(xP+nPSW, yP-1, xP, yP) && 2708 2645 !pcCUAboveRight->isIntra( uiAboveRightPartIdx ); … … 2731 2668 2732 2669 //left bottom 2733 #if SVC_MVP2734 if( iCount < 4 )2735 {2736 #endif2737 2670 UInt uiLeftBottomPartIdx = 0; 2738 2671 TComDataCU* pcCULeftBottom = 0; … … 2746 2679 Bool isAvailableA0 = pcCULeftBottom && 2747 2680 pcCULeftBottom->isDiffMER(xP-1, yP+nPSH, xP, yP) && 2748 #if SVC_MVP && !IL_MRG_SIMPLIFIED_PRUNING2749 ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCULeftBottom->hasEqualMotion( uiLeftBottomPartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0])) &&2750 #endif2751 2681 !pcCULeftBottom->isIntra( uiLeftBottomPartIdx ) ; 2752 2682 if ( isAvailableA0 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCULeftBottom, uiLeftBottomPartIdx ) ) ) … … 2772 2702 return; 2773 2703 } 2774 #if SVC_MVP2775 }2776 #endif2777 2704 2778 2705 // above left … … 2790 2717 Bool isAvailableB2 = pcCUAboveLeft && 2791 2718 pcCUAboveLeft->isDiffMER(xP-1, yP-1, xP, yP) && 2792 #if SVC_MVP && !IL_MRG_SIMPLIFIED_PRUNING2793 ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCUAboveLeft->hasEqualMotion( uiAboveLeftPartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0] )) &&2794 #endif2795 2719 !pcCUAboveLeft->isIntra( uiAboveLeftPartIdx ); 2796 2720 if ( isAvailableB2 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) ) … … 3669 3593 if (scaleFactor > 0) 3670 3594 { 3671 #if SVC_MVP3672 m_acCUMvField[0].compress(m_pePredMode, m_puhInterDir, scaleFactor);3673 m_acCUMvField[1].compress(m_pePredMode, m_puhInterDir, scaleFactor);3674 #else3675 3595 m_acCUMvField[0].compress(m_pePredMode, scaleFactor); 3676 3596 m_acCUMvField[1].compress(m_pePredMode, scaleFactor); 3677 #endif3678 3597 } 3679 3598 } … … 4304 4223 } 4305 4224 #endif 4306 4307 #if SVC_MVP4308 Bool TComDataCU::hasEqualMotion( UInt uiAbsPartIdx, UChar uchInterDir, TComMvField* pcMvField )4309 {4310 if ( getInterDir( uiAbsPartIdx ) != uchInterDir )4311 {4312 return false;4313 }4314 4315 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )4316 {4317 if ( getInterDir( uiAbsPartIdx ) & ( 1 << uiRefListIdx ) )4318 {4319 if ( getCUMvField( RefPicList( uiRefListIdx ) )->getMv( uiAbsPartIdx ) != pcMvField[uiRefListIdx].getMv() ||4320 getCUMvField( RefPicList( uiRefListIdx ) )->getRefIdx( uiAbsPartIdx ) != pcMvField[uiRefListIdx].getRefIdx() )4321 {4322 return false;4323 }4324 }4325 }4326 4327 return true;4328 }4329 #endif4330 4331 4225 //! \} -
branches/SHM-3.0-dev/source/Lib/TLibCommon/TComDataCU.h
r313 r317 485 485 Void deriveLeftBottomIdxGeneral ( UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLB ); 486 486 487 #if SVC_MVP488 Bool hasEqualMotion ( UInt uiAbsPartIdx, UChar uchInterDir, TComMvField* pcMvField );489 #endif490 491 487 // ------------------------------------------------------------------------------------------------------------------- 492 488 // member functions for modes -
branches/SHM-3.0-dev/source/Lib/TLibCommon/TComMotionInfo.cpp
r313 r317 328 328 * \param scale Factor by which to subsample motion information 329 329 */ 330 #if SVC_MVP331 Void TComCUMvField::compress(Char* pePredMode, UChar* peInterDir, Int scale)332 #else333 330 Void TComCUMvField::compress(Char* pePredMode, Int scale) 334 #endif335 331 { 336 332 Int N = scale * scale; … … 351 347 pePredMode[ uiPartIdx + i ] = predMode; 352 348 m_piRefIdx[ uiPartIdx + i ] = iRefIdx; 353 #if SVC_MVP354 peInterDir[ uiPartIdx + i ] = peInterDir[ uiPartIdx ];355 #endif356 349 } 357 350 } -
branches/SHM-3.0-dev/source/Lib/TLibCommon/TComMotionInfo.h
r313 r317 158 158 } 159 159 160 #if SVC_MVP161 Void compress(Char* pePredMode, UChar* peInterDir, Int scale);162 #else163 160 Void compress(Char* pePredMode, Int scale); 164 #endif165 161 166 162 #if REF_IDX_MFM -
branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h
r316 r317 120 120 #define INTRA_BL_DST4x4 1 ///< L0067/L0204: DST4x4 for Intra BL 121 121 #define NO_RESIDUAL_FLAG_FOR_BLPRED 1 ///< L0437: Root cbf for Intra_BL 122 #define IL_MRG_SIMPLIFIED_PRUNING 1 ///< M0124: simplified pruning, Only the left and above candidates are checked with BL-C candidate for redundancy removal123 122 #define INTRA_BL_CTX_CHANGE 1 ///< M0075: spatial dependency removal for IntraBL flag context derivation 124 125 // Hooks126 #define SVC_MVP 1 ///< motion hook for merge mode as an example127 123 128 124 #endif
Note: See TracChangeset for help on using the changeset viewer.