Changeset 28 in SHVCSoftware for trunk/source/Lib/TLibEncoder


Ignore:
Timestamp:
7 Feb 2013, 02:16:51 (12 years ago)
Author:
seregin
Message:

Reintegrate SHM-1.0-dev branch

Location:
trunk/source/Lib/TLibEncoder
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibEncoder/TEncCavlc.cpp

    r2 r28  
    600600#endif
    601601  WRITE_FLAG( pcSPS->getTMVPFlagsPresent()  ? 1 : 0,           "sps_temporal_mvp_enable_flag" );
     602#if REF_IDX_MFM
     603  if( pcSPS->getLayerId() > 0 )
     604  {
     605          assert(pcSPS->getMFMEnabledFlag());
     606          WRITE_FLAG( pcSPS->getMFMEnabledFlag() ? 1 : 0,          "sps_enh_mfm_enable_flag" );
     607  }
     608#endif
    602609#if SUPPORT_FOR_VUI
    603610  WRITE_FLAG( pcSPS->getVuiParametersPresentFlag(),             "vui_parameters_present_flag" );
  • trunk/source/Lib/TLibEncoder/TEncCu.cpp

    r20 r28  
    13511351    for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand )
    13521352    {
     1353#if REF_IDX_ME_ZEROMV
     1354                Bool bZeroMVILR = rpcTempCU->xCheckZeroMVILRMerge(uhInterDirNeighbours[uiMergeCand], cMvFieldNeighbours[0 + 2*uiMergeCand], cMvFieldNeighbours[1 + 2*uiMergeCand]);
     1355                if(bZeroMVILR)
     1356                {
     1357#endif
    13531358        if(!(uiNoResidual==1 && mergeCandBuffer[uiMergeCand]==1))
    13541359        {
     
    14021407    }
    14031408    }
     1409#if REF_IDX_ME_ZEROMV
     1410        }
     1411#endif
    14041412   }
    14051413
  • trunk/source/Lib/TLibEncoder/TEncGOP.cpp

    r2 r28  
    465465#endif
    466466
     467#if REF_IDX_FRAMEWORK
     468    if (pcSlice->getSliceType() == B_SLICE)
     469      pcSlice->setColFromL0Flag(1-uiColDir);
     470#endif
     471
    467472    //  Set reference list
    468473    pcSlice->setRefPicList ( rcListPic );
     
    471476    {
    472477      m_pcEncTop->setILRPic(pcPic);
     478
     479#if REF_IDX_MFM
     480      pcSlice->setRefPOCListILP(m_pcEncTop->getIlpList(), pcSlice->getBaseColPic());
     481#endif
    473482      pcSlice->addRefPicList ( m_pcEncTop->getIlpList(), 1);
     483
     484#if REF_IDX_MFM
     485      Bool found         = false;
     486      UInt ColFromL0Flag = pcSlice->getColFromL0Flag();
     487      UInt ColRefIdx     = pcSlice->getColRefIdx();
     488      for(Int colIdx = 0; colIdx < pcSlice->getNumRefIdx( RefPicList(1 - ColFromL0Flag) ); colIdx++)
     489      {
     490        if( pcSlice->getRefPic( RefPicList(1 - ColFromL0Flag), colIdx)->getIsILR() )
     491        {
     492          ColRefIdx = colIdx;
     493          found = true;
     494          break;
     495        }
     496      }
     497
     498      if( found == false )
     499      {
     500        ColFromL0Flag = 1 - ColFromL0Flag;
     501        for(Int colIdx = 0; colIdx < pcSlice->getNumRefIdx( RefPicList(1 - ColFromL0Flag) ); colIdx++)
     502        {
     503          if( pcSlice->getRefPic( RefPicList(1 - ColFromL0Flag), colIdx)->getIsILR() )
     504          {
     505            ColRefIdx = colIdx;
     506            found = true;
     507            break;
     508          }
     509        }
     510      }
     511
     512      if(found == true)
     513      {
     514        pcSlice->setColFromL0Flag(ColFromL0Flag);
     515        pcSlice->setColRefIdx(ColRefIdx);
     516      }
     517#endif
    474518    }
    475519#endif
     
    495539    if (pcSlice->getSliceType() == B_SLICE)
    496540    {
     541#if !REF_IDX_FRAMEWORK
    497542      pcSlice->setColFromL0Flag(1-uiColDir);
     543#endif
    498544      Bool bLowDelay = true;
    499545      Int  iCurrPOC  = pcSlice->getPOC();
  • trunk/source/Lib/TLibEncoder/TEncSearch.cpp

    r21 r28  
    32113211  for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand )
    32123212  {
     3213#if REF_IDX_ME_ZEROMV
     3214          Bool bZeroMVILR = pcCU->xCheckZeroMVILRMerge(uhInterDirNeighbours[uiMergeCand], cMvFieldNeighbours[0 + 2*uiMergeCand], cMvFieldNeighbours[1 + 2*uiMergeCand]);
     3215          if(bZeroMVILR)
     3216          {
     3217#endif
    32133218      UInt uiCostCand = MAX_UINT;
    32143219      UInt uiBitsCand = 0;
     
    32343239        uiMergeIndex = uiMergeCand;
    32353240      }
     3241#if REF_IDX_ME_ZEROMV
     3242          }
     3243#endif
    32363244    }
    32373245}
     
    34203428        if(pcCU->getSlice()->getMvdL1ZeroFlag() && iRefList==1 && biPDistTemp < bestBiPDist)
    34213429        {
     3430#if REF_IDX_ME_ZEROMV
     3431                  Bool bZeroMVILR = pcCU->xCheckZeroMVILRMvdL1Zero(iRefList, iRefIdxTemp, aaiMvpIdx[iRefList][iRefIdxTemp]);
     3432                  if(bZeroMVILR)
     3433                  {
     3434#endif
    34223435          bestBiPDist = biPDistTemp;
    34233436          bestBiPMvpL1 = aaiMvpIdx[iRefList][iRefIdxTemp];
    34243437          bestBiPRefIdxL1 = iRefIdxTemp;
     3438#if REF_IDX_ME_ZEROMV
     3439                  }
     3440#endif
    34253441        }
    34263442
     
    35603576    }
    35613577    //  Bi-directional prediction
     3578#if REF_IDX_ME_ZEROMV
     3579        if ( (pcCU->getSlice()->isInterB()) && (pcCU->isBipredRestriction(iPartIdx) == false) && !(pcCU->getSlice()->getMvdL1ZeroFlag() && bestBiPDist == MAX_INT) )
     3580#else
    35623581    if ( (pcCU->getSlice()->isInterB()) && (pcCU->isBipredRestriction(iPartIdx) == false) )
     3582#endif
    35633583    {
    35643584     
  • trunk/source/Lib/TLibEncoder/TEncTop.cpp

    r21 r28  
    8585  memset(m_cIlpPic, 0, sizeof(m_cIlpPic));
    8686#endif
     87#if REF_IDX_MFM
     88  m_bMFMEnabledFlag = false;
     89#endif
    8790}
    8891
     
    394397        m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true);
    395398#endif
    396 #if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE
     399#if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE || REF_IDX_MFM
    397400        m_cIlpPic[j]->setIsILR(true);
    398401#endif
     
    599602  // mark it should be extended
    600603  rpcPic->getPicYuvRec()->setBorderExtension(false);
     604
    601605}
    602606
     
    605609#if SVC_EXTENSION
    606610  m_cSPS.setLayerId(m_layerId);
     611#endif
     612#if REF_IDX_MFM
     613  m_cSPS.setMFMEnabledFlag(m_bMFMEnabledFlag);
    607614#endif
    608615
  • trunk/source/Lib/TLibEncoder/TEncTop.h

    r2 r28  
    140140  TComPic*                m_cIlpPic[MAX_NUM_REF];                    ///<  Inter layer Prediction picture =  upsampled picture
    141141#endif
     142#if REF_IDX_MFM
     143  Bool                    m_bMFMEnabledFlag;
     144#endif
    142145protected:
    143146  Void  xGetNewPicBuffer  ( TComPic*& rpcPic );           ///< get picture buffer which will be processed
     
    228231  Void setILRPic(TComPic *pcPic);
    229232#endif
     233#if REF_IDX_MFM
     234  Void setMFMEnabledFlag       (Bool flag)   {m_bMFMEnabledFlag = flag;}
     235  Bool getMFMEnabledFlag()                   {return m_bMFMEnabledFlag;}   
     236#endif
    230237
    231238};
Note: See TracChangeset for help on using the changeset viewer.