Changeset 25 in SHVCSoftware for branches/SHM-1.0-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
4 Feb 2013, 08:30:23 (13 years ago)
Author:
qualcomm
Message:

L0336: motion field mapping of inter-layer reference picture from Qualcomm, cjianle@…

Location:
branches/SHM-1.0-dev/source/Lib/TLibDecoder
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-1.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r2 r25  
    844844#endif
    845845  READ_FLAG( uiCode, "sps_temporal_mvp_enable_flag" );            pcSPS->setTMVPFlagsPresent(uiCode);
     846#if REF_IDX_MFM
     847  if(pcSPS->getLayerId() > 0)
     848  {
     849          READ_FLAG( uiCode, "sps_enh_mfm_enable_flag" );
     850          pcSPS->setMFMEnabledFlag( uiCode ? true : false );
     851          assert(pcSPS->getMFMEnabledFlag());
     852  }
     853#endif
    846854#if SUPPORT_FOR_VUI
    847855  READ_FLAG( uiCode, "vui_parameters_present_flag" );             pcSPS->setVuiParametersPresentFlag(uiCode);
  • branches/SHM-1.0-dev/source/Lib/TLibDecoder/TDecGop.cpp

    r2 r25  
    287287
    288288  rpcPic->compressMotion();
     289
     290#if REF_IDX_MFM
     291  if( rpcPic->getLayerId() == 0 && rpcPic->upsampledMvFieldIsNull() )
     292  {
     293    TComSPS *spsEL = m_ppcTDecTop[1]->getSPS();
     294
     295    rpcPic->createUpSampledMvField(spsEL->getPicHeightInLumaSamples(), spsEL->getPicWidthInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);  //create up-sampled mv field
     296  }
     297
     298  if( rpcPic->getLayerId() == 0 && rpcPic->IsUpsampledMvField() == false )
     299  {
     300    TComSPS *spsBL = m_ppcTDecTop[0]->getSPS();
     301    TComSPS *spsEL = m_ppcTDecTop[1]->getSPS();
     302
     303    Int iBWidth  = spsBL->getPicWidthInLumaSamples() - spsBL->getPicCropLeftOffset() - spsBL->getPicCropRightOffset();
     304    Int iBHeight = spsBL->getPicHeightInLumaSamples() - spsBL->getPicCropTopOffset() - spsBL->getPicCropBottomOffset();
     305
     306    Int iEWidth  = spsEL->getPicWidthInLumaSamples() - spsEL->getPicCropLeftOffset() - spsEL->getPicCropRightOffset();
     307    Int iEHeight = spsEL->getPicHeightInLumaSamples() - spsEL->getPicCropTopOffset() - spsEL->getPicCropBottomOffset();
     308
     309    UInt upSampleRatio;
     310    if(iEWidth == iBWidth && iEHeight == iBHeight)
     311      upSampleRatio = 0;
     312    else if(iEWidth == 2*iBWidth && iEHeight == 2*iBHeight)
     313      upSampleRatio = 1;
     314    else if(2*iEWidth == 3*iBWidth && 2*iEHeight == 3*iBHeight)
     315      upSampleRatio = 2;
     316    else
     317      assert(0);
     318
     319    rpcPic->doTheUpSampleMvField(upSampleRatio);
     320    rpcPic->setUpsampledMvField(true);
     321  }
     322#endif
     323
    289324  Char c = (pcSlice->isIntra() ? 'I' : pcSlice->isInterP() ? 'P' : 'B');
    290325  if (!pcSlice->isReferenced()) c += 32;
  • branches/SHM-1.0-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r21 r25  
    164164        m_cIlpPic[j]->create(pcSPS->getPicWidthInLumaSamples(), pcSPS->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true);
    165165#endif
    166 #if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV
     166#if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || REF_IDX_MFM
    167167        m_cIlpPic[j]->setIsILR(true);
    168168#endif
     
    270270    rpcPic->getPicSym()->allocSaoParam(&m_cSAO);
    271271#endif
     272
     273#if REF_IDX_MFM
     274    rpcPic->setUpsampledMvField(false);
     275#endif
    272276    m_cListPic.pushBack( rpcPic );
    273277   
     
    315319#if REMOVE_APS
    316320  rpcPic->getPicSym()->allocSaoParam(&m_cSAO);
     321#endif
     322
     323#if REF_IDX_MFM
     324  rpcPic->setUpsampledMvField(false);
    317325#endif
    318326}
     
    768776    {
    769777      setILRPic(pcPic);
     778#if REF_IDX_MFM
     779      pcSlice->setRefPOCListILP(m_ppcTDecTop[m_layerId]->m_cIlpPic, pcSlice->getBaseColPic());
     780#endif
     781
    770782      pcSlice->addRefPicList ( m_cIlpPic,
    771783                               1,
     
    880892  m_cEntropyDecoder.decodeSPS( sps );
    881893  m_parameterSetManagerDecoder.storePrefetchedSPS(sps);
     894#if REF_IDX_MFM
     895  m_pcSPS = sps;
     896  setMFMEnabledFlag(sps->getMFMEnabledFlag());
     897#endif
    882898#if !REMOVE_ALF
    883899  m_cAdaptiveLoopFilter.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
  • branches/SHM-1.0-dev/source/Lib/TLibDecoder/TDecTop.h

    r2 r25  
    8080  ParameterSetManagerDecoder m_parameterSetManagerDecoder;  // storage for parameter sets
    8181#endif
     82
     83#if REF_IDX_MFM
     84  TComSPS*               m_pcSPS;
     85  Bool                   m_bMFMEnabledFlag;
     86#endif
     87
    8288  TComSlice*              m_apcSlicePilot;
    8389 
     
    170176  Void      setILRPic(TComPic *pcPic);
    171177#endif
     178#if REF_IDX_MFM
     179  TComSPS*  getSPS()                       {return m_pcSPS;}
     180  Void      setMFMEnabledFlag(Bool flag)   {m_bMFMEnabledFlag = flag;}
     181  Bool      getMFMEnabledFlag()            {return m_bMFMEnabledFlag;}
     182#endif
     183
    172184protected:
    173185  Void  xGetNewPicBuffer  (TComSlice* pcSlice, TComPic*& rpcPic);
Note: See TracChangeset for help on using the changeset viewer.