Changeset 280 in 3DVCSoftware for branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
- Timestamp:
- 14 Feb 2013, 23:41:41 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
r275 r280 2947 2947 #else 2948 2948 #if LG_RESTRICTEDRESPRED_M24766 2949 #if MERL_VSP_C0152 2949 #if MERL_VSP_C0152 || MTK_MDIVRP_C0138 2950 #if !MTK_MDIVRP_C0138 2950 2951 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, Int* iVSPIndexTrue ) 2952 #endif 2953 #if !MERL_VSP_C0152 2954 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost ) 2955 #endif 2956 #if MERL_VSP_C0152 && MTK_MDIVRP_C0138 2957 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, Int* iVSPIndexTrue ) 2958 #endif 2951 2959 #else 2952 2960 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost ) … … 3007 3015 const int maxNumMergeCand = MRG_MAX_NUM_CANDS_SIGNALED + ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 ); 3008 3016 #endif 3009 #if LG_RESTRICTEDRESPRED_M24766 3017 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3010 3018 Int iPUResiPredShift[4]; 3011 3019 Int iLastAddResiShift = -1000; … … 3038 3046 } 3039 3047 #endif 3040 #if LG_RESTRICTEDRESPRED_M24766 3048 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3041 3049 Int iAddResiShift; 3042 3050 UInt uiPartAddr; … … 3088 3096 } 3089 3097 } 3090 #if LG_RESTRICTEDRESPRED_M24766 3098 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3091 3099 if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0) 3092 3100 { … … 3107 3115 */ 3108 3116 #if AMP_MRG 3109 #if LG_RESTRICTEDRESPRED_M24766 3117 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3110 3118 Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv* rpcResiPredYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes, Bool bUseMRG ) 3111 3119 #else … … 3214 3222 for (Int iNumRef=0; iNumRef < MAX_NUM_REF; iNumRef++) uiCostTempL0[iNumRef] = MAX_UINT; 3215 3223 UInt uiBitsTempL0[MAX_NUM_REF]; 3216 3217 #if LG_RESTRICTEDRESPRED_M24766 3224 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3218 3225 Int iPUResiPredShift[4] = {0, 0, 0, 0}; 3219 3226 #endif … … 3236 3243 { 3237 3244 #endif 3238 #if LG_RESTRICTEDRESPRED_M24766 3245 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3239 3246 Bool bLastResiFlag = false; 3240 3247 #endif … … 3247 3254 for ( Int iRefIdxTemp = 0; iRefIdxTemp < pcCU->getSlice()->getNumRefIdx(eRefPicList); iRefIdxTemp++ ) 3248 3255 { 3249 #if LG_RESTRICTEDRESPRED_M24766 3256 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3250 3257 if( pcCU->getResPredFlag( 0 )) 3251 3258 { … … 3435 3442 } 3436 3443 } 3437 #if LG_RESTRICTEDRESPRED_M24766 3444 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3438 3445 if( pcCU->getResPredFlag( 0 ) && bLastResiFlag) 3439 3446 { // subtract residual prediction from original in motion search … … 3444 3451 if ( pcCU->getSlice()->isInterB() ) 3445 3452 { 3446 #if LG_RESTRICTEDRESPRED_M24766 3453 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3447 3454 Int iLastAddResiShift = -1000; 3448 3455 #endif … … 3552 3559 uiBitsTemp += m_auiMVPIdxCost[aaiMvpIdxBi[iRefList][iRefIdxTemp]][AMVP_MAX_NUM_CANDS]; 3553 3560 #endif 3554 #if LG_RESTRICTEDRESPRED_M24766 3561 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3555 3562 Int iAddResiShift = -1, iPredFrom = 0; 3556 3563 Int iBestRefIdx = pcCU->getCUMvField(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0)->getRefIdx(uiPartAddr); … … 3641 3648 } 3642 3649 } // for loop-iter 3643 #if LG_RESTRICTEDRESPRED_M24766 3650 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3644 3651 if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0) 3645 3652 { … … 3856 3863 if (bTestNormalMC) 3857 3864 { 3858 #if LG_RESTRICTEDRESPRED_M24766 3865 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3859 3866 Int iAddResiShift = pcCU->getResiPredMode(uiPartAddr); 3860 3867 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = \ … … 3867 3874 xGetInterPredictionError( pcCU, pcOrgYuv, iPartIdx, uiMEError, m_pcEncCfg->getUseHADME() ); 3868 3875 uiMECost = uiMEError + m_pcRdCost->getCost( uiMEBits ); 3869 #if LG_RESTRICTEDRESPRED_M24766 3876 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3870 3877 if(pcCU->getResPredFlag(0) && iAddResiShift >= 0) 3871 3878 { … … 3895 3902 #else 3896 3903 #if LG_RESTRICTEDRESPRED_M24766 3897 #if MERL_VSP_C0152 3904 #if MERL_VSP_C0152 || MTK_MDIVRP_C0138 3905 3906 #if !MTK_MDIVRP_C0138 3898 3907 xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, iVSPIndexTrue ); 3908 #endif 3909 3910 #if !MERL_VSP_C0152 3911 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost ); 3912 #endif 3913 3914 #if MERL_VSP_C0152 && MTK_MDIVRP_C0138 3915 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, iVSPIndexTrue ); 3916 #endif 3917 3899 3918 #else 3900 3919 xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost ); 3901 3920 #endif 3921 3922 3902 3923 #else 3903 3924 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost ); … … 4833 4854 UInt uiWidth = pcCU->getWidth ( 0 ); 4834 4855 UInt uiHeight = pcCU->getHeight( 0 ); 4835 #if LG_RESTRICTEDRESPRED_M24766 4856 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 4836 4857 Int iPUResiPredShift[4]; 4837 4858 #endif 4838 4859 // No residual coding : SKIP mode 4839 if ( (ePredMode == MODE_SKIP && bSkipRes))4860 if ( ePredMode == MODE_SKIP && bSkipRes ) 4840 4861 { 4841 4862 rpcYuvResi->clear(); … … 4843 4864 pcYuvPred->copyToPartYuv( rpcYuvRec, 0 ); 4844 4865 4866 #if MTK_MDIVRP_C0138 4867 if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0)) 4868 { 4869 rpcYuvRec->clip( uiWidth, uiHeight ); 4870 } 4871 #else 4845 4872 #if HHI_INTER_VIEW_RESIDUAL_PRED 4846 4873 // add residual prediction … … 4855 4882 rpcYuvRec->clip( uiWidth, uiHeight ); 4856 4883 } 4884 #endif 4857 4885 #endif 4858 4886 … … 4900 4928 m_pcEntropyCoder->encodeICFlag(pcCU, 0, true); 4901 4929 #endif 4902 #if HHI_INTER_VIEW_RESIDUAL_PRED 4930 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138 4903 4931 m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true ); 4904 4932 #endif … … 4978 5006 else 4979 5007 { 4980 #if LG_RESTRICTEDRESPRED_M24766 5008 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 4981 5009 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = 0; 4982 5010 rpcYuvResi->subtract(iPUResiPredShift, pcCU->getPartitionSize(0), pcYuvOrg, pcYuvPred, 0, uiWidth ); … … 4984 5012 rpcYuvResi->subtract( pcYuvOrg, pcYuvPred, 0, uiWidth ); 4985 5013 #endif 4986 #if HHI_INTER_VIEW_RESIDUAL_PRED 5014 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138 4987 5015 // subtract residual prediction 4988 5016 if( pcCU->getResPredFlag( 0 ) ) … … 5206 5234 #endif 5207 5235 } 5208 #if HHI_INTER_VIEW_RESIDUAL_PRED 5236 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138 5209 5237 // add residual prediction 5210 5238 if( pcCU->getResPredFlag( 0 ) ) … … 6283 6311 m_pcEntropyCoder->encodeICFlag(pcCU, 0, true); 6284 6312 #endif 6285 #if HHI_INTER_VIEW_RESIDUAL_PRED 6313 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138 6286 6314 m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true ); 6287 6315 #endif … … 6306 6334 m_pcEntropyCoder->encodeICFlag(pcCU, 0, true); 6307 6335 #endif 6308 #if HHI_INTER_VIEW_RESIDUAL_PRED 6336 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138 6309 6337 m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true ); 6310 6338 #endif
Note: See TracChangeset for help on using the changeset viewer.