Ignore:
Timestamp:
31 Jan 2013, 03:48:51 (11 years ago)
Author:
mediatek-htm
Message:

Implementation of C0138
Added macro "MTK_MDIVRP_C0138"

File:
1 edited

Legend:

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

    r210 r244  
    29422942#endif
    29432943#else
    2944 #if LG_RESTRICTEDRESPRED_M24766
     2944#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    29452945Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost )
    29462946#else
     
    29942994  const int maxNumMergeCand = MRG_MAX_NUM_CANDS_SIGNALED + ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 );
    29952995#endif
    2996 #if LG_RESTRICTEDRESPRED_M24766
     2996#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    29972997  Int iPUResiPredShift[4];
    29982998  Int iLastAddResiShift = -1000;
     
    30093009      pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
    30103010      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
    30123012      Int iAddResiShift;
    30133013      UInt uiPartAddr;
     
    30593059    }
    30603060  }
    3061 #if LG_RESTRICTEDRESPRED_M24766
     3061#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    30623062  if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0)
    30633063  {
     
    30783078 */
    30793079#if AMP_MRG
    3080 #if LG_RESTRICTEDRESPRED_M24766
     3080#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    30813081Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv* rpcResiPredYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes, Bool bUseMRG )
    30823082#else
     
    31853185    for (Int iNumRef=0; iNumRef < MAX_NUM_REF; iNumRef++) uiCostTempL0[iNumRef] = MAX_UINT;
    31863186    UInt          uiBitsTempL0[MAX_NUM_REF];
    3187 #if LG_RESTRICTEDRESPRED_M24766
     3187#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    31883188    Int iPUResiPredShift[4] = {0, 0, 0, 0};
    31893189#endif
     
    32033203    {
    32043204#endif
    3205 #if LG_RESTRICTEDRESPRED_M24766
     3205#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    32063206      Bool bLastResiFlag = false;
    32073207#endif
     
    32133213      for ( Int iRefIdxTemp = 0; iRefIdxTemp < pcCU->getSlice()->getNumRefIdx(eRefPicList); iRefIdxTemp++ )
    32143214      {
    3215 #if LG_RESTRICTEDRESPRED_M24766
     3215#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    32163216        if( pcCU->getResPredFlag( 0 ))
    32173217        {
     
    33933393      }
    33943394    }
    3395 #if LG_RESTRICTEDRESPRED_M24766
     3395#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    33963396    if( pcCU->getResPredFlag( 0 ) && bLastResiFlag)
    33973397    { // subtract residual prediction from original in motion search
     
    34023402    if ( pcCU->getSlice()->isInterB() )
    34033403    {
    3404 #if LG_RESTRICTEDRESPRED_M24766
     3404#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    34053405      Int iLastAddResiShift = -1000;
    34063406#endif
     
    35073507          uiBitsTemp += m_auiMVPIdxCost[aaiMvpIdxBi[iRefList][iRefIdxTemp]][AMVP_MAX_NUM_CANDS];
    35083508#endif
    3509 #if LG_RESTRICTEDRESPRED_M24766
     3509#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    35103510          Int iAddResiShift = -1, iPredFrom = 0;
    35113511          Int iBestRefIdx = pcCU->getCUMvField(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0)->getRefIdx(uiPartAddr);
     
    35923592        }
    35933593      } // for loop-iter
    3594 #if LG_RESTRICTEDRESPRED_M24766
     3594#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    35953595      if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0)
    35963596      {
     
    38053805      if (bTestNormalMC)
    38063806      {
    3807 #if LG_RESTRICTEDRESPRED_M24766
     3807#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    38083808        Int iAddResiShift = pcCU->getResiPredMode(uiPartAddr);
    38093809        iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = \
     
    38163816        xGetInterPredictionError( pcCU, pcOrgYuv, iPartIdx, uiMEError, m_pcEncCfg->getUseHADME() );
    38173817        uiMECost = uiMEError + m_pcRdCost->getCost( uiMEBits );
    3818 #if LG_RESTRICTEDRESPRED_M24766
     3818#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    38193819        if(pcCU->getResPredFlag(0) && iAddResiShift >= 0)
    38203820        {
     
    38433843#endif
    38443844#else
    3845 #if LG_RESTRICTEDRESPRED_M24766
     3845#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    38463846      xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost );
    38473847#else
     
    47544754  UInt      uiWidth      = pcCU->getWidth ( 0 );
    47554755  UInt      uiHeight     = pcCU->getHeight( 0 );
    4756 #if LG_RESTRICTEDRESPRED_M24766
     4756#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    47574757  Int       iPUResiPredShift[4];
    47584758#endif
     
    47644764    pcYuvPred->copyToPartYuv( rpcYuvRec, 0 );
    47654765   
     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
    47664772#if HHI_INTER_VIEW_RESIDUAL_PRED
    47674773    // add residual prediction
     
    47764782      rpcYuvRec->clip( uiWidth, uiHeight );
    47774783    }
     4784#endif
    47784785#endif
    47794786
     
    48214828    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
    48224829#endif
    4823 #if HHI_INTER_VIEW_RESIDUAL_PRED
     4830#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    48244831    m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
    48254832#endif
     
    48994906  else
    49004907  {
    4901 #if LG_RESTRICTEDRESPRED_M24766
     4908#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    49024909    iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = 0;
    49034910    rpcYuvResi->subtract(iPUResiPredShift, pcCU->getPartitionSize(0), pcYuvOrg, pcYuvPred, 0, uiWidth );
     
    49054912  rpcYuvResi->subtract( pcYuvOrg, pcYuvPred, 0, uiWidth );
    49064913#endif
    4907 #if HHI_INTER_VIEW_RESIDUAL_PRED
     4914#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    49084915    // subtract residual prediction
    49094916    if( pcCU->getResPredFlag( 0 ) )
     
    51275134#endif
    51285135  }
    5129 #if HHI_INTER_VIEW_RESIDUAL_PRED
     5136#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    51305137  // add residual prediction
    51315138  if( pcCU->getResPredFlag( 0 ) )
     
    62046211    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
    62056212#endif
    6206 #if HHI_INTER_VIEW_RESIDUAL_PRED
     6213#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    62076214    m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
    62086215#endif
     
    62276234    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
    62286235#endif
    6229 #if HHI_INTER_VIEW_RESIDUAL_PRED
     6236#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    62306237    m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
    62316238#endif
Note: See TracChangeset for help on using the changeset viewer.