Changeset 185 in 3DVCSoftware for branches/HTM-4.1-dev0/source/Lib/TLibCommon
- Timestamp:
- 14 Nov 2012, 20:45:12 (12 years ago)
- Location:
- branches/HTM-4.1-dev0/source/Lib/TLibCommon
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.1-dev0/source/Lib/TLibCommon/CommonDef.h
r127 r185 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-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r181 r185 3664 3664 3665 3665 //===== add merge with predicted depth maps ===== 3666 #if QC_MRG_CANS_B0048 3667 TComMv acPdmMv [4]; 3668 Int aiPdmRefIdx [4] = {-1, -1, -1, -1}; 3669 Bool bLeftAvai = false; 3670 #if OL_DISMV_POS_B0069 3671 Int iPosLeftAbove[2] = {-1, -1}; 3672 #endif 3673 #else 3666 3674 TComMv acPdmMv [2]; 3667 3675 Int aiPdmRefIdx [2] = {-1, -1}; 3676 #endif 3668 3677 3669 3678 #if LGE_DVMCP 3679 #if QC_MRG_CANS_B0048 3680 acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = acPdmMv[2].m_bDvMcp = acPdmMv[3].m_bDvMcp = false; 3681 #else 3670 3682 acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = false; 3683 #endif 3671 3684 #endif 3672 3685 … … 3677 3690 { 3678 3691 #if LGE_DVMCP 3679 getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo, true ); 3692 #if LGE_IVMP_PARALLEL_MERGE_B0136 && !QC_SIMPLE_NBDV_B0047 3693 getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo, true, REF_PIC_LIST_X, -1, true ); 3694 #else 3695 getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo 3696 #if LGE_IVMP_PARALLEL_MERGE_B0136==QC_SIMPLE_NBDV_B0047 3697 , 3698 true 3699 #endif 3700 ); 3701 #endif 3680 3702 #else 3681 3703 getDisMvpCand (uiPUIdx, uiAbsPartIdx, &cDisInfo ); … … 3689 3711 cDisInfo.m_aVIdxCan[0] = 0; 3690 3712 } 3691 Int iPdmInterDir = cDisInfo.iN==0? 0:getPdmMergeCandidateDisCan ( uiPUIdx, aiPdmRefIdx, acPdmMv, &cDisInfo ); 3713 #if QC_MRG_CANS_B0048 3714 Int iPdmDir[2] = {0, 0}; 3715 #endif 3716 Int iPdmInterDir = cDisInfo.iN==0? 0:getPdmMergeCandidateDisCan ( uiPUIdx, aiPdmRefIdx, acPdmMv, &cDisInfo 3717 #if QC_MRG_CANS_B0048 3718 , iPdmDir 3719 #endif 3720 ); 3692 3721 #else 3693 3722 Int iPdmInterDir = getPdmMergeCandidate( uiPUIdx, aiPdmRefIdx, acPdmMv ); 3694 3723 #endif 3695 3724 #if QC_MRG_CANS_B0048 3725 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 0 ) 3726 #else 3696 3727 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 0 ) 3728 #endif 3697 3729 { 3698 3730 abCandIsInter [ iCount ] = true; 3731 #if QC_MRG_CANS_B0048 3732 puhInterDirNeighbours[ iCount ] = iPdmDir[0]; 3733 iPdmInterDir = iPdmDir[0]; 3734 #else 3699 3735 puhInterDirNeighbours[ iCount ] = iPdmInterDir; 3736 #endif 3700 3737 if( ( iPdmInterDir & 1 ) == 1 ) 3701 3738 { 3702 3739 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 3703 3740 } 3741 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 3742 else 3743 { 3744 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID ); 3745 } 3746 #endif 3704 3747 if( ( iPdmInterDir & 2 ) == 2 ) 3705 3748 { 3706 3749 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 3707 3750 } 3751 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 3752 else 3753 { 3754 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 3755 } 3756 #endif 3708 3757 #if SIMP_MRG_PRUN 3709 3758 if ( mrgCandIdx == iCount ) … … 3716 3765 #endif 3717 3766 3767 #if QC_MRG_CANS_B0048 3768 if(extraMergeCand) 3769 { 3770 if(!bNoPdmMerge && iPdmDir[1] && DMV_MERGE_POS == 1) 3771 { 3772 assert(iCount < MRG_MAX_NUM_CANDS_MEM); 3773 abCandIsInter [ iCount ] = true; 3774 puhInterDirNeighbours[ iCount ] = iPdmDir[1]; 3775 if( ( iPdmDir[1] & 1 ) == 1 ) 3776 { 3777 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 2 ], aiPdmRefIdx[ 2 ] ); 3778 } 3779 if( ( iPdmDir[1] & 2 ) == 2 ) 3780 { 3781 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 3 ], aiPdmRefIdx[ 3 ] ); 3782 } 3783 #if LGE_DVMCP 3784 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 3785 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; 3786 #endif 3787 #if SIMP_MRG_PRUN 3788 if ( mrgCandIdx == iCount ) 3789 return; 3790 #endif 3791 iCount ++; 3792 } 3793 } 3794 #endif 3718 3795 //left 3719 3796 UInt uiLeftPartIdx = 0; … … 3747 3824 pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3748 3825 } 3826 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 3827 else 3828 { 3829 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 3830 } 3831 #endif 3832 #if QC_MRG_CANS_B0048 3833 Bool bRemoveSpa = false; //prunign to inter-view candidates 3834 Int iCnloop = iCount - 1; 3835 for(; iCnloop >= 0; iCnloop --) 3836 { 3837 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 3838 { 3839 bRemoveSpa = true; 3840 abCandIsInter [ iCount ] = false; 3841 } 3842 } 3843 if(!bRemoveSpa) 3844 { 3845 bLeftAvai = true; 3846 #if OL_DISMV_POS_B0069 3847 iPosLeftAbove[0] = iCount; 3848 #endif 3849 #endif 3749 3850 #if LGE_DVMCP 3750 3851 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; … … 3758 3859 #endif 3759 3860 iCount ++; 3861 #if QC_MRG_CANS_B0048 3862 } 3863 #endif 3760 3864 } 3761 3865 } 3762 3866 3763 3867 #if HHI_INTER_VIEW_MOTION_PRED 3868 #if QC_MRG_CANS_B0048 3869 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 1 ) 3870 #else 3764 3871 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 1 ) 3872 #endif 3765 3873 { 3766 3874 abCandIsInter [ iCount ] = true; … … 3770 3878 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 3771 3879 } 3880 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 3881 else 3882 { 3883 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID ); 3884 } 3885 #endif 3772 3886 if( ( iPdmInterDir & 2 ) == 2 ) 3773 3887 { 3774 3888 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 3775 3889 } 3890 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 3891 else 3892 { 3893 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 3894 } 3895 #endif 3776 3896 #if SIMP_MRG_PRUN 3777 3897 if ( mrgCandIdx == iCount ) … … 3823 3943 pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3824 3944 } 3945 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 3946 else 3947 { 3948 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 3949 } 3950 #endif 3951 #if QC_MRG_CANS_B0048 3952 Bool bRemoveSpa = false; //prunign to inter-view candidates 3953 Int iCnloop = bLeftAvai? (iCount-2): (iCount-1); 3954 for(; iCnloop >= 0; iCnloop --) 3955 { 3956 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 3957 { 3958 bRemoveSpa = true; 3959 abCandIsInter [ iCount ] = false; 3960 } 3961 } 3962 if(!bRemoveSpa) 3963 { 3964 #if OL_DISMV_POS_B0069 3965 iPosLeftAbove[1] = iCount; 3966 #endif 3967 #endif 3825 3968 #if LGE_DVMCP 3826 3969 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; … … 3834 3977 #endif 3835 3978 iCount ++; 3979 #if QC_MRG_CANS_B0048 3980 } 3981 #endif 3836 3982 } 3837 3983 #if !SIMP_MRG_PRUN … … 3840 3986 3841 3987 #if HHI_INTER_VIEW_MOTION_PRED 3988 #if QC_MRG_CANS_B0048 3989 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 2 ) 3990 #else 3842 3991 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 2 ) 3992 #endif 3843 3993 { 3844 3994 abCandIsInter [ iCount ] = true; … … 3848 3998 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 3849 3999 } 4000 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4001 else 4002 { 4003 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID ); 4004 } 4005 #endif 3850 4006 if( ( iPdmInterDir & 2 ) == 2 ) 3851 4007 { 3852 4008 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 3853 4009 } 4010 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4011 else 4012 { 4013 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4014 } 4015 #endif 3854 4016 #if SIMP_MRG_PRUN 3855 4017 if ( mrgCandIdx == iCount ) … … 3894 4056 pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3895 4057 } 4058 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4059 else 4060 { 4061 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4062 } 4063 #endif 3896 4064 #if LGE_DVMCP 3897 4065 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; … … 3908 4076 3909 4077 #if HHI_INTER_VIEW_MOTION_PRED 4078 #if QC_MRG_CANS_B0048 4079 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 3 ) 4080 #else 3910 4081 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 3 ) 4082 #endif 3911 4083 { 3912 4084 abCandIsInter [ iCount ] = true; … … 3916 4088 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 3917 4089 } 4090 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4091 else 4092 { 4093 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID ); 4094 } 4095 #endif 3918 4096 if( ( iPdmInterDir & 2 ) == 2 ) 3919 4097 { 3920 4098 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 3921 4099 } 4100 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4101 else 4102 { 4103 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4104 } 4105 #endif 3922 4106 #if SIMP_MRG_PRUN 3923 4107 if ( mrgCandIdx == iCount ) … … 3930 4114 #endif 3931 4115 4116 #if OL_DISMV_POS_B0069 4117 if(extraMergeCand) 4118 { 4119 if(!bNoPdmMerge && iPdmDir[1] && DMV_MERGE_POS == 4) 4120 { 4121 assert(iCount < MRG_MAX_NUM_CANDS_MEM); 4122 Bool bRemoveSpa = false; //prunign to A1, B1 4123 abCandIsInter [ iCount ] = true; 4124 puhInterDirNeighbours[ iCount ] = iPdmDir[1]; 4125 if( ( iPdmDir[1] & 1 ) == 1 ) 4126 { 4127 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 2 ], aiPdmRefIdx[ 2 ] ); 4128 } 4129 if( ( iPdmDir[1] & 2 ) == 2 ) 4130 { 4131 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 3 ], aiPdmRefIdx[ 3 ] ); 4132 } 4133 for(Int i = 0; i < 2; i ++) 4134 { 4135 Int iCnloop = iPosLeftAbove[i]; 4136 if(iCnloop == -1) 4137 continue; 4138 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 4139 { 4140 bRemoveSpa = true; 4141 abCandIsInter [ iCount ] = false; 4142 } 4143 } 4144 if(!bRemoveSpa) 4145 { 4146 #if LGE_DVMCP 4147 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 4148 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; 4149 #endif 4150 #if SIMP_MRG_PRUN 4151 if ( mrgCandIdx == iCount ) 4152 return; 4153 #endif 4154 iCount ++; 4155 } 4156 } 4157 } 4158 #endif 3932 4159 //left bottom 3933 4160 UInt uiLeftBottomPartIdx = 0; … … 3962 4189 pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3963 4190 } 4191 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4192 else 4193 { 4194 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4195 } 4196 #endif 3964 4197 #if LGE_DVMCP 3965 4198 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; … … 3976 4209 3977 4210 #if HHI_INTER_VIEW_MOTION_PRED 4211 #if QC_MRG_CANS_B0048 4212 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 4 ) 4213 #else 3978 4214 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 4 ) 4215 #endif 3979 4216 { 3980 4217 abCandIsInter [ iCount ] = true; … … 3984 4221 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 3985 4222 } 4223 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4224 else 4225 { 4226 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID ); 4227 } 4228 #endif 3986 4229 if( ( iPdmInterDir & 2 ) == 2 ) 3987 4230 { 3988 4231 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 3989 4232 } 4233 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4234 else 4235 { 4236 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4237 } 4238 #endif 3990 4239 #if SIMP_MRG_PRUN 3991 4240 if ( mrgCandIdx == iCount ) … … 4039 4288 pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4040 4289 } 4290 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4291 else 4292 { 4293 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4294 } 4295 #endif 4041 4296 #if LGE_DVMCP 4042 4297 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; … … 4053 4308 } 4054 4309 4055 if ( getSlice()->getPPS()->getEnableTMVPFlag() ) 4310 if ( getSlice()->getPPS()->getEnableTMVPFlag() 4311 #if QC_MRG_CANS_B0048 4312 && iCount < (MRG_MAX_NUM_CANDS_SIGNALED + extraMergeCand) 4313 #endif 4314 ) 4056 4315 { 4057 4316 // col [2] … … 4153 4412 { 4154 4413 puhInterDirNeighbours[uiArrayAddr] = 1; 4414 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4415 pcMvFieldNeighbours[ ( uiArrayAddr << 1 ) + 1 ].setMvField( TComMv(0,0), NOT_VALID ); 4416 #endif 4155 4417 } 4156 4418 } … … 4158 4420 { 4159 4421 puhInterDirNeighbours[uiArrayAddr] = 1; 4422 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4423 pcMvFieldNeighbours[ ( uiArrayAddr << 1 ) + 1 ].setMvField( TComMv(0,0), NOT_VALID ); 4424 #endif 4160 4425 } 4161 4426 #if LGE_DVMCP … … 4395 4660 pcMvFieldNeighbours[(uiArrayAddr << 1) + 1].setMvField(TComMv(0, 0), r); 4396 4661 } 4662 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4663 else 4664 { 4665 pcMvFieldNeighbours[ ( uiArrayAddr << 1 ) + 1 ].setMvField( TComMv(0,0), NOT_VALID ); 4666 } 4667 #endif 4397 4668 uiArrayAddr++; 4398 4669 } … … 4959 5230 4960 5231 #if LGE_DVMCP 4961 Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo, Bool bMerge, RefPicList eRefPicList0, Int iRefIdx0 ) 5232 #if QC_SIMPLE_NBDV_B0047 5233 Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo 5234 #if LGE_IVMP_PARALLEL_MERGE_B0136 5235 , Bool bParMerge 5236 #endif 5237 #else 5238 Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo, Bool bMerge, RefPicList eRefPicList0, Int iRefIdx0 5239 #if LGE_IVMP_PARALLEL_MERGE_B0136 5240 , Bool bParMerge 5241 #endif 5242 #endif 5243 ) 4962 5244 { 4963 5245 PartSize eCUMode = getPartitionSize( uiPartAddr ); 4964 5246 TComDataCU* pcTmpCU = NULL; 5247 #if !QC_SIMPLE_NBDV_B0047 4965 5248 TComDataCU* pcCULeft = NULL; 5249 #endif 4966 5250 pDInfo->iN = 0; 4967 5251 … … 4971 5255 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 4972 5256 4973 Int aiDvMcpDvCand[2][7] = {{0,}, {0,}}; // dummy, 5 spatial + 1 temporal, DV-MCP ÁÖº¯ ºí·°¿¡¼ »ç¿ëµÈ DV¸¦ ÀúÀå 5257 #if QC_SIMPLE_NBDV_B0047 5258 const Int iNumofDvMCP = 7; 5259 Int aiDvMcpDvCand[2][iNumofDvMCP] = {{0,}, {0,}}; // dummy, 5 spatial + 1 temporal 5260 Bool abDvMcpFlag [2][iNumofDvMCP] = {{false,},{false,}}; 5261 #else 5262 Int aiDvMcpDvCand[2][7] = {{0,}, {0,}}; // dummy, 5 spatial + 1 temporal 4974 5263 Bool abDvMcpFlag [2][7] = {{false,},{false,}}; 4975 5264 //Int aiRefPOC [2][7] = {{-1,},{-1}}; // debug 5265 #endif 4976 5266 TComMv cTmpMvPred, cMv; 4977 5267 Bool bTmpIsSkipped = false; 4978 5268 Bool bDvMcpIsFound = false; 5269 #if LGE_DVMCP_MEM_REDUCTION_B0135 5270 Int iLCUAddrDiff = 0; 5271 #endif 5272 5273 #if LGE_IVMP_PARALLEL_MERGE_B0136 5274 Int xP, yP, nPSW, nPSH; 5275 if( bParMerge) 5276 this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH); 5277 #endif 4979 5278 4980 5279 deriveLeftRightTopIdxGeneral( eCUMode, uiPartAddr, uiPartIdx, uiPartIdxLT, uiPartIdxRT ); … … 4987 5286 pcTmpCU = getPULeft(uiIdx, uiPartIdxLB); 4988 5287 #endif 4989 5288 #if DV_DERIVATION_PARALLEL_B0096 5289 if ( uiPartIdx == 1 && (eCUMode == SIZE_Nx2N || eCUMode == SIZE_nLx2N || eCUMode == SIZE_nRx2N) ) 5290 { 5291 pcTmpCU = NULL; 5292 } 5293 #endif 5294 #if LGE_IVMP_PARALLEL_MERGE_B0136 5295 if (pcTmpCU && bParMerge) 5296 { 5297 if (!pcTmpCU->isDiffMER(xP -1, yP+nPSH-1, xP, yP)) 5298 { 5299 pcTmpCU = NULL; 5300 } 5301 } 5302 #endif 5303 5304 #if !QC_SIMPLE_NBDV_B0047 4990 5305 pcCULeft = pcTmpCU; 4991 5306 UInt uiLeftPartIdx = uiIdx; 5307 #endif 5308 4992 5309 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 4993 5310 { … … 5027 5344 pcTmpCU = getPUAbove(uiIdx, uiPartIdxRT); 5028 5345 #endif 5346 #if DV_DERIVATION_PARALLEL_B0096 5347 if ( uiPartIdx == 1 && (eCUMode == SIZE_2NxN || eCUMode == SIZE_2NxnU || eCUMode == SIZE_2NxnD) ) 5348 { 5349 pcTmpCU = NULL; 5350 } 5351 #endif 5352 #if LGE_IVMP_PARALLEL_MERGE_B0136 5353 if (pcTmpCU && bParMerge) 5354 { 5355 if (!pcTmpCU->isDiffMER(xP+nPSW-1, yP-1, xP, yP)) 5356 { 5357 pcTmpCU = NULL; 5358 } 5359 } 5360 #endif 5029 5361 5030 5362 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 5031 5363 { 5364 #if LGE_DVMCP_MEM_REDUCTION_B0135 5365 iLCUAddrDiff = getAddr() - pcTmpCU->getAddr(); 5366 #endif 5032 5367 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); 5033 5368 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 5046 5381 return; 5047 5382 } 5383 #if LGE_DVMCP_MEM_REDUCTION_B0135 5384 else if(iLCUAddrDiff == 0) //MCP, within same LCU 5385 #else 5048 5386 else // MCP 5387 #endif 5049 5388 { 5050 5389 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 5065 5404 pcTmpCU = getPUAboveRight(uiIdx, uiPartIdxRT, true, true, true); 5066 5405 #endif 5406 #if LGE_IVMP_PARALLEL_MERGE_B0136 5407 if (pcTmpCU && bParMerge) 5408 { 5409 if (!pcTmpCU->isDiffMER(xP+nPSW, yP-1, xP, yP)) 5410 { 5411 pcTmpCU = NULL; 5412 } 5413 } 5414 #endif 5415 5067 5416 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 5068 5417 { 5418 #if LGE_DVMCP_MEM_REDUCTION_B0135 5419 iLCUAddrDiff = getAddr() - pcTmpCU->getAddr(); 5420 #endif 5069 5421 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); 5070 5422 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 5083 5435 return; 5084 5436 } 5437 #if LGE_DVMCP_MEM_REDUCTION_B0135 5438 else if(iLCUAddrDiff == 0) 5439 #else 5085 5440 else // MCP 5441 #endif 5086 5442 { 5087 5443 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 5101 5457 #else 5102 5458 pcTmpCU = getPUBelowLeft(uiIdx, uiPartIdxLB); 5459 #endif 5460 #if LGE_IVMP_PARALLEL_MERGE_B0136 5461 if (pcTmpCU && bParMerge) 5462 { 5463 if (!pcTmpCU->isDiffMER(xP-1, yP+nPSH, xP, yP)) 5464 { 5465 pcTmpCU = NULL; 5466 } 5467 } 5103 5468 #endif 5104 5469 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) … … 5141 5506 pcTmpCU = getPUAboveLeft(uiIdx, uiPartIdxLT, true, true, true); 5142 5507 #endif 5508 #if LGE_IVMP_PARALLEL_MERGE_B0136 5509 if (pcTmpCU && bParMerge) 5510 { 5511 if (!pcTmpCU->isDiffMER(xP-1, yP-1, xP, yP)) 5512 { 5513 pcTmpCU = NULL; 5514 } 5515 } 5516 #endif 5517 5143 5518 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 5144 5519 { 5520 #if LGE_DVMCP_MEM_REDUCTION_B0135 5521 iLCUAddrDiff = getAddr() - pcTmpCU->getAddr(); 5522 #endif 5145 5523 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); 5146 5524 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 5159 5537 return; 5160 5538 } 5539 #if LGE_DVMCP_MEM_REDUCTION_B0135 5540 else if(iLCUAddrDiff <= 1) 5541 #else 5161 5542 else // MCP 5543 #endif 5162 5544 { 5163 5545 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 5176 5558 if ( getSlice()->getPPS()->getEnableTMVPFlag() ) 5177 5559 { 5560 #if !QC_SIMPLE_NBDV_B0047 5178 5561 UInt uiPUIdx = uiPartIdx; 5179 5562 UInt uiAbsPartAddr = uiPartAddr; … … 5333 5716 } 5334 5717 } 5718 #else 5719 TComMv cColMv; 5720 Int iTargetViewIdx = 0; 5721 Int iTStartViewIdx = 0; 5722 UInt uiPartIdxRB, uiBRIdx; 5723 Int uiViewIdxCurr= getSlice()->getViewId(); 5724 UInt uiPartIdxCenter; 5725 xDeriveCenterIdx( eCUMode, uiPartIdx, uiPartIdxCenter ); 5726 5727 Int uiLCUIdx = getAddr(); 5728 Int uiLCUnew = uiLCUIdx; 5729 eCUMode = getPartitionSize( 0 ); 5730 deriveRightBottomIdx( eCUMode, uiPartIdx, uiPartIdxRB ); 5731 uiBRIdx = uiPartIdxLT; 5732 UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB]; 5733 if ( (( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) < m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) &&(( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) < m_pcSlice->getSPS()->getPicHeightInLumaSamples() )) // image boundary check 5734 { 5735 if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) && // is not at the last column of LCU 5736 ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row of LCU 5737 { 5738 uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ]; 5739 } 5740 else if ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) // is not at the last column of LCU But is last row of LCU 5741 { 5742 uiBRIdx = g_auiRasterToZscan[ (uiAbsPartIdxTmp + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ]; 5743 uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU(); 5744 } 5745 else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU 5746 { 5747 uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ]; 5748 uiLCUnew = uiLCUIdx + 1; 5749 } 5750 else //is the right bottom corner of LCU 5751 { 5752 uiBRIdx = 0; 5753 uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU() + 1; 5754 } 5755 } 5756 const Int iNumofCandPic = 2; 5757 for(Int i =0; i < iNumofCandPic; i++) 5758 { 5759 Int lpRef=0; 5760 if(i == 0) 5761 { //check the col-located picture 5762 eRefPicList = RefPicList(getSlice()->isInterB() ? getSlice()->getColDir() : 0); 5763 #if COLLOCATED_REF_IDX 5764 lpRef = getSlice()->getColRefIdx(); 5765 #else 5766 Int lpRef = 0; 5767 #endif 5768 } 5769 else 5770 { 5771 if(!(getPic()->getRapbCheck())) 5772 break; 5773 eRefPicList=getPic()->getRapRefList(); 5774 lpRef=getPic()->getRapRefIdx(); 5775 } 5776 5777 if( m_pcSlice->getViewId() == getSlice()->getRefPic( eRefPicList, lpRef)->getViewId() ) 5778 { 5779 if (uiViewIdxCurr > 1) 5780 { 5781 if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) ) 5782 { 5783 clipMv(cColMv); 5784 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 5785 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 5786 return ; 5787 } 5788 } 5789 5790 if(xGetColDisMV( eRefPicList, lpRef, uiLCUIdx, uiPartIdxCenter, cColMv, iTargetViewIdx, iTStartViewIdx )) 5791 { 5792 clipMv(cColMv); 5793 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 5794 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 5795 return ; 5796 } 5797 if(uiViewIdxCurr == 1) 5798 { 5799 if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) ) 5800 { 5801 clipMv(cColMv); 5802 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 5803 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 5804 return ; 5805 } 5806 } 5807 } 5808 } 5809 #endif 5335 5810 } // if TMVP Flag 5336 5811 5337 5812 if( bDvMcpIsFound ) // skip dvmcp 5338 5813 { 5814 #if QC_SIMPLE_NBDV_B0047 5815 for( Int i=1 ; i<iNumofDvMCP-1 ; i++ ) // 5 spatial 5816 #else 5339 5817 for( Int i=1 ; i<7 ; i++ ) // 5 spatial + 1 temporal 5818 #endif 5340 5819 { 5341 5820 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 5353 5832 } 5354 5833 } 5355 5356 5834 return; 5357 5358 } 5359 #endif 5360 5835 } 5836 #endif 5361 5837 #endif 5362 5838 … … 5368 5844 * \param pInfo 5369 5845 */ 5846 #if SHARP_INTERVIEW_DECOUPLE_B0111 5847 Void TComDataCU::fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo, Int iMVPIdx) 5848 { 5849 if (!m_pcSlice->getSPS()->getViewId() || !m_pcSlice->getSPS()->getMultiviewMvPredMode()) 5850 { 5851 // HEVC 5852 fillMvpCandBase(uiPartIdx, uiPartAddr, eRefPicList, iRefIdx, pInfo); 5853 } 5854 else 5855 { 5856 if (iMVPIdx!=0) 5857 { 5858 // HEVC part 5859 fillMvpCandBase(uiPartIdx, uiPartAddr, eRefPicList, iRefIdx, pInfo); 5860 if (iRefIdx < 0) 5861 { 5862 return; 5863 } 5864 for (Int j = AMVP_MAX_NUM_CANDS - 1; j >= 0; j--) 5865 { 5866 pInfo->m_acMvCand[j+1] = pInfo->m_acMvCand[j]; 5867 } 5868 pInfo->iN++; 5869 } 5870 if (iMVPIdx<=0) 5871 { 5872 // extention part 5873 DisInfo cDisInfo; 5874 cDisInfo.iN = 0; 5875 #if LGE_DVMCP 5876 #if QC_SIMPLE_NBDV_B0047 5877 #if FIX_LGE_IVMP_PARALLEL_MERGE_B0136 5878 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false); 5879 #else 5880 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo); 5881 #endif 5882 #else 5883 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false, eRefPicList, iRefIdx ); 5884 #endif 5885 #else 5886 getDisMvpCand (uiPartIdx, uiPartAddr, &cDisInfo ); 5887 #endif 5888 if(cDisInfo.iN==0) 5889 { 5890 cDisInfo.iN = 1; 5891 cDisInfo.m_acMvCand[0].setHor(0); 5892 cDisInfo.m_acMvCand[0].setVer(0); 5893 cDisInfo.m_aVIdxCan[0] = 0; 5894 } 5895 TComMv cPdmMvPred; 5896 #if QC_MULTI_DIS_CAN 5897 if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) ) 5898 #else 5899 if( getPdmMvPred( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred ) ) 5900 #endif 5901 { 5902 clipMv( cPdmMvPred ); 5903 pInfo->m_acMvCand[0] = cPdmMvPred; 5904 } 5905 else 5906 { 5907 pInfo->m_acMvCand[0].set(0,0); 5908 } 5909 } 5910 } 5911 } 5912 5913 5914 Void TComDataCU::fillMvpCandBase( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ) 5915 #else 5370 5916 Void TComDataCU::fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ) 5917 #endif 5371 5918 { 5372 5919 PartSize eCUMode = getPartitionSize( 0 ); … … 5381 5928 } 5382 5929 5383 #if QC_MULTI_DIS_CAN 5930 #if QC_MULTI_DIS_CAN && !SHARP_INTERVIEW_DECOUPLE_B0111 5384 5931 DisInfo cDisInfo; 5385 5932 cDisInfo.iN = 0; … … 5387 5934 { 5388 5935 #if LGE_DVMCP 5936 #if QC_SIMPLE_NBDV_B0047 5937 #if FIX_LGE_IVMP_PARALLEL_MERGE_B0136 5938 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false); 5939 #else 5940 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo); 5941 #endif 5942 #else 5389 5943 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false, eRefPicList, iRefIdx ); 5944 #endif 5390 5945 #else 5391 5946 getDisMvpCand (uiPartIdx, uiPartAddr, &cDisInfo ); … … 5400 5955 } 5401 5956 #endif 5402 #if HHI_INTER_VIEW_MOTION_PRED 5957 #if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111 5403 5958 #if ( PDM_AMVP_POS == 0 ) 5404 5959 // get inter-view mv predictor (at position 0) … … 5459 6014 } 5460 6015 5461 #if HHI_INTER_VIEW_MOTION_PRED 6016 #if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111 5462 6017 #if ( PDM_AMVP_POS == 1 ) 5463 6018 // get inter-view mv predictor (at position 1) … … 5511 6066 } 5512 6067 5513 #if HHI_INTER_VIEW_MOTION_PRED 6068 #if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111 5514 6069 #if ( PDM_AMVP_POS == 2 ) 5515 6070 // get inter-view mv predictor (at position 2) … … 5535 6090 } 5536 6091 } 5537 #if QC_MULTI_DIS_CAN6092 #if QC_MULTI_DIS_CAN && !SHARP_INTERVIEW_DECOUPLE_B0111 5538 6093 if ( getSlice()->getViewId()!=0 && pInfo->iN == 3 ) 5539 6094 { … … 5609 6164 if ( uiLCUIdx >= 0 && xGetColMVP( eRefPicList, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx_Col ) ) 5610 6165 { 6166 #if FIX_LGE_DVMCP_B0133 6167 cColMv.m_bDvMcp = false; 6168 #endif 5611 6169 pInfo->m_acMvCand[pInfo->iN++] = cColMv; 5612 6170 } … … 5618 6176 if (xGetColMVP( eRefPicList, uiCurLCUIdx, uiPartIdxCenter, cColMv, iRefIdx_Col )) 5619 6177 { 6178 #if FIX_LGE_DVMCP_B0133 6179 cColMv.m_bDvMcp = false; 6180 #endif 5620 6181 pInfo->m_acMvCand[pInfo->iN++] = cColMv; 5621 6182 } … … 5624 6185 } 5625 6186 5626 #if HHI_INTER_VIEW_MOTION_PRED 6187 #if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111 5627 6188 #if ( PDM_AMVP_POS == 3 ) 5628 6189 // get inter-view mv predictor (at position 3) … … 5645 6206 #endif 5646 6207 5647 #if HHI_INTER_VIEW_MOTION_PRED 6208 #if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111 5648 6209 const Int iNumAMVPCands = AMVP_MAX_NUM_CANDS + ( getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 ); 5649 6210 if (pInfo->iN > iNumAMVPCands) … … 6067 6628 Bool TComDataCU::xGetColDisMV( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv , Int & iTargetViewIdx, Int & iStartViewIdx ) 6068 6629 { 6069 #if LGE_DVMCP 6630 #if LGE_DVMCP && !QC_SIMPLE_NBDV_B0047 6070 6631 Int iDvMcpDispX[2] = {-1,}; 6071 6632 Bool bDvMcpFlag [2] = { false, }; … … 6086 6647 return false; 6087 6648 } 6088 #if LGE_DVMCP 6649 #if LGE_DVMCP && !QC_SIMPLE_NBDV_B0047 6089 6650 Bool bColIsSkipped = pColCU->isSkipped( uiAbsPartAddr ); 6090 6651 #endif … … 6110 6671 if ( iColViewIdx == iColRefViewIdx ) // temporal vector 6111 6672 { 6112 #if LGE_DVMCP 6673 #if LGE_DVMCP && !QC_SIMPLE_NBDV_B0047 6113 6674 if( iColViewIdx >0 ) 6114 6675 { … … 6137 6698 } 6138 6699 6139 #if LGE_DVMCP 6700 #if LGE_DVMCP && !QC_SIMPLE_NBDV_B0047 6140 6701 for( Int ilist=0 ; ilist<2 ; ilist++ ) 6141 6702 { … … 7228 7789 #else 7229 7790 Int 7230 TComDataCU::getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ) 7791 TComDataCU::getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo 7792 #if QC_MRG_CANS_B0048 7793 , Int* iPdm 7794 #endif 7795 ) 7231 7796 { 7232 7797 TComDepthMapGenerator* pcDepthMapGenerator = m_pcSlice->getSPS()->getDepthMapGenerator(); 7233 7798 ROFRS( pcDepthMapGenerator, 0 ); 7234 return pcDepthMapGenerator->getPdmMergeCandidate( this, uiPartIdx, paiPdmRefIdx, pacPdmMv, pDInfo ); 7799 return pcDepthMapGenerator->getPdmMergeCandidate( this, uiPartIdx, paiPdmRefIdx, pacPdmMv, pDInfo 7800 #if QC_MRG_CANS_B0048 7801 , iPdm 7802 #endif 7803 ); 7235 7804 } 7236 7805 Bool … … 7271 7840 m_pePartSize[0] = SIZE_2Nx2N; 7272 7841 #if LGE_DVMCP 7842 #if QC_SIMPLE_NBDV_B0047 7843 #if FIX_LGE_IVMP_PARALLEL_MERGE_B0136 7844 getDisMvpCand2( 0, 0, &cDisInfo, false); 7845 #else 7846 getDisMvpCand2( 0, 0, &cDisInfo); 7847 #endif 7848 #else 7273 7849 getDisMvpCand2( 0, 0, &cDisInfo, true ); 7850 #endif 7274 7851 #else 7275 7852 getDisMvpCand ( 0, 0, &cDisInfo ); -
branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComDataCU.h
r181 r185 239 239 Bool m_bDecSubCu; ///< indicates decoder-mode 240 240 Double m_dTotalCost; ///< sum of partition RD costs 241 #if FIX_RDO_NEGDIST 242 Dist m_uiTotalDistortion; ///< sum of partition distortion 243 #else 241 244 UInt m_uiTotalDistortion; ///< sum of partition distortion 245 #endif 242 246 UInt m_uiTotalBits; ///< sum of partition bits 243 247 UInt m_uiTotalBins; ///< sum of partition bins … … 543 547 #else 544 548 Bool getPdmMvPredDisCan( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge = false ); 545 Int getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ); 549 Int getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo 550 #if QC_MRG_CANS_B0048 551 , Int* iPdm 552 #endif 553 ); 546 554 Void getDisMvpCand ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo ); 547 555 #if LGE_DVMCP 548 Void getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo, Bool bMerge=false, RefPicList eRefPicList=REF_PIC_LIST_X, Int iRefIdx=-1 ); 556 #if QC_SIMPLE_NBDV_B0047 557 Void getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo 558 #if LGE_IVMP_PARALLEL_MERGE_B0136 559 , Bool bParMerg = false 560 #endif 561 ); 562 #else 563 Void getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo, Bool bMerge=false, RefPicList eRefPicList=REF_PIC_LIST_X, Int iRefIdx=-1 564 #if LGE_IVMP_PARALLEL_MERGE_B0136 565 , Bool bParMerg = false 566 #endif 567 ); 568 #endif 549 569 #endif 550 570 … … 594 614 595 615 AMVP_MODE getAMVPMode ( UInt uiIdx ); 616 #if SHARP_INTERVIEW_DECOUPLE_B0111 617 Void fillMvpCandBase ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ); 618 Void fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo , Int iMVPIdx=-1); 619 #else 596 620 Void fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ); 621 #endif 597 622 #if PARALLEL_MERGE 598 623 Bool isDiffMER ( Int xN, Int yN, Int xP, Int yP); … … 717 742 718 743 Double& getTotalCost() { return m_dTotalCost; } 744 #if FIX_RDO_NEGDIST 745 Dist& getTotalDistortion() { return m_uiTotalDistortion; } 746 #else 719 747 UInt& getTotalDistortion() { return m_uiTotalDistortion; } 748 #endif 720 749 UInt& getTotalBits() { return m_uiTotalBits; } 721 750 UInt& getTotalNumPart() { return m_uiNumPartition; } -
branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComDepthMapGenerator.cpp
r100 r185 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-dev0/source/Lib/TLibCommon/TComDepthMapGenerator.h
r100 r185 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-dev0/source/Lib/TLibCommon/TComMotionInfo.h
r161 r185 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-dev0/source/Lib/TLibCommon/TComPic.cpp
r181 r185 84 84 m_bReduceBitsQTL = 0; 85 85 #endif 86 #if QC_SIMPLE_NBDV_B0047 87 m_bRapCheck = false; 88 m_eRapRefList = REF_PIC_LIST_0; 89 m_uiRapRefIdx = 0; 90 #endif 91 86 92 } 87 93 … … 483 489 } 484 490 } 491 #if QC_SIMPLE_NBDV_B0047 492 Bool TComPic::getDisCandRefPictures(Int iColPOC) 493 { 494 UInt uiTempLayerCurr=7; 495 TComSlice* currSlice = getCurrSlice(); 496 UInt iPOCCurr=currSlice->getPOC(); 497 UInt iPOCDiff = 255; 498 Bool bRAP=false; 499 Bool bCheck = false; 500 Int MaxRef = currSlice->getNumRefIdx(RefPicList(0)); 501 RefPicList eRefPicList = REF_PIC_LIST_0 ; 502 if(currSlice->isInterB()) 503 { 504 if(currSlice->getNumRefIdx(RefPicList(0))< currSlice->getNumRefIdx(RefPicList(1))) 505 MaxRef = currSlice->getNumRefIdx(RefPicList(1)); 506 } 507 for(Int lpRef = 0; lpRef < MaxRef; lpRef++) 508 { 509 for(Int lpNr = 0; lpNr < (currSlice->isInterB() ? 2: 1); lpNr ++) 510 { 511 eRefPicList = RefPicList(0); 512 if(currSlice->isInterB()) 513 eRefPicList = RefPicList(lpNr==0 ? (currSlice->getColDir()): (1-currSlice->getColDir())); 514 if(iColPOC == currSlice->getRefPOC(eRefPicList, lpRef)) 515 continue; 516 if(lpRef >= currSlice->getNumRefIdx(eRefPicList)||(currSlice->getViewId() != currSlice->getRefPic( eRefPicList, lpRef)->getViewId())) 517 continue; 518 Int iTempPoc = currSlice->getRefPic(eRefPicList, lpRef)->getPOC(); 519 UInt uiTempLayer = currSlice->getRefPic(eRefPicList, lpRef)->getCurrSlice()->getTLayer(); 520 Int iTempDiff = (iTempPoc > iPOCCurr) ? (iTempPoc - iPOCCurr): (iPOCCurr - iTempPoc); 521 bRAP = (currSlice->getRefPic(eRefPicList, lpRef)->getCurrSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV? 1:0); 522 if( bRAP) 523 { 524 bCheck = true; 525 this->setRapRefIdx(lpRef); 526 this->setRapRefList(eRefPicList); 527 return bCheck; 528 } 529 if(uiTempLayerCurr > uiTempLayer) 530 { 531 bCheck = true; 532 if(uiTempLayerCurr == uiTempLayer) 533 { 534 if(iPOCDiff > iTempDiff) 535 { 536 iPOCDiff=iTempDiff; 537 if(iPOCDiff < 255) 538 { 539 this->setRapRefIdx(lpRef); 540 this->setRapRefList(eRefPicList); 541 } 542 } 543 } 544 else 545 { 546 iPOCDiff=iTempDiff; 547 uiTempLayerCurr = uiTempLayer; 548 this->setRapRefIdx(lpRef); 549 this->setRapRefList(eRefPicList); 550 } 551 } 552 } 553 } 554 return bCheck; 555 } 556 #endif 485 557 486 558 #if HHI_INTERVIEW_SKIP -
branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComPic.h
r181 r185 82 82 Bool m_checked; 83 83 #endif 84 #if QC_SIMPLE_NBDV_B0047 85 UInt m_uiRapRefIdx; 86 RefPicList m_eRapRefList; 87 Bool m_bRapCheck; 88 #endif 84 89 #endif 85 90 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 172 177 #if HHI_INTER_VIEW_RESIDUAL_PRED 173 178 TComPicYuv* getResidual() { return m_pcResidual; } 179 #endif 180 #if QC_SIMPLE_NBDV_B0047 181 UInt getRapRefIdx() {return m_uiRapRefIdx;} 182 RefPicList getRapRefList() {return m_eRapRefList;} 183 Void setRapRefIdx(UInt uiRapRefIdx) {m_uiRapRefIdx = uiRapRefIdx;} 184 Void setRapRefList(RefPicList eRefPicList) {m_eRapRefList = eRefPicList;} 185 Bool getRapbCheck() {return m_bRapCheck;} 186 Void setRapbCheck(Bool bCheck) {m_bRapCheck = bCheck;} 187 Bool getDisCandRefPictures(Int iColPOC); 174 188 #endif 175 189 -
branches/HTM-4.1-dev0/source/Lib/TLibCommon/TypeDef.h
r183 r185 46 46 #define MTK_UNCONSTRAINED_MVI 1 //JCT3V-B0083 47 47 48 // A 48 49 #define FIXES 1 49 50 #define POZNAN_CABAC_INIT_FLAG_FIX 1 … … 60 61 61 62 63 // B 64 #define FIX_LGE_IVMP_PARALLEL_MERGE_B0136 1 65 #define TMVP_DEPTH_SWITCH 1 // related to JCT3V-B0092 66 #define FIX_RDO_NEGDIST 1 67 #define FIX_DMM_NEG_DIST 1 68 69 #define DV_DERIVATION_PARALLEL_B0096 1 //JCT3V-B0096, enable parallel derivation of disparity vector 70 62 71 #define LGE_EDGE_INTRA 1 // JCT2-A0070 63 72 #if LGE_EDGE_INTRA … … 80 89 #define DIS_CANS 1 81 90 #endif 82 91 #define QC_SIMPLE_NBDV_B0047 1 //JCT2-B0047 92 #define QC_MRG_CANS_B0048 1 //JCT2-B0048, B0086, B0069 93 #if QC_MRG_CANS_B0048 94 #define OL_DISMV_POS_B0069 1 //different pos for dispairty MV candidate, B0069 95 #endif 83 96 #define MTK_INTERVIEW_MERGE_A0049 1 // JCT2-A0049 second part 97 #define SHARP_INTERVIEW_DECOUPLE_B0111 1 // JCT3V-B0111 decoupling inter-view candidate 84 98 85 99 #define LGE_DVMCP 1 // JCT2-A0126 … … 92 106 #define DVFROM_COL 6 93 107 #endif 108 #define FIX_LGE_DVMCP_B0133 1 109 #define LGE_DVMCP_MEM_REDUCTION_B0135 1 94 110 95 111 … … 134 150 135 151 #define HHI_MPI 1 // motion parameter inheritance from texture picture for depth map coding 152 #if HHI_MPI 153 #define FIX_MPI_B0065 1 //JCT3V-B0065, fix the MPI bug when RQT is off 154 #endif 136 155 #define HHI_MPI_MERGE_POS 0 137 156 #define HHI_FULL_PEL_DEPTH_MAP_MV_ACC 1 // full-pel mv accuracy for depth maps … … 162 181 163 182 #define PARALLEL_MERGE 1 //< H0082 parallel merge/skip 183 #define LGE_IVMP_PARALLEL_MERGE_B0136 1 //< B0136 support of parallel merge/skip in disparity vector derivation 164 184 #define LOG2_PARALLEL_MERGE_LEVEL_MINUS2 0 //< H0082 parallel merge level 0-> 4x4, 1-> 8x8, 2->16x16, 3->32x32, 4->64x64 165 185 #if PARALLEL_MERGE && LOG2_PARALLEL_MERGE_LEVEL_MINUS2 166 186 #define CU_BASED_MRG_CAND_LIST 1 //< H0240: single merge candidate list for all PUs inside a 8x8 CU conditioned on LOG2_PARALLEL_MERGE_LEVEL_MINUS2 > 0 187 #define FIX_CU_BASED_MRG_CAND_LIST_B0136 1 //< B0136 bug fix for CU_BASED_MRG_CAND_LIST 167 188 #endif 168 189 #define MVP_AT_ENTROPYSLICE_BOUNDARY 1 //< H0362 enable motion prediction accross entropy slice boundary
Note: See TracChangeset for help on using the changeset viewer.