Ignore:
Timestamp:
28 Jan 2013, 22:13:59 (11 years ago)
Author:
qualcomm
Message:

QC_C0047&51

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.1-dev2-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp

    r210 r237  
    37063706  Int iPdmDir[2] = {0, 0};
    37073707#endif
     3708#if QC_AMVP_MRG_UNIFY_IVCAN_C0051
     3709  getUnifiedMvPredCan(uiPUIdx, REF_PIC_LIST_0, 0, aiPdmRefIdx, acPdmMv, &cDisInfo, iPdmDir, true);
     3710  Int iPdmInterDir;
     3711#else
    37083712  Int     iPdmInterDir      = cDisInfo.iN==0? 0:getPdmMergeCandidateDisCan ( uiPUIdx, aiPdmRefIdx, acPdmMv, &cDisInfo 
    37093713#if QC_MRG_CANS_B0048
     
    37113715#endif
    37123716    );
     3717#endif
    37133718#else
    37143719  Int     iPdmInterDir      = getPdmMergeCandidate( uiPUIdx, aiPdmRefIdx, acPdmMv );
     
    44094414    UInt uiCurLCUIdx = getAddr();
    44104415    xDeriveCenterIdx( eCUMode, uiPUIdx, uiPartIdxCenter );
    4411     bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_0, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx );
     4416    bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_0, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx
     4417#if QC_TMVP_MRG_REFIDX_C0047
     4418    , 1
     4419#endif
     4420    );
    44124421    if( bExistMV == false )
    44134422    {
    4414       bExistMV = xGetColMVP( REF_PIC_LIST_0, uiCurLCUIdx, uiPartIdxCenter,  cColMv, iRefIdx );
     4423      bExistMV = xGetColMVP( REF_PIC_LIST_0, uiCurLCUIdx, uiPartIdxCenter,  cColMv, iRefIdx
     4424#if QC_TMVP_MRG_REFIDX_C0047
     4425    , 1
     4426#endif
     4427    );
    44154428    }
    44164429    if( bExistMV )
     
    44274440        iRefIdx = 0;
    44284441#endif
    4429         bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_1, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx);
     4442        bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_1, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx
     4443#if QC_TMVP_MRG_REFIDX_C0047
     4444        , 1
     4445#endif
     4446        );
    44304447        if( bExistMV == false )
    44314448        {
    4432           bExistMV = xGetColMVP( REF_PIC_LIST_1, uiCurLCUIdx, uiPartIdxCenter,  cColMv, iRefIdx );
     4449          bExistMV = xGetColMVP( REF_PIC_LIST_1, uiCurLCUIdx, uiPartIdxCenter,  cColMv, iRefIdx
     4450#if QC_TMVP_MRG_REFIDX_C0047
     4451        , 1
     4452#endif 
     4453        );
    44334454        }
    44344455        if( bExistMV )
     
    59215942        cDisInfo.m_aVIdxCan[0] = 0;
    59225943      }
     5944#if QC_AMVP_MRG_UNIFY_IVCAN_C0051
     5945      Int paiPdmRefIdx[4] = {-1, -1, -1, -1};
     5946      Int iPdmDir[4] = {-1, -1, -1, -1};
     5947      TComMv cPdmMvPred[2];
     5948      cPdmMvPred[0].m_bDvMcp = cPdmMvPred[1].m_bDvMcp = false;
     5949      if(getUnifiedMvPredCan(uiPartIdx, eRefPicList, iRefIdx, paiPdmRefIdx, cPdmMvPred, &cDisInfo, iPdmDir, false))
     5950#else
    59235951      TComMv  cPdmMvPred;
    59245952#if QC_MULTI_DIS_CAN_A0097
     
    59275955      if( getPdmMvPred( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred ) )
    59285956#endif
     5957#endif
     5958#if QC_AMVP_MRG_UNIFY_IVCAN_C0051
     5959      {
     5960        clipMv( cPdmMvPred[0] );
     5961        pInfo->m_acMvCand[0] = cPdmMvPred[0];
     5962      }
     5963      else
     5964      {
     5965        pInfo->m_acMvCand[0].set(0,0);
     5966      }
     5967#else
    59295968      {
    59305969        clipMv( cPdmMvPred );
     
    59355974        pInfo->m_acMvCand[0].set(0,0);
    59365975      }
     5976#endif
    59375977    }
    59385978  }
     
    67846824 * \returns Bool
    67856825 */
    6786 Bool TComDataCU::xGetColMVP( RefPicList eRefPicList, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int& riRefIdx )
     6826Bool TComDataCU::xGetColMVP( RefPicList eRefPicList, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int& riRefIdx
     6827#if QC_TMVP_MRG_REFIDX_C0047
     6828  ,
     6829  Bool bMRG
     6830#endif
     6831)
    67876832{
    67886833  UInt uiAbsPartAddr = uiPartUnitIdx;
     
    68686913  if(bIsCurrRefLongTerm != bIsColRefLongTerm)
    68696914  {
     6915#if QC_TMVP_MRG_REFIDX_C0047
     6916    cColMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr);
     6917    iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC();
     6918    if(bMRG )
     6919    {
     6920      Int iUpdRefIdx  = m_pcSlice->getNewRefIdx(eRefPicList);
     6921      if(iUpdRefIdx > 0 )
     6922      {
     6923        riRefIdx = iUpdRefIdx;
     6924        bIsCurrRefLongTerm = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getIsLongTerm();
     6925        iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC();
     6926#if SONY_COLPIC_AVAILABILITY
     6927        iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx();
     6928#endif
     6929      }
     6930      else
     6931        return false;
     6932    }else
     6933    {
     6934#endif
    68706935    assert( ((iColPOC == iColRefPOC)&&(iCurrPOC != iCurrRefPOC))||((iColPOC != iColRefPOC)&&(iCurrPOC == iCurrRefPOC)));
    68716936    return false;
     6937#if QC_TMVP_MRG_REFIDX_C0047
     6938    }
     6939#endif
    68726940  }
    68736941#endif
     
    78997967}
    79007968#else
     7969#if QC_AMVP_MRG_UNIFY_IVCAN_C0051
     7970Bool
     7971TComDataCU::getUnifiedMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm, Bool bMerge )
     7972{
     7973  TComDepthMapGenerator* pcDepthMapGenerator = m_pcSlice->getSPS()->getDepthMapGenerator();
     7974  ROFRS( pcDepthMapGenerator, false );
     7975  if (pDInfo->iN > 0 && pcDepthMapGenerator->getPdmCandidate(this, uiPartIdx, eRefPicList, iRefIdx, paiPdmRefIdx, pacPdmMv, pDInfo, iPdm, bMerge))
     7976    return true;
     7977  return false;
     7978}
     7979#else
    79017980Int
    79027981TComDataCU::getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo
     
    79248003}
    79258004#endif
    7926 
     8005#endif
    79278006
    79288007Bool     
Note: See TracChangeset for help on using the changeset viewer.