Changeset 244 in 3DVCSoftware for branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncSearch.cpp
- Timestamp:
- 31 Jan 2013, 03:48:51 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncSearch.cpp
r210 r244 2942 2942 #endif 2943 2943 #else 2944 #if LG_RESTRICTEDRESPRED_M24766 2944 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 2945 2945 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost ) 2946 2946 #else … … 2994 2994 const int maxNumMergeCand = MRG_MAX_NUM_CANDS_SIGNALED + ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 ); 2995 2995 #endif 2996 #if LG_RESTRICTEDRESPRED_M24766 2996 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 2997 2997 Int iPUResiPredShift[4]; 2998 2998 Int iLastAddResiShift = -1000; … … 3009 3009 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx ); 3010 3010 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx ); 3011 #if LG_RESTRICTEDRESPRED_M24766 3011 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3012 3012 Int iAddResiShift; 3013 3013 UInt uiPartAddr; … … 3059 3059 } 3060 3060 } 3061 #if LG_RESTRICTEDRESPRED_M24766 3061 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3062 3062 if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0) 3063 3063 { … … 3078 3078 */ 3079 3079 #if AMP_MRG 3080 #if LG_RESTRICTEDRESPRED_M24766 3080 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3081 3081 Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv* rpcResiPredYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes, Bool bUseMRG ) 3082 3082 #else … … 3185 3185 for (Int iNumRef=0; iNumRef < MAX_NUM_REF; iNumRef++) uiCostTempL0[iNumRef] = MAX_UINT; 3186 3186 UInt uiBitsTempL0[MAX_NUM_REF]; 3187 #if LG_RESTRICTEDRESPRED_M24766 3187 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3188 3188 Int iPUResiPredShift[4] = {0, 0, 0, 0}; 3189 3189 #endif … … 3203 3203 { 3204 3204 #endif 3205 #if LG_RESTRICTEDRESPRED_M24766 3205 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3206 3206 Bool bLastResiFlag = false; 3207 3207 #endif … … 3213 3213 for ( Int iRefIdxTemp = 0; iRefIdxTemp < pcCU->getSlice()->getNumRefIdx(eRefPicList); iRefIdxTemp++ ) 3214 3214 { 3215 #if LG_RESTRICTEDRESPRED_M24766 3215 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3216 3216 if( pcCU->getResPredFlag( 0 )) 3217 3217 { … … 3393 3393 } 3394 3394 } 3395 #if LG_RESTRICTEDRESPRED_M24766 3395 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3396 3396 if( pcCU->getResPredFlag( 0 ) && bLastResiFlag) 3397 3397 { // subtract residual prediction from original in motion search … … 3402 3402 if ( pcCU->getSlice()->isInterB() ) 3403 3403 { 3404 #if LG_RESTRICTEDRESPRED_M24766 3404 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3405 3405 Int iLastAddResiShift = -1000; 3406 3406 #endif … … 3507 3507 uiBitsTemp += m_auiMVPIdxCost[aaiMvpIdxBi[iRefList][iRefIdxTemp]][AMVP_MAX_NUM_CANDS]; 3508 3508 #endif 3509 #if LG_RESTRICTEDRESPRED_M24766 3509 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3510 3510 Int iAddResiShift = -1, iPredFrom = 0; 3511 3511 Int iBestRefIdx = pcCU->getCUMvField(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0)->getRefIdx(uiPartAddr); … … 3592 3592 } 3593 3593 } // for loop-iter 3594 #if LG_RESTRICTEDRESPRED_M24766 3594 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3595 3595 if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0) 3596 3596 { … … 3805 3805 if (bTestNormalMC) 3806 3806 { 3807 #if LG_RESTRICTEDRESPRED_M24766 3807 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3808 3808 Int iAddResiShift = pcCU->getResiPredMode(uiPartAddr); 3809 3809 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = \ … … 3816 3816 xGetInterPredictionError( pcCU, pcOrgYuv, iPartIdx, uiMEError, m_pcEncCfg->getUseHADME() ); 3817 3817 uiMECost = uiMEError + m_pcRdCost->getCost( uiMEBits ); 3818 #if LG_RESTRICTEDRESPRED_M24766 3818 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3819 3819 if(pcCU->getResPredFlag(0) && iAddResiShift >= 0) 3820 3820 { … … 3843 3843 #endif 3844 3844 #else 3845 #if LG_RESTRICTEDRESPRED_M24766 3845 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 3846 3846 xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost ); 3847 3847 #else … … 4754 4754 UInt uiWidth = pcCU->getWidth ( 0 ); 4755 4755 UInt uiHeight = pcCU->getHeight( 0 ); 4756 #if LG_RESTRICTEDRESPRED_M24766 4756 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 4757 4757 Int iPUResiPredShift[4]; 4758 4758 #endif … … 4764 4764 pcYuvPred->copyToPartYuv( rpcYuvRec, 0 ); 4765 4765 4766 #if MTK_MDIVRP_C0138 4767 if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0)) 4768 { 4769 rpcYuvRec->clip( uiWidth, uiHeight ); 4770 } 4771 #else 4766 4772 #if HHI_INTER_VIEW_RESIDUAL_PRED 4767 4773 // add residual prediction … … 4776 4782 rpcYuvRec->clip( uiWidth, uiHeight ); 4777 4783 } 4784 #endif 4778 4785 #endif 4779 4786 … … 4821 4828 m_pcEntropyCoder->encodeICFlag(pcCU, 0, true); 4822 4829 #endif 4823 #if HHI_INTER_VIEW_RESIDUAL_PRED 4830 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138 4824 4831 m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true ); 4825 4832 #endif … … 4899 4906 else 4900 4907 { 4901 #if LG_RESTRICTEDRESPRED_M24766 4908 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 4902 4909 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = 0; 4903 4910 rpcYuvResi->subtract(iPUResiPredShift, pcCU->getPartitionSize(0), pcYuvOrg, pcYuvPred, 0, uiWidth ); … … 4905 4912 rpcYuvResi->subtract( pcYuvOrg, pcYuvPred, 0, uiWidth ); 4906 4913 #endif 4907 #if HHI_INTER_VIEW_RESIDUAL_PRED 4914 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138 4908 4915 // subtract residual prediction 4909 4916 if( pcCU->getResPredFlag( 0 ) ) … … 5127 5134 #endif 5128 5135 } 5129 #if HHI_INTER_VIEW_RESIDUAL_PRED 5136 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138 5130 5137 // add residual prediction 5131 5138 if( pcCU->getResPredFlag( 0 ) ) … … 6204 6211 m_pcEntropyCoder->encodeICFlag(pcCU, 0, true); 6205 6212 #endif 6206 #if HHI_INTER_VIEW_RESIDUAL_PRED 6213 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138 6207 6214 m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true ); 6208 6215 #endif … … 6227 6234 m_pcEntropyCoder->encodeICFlag(pcCU, 0, true); 6228 6235 #endif 6229 #if HHI_INTER_VIEW_RESIDUAL_PRED 6236 #if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138 6230 6237 m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true ); 6231 6238 #endif
Note: See TracChangeset for help on using the changeset viewer.