Changeset 332 in 3DVCSoftware
- Timestamp:
- 21 Apr 2013, 19:13:11 (12 years ago)
- Location:
- trunk/source
- Files:
-
- 47 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r296 r332 368 368 #endif 369 369 370 #if OL_QTLIMIT_PREDCODING_B0068370 #if H3D_QTL 371 371 ("QTLPC", m_bUseQTLPC , true , "Use depth Quadtree Limitation + Predictive Coding" ) 372 372 #endif … … 1695 1695 printf("WVSO:%d ", m_bUseWVSO ); 1696 1696 #endif 1697 #if OL_QTLIMIT_PREDCODING_B00681697 #if H3D_QTL 1698 1698 printf("QTLPC:%d ", m_bUseQTLPC); 1699 1699 #endif -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r296 r332 313 313 #endif 314 314 315 #if OL_QTLIMIT_PREDCODING_B0068315 #if H3D_QTL 316 316 Bool m_bUseQTLPC; ///< flag for using depth QuadTree Limitation + Predictive Coding 317 317 #endif -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r313 r332 357 357 m_acTEncTopList[iViewIdx]->setUseDMM ( false ); 358 358 #endif 359 #if OL_QTLIMIT_PREDCODING_B0068359 #if H3D_QTL 360 360 m_acTEncTopList[iViewIdx]->setUseQTLPC ( false ); 361 361 #endif … … 595 595 m_acTEncDepthTopList[iViewIdx]->setUseSAO ( m_abUseSAO[1] ); 596 596 #if LGE_ILLUCOMP_B0045 597 #if LGE_ILLUCOMP_DEPTH_C0046 598 m_acTEncDepthTopList[iViewIdx]->setUseIC ( m_abUseIC[1] ); 599 #else 597 600 m_acTEncDepthTopList[iViewIdx]->setUseIC ( false ); 601 #endif 598 602 #endif 599 603 #if INTER_VIEW_VECTOR_SCALING_C0115 … … 659 663 #endif 660 664 661 #if OL_QTLIMIT_PREDCODING_B0068665 #if H3D_QTL 662 666 m_acTEncDepthTopList[iViewIdx]->setUseQTLPC (m_bUseQTLPC); 663 667 #endif -
trunk/source/Lib/TLibCommon/CommonDef.h
r314 r332 140 140 #define PDM_MERGE_POS 0 // position of pdm in merge list (0..4) 141 141 142 #if H3D_IVMP143 #define DMV_MERGE_POS 4144 #else145 #define DMV_MERGE_POS 1146 #endif147 148 142 #if H3D_IVMP&!H3D_NBDV 149 143 #define PDM_AMVP_POS 0 // position of pdm in amvp list (0..3) -
trunk/source/Lib/TLibCommon/ContextTables.h
r296 r332 434 434 435 435 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 436 #if FIX_DMM_CTX_INIT_C0034437 436 static const UChar 438 #else439 static const Short440 #endif441 437 INIT_DMM_FLAG[3][NUM_DMM_FLAG_CTX] = 442 438 { … … 452 448 }; 453 449 454 #if FIX_DMM_CTX_INIT_C0034455 450 static const UChar 456 #else457 static const Short458 #endif459 451 INIT_DMM_MODE[3][NUM_DMM_MODE_CTX] = 460 452 { … … 470 462 }; 471 463 472 #if FIX_DMM_CTX_INIT_C0034473 464 static const UChar 474 #else475 static const Short476 #endif477 465 INIT_DMM_DATA[3][NUM_DMM_DATA_CTX] = 478 466 { -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r313 r332 3165 3165 } 3166 3166 3167 #if LG_RESTRICTEDRESPRED_M247663167 #if H3D_IVRP 3168 3168 Void TComDataCU::getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx, Bool bLCU) 3169 3169 { … … 3250 3250 #endif 3251 3251 3252 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383253 Int TComDataCU::getResiPredMode(UInt uiPartAddr)3254 {3255 Int iAddResiShift = -1;3256 3257 for(UInt uiRefIdx = 0; uiRefIdx < 2; uiRefIdx++)3258 {3259 RefPicList eRefList = uiRefIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0;3260 Int iBestRefIdx = getCUMvField(eRefList)->getRefIdx(uiPartAddr);3261 if(iBestRefIdx >= 0 && getSlice()->getViewId() == getSlice()->getRefViewId(eRefList, iBestRefIdx))3262 iAddResiShift++;3263 }3264 3265 return iAddResiShift;3266 }3267 3268 Void TComDataCU::getPUResiPredShift(Int *iPUResiPredShift, UInt uiAbsPartIndex)3269 {3270 UInt uiPartSize = getPartitionSize(uiAbsPartIndex);3271 UInt uiPartAddr;3272 Int iWidth, iHeight;3273 Int iAddResiShift;3274 3275 if(uiPartSize == SIZE_2Nx2N)3276 {3277 iAddResiShift = getResiPredMode(uiAbsPartIndex);3278 for(UInt i = 0; i < 4; i++)3279 iPUResiPredShift[i] = (getSlice()->getPPS()->getUseWP() || getInterDir(uiAbsPartIndex) != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);3280 return;3281 }3282 3283 if(uiPartSize == SIZE_2NxN || uiPartSize == SIZE_2NxnU || uiPartSize == SIZE_2NxnD)3284 {3285 for(UInt i = 0; i < 2; i++)3286 {3287 getPartIndexAndSize(i, uiPartAddr, iWidth, iHeight, uiAbsPartIndex, true);3288 uiPartAddr += uiAbsPartIndex;3289 iAddResiShift = getResiPredMode(uiPartAddr);3290 iPUResiPredShift[2*i] = iPUResiPredShift[2*i+1] = (getSlice()->getPPS()->getUseWP() || getInterDir(uiPartAddr) != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);3291 }3292 return;3293 }3294 3295 if(uiPartSize == SIZE_Nx2N || uiPartSize == SIZE_nLx2N || uiPartSize == SIZE_nRx2N)3296 {3297 for(UInt i = 0; i < 2; i++)3298 {3299 getPartIndexAndSize(i, uiPartAddr, iWidth, iHeight, uiAbsPartIndex, true);3300 uiPartAddr += uiAbsPartIndex;3301 iAddResiShift = getResiPredMode(uiPartAddr);3302 iPUResiPredShift[i] = iPUResiPredShift[2+i] = (getSlice()->getPPS()->getUseWP() || getInterDir(uiPartAddr) != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);3303 }3304 return;3305 }3306 3307 if(uiPartSize == SIZE_NxN)3308 {3309 for(UInt i = 0; i < 4; i++)3310 {3311 getPartIndexAndSize(i, uiPartAddr, iWidth, iHeight, uiAbsPartIndex, true);3312 uiPartAddr += uiAbsPartIndex;3313 iAddResiShift = getResiPredMode(uiPartAddr);3314 iPUResiPredShift[i] = (getSlice()->getPPS()->getUseWP() || getInterDir(uiPartAddr) != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);3315 }3316 }3317 3318 }3319 #endif3320 3321 3252 Void TComDataCU::getMvField ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList, TComMvField& rcMvField ) 3322 3253 { … … 3653 3584 #endif //H3D_NBDV 3654 3585 3655 #if MTK_MDIVRP_C01383586 #if H3D_IVRP 3656 3587 Bool bDVAvail = true; 3657 3588 #endif … … 3668 3599 #if MERL_VSP_C0152 3669 3600 , true 3670 #endif 3601 #endif 3671 3602 ); 3672 3603 } … … 3693 3624 cDisInfo.m_acMvCand[0].setVer(0); 3694 3625 cDisInfo.m_aVIdxCan[0] = 0; 3695 #if MTK_MDIVRP_C01383626 #if H3D_IVRP 3696 3627 bDVAvail = false; 3697 3628 #endif … … 3748 3679 3749 3680 Int iPdmDir[2] = {0, 0}; 3750 #if QC_AMVP_MRG_UNIFY_IVCAN_C00513751 3681 getUnifiedMvPredCan(uiPUIdx, REF_PIC_LIST_0, 0, aiPdmRefIdx, acPdmMv, &cDisInfo, iPdmDir, true); 3752 3682 Int iPdmInterDir; 3753 #else3754 Int iPdmInterDir = cDisInfo.iN==0? 0:getPdmMergeCandidateDisCan ( uiPUIdx, aiPdmRefIdx, acPdmMv, &cDisInfo, iPdmDir );3755 #endif3756 3683 #else // H3D_NBDV 3757 3684 Int iPdmDir[2] = {0, 0}; … … 3760 3687 iPdmDir[1] = iPdmInterDir; 3761 3688 #endif // H3D_NBDV 3762 #if MTK_MDIVRP_C01383689 #if H3D_IVRP 3763 3690 if (m_pcSlice->getSPS()->getMultiviewResPredMode()==1 && iPdmDir[0] && !bNoPdmMerge && cCurPS == SIZE_2Nx2N && bDVAvail) 3764 3691 { … … 3767 3694 #endif 3768 3695 3769 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 0)3696 if( iPdmDir[0] && !bNoPdmMerge ) 3770 3697 { 3771 3698 abCandIsInter [ iCount ] = true; … … 3798 3725 } 3799 3726 iCount ++; 3800 } 3801 3802 if(extraMergeCand) 3803 { 3804 if(!bNoPdmMerge && iPdmDir[1] && DMV_MERGE_POS == 1) 3805 { 3806 assert(iCount < MRG_MAX_NUM_CANDS_MEM); 3807 abCandIsInter [ iCount ] = true; 3808 puhInterDirNeighbours[ iCount ] = iPdmDir[1]; 3809 if( ( iPdmDir[1] & 1 ) == 1 ) 3810 { 3811 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 2 ], aiPdmRefIdx[ 2 ] ); 3812 } 3813 if( ( iPdmDir[1] & 2 ) == 2 ) 3814 { 3815 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 3 ], aiPdmRefIdx[ 3 ] ); 3816 } 3817 #if H3D_NBDV 3818 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 3819 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; 3820 #endif 3821 if ( mrgCandIdx == iCount ) 3822 return; 3823 iCount ++; 3824 } 3825 } 3727 } 3728 3826 3729 #endif // H3D_IVMP 3827 3730 … … 3910 3813 } 3911 3814 3912 #if H3D_IVMP3913 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 1 )3914 {3915 abCandIsInter [ iCount ] = true;3916 puhInterDirNeighbours[ iCount ] = iPdmInterDir;3917 if( ( iPdmInterDir & 1 ) == 1 )3918 {3919 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] );3920 }3921 #if FIX_CU_BASED_MRG_CAND_LIST_B01363922 else3923 {3924 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID );3925 }3926 #endif3927 if( ( iPdmInterDir & 2 ) == 2 )3928 {3929 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] );3930 }3931 #if FIX_CU_BASED_MRG_CAND_LIST_B01363932 else3933 {3934 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID );3935 }3936 #endif3937 if ( mrgCandIdx == iCount )3938 {3939 return;3940 }3941 iCount ++;3942 }3943 #endif // H3D_IVMP3944 3945 #if MERL_VSP_COMPENSATION_C01523946 //===== vsp 1 =====3947 if( iCount < 4 + extraMergeCand )3948 if ( !xAddVspMergeCand(1, 1, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, iVSPIndexTrue, mrgCandIdx, &cDisInfo) )3949 return;3950 #endif3951 3952 3815 // above 3953 3816 UInt uiAbovePartIdx = 0; … … 4022 3885 } 4023 3886 4024 #if H3D_IVMP4025 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 2 )4026 {4027 abCandIsInter [ iCount ] = true;4028 puhInterDirNeighbours[ iCount ] = iPdmInterDir;4029 if( ( iPdmInterDir & 1 ) == 1 )4030 {4031 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] );4032 }4033 #if FIX_CU_BASED_MRG_CAND_LIST_B01364034 else4035 {4036 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID );4037 }4038 #endif4039 if( ( iPdmInterDir & 2 ) == 2 )4040 {4041 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] );4042 }4043 #if FIX_CU_BASED_MRG_CAND_LIST_B01364044 else4045 {4046 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID );4047 }4048 #endif4049 if ( mrgCandIdx == iCount )4050 {4051 return;4052 }4053 iCount ++;4054 }4055 #endif // H3D_IVMP4056 4057 #if MERL_VSP_COMPENSATION_C01524058 //===== vsp 2 =====4059 if( iCount < 4 + extraMergeCand )4060 if ( !xAddVspMergeCand(2, 1, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, iVSPIndexTrue, mrgCandIdx, &cDisInfo) )4061 return;4062 #endif4063 4064 3887 // above right 4065 3888 UInt uiAboveRightPartIdx = 0; … … 4109 3932 4110 3933 #if H3D_IVMP 4111 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 3 )4112 {4113 abCandIsInter [ iCount ] = true;4114 puhInterDirNeighbours[ iCount ] = iPdmInterDir;4115 if( ( iPdmInterDir & 1 ) == 1 )4116 {4117 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] );4118 }4119 #if FIX_CU_BASED_MRG_CAND_LIST_B01364120 else4121 {4122 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID );4123 }4124 #endif4125 if( ( iPdmInterDir & 2 ) == 2 )4126 {4127 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] );4128 }4129 #if FIX_CU_BASED_MRG_CAND_LIST_B01364130 else4131 {4132 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID );4133 }4134 #endif4135 if ( mrgCandIdx == iCount )4136 {4137 return;4138 }4139 iCount ++;4140 }4141 3934 4142 3935 if(extraMergeCand) 4143 3936 { 4144 if(!bNoPdmMerge && iPdmDir[1] && DMV_MERGE_POS == 4)3937 if(!bNoPdmMerge && iPdmDir[1] ) 4145 3938 { 4146 3939 assert(iCount < MRG_MAX_NUM_CANDS_MEM); … … 4187 3980 #endif // H3D_IVMP 4188 3981 4189 #if MERL_VSP_COMPENSATION_C01524190 //===== vsp 3 =====4191 if( iCount < 4 + extraMergeCand )4192 if ( !xAddVspMergeCand(3, 1, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, iVSPIndexTrue, mrgCandIdx, &cDisInfo) )4193 return;4194 #endif4195 4196 #if MERL_VSP_C01524197 #if VSP_MERGE_POS < 44198 #if H3D_IVMP4199 if( iCount < 4 + extraMergeCand )4200 #else4201 if( iCount < 4 )4202 #endif4203 {4204 #endif4205 #endif4206 3982 4207 3983 //left bottom … … 4250 4026 iCount ++; 4251 4027 } 4252 #if MERL_VSP_C0152 4253 #if VSP_MERGE_POS < 4 4254 } 4255 #endif 4256 #endif 4257 4258 #if H3D_IVMP 4259 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 4 ) 4260 { 4261 abCandIsInter [ iCount ] = true; 4262 puhInterDirNeighbours[ iCount ] = iPdmInterDir; 4263 if( ( iPdmInterDir & 1 ) == 1 ) 4264 { 4265 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 4266 } 4267 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4268 else 4269 { 4270 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID ); 4271 } 4272 #endif 4273 if( ( iPdmInterDir & 2 ) == 2 ) 4274 { 4275 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 4276 } 4277 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4278 else 4279 { 4280 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4281 } 4282 #endif 4283 if ( mrgCandIdx == iCount ) 4284 { 4285 return; 4286 } 4287 iCount ++; 4288 } 4289 #endif // H3D_IVMP 4290 4291 #if MERL_VSP_COMPENSATION_C0152 4292 //===== vsp 4 ===== 4293 if( iCount < 4 + extraMergeCand ) 4294 if ( !xAddVspMergeCand(4, 1, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, iVSPIndexTrue, mrgCandIdx, &cDisInfo) ) 4295 return; 4296 #endif 4028 4297 4029 4298 4030 // above left … … 5164 4896 5165 4897 #if MERL_VSP_C0152 5166 #if LGE_SIMP_DVP_REFINE_C0112 5167 Pel TComDataCU::getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec, Bool bSimpleDvpRefine) 5168 #else 5169 Pel TComDataCU::getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec) 5170 #endif 4898 Pel TComDataCU::getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iBlkWidth, Int iBlkHeight, Int* aiShiftLUT, Int iShiftPrec, Bool bSimpleDvpRefine) 5171 4899 { 5172 4900 Int depStride = pcBaseViewDepthPicYuv->getStride(); 5173 4901 5174 Int width = pcBaseViewDepthPicYuv->getWidth(); 5175 Int height = pcBaseViewDepthPicYuv->getHeight(); 5176 #if MTK_DVPREFINE_BVSP_BUG_FIX 5177 Int depthPosX = Clip3(0, width - iWidth, iBlkX + (mv->getHor()>>2)); 5178 Int depthPosY = Clip3(0, height - iHeight, iBlkY + (mv->getVer()>>2)); 5179 #else 5180 Int depthPosX = Clip3(0, width - iWidth - 1, iBlkX + (mv->getHor()>>2)); 5181 Int depthPosY = Clip3(0, height- iHeight - 1, iBlkY + (mv->getVer()>>2)); 5182 #endif 5183 Pel *depth = pcBaseViewDepthPicYuv->getLumaAddr() + depthPosX + depthPosY * depStride; 5184 Pel maxDepth = 0; 5185 #if LGE_SIMP_DVP_REFINE_C0112 4902 Int iPictureWidth = pcBaseViewDepthPicYuv->getWidth(); 4903 Int iPictureHeight = pcBaseViewDepthPicYuv->getHeight(); 4904 4905 Int depthPosX = Clip3(0, iPictureWidth - iBlkWidth, iBlkX + (mv->getHor()>>2)); 4906 Int depthPosY = Clip3(0, iPictureHeight- iBlkHeight, iBlkY + (mv->getVer()>>2)); 4907 4908 Pel *pDepthPel = pcBaseViewDepthPicYuv->getLumaAddr() + depthPosX + depthPosY * depStride; 4909 Pel maxDepthVal = 0; 4910 5186 4911 if ( bSimpleDvpRefine ) 5187 4912 { 5188 #if MTK_DVPREFINE_BVSP_BUG_FIX 5189 Int depthStartPosX = Clip3(0, width - iWidth, iBlkX + (mv->getHor()>>2)); 5190 Int depthStartPosY = Clip3(0, height - iHeight, iBlkY + (mv->getVer()>>2)); 5191 Int depthEndPosX = Clip3(0, width - 1, iBlkX + iWidth - 1 + (mv->getHor()>>2)); 5192 Int depthEndPosY = Clip3(0, height - 1, iBlkY + iHeight - 1 + (mv->getVer()>>2)); 5193 #else 5194 Int depthStartPosX = Clip3(0, width - iWidth - 1, iBlkX + (mv->getHor()>>2)); 5195 Int depthStartPosY = Clip3(0, height- iHeight - 1, iBlkY + (mv->getVer()>>2)); 5196 Int depthEndPosX = Clip3(0, width - iWidth - 1, iBlkX + iWidth + (mv->getHor()>>2)); 5197 Int depthEndPosY = Clip3(0, height- iHeight - 1, iBlkY + iHeight + (mv->getVer()>>2)); 5198 #endif 4913 Int depthStartPosX = Clip3(0, iPictureWidth - iBlkWidth, iBlkX + (mv->getHor()>>2)); 4914 Int depthStartPosY = Clip3(0, iPictureHeight- iBlkHeight, iBlkY + (mv->getVer()>>2)); 4915 Int depthEndPosX = Clip3(0, iPictureWidth - 1, iBlkX + iBlkWidth - 1 + (mv->getHor()>>2)); 4916 Int depthEndPosY = Clip3(0, iPictureHeight - 1, iBlkY + iBlkHeight - 1 + (mv->getVer()>>2)); 5199 4917 Int iCenterX = (depthStartPosX + depthEndPosX) >> 1; 5200 4918 Int iCenterY = (depthStartPosY + depthEndPosY) >> 1; … … 5209 4927 for (Int i = 0; i < 5; i++) 5210 4928 { 5211 if (maxDepth < aiDepth[i])5212 maxDepth = aiDepth[i];4929 if (maxDepthVal < aiDepth[i]) 4930 maxDepthVal = aiDepth[i]; 5213 4931 } 5214 4932 } 5215 4933 else 5216 4934 { 5217 for (Int j = 0; j < iHeight; j++) 5218 { 5219 for (Int i = 0; i < iWidth; i++) 5220 { 5221 if (maxDepth < depth[i]) 5222 maxDepth = depth[i]; 5223 } 5224 depth += depStride; 5225 } 5226 } 5227 #else 5228 for (Int j = 0; j < iHeight; j++) 5229 { 5230 for (Int i = 0; i < iWidth; i++) 5231 { 5232 if (maxDepth < depth[i]) 5233 maxDepth = depth[i]; 5234 } 5235 depth += depStride; 5236 } 5237 #endif 5238 Int disparity = aiShiftLUT[ maxDepth ] << iShiftPrec; 5239 5240 return disparity; 5241 } 5242 #if LGE_SIMP_DVP_REFINE_C0112 4935 for (Int j = 0; j < iBlkHeight; j++) 4936 { 4937 for (Int i = 0; i < iBlkWidth; i++) 4938 { 4939 if (maxDepthVal < pDepthPel[i]) 4940 maxDepthVal = pDepthPel[i]; 4941 } 4942 pDepthPel += depStride; 4943 } 4944 } 4945 4946 Int iDisp = aiShiftLUT[ maxDepthVal ] << iShiftPrec; 4947 4948 return iDisp; 4949 } 5243 4950 Void TComDataCU::estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred, Bool bSimpleDvpRefine) 5244 #else5245 Void TComDataCU::estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred)5246 #endif5247 4951 { 5248 4952 if (picDepth) … … 5257 4961 Int* aiShiftLUT; 5258 4962 Int iShiftPrec; 4963 5259 4964 getSlice()->getBWVSPLUTParam(aiShiftLUT, iShiftPrec); 5260 #if LGE_SIMP_DVP_REFINE_C0112 5261 Pel x = getMcpFromDM( pcBaseViewDepthPicYuv, cMvPred, iBlkX, iBlkY, iWidth, iHeight, aiShiftLUT, iShiftPrec, bSimpleDvpRefine ); 5262 #else 5263 Pel x = getMcpFromDM( pcBaseViewDepthPicYuv, cMvPred, iBlkX, iBlkY, iWidth, iHeight, aiShiftLUT, iShiftPrec); 5264 #endif 5265 cMvPred->setHor(x); 4965 4966 Pel iDisp = getMcpFromDM( pcBaseViewDepthPicYuv, cMvPred, iBlkX, iBlkY, iWidth, iHeight, aiShiftLUT, iShiftPrec, bSimpleDvpRefine ); 4967 cMvPred->setHor( iDisp ); 5266 4968 clipMv(*cMvPred); 5267 4969 } … … 5270 4972 5271 4973 #if H3D_NBDV 5272 Void TComDataCU::getDisMvpCandNBDV( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo , Bool bParMerge 4974 4975 Bool TComDataCU::xCheckSpatialNBDV( TComDataCU* pcTmpCU, UInt uiIdx, UInt uiPartIdx, UInt uiPartAddr, DisInfo* pNbDvInfo, Bool bSearchForMvpDv, McpDisInfo* paMvpDvInfo, UInt uiMvpDvPos, Bool bDepthRefine ) 4976 { 4977 if( pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 4978 { 4979 Bool bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); 4980 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) 4981 { 4982 RefPicList eRefPicList = RefPicList(iList); 4983 Int refId = pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ; 4984 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 4985 4986 if( refId >= 0) 4987 { 4988 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId ); 4989 if (refViewIdx != m_pcSlice->getViewId()) // DCP 4990 { 4991 clipMv(cMvPred); 4992 4993 TComPic* picDepth = getSlice()->getRefPicBaseDepth(); 4994 4995 if (picDepth && bDepthRefine) 4996 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true); 4997 4998 pNbDvInfo->m_acMvCand[ pNbDvInfo->iN ] = cMvPred; 4999 pNbDvInfo->m_aVIdxCan[ pNbDvInfo->iN++ ] = refViewIdx; 5000 5001 return true; 5002 } 5003 else if ( bSearchForMvpDv && cMvPred.m_bDvMcp && bTmpIsSkipped ) 5004 { 5005 assert( uiMvpDvPos < MCP_DIS_CANS ); 5006 paMvpDvInfo->m_acMvCand[iList][ uiMvpDvPos ] = TComMv( cMvPred.m_iDvMcpDispX, cMvPred.m_iDvMcpDispY ); 5007 paMvpDvInfo->m_aVIdxCan[iList][ uiMvpDvPos ] = 0; // works only for CTC 5008 paMvpDvInfo->m_bAvailab[iList][ uiMvpDvPos ] = true; 5009 paMvpDvInfo->m_bFound = true; 5010 } 5011 } 5012 #if MERL_VSP_C0152 5013 else if (pcTmpCU->getVSPIndex(uiIdx) != 0) // is VSP 5014 { 5015 TComPic* picDepth = pcTmpCU->getSlice()->getRefPicBaseDepth(); 5016 if (picDepth && bDepthRefine) 5017 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred); 5018 5019 cMvPred.setVer(0); 5020 5021 pNbDvInfo->m_acMvCand[ pNbDvInfo->iN] = cMvPred; 5022 pNbDvInfo->m_aVIdxCan[ pNbDvInfo->iN++] = 0; // refViewIdx; 5023 return true; 5024 } 5025 #endif 5026 } 5027 } 5028 return false; 5029 } 5030 5031 5032 Void TComDataCU::xDeriveRightBottomNbIdx( PartSize eCUMode, UInt uiPartIdx, Int &riLCUIdxRBNb, Int &riPartIdxRBNb ) 5033 { 5034 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 5035 Int uiLCUIdx = getAddr(); 5036 5037 UInt uiPartIdxRB; 5038 deriveRightBottomIdx( eCUMode, uiPartIdx, uiPartIdxRB ); 5039 UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB]; 5040 5041 if (( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() )>= m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) 5042 { 5043 riLCUIdxRBNb = -1; 5044 riPartIdxRBNb = -1; 5045 } 5046 else if(( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() )>= m_pcSlice->getSPS()->getPicHeightInLumaSamples() ) 5047 { 5048 riLCUIdxRBNb = -1; 5049 riPartIdxRBNb = -1; 5050 } 5051 else 5052 { 5053 if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) && // is not at the last column of LCU 5054 ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row of LCU 5055 { 5056 riPartIdxRBNb = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ]; 5057 riLCUIdxRBNb = uiLCUIdx; 5058 } 5059 else if ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) // is not at the last column of LCU But is last row of LCU 5060 { 5061 riPartIdxRBNb = -1; 5062 riLCUIdxRBNb = -1; 5063 } 5064 else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU 5065 { 5066 riPartIdxRBNb = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ]; 5067 riLCUIdxRBNb = uiLCUIdx + 1; 5068 } 5069 else //is the right bottom corner of LCU 5070 { 5071 riPartIdxRBNb = -1; 5072 riLCUIdxRBNb = -1; 5073 } 5074 } 5075 } 5076 5077 5078 Void TComDataCU::getDisMvpCandNBDV( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo , Bool bParMerge 5273 5079 #if MERL_VSP_C0152 5274 5080 , Bool bDepthRefine … … 5276 5082 ) 5277 5083 { 5278 PartSize eCUMode = getPartitionSize( uiPartAddr ); 5279 TComDataCU* pcTmpCU = NULL; 5280 pDInfo->iN = 0; 5281 5282 RefPicList eRefPicList = REF_PIC_LIST_0 ; 5283 //-- Get Spatial MV 5284 UInt uiPartIdxLT, uiPartIdxRT, uiPartIdxLB; 5285 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 5286 5287 const Int iNumofDvMCP = 7; 5288 #if MTK_RELEASE_DV_CONSTRAINT_C0129 5289 Int aiDvMcpDvCandX[2][iNumofDvMCP] = {{0,}, {0,}}; // dummy, 5 spatial + 1 temporal 5290 Int aiDvMcpDvCandY[2][iNumofDvMCP] = {{0,}, {0,}}; // dummy, 5 spatial + 1 temporal 5291 #else 5292 Int aiDvMcpDvCand[2][iNumofDvMCP] = {{0,}, {0,}}; // dummy, 5 spatial + 1 temporal 5293 #endif 5294 Bool abDvMcpFlag [2][iNumofDvMCP] = {{false,},{false,}}; 5295 TComMv cTmpMvPred, cMv; 5296 Bool bTmpIsSkipped = false; 5297 Bool bDvMcpIsFound = false; 5298 Int iLCUAddrDiff = 0; 5299 5084 //// ******* Init variables ******* ///// 5085 // Init disparity struct for results 5086 pDInfo->iN = 0; 5087 5088 // Init struct for disparities from MCP neighboring blocks 5089 McpDisInfo cMvpDvInfo; 5090 cMvpDvInfo.m_bFound = false; 5091 for (UInt iCurDvMcpCand = 0; iCurDvMcpCand < MCP_DIS_CANS; iCurDvMcpCand++) 5092 { 5093 for (UInt iList = 0; iList < 2; iList++) 5094 { 5095 cMvpDvInfo.m_acMvCand[iList][iCurDvMcpCand].setZero(); 5096 cMvpDvInfo.m_aVIdxCan[iList][iCurDvMcpCand] = 0; 5097 cMvpDvInfo.m_bAvailab[iList][iCurDvMcpCand] = false; 5098 } 5099 } 5100 5101 // Get Positions 5102 PartSize eCUMode = getPartitionSize( uiPartAddr ); 5103 UInt uiPartIdxLT, uiPartIdxRT, uiPartIdxLB; 5104 5105 deriveLeftRightTopIdxGeneral( eCUMode, uiPartAddr, uiPartIdx, uiPartIdxLT, uiPartIdxRT ); 5106 deriveLeftBottomIdxGeneral ( eCUMode, uiPartAddr, uiPartIdx, uiPartIdxLB ); 5107 5108 // Get parameters for parallel merge 5300 5109 Int xP, yP, nPSW, nPSH; 5301 5110 if( bParMerge) 5302 5111 this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH); 5303 5112 5304 deriveLeftRightTopIdxGeneral( eCUMode, uiPartAddr, uiPartIdx, uiPartIdxLT, uiPartIdxRT ); 5305 deriveLeftBottomIdxGeneral( eCUMode, uiPartAddr, uiPartIdx, uiPartIdxLB ); 5306 5307 #if MTK_SAIT_TEMPORAL_FIRST_ORDER_C0141_C0097 5308 // copied from getInterMergeCand() 5113 //// ******* Get disparity from temporal neighboring blocks ******* ///// 5309 5114 if ( getSlice()->getPPS()->getEnableTMVPFlag() ) 5310 5115 { 5311 5116 TComMv cColMv; 5312 5117 Int iTargetViewIdx = 0; 5313 Int iTStartViewIdx = 0; 5314 UInt uiPartIdxRB, uiBRIdx; 5315 #if !MTK_SIMPLIFY_DVTC_C0135 5316 Int uiViewIdxCurr= getSlice()->getViewId(); 5317 #endif 5118 Int iTStartViewIdx = 0; 5119 5120 ///*** Derive center position *** 5318 5121 UInt uiPartIdxCenter; 5122 Int uiLCUIdx = getAddr(); 5123 5319 5124 xDeriveCenterIdx( eCUMode, uiPartIdx, uiPartIdxCenter ); 5320 5125 5321 Int uiLCUIdx = getAddr(); 5322 Int uiLCUnew = uiLCUIdx; 5323 eCUMode = getPartitionSize( 0 ); 5324 deriveRightBottomIdx( eCUMode, uiPartIdx, uiPartIdxRB ); 5325 uiBRIdx = uiPartIdxLT; 5326 UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB]; 5327 #if MTK_SIMPLIFY_DVTC_C0135 5328 if (( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() )>= m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) 5329 { 5330 uiLCUnew = -1; 5331 } 5332 else if(( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() )>= m_pcSlice->getSPS()->getPicHeightInLumaSamples() ) 5333 { 5334 uiLCUnew = -1; 5335 } 5336 else 5337 #else 5338 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 5339 #endif 5340 { 5341 if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) && // is not at the last column of LCU 5342 ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row of LCU 5343 { 5344 uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ]; 5345 } 5346 else if ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) // is not at the last column of LCU But is last row of LCU 5347 { 5348 uiBRIdx = g_auiRasterToZscan[ (uiAbsPartIdxTmp + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ]; 5349 #if MTK_SIMPLIFY_DVTC_C0135 5350 uiLCUnew = -1; 5351 #else 5352 uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU(); 5353 #endif 5354 } 5355 else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU 5356 { 5357 uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ]; 5358 uiLCUnew = uiLCUIdx + 1; 5359 } 5360 else //is the right bottom corner of LCU 5361 { 5362 uiBRIdx = 0; 5363 #if MTK_SIMPLIFY_DVTC_C0135 5364 uiLCUnew = -1; 5365 #else 5366 uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU() + 1; 5367 #endif 5368 } 5369 } 5370 const Int iNumofCandPic = 2; 5371 for(Int i =0; i < iNumofCandPic; i++) 5372 { 5373 Int lpRef=0; 5374 if(i == 0) 5375 { //check the col-located picture 5376 eRefPicList = RefPicList(getSlice()->isInterB() ? getSlice()->getColDir() : 0); 5377 #if COLLOCATED_REF_IDX 5378 lpRef = getSlice()->getColRefIdx(); 5379 #else 5380 Int lpRef = 0; 5381 #endif 5382 } 5383 else 5384 { 5385 if(!(getPic()->getRapbCheck())) 5126 ///*** Derive bottom right neighbour position *** 5127 eCUMode = getPartitionSize( 0 ); // Necessary? 5128 Int iLCUIdxRBNb = -1; 5129 Int iPartIdxRBNb = -1; 5130 5131 xDeriveRightBottomNbIdx( eCUMode, uiPartIdx, iLCUIdxRBNb, iPartIdxRBNb ); 5132 5133 ///*** Search temporal candidate pictures for disparity vector *** 5134 const Int iNumCandPics = 2; 5135 for(Int curCandPic = 0; curCandPic < iNumCandPics; curCandPic++) 5136 { 5137 // Get candidate picture 5138 RefPicList eCurRefPicList = REF_PIC_LIST_0 ; 5139 Int curCandPicRefIdx = 0; 5140 5141 if( curCandPic == 0 ) // check the co-located picture 5142 { 5143 eCurRefPicList = RefPicList(getSlice()->isInterB() ? getSlice()->getColDir() : 0); 5144 curCandPicRefIdx = getSlice()->getColRefIdx(); 5145 } 5146 else // check RAP 5147 { 5148 if( !(getPic()->getRapbCheck()) ) 5386 5149 break; 5387 eRefPicList=getPic()->getRapRefList(); 5388 lpRef=getPic()->getRapRefIdx(); 5389 } 5390 5391 if( m_pcSlice->getViewId() == getSlice()->getRefPic( eRefPicList, lpRef)->getViewId() ) 5392 { 5393 #if !MTK_SIMPLIFY_DVTC_C0135 5394 if (uiViewIdxCurr > 1) 5150 5151 eCurRefPicList = getPic()->getRapRefList(); 5152 curCandPicRefIdx = getPic()->getRapRefIdx(); 5153 } 5154 5155 // Check BR and Center 5156 if( m_pcSlice->getViewId() == getSlice()->getRefPic( eCurRefPicList, curCandPicRefIdx)->getViewId() ) 5157 { 5158 for(Int curPosition = 0; curPosition < 2; curPosition++) 5395 5159 { 5396 #endif 5397 if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) ) 5160 Bool bCheck = false; 5161 if ( curPosition == 0 && iLCUIdxRBNb >= 0 ) 5162 bCheck = xGetColDisMV( eCurRefPicList, curCandPicRefIdx, iLCUIdxRBNb, iPartIdxRBNb, cColMv, iTargetViewIdx, iTStartViewIdx); 5163 5164 if (curPosition == 1 ) 5165 bCheck = xGetColDisMV( eCurRefPicList, curCandPicRefIdx, uiLCUIdx, uiPartIdxCenter, cColMv, iTargetViewIdx, iTStartViewIdx ); 5166 5167 if( bCheck ) 5398 5168 { 5399 5169 clipMv(cColMv); 5400 #if !MERL_MTK_VSP_DVP_REFINE_C0152_C0131 5170 TComPic* picDepth = getSlice()->getRefPicBaseDepth(); 5171 if (picDepth && bDepthRefine) 5172 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true); 5173 5401 5174 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv; 5402 5175 pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx; 5403 #else5404 {5405 TComPic* picDepth = NULL;5406 picDepth = getSlice()->getRefPicBaseDepth();5407 if (picDepth && bDepthRefine)5408 #if LGE_SIMP_DVP_REFINE_C01125409 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true);5410 #else5411 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv);5412 #endif5413 5414 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;5415 pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx;5416 }5417 #endif5418 5176 return ; 5419 5177 } 5420 #if !MTK_SIMPLIFY_DVTC_C0135 5421 } 5422 #endif 5423 if(xGetColDisMV( eRefPicList, lpRef, uiLCUIdx, uiPartIdxCenter, cColMv, iTargetViewIdx, iTStartViewIdx )) 5424 { 5425 clipMv(cColMv); 5426 #if !MERL_MTK_VSP_DVP_REFINE_C0152_C0131 5427 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv; 5428 pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx; 5429 #else 5430 { 5431 TComPic* picDepth = NULL; 5432 picDepth = getSlice()->getRefPicBaseDepth(); 5433 if (picDepth && bDepthRefine) 5434 #if LGE_SIMP_DVP_REFINE_C0112 5435 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true); 5436 #else 5437 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv); 5438 #endif 5439 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv; 5440 pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx; 5441 } 5442 #endif 5443 return ; 5444 } 5445 #if !MTK_SIMPLIFY_DVTC_C0135 5446 if(uiViewIdxCurr == 1) 5447 { 5448 if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) ) 5449 { 5450 clipMv(cColMv); 5451 #if !MERL_MTK_VSP_DVP_REFINE_C0152_C0131 5452 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv; 5453 pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx; 5454 #else 5455 { 5456 TComPic* picDepth = NULL; 5457 picDepth = getSlice()->getRefPicBaseDepth(); 5458 if (picDepth && bDepthRefine) 5459 #if LGE_SIMP_DVP_REFINE_C0112 5460 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true); 5461 #else 5462 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv); 5463 #endif 5464 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv; 5465 pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx; 5466 } 5467 #endif 5468 return ; 5469 } 5470 } 5471 #endif 5472 } 5473 } 5178 } // Loop positions 5179 } 5180 } // Loop candidate views 5474 5181 } // if TMVP Flag 5475 #endif 5182 5476 5183 UInt uiIdx = 0; 5184 Bool bCheckMcpDv = false; 5185 TComDataCU* pcTmpCU = NULL; 5186 5187 5188 //// ******* Get disparity from left block ******* ///// 5477 5189 pcTmpCU = getPULeft(uiIdx, uiPartIdxLB, true, false); 5478 5190 if ( uiPartIdx == 1 && (eCUMode == SIZE_Nx2N || eCUMode == SIZE_nLx2N || eCUMode == SIZE_nRx2N) ) … … 5489 5201 } 5490 5202 5491 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 5492 { 5493 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); 5494 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) 5495 { 5496 eRefPicList = RefPicList(iList); 5497 Int refId = pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ; 5498 if( refId >= 0) 5499 { 5500 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 5501 if (refViewIdx != m_pcSlice->getViewId()) // DCP 5203 bCheckMcpDv = true; 5204 if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, uiPartIdx, uiPartAddr, pDInfo, bCheckMcpDv, &cMvpDvInfo, DVFROM_LEFT, bDepthRefine ) ) 5205 return; 5206 5207 5208 //// ******* Get disparity from above block ******* ///// 5209 pcTmpCU = getPUAbove(uiIdx, uiPartIdxRT, true, false, true); 5210 if ( uiPartIdx == 1 && (eCUMode == SIZE_2NxN || eCUMode == SIZE_2NxnU || eCUMode == SIZE_2NxnD) ) 5211 { 5212 pcTmpCU = NULL; 5213 } 5214 5215 if (pcTmpCU && bParMerge) 5216 { 5217 if (!pcTmpCU->isDiffMER(xP+nPSW-1, yP-1, xP, yP)) 5218 { 5219 pcTmpCU = NULL; 5220 } 5221 } 5222 5223 if(pcTmpCU != NULL ) 5224 { 5225 bCheckMcpDv = ( ( getAddr() - pcTmpCU->getAddr() ) == 0); 5226 if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, uiPartIdx, uiPartAddr, pDInfo, bCheckMcpDv, &cMvpDvInfo, DVFROM_ABOVE, bDepthRefine ) ) 5227 return; 5228 } 5229 5230 //// ******* Get disparity from above right block ******* ///// 5231 pcTmpCU = getPUAboveRight(uiIdx, uiPartIdxRT, true, false, true); 5232 5233 if (pcTmpCU && bParMerge) 5234 { 5235 if (!pcTmpCU->isDiffMER(xP+nPSW, yP-1, xP, yP)) 5236 { 5237 pcTmpCU = NULL; 5238 } 5239 } 5240 5241 if(pcTmpCU != NULL ) 5242 { 5243 bCheckMcpDv = ( ( getAddr() - pcTmpCU->getAddr() ) == 0); 5244 if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, uiPartIdx, uiPartAddr, pDInfo, bCheckMcpDv, &cMvpDvInfo, DVFROM_ABOVERIGHT, bDepthRefine ) ) 5245 return; 5246 } 5247 5248 5249 //// ******* Get disparity from below left block ******* ///// 5250 pcTmpCU = getPUBelowLeft(uiIdx, uiPartIdxLB, true, false); 5251 5252 if (pcTmpCU && bParMerge) 5253 { 5254 if (!pcTmpCU->isDiffMER(xP-1, yP+nPSH, xP, yP)) 5255 { 5256 pcTmpCU = NULL; 5257 } 5258 } 5259 5260 if( pcTmpCU != NULL ) 5261 { 5262 bCheckMcpDv = true; 5263 if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, uiPartIdx, uiPartAddr, pDInfo, bCheckMcpDv, &cMvpDvInfo, DVFROM_LEFTBELOW, bDepthRefine ) ) 5264 return; 5265 } 5266 5267 5268 //// ******* Get disparity from above left block ******* ///// 5269 pcTmpCU = getPUAboveLeft(uiIdx, (m_uiAbsIdxInLCU + uiPartAddr), true, false, true); 5270 assert(uiPartIdxLT == (m_uiAbsIdxInLCU + uiPartAddr)); 5271 5272 if (pcTmpCU && bParMerge) 5273 { 5274 if (!pcTmpCU->isDiffMER(xP-1, yP-1, xP, yP)) 5275 { 5276 pcTmpCU = NULL; 5277 } 5278 } 5279 5280 if( pcTmpCU != NULL ) 5281 { 5282 bCheckMcpDv = (( getAddr() - pcTmpCU->getAddr() ) <= 1); 5283 if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, uiPartIdx, uiPartAddr, pDInfo, bCheckMcpDv, &cMvpDvInfo, DVFROM_ABOVELEFT, bDepthRefine ) ) 5284 return; 5285 } 5286 5287 //// ******* Search MCP blocks ******* ///// 5288 if( cMvpDvInfo.m_bFound ) 5289 { 5290 for( Int curPos = 0 ; curPos < MCP_DIS_CANS ; curPos++ ) 5291 { 5292 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) 5293 { 5294 if( cMvpDvInfo.m_bAvailab[iList][curPos] ) 5502 5295 { 5503 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 5504 clipMv(cMvPred); 5505 #if !MERL_MTK_VSP_DVP_REFINE_C0152_C0131 5506 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred; 5507 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx; 5508 #else 5509 { 5510 TComPic* picDepth = NULL; 5511 picDepth = getSlice()->getRefPicBaseDepth(); 5512 if (picDepth && bDepthRefine) 5513 #if LGE_SIMP_DVP_REFINE_C0112 5514 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true); 5515 #else 5516 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred); 5517 #endif 5518 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred; 5519 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx; 5520 } 5521 #endif 5296 TComMv cDispVec = cMvpDvInfo.m_acMvCand[iList][ curPos ]; 5297 clipMv( cDispVec ); 5298 5299 TComPic* picDepth = getSlice()->getRefPicBaseDepth(); 5300 if (picDepth && bDepthRefine) 5301 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cDispVec, true); 5302 5303 pDInfo->m_acMvCand[ pDInfo->iN] = cDispVec; 5304 pDInfo->m_aVIdxCan[ pDInfo->iN++] = 0; 5522 5305 return; 5523 5306 } 5524 else // MCP5525 {5526 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);5527 if( cTmpMvPred.m_bDvMcp && bTmpIsSkipped )5528 {5529 #if MTK_RELEASE_DV_CONSTRAINT_C01295530 aiDvMcpDvCandX[iList][DVFROM_LEFT] = cTmpMvPred.m_iDvMcpDispX;5531 aiDvMcpDvCandY[iList][DVFROM_LEFT] = cTmpMvPred.m_iDvMcpDispY;5532 #else5533 aiDvMcpDvCand[iList][DVFROM_LEFT] = cTmpMvPred.m_iDvMcpDispX;5534 #endif5535 abDvMcpFlag [iList][DVFROM_LEFT] = true;5536 bDvMcpIsFound = true;5537 }5538 }5539 }5540 #if MERL_VSP_C01525541 else if (pcTmpCU->getVSPIndex(uiIdx) != 0) // is VSP5542 {5543 TComPic* picDepth = NULL;5544 TComMv myMv = pcTmpCU->getCUMvField( eRefPicList )->getMv( uiIdx );5545 picDepth = pcTmpCU->getSlice()->getRefPicBaseDepth();5546 if (picDepth && bDepthRefine)5547 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &myMv);5548 myMv.setVer(0);5549 5550 pDInfo->m_acMvCand[ pDInfo->iN] = myMv;5551 pDInfo->m_aVIdxCan[ pDInfo->iN++] = 0; // refViewIdx;5552 return;5553 }5554 #endif5555 }5556 }5557 5558 pcTmpCU = getPUAbove(uiIdx, uiPartIdxRT, true, false, true);5559 if ( uiPartIdx == 1 && (eCUMode == SIZE_2NxN || eCUMode == SIZE_2NxnU || eCUMode == SIZE_2NxnD) )5560 {5561 pcTmpCU = NULL;5562 }5563 5564 if (pcTmpCU && bParMerge)5565 {5566 if (!pcTmpCU->isDiffMER(xP+nPSW-1, yP-1, xP, yP))5567 {5568 pcTmpCU = NULL;5569 }5570 }5571 5572 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ))5573 {5574 iLCUAddrDiff = getAddr() - pcTmpCU->getAddr();5575 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx );5576 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)5577 {5578 eRefPicList = RefPicList(iList);5579 Int refId = pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ;5580 if( refId >= 0)5581 {5582 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId);5583 if (refViewIdx!= m_pcSlice->getViewId())5584 {5585 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);5586 clipMv(cMvPred);5587 #if !MERL_MTK_VSP_DVP_REFINE_C0152_C01315588 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;5589 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;5590 #else5591 {5592 TComPic* picDepth = NULL;5593 picDepth = getSlice()->getRefPicBaseDepth();5594 if (picDepth && bDepthRefine)5595 #if LGE_SIMP_DVP_REFINE_C01125596 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true);5597 #else5598 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred);5599 #endif5600 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;5601 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;5602 }5603 #endif5604 return;5605 }5606 else if(iLCUAddrDiff == 0) //MCP, within same LCU5607 {5608 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);5609 if( cTmpMvPred.m_bDvMcp && bTmpIsSkipped )5610 {5611 #if MTK_RELEASE_DV_CONSTRAINT_C01295612 aiDvMcpDvCandX[iList][DVFROM_ABOVE] = cTmpMvPred.m_iDvMcpDispX;5613 aiDvMcpDvCandY[iList][DVFROM_ABOVE] = cTmpMvPred.m_iDvMcpDispY;5614 #else5615 aiDvMcpDvCand[iList][DVFROM_ABOVE] = cTmpMvPred.m_iDvMcpDispX;5616 #endif5617 abDvMcpFlag [iList][DVFROM_ABOVE] = true;5618 bDvMcpIsFound = true;5619 }5620 }5621 }5622 #if MERL_VSP_C01525623 else if (pcTmpCU->getVSPIndex(uiIdx) != 0) // is VSP5624 {5625 TComPic* picDepth = NULL;5626 TComMv myMv = pcTmpCU->getCUMvField( eRefPicList )->getMv( uiIdx );5627 picDepth = pcTmpCU->getSlice()->getRefPicBaseDepth();5628 if (picDepth && bDepthRefine)5629 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &myMv);5630 myMv.setVer(0);5631 5632 pDInfo->m_acMvCand[ pDInfo->iN] = myMv;5633 pDInfo->m_aVIdxCan[ pDInfo->iN++] = 0; // refViewIdx;5634 return;5635 }5636 #endif5637 }5638 }5639 5640 pcTmpCU = getPUAboveRight(uiIdx, uiPartIdxRT, true, false, true);5641 5642 if (pcTmpCU && bParMerge)5643 {5644 if (!pcTmpCU->isDiffMER(xP+nPSW, yP-1, xP, yP))5645 {5646 pcTmpCU = NULL;5647 }5648 }5649 5650 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) )5651 {5652 iLCUAddrDiff = getAddr() - pcTmpCU->getAddr();5653 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx );5654 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)5655 {5656 eRefPicList = RefPicList(iList);5657 Int refId = pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ;5658 if( refId >= 0)5659 {5660 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId);5661 if (refViewIdx!= m_pcSlice->getViewId())5662 {5663 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);5664 clipMv(cMvPred);5665 #if !MERL_MTK_VSP_DVP_REFINE_C0152_C01315666 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;5667 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;5668 #else5669 {5670 TComPic* picDepth = NULL;5671 picDepth = getSlice()->getRefPicBaseDepth();5672 if (picDepth && bDepthRefine)5673 #if LGE_SIMP_DVP_REFINE_C01125674 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true);5675 #else5676 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred);5677 #endif5678 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;5679 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;5680 }5681 #endif5682 return;5683 }5684 else if(iLCUAddrDiff == 0)5685 {5686 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);5687 if( cTmpMvPred.m_bDvMcp && bTmpIsSkipped )5688 {5689 #if MTK_RELEASE_DV_CONSTRAINT_C01295690 aiDvMcpDvCandX[iList][DVFROM_ABOVERIGHT] = cTmpMvPred.m_iDvMcpDispX;5691 aiDvMcpDvCandY[iList][DVFROM_ABOVERIGHT] = cTmpMvPred.m_iDvMcpDispY;5692 #else5693 aiDvMcpDvCand[iList][DVFROM_ABOVERIGHT] = cTmpMvPred.m_iDvMcpDispX;5694 #endif5695 abDvMcpFlag [iList][DVFROM_ABOVERIGHT] = true;5696 bDvMcpIsFound = true;5697 }5698 }5699 }5700 #if MERL_VSP_C01525701 else if (pcTmpCU->getVSPIndex(uiIdx) != 0) // is VSP5702 {5703 TComPic* picDepth = NULL;5704 TComMv myMv = pcTmpCU->getCUMvField( eRefPicList )->getMv( uiIdx );5705 picDepth = pcTmpCU->getSlice()->getRefPicBaseDepth();5706 if (picDepth && bDepthRefine)5707 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &myMv);5708 myMv.setVer(0);5709 5710 pDInfo->m_acMvCand[ pDInfo->iN] = myMv;5711 pDInfo->m_aVIdxCan[ pDInfo->iN++] = 0; // refViewIdx;5712 return;5713 }5714 #endif5715 }5716 }5717 5718 pcTmpCU = getPUBelowLeft(uiIdx, uiPartIdxLB, true, false);5719 5720 if (pcTmpCU && bParMerge)5721 {5722 if (!pcTmpCU->isDiffMER(xP-1, yP+nPSH, xP, yP))5723 {5724 pcTmpCU = NULL;5725 }5726 }5727 5728 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ))5729 {5730 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx );5731 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)5732 {5733 eRefPicList = RefPicList(iList);5734 Int refId = pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ;5735 if( refId >= 0)5736 {5737 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId);5738 if (refViewIdx!= m_pcSlice->getViewId())5739 {5740 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);5741 clipMv(cMvPred);5742 #if !MERL_MTK_VSP_DVP_REFINE_C0152_C01315743 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;5744 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;5745 #else5746 {5747 TComPic* picDepth = NULL;5748 picDepth = getSlice()->getRefPicBaseDepth();5749 if (picDepth && bDepthRefine)5750 #if LGE_SIMP_DVP_REFINE_C01125751 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true);5752 #else5753 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred);5754 #endif5755 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;5756 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;5757 }5758 #endif5759 return;5760 }5761 else // MCP5762 {5763 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);5764 if( cTmpMvPred.m_bDvMcp && bTmpIsSkipped )5765 {5766 #if MTK_RELEASE_DV_CONSTRAINT_C01295767 aiDvMcpDvCandX[iList][DVFROM_LEFTBELOW] = cTmpMvPred.m_iDvMcpDispX;5768 aiDvMcpDvCandY[iList][DVFROM_LEFTBELOW] = cTmpMvPred.m_iDvMcpDispY;5769 #else5770 aiDvMcpDvCand[iList][DVFROM_LEFTBELOW] = cTmpMvPred.m_iDvMcpDispX;5771 #endif5772 abDvMcpFlag [iList][DVFROM_LEFTBELOW] = true;5773 bDvMcpIsFound = true;5774 }5775 }5776 }5777 #if MERL_VSP_C01525778 else if (pcTmpCU->getVSPIndex(uiIdx) != 0) // is VSP5779 {5780 TComPic* picDepth = NULL;5781 TComMv myMv = pcTmpCU->getCUMvField( eRefPicList )->getMv( uiIdx );5782 picDepth = pcTmpCU->getSlice()->getRefPicBaseDepth();5783 if (picDepth && bDepthRefine)5784 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &myMv);5785 myMv.setVer(0);5786 5787 pDInfo->m_acMvCand[ pDInfo->iN] = myMv;5788 pDInfo->m_aVIdxCan[ pDInfo->iN++] = 0; // refViewIdx;5789 return;5790 }5791 #endif5792 }5793 }5794 5795 // Above predictor search5796 pcTmpCU = getPUAboveLeft(uiIdx, (m_uiAbsIdxInLCU + uiPartAddr), true, false, true);5797 assert(uiPartIdxLT == (m_uiAbsIdxInLCU + uiPartAddr));5798 5799 if (pcTmpCU && bParMerge)5800 {5801 if (!pcTmpCU->isDiffMER(xP-1, yP-1, xP, yP))5802 {5803 pcTmpCU = NULL;5804 }5805 }5806 5807 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ))5808 {5809 iLCUAddrDiff = getAddr() - pcTmpCU->getAddr();5810 5811 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx );5812 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)5813 {5814 eRefPicList = RefPicList(iList);5815 Int refId = pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ;5816 if( refId >= 0)5817 {5818 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId);5819 if (refViewIdx!= m_pcSlice->getViewId())5820 {5821 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);5822 clipMv(cMvPred);5823 #if !MERL_MTK_VSP_DVP_REFINE_C0152_C01315824 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;5825 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;5826 #else5827 {5828 TComPic* picDepth = NULL;5829 picDepth = getSlice()->getRefPicBaseDepth();5830 if (picDepth && bDepthRefine)5831 #if LGE_SIMP_DVP_REFINE_C01125832 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true);5833 #else5834 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred);5835 #endif5836 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;5837 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;5838 }5839 #endif5840 return;5841 }5842 else if(iLCUAddrDiff <= 1)5843 {5844 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);5845 if( cTmpMvPred.m_bDvMcp && bTmpIsSkipped )5846 {5847 #if MTK_RELEASE_DV_CONSTRAINT_C01295848 aiDvMcpDvCandX[iList][DVFROM_ABOVELEFT] = cTmpMvPred.m_iDvMcpDispX;5849 aiDvMcpDvCandY[iList][DVFROM_ABOVELEFT] = cTmpMvPred.m_iDvMcpDispY;5850 #else5851 aiDvMcpDvCand[iList][DVFROM_ABOVELEFT] = cTmpMvPred.m_iDvMcpDispX;5852 #endif5853 abDvMcpFlag [iList][DVFROM_ABOVELEFT] = true;5854 bDvMcpIsFound = true;5855 }5856 }5857 }5858 #if MERL_VSP_C01525859 else if (pcTmpCU->getVSPIndex(uiIdx) != 0) // is VSP5860 {5861 TComPic* picDepth = NULL;5862 TComMv myMv = pcTmpCU->getCUMvField( eRefPicList )->getMv( uiIdx );5863 picDepth = pcTmpCU->getSlice()->getRefPicBaseDepth();5864 if (picDepth && bDepthRefine)5865 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &myMv);5866 myMv.setVer(0);5867 5868 pDInfo->m_acMvCand[ pDInfo->iN] = myMv;5869 pDInfo->m_aVIdxCan[ pDInfo->iN++] = 0; // refViewIdx;5870 return;5871 }5872 #endif5873 }5874 }5875 #if !MTK_SAIT_TEMPORAL_FIRST_ORDER_C0141_C00975876 // copied from getInterMergeCand()5877 if ( getSlice()->getPPS()->getEnableTMVPFlag() )5878 {5879 TComMv cColMv;5880 Int iTargetViewIdx = 0;5881 Int iTStartViewIdx = 0;5882 UInt uiPartIdxRB, uiBRIdx;5883 #if !MTK_SIMPLIFY_DVTC_C01355884 Int uiViewIdxCurr= getSlice()->getViewId();5885 #endif5886 UInt uiPartIdxCenter;5887 xDeriveCenterIdx( eCUMode, uiPartIdx, uiPartIdxCenter );5888 5889 Int uiLCUIdx = getAddr();5890 Int uiLCUnew = uiLCUIdx;5891 eCUMode = getPartitionSize( 0 );5892 deriveRightBottomIdx( eCUMode, uiPartIdx, uiPartIdxRB );5893 uiBRIdx = uiPartIdxLT;5894 UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB];5895 #if MTK_SIMPLIFY_DVTC_C01355896 if (( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() )>= m_pcSlice->getSPS()->getPicWidthInLumaSamples() )5897 {5898 uiLCUnew = -1;5899 }5900 else if(( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() )>= m_pcSlice->getSPS()->getPicHeightInLumaSamples() )5901 {5902 uiLCUnew = -1;5903 }5904 else5905 #else5906 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 check5907 #endif5908 {5909 if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) && // is not at the last column of LCU5910 ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row of LCU5911 {5912 uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ];5913 }5914 else if ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) // is not at the last column of LCU But is last row of LCU5915 {5916 uiBRIdx = g_auiRasterToZscan[ (uiAbsPartIdxTmp + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ];5917 #if MTK_SIMPLIFY_DVTC_C01355918 uiLCUnew = -1;5919 #else5920 uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU();5921 #endif5922 }5923 else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU5924 {5925 uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ];5926 uiLCUnew = uiLCUIdx + 1;5927 }5928 else //is the right bottom corner of LCU5929 {5930 uiBRIdx = 0;5931 #if MTK_SIMPLIFY_DVTC_C01355932 uiLCUnew = -1;5933 #else5934 uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU() + 1;5935 #endif5936 }5937 }5938 const Int iNumofCandPic = 2;5939 for(Int i =0; i < iNumofCandPic; i++)5940 {5941 Int lpRef=0;5942 if(i == 0)5943 { //check the col-located picture5944 eRefPicList = RefPicList(getSlice()->isInterB() ? getSlice()->getColDir() : 0);5945 #if COLLOCATED_REF_IDX5946 lpRef = getSlice()->getColRefIdx();5947 #else5948 Int lpRef = 0;5949 #endif5950 }5951 else5952 {5953 if(!(getPic()->getRapbCheck()))5954 break;5955 eRefPicList=getPic()->getRapRefList();5956 lpRef=getPic()->getRapRefIdx();5957 }5958 5959 if( m_pcSlice->getViewId() == getSlice()->getRefPic( eRefPicList, lpRef)->getViewId() )5960 {5961 #if !MTK_SIMPLIFY_DVTC_C01355962 if (uiViewIdxCurr > 1)5963 {5964 #endif5965 if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) )5966 {5967 clipMv(cColMv);5968 #if !MERL_MTK_VSP_DVP_REFINE_C0152_C01315969 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;5970 pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx;5971 #else5972 {5973 TComPic* picDepth = NULL;5974 picDepth = getSlice()->getRefPicBaseDepth();5975 if (picDepth && bDepthRefine)5976 #if LGE_SIMP_DVP_REFINE_C01125977 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true);5978 #else5979 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv);5980 #endif5981 5982 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;5983 pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx;5984 }5985 #endif5986 return ;5987 }5988 #if !MTK_SIMPLIFY_DVTC_C01355989 }5990 #endif5991 if(xGetColDisMV( eRefPicList, lpRef, uiLCUIdx, uiPartIdxCenter, cColMv, iTargetViewIdx, iTStartViewIdx ))5992 {5993 clipMv(cColMv);5994 #if !MERL_MTK_VSP_DVP_REFINE_C0152_C01315995 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;5996 pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx;5997 #else5998 {5999 TComPic* picDepth = NULL;6000 picDepth = getSlice()->getRefPicBaseDepth();6001 if (picDepth && bDepthRefine)6002 #if LGE_SIMP_DVP_REFINE_C01126003 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true);6004 #else6005 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv);6006 #endif6007 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;6008 pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx;6009 }6010 #endif6011 return ;6012 }6013 #if !MTK_SIMPLIFY_DVTC_C01356014 if(uiViewIdxCurr == 1)6015 {6016 if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) )6017 {6018 clipMv(cColMv);6019 #if !MERL_MTK_VSP_DVP_REFINE_C0152_C01316020 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;6021 pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx;6022 #else6023 {6024 TComPic* picDepth = NULL;6025 picDepth = getSlice()->getRefPicBaseDepth();6026 if (picDepth && bDepthRefine)6027 #if LGE_SIMP_DVP_REFINE_C01126028 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true);6029 #else6030 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv);6031 #endif6032 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;6033 pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx;6034 }6035 #endif6036 return ;6037 }6038 }6039 #endif6040 }6041 }6042 } // if TMVP Flag6043 #endif6044 6045 if( bDvMcpIsFound ) // skip dvmcp6046 {6047 for( Int i=1 ; i<iNumofDvMCP-1 ; i++ ) // 5 spatial6048 {6049 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)6050 {6051 if( abDvMcpFlag[iList][i]==true )6052 {6053 #if MTK_RELEASE_DV_CONSTRAINT_C01296054 TComMv dv( aiDvMcpDvCandX[iList][ i ], aiDvMcpDvCandY[iList][ i ] );6055 #else6056 TComMv dv( aiDvMcpDvCand[iList][ i ], 0 );6057 #endif6058 clipMv( dv );6059 #if !MERL_MTK_VSP_DVP_REFINE_C0152_C01316060 pDInfo->m_acMvCand[ pDInfo->iN] = dv;6061 pDInfo->m_aVIdxCan[ pDInfo->iN++] = 0;6062 #else6063 {6064 TComPic* picDepth = NULL;6065 picDepth = getSlice()->getRefPicBaseDepth();6066 if (picDepth && bDepthRefine)6067 #if LGE_SIMP_DVP_REFINE_C01126068 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &dv, true);6069 #else6070 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &dv);6071 #endif6072 pDInfo->m_acMvCand[ pDInfo->iN] = dv;6073 pDInfo->m_aVIdxCan[ pDInfo->iN++] = 0;6074 }6075 #endif6076 return;6077 }6078 6079 5307 } 6080 5308 } … … 6131 5359 #endif 6132 5360 ); 5361 6133 5362 #if FCO_DVP_REFINE_C0132_C0170 6134 5363 if(getPic()->getDepthCoded() ) … … 6153 5382 cDisInfo.m_aVIdxCan[0] = 0; 6154 5383 } 6155 #if QC_AMVP_MRG_UNIFY_IVCAN_C00516156 5384 Int paiPdmRefIdx[4] = {-1, -1, -1, -1}; 6157 5385 Int iPdmDir[4] = {-1, -1, -1, -1}; 6158 #if QC_C0051_FIXED_BY_MTK6159 5386 TComMv cPdmMvPred[4]; 6160 #else6161 TComMv cPdmMvPred[2];6162 #endif6163 5387 cPdmMvPred[0].m_bDvMcp = cPdmMvPred[1].m_bDvMcp = false; 6164 5388 if(getUnifiedMvPredCan(uiPartIdx, eRefPicList, iRefIdx, paiPdmRefIdx, cPdmMvPred, &cDisInfo, iPdmDir, false)) 6165 #else // QC_AMVP_MRG_UNIFY_IVCAN_C00516166 TComMv cPdmMvPred;6167 if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) )6168 #endif // QC_AMVP_MRG_UNIFY_IVCAN_C00516169 5389 #else // H3D_NBDV 6170 5390 if( getPdmMvPred( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred ) ) 6171 5391 #endif 6172 5392 6173 #if QC_AMVP_MRG_UNIFY_IVCAN_C00516174 5393 { 6175 5394 clipMv( cPdmMvPred[0] ); … … 6180 5399 pInfo->m_acMvCand[0].set(0,0); 6181 5400 } 6182 #else6183 {6184 clipMv( cPdmMvPred );6185 pInfo->m_acMvCand[0] = cPdmMvPred;6186 }6187 else6188 {6189 pInfo->m_acMvCand[0].set(0,0);6190 }6191 #endif6192 5401 } 6193 5402 } … … 6771 5980 iColViewIdx = pColCU->getSlice()->getViewId(); 6772 5981 #if MERL_VSP_C0152 6773 //TComDataCU *pColCU = pColPic->getCU( uiCUAddr );6774 5982 if( pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr) < 0) 6775 5983 { … … 6786 5994 if(pColCU->getSlice()->isInterB()) 6787 5995 { 6788 #if !QC_NBDV_LDB_FIX_C00556789 if(ilist == 0 )6790 eColRefPicList = getSlice()->getCheckLDC() ? eRefPicList : RefPicList(1-getSlice()->getColDir());6791 else6792 eColRefPicList = getSlice()->getCheckLDC() ? (eRefPicList== REF_PIC_LIST_0? REF_PIC_LIST_1:REF_PIC_LIST_0 ): RefPicList(getSlice()->getColDir());6793 #else6794 5996 eColRefPicList = RefPicList(ilist); 6795 #endif6796 5997 } 6797 5998 … … 7933 7134 } 7934 7135 #else //H3D_NBDV 7935 #if QC_AMVP_MRG_UNIFY_IVCAN_C00517936 7136 Bool 7937 7137 TComDataCU::getUnifiedMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm, Bool bMerge ) … … 7943 7143 return false; 7944 7144 } 7945 #else7946 Int7947 TComDataCU::getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm )7948 {7949 TComDepthMapGenerator* pcDepthMapGenerator = m_pcSlice->getSPS()->getDepthMapGenerator();7950 ROFRS( pcDepthMapGenerator, 0 );7951 return pcDepthMapGenerator->getPdmMergeCandidate( this, uiPartIdx, paiPdmRefIdx, pacPdmMv, pDInfo, iPdm );7952 }7953 Bool7954 TComDataCU::getPdmMvPredDisCan( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge )7955 {7956 TComDepthMapGenerator* pcDepthMapGenerator = m_pcSlice->getSPS()->getDepthMapGenerator();7957 ROFRS( pcDepthMapGenerator, false );7958 if (pDInfo->iN > 0 && pcDepthMapGenerator->getDisCanPdmMvPred(this, uiPartIdx, eRefPicList, iRefIdx, rcMv, pDInfo, bMerge )) //bug fix li7959 return true;7960 return false;7961 }7962 #endif7963 7145 #endif //H3D_NBDV 7964 7146 … … 8000 7182 else 8001 7183 #endif 8002 getDisMvpCandNBDV( 0, 0, &cDisInfo, false ); 7184 7185 getDisMvpCandNBDV( 0, 0, &cDisInfo, false ); 7186 8003 7187 if( cDisInfo.iN == 0) 8004 7188 { … … 8008 7192 else 8009 7193 { 8010 #if MTK_RELEASE_DV_CONSTRAINT_C01298011 7194 Bool bAvailable = pcResidualGenerator->getResidualSamples( this, uiPartIdx, pcYuv, cDisInfo.m_acMvCand[0], bRecon ); 8012 #else8013 Bool bAvailable = pcResidualGenerator->getResidualSamples( this, uiPartIdx, pcYuv, cDisInfo.m_acMvCand[0].getHor(), bRecon );8014 #endif8015 7195 m_pePartSize[0] = m_peSaved; 8016 7196 return bAvailable; -
trunk/source/Lib/TLibCommon/TComDataCU.h
r299 r332 287 287 ); 288 288 #if H3D_NBDV 289 Void xDeriveRightBottomNbIdx( PartSize eCUMode, UInt uiPartIdx, Int &uiLCUIdxRBNb, Int &uiPartIdxRBNb ); 290 Bool xCheckSpatialNBDV( TComDataCU* pcTmpCU, UInt uiIdx, UInt uiPartIdx, UInt uiPartAddr, DisInfo* pNbDvInfo, Bool bSearchForMvpDv, McpDisInfo* paMvpDvInfo, UInt uiMvpDvPos, Bool bDepthRefine ); 289 291 Bool xGetColDisMV( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int & iTargetViewIdx, Int & iStartViewIdx ); 290 292 #endif … … 533 535 Bool getPdmMvPred ( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, Bool bMerge = false ); 534 536 #else //!H3D_NBDV 535 #if QC_AMVP_MRG_UNIFY_IVCAN_C0051536 537 Bool getUnifiedMvPredCan ( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm, Bool bMerge ); 537 #else //QC_AMVP_MRG_UNIFY_IVCAN_C0051538 Bool getPdmMvPredDisCan ( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge = false );539 Int getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm );540 #endif //QC_AMVP_MRG_UNIFY_IVCAN_C0051541 538 Void getDisMvpCand ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo ); 542 539 Void getDisMvpCandNBDV( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo , Bool bParMerg = false … … 550 547 551 548 #if MERL_VSP_C0152 552 #if LGE_SIMP_DVP_REFINE_C0112553 549 Pel getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec, Bool bSimpleDvpRefine = false); 554 550 Void estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred, Bool bSimpleDvpRefine = false); 555 #else556 Pel getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec);557 Void estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred);558 #endif559 551 #endif 560 552 Bool getIViewOrgDepthMvPred( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv ); … … 579 571 // member functions for accessing partition information 580 572 // ------------------------------------------------------------------------------------------------------------------- 581 #if LG_RESTRICTEDRESPRED_M24766573 #if H3D_IVRP 582 574 Void getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx = 0, Bool bLCU = false); 583 #else584 Void getPartIndexAndSize ( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight );585 #endif586 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138587 Int getResiPredMode(UInt uiPartAddr);588 Void getPUResiPredShift (Int *iPUPredResiShift, UInt uiAbsPartIndex);589 575 #endif 590 576 UChar getNumPartInter (); … … 601 587 Void fillMvpCandBase ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ); 602 588 Void fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo , Int iMVPIdx=-1); 603 #else604 Void fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo );605 589 #endif 606 590 Bool isDiffMER ( Int xN, Int yN, Int xP, Int yP); … … 831 815 Pel getSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentDCOffset[uiSeg][uiPartIdx]; } 832 816 Void setSDCSegmentDCOffset( Pel pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentDCOffset[uiSeg][uiPartIdx] = pOffset; } 817 818 833 819 #endif 834 820 }; -
trunk/source/Lib/TLibCommon/TComDepthMapGenerator.cpp
r296 r332 605 605 606 606 #if H3D_IVMP 607 #if QC_AMVP_MRG_UNIFY_IVCAN_C0051608 607 Bool 609 608 TComDepthMapGenerator::getPdmCandidate(TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm, Bool bMerge ) … … 636 635 for( UInt uiBId = 0; uiBId < m_uiCurrViewId && iValid==0; uiBId++ ) 637 636 { 638 #if MTK_C0138_FIXED 637 639 638 UInt uiBaseId = uiBId; 640 #else641 UInt uiBaseId = m_auiBaseIdList[ uiBId ];642 #endif643 639 TComPic* pcBasePic = m_pcAUPicAccess->getPic( uiBaseId ); 644 640 for( Int iRefListId = 0; iRefListId < 2 && iValid==0; iRefListId++ ) … … 785 781 return false; 786 782 } 787 #else // QC_AMVP_MRG_UNIFY_IVCAN_C0051788 #if H3D_NBDV789 Int790 TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm )791 #else792 Int793 TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv )794 #endif795 {796 AOF ( m_bCreated && m_bInit );797 798 #if !H3D_NBDV799 ROFRS( m_bPDMAvailable, 0 );800 #endif801 802 TComSlice* pcSlice = pcCU->getSlice ();803 TComSPS* pcSPS = pcSlice->getSPS();804 AOF ( pcSPS->getViewId() == m_uiCurrViewId );805 Bool bPdmMerge = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE );806 ROTRS( !bPdmMerge, 0 );807 808 Bool abPdmAvailable[4] = {false, false, false, false};809 810 Int iValid = 0;811 Int iViewId = 0;812 for( UInt uiBId = 0; uiBId < m_uiCurrViewId && iValid==0; uiBId++ )813 {814 UInt uiBaseId = m_auiBaseIdList[ uiBId ];815 TComPic* pcBasePic = m_pcAUPicAccess->getPic( uiBaseId );816 for( Int iRefListId = 0; iRefListId < 2 && iValid==0; iRefListId++ )817 {818 RefPicList eRefPicListTest = RefPicList( iRefListId );819 Int iNumRefPics = pcSlice->getNumRefIdx( eRefPicListTest ) ;820 for( Int iRefIndex = 0; iRefIndex < iNumRefPics; iRefIndex++ )821 {822 if(pcBasePic->getPOC() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getPOC()823 && pcBasePic->getViewId() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getViewId())824 {825 iValid=1;826 iViewId = uiBaseId;827 break;828 }829 }830 }831 }832 if (iValid == 0)833 return 0;834 835 //--- get base CU/PU and check prediction mode ---836 TComPic* pcBasePic = m_pcAUPicAccess->getPic( iViewId );837 TComPicYuv* pcBaseRec = pcBasePic->getPicYuvRec ();838 839 #if H3D_NBDV840 Int iCurrPosX, iCurrPosY;841 UInt uiPartAddr;842 Int iWidth;843 Int iHeight;844 845 pcCU->getPartIndexAndSize( uiPartIdx, uiPartAddr, iWidth, iHeight );846 pcBaseRec->getTopLeftSamplePos( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY );847 iCurrPosX += ( ( iWidth - 1 ) >> 1 );848 iCurrPosY += ( ( iHeight - 1 ) >> 1 );849 850 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (pDInfo->m_acMvCand[0].getHor() + 2 ) >> 2 ) );851 Int iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (pDInfo->m_acMvCand[0].getVer() + 2 ) >> 2 ));852 Int iBaseCUAddr;853 Int iBaseAbsPartIdx;854 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx );855 #else856 Int iPrdDepth, iCurrPosX, iCurrPosY;857 Bool bAvailable = xGetPredDepth( pcCU, uiPartIdx, iPrdDepth, &iCurrPosX, &iCurrPosY );858 AOF( bAvailable );859 TComPicYuv* pcBasePdm = pcBasePic->getPredDepthMap();860 Int iDisparity = xGetDisparityFromVirtDepth( iViewId, iPrdDepth );861 Int iShiftX = m_uiSubSampExpX + 2;862 Int iAddX = ( 1 << iShiftX ) >> 1;863 Int iBasePosX = Clip3( 0, pcBasePdm->getWidth () - 1, iCurrPosX + ( ( iDisparity + iAddX ) >> iShiftX ) );864 Int iBasePosY = Clip3( 0, pcBasePdm->getHeight() - 1, iCurrPosY );865 Int iBaseCUAddr;866 Int iBaseAbsPartIdx;867 pcBaseRec->getCUAddrAndPartIdx( iBasePosX<< m_uiSubSampExpX , iBasePosY<< m_uiSubSampExpY , iBaseCUAddr, iBaseAbsPartIdx );868 #endif869 870 TComDataCU* pcBaseCU = pcBasePic->getCU( iBaseCUAddr );871 872 if( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTER || pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_SKIP )873 {874 for( UInt uiBaseRefListId = 0; uiBaseRefListId < 2; uiBaseRefListId++ )875 {876 RefPicList eBaseRefPicList = RefPicList( uiBaseRefListId );877 TComMvField cBaseMvField;878 pcBaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField );879 Int iBaseRefIdx = cBaseMvField.getRefIdx();880 881 if (iBaseRefIdx >= 0)882 {883 Int iBaseRefPOC = pcBaseCU->getSlice()->getRefPOC(eBaseRefPicList, iBaseRefIdx);884 if (iBaseRefPOC != pcSlice->getPOC())885 {886 for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eBaseRefPicList ); iPdmRefIdx++)887 {888 if (iBaseRefPOC == pcSlice->getRefPOC(eBaseRefPicList, iPdmRefIdx))889 {890 abPdmAvailable[ uiBaseRefListId ] = true;891 paiPdmRefIdx [ uiBaseRefListId ] = iPdmRefIdx;892 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer());893 #if H3D_NBDV894 cMv.m_bDvMcp = true;895 cMv.m_iDvMcpDispX = pDInfo->m_acMvCand[0].getHor();896 #if MTK_RELEASE_DV_CONSTRAINT_C0129897 cMv.m_iDvMcpDispY = pDInfo->m_acMvCand[0].getVer();898 #endif899 #endif //H3D_NBDV900 pcCU->clipMv( cMv );901 pacPdmMv [ uiBaseRefListId ] = cMv;902 break;903 }904 }905 }906 }907 }908 }909 Int iPdmInterDir = ( abPdmAvailable[0] ? 1 : 0 ) + ( abPdmAvailable[1] ? 2 : 0 );910 911 iPdm[0] = iPdmInterDir;912 for( Int iRefListId = 0; iRefListId < 2 ; iRefListId++ )913 {914 RefPicList eRefPicList = RefPicList( iRefListId );915 Int iNumRefPics = pcSlice->getNumRefIdx( eRefPicList );916 for( Int iPdmRefIdx = 0; iPdmRefIdx < iNumRefPics; iPdmRefIdx++ )917 {918 if( pcSlice->getRefPOC( eRefPicList, iPdmRefIdx ) == pcSlice->getPOC())919 {920 abPdmAvailable[ iRefListId+2 ] = true;921 paiPdmRefIdx [ iRefListId+2 ] = iPdmRefIdx;922 #if H3D_NBDV923 TComMv cMv = pDInfo->m_acMvCand[0];924 cMv.setVer(0);925 #else926 TComMv cMv(iDisparity, 0);927 #endif928 pcCU->clipMv( cMv );929 pacPdmMv [ iRefListId + 2] = cMv;930 break;931 }932 }933 }934 iPdmInterDir = ( abPdmAvailable[2] ? 1 : 0 ) + ( abPdmAvailable[3] ? 2 : 0 ) ;935 iPdm[1] = iPdmInterDir;936 937 return iPdmInterDir;938 }939 940 #if H3D_NBDV941 Bool942 TComDepthMapGenerator::getDisCanPdmMvPred ( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge )943 {944 rcMv.m_bDvMcp = false;945 AOF ( m_bCreated && m_bInit );946 AOF ( iRefIdx >= 0 );947 AOF ( pcCU );948 TComSlice* pcSlice = pcCU->getSlice ();949 TComSPS* pcSPS = pcSlice->getSPS();950 AOF ( pcSPS->getViewId() == m_uiCurrViewId );951 TComPic* pcRefPic = pcSlice->getRefPic( eRefPicList, iRefIdx );952 UInt uiRefViewId = pcRefPic->getSPS()->getViewId();953 Int iRefPoc = pcRefPic->getPOC();954 Bool bInterview = ( uiRefViewId < m_uiCurrViewId );955 AOT( bInterview && iRefPoc != pcSlice->getPOC() );956 AOT( !bInterview && iRefPoc == pcSlice->getPOC() );957 Bool bPdmIView = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_IVIEW ) == PDM_USE_FOR_IVIEW );958 Bool bPdmInter = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_INTER ) == PDM_USE_FOR_INTER );959 Bool bPdmMerge = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE );960 ROTRS( ( bInterview && !bMerge ) && !bPdmIView, false );961 ROTRS( (!bInterview && !bMerge ) && !bPdmInter, false );962 ROTRS( bMerge && !bPdmMerge, false );963 Int iCurrPosX, iCurrPosY;964 TComMv cDisMv;965 966 if( bInterview )967 {968 rcMv = pDInfo->m_acMvCand[0];969 rcMv.setVer(0);970 return true;971 }972 for( UInt uiBId = 0; uiBId < m_uiCurrViewId; uiBId++ )973 {974 UInt uiBaseId = uiBId;975 976 if (m_uiCurrViewId >1 && uiBaseId ==1 )977 continue;978 979 TComPic* pcBasePic = m_pcAUPicAccess->getPic( uiBaseId );980 TComPicYuv* pcBaseRec = pcBasePic->getPicYuvRec ();981 UInt uiPartAddr;982 Int iWidth;983 Int iHeight;984 985 pcCU->getPartIndexAndSize( uiPartIdx, uiPartAddr, iWidth, iHeight );986 pcBaseRec->getTopLeftSamplePos( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY );987 iCurrPosX += ( ( iWidth - 1 ) >> 1 );988 iCurrPosY += ( ( iHeight - 1 ) >> 1 );989 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (pDInfo->m_acMvCand[0].getHor() + 2 ) >> 2 ) );990 Int iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (pDInfo->m_acMvCand[0].getVer() + 2 ) >> 2 ));991 Int iBaseCUAddr;992 Int iBaseAbsPartIdx;993 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx );994 TComDataCU* pcBaseCU = pcBasePic->getCU( iBaseCUAddr );995 if( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) != MODE_INTER && pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) != MODE_SKIP )996 {997 continue;998 }999 for( UInt uiBaseRefListId = 0; uiBaseRefListId < 2; uiBaseRefListId++ )1000 {1001 RefPicList eBaseRefPicList = RefPicList( uiBaseRefListId );1002 TComMvField cBaseMvField;1003 pcBaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField );1004 Int iBaseRefIdx = cBaseMvField.getRefIdx();1005 Int iBaseRefPoc = ( iBaseRefIdx >= 0 ? pcBaseCU->getSlice()->getRefPic( eBaseRefPicList, iBaseRefIdx )->getPOC() : -(1<<30) );1006 if( iBaseRefIdx >= 0 && iBaseRefPoc == iRefPoc )1007 {1008 rcMv.set( cBaseMvField.getHor(), cBaseMvField.getVer() );1009 // save disparity vector when a merge candidate for IVMP is set as DV-MCP1010 if( bMerge )1011 {1012 rcMv.m_bDvMcp = true;1013 rcMv.m_iDvMcpDispX = pDInfo->m_acMvCand[0].getHor();1014 #if MTK_RELEASE_DV_CONSTRAINT_C01291015 rcMv.m_iDvMcpDispY = pDInfo->m_acMvCand[0].getVer();1016 #endif1017 }1018 else { // AMVP ?1019 rcMv.m_bDvMcp = false;1020 }1021 return true;1022 }1023 }1024 }1025 return false;1026 }1027 #else // H3D_NBDV1028 Bool1029 TComDepthMapGenerator::getPdmMvPred( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, Bool bMerge )1030 {1031 AOF ( m_bCreated && m_bInit );1032 AOF ( iRefIdx >= 0 );1033 AOF ( pcCU );1034 ROFRS( m_bPDMAvailable, false );1035 1036 TComSlice* pcSlice = pcCU->getSlice ();1037 TComPic* pcPic = pcCU->getPic ();1038 TComSPS* pcSPS = pcSlice->getSPS();1039 AOF ( pcPic->getPredDepthMap() );1040 AOF ( pcSPS->getViewId() == m_uiCurrViewId );1041 1042 TComPic* pcRefPic = pcSlice->getRefPic( eRefPicList, iRefIdx );1043 UInt uiRefViewId = pcRefPic->getSPS()->getViewId();1044 Int iRefPoc = pcRefPic->getPOC();1045 Bool bInterview = ( uiRefViewId < m_uiCurrViewId );1046 AOT( bInterview && iRefPoc != pcSlice->getPOC() );1047 AOT( !bInterview && iRefPoc == pcSlice->getPOC() );1048 1049 Bool bPdmIView = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_IVIEW ) == PDM_USE_FOR_IVIEW );1050 Bool bPdmInter = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_INTER ) == PDM_USE_FOR_INTER );1051 Bool bPdmMerge = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE );1052 ROTRS( ( bInterview && !bMerge ) && !bPdmIView, false );1053 ROTRS( (!bInterview && !bMerge ) && !bPdmInter, false );1054 ROTRS( bMerge && !bPdmMerge, false );1055 1056 //===== get predicted depth for middle position of current PU =====1057 Int iPrdDepth, iCurrPosX, iCurrPosY;1058 Bool bAvailable = xGetPredDepth( pcCU, uiPartIdx, iPrdDepth, &iCurrPosX, &iCurrPosY );1059 AOF( bAvailable );1060 1061 //===== inter-view motion vector prediction =====1062 if( bInterview )1063 {1064 Int iDisparity = xGetDisparityFromVirtDepth( uiRefViewId, iPrdDepth );1065 rcMv.set ( iDisparity, 0 );1066 return true;1067 }1068 1069 //===== inter motion vector prediction =====1070 for( UInt uiBId = 0; uiBId < m_uiCurrViewId; uiBId++ )1071 {1072 //--- get base CU/PU and check prediction mode ---1073 UInt uiBaseId = m_auiBaseIdList[ uiBId ];1074 #if PDM_REMOVE_DEPENDENCE1075 if( uiBaseId != 0)1076 continue;1077 #endif1078 TComPic* pcBasePic = m_pcAUPicAccess->getPic( uiBaseId );1079 TComPicYuv* pcBasePdm = pcBasePic->getPredDepthMap();1080 TComPicYuv* pcBaseRec = pcBasePic->getPicYuvRec ();1081 Int iDisparity = xGetDisparityFromVirtDepth( uiBaseId, iPrdDepth );1082 Int iShiftX = m_uiSubSampExpX + 2;1083 Int iAddX = ( 1 << iShiftX ) >> 1;1084 Int iBasePosX = Clip3( 0, pcBasePdm->getWidth () - 1, iCurrPosX + ( ( iDisparity + iAddX ) >> iShiftX ) );1085 Int iBasePosY = Clip3( 0, pcBasePdm->getHeight() - 1, iCurrPosY );1086 Int iBaseCUAddr;1087 Int iBaseAbsPartIdx;1088 pcBaseRec->getCUAddrAndPartIdx( iBasePosX << m_uiSubSampExpX, iBasePosY << m_uiSubSampExpY, iBaseCUAddr, iBaseAbsPartIdx );1089 TComDataCU* pcBaseCU = pcBasePic->getCU( iBaseCUAddr );1090 if( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) != MODE_INTER && pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) != MODE_SKIP )1091 {1092 continue;1093 }1094 1095 for( UInt uiBaseRefListId = 0; uiBaseRefListId < 2; uiBaseRefListId++ )1096 {1097 RefPicList eBaseRefPicList = RefPicList( uiBaseRefListId );1098 TComMvField cBaseMvField;1099 pcBaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField );1100 Int iBaseRefIdx = cBaseMvField.getRefIdx();1101 Int iBaseRefPoc = ( iBaseRefIdx >= 0 ? pcBaseCU->getSlice()->getRefPic( eBaseRefPicList, iBaseRefIdx )->getPOC() : -(1<<30) );1102 if( iBaseRefIdx >= 0 && iBaseRefPoc == iRefPoc )1103 {1104 rcMv.set( cBaseMvField.getHor(), cBaseMvField.getVer() );1105 return true;1106 }1107 }1108 }1109 return false;1110 }1111 #endif // H3D_NBDV1112 #endif // QC_AMVP_MRG_UNIFY_IVCAN_C00511113 783 1114 784 -
trunk/source/Lib/TLibCommon/TComDepthMapGenerator.h
r296 r332 152 152 #if H3D_IVMP 153 153 #if H3D_NBDV 154 #if QC_AMVP_MRG_UNIFY_IVCAN_C0051155 154 Bool getPdmCandidate ( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm, Bool bMerge ); 156 #else157 Int getPdmMergeCandidate ( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm );158 Bool getPdmMvPredDisCan ( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge );159 Bool getDisCanPdmMvPred ( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge );160 #endif161 155 #else 162 156 Int getPdmMergeCandidate ( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv ); -
trunk/source/Lib/TLibCommon/TComMotionInfo.h
r296 r332 66 66 Int iN; ///< number of motion vector predictor candidates 67 67 } DisInfo; 68 69 typedef struct _McpDisCand 70 { 71 TComMv m_acMvCand[2][ MCP_DIS_CANS ]; ///< array of motion vector predictor candidates 72 Int m_aVIdxCan[2][ MCP_DIS_CANS ]; ///< array of motion vector predictor candidates 73 Bool m_bAvailab[2][ MCP_DIS_CANS ]; 74 Bool m_bFound; ///< number of motion vector predictor candidates 75 } McpDisInfo; 76 68 77 #endif 69 78 // Class definition -
trunk/source/Lib/TLibCommon/TComMv.h
r296 r332 60 60 Bool m_bDvMcp; // is dv-mcp ? 61 61 Int m_iDvMcpDispX; // disparity for dv-mcp 62 #if MTK_RELEASE_DV_CONSTRAINT_C012963 62 Int m_iDvMcpDispY; // disparity for dv-mcp 64 #endif65 63 #endif 66 64 … … 75 73 , m_bDvMcp(false) 76 74 , m_iDvMcpDispX(0) 77 #if MTK_RELEASE_DV_CONSTRAINT_C012978 75 , m_iDvMcpDispY(0) 79 #endif80 76 #endif 81 77 { … … 88 84 , m_bDvMcp(false) 89 85 , m_iDvMcpDispX(0) 90 #if MTK_RELEASE_DV_CONSTRAINT_C012991 86 , m_iDvMcpDispY(0) 92 #endif93 87 #endif 94 88 { -
trunk/source/Lib/TLibCommon/TComPic.cpp
r313 r332 85 85 m_aaiCodedScale = 0; 86 86 m_aaiCodedOffset = 0; 87 #if OL_QTLIMIT_PREDCODING_B006887 #if H3D_QTL 88 88 m_bReduceBitsQTL = 0; 89 89 #endif -
trunk/source/Lib/TLibCommon/TComPic.h
r313 r332 121 121 Int** m_aaiCodedOffset; 122 122 123 #if OL_QTLIMIT_PREDCODING_B0068123 #if H3D_QTL 124 124 Bool m_bReduceBitsQTL; 125 125 #endif … … 203 203 #endif 204 204 205 #if OL_QTLIMIT_PREDCODING_B0068205 #if H3D_QTL 206 206 Bool getReduceBitsFlag () { return m_bReduceBitsQTL; } 207 207 Void setReduceBitsFlag ( Bool bFlag ) { m_bReduceBitsQTL = bFlag; } -
trunk/source/Lib/TLibCommon/TComPicYuv.cpp
r313 r332 468 468 Void TComPicYuv::setLumaTo( Pel pVal ) 469 469 { 470 xSetPels( getLumaAddr(), getStride(), getWidth(), getHeight() >> 1, pVal );470 xSetPels( getLumaAddr(), getStride(), getWidth(), getHeight(), pVal ); 471 471 } 472 472 -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r313 r332 636 636 #endif 637 637 { 638 #if DEPTH_MAP_GENERATION639 638 #if MERL_VSP_C0152 640 639 xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, true ); … … 642 641 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, true ); 643 642 #endif 644 #else645 #if MERL_VSP_C0152646 xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, true );647 #else648 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, true );649 #endif650 #endif651 643 } 652 644 else 653 645 { 654 #if DEPTH_MAP_GENERATION655 646 #if MERL_VSP_C0152 656 647 xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false ); … … 658 649 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false ); 659 650 #endif 660 #else661 #if MERL_VSP_C0152662 xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, false );663 #else664 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, false );665 #endif666 #endif667 651 } 668 652 #if LGE_ILLUCOMP_B0045 … … 677 661 else 678 662 { 679 #if DEPTH_MAP_GENERATION680 663 if( xCheckIdenticalMotion( pcCU, uiPartAddr ) && !bPrdDepthMap ) 681 #else 682 if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) ) 683 #endif 684 { 685 #if DEPTH_MAP_GENERATION 664 { 686 665 #if MERL_VSP_C0152 687 666 xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false ); … … 689 668 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false ); 690 669 #endif 691 #else692 #if MERL_VSP_C0152693 xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred, iPartIdx, false );694 #else695 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred, iPartIdx, false );696 #endif697 #endif698 670 } 699 671 else 700 672 { 701 #if DEPTH_MAP_GENERATION702 673 #if MERL_VSP_C0152 703 674 xPredInterBi (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, uiSubSampExpX, uiSubSampExpY, pcYuvPred, iPartIdx, bPrdDepthMap ); … … 705 676 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, uiSubSampExpX, uiSubSampExpY, pcYuvPred, iPartIdx, bPrdDepthMap ); 706 677 #endif 707 #else708 #if MERL_VSP_C0152709 xPredInterBi (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, pcYuvPred, iPartIdx );710 #else711 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred, iPartIdx );712 #endif713 #endif714 678 } 715 679 } … … 721 685 pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iWidth, iHeight ); 722 686 723 #if DEPTH_MAP_GENERATION724 687 if( bPrdDepthMap ) 725 688 { … … 727 690 iHeight >>= uiSubSampExpY; 728 691 } 729 #endif730 692 731 693 if ( eRefPicList != REF_PIC_LIST_X ) … … 737 699 #endif 738 700 { 739 #if DEPTH_MAP_GENERATION740 701 #if MERL_VSP_C0152 741 702 xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, true ); … … 743 704 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, true ); 744 705 #endif 745 #else746 #if MERL_VSP_C0152747 xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, true );748 #else749 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, true );750 #endif751 #endif752 706 } 753 707 else 754 708 { 755 #if DEPTH_MAP_GENERATION756 709 #if MERL_VSP_C0152 757 710 xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false ); … … 759 712 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false ); 760 713 #endif 761 #else 762 #if MERL_VSP_C0152 763 xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, false ); 764 #else 765 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, false ); 766 #endif 767 #endif 768 } 769 #if DEPTH_MAP_GENERATION 714 } 770 715 #if MERL_VSP_C0152 771 716 xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false ); … … 773 718 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false ); 774 719 #endif 775 #else 776 #if MERL_VSP_C0152 777 xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, false ); 778 #else 779 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, false ); 780 #endif 781 #endif 720 782 721 #if LGE_ILLUCOMP_B0045 783 722 if( pcCU->getSlice()->getPPS()->getUseWP() && !pcCU->getICFlag(uiPartAddr)) … … 793 732 if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) ) 794 733 { 795 #if DEPTH_MAP_GENERATION796 734 #if MERL_VSP_C0152 797 735 xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false ); … … 799 737 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false ); 800 738 #endif 801 #else802 #if MERL_VSP_C0152803 xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred, iPartIdx, false );804 #else805 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred, iPartIdx, false );806 #endif807 #endif808 739 } 809 740 else 810 741 { 811 #if DEPTH_MAP_GENERATION812 742 #if MERL_VSP_C0152 813 743 xPredInterBi (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, uiSubSampExpX, uiSubSampExpY, pcYuvPred, iPartIdx, bPrdDepthMap ); … … 815 745 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, uiSubSampExpX, uiSubSampExpY, pcYuvPred, iPartIdx, bPrdDepthMap ); 816 746 #endif 817 #else818 #if MERL_VSP_C0152819 xPredInterBi (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, pcYuvPred, iPartIdx );820 #else821 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred, iPartIdx );822 #endif823 #endif824 747 } 825 748 } … … 828 751 } 829 752 830 #if MTK_MDIVRP_C0138753 #if H3D_IVRP 831 754 Void TComPrediction::residualPrediction(TComDataCU* pcCU, TComYuv* pcYuvPred, TComYuv* pcYuvResPred) 832 755 { … … 847 770 #endif 848 771 849 #if DEPTH_MAP_GENERATION850 772 #if MERL_VSP_C0152 851 773 Void TComPrediction::xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap, UInt uiSubSampExpX, UInt uiSubSampExpY, Bool bi ) 852 774 #else 853 775 Void TComPrediction::xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap, UInt uiSubSampExpX, UInt uiSubSampExpY, Bool bi ) 854 #endif855 #else856 #if MERL_VSP_C0152857 Void TComPrediction::xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bi )858 #else859 Void TComPrediction::xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bi )860 #endif861 776 #endif 862 777 { … … 887 802 { 888 803 UInt uiRShift = 0; 889 #if PDM_REMOVE_DEPENDENCE890 804 if( pcCU->getPic()->getStoredPDMforV2() == 1 ) 891 805 xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPredDepthMapTemp(), uiPartAddr, &cMv, iWidth, iHeight, uiSubSampExpX, uiSubSampExpY, rpcYuvPred, uiRShift, 0 ); 892 806 else 893 #endif894 807 xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPredDepthMap(), uiPartAddr, &cMv, iWidth, iHeight, uiSubSampExpX, uiSubSampExpY, rpcYuvPred, uiRShift, 0 ); 895 808 … … 1001 914 1002 915 1003 #if DEPTH_MAP_GENERATION1004 916 #if MERL_VSP_C0152 1005 917 Void TComPrediction::xPredInterBi ( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap ) … … 1007 919 Void TComPrediction::xPredInterBi ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap ) 1008 920 #endif 1009 #else1010 #if MERL_VSP_C01521011 Void TComPrediction::xPredInterBi ( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx, Int iWidth, Int iHeight, TComYuv*& rpcYuvPred, Int iPartIdx )1012 #else1013 Void TComPrediction::xPredInterBi ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvPred, Int iPartIdx )1014 #endif1015 #endif1016 921 { 1017 922 TComYuv* pcMbYuv; … … 1050 955 if( pcCU->getCUMvField( REF_PIC_LIST_0 )->getRefIdx( uiPartAddr ) >= 0 && pcCU->getCUMvField( REF_PIC_LIST_1 )->getRefIdx( uiPartAddr ) >= 0 ) 1051 956 { 1052 #if DEPTH_MAP_GENERATION1053 957 #if MERL_VSP_C0152 1054 958 xPredInterUni ( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, true ); 1055 959 #else 1056 960 xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, true ); 1057 #endif1058 #else1059 #if MERL_VSP_C01521060 xPredInterUni ( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, true );1061 #else1062 xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, true );1063 #endif1064 961 #endif 1065 962 } … … 1073 970 #endif 1074 971 { 1075 #if DEPTH_MAP_GENERATION1076 972 #if MERL_VSP_C0152 1077 973 xPredInterUni ( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, true ); … … 1079 975 xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, true ); 1080 976 #endif 1081 #else1082 #if MERL_VSP_C01521083 xPredInterUni ( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, true );1084 #else1085 xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, true );1086 #endif1087 #endif1088 977 } 1089 978 else 1090 979 { 1091 #if DEPTH_MAP_GENERATION1092 980 #if MERL_VSP_C0152 1093 981 xPredInterUni ( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false ); 1094 982 #else 1095 983 xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false ); 1096 #endif1097 #else1098 #if MERL_VSP_C01521099 xPredInterUni ( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, false );1100 #else1101 xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, false );1102 #endif1103 984 #endif 1104 985 } … … 1132 1013 else 1133 1014 { 1134 #if DEPTH_MAP_GENERATION1135 1015 if ( bPrdDepthMap ) 1136 1016 { … … 1146 1026 xWeightedAverage( pcCU, &m_acYuvPred[0], &m_acYuvPred[1], iRefIdx[0], iRefIdx[1], uiPartAddr, iWidth, iHeight, rpcYuvPred ); 1147 1027 } 1148 #else1149 xWeightedAverage( pcCU, &m_acYuvPred[0], &m_acYuvPred[1], iRefIdx[0], iRefIdx[1], uiPartAddr, iWidth, iHeight, rpcYuvPred );1150 #endif1151 1028 } 1152 1029 } … … 1155 1032 1156 1033 Void 1157 #if DEPTH_MAP_GENERATION1158 1034 TComPrediction::xPredInterPrdDepthMap( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset 1159 1035 #if LGE_ILLUCOMP_DEPTH_C0046 … … 1161 1037 #endif 1162 1038 ) 1163 #else 1164 TComPrediction::xPredInterPrdDepthMap( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset ) 1165 #endif 1166 { 1167 #if DEPTH_MAP_GENERATION 1039 { 1168 1040 Int iShiftX = 2 + uiSubSampExpX; 1169 1041 Int iShiftY = 2 + uiSubSampExpY; … … 1182 1054 Int iDstStride = rpcYuv->getStride(); 1183 1055 Int iRefOffset = iHor + iVer * iRefStride; 1184 #else1185 Int iFPelMask = ~3;1186 Int iRefStride = pcPicYuvRef->getStride();1187 Int iDstStride = rpcYuv->getStride();1188 Int iHor = ( pcMv->getHor() + 2 ) & iFPelMask;1189 Int iVer = ( pcMv->getVer() + 2 ) & iFPelMask;1190 #if HHI_FULL_PEL_DEPTH_MAP_MV_ACC1191 if( pcCU->getSlice()->getSPS()->isDepth() )1192 {1193 iHor = pcMv->getHor() * 4;1194 iVer = pcMv->getVer() * 4;1195 }1196 #endif1197 #if !QC_MVHEVC_B00461198 Int ixFrac = iHor & 0x3;1199 Int iyFrac = iVer & 0x3;1200 #endif1201 Int iRefOffset = ( iHor >> 2 ) + ( iVer >> 2 ) * iRefStride;1202 #endif1203 1056 1204 1057 Pel* piRefY = pcPicYuvRef->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr ) + iRefOffset; … … 1454 1307 Int dstStride = dstPic->getStride(); 1455 1308 Int depStride = pPicBaseDepth->getStride(); 1456 #if MTK_DVPREFINE_BVSP_BUG_FIX1457 1309 Int depthPosX = Clip3(0, widthLuma - size_x, (posX/nTxtPerDepthX) + (mv->getHor()>>2)); 1458 1310 Int depthPosY = Clip3(0, heightLuma- size_y, (posY/nTxtPerDepthY) + (mv->getVer()>>2)); 1459 #else1460 Int depthPosX = Clip3(0, widthLuma - size_x - 1, (posX/nTxtPerDepthX) + (mv->getHor()>>2));1461 Int depthPosY = Clip3(0, heightLuma- size_y - 1, (posY/nTxtPerDepthY) + (mv->getVer()>>2));1462 #endif1463 1311 Pel *ref = refPic->getLumaAddr() + posX + posY * refStride; 1464 1312 Pel *dst = dstPic->getLumaAddr(partAddr); … … 1618 1466 depthPosX = posX * nDepthPerTxtX + (mv->getHor()>>2); //mv denotes the disparity for VSP 1619 1467 } 1620 #if MTK_DVPREFINE_BVSP_BUG_FIX1621 1468 depthPosX = Clip3(0, widthDepth - (size_x<<1), depthPosX); 1622 #else1623 depthPosX = Clip3(0, widthDepth - (size_x<<1) - 1, depthPosX);1624 #endif1625 1469 if ( heightChroma > heightDepth ) 1626 1470 { … … 1635 1479 depthPosY = posY * nDepthPerTxtY + (mv->getVer()>>2); //mv denotes the disparity for VSP 1636 1480 } 1637 #if MTK_DVPREFINE_BVSP_BUG_FIX1638 1481 depthPosY = Clip3(0, heightDepth - (size_y<<1), depthPosY); 1639 #else1640 depthPosY = Clip3(0, heightDepth - (size_y<<1) - 1, depthPosY);1641 #endif1642 1482 1643 1483 Pel *refCb = refPic->getCbAddr() + posX + posY * refStride; … … 2384 2224 iCUPelX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]]; 2385 2225 iCUPelY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]]; 2386 #if FIX_LGE_ILLUCOMP_B00452387 2226 iRefX = iCUPelX + (pMv->getHor() >> 2); 2388 2227 iRefY = iCUPelY + (pMv->getVer() >> 2); 2389 #else2390 iRefX = iCUPelX + (pMv->getHor() >> 3);2391 iRefY = iCUPelY + (pMv->getVer() >> 3);2392 #endif2393 2228 uiWidth = pcCU->getWidth(0) >> 1; 2394 2229 uiHeight = pcCU->getHeight(0) >> 1; … … 3037 2872 getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft ); 3038 2873 3039 #if HHI_DMM_DELTADC_Q1_C00343040 #else3041 if( bDelta )3042 {3043 xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 );3044 xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );3045 }3046 #endif3047 3048 2874 // assign wedge pred DCs to prediction 3049 2875 if( bDelta ) { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, Clip ( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); } … … 3064 2890 piMask += iMaskStride+1; 3065 2891 getWedgePredDCs( pcContourWedge, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft ); 3066 3067 #if HHI_DMM_DELTADC_Q1_C00343068 #else3069 if( bDelta )3070 {3071 xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 );3072 xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );3073 }3074 #endif3075 2892 3076 2893 // assign wedge pred DCs to prediction … … 3249 3066 getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft ); 3250 3067 3251 #if HHI_DMM_DELTADC_Q1_C00343252 #else3253 if( bDelta )3254 {3255 xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 );3256 xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );3257 }3258 #endif3259 3260 3068 // assign wedge pred DCs to prediction 3261 3069 if( bDelta ) { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, Clip( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); } … … 3292 3100 piMask += iMaskStride+1; 3293 3101 getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft ); 3294 3295 #if HHI_DMM_DELTADC_Q1_C00343296 #else3297 if( bDelta )3298 {3299 xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 );3300 xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );3301 }3302 #endif3303 3102 3304 3103 // assign wedge pred DCs to prediction -
trunk/source/Lib/TLibCommon/TComPrediction.h
r296 r332 86 86 87 87 // motion compensation functions 88 #if DEPTH_MAP_GENERATION89 88 #if MERL_VSP_C0152 90 89 Void xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap, UInt uiSubSampExpX = 0, UInt uiSubSampExpY = 0, Bool bi=false ); … … 92 91 Void xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap, UInt uiSubSampExpX = 0, UInt uiSubSampExpY = 0, Bool bi=false ); 93 92 #endif 94 #else 95 #if MERL_VSP_C0152 96 Void xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bi=false ); 97 #else 98 Void xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bi=false ); 99 #endif 100 #endif 101 102 #if DEPTH_MAP_GENERATION 93 103 94 #if MERL_VSP_C0152 104 95 Void xPredInterBi ( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap ); … … 111 102 #endif 112 103 ); 113 #else 114 #if MERL_VSP_C0152 115 Void xPredInterBi ( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx, Int iWidth, Int iHeight, TComYuv*& rpcYuvPred, Int iPartIdx ); 116 #else 117 Void xPredInterBi ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvPred, Int iPartIdx ); 118 #endif 119 Void xPredInterPrdDepthMap ( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset ); 120 #endif 104 121 105 #if MERL_VSP_C0152 122 106 Void xPredInterUniBWVSP ( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap, UInt uiSubSampExpX, UInt uiSubSampExpY, Bool bi=false ); … … 179 163 180 164 // inter 181 #if DEPTH_MAP_GENERATION182 165 #if MERL_VSP_C0152 183 166 Void motionCompensation ( TComDataCU* pcCU, TComYuv* pcYuvPred, UInt uiAbsPartIdx, RefPicList eRefPicList = REF_PIC_LIST_X, Int iPartIdx = -1, Bool bPrdDepthMap = false, UInt uiSubSampExpX = 0, UInt uiSubSampExpY = 0 ); … … 185 168 Void motionCompensation ( TComDataCU* pcCU, TComYuv* pcYuvPred, RefPicList eRefPicList = REF_PIC_LIST_X, Int iPartIdx = -1, Bool bPrdDepthMap = false, UInt uiSubSampExpX = 0, UInt uiSubSampExpY = 0 ); 186 169 #endif 187 #else 188 #if MERL_VSP_C0152 189 Void motionCompensation ( TComDataCU* pcCU, TComYuv* pcYuvPred, UInt uiAbsPartIdx,, RefPicList eRefPicList = REF_PIC_LIST_X, Int iPartIdx = -1 ); 190 #else 191 Void motionCompensation ( TComDataCU* pcCU, TComYuv* pcYuvPred, RefPicList eRefPicList = REF_PIC_LIST_X, Int iPartIdx = -1 ); 192 #endif 193 #endif 194 195 #if MTK_MDIVRP_C0138 170 171 #if H3D_IVRP 196 172 Void residualPrediction (TComDataCU* pcCU, TComYuv* pcYuvPred, TComYuv* pcYuvResPred); 197 173 #endif -
trunk/source/Lib/TLibCommon/TComResidualGenerator.cpp
r313 r332 184 184 AOF ( pcPic ); 185 185 186 #if MTK_MDIVRP_C0138186 #if H3D_IVRP 187 187 if (pcPic->getSPS()->getViewId() != 0) 188 188 { … … 227 227 228 228 #if H3D_NBDV 229 #if MTK_RELEASE_DV_CONSTRAINT_C0129230 229 Bool 231 230 TComResidualGenerator::getResidualSamples( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv, TComMv iDisp, Bool bRecon ) 232 #else233 Bool234 TComResidualGenerator::getResidualSamples( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv, Int iDisp, Bool bRecon )235 #endif236 231 #else 237 232 Bool … … 248 243 pcCU->getPic()->getPicYuvRec()->getTopLeftSamplePos( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr, iXPos, iYPos ); 249 244 #if H3D_NBDV 250 #if MTK_RELEASE_DV_CONSTRAINT_C0129251 return getResidualSamples( pcCU->getPic(), (UInt)iXPos, (UInt)iYPos, (UInt)iBlkWidth, (UInt)iBlkHeight, pcYuv, iDisp, bRecon);252 #else253 245 return getResidualSamples( pcCU->getPic(), (UInt)iXPos, (UInt)iYPos, (UInt)iBlkWidth, (UInt)iBlkHeight, pcYuv, iDisp, bRecon); 254 #endif255 246 #else 256 247 return getResidualSamples( pcCU->getPic(), (UInt)iXPos, (UInt)iYPos, (UInt)iBlkWidth, (UInt)iBlkHeight, pcYuv, bRecon); … … 259 250 260 251 #if H3D_NBDV 261 #if MTK_RELEASE_DV_CONSTRAINT_C0129262 252 Bool 263 253 TComResidualGenerator::getResidualSamples( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, TComMv iDisp, Bool bRecon) 264 254 #else 265 255 Bool 266 TComResidualGenerator::getResidualSamples( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, Int iDisp, Bool bRecon)267 #endif268 #else269 Bool270 256 TComResidualGenerator::getResidualSamples( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, Bool bRecon) 271 257 #endif 272 258 { 273 #if MTK_C0138_FIXED274 259 UInt uiBaseViewId = 0; 275 #else276 UInt uiBaseViewId = m_pcDepthMapGenerator->getBaseViewId( 0 );277 #endif278 260 if( !pcYuv ) 279 261 { … … 282 264 UInt uiXPosInRefView = uiXPos , uiYPosInRefView = uiYPos; 283 265 #if H3D_NBDV 284 #if MTK_RELEASE_DV_CONSTRAINT_C0129285 266 xSetPredResidualBlock( pcPic, uiBaseViewId, uiXPos, uiYPos, uiBlkWidth, uiBlkHeight, pcYuv, iDisp, &uiXPosInRefView , &uiYPosInRefView , bRecon ); 286 #else287 xSetPredResidualBlock( pcPic, uiBaseViewId, uiXPos, uiYPos, uiBlkWidth, uiBlkHeight, pcYuv, iDisp, &uiXPosInRefView , &uiYPosInRefView , bRecon );288 #endif289 267 #else 290 268 xSetPredResidualBlock( pcPic, uiBaseViewId, uiXPos, uiYPos, uiBlkWidth, uiBlkHeight, pcYuv, &uiXPosInRefView , &uiYPosInRefView , bRecon ); 291 269 #endif 292 #if MTK_MDIVRP_C0138293 270 return true; 294 #else295 return xIsNonZeroByCBF( uiBaseViewId , uiXPosInRefView , uiYPosInRefView , uiBlkWidth , uiBlkHeight );296 #endif297 271 } 298 272 … … 411 385 Pel* pRes = pcCUResidual->getLumaAddr(); 412 386 UInt uiLumaTrMode, uiChromaTrMode; 413 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138414 Int iPUPredResiShift[4];415 #endif416 387 pcCU->convertTransIdx ( 0, pcCU->getTransformIdx( 0 ), uiLumaTrMode, uiChromaTrMode ); 417 388 m_pcTrQuant->setQPforQuant ( pcCU->getQP( 0 ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA, pcCU->getSlice()->getSPS()->getQpBDOffsetY(), 0 ); … … 429 400 m_pcTrQuant->invRecurTransformNxN ( pcCU, 0, TEXT_CHROMA_V, pRes, 0, pcCUResidual->getCStride(), uiWidth, uiHeight, uiChromaTrMode, 0, piCoeff ); 430 401 431 #if !MTK_MDIVRP_C0138432 if( pcCU->getResPredFlag( 0 ) )433 {434 AOF( pcCU->getResPredAvail( 0 ) );435 Bool bOK = pcCU->getResidualSamples( 0, true, m_ppcYuvTmp[0] );436 AOF( bOK );437 #if LG_RESTRICTEDRESPRED_M24766438 pcCU->getPUResiPredShift(iPUPredResiShift, 0);439 pcCUResidual->add(iPUPredResiShift, pcCU->getPartitionSize(0), m_ppcYuvTmp[0], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );440 #else441 pcCUResidual->add( m_ppcYuvTmp[0], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );442 #endif443 }444 #endif445 446 402 //===== clear inter-view predicted parts ===== 447 403 for( UInt uiPartIdx = 0; uiPartIdx < pcCU->getNumPartInter(); uiPartIdx++ ) … … 500 456 501 457 #if H3D_NBDV 502 #if MTK_RELEASE_DV_CONSTRAINT_C0129503 458 Void 504 459 TComResidualGenerator::xSetPredResidualBlock( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, TComMv iDisp 505 460 ,UInt * puiXPosInRefView , UInt * puiYPosInRefView , Bool bRecon ) 506 #else // MTK_RELEASE_DV_CONSTRAINT_C0129507 Void508 TComResidualGenerator::xSetPredResidualBlock( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, Int iDisp509 ,UInt * puiXPosInRefView , UInt * puiYPosInRefView , Bool bRecon)510 #endif // MTK_RELEASE_DV_CONSTRAINT_C0129511 461 #else // H3D_NBDV 512 462 Void … … 531 481 //===== get disparity ===== 532 482 #if H3D_NBDV 533 #if MTK_RELEASE_DV_CONSTRAINT_C0129534 483 Int iDisparity_y = iDisp.getVer(); 535 484 Int iDisparity = iDisp.getHor(); 536 #else537 Int iDisparity = iDisp;538 #endif539 485 #else //H3D_NBDV 540 486 Int iMidPosX = Int( uiXPos + ( ( uiBlkWidth - 1 ) >> 1 ) ) >> m_pcDepthMapGenerator->getSubSampExpX(); … … 549 495 Int iYRefPosX0 = Int( uiXPos ) + ( iDisparity >> 2 ); 550 496 Int iYRefPosX1 = iYRefPosX0 + 1; 551 #if MTK_RELEASE_DV_CONSTRAINT_C0129552 497 Int iYMaxPosY = Int( uiPicHeight ) - 1; 553 498 Int iYWeight3 = ( iDisparity_y & 3 ); … … 555 500 Int iYRefPosY0 = Max( 0, Min( iYMaxPosY, Int( uiYPos ) + ( iDisparity_y >> 2 )) ); 556 501 Int iYRefPosY1 = Max( 0, Min( iYMaxPosY, iYRefPosY0 + 1 )); 557 #endif558 502 Int iYMaxPosX = Int( uiPicWidth ) - 1; 559 503 Int iSrcStrideY = pcBaseRes->getStride (); 560 504 Int iDesStrideY = pcYuv ->getStride (); 561 #if MTK_RELEASE_DV_CONSTRAINT_C0129562 505 Pel* pSrcSamplesY0= pcBaseRes->getLumaAddr ( 0 ) + iYRefPosY0 * iSrcStrideY; 563 506 Pel* pSrcSamplesY1= pcBaseRes->getLumaAddr ( 0 ) + iYRefPosY1 * iSrcStrideY; 564 #else565 Pel* pSrcSamplesY= pcBaseRes->getLumaAddr ( 0 ) + uiYPos * iSrcStrideY;566 #endif567 507 Pel* pDesSamplesY= pcYuv ->getLumaAddr (); 568 508 … … 575 515 return; 576 516 577 #if MTK_RELEASE_DV_CONSTRAINT_C0129578 517 for( Int iY = 0; iY < iYHeight; iY++, pSrcSamplesY0 += iSrcStrideY, pSrcSamplesY1 += iSrcStrideY, pDesSamplesY += iDesStrideY ) 579 #else580 for( Int iY = 0; iY < iYHeight; iY++, pSrcSamplesY += iSrcStrideY, pDesSamplesY += iDesStrideY )581 #endif582 518 { 583 519 for( Int iX = 0; iX < iYWidth; iX++ ) … … 585 521 Int iXPic0 = Max( 0, Min( iYMaxPosX, iYRefPosX0 + iX ) ); 586 522 Int iXPic1 = Max( 0, Min( iYMaxPosX, iYRefPosX1 + iX ) ); 587 #if MTK_RELEASE_DV_CONSTRAINT_C0129588 523 Pel Temp1,Temp2; 589 524 Temp1 =( iYWeight0 * pSrcSamplesY0[iXPic0] + iYWeight1 * pSrcSamplesY0[iXPic1] + 2 ) >> 2; 590 525 Temp2 =( iYWeight0 * pSrcSamplesY1[iXPic0] + iYWeight1 * pSrcSamplesY1[iXPic1] + 2 ) >> 2; 591 526 pDesSamplesY[iX] = ( iYWeight2 * Temp1 + iYWeight3 * Temp2 + 2 ) >> 2; 592 #else593 pDesSamplesY[iX] = ( iYWeight0 * pSrcSamplesY[iXPic0] + iYWeight1 * pSrcSamplesY[iXPic1] + 2 ) >> 2;594 #endif595 527 } 596 528 } … … 603 535 Int iCRefPosX0 = Int( uiXPos >> 1 ) + ( iDisparity >> 3 ); 604 536 Int iCRefPosX1 = iCRefPosX0 + 1; 605 #if MTK_RELEASE_DV_CONSTRAINT_C0129606 537 Int iCMaxPosY = Int( uiPicHeight >> 1 ) - 1; 607 538 Int iCWeight3 = ( iDisparity_y & 7 ); … … 609 540 Int iCRefPosY0 = Max( 0, Min( iCMaxPosY, Int( uiYPos >> 1 ) + ( iDisparity_y >> 3 )) ); 610 541 Int iCRefPosY1 = Max( 0, Min( iCMaxPosY, iCRefPosY0 + 1 )); 611 #endif612 542 Int iCMaxPosX = Int( uiPicWidth >> 1 ) - 1; 613 543 Int iSrcStrideC = pcBaseRes->getCStride(); 614 544 Int iDesStrideC = pcYuv ->getCStride(); 615 #if MTK_RELEASE_DV_CONSTRAINT_C0129 616 #if FIX_CHROMA_RESIDUAL_C0129 545 617 546 Pel* pSrcSamplesU0= pcBaseRes->getCbAddr ( 0 ) + iCRefPosY0 * iSrcStrideC; 618 547 Pel* pSrcSamplesU1= pcBaseRes->getCbAddr ( 0 ) + iCRefPosY1 * iSrcStrideC; 619 548 Pel* pSrcSamplesV0= pcBaseRes->getCrAddr ( 0 ) + iCRefPosY0 * iSrcStrideC; 620 549 Pel* pSrcSamplesV1= pcBaseRes->getCrAddr ( 0 ) + iCRefPosY1 * iSrcStrideC; 621 #else622 Pel* pSrcSamplesU0= pcBaseRes->getCbAddr ( 0 ) + ( iCRefPosY0 >> 1 ) * iSrcStrideC;623 Pel* pSrcSamplesU1= pcBaseRes->getCbAddr ( 0 ) + ( iCRefPosY1 >> 1 ) * iSrcStrideC;624 Pel* pSrcSamplesV0= pcBaseRes->getCrAddr ( 0 ) + ( iCRefPosY0 >> 1 ) * iSrcStrideC;625 Pel* pSrcSamplesV1= pcBaseRes->getCrAddr ( 0 ) + ( iCRefPosY1 >> 1 ) * iSrcStrideC;626 #endif627 #else628 Pel* pSrcSamplesU= pcBaseRes->getCbAddr ( 0 ) + ( uiYPos >> 1 ) * iSrcStrideC;629 Pel* pSrcSamplesV= pcBaseRes->getCrAddr ( 0 ) + ( uiYPos >> 1 ) * iSrcStrideC;630 #endif631 550 Pel* pDesSamplesU= pcYuv ->getCbAddr (); 632 551 Pel* pDesSamplesV= pcYuv ->getCrAddr (); 633 #if MTK_RELEASE_DV_CONSTRAINT_C0129634 552 for( Int iY = 0; iY < iCHeight; iY++, pSrcSamplesU0 += iSrcStrideC, pSrcSamplesU1 += iSrcStrideC, pDesSamplesU += iDesStrideC, 635 553 pSrcSamplesV0 += iSrcStrideC, pSrcSamplesV1 += iSrcStrideC, pDesSamplesV += iDesStrideC ) 636 #else637 for( Int iY = 0; iY < iCHeight; iY++, pSrcSamplesU += iSrcStrideC, pDesSamplesU += iDesStrideC,638 pSrcSamplesV += iSrcStrideC, pDesSamplesV += iDesStrideC )639 #endif640 554 { 641 555 for( Int iX = 0; iX < iCWidth; iX++ ) … … 643 557 Int iXPic0 = Max( 0, Min( iCMaxPosX, iCRefPosX0 + iX ) ); 644 558 Int iXPic1 = Max( 0, Min( iCMaxPosX, iCRefPosX1 + iX ) ); 645 #if MTK_RELEASE_DV_CONSTRAINT_C0129646 559 Pel Temp1,Temp2; 647 560 Temp1 =( iCWeight0 * pSrcSamplesU0[iXPic0] + iCWeight1 * pSrcSamplesU0[iXPic1] + 4 ) >> 3; … … 651 564 Temp2 =( iCWeight0 * pSrcSamplesV1[iXPic0] + iCWeight1 * pSrcSamplesV1[iXPic1] + 4 ) >> 3; 652 565 pDesSamplesV[iX] = ( iCWeight2 * Temp1 + iCWeight3 * Temp2 + 4 ) >> 3; 653 #else654 pDesSamplesU[iX] = ( iCWeight0 * pSrcSamplesU[iXPic0] + iCWeight1 * pSrcSamplesU[iXPic1] + 4 ) >> 3;655 pDesSamplesV[iX] = ( iCWeight0 * pSrcSamplesV[iXPic0] + iCWeight1 * pSrcSamplesV[iXPic1] + 4 ) >> 3;656 #endif657 566 } 658 567 } -
trunk/source/Lib/TLibCommon/TComResidualGenerator.h
r296 r332 70 70 71 71 #if H3D_NBDV 72 #if MTK_RELEASE_DV_CONSTRAINT_C012973 72 Bool getResidualSamples ( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv, TComMv iDisp_x, Bool bRecon ); 74 73 Bool getResidualSamples ( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv , TComMv iDisp_x, Bool bRecon ); 75 #else76 Bool getResidualSamples ( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv, Int iDisp, Bool bRecon );77 Bool getResidualSamples ( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv , Int iDisp, Bool bRecon );78 #endif79 74 #else // H3D_NBDV 80 75 Bool getResidualSamples ( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv, Bool bRecon ); … … 90 85 Void xClearResidual ( TComYuv* pcCUResidual, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight ); 91 86 #if H3D_NBDV 92 #if MTK_RELEASE_DV_CONSTRAINT_C012993 87 Void xSetPredResidualBlock ( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, TComMv iDisp, UInt * puiXPosInRefView , UInt * puiYPosInRefView , Bool bRecon ); 94 #else95 Void xSetPredResidualBlock ( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, Int iDisp, UInt * puiXPosInRefView , UInt * puiYPosInRefView , Bool bRecon );96 #endif97 88 #else 98 89 Void xSetPredResidualBlock ( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, UInt * puiXPosInRefView , UInt * puiYPosInRefView , Bool bRecon ); -
trunk/source/Lib/TLibCommon/TComRom.cpp
r296 r332 306 306 307 307 #if RWTH_SDC_DLT_B0036 308 #if SAIT_SDC_C0096309 308 UInt g_auiSDCPredModes[RWTH_SDC_NUM_PRED_MODES] = { DC_IDX, DMM_WEDGE_FULL_IDX, PLANAR_IDX }; 310 #else311 UInt g_auiSDCPredModes[RWTH_SDC_NUM_PRED_MODES] = { DC_IDX, DMM_WEDGE_FULL_IDX, DMM_WEDGE_PREDDIR_IDX, PLANAR_IDX };312 #endif313 309 #endif 314 310 -
trunk/source/Lib/TLibCommon/TComRom.h
r296 r332 194 194 195 195 #if RWTH_SDC_DLT_B0036 196 #if SAIT_SDC_C0096197 196 #define RWTH_SDC_NUM_PRED_MODES 3 198 #else199 #define RWTH_SDC_NUM_PRED_MODES 4200 #endif201 197 extern UInt g_auiSDCPredModes[RWTH_SDC_NUM_PRED_MODES]; 202 198 #endif -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r313 r332 1546 1546 , m_bUseDMM34 (false) 1547 1547 #endif 1548 #if OL_QTLIMIT_PREDCODING_B00681548 #if H3D_QTL 1549 1549 , m_bUseQTLPC (false) 1550 1550 #endif -
trunk/source/Lib/TLibCommon/TComSlice.h
r313 r332 375 375 #endif 376 376 377 #if OL_QTLIMIT_PREDCODING_B0068377 #if H3D_QTL 378 378 Bool m_bUseQTLPC; 379 379 #endif … … 617 617 #endif 618 618 619 #if OL_QTLIMIT_PREDCODING_B0068619 #if H3D_QTL 620 620 Void setUseQTLPC( Bool b ) { m_bUseQTLPC = b; } 621 621 Bool getUseQTLPC() { return m_bUseQTLPC; } -
trunk/source/Lib/TLibCommon/TComYuv.cpp
r296 r332 392 392 } 393 393 394 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138395 Void396 TComYuv::add(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract )397 {398 addLuma (iPUResiPredShift, uhPartitionSize, pcYuvAdd, iWidth, iHeight, bSubtract );399 addChroma (iPUResiPredShift, uhPartitionSize, pcYuvAdd, iWidth>>1, iHeight>>1, bSubtract );400 }401 #else402 394 Void 403 395 TComYuv::add( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract ) … … 406 398 addChroma ( pcYuvAdd, iWidth>>1, iHeight>>1, bSubtract ); 407 399 } 408 #endif 409 410 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 411 Void 412 TComYuv::getPUXYOffset(PartSize uhPartitionSize, Int iWidth, Int iHeight, Int &iXOffset, Int &iYOffset) 413 { 414 switch(uhPartitionSize) 415 { 416 case SIZE_2NxN: 417 iXOffset = iWidth; iYOffset = iHeight >> 1; break; 418 case SIZE_2NxnU: 419 iXOffset = iWidth; iYOffset = iHeight >> 2; break; 420 case SIZE_2NxnD: 421 iXOffset = iWidth; iYOffset = (iHeight >> 1) + (iHeight >> 2); break; 422 case SIZE_Nx2N: 423 iXOffset = iWidth >> 1; iYOffset = iHeight; break; 424 case SIZE_nLx2N: 425 iXOffset = iWidth >> 2; iYOffset = iHeight; break; 426 case SIZE_nRx2N: 427 iXOffset = (iWidth >> 1) + (iWidth >> 2); iYOffset = iHeight; break; 428 case SIZE_NxN: 429 iXOffset = iWidth >> 1; iYOffset = iHeight >> 1; break; 430 default: 431 assert(uhPartitionSize == SIZE_2Nx2N); 432 iXOffset = iWidth; iYOffset = iHeight; break; 433 } 434 } 435 #endif 436 437 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 438 Void 439 TComYuv::addLuma(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract ) 440 #else 400 401 441 402 Void 442 403 TComYuv::addLuma( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract ) 443 #endif444 404 { 445 405 Int iScale = ( bSubtract ? -1 : 1 ); … … 449 409 Pel* pDstSamples = getLumaAddr(); 450 410 451 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138452 Int iXOffset, iYOffset;453 454 getPUXYOffset(uhPartitionSize, iWidth, iHeight, iXOffset, iYOffset);455 456 for( Int iY = 0; iY < iYOffset; iY++, pDstSamples += iDstStride, pAddSamples += iAddStride )457 {458 if(iPUResiPredShift[0] >= 0)459 {460 for( Int iX = 0; iX < iXOffset; iX++ )461 {462 pDstSamples[iX] += iScale * (pAddSamples[iX] >> iPUResiPredShift[0]);463 }464 }465 466 if(iPUResiPredShift[1] >= 0)467 {468 for( Int iX = iXOffset; iX < iWidth; iX++ )469 {470 pDstSamples[iX] += iScale * (pAddSamples[iX] >> iPUResiPredShift[1]);471 }472 }473 }474 475 for( Int iY = iYOffset; iY < iHeight; iY++, pDstSamples += iDstStride, pAddSamples += iAddStride )476 {477 if(iPUResiPredShift[2] >= 0)478 {479 for( Int iX = 0; iX < iXOffset; iX++ )480 {481 pDstSamples[iX] += iScale * (pAddSamples[iX] >> iPUResiPredShift[2]);482 }483 }484 485 if(iPUResiPredShift[3] >= 0)486 {487 for( Int iX = iXOffset; iX < iWidth; iX++ )488 {489 pDstSamples[iX] += iScale * (pAddSamples[iX] >> iPUResiPredShift[3]);490 }491 }492 }493 #else494 411 for( Int iY = 0; iY < iHeight; iY++, pDstSamples += iDstStride, pAddSamples += iAddStride ) 495 412 { … … 499 416 } 500 417 } 501 #endif 502 } 503 504 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 505 Void 506 TComYuv::addChroma(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract ) 507 #else 418 } 419 508 420 Void 509 421 TComYuv::addChroma( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract ) 510 #endif511 422 { 512 423 Int iScale = ( bSubtract ? -1 : 1 ); … … 518 429 Pel* pDstSamplesCr = getCrAddr(); 519 430 520 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138521 Int iXOffset, iYOffset;522 523 getPUXYOffset(uhPartitionSize, iWidth, iHeight, iXOffset, iYOffset);524 525 for( Int iY = 0; iY < iYOffset; iY++, pDstSamplesCb += iDstStride, pAddSamplesCb += iAddStride,526 pDstSamplesCr += iDstStride, pAddSamplesCr += iAddStride )527 {528 if(iPUResiPredShift[0] >= 0)529 {530 for( Int iX = 0; iX < iXOffset; iX++ )531 {532 pDstSamplesCb[iX] += iScale * (pAddSamplesCb[iX] >> iPUResiPredShift[0]);533 pDstSamplesCr[iX] += iScale * (pAddSamplesCr[iX] >> iPUResiPredShift[0]);534 }535 }536 537 if(iPUResiPredShift[1] >= 0)538 {539 for( Int iX = iXOffset; iX < iWidth; iX++ )540 {541 pDstSamplesCb[iX] += iScale * (pAddSamplesCb[iX] >> iPUResiPredShift[1]);542 pDstSamplesCr[iX] += iScale * (pAddSamplesCr[iX] >> iPUResiPredShift[1]);543 }544 }545 }546 547 for( Int iY = iYOffset; iY < iHeight; iY++, pDstSamplesCb += iDstStride, pAddSamplesCb += iAddStride,548 pDstSamplesCr += iDstStride, pAddSamplesCr += iAddStride )549 {550 if(iPUResiPredShift[2] >= 0)551 {552 for( Int iX = 0; iX < iXOffset; iX++ )553 {554 pDstSamplesCb[iX] += iScale * (pAddSamplesCb[iX] >> iPUResiPredShift[2]);555 pDstSamplesCr[iX] += iScale * (pAddSamplesCr[iX] >> iPUResiPredShift[2]);556 }557 }558 559 if(iPUResiPredShift[3] >= 0)560 {561 for( Int iX = iXOffset; iX < iWidth; iX++ )562 {563 pDstSamplesCb[iX] += iScale * (pAddSamplesCb[iX] >> iPUResiPredShift[3]);564 pDstSamplesCr[iX] += iScale * (pAddSamplesCr[iX] >> iPUResiPredShift[3]);565 }566 }567 }568 #else569 431 for( Int iY = 0; iY < iHeight; iY++, pDstSamplesCb += iDstStride, pAddSamplesCb += iAddStride, 570 432 pDstSamplesCr += iDstStride, pAddSamplesCr += iAddStride ) … … 576 438 } 577 439 } 578 #endif579 440 } 580 441 … … 676 537 } 677 538 678 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138679 Void TComYuv::subtract(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize )680 {681 subtractLuma (iPUResiPredShift, uhPartitionSize, pcYuvSrc0, pcYuvSrc1, uiTrUnitIdx, uiPartSize );682 subtractChroma(iPUResiPredShift, uhPartitionSize, pcYuvSrc0, pcYuvSrc1, uiTrUnitIdx, uiPartSize>>1 );683 }684 #else685 539 Void TComYuv::subtract( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize ) 686 540 { … … 688 542 subtractChroma( pcYuvSrc0, pcYuvSrc1, uiTrUnitIdx, uiPartSize>>1 ); 689 543 } 690 #endif 691 692 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 693 Void TComYuv::subtractLuma(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize ) 694 #else 544 695 545 Void TComYuv::subtractLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize ) 696 #endif697 546 { 698 547 Int x, y; … … 706 555 Int iDstStride = getStride(); 707 556 708 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 709 Int iXOffset, iYOffset; 710 711 getPUXYOffset(uhPartitionSize, uiPartSize, uiPartSize, iXOffset, iYOffset); 712 713 #if FIX_LG_RESTRICTEDRESPRED_M24766 714 for ( y = 0; y < iYOffset; y++ ) 715 { 716 if(iPUResiPredShift[0] >= 0) 717 { 718 for ( x = 0; x < iXOffset; x++ ) 719 { 720 pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[0]); 721 } 722 } 723 724 if(iPUResiPredShift[1] >= 0) 725 { 726 for ( x = iXOffset; x < uiPartSize; x++ ) 727 { 728 pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[1]); 729 } 557 for ( y = uiPartSize-1; y >= 0; y-- ) 558 { 559 for ( x = uiPartSize-1; x >= 0; x-- ) 560 { 561 pDst[x] = pSrc0[x] - pSrc1[x]; 730 562 } 731 563 pSrc0 += iSrc0Stride; … … 733 565 pDst += iDstStride; 734 566 } 735 736 for ( y = iYOffset; y < uiPartSize; y++ ) 737 { 738 if(iPUResiPredShift[2] >= 0) 739 { 740 for ( x = 0; x < iXOffset; x++ ) 741 { 742 pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[2]); 743 } 744 } 745 746 if(iPUResiPredShift[3] >= 0) 747 { 748 for ( x = iXOffset; x < uiPartSize; x++ ) 749 { 750 pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[3]); 751 } 752 } 753 pSrc0 += iSrc0Stride; 754 pSrc1 += iSrc1Stride; 755 pDst += iDstStride; 756 } 757 #else 758 for ( y = uiPartSize-1; y >= iYOffset; y-- ) 759 { 760 if(iPUResiPredShift[3] >= 0) 761 { 762 for ( x = uiPartSize-1; x >= iXOffset; x-- ) 763 { 764 pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[3]); 765 } 766 } 767 768 if(iPUResiPredShift[2] >= 0) 769 { 770 for ( x = iXOffset-1; x >= 0; x-- ) 771 { 772 pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[2]); 773 } 774 } 775 pSrc0 += iSrc0Stride; 776 pSrc1 += iSrc1Stride; 777 pDst += iDstStride; 778 } 779 780 for ( y = iYOffset-1; y >= 0; y-- ) 781 { 782 if(iPUResiPredShift[1] >= 0) 783 { 784 for ( x = uiPartSize-1; x >= iXOffset; x-- ) 785 { 786 pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[3]); 787 } 788 } 789 790 if(iPUResiPredShift[0] >= 0) 791 { 792 for ( x = iXOffset-1; x >= 0; x-- ) 793 { 794 pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[2]); 795 } 796 } 797 pSrc0 += iSrc0Stride; 798 pSrc1 += iSrc1Stride; 799 pDst += iDstStride; 800 } 801 #endif 802 #else 803 for ( y = uiPartSize-1; y >= 0; y-- ) 804 { 805 for ( x = uiPartSize-1; x >= 0; x-- ) 806 { 807 pDst[x] = pSrc0[x] - pSrc1[x]; 808 } 809 pSrc0 += iSrc0Stride; 810 pSrc1 += iSrc1Stride; 811 pDst += iDstStride; 812 } 813 #endif 814 } 815 816 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 817 Void TComYuv::subtractChroma(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize ) 818 #else 567 } 568 819 569 Void TComYuv::subtractChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize ) 820 #endif821 570 { 822 571 Int x, y; … … 832 581 Int iSrc1Stride = pcYuvSrc1->getCStride(); 833 582 Int iDstStride = getCStride(); 834 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 835 Int iXOffset, iYOffset; 836 837 getPUXYOffset(uhPartitionSize, uiPartSize, uiPartSize, iXOffset, iYOffset); 838 839 #if FIX_LG_RESTRICTEDRESPRED_M24766 840 for ( y = 0; y < iYOffset; y++ ) 841 { 842 if(iPUResiPredShift[0] >= 0) 843 { 844 for ( x = 0; x < iXOffset; x++ ) 845 { 846 pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[0]); 847 pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[0]); 848 } 849 } 850 851 if(iPUResiPredShift[1] >= 0) 852 { 853 for ( x = iXOffset; x < uiPartSize; x++ ) 854 { 855 pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[1]); 856 pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[1]); 857 } 583 for ( y = uiPartSize-1; y >= 0; y-- ) 584 { 585 for ( x = uiPartSize-1; x >= 0; x-- ) 586 { 587 pDstU[x] = pSrcU0[x] - pSrcU1[x]; 588 pDstV[x] = pSrcV0[x] - pSrcV1[x]; 858 589 } 859 590 pSrcU0 += iSrc0Stride; … … 864 595 pDstV += iDstStride; 865 596 } 866 867 for ( y = iYOffset; y < uiPartSize; y++ )868 {869 if(iPUResiPredShift[2] >= 0)870 {871 for ( x = 0; x < iXOffset; x++ )872 {873 pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[2]);874 pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[2]);875 }876 }877 878 if(iPUResiPredShift[3] >= 0)879 {880 for ( x = iXOffset; x < uiPartSize; x++ )881 {882 pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[3]);883 pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[3]);884 }885 }886 pSrcU0 += iSrc0Stride;887 pSrcU1 += iSrc1Stride;888 pSrcV0 += iSrc0Stride;889 pSrcV1 += iSrc1Stride;890 pDstU += iDstStride;891 pDstV += iDstStride;892 }893 #else894 for ( y = uiPartSize-1; y >= iYOffset; y-- )895 {896 if(iPUResiPredShift[3] >= 0)897 {898 for ( x = uiPartSize-1; x >= iXOffset; x-- )899 {900 pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[3]);901 pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[3]);902 }903 }904 905 if(iPUResiPredShift[2] >= 0)906 {907 for ( x = iXOffset-1; x >= 0; x-- )908 {909 pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[2]);910 pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[2]);911 }912 }913 pSrcU0 += iSrc0Stride;914 pSrcU1 += iSrc1Stride;915 pSrcV0 += iSrc0Stride;916 pSrcV1 += iSrc1Stride;917 pDstU += iDstStride;918 pDstV += iDstStride;919 }920 921 for ( y = iYOffset-1; y >= 0; y-- )922 {923 if(iPUResiPredShift[1] >= 0)924 {925 for ( x = uiPartSize-1; x >= iXOffset; x-- )926 {927 pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[1]);928 pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[1]);929 }930 }931 932 if(iPUResiPredShift[0] >= 0)933 {934 for ( x = iXOffset-1; x >= 0; x-- )935 {936 pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[0]);937 pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[0]);938 }939 }940 pSrcU0 += iSrc0Stride;941 pSrcU1 += iSrc1Stride;942 pSrcV0 += iSrc0Stride;943 pSrcV1 += iSrc1Stride;944 pDstU += iDstStride;945 pDstV += iDstStride;946 }947 #endif948 #else949 for ( y = uiPartSize-1; y >= 0; y-- )950 {951 for ( x = uiPartSize-1; x >= 0; x-- )952 {953 pDstU[x] = pSrcU0[x] - pSrcU1[x];954 pDstV[x] = pSrcV0[x] - pSrcV1[x];955 }956 pSrcU0 += iSrc0Stride;957 pSrcU1 += iSrc1Stride;958 pSrcV0 += iSrc0Stride;959 pSrcV1 += iSrc1Stride;960 pDstU += iDstStride;961 pDstV += iDstStride;962 }963 #endif964 597 } 965 598 -
trunk/source/Lib/TLibCommon/TComYuv.h
r296 r332 146 146 Void addClipPartLuma ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize ); //GT 147 147 148 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138149 // pcYuvSrc0 - pcYuvSrc1 -> m_apiBuf150 Void subtract (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );151 Void subtractLuma (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );152 Void subtractChroma (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );153 #else154 148 Void subtract ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize ); 155 149 Void subtractLuma ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize ); 156 150 Void subtractChroma ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize ); 157 #endif158 151 159 152 // (pcYuvSrc0 + pcYuvSrc1)/2 for YUV partition … … 166 159 // Remove High frequency 167 160 Void removeHighFreq ( TComYuv* pcYuvSrc, UInt uiPartIdx, UInt uiWidht, UInt uiHeight ); 168 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138169 Void getPUXYOffset (PartSize uhPartitionSize, Int iWidth, Int iHeight, Int &iXOffset, Int &iYOffset);170 Void add (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract = false );171 Void addLuma (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract );172 Void addChroma (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract );173 #else174 161 Void add ( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract = false ); 175 162 Void addLuma ( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract ); 176 163 Void addChroma ( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract ); 177 #endif178 164 179 165 Void clip ( Int iWidth, Int iHeight ); -
trunk/source/Lib/TLibCommon/TypeDef.h
r313 r332 57 57 #define HHI_DMM_PRED_TEX 1 // depth model modes dependent on texture (inter-component Wedgelet and Contour prediction ) 58 58 // HHIQC_DMMFASTSEARCH_B0039, fast Wedgelet search for DMM modes 1 and 3 59 // HHI_DMM_DELTADC_Q1_C0034 JCT3V-C0034: no quantization and fast encoder search for DMM delta DC values 60 // FIX_DMM_CTX_INIT_C0034 JCT3V-C0034 fix for wrong init type of DMM contexts (UChar instead of Short) 59 61 60 62 #define LGE_EDGE_INTRA_A0070 1 // JCT3V-A0070 61 62 #define HHI_DMM_DELTADC_Q1_C0034 1 // JCT3V-C0034: no quantization and fast encoder search for DMM delta DC values63 #if ( HHI_DMM_PRED_TEX || HHI_DMM_WEDGE_INTRA ) && HHI_DMM_PRED_TEX64 63 #define LGE_DMM3_SIMP_C0044 1 65 #endif66 #define FIX_DMM_CTX_INIT_C0034 1 // JCT3V-C0034 fix for wrong init type of DMM contexts (UChar instead of Short)67 64 68 65 ///// ***** SDC ********* 69 66 #define RWTH_SDC_DLT_B0036 1 // JCT3V-B0036: Simplified Depth Coding + Depth Lookup Table 70 #if RWTH_SDC_DLT_B0036 71 #define SAIT_SDC_C0096 1 // JCT3V-C0096: Improved Simple Depth Coding(removal of DMM2 among four SDC modes(DC, Planar, DMM1 and DMM2)) 72 #endif 73 #define FIX_SDC_ENC_C0143 1 // JCT3V-C0143 fix for unnecessary encoder checks in case of SDC 67 // SAIT_SDC_C0096 JCT3V-C0096: Improved Simple Depth Coding(removal of DMM2 among four SDC modes(DC, Planar, DMM1 and DMM2)) 68 // FIX_SDC_ENC_C0143, JCT3V-C0143 fix for unnecessary encoder checks in case of SDC 74 69 75 70 ///// ***** TMVP/AMVP ********* … … 87 82 // OL_DISMV_POS_B0069 , different pos for disparity MV candidate, B0069 88 83 // MTK_INTERVIEW_MERGE_A0049 , second part 89 #define QC_AMVP_MRG_UNIFY_IVCAN_C0051 1 90 #define QC_C0051_FIXED_BY_MTK 1 // Bug fix for C0051 implementation 84 // QC_C0051_FIXED_BY_MTK 1 // Bug fix for C0051 implementation 85 // QC_AMVP_MRG_UNIFY_IVCAN_C0051 1 91 86 92 87 … … 95 90 // HHI_INTER_VIEW_RESIDUAL_PRED 96 91 // QC_SIMPLIFIEDIVRP_M24938 97 #if H3D_IVRP 98 #define LG_RESTRICTEDRESPRED_M24766 1 // Restricted inter-view residual prediction 99 #define FIX_LG_RESTRICTEDRESPRED_M24766 1 100 #else 101 #define LG_RESTRICTEDRESPRED_M24766 0 102 #endif 103 104 #define MTK_MDIVRP_C0138 1 // Mode-dependent inter-view residual prediction 105 #define MTK_C0138_FIXED 1 // Fix for IBP coding structure in view direction (not CTC) 106 92 // MTK_C0138_FIXED // Fix for IBP coding structure in view direction (not CTC) 93 // MTK_MDIVRP_C0138 94 // LG_RESTRICTEDRESPRED_M24766 1 // Restricted inter-view residual prediction 95 // FIX_LG_RESTRICTEDRESPRED_M24766 1 107 96 108 97 ///// ***** DISPARITY VECTOR DERIVATION ********* … … 117 106 // FIX_LGE_IVMP_PARALLEL_MERGE_B0136 118 107 119 #define QC_NBDV_LDB_FIX_C0055 1 // JCT3V-C0055120 #define MTK_SAIT_TEMPORAL_FIRST_ORDER_C0141_C0097 1 // JCT3V-C0141/C0097121 #define MTK_RELEASE_DV_CONSTRAINT_C0129 1 // JCT3V-C0129 122 #define MTK_SIMPLIFY_DVTC_C0135 1 // JCT3V-C0135 123 #define FIX_CHROMA_RESIDUAL_C0129 1108 // QC_NBDV_LDB_FIX_C0055 109 // MTK_SAIT_TEMPORAL_FIRST_ORDER_C0141_C0097 110 // MTK_RELEASE_DV_CONSTRAINT_C0129 111 // MTK_SIMPLIFY_DVTC_C0135 112 // FIX_CHROMA_RESIDUAL_C0129 124 113 125 114 ///// ***** MOTION PARAMETER INHERITANCE ********* … … 145 134 ///// ***** ILLUMINATION COMPENSATON ********* 146 135 #define LGE_ILLUCOMP_B0045 1 // JCT2-B0045 Illumination compensation for Luma and Chroma 136 // LGE_ILLUCOMP_B0045_ENCSIMP 137 // FIX_LGE_ILLUCOMP_B0045 147 138 #if LGE_ILLUCOMP_B0045 148 #define LGE_ILLUCOMP_B0045_ENCSIMP 1149 #define FIX_LGE_ILLUCOMP_B0045 1150 139 #define LGE_ILLUCOMP_DEPTH_C0046 1 // JCT2-C0046 Apply illumination compensation to depth 151 140 #if LGE_ILLUCOMP_DEPTH_C0046 … … 158 147 159 148 ///// ***** QUADTREE LIMITATION ********* 160 #define OL_QTLIMIT_PREDCODING_B0068 1//JCT3V-B0068161 #define HHI_QTLPC_RAU_OFF_C0160 1// JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units149 #define H3D_QTL 1 // OL_QTLIMIT_dPREDCODING_B0068 //JCT3V-B0068 150 // HHI_QTLPC_RAU_OFF_C0160 // JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units 162 151 163 152 ///// ***** OTHERS ********* … … 186 175 ///// ***** VSP ********* 187 176 #define MERL_VSP_C0152 1 // JCT3V-C0152: 1: enable VSP-related tools; 0: disable VSP-related tools 177 // LGE_SIMP_DVP_REFINE_C0112 178 // MERL_MTK_VSP_DVP_REFINE_C0152_C0131 188 179 #if MERL_VSP_C0152 189 180 #define MERL_VSP_C0152_BugFix_ForNoDepthCase 1// MERL bugfix for test condition of no depth … … 205 196 206 197 #define MERL_VSP_COMPENSATION_C0152 1 // JCT3V-C0152: 1: add VSP merge candidate to merging candidate list; 0: not to add (nocand). 207 #define MERL_MTK_VSP_DVP_REFINE_C0152_C0131 1 // JCT3V-C0152 && JCT3V-C0131: 1: refine disparity vector using a warped depth block; 0: not to refine (mvp2off). 198 208 199 209 200 #define MERL_VSP_BLOCKSIZE_C0152 4 // JCT3V-C0152: VSP block size, supported values: 1, 2 and 4. 210 201 #define VSP_MERGE_POS 5 // JCT3V-C0152: fixed position of VSP candidate in merge list, supported values: 5. 211 #define LGE_SIMP_DVP_REFINE_C0112 1 // JCT3V-C0112: 1: simplification of refining disparity vector using a warped depth block 212 #define MTK_DVPREFINE_BVSP_BUG_FIX 1 202 //MTK_DVPREFINE_BVSP_BUG_FIX 1 213 203 214 204 #else // !MERL_VSP_C0152 215 205 #define MERL_VSP_COMPENSATION_C0152 0 // JCT3V-C0152: 1: add VSP merge candidate to merging candidate list; 0: not to add 216 #define MERL_MTK_VSP_DVP_REFINE_C0152_C0131 0 // JCT3V-C0152 && JCT3V-C0131: 1: refine disparity vector using a warped depth block; 0: not to refine217 206 #define MERL_VSP_BLOCKSIZE_C0152 4 // JCT3V-C0152: VSP block size, supported values: 1, 2 and 4. 218 #define LGE_SIMP_DVP_REFINE_C0112 0 // JCT3V-C0112: 1: simplification of refining disparity vector using a warped depth block219 207 #endif 220 208 … … 223 211 #if H3D_NBDV 224 212 #define DIS_CANS 1 213 #define MCP_DIS_CANS 7 225 214 #endif 226 215 -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r313 r332 1206 1206 #endif 1207 1207 #endif 1208 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B00681208 #if HHI_MPI || H3D_QTL 1209 1209 Void TDecCavlc::parseSPS(TComSPS* pcSPS, Bool bIsDepth) 1210 1210 #else … … 1447 1447 } 1448 1448 #endif 1449 #if OL_QTLIMIT_PREDCODING_B00681449 #if H3D_QTL 1450 1450 if( bIsDepth ) 1451 1451 { -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r296 r332 114 114 Void parseVPS ( TComVPS* pcVPS ); 115 115 #endif 116 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068116 #if HHI_MPI || H3D_QTL 117 117 Void parseSPS ( TComSPS* pcSPS, Bool bIsDepth ); 118 118 #else -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r296 r332 409 409 } 410 410 #endif 411 #if H3D_IVRP && !MTK_MDIVRP_C0138412 m_pcEntropyDecoder->decodeResPredFlag( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 );413 #endif414 411 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 415 412 return; … … 460 457 #endif 461 458 462 #if H3D_IVRP && !MTK_MDIVRP_C0138463 if( !pcCU->isIntra( uiAbsPartIdx ) )464 {465 m_pcEntropyDecoder->decodeResPredFlag ( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 );466 }467 #endif468 459 #if LGE_ILLUCOMP_DEPTH_C0046 && HHI_MPI 469 460 } … … 679 670 m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] ); 680 671 #endif 681 #if MTK_MDIVRP_C0138672 #if H3D_IVRP 682 673 if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0)) 683 674 { … … 691 682 #endif 692 683 693 #if H3D_IVRP && !MTK_MDIVRP_C0138694 if( pcCU->getResPredFlag( 0 ) )695 {696 AOF( pcCU->getResPredAvail( 0 ) );697 Bool bOK = pcCU->getResidualSamples( 0,698 #if QC_SIMPLIFIEDIVRP_M24938699 true,700 #endif701 m_ppcYuvResPred[uiDepth] );702 AOF( bOK );703 #if LG_RESTRICTEDRESPRED_M24766704 Int iPUResiPredShift[4];705 pcCU->getPUResiPredShift(iPUResiPredShift, 0);706 m_ppcYuvReco[uiDepth]->add(iPUResiPredShift, pcCU->getPartitionSize(0), m_ppcYuvResPred[uiDepth], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );707 #else708 m_ppcYuvReco[uiDepth]->add( m_ppcYuvResPred[uiDepth], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );709 #endif710 }711 #endif712 713 684 // inter recon 714 685 xDecodeInterTexture( pcCU, 0, uiDepth ); … … 722 693 { 723 694 #if H3D_IVRP 724 #if MTK_MDIVRP_C0138725 695 if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0)) 726 #else727 if( pcCU->getResPredFlag( 0 ) )728 #endif729 696 { 730 697 m_ppcYuvReco[uiDepth]->clip( pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) ); -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r296 r332 108 108 } 109 109 110 #if H3D_IVRP && !MTK_MDIVRP_C0138111 Void112 TDecEntropy::decodeResPredFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx )113 {114 Bool bResPredAvailable = false;115 Bool bResPredFlag = false;116 117 Bool bResPredAllowed = (!pcCU->getSlice()->getSPS()->isDepth () );118 bResPredAllowed = bResPredAllowed && ( pcCU->getSlice()->getSPS()->getViewId () );119 bResPredAllowed = bResPredAllowed && ( pcCU->getSlice()->getSPS()->getMultiviewResPredMode() );120 bResPredAllowed = bResPredAllowed && (!pcCU->isIntra ( uiAbsPartIdx ) );121 122 // check if supported123 if( bResPredAllowed )124 {125 bResPredAvailable = pcSubCU->getResidualSamples( uiPUIdx , false );126 }127 128 // read from bitstream129 if( bResPredAvailable )130 {131 #if LG_RESTRICTEDRESPRED_M24766132 Int iPUResiPredShift[4];133 pcCU->getPUResiPredShift(iPUResiPredShift, uiAbsPartIdx);134 if(iPUResiPredShift[0] >= 0 || iPUResiPredShift[1] >= 0 || iPUResiPredShift[2] >= 0 || iPUResiPredShift[3] >= 0 )135 #endif136 m_pcEntropyDecoderIf->parseResPredFlag( pcCU, bResPredFlag, uiAbsPartIdx, uiDepth );137 }138 139 // set data140 pcCU->setResPredAvailSubParts ( bResPredAvailable, uiAbsPartIdx, uiPUIdx, uiDepth );141 pcCU->setResPredFlagSubParts ( bResPredFlag, uiAbsPartIdx, uiPUIdx, uiDepth );142 }143 #endif144 145 110 Void TDecEntropy::decodeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 146 111 { -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r296 r332 72 72 virtual Void parseVPS ( TComVPS* pcVPS ) = 0; 73 73 #endif 74 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B006874 #if HHI_MPI || H3D_QTL 75 75 virtual Void parseSPS ( TComSPS* pcSPS, Bool bIsDepth ) = 0; 76 76 #else … … 171 171 #endif 172 172 173 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068173 #if HHI_MPI || H3D_QTL 174 174 Void decodeSPS ( TComSPS* pcSPS, Bool bIsDepth ) { m_pcEntropyDecoderIf->parseSPS(pcSPS, bIsDepth); } 175 175 #else … … 198 198 Void decodeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 199 199 Void decodeMergeIndex ( TComDataCU* pcSubCU, UInt uiPartIdx, UInt uiPartAddr, PartSize eCUMode, UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, UInt uiDepth ); 200 #if H3D_IVRP && !MTK_MDIVRP_C0138201 Void decodeResPredFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx );202 #endif203 200 Void decodePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 204 201 Void decodePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r296 r332 707 707 UInt uiSymbol; 708 708 709 #if OL_QTLIMIT_PREDCODING_B0068709 #if H3D_QTL 710 710 Bool bParseSplitFlag = true; 711 711 … … 715 715 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 716 716 717 #if HHI_QTLPC_RAU_OFF_C0160718 717 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 719 718 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC()) 720 #else721 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())722 #endif723 719 { 724 720 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); … … 733 729 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 734 730 DTRACE_CABAC_T( "\tSplitFlag\n" ) 735 #if OL_QTLIMIT_PREDCODING_B0068731 #if H3D_QTL 736 732 } 737 733 else … … 755 751 PartSize eMode; 756 752 757 #if OL_QTLIMIT_PREDCODING_B0068753 #if H3D_QTL 758 754 Bool bParsePartSize = true; 759 755 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); … … 762 758 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 763 759 764 #if HHI_QTLPC_RAU_OFF_C0160765 760 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 766 761 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC()) 767 #else768 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())769 #endif770 762 { 771 763 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); … … 781 773 if ( pcCU->isIntra( uiAbsPartIdx ) ) 782 774 { 783 #if OL_QTLIMIT_PREDCODING_B0068775 #if H3D_QTL 784 776 if(bParsePartSize) 785 777 { … … 791 783 } 792 784 eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN; 793 #if OL_QTLIMIT_PREDCODING_B0068785 #if H3D_QTL 794 786 } 795 787 #endif … … 809 801 else 810 802 { 811 #if OL_QTLIMIT_PREDCODING_B0068803 #if H3D_QTL 812 804 if(bParsePartSize) 813 805 { … … 849 841 } 850 842 } 851 #if OL_QTLIMIT_PREDCODING_B0068843 #if H3D_QTL 852 844 } 853 845 #endif -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r296 r332 88 88 Void parseVPS ( TComVPS* pcVPS ) {} 89 89 #endif 90 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B006890 #if HHI_MPI || H3D_QTL 91 91 Void parseSPS ( TComSPS* pcSPS, Bool bIsDepth ) {} 92 92 #else -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r313 r332 1257 1257 TComRPSList* rps = new TComRPSList(); 1258 1258 sps->setRPSList(rps); 1259 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B00681259 #if HHI_MPI || H3D_QTL 1260 1260 m_cEntropyDecoder.decodeSPS( sps, m_isDepth ); 1261 1261 #else -
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r313 r332 442 442 #endif 443 443 #endif 444 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068444 #if HHI_MPI || H3D_QTL 445 445 Void TEncCavlc::codeSPS( TComSPS* pcSPS, Bool bIsDepth ) 446 446 #else … … 632 632 #endif 633 633 634 #if OL_QTLIMIT_PREDCODING_B0068634 #if H3D_QTL 635 635 if( bIsDepth ) 636 636 { -
trunk/source/Lib/TLibEncoder/TEncCavlc.h
r296 r332 114 114 #endif 115 115 116 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068116 #if HHI_MPI || H3D_QTL 117 117 Void codeSPS ( TComSPS* pcSPS, Bool bIsDepth ); 118 118 #else -
trunk/source/Lib/TLibEncoder/TEncCfg.h
r296 r332 309 309 #endif 310 310 311 #if OL_QTLIMIT_PREDCODING_B0068311 #if H3D_QTL 312 312 Bool m_bUseQTLPC; 313 313 #endif … … 790 790 #endif 791 791 792 #if OL_QTLIMIT_PREDCODING_B0068792 #if H3D_QTL 793 793 Void setUseQTLPC( Bool b ) { m_bUseQTLPC = b; } 794 794 Bool getUseQTLPC() { return m_bUseQTLPC; } -
trunk/source/Lib/TLibEncoder/TEncCu.cpp
r296 r332 420 420 TComPic* pcPic = rpcBestCU->getPic(); 421 421 422 #if OL_QTLIMIT_PREDCODING_B0068422 #if H3D_QTL 423 423 TComSPS *sps = pcPic->getSlice(0)->getSPS(); 424 424 TComPic *pcTexture = rpcBestCU->getSlice()->getTexturePic(); … … 427 427 Bool bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType() == I_SLICE); 428 428 429 #if HHI_QTLPC_RAU_OFF_C0160430 429 Bool rapPic = (rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 431 #endif432 430 433 431 Bool bTry2NxN = true; … … 571 569 rpcTempCU->initEstData( uiDepth, iQP ); 572 570 573 #if OL_QTLIMIT_PREDCODING_B0068571 #if H3D_QTL 574 572 //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU 575 573 576 #if HHI_QTLPC_RAU_OFF_C0160577 574 if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC()) 578 #else579 if(depthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())580 #endif581 575 { 582 576 TComDataCU* pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); //Corresponding texture LCU … … 602 596 { 603 597 #if H3D_IVRP 604 #if MTK_MDIVRP_C0138605 598 Bool bResPredAvailable = false; 606 599 UInt uiResPrdId = 0; 607 #else608 // check availability of residual prediction609 Bool bResPredAvailable = false;610 Bool bResPredAllowed = (!rpcBestCU->getSlice()->getSPS()->isDepth () );611 bResPredAllowed = bResPredAllowed && ( rpcBestCU->getSlice()->getSPS()->getViewId () );612 bResPredAllowed = bResPredAllowed && ( rpcBestCU->getSlice()->getSPS()->getMultiviewResPredMode() );613 if( bResPredAllowed )614 {615 bResPredAvailable = rpcBestCU->getResidualSamples( 0, true , m_ppcResPredTmp[uiDepth] );616 }617 618 for( UInt uiResPrdId = 0; uiResPrdId < ( bResPredAvailable ? 2 : 1 ); uiResPrdId++ )619 #endif620 600 { 621 601 Bool bResPredFlag = ( uiResPrdId > 0 ); … … 648 628 } 649 629 } 650 #if LGE_ILLUCOMP_B0045 _ENCSIMP630 #if LGE_ILLUCOMP_B0045 651 631 if(bICFlag && rpcBestCU->getMergeFlag(0) && !rpcBestCU->getICFlag(0)) 652 632 { … … 661 641 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 662 642 #endif 663 #if FIX_LGE_ILLUCOMP_B0045643 #if LGE_ILLUCOMP_B0045 664 644 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 665 645 #endif … … 684 664 } // != I_SLICE 685 665 686 #if LGE_ILLUCOMP_B0045 _ENCSIMP666 #if LGE_ILLUCOMP_B0045 687 667 bICEnabled = rpcBestCU->getICFlag(0); 688 668 #endif 689 669 690 #if OL_QTLIMIT_PREDCODING_B0068 691 692 #if HHI_QTLPC_RAU_OFF_C0160 670 #if H3D_QTL 671 693 672 if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC()) 694 #else695 if(depthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())696 #endif697 673 { 698 674 bTrySplitDQP = bTrySplit; … … 712 688 bTrySplitDQP = bTrySplit; 713 689 } 714 #if OL_QTLIMIT_PREDCODING_B0068690 #if H3D_QTL 715 691 } 716 692 #endif … … 739 715 { 740 716 #if H3D_IVRP 741 #if MTK_MDIVRP_C0138742 717 Bool bResPredAvailable = false; 743 718 UInt uiResPrdId = 0; 744 #else745 // check availability of residual prediction746 Bool bResPredAvailable = false;747 Bool bResPredAllowed = (!rpcBestCU->getSlice()->getSPS()->isDepth () );748 bResPredAllowed = bResPredAllowed && ( rpcBestCU->getSlice()->getSPS()->getViewId () );749 bResPredAllowed = bResPredAllowed && ( rpcBestCU->getSlice()->getSPS()->getMultiviewResPredMode() );750 if( bResPredAllowed )751 {752 bResPredAvailable = rpcBestCU->getResidualSamples( 0, true, m_ppcResPredTmp[uiDepth] );753 }754 755 for( UInt uiResPrdId = 0; uiResPrdId < ( bResPredAvailable ? 2 : 1 ); uiResPrdId++ )756 #endif757 719 { 758 720 Bool bResPredFlag = ( uiResPrdId > 0 ); … … 772 734 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu) 773 735 { 774 #if OL_QTLIMIT_PREDCODING_B0068//try InterNxN736 #if H3D_QTL //try InterNxN 775 737 if(bTrySplit) 776 738 { … … 785 747 #endif 786 748 rpcTempCU->initEstData( uiDepth, iQP ); 787 #if OL_QTLIMIT_PREDCODING_B0068749 #if H3D_QTL 788 750 } 789 751 #endif … … 793 755 794 756 { // 2NxN, Nx2N 795 #if OL_QTLIMIT_PREDCODING_B0068//try Nx2N757 #if H3D_QTL //try Nx2N 796 758 if(bTryNx2N) 797 759 { … … 802 764 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 803 765 #endif 804 #if FIX_LGE_ILLUCOMP_B0045766 #if LGE_ILLUCOMP_B0045 805 767 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 806 768 #endif … … 816 778 } 817 779 } 818 #if OL_QTLIMIT_PREDCODING_B0068780 #if H3D_QTL 819 781 } 820 782 #endif 821 783 822 #if OL_QTLIMIT_PREDCODING_B0068//try 2NxN784 #if H3D_QTL //try 2NxN 823 785 if(bTry2NxN) 824 786 { … … 829 791 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 830 792 #endif 831 #if FIX_LGE_ILLUCOMP_B0045793 #if LGE_ILLUCOMP_B0045 832 794 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 833 795 #endif … … 843 805 } 844 806 } 845 #if OL_QTLIMIT_PREDCODING_B0068807 #if H3D_QTL 846 808 } 847 809 #endif … … 866 828 if ( bTestAMP_Hor ) 867 829 { 868 #if OL_QTLIMIT_PREDCODING_B0068//try 2NxnU & 2NxnD830 #if H3D_QTL //try 2NxnU & 2NxnD 869 831 if(bTry2NxN) 870 832 { … … 875 837 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 876 838 #endif 877 #if FIX_LGE_ILLUCOMP_B0045839 #if LGE_ILLUCOMP_B0045 878 840 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 879 841 #endif … … 894 856 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 895 857 #endif 896 #if FIX_LGE_ILLUCOMP_B0045858 #if LGE_ILLUCOMP_B0045 897 859 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 898 860 #endif … … 908 870 } 909 871 } 910 #if OL_QTLIMIT_PREDCODING_B0068872 #if H3D_QTL 911 873 } 912 874 #endif … … 915 877 else if ( bTestMergeAMP_Hor ) 916 878 { 917 #if OL_QTLIMIT_PREDCODING_B0068//try 2NxnU & 2NxnD Merge879 #if H3D_QTL //try 2NxnU & 2NxnD Merge 918 880 if(bTry2NxN) 919 881 { … … 924 886 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 925 887 #endif 926 #if FIX_LGE_ILLUCOMP_B0045888 #if LGE_ILLUCOMP_B0045 927 889 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 928 890 #endif … … 943 905 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 944 906 #endif 945 #if FIX_LGE_ILLUCOMP_B0045907 #if LGE_ILLUCOMP_B0045 946 908 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 947 909 #endif … … 957 919 } 958 920 } 959 #if OL_QTLIMIT_PREDCODING_B0068921 #if H3D_QTL 960 922 } 961 923 #endif … … 966 928 if ( bTestAMP_Ver ) 967 929 { 968 #if OL_QTLIMIT_PREDCODING_B0068//try nLx2N & nRx2N930 #if H3D_QTL //try nLx2N & nRx2N 969 931 if(bTryNx2N) 970 932 { … … 975 937 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 976 938 #endif 977 #if FIX_LGE_ILLUCOMP_B0045939 #if LGE_ILLUCOMP_B0045 978 940 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 979 941 #endif … … 994 956 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 995 957 #endif 996 #if FIX_LGE_ILLUCOMP_B0045958 #if LGE_ILLUCOMP_B0045 997 959 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 998 960 #endif … … 1004 966 rpcTempCU->initEstData( uiDepth, iQP ); 1005 967 } 1006 #if OL_QTLIMIT_PREDCODING_B0068968 #if H3D_QTL 1007 969 } 1008 970 #endif … … 1011 973 else if ( bTestMergeAMP_Ver ) 1012 974 { 1013 #if OL_QTLIMIT_PREDCODING_B0068//try nLx2N & nRx2N (Merge)975 #if H3D_QTL //try nLx2N & nRx2N (Merge) 1014 976 if(bTryNx2N) 1015 977 { … … 1020 982 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1021 983 #endif 1022 #if FIX_LGE_ILLUCOMP_B0045984 #if LGE_ILLUCOMP_B0045 1023 985 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 1024 986 #endif … … 1039 1001 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1040 1002 #endif 1041 #if FIX_LGE_ILLUCOMP_B00451003 #if LGE_ILLUCOMP_B0045 1042 1004 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 1043 1005 #endif … … 1049 1011 rpcTempCU->initEstData( uiDepth, iQP ); 1050 1012 } 1051 #if OL_QTLIMIT_PREDCODING_B00681013 #if H3D_QTL 1052 1014 } 1053 1015 #endif … … 1143 1105 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 1144 1106 { 1145 #if OL_QTLIMIT_PREDCODING_B0068//Try IntraNxN1107 #if H3D_QTL //Try IntraNxN 1146 1108 if(bTrySplit) 1147 1109 { … … 1155 1117 rpcTempCU->initEstData( uiDepth, iQP ); 1156 1118 } 1157 #if OL_QTLIMIT_PREDCODING_B00681119 #if H3D_QTL 1158 1120 } 1159 1121 #endif … … 1805 1767 ); 1806 1768 #endif 1807 #if H3D_IVRP && !MTK_MDIVRP_C01381808 m_pcEntropyCoder->encodeResPredFlag( pcCU, uiAbsPartIdx, 0 );1809 #endif1810 1769 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1811 1770 return; … … 1839 1798 #endif 1840 1799 ); 1841 #endif1842 #if H3D_IVRP && !MTK_MDIVRP_C01381843 if( !pcCU->isIntra( uiAbsPartIdx ) )1844 {1845 m_pcEntropyCoder->encodeResPredFlag( pcCU, uiAbsPartIdx, 0 );1846 }1847 1800 #endif 1848 1801 #if HHI_MPI … … 1880 1833 Int numValidMergeCand = 0; 1881 1834 1882 #if H3D_IVRP && !MTK_MDIVRP_C01381883 Bool bResPrdAvail = rpcTempCU->getResPredAvail( 0 );1884 Bool bResPrdFlag = rpcTempCU->getResPredFlag ( 0 );1885 #endif1886 1835 #if LGE_ILLUCOMP_B0045 1887 1836 Bool bICFlag = rpcTempCU->getICFlag(0); … … 1916 1865 rpcTempCU->getInterMergeCandidates( 0, 0, uhDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 1917 1866 #endif 1918 #if MTK_MDIVRP_C01381867 #if H3D_IVRP 1919 1868 Bool bResPredAvail = rpcTempCU->getResPredAvail(0); 1920 1869 #endif … … 1978 1927 1979 1928 #if H3D_IVRP 1980 #if MTK_MDIVRP_C01381981 1929 rpcTempCU->setResPredAvailSubParts(bResPredAvail, 0, 0, uhDepth); 1982 #else1983 rpcTempCU->setResPredAvailSubParts( bResPrdAvail, 0, 0, uhDepth );1984 rpcTempCU->setResPredFlagSubParts ( bResPrdFlag, 0, 0, uhDepth );1985 #endif1986 1930 #endif 1987 1931 #if LGE_ILLUCOMP_B0045 … … 2001 1945 m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] ); 2002 1946 #endif 2003 #if MTK_MDIVRP_C01381947 #if H3D_IVRP 2004 1948 if (uiMergeCand == 0 && rpcTempCU->getResPredAvail(0)) 2005 1949 { … … 2020 1964 m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] ); 2021 1965 #endif 2022 #if MTK_MDIVRP_C01381966 #if H3D_IVRP 2023 1967 if (uiMergeCand == 0 && rpcTempCU->getResPredAvail(0)) 2024 1968 { … … 2120 2064 #endif 2121 2065 rpcTempCU->setPredModeSubParts ( MODE_INTER, 0, uhDepth ); 2122 2123 #if H3D_IVRP2124 #if !LG_RESTRICTEDRESPRED_M247662125 if( rpcTempCU->getResPredFlag( 0 ) )2126 { // subtract residual prediction from original in motion search2127 m_ppcOrigYuv[uhDepth]->add( m_ppcResPredTmp [uhDepth], rpcTempCU->getWidth( 0 ), rpcTempCU->getHeight( 0 ), true );2128 }2129 #endif2130 #endif2131 2066 2132 2067 #if AMP_MRG 2133 2068 rpcTempCU->setMergeAMP (true); 2134 2069 #if HHI_INTERVIEW_SKIP 2135 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01382136 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcResPredTmp[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bSkipRes, bUseMRG);2137 #else2138 2070 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bSkipRes, bUseMRG ); 2139 #endif2140 2071 #else 2141 2072 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], false, bUseMRG ); … … 2146 2077 #else 2147 2078 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth] ); 2148 #endif2149 #endif2150 2151 #if H3D_IVRP2152 #if !LG_RESTRICTEDRESPRED_M247662153 if( rpcTempCU->getResPredFlag( 0 ) )2154 { // add residual prediction to original again2155 m_ppcOrigYuv[uhDepth]->add( m_ppcResPredTmp [uhDepth], rpcTempCU->getWidth( 0 ), rpcTempCU->getHeight( 0 ) );2156 }2157 2079 #endif 2158 2080 #endif -
trunk/source/Lib/TLibEncoder/TEncEntropy.cpp
r296 r332 122 122 #endif 123 123 124 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068124 #if HHI_MPI || H3D_QTL 125 125 Void TEncEntropy::encodeSPS( TComSPS* pcSPS, Bool bIsDepth ) 126 126 { … … 455 455 } 456 456 457 #if H3D_IVRP && !MTK_MDIVRP_C0138458 Void459 TEncEntropy::encodeResPredFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx, Bool bRD )460 {461 if( bRD )462 {463 uiAbsPartIdx = 0;464 }465 466 // check whether flag is coded467 ROTVS( pcCU->getSlice()->getSPS()->isDepth () );468 ROFVS( pcCU->getSlice()->getSPS()->getViewId () );469 ROFVS( pcCU->getSlice()->getSPS()->getMultiviewResPredMode() );470 ROTVS( pcCU->isIntra ( uiAbsPartIdx ) );471 ROFVS( pcCU->getResPredAvail ( uiAbsPartIdx ) );472 #if LG_RESTRICTEDRESPRED_M24766473 Int iPUResiPredShift[4];474 pcCU->getPUResiPredShift(iPUResiPredShift, uiAbsPartIdx);475 if(iPUResiPredShift[0] >= 0 || iPUResiPredShift[1] >= 0 || iPUResiPredShift[2] >= 0 || iPUResiPredShift[3] >= 0 )476 #endif477 // encode flag478 m_pcEntropyCoderIf->codeResPredFlag( pcCU, uiAbsPartIdx );479 }480 #endif481 457 482 458 /** parse the fixed length code (smaller than one max value) in ALF -
trunk/source/Lib/TLibEncoder/TEncEntropy.h
r296 r332 80 80 #endif 81 81 82 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B006882 #if HHI_MPI || H3D_QTL 83 83 virtual Void codeSPS ( TComSPS* pcSPS, Bool bIsDepth ) = 0; 84 84 #else … … 222 222 #endif 223 223 // SPS 224 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068224 #if HHI_MPI || H3D_QTL 225 225 Void encodeSPS ( TComSPS* pcSPS, Bool bIsDepth ); 226 226 #else … … 250 250 Void encodeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx ); 251 251 Void encodeMergeIndex ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx, Bool bRD = false ); 252 #if H3D_IVRP && !MTK_MDIVRP_C0138253 Void encodeResPredFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx, Bool bRD = false );254 #endif255 252 Void encodeAlfCtrlFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 256 253 -
trunk/source/Lib/TLibEncoder/TEncGOP.cpp
r313 r332 887 887 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); 888 888 pcSlice->getSPS()->setNumSubstreams( pcSlice->getPPS()->getNumSubstreams() ); 889 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068889 #if HHI_MPI || H3D_QTL 890 890 m_pcEntropyCoder->encodeSPS(pcSlice->getSPS(), m_pcEncTop->getIsDepth()); 891 891 #else -
trunk/source/Lib/TLibEncoder/TEncSbac.cpp
r296 r332 376 376 #endif 377 377 378 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068378 #if HHI_MPI || H3D_QTL 379 379 Void TEncSbac::codeSPS( TComSPS* pcSPS, Bool bIsDepth ) 380 380 #else … … 578 578 PartSize eSize = pcCU->getPartitionSize( uiAbsPartIdx ); 579 579 580 #if OL_QTLIMIT_PREDCODING_B0068580 #if H3D_QTL 581 581 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 582 582 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); … … 584 584 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 585 585 586 #if HHI_QTLPC_RAU_OFF_C0160587 586 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 588 587 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag()) 589 #else590 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())591 #endif592 588 { 593 589 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); … … 855 851 assert( uiCtx < 3 ); 856 852 857 #if OL_QTLIMIT_PREDCODING_B0068853 #if H3D_QTL 858 854 Bool bCodeSplitFlag = true; 859 855 … … 863 859 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 864 860 865 #if HHI_QTLPC_RAU_OFF_C0160866 861 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 867 862 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag()) 868 #else869 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())870 #endif871 863 { 872 864 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); -
trunk/source/Lib/TLibEncoder/TEncSbac.h
r296 r332 102 102 #endif 103 103 104 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068104 #if HHI_MPI || H3D_QTL 105 105 Void codeSPS ( TComSPS* pcSPS, Bool bIsDepth ); 106 106 #else -
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r296 r332 2311 2311 for( UInt uiSDC=0; uiSDC<=uiUseSDC; uiSDC++ ) 2312 2312 { 2313 #if FIX_SDC_ENC_C01432314 2313 for( UInt uiRes = 0; uiRes<=uiSDC; uiRes++ ) 2315 #else2316 for( UInt uiRes = 0; uiRes<=uiUseSDC; uiRes++ )2317 #endif2318 2314 { 2319 2315 #endif … … 2909 2905 * \returns Void 2910 2906 */ 2907 2908 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, 2909 TComYuv* pcYuvOrg, 2910 Int iPUIdx, 2911 UInt& uiInterDir, 2912 TComMvField* pacMvField, 2913 UInt& uiMergeIndex, 2914 UInt& ruiCost 2911 2915 #if CU_BASED_MRG_CAND_LIST 2912 #if LG_RESTRICTEDRESPRED_M24766 2913 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours, Int& numValidMergeCand ) 2914 #else 2915 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours, Int& numValidMergeCand ) 2916 #endif 2917 #else 2918 #if LG_RESTRICTEDRESPRED_M24766 2919 #if MERL_VSP_C0152 || MTK_MDIVRP_C0138 2920 #if !MTK_MDIVRP_C0138 2921 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, Int* iVSPIndexTrue ) 2922 #endif 2923 #if !MERL_VSP_C0152 2924 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost ) 2925 #endif 2926 #if MERL_VSP_C0152 && MTK_MDIVRP_C0138 2927 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, Int* iVSPIndexTrue ) 2928 #endif 2929 #else 2930 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost ) 2931 #endif 2932 #else 2933 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost ) 2934 #endif 2935 #endif 2916 , TComMvField* cMvFieldNeighbours, 2917 UChar* uhInterDirNeighbours, 2918 Int& numValidMergeCand 2919 #endif 2920 #if MERL_VSP_C0152 2921 , Int* iVSPIndexTrue 2922 #endif 2923 ) 2936 2924 { 2937 2925 #if !CU_BASED_MRG_CAND_LIST … … 2985 2973 const int maxNumMergeCand = MRG_MAX_NUM_CANDS_SIGNALED + ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 ); 2986 2974 #endif 2987 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01382988 Int iPUResiPredShift[4];2989 Int iLastAddResiShift = -1000;2990 #endif2991 2975 ruiCost = MAX_UINT; 2992 2976 for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand ) … … 3014 2998 } 3015 2999 pcCU->setVSPIndexSubParts( iVSPIdx, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 3016 }3017 #endif3018 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383019 Int iAddResiShift;3020 UInt uiPartAddr;3021 Int iRoiWidth, iRoiHeight;3022 3023 pcCU->getPartIndexAndSize( iPUIdx, uiPartAddr, iRoiWidth, iRoiHeight );3024 iAddResiShift = pcCU->getResiPredMode(uiPartAddr);3025 iAddResiShift = (pcCU->getSlice()->getPPS()->getUseWP() || pcCU->getInterDir(uiPartAddr) != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1 - iAddResiShift : -1);3026 3027 if( pcCU->getResPredFlag( 0 ))3028 { // subtract residual prediction from original in motion search3029 if(iLastAddResiShift != iAddResiShift)3030 {3031 //add subtracted residual last time3032 if(iLastAddResiShift >= 0)3033 {3034 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iLastAddResiShift;3035 pcYuvOrg->add(iPUResiPredShift, ePartSize, rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));3036 }3037 //subtract residual3038 if(iAddResiShift >= 0)3039 {3040 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iAddResiShift;3041 pcYuvOrg->add(iPUResiPredShift, ePartSize, rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ), true );3042 }3043 iLastAddResiShift = iAddResiShift;3044 }3045 3000 } 3046 3001 #endif … … 3066 3021 } 3067 3022 } 3068 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383069 if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0)3070 {3071 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iLastAddResiShift;3072 pcYuvOrg->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));3073 }3074 #endif3075 3023 } 3076 3024 … … 3085 3033 */ 3086 3034 #if AMP_MRG 3087 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383088 Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv* rpcResiPredYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes, Bool bUseMRG )3089 #else3090 3035 Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes, Bool bUseMRG) 3091 #endif3092 3036 #else 3093 3037 Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes ) … … 3188 3132 for (Int iNumRef=0; iNumRef < MAX_NUM_REF; iNumRef++) uiCostTempL0[iNumRef] = MAX_UINT; 3189 3133 UInt uiBitsTempL0[MAX_NUM_REF]; 3190 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383191 Int iPUResiPredShift[4] = {0, 0, 0, 0};3192 #endif3193 3134 xGetBlkBits( ePartSize, pcCU->getSlice()->isInterP(), iPartIdx, uiLastMode, uiMbBits); 3194 3135 … … 3209 3150 { 3210 3151 #endif 3211 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383212 Bool bLastResiFlag = false;3213 #endif3214 3152 3215 3153 // Uni-directional prediction … … 3220 3158 for ( Int iRefIdxTemp = 0; iRefIdxTemp < pcCU->getSlice()->getNumRefIdx(eRefPicList); iRefIdxTemp++ ) 3221 3159 { 3222 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383223 if( pcCU->getResPredFlag( 0 ))3224 {3225 if(pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxTemp))3226 { // subtract residual prediction from original in motion search3227 if(!bLastResiFlag)3228 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ), true );3229 bLastResiFlag = true;3230 }3231 else3232 {3233 if(bLastResiFlag)3234 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));3235 bLastResiFlag = false;3236 }3237 }3238 #endif3239 3160 uiBitsTemp = uiMbBits[iRefList]; 3240 3161 if ( pcCU->getSlice()->getNumRefIdx(eRefPicList) > 1 ) … … 3394 3315 } 3395 3316 } 3396 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383397 if( pcCU->getResPredFlag( 0 ) && bLastResiFlag)3398 { // subtract residual prediction from original in motion search3399 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));3400 }3401 #endif3402 3317 // Bi-directional prediction 3403 3318 if ( pcCU->getSlice()->isInterB() ) 3404 3319 { 3405 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383406 Int iLastAddResiShift = -1000;3407 #endif3408 3320 cMvBi[0] = cMv[0]; cMvBi[1] = cMv[1]; 3409 3321 iRefIdxBi[0] = iRefIdx[0]; iRefIdxBi[1] = iRefIdx[1]; … … 3499 3411 #else 3500 3412 uiBitsTemp += m_auiMVPIdxCost[aaiMvpIdxBi[iRefList][iRefIdxTemp]][AMVP_MAX_NUM_CANDS]; 3501 #endif3502 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383503 Int iAddResiShift = -1, iPredFrom = 0;3504 Int iBestRefIdx = pcCU->getCUMvField(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0)->getRefIdx(uiPartAddr);3505 3506 iPredFrom = iBestRefIdx >= 0 ? 3 : 1;3507 if(iBestRefIdx >= 0 && pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0, iBestRefIdx))3508 iAddResiShift++;3509 if(pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxTemp))3510 iAddResiShift++;3511 iAddResiShift = (pcCU->getSlice()->getPPS()->getUseWP() || iPredFrom != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);3512 3513 if( pcCU->getResPredFlag( 0 ) )3514 {3515 if(iLastAddResiShift != iAddResiShift)3516 {3517 //add substracted residual last time3518 if(iLastAddResiShift >= 0 )3519 {3520 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iLastAddResiShift;3521 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));3522 }3523 //substract residual3524 if(iAddResiShift >= 0)3525 {3526 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iAddResiShift;3527 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ), true );3528 }3529 iLastAddResiShift = iAddResiShift;3530 }3531 }3532 3413 #endif 3533 3414 // call ME … … 3581 3462 } 3582 3463 } // for loop-iter 3583 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383584 if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0)3585 {3586 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iLastAddResiShift;3587 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));3588 }3589 #endif3590 3464 } // if (B_SLICE) 3591 3465 #if ZERO_MVD_EST … … 3796 3670 if (bTestNormalMC) 3797 3671 { 3798 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383799 Int iAddResiShift = pcCU->getResiPredMode(uiPartAddr);3800 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = \3801 (pcCU->getSlice()->getPPS()->getUseWP() || pcCU->getInterDir(uiPartAddr) != 3)? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);3802 if(pcCU->getResPredFlag(0) && iAddResiShift >= 0)3803 {3804 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ), true);3805 }3806 #endif3807 3672 xGetInterPredictionError( pcCU, pcOrgYuv, iPartIdx, uiMEError, m_pcEncCfg->getUseHADME() ); 3808 3673 uiMECost = uiMEError + m_pcRdCost->getCost( uiMEBits ); 3809 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383810 if(pcCU->getResPredFlag(0) && iAddResiShift >= 0)3811 {3812 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));3813 }3814 #endif3815 3674 } 3816 3675 #else … … 3827 3686 // find Merge result 3828 3687 UInt uiMRGCost = MAX_UINT; 3688 3689 3690 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost 3829 3691 #if CU_BASED_MRG_CAND_LIST 3830 #if LG_RESTRICTEDRESPRED_M24766 3831 xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 3832 #else 3833 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 3834 #endif 3835 #else 3836 #if LG_RESTRICTEDRESPRED_M24766 3837 #if MERL_VSP_C0152 || MTK_MDIVRP_C0138 3838 3839 #if !MTK_MDIVRP_C0138 3840 xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, iVSPIndexTrue ); 3841 #endif 3842 3843 #if !MERL_VSP_C0152 3844 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost ); 3845 #endif 3846 3847 #if MERL_VSP_C0152 && MTK_MDIVRP_C0138 3848 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, iVSPIndexTrue ); 3849 #endif 3850 3851 #else 3852 xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost ); 3853 #endif 3854 3855 3856 #else 3857 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost ); 3858 #endif 3859 #endif 3692 , cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, 3693 #endif 3694 #if MERL_VSP_C0152 3695 , iVSPIndexTrue 3696 #endif 3697 ); 3698 3860 3699 if ( uiMRGCost < uiMECost ) 3861 3700 { … … 4775 4614 UInt uiWidth = pcCU->getWidth ( 0 ); 4776 4615 UInt uiHeight = pcCU->getHeight( 0 ); 4777 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01384778 Int iPUResiPredShift[4];4779 #endif4780 4616 // No residual coding : SKIP mode 4781 4617 if ( ePredMode == MODE_SKIP && bSkipRes ) … … 4785 4621 pcYuvPred->copyToPartYuv( rpcYuvRec, 0 ); 4786 4622 4787 #if MTK_MDIVRP_C01384623 #if H3D_IVRP 4788 4624 if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0)) 4789 4625 { 4790 4626 rpcYuvRec->clip( uiWidth, uiHeight ); 4791 4627 } 4792 #else4793 #if H3D_IVRP4794 // add residual prediction4795 if( pcCU->getResPredFlag( 0 ) )4796 {4797 #if LG_RESTRICTEDRESPRED_M247664798 pcCU->getPUResiPredShift(iPUResiPredShift, 0);4799 rpcYuvRec->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcYuvResPrd, uiWidth, uiHeight );4800 #else4801 rpcYuvRec->add( rpcYuvResPrd, uiWidth, uiHeight );4802 #endif4803 rpcYuvRec->clip( uiWidth, uiHeight );4804 }4805 #endif4806 4628 #endif 4807 4629 … … 4853 4675 ); 4854 4676 #endif 4855 #if H3D_IVRP && !MTK_MDIVRP_C01384856 m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );4857 #endif4858 4677 #if HHI_MPI 4859 4678 } … … 4922 4741 else 4923 4742 { 4924 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01384925 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = 0;4926 rpcYuvResi->subtract(iPUResiPredShift, pcCU->getPartitionSize(0), pcYuvOrg, pcYuvPred, 0, uiWidth );4927 #else4928 4743 rpcYuvResi->subtract( pcYuvOrg, pcYuvPred, 0, uiWidth ); 4929 #endif4930 #if H3D_IVRP && !MTK_MDIVRP_C01384931 // subtract residual prediction4932 if( pcCU->getResPredFlag( 0 ) )4933 {4934 #if LG_RESTRICTEDRESPRED_M247664935 pcCU->getPUResiPredShift(iPUResiPredShift, 0);4936 rpcYuvResi->subtract(iPUResiPredShift, pcCU->getPartitionSize(0), rpcYuvResi, rpcYuvResPrd, 0, uiWidth );4937 #else4938 rpcYuvResi->subtract( rpcYuvResi, rpcYuvResPrd, 0, uiWidth );4939 #endif4940 }4941 #endif4942 4744 } 4943 4745 #else … … 5134 4936 #endif 5135 4937 } 5136 #if H3D_IVRP && !MTK_MDIVRP_C01385137 // add residual prediction5138 if( pcCU->getResPredFlag( 0 ) )5139 {5140 pcYuvPred->copyToPartYuv( rpcYuvRec, 0 );5141 #if LG_RESTRICTEDRESPRED_M247665142 pcCU->getPUResiPredShift(iPUResiPredShift, 0);5143 rpcYuvRec->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcYuvResPrd, uiWidth, uiHeight );5144 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = 0;5145 rpcYuvRec->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcYuvResiBest, uiWidth, uiHeight );5146 #else5147 rpcYuvRec->add( rpcYuvResPrd, uiWidth, uiHeight );5148 rpcYuvRec->add( rpcYuvResiBest, uiWidth, uiHeight );5149 #endif5150 rpcYuvRec->clip( uiWidth, uiHeight );5151 }5152 else5153 #endif5154 4938 rpcYuvRec->addClip ( pcYuvPred, rpcYuvResiBest, 0, uiWidth ); 5155 4939 … … 6170 5954 ); 6171 5955 #endif 6172 #if H3D_IVRP && !MTK_MDIVRP_C01386173 m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );6174 #endif6175 5956 ruiBits += m_pcEntropyCoder->getNumberOfWrittenBits(); 6176 5957 } … … 6196 5977 #endif 6197 5978 ); 6198 #endif6199 #if H3D_IVRP && !MTK_MDIVRP_C01386200 m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );6201 5979 #endif 6202 5980 #if HHI_MPI … … 6534 6312 Int iFullDeltaDC2 = riDeltaDC2; 6535 6313 6536 #if HHI_DMM_DELTADC_Q1_C00346537 #else6538 xDeltaDCQuantScaleDown( pcCU, iFullDeltaDC1 );6539 xDeltaDCQuantScaleDown( pcCU, iFullDeltaDC2 );6540 #endif6541 6542 6314 Dist uiBestDist = RDO_DIST_MAX; 6543 6315 UInt uiBestQStepDC1 = 0; … … 6551 6323 uiDeltaDC2Max += (uiDeltaDC2Max>>1); 6552 6324 6553 #if HHI_DMM_DELTADC_Q1_C00346554 6325 // limit search range to [0, IBDI_MAX] 6555 6326 if( iFullDeltaDC1 < 0 && uiDeltaDC1Max > abs(iPredDC1) ) { uiDeltaDC1Max = abs(iPredDC1); } … … 6698 6469 } 6699 6470 } 6700 #else 6701 for( UInt uiQStepDC1 = 1; uiQStepDC1 <= uiDeltaDC1Max; uiQStepDC1++ ) 6702 { 6703 Int iLevelDeltaDC1 = (Int)(uiQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1); 6704 xDeltaDCQuantScaleUp( pcCU, iLevelDeltaDC1 ); 6705 6706 Int iTestDC1 = Clip( iPredDC1 + iLevelDeltaDC1 ); 6707 for( UInt uiQStepDC2 = 1; uiQStepDC2 <= uiDeltaDC2Max; uiQStepDC2++ ) 6708 { 6709 Int iLevelDeltaDC2 = (Int)(uiQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1); 6710 xDeltaDCQuantScaleUp( pcCU, iLevelDeltaDC2 ); 6711 6712 Int iTestDC2 = Clip( iPredDC2 + iLevelDeltaDC2 ); 6713 6714 assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iTestDC1, iTestDC2 ); 6715 6716 Dist uiActDist = RDO_DIST_MAX; 6717 #if SAIT_VSO_EST_A0033 6718 if ( m_pcRdCost->getUseEstimatedVSD() ) 6719 { 6720 TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv(); 6721 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6722 uiActDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight ); 6723 #if LGE_WVSO_A0119 6724 if ( m_pcRdCost->getUseWVSO() ) 6725 { 6726 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6727 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6728 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6729 uiActDist = (iDWeight * iD + iVSDWeight * (Dist) uiActDist) / ( iDWeight + iVSDWeight); 6730 } 6731 #endif // LGE_WVSO_A0119 6732 } 6733 else 6734 #endif // SAIT_VSO_EST_A0033 6735 { 6736 uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, 0 ); 6737 #if LGE_WVSO_A0119 6738 if ( m_pcRdCost->getUseWVSO() ) 6739 { 6740 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6741 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 6742 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6743 uiActDist = (iDWeight * iD + iVSOWeight * (Dist) uiActDist) / ( iDWeight + iVSOWeight); 6744 } 6745 #endif // LGE_WVSO_A0119 6746 } 6747 6748 if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX ) 6749 { 6750 uiBestDist = uiActDist; 6751 uiBestQStepDC1 = uiQStepDC1; 6752 uiBestQStepDC2 = uiQStepDC2; 6753 } 6754 } 6755 } 6756 #endif 6471 6757 6472 iFullDeltaDC1 = (Int)(uiBestQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1); 6758 6473 iFullDeltaDC2 = (Int)(uiBestQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1); 6759 #if HHI_DMM_DELTADC_Q1_C0034 6760 #else 6761 xDeltaDCQuantScaleUp( pcCU, iFullDeltaDC1 ); 6762 xDeltaDCQuantScaleUp( pcCU, iFullDeltaDC2 ); 6763 #endif 6474 6764 6475 riDeltaDC1 = iFullDeltaDC1; 6765 6476 riDeltaDC2 = iFullDeltaDC2; … … 6767 6478 #endif 6768 6479 6769 #if HHI_DMM_DELTADC_Q1_C00346770 #else6771 xDeltaDCQuantScaleDown( pcCU, riDeltaDC1 );6772 xDeltaDCQuantScaleDown( pcCU, riDeltaDC2 );6773 #endif6774 6480 } 6775 6481 #endif -
trunk/source/Lib/TLibEncoder/TEncSearch.h
r296 r332 196 196 Void predInterSearch ( TComDataCU* pcCU, 197 197 TComYuv* pcOrgYuv, 198 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138199 TComYuv* rpcResiPredYuv,200 #endif201 198 TComYuv*& rpcPredYuv, 202 199 TComYuv*& rpcResiYuv, … … 501 498 Void xMergeEstimation ( TComDataCU* pcCU, 502 499 TComYuv* pcYuvOrg, 503 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138504 TComYuv* rpcResiPredYuv,505 #endif506 500 Int iPartIdx, 507 501 UInt& uiInterDir, -
trunk/source/Lib/TLibEncoder/TEncSlice.cpp
r313 r332 1193 1193 } 1194 1194 1195 #if OL_QTLIMIT_PREDCODING_B00681195 #if H3D_QTL 1196 1196 rpcPic->setReduceBitsFlag(true); 1197 1197 #endif … … 1235 1235 } 1236 1236 1237 #if OL_QTLIMIT_PREDCODING_B00681237 #if H3D_QTL 1238 1238 rpcPic->setReduceBitsFlag(false); 1239 1239 #endif -
trunk/source/Lib/TLibEncoder/TEncTop.cpp
r313 r332 703 703 #endif 704 704 705 #if OL_QTLIMIT_PREDCODING_B0068705 #if H3D_QTL 706 706 m_cSPS.setUseQTLPC( m_bUseQTLPC ); 707 707 #endif -
trunk/source/Lib/TLibExtractor/TExtrTop.cpp
r296 r332 79 79 TComRPSList cRPS; 80 80 cSPS.setRPSList( &cRPS ); 81 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B006881 #if HHI_MPI || H3D_QTL 82 82 #if VIDYO_VPS_INTEGRATION 83 83 m_cEntropyDecoder.decodeSPS( &cSPS, m_cVPS.getDepthFlag(uiLayerId) );
Note: See TracChangeset for help on using the changeset viewer.