Changeset 169 in 3DVCSoftware
- Timestamp:
- 7 Nov 2012, 18:49:55 (12 years ago)
- Location:
- branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/CommonDef.h
r127 r169 139 139 #define PDM_NO_INTER_UPDATE 1 // no update for inter (but not inter-view) predicted blocks 140 140 #define PDM_MERGE_POS 0 // position of pdm in merge list (0..4) 141 142 #if QC_MRG_CANS_B0048 143 #if OL_DISMV_POS_B0069 144 #define DMV_MERGE_POS 4 145 #else 146 #define DMV_MERGE_POS 1 147 #endif 148 #endif 149 141 150 #if SAIT_IMPROV_MOTION_PRED_M24829&!QC_MULTI_DIS_CAN 142 151 #define PDM_AMVP_POS 0 // position of pdm in amvp list (0..3) -
branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp
r167 r169 3500 3500 3501 3501 //===== add merge with predicted depth maps ===== 3502 #if QC_MRG_CANS_B0048 3503 TComMv acPdmMv [4]; 3504 Int aiPdmRefIdx [4] = {-1, -1, -1, -1}; 3505 Bool bLeftAvai = false; 3506 #if OL_DISMV_POS_B0069 3507 Int iPosLeftAbove[2] = {-1, -1}; 3508 #endif 3509 #else 3502 3510 TComMv acPdmMv [2]; 3503 3511 Int aiPdmRefIdx [2] = {-1, -1}; 3512 #endif 3504 3513 3505 3514 #if LGE_DVMCP 3515 #if QC_MRG_CANS_B0048 3516 acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = acPdmMv[2].m_bDvMcp = acPdmMv[3].m_bDvMcp = false; 3517 #else 3506 3518 acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = false; 3519 #endif 3507 3520 #endif 3508 3521 … … 3534 3547 cDisInfo.m_aVIdxCan[0] = 0; 3535 3548 } 3536 Int iPdmInterDir = cDisInfo.iN==0? 0:getPdmMergeCandidateDisCan ( uiPUIdx, aiPdmRefIdx, acPdmMv, &cDisInfo ); 3549 #if QC_MRG_CANS_B0048 3550 Int iPdmDir[2] = {0, 0}; 3551 #endif 3552 Int iPdmInterDir = cDisInfo.iN==0? 0:getPdmMergeCandidateDisCan ( uiPUIdx, aiPdmRefIdx, acPdmMv, &cDisInfo 3553 #if QC_MRG_CANS_B0048 3554 , iPdmDir 3555 #endif 3556 ); 3537 3557 #else 3538 3558 Int iPdmInterDir = getPdmMergeCandidate( uiPUIdx, aiPdmRefIdx, acPdmMv ); 3539 3559 #endif 3540 3560 #if QC_MRG_CANS_B0048 3561 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 0 ) 3562 #else 3541 3563 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 0 ) 3564 #endif 3542 3565 { 3543 3566 abCandIsInter [ iCount ] = true; 3567 #if QC_MRG_CANS_B0048 3568 puhInterDirNeighbours[ iCount ] = iPdmDir[0]; 3569 iPdmInterDir = iPdmDir[0]; 3570 #else 3544 3571 puhInterDirNeighbours[ iCount ] = iPdmInterDir; 3572 #endif 3545 3573 if( ( iPdmInterDir & 1 ) == 1 ) 3546 3574 { … … 3573 3601 #endif 3574 3602 3603 #if QC_MRG_CANS_B0048 3604 if(extraMergeCand) 3605 { 3606 if(!bNoPdmMerge && iPdmDir[1] && DMV_MERGE_POS == 1) 3607 { 3608 assert(iCount < MRG_MAX_NUM_CANDS_MEM); 3609 abCandIsInter [ iCount ] = true; 3610 puhInterDirNeighbours[ iCount ] = iPdmDir[1]; 3611 if( ( iPdmDir[1] & 1 ) == 1 ) 3612 { 3613 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 2 ], aiPdmRefIdx[ 2 ] ); 3614 } 3615 if( ( iPdmDir[1] & 2 ) == 2 ) 3616 { 3617 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 3 ], aiPdmRefIdx[ 3 ] ); 3618 } 3619 #if LGE_DVMCP 3620 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 3621 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; 3622 #endif 3623 #if SIMP_MRG_PRUN 3624 if ( mrgCandIdx == iCount ) 3625 return; 3626 #endif 3627 iCount ++; 3628 } 3629 } 3630 #endif 3575 3631 //left 3576 3632 UInt uiLeftPartIdx = 0; … … 3610 3666 } 3611 3667 #endif 3668 #if QC_MRG_CANS_B0048 3669 Bool bRemoveSpa = false; //prunign to inter-view candidates 3670 Int iCnloop = iCount - 1; 3671 for(; iCnloop >= 0; iCnloop --) 3672 { 3673 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 3674 { 3675 bRemoveSpa = true; 3676 abCandIsInter [ iCount ] = false; 3677 } 3678 } 3679 if(!bRemoveSpa) 3680 { 3681 bLeftAvai = true; 3682 #if OL_DISMV_POS_B0069 3683 iPosLeftAbove[0] = iCount; 3684 #endif 3685 #endif 3612 3686 #if LGE_DVMCP 3613 3687 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; … … 3621 3695 #endif 3622 3696 iCount ++; 3697 #if QC_MRG_CANS_B0048 3698 } 3699 #endif 3623 3700 } 3624 3701 } 3625 3702 3626 3703 #if HHI_INTER_VIEW_MOTION_PRED 3704 #if QC_MRG_CANS_B0048 3705 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 1 ) 3706 #else 3627 3707 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 1 ) 3708 #endif 3628 3709 { 3629 3710 abCandIsInter [ iCount ] = true; … … 3704 3785 } 3705 3786 #endif 3787 #if QC_MRG_CANS_B0048 3788 Bool bRemoveSpa = false; //prunign to inter-view candidates 3789 Int iCnloop = bLeftAvai? (iCount-2): (iCount-1); 3790 for(; iCnloop >= 0; iCnloop --) 3791 { 3792 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 3793 { 3794 bRemoveSpa = true; 3795 abCandIsInter [ iCount ] = false; 3796 } 3797 } 3798 if(!bRemoveSpa) 3799 { 3800 #if OL_DISMV_POS_B0069 3801 iPosLeftAbove[1] = iCount; 3802 #endif 3803 #endif 3706 3804 #if LGE_DVMCP 3707 3805 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; … … 3715 3813 #endif 3716 3814 iCount ++; 3815 #if QC_MRG_CANS_B0048 3816 } 3817 #endif 3717 3818 } 3718 3819 #if !SIMP_MRG_PRUN … … 3721 3822 3722 3823 #if HHI_INTER_VIEW_MOTION_PRED 3824 #if QC_MRG_CANS_B0048 3825 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 2 ) 3826 #else 3723 3827 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 2 ) 3828 #endif 3724 3829 { 3725 3830 abCandIsInter [ iCount ] = true; … … 3807 3912 3808 3913 #if HHI_INTER_VIEW_MOTION_PRED 3914 #if QC_MRG_CANS_B0048 3915 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 3 ) 3916 #else 3809 3917 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 3 ) 3918 #endif 3810 3919 { 3811 3920 abCandIsInter [ iCount ] = true; … … 3841 3950 #endif 3842 3951 3952 #if OL_DISMV_POS_B0069 3953 if(extraMergeCand) 3954 { 3955 if(!bNoPdmMerge && iPdmDir[1] && DMV_MERGE_POS == 4) 3956 { 3957 assert(iCount < MRG_MAX_NUM_CANDS_MEM); 3958 Bool bRemoveSpa = false; //prunign to A1, B1 3959 abCandIsInter [ iCount ] = true; 3960 puhInterDirNeighbours[ iCount ] = iPdmDir[1]; 3961 if( ( iPdmDir[1] & 1 ) == 1 ) 3962 { 3963 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 2 ], aiPdmRefIdx[ 2 ] ); 3964 } 3965 if( ( iPdmDir[1] & 2 ) == 2 ) 3966 { 3967 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 3 ], aiPdmRefIdx[ 3 ] ); 3968 } 3969 for(Int i = 0; i < 2; i ++) 3970 { 3971 Int iCnloop = iPosLeftAbove[i]; 3972 if(iCnloop == -1) 3973 continue; 3974 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 3975 { 3976 bRemoveSpa = true; 3977 abCandIsInter [ iCount ] = false; 3978 } 3979 } 3980 if(!bRemoveSpa) 3981 { 3982 #if LGE_DVMCP 3983 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 3984 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; 3985 #endif 3986 #if SIMP_MRG_PRUN 3987 if ( mrgCandIdx == iCount ) 3988 return; 3989 #endif 3990 iCount ++; 3991 } 3992 } 3993 } 3994 #endif 3843 3995 //left bottom 3844 3996 UInt uiLeftBottomPartIdx = 0; … … 3893 4045 3894 4046 #if HHI_INTER_VIEW_MOTION_PRED 4047 #if QC_MRG_CANS_B0048 4048 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 4 ) 4049 #else 3895 4050 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 4 ) 4051 #endif 3896 4052 { 3897 4053 abCandIsInter [ iCount ] = true; … … 3988 4144 } 3989 4145 3990 if ( getSlice()->getPPS()->getEnableTMVPFlag() ) 4146 if ( getSlice()->getPPS()->getEnableTMVPFlag() 4147 #if QC_MRG_CANS_B0048 4148 && iCount < (MRG_MAX_NUM_CANDS_SIGNALED + extraMergeCand) 4149 #endif 4150 ) 3991 4151 { 3992 4152 // col [2] … … 7441 7601 #else 7442 7602 Int 7443 TComDataCU::getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ) 7603 TComDataCU::getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo 7604 #if QC_MRG_CANS_B0048 7605 , Int* iPdm 7606 #endif 7607 ) 7444 7608 { 7445 7609 TComDepthMapGenerator* pcDepthMapGenerator = m_pcSlice->getSPS()->getDepthMapGenerator(); 7446 7610 ROFRS( pcDepthMapGenerator, 0 ); 7447 return pcDepthMapGenerator->getPdmMergeCandidate( this, uiPartIdx, paiPdmRefIdx, pacPdmMv, pDInfo ); 7611 return pcDepthMapGenerator->getPdmMergeCandidate( this, uiPartIdx, paiPdmRefIdx, pacPdmMv, pDInfo 7612 #if QC_MRG_CANS_B0048 7613 , iPdm 7614 #endif 7615 ); 7448 7616 } 7449 7617 Bool -
branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TComDataCU.h
r167 r169 535 535 #else 536 536 Bool getPdmMvPredDisCan( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge = false ); 537 Int getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ); 537 Int getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo 538 #if QC_MRG_CANS_B0048 539 , Int* iPdm 540 #endif 541 ); 538 542 Void getDisMvpCand ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo ); 539 543 #if LGE_DVMCP -
branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TComDepthMapGenerator.cpp
r100 r169 607 607 #if QC_MULTI_DIS_CAN 608 608 Int 609 TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ) 609 TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo 610 #if QC_MRG_CANS_B0048 611 , Int* iPdm 612 #endif 613 ) 610 614 #else 611 615 Int … … 626 630 ROTRS( !bPdmMerge, 0 ); 627 631 632 #if QC_MRG_CANS_B0048 633 Bool abPdmAvailable[4] = {false, false, false, false}; 634 #else 628 635 Bool abPdmAvailable[2] = {false,false}; 636 #endif 629 637 630 638 Int iValid = 0; … … 725 733 } 726 734 Int iPdmInterDir = ( abPdmAvailable[0] ? 1 : 0 ) + ( abPdmAvailable[1] ? 2 : 0 ); 727 735 #if QC_MRG_CANS_B0048 736 iPdm[0] = iPdmInterDir; 737 #else 728 738 if (iPdmInterDir == 0) 729 739 { 740 #endif 730 741 for( Int iRefListId = 0; iRefListId < 2 ; iRefListId++ ) 731 742 { … … 736 747 if( pcSlice->getRefPOC( eRefPicList, iPdmRefIdx ) == pcSlice->getPOC()) 737 748 { 749 #if QC_MRG_CANS_B0048 750 abPdmAvailable[ iRefListId+2 ] = true; 751 paiPdmRefIdx [ iRefListId+2 ] = iPdmRefIdx; 752 #else 738 753 abPdmAvailable[ iRefListId ] = true; 739 754 paiPdmRefIdx [ iRefListId ] = iPdmRefIdx; 755 #endif 740 756 #if QC_MULTI_DIS_CAN 741 757 TComMv cMv = pDInfo->m_acMvCand[0]; … … 745 761 #endif 746 762 pcCU->clipMv( cMv ); 763 #if QC_MRG_CANS_B0048 764 pacPdmMv [ iRefListId + 2] = cMv; 765 #else 747 766 pacPdmMv [ iRefListId ] = cMv; 767 #endif 748 768 break; 749 769 } 750 770 } 751 771 } 772 #if QC_MRG_CANS_B0048 773 iPdmInterDir = ( abPdmAvailable[2] ? 1 : 0 ) + ( abPdmAvailable[3] ? 2 : 0 ) ; 774 iPdm[1] = iPdmInterDir; 775 #else 752 776 iPdmInterDir = ( abPdmAvailable[0] ? 1 : 0 ) + ( abPdmAvailable[1] ? 2 : 0 ) ; 753 777 } 778 #endif 754 779 755 780 return iPdmInterDir; -
branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TComDepthMapGenerator.h
r100 r169 152 152 #if HHI_INTER_VIEW_MOTION_PRED 153 153 #if QC_MULTI_DIS_CAN 154 Int getPdmMergeCandidate ( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ); 154 Int getPdmMergeCandidate ( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo 155 #if QC_MRG_CANS_B0048 156 , Int* iPdm 157 #endif 158 ); 159 155 160 Bool getPdmMvPredDisCan ( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge ); 156 161 Bool getDisCanPdmMvPred ( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge ); -
branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TComMotionInfo.h
r100 r169 94 94 Int getHor () const { return m_acMv.getHor(); } 95 95 Int getVer () const { return m_acMv.getVer(); } 96 #if QC_MRG_CANS_B0048 97 Bool operator== ( const TComMvField& rcMv ) const 98 { 99 return (m_acMv.getHor()==rcMv.getHor() && m_acMv.getVer()==rcMv.getVer() && m_iRefIdx == rcMv.getRefIdx()); 100 } 101 #endif 96 102 }; 97 103 -
branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TypeDef.h
r167 r169 75 75 #define QC_MULTI_DIS_CAN 1 // JCT2-A0097 76 76 #if QC_MULTI_DIS_CAN 77 #define DIS_CANS177 #define DIS_CANS 1 78 78 #endif 79 79 #define QC_SIMPLE_NBDV_B0047 1 //JCT2-B0047 80 #define QC_MRG_CANS_B0048 1 //JCT2-B0048, B0086, B0069 81 #if QC_MRG_CANS_B0048 82 #define OL_DISMV_POS_B0069 1 //different pos for dispairty MV candidate, B0069 83 #endif 80 84 #define MTK_INTERVIEW_MERGE_A0049 1 // JCT2-A0049 second part 81 85 #define SHARP_INTERVIEW_DECOUPLE_B0111 1 // JCT3V-B0111 decoupling inter-view candidate
Note: See TracChangeset for help on using the changeset viewer.