Changeset 134 in SHVCSoftware for branches/SHM-2.0-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
2 May 2013, 02:57:45 (12 years ago)
Author:
seregin
Message:

add reference layer dependency

Location:
branches/SHM-2.0-dev/source/Lib/TLibDecoder
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecGop.cpp

    r125 r134  
    247247    for (Int iRefIndex = 0; iRefIndex < pcSlice->getNumRefIdx(RefPicList(iRefList)); iRefIndex++)
    248248    {
     249#if VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE
     250      if( pcSlice->getRefPic(RefPicList(iRefList), iRefIndex)->isILR( m_layerId ) )
     251      {
     252        printf( "%d(%d) ", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex), pcSlice->getRefPic(RefPicList(iRefList), iRefIndex)->getLayerId() );
     253      }
     254      else
     255#endif
    249256      printf ("%d ", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex));
    250257    }
  • branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r133 r134  
    179179    m_cIlpPic[0]->copyUpsampledPictureYuv(pcPic->getFullPelBaseRec(), m_cIlpPic[0]->getPicYuvRec());
    180180    m_cIlpPic[0]->getSlice(0)->setPOC(pcPic->getPOC());
    181     m_cIlpPic[0]->setLayerId(0); //set reference layerId
     181    m_cIlpPic[0]->setLayerId(pcPic->getSlice(0)->getBaseColPic()->getLayerId()); //set reference layerId
    182182    m_cIlpPic[0]->getPicYuvRec()->setBorderExtension(false);
    183183    m_cIlpPic[0]->getPicYuvRec()->extendPicBorder();
     
    243243    if(m_layerId > 0)
    244244    {
     245#if VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE
     246      TDecTop *pcTDecTopBase = (TDecTop *)getRefLayerDec( m_layerId );
     247#else
    245248      TDecTop *pcTDecTopBase = (TDecTop *)getLayerDec( m_layerId-1 );
     249#endif
    246250      //TComPic*                      pcPic = *(pcTDecTopBase->getListPic()->begin());
    247251      TComPicYuv* pcPicYuvRecBase = (*(pcTDecTopBase->getListPic()->begin()))->getPicYuvRec();
     
    795799
    796800#else
     801#if VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE
     802      TDecTop *pcTDecTop = (TDecTop *)getRefLayerDec( m_layerId );
     803#else
    797804      TDecTop *pcTDecTop = (TDecTop *)getLayerDec( m_layerId-1 );
     805#endif
    798806      TComList<TComPic*> *cListPic = pcTDecTop->getListPic();
    799807      pcSlice->setBaseColPic ( *cListPic, m_layerId );
     
    11751183}
    11761184
     1185#if VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE
     1186TDecTop* TDecTop::getRefLayerDec( UInt layerId )
     1187{
     1188  TComVPS* vps = m_parameterSetManagerDecoder[0].getActiveVPS();
     1189  if( vps->getNumDirectRefLayers( m_layerId ) <= 0 )
     1190  {
     1191    return NULL;
     1192  }
     1193
     1194  // currently only one reference layer is supported
     1195  assert( vps->getNumDirectRefLayers( m_layerId ) == 1 );
     1196
     1197  return (TDecTop *)getLayerDec( vps->getRefLayerId( m_layerId, 0 ) );
     1198}
     1199#endif
     1200
    11771201//! \}
  • branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecTop.h

    r125 r134  
    154154  Void      setNumLayer           (UInt uiNum)   { m_numLayer = uiNum;  }
    155155  TComList<TComPic*>*      getListPic() { return &m_cListPic; }
    156   Void                setLayerDec(TDecTop **p)    { m_ppcTDecTop = p; }
    157   TDecTop*            getLayerDec(UInt layer)   { return m_ppcTDecTop[layer]; }
     156  Void      setLayerDec(TDecTop **p)    { m_ppcTDecTop = p; }
     157  TDecTop*  getLayerDec(UInt layer)     { return m_ppcTDecTop[layer]; }
     158#if VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE
     159  TDecTop*  getRefLayerDec(UInt layerId);
     160#endif
    158161#if AVC_BASE
    159162  Void      setBLReconFile( fstream* pFile ) { m_pBLReconFile = pFile; }
Note: See TracChangeset for help on using the changeset viewer.