Ignore:
Timestamp:
14 Feb 2013, 23:41:41 (12 years ago)
Author:
tech
Message:

Integration of branch dev 2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp

    r275 r280  
    29472947#else
    29482948#if LG_RESTRICTEDRESPRED_M24766
    2949 #if MERL_VSP_C0152
     2949#if MERL_VSP_C0152 || MTK_MDIVRP_C0138
     2950#if !MTK_MDIVRP_C0138
    29502951Void 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
     2954Void 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
     2957Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, Int* iVSPIndexTrue  )
     2958#endif
    29512959#else
    29522960Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost )
     
    30073015  const int maxNumMergeCand = MRG_MAX_NUM_CANDS_SIGNALED + ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 );
    30083016#endif
    3009 #if LG_RESTRICTEDRESPRED_M24766
     3017#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    30103018  Int iPUResiPredShift[4];
    30113019  Int iLastAddResiShift = -1000;
     
    30383046      }
    30393047#endif
    3040 #if LG_RESTRICTEDRESPRED_M24766
     3048#if LG_RESTRICTEDRESPRED_M24766  && !MTK_MDIVRP_C0138
    30413049      Int iAddResiShift;
    30423050      UInt uiPartAddr;
     
    30883096    }
    30893097  }
    3090 #if LG_RESTRICTEDRESPRED_M24766
     3098#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    30913099  if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0)
    30923100  {
     
    31073115 */
    31083116#if AMP_MRG
    3109 #if LG_RESTRICTEDRESPRED_M24766
     3117#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    31103118Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv* rpcResiPredYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes, Bool bUseMRG )
    31113119#else
     
    32143222    for (Int iNumRef=0; iNumRef < MAX_NUM_REF; iNumRef++) uiCostTempL0[iNumRef] = MAX_UINT;
    32153223    UInt          uiBitsTempL0[MAX_NUM_REF];
    3216 
    3217 #if LG_RESTRICTEDRESPRED_M24766
     3224#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    32183225    Int iPUResiPredShift[4] = {0, 0, 0, 0};
    32193226#endif
     
    32363243    {
    32373244#endif
    3238 #if LG_RESTRICTEDRESPRED_M24766
     3245#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    32393246      Bool bLastResiFlag = false;
    32403247#endif
     
    32473254      for ( Int iRefIdxTemp = 0; iRefIdxTemp < pcCU->getSlice()->getNumRefIdx(eRefPicList); iRefIdxTemp++ )
    32483255      {
    3249 #if LG_RESTRICTEDRESPRED_M24766
     3256#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    32503257        if( pcCU->getResPredFlag( 0 ))
    32513258        {
     
    34353442      }
    34363443    }
    3437 #if LG_RESTRICTEDRESPRED_M24766
     3444#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    34383445    if( pcCU->getResPredFlag( 0 ) && bLastResiFlag)
    34393446    { // subtract residual prediction from original in motion search
     
    34443451    if ( pcCU->getSlice()->isInterB() )
    34453452    {
    3446 #if LG_RESTRICTEDRESPRED_M24766
     3453#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    34473454      Int iLastAddResiShift = -1000;
    34483455#endif
     
    35523559          uiBitsTemp += m_auiMVPIdxCost[aaiMvpIdxBi[iRefList][iRefIdxTemp]][AMVP_MAX_NUM_CANDS];
    35533560#endif
    3554 #if LG_RESTRICTEDRESPRED_M24766
     3561#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    35553562          Int iAddResiShift = -1, iPredFrom = 0;
    35563563          Int iBestRefIdx = pcCU->getCUMvField(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0)->getRefIdx(uiPartAddr);
     
    36413648        }
    36423649      } // for loop-iter
    3643 #if LG_RESTRICTEDRESPRED_M24766
     3650#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    36443651      if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0)
    36453652      {
     
    38563863      if (bTestNormalMC)
    38573864      {
    3858 #if LG_RESTRICTEDRESPRED_M24766
     3865#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    38593866        Int iAddResiShift = pcCU->getResiPredMode(uiPartAddr);
    38603867        iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = \
     
    38673874        xGetInterPredictionError( pcCU, pcOrgYuv, iPartIdx, uiMEError, m_pcEncCfg->getUseHADME() );
    38683875        uiMECost = uiMEError + m_pcRdCost->getCost( uiMEBits );
    3869 #if LG_RESTRICTEDRESPRED_M24766
     3876#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    38703877        if(pcCU->getResPredFlag(0) && iAddResiShift >= 0)
    38713878        {
     
    38953902#else
    38963903#if LG_RESTRICTEDRESPRED_M24766
    3897 #if MERL_VSP_C0152
     3904#if MERL_VSP_C0152 || MTK_MDIVRP_C0138
     3905
     3906#if !MTK_MDIVRP_C0138
    38983907      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
    38993918#else
    39003919      xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost );
    39013920#endif
     3921
     3922
    39023923#else
    39033924      xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost );
     
    48334854  UInt      uiWidth      = pcCU->getWidth ( 0 );
    48344855  UInt      uiHeight     = pcCU->getHeight( 0 );
    4835 #if LG_RESTRICTEDRESPRED_M24766
     4856#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    48364857  Int       iPUResiPredShift[4];
    48374858#endif
    48384859  //  No residual coding : SKIP mode
    4839   if ( (ePredMode == MODE_SKIP && bSkipRes) )
     4860  if ( ePredMode == MODE_SKIP && bSkipRes )
    48404861  {
    48414862    rpcYuvResi->clear();
     
    48434864    pcYuvPred->copyToPartYuv( rpcYuvRec, 0 );
    48444865   
     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
    48454872#if HHI_INTER_VIEW_RESIDUAL_PRED
    48464873    // add residual prediction
     
    48554882      rpcYuvRec->clip( uiWidth, uiHeight );
    48564883    }
     4884#endif
    48574885#endif
    48584886
     
    49004928    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
    49014929#endif
    4902 #if HHI_INTER_VIEW_RESIDUAL_PRED
     4930#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    49034931    m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
    49044932#endif
     
    49785006  else
    49795007  {
    4980 #if LG_RESTRICTEDRESPRED_M24766
     5008#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    49815009    iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = 0;
    49825010    rpcYuvResi->subtract(iPUResiPredShift, pcCU->getPartitionSize(0), pcYuvOrg, pcYuvPred, 0, uiWidth );
     
    49845012  rpcYuvResi->subtract( pcYuvOrg, pcYuvPred, 0, uiWidth );
    49855013#endif
    4986 #if HHI_INTER_VIEW_RESIDUAL_PRED
     5014#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    49875015    // subtract residual prediction
    49885016    if( pcCU->getResPredFlag( 0 ) )
     
    52065234#endif
    52075235  }
    5208 #if HHI_INTER_VIEW_RESIDUAL_PRED
     5236#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    52095237  // add residual prediction
    52105238  if( pcCU->getResPredFlag( 0 ) )
     
    62836311    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
    62846312#endif
    6285 #if HHI_INTER_VIEW_RESIDUAL_PRED
     6313#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    62866314    m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
    62876315#endif
     
    63066334    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
    63076335#endif
    6308 #if HHI_INTER_VIEW_RESIDUAL_PRED
     6336#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    63096337    m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
    63106338#endif
Note: See TracChangeset for help on using the changeset viewer.