Changeset 42 in SHVCSoftware


Ignore:
Timestamp:
21 Feb 2013, 00:01:40 (12 years ago)
Author:
seregin
Message:

initializing base layer reference lists by copying the enhancement layer picture lists structure for the AVC metadata file reading

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

Legend:

Unmodified
Added
Removed
  • branches/SHM-1.1-dev/source/Lib/TLibCommon/TComSlice.cpp

    r33 r42  
    21912191}
    21922192#endif
     2193
     2194#if SVC_EXTENSION && AVC_SYNTAX
     2195Void TComSlice::initBaseLayerRPL( TComSlice *pcSlice )
     2196{
     2197// Assumed that RPL of the base layer is same to the EL, otherwise this information should be also dumped and read from the metadata file
     2198  setPOC( pcSlice->getPOC() );
     2199  if( pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA )
     2200  {
     2201    setSliceType( I_SLICE );
     2202  }
     2203  else
     2204  {
     2205    setSliceType( pcSlice->getSliceType() );
     2206  }
     2207
     2208  if( this->isIntra() )
     2209  {
     2210    return;
     2211  }
     2212
     2213  //initialize reference POC of BL
     2214  for( Int iRefPicList = 0; iRefPicList < 2; iRefPicList++ )
     2215  {
     2216    RefPicList eRefPicList = RefPicList( iRefPicList );
     2217
     2218    assert( pcSlice->getNumRefIdx( eRefPicList) > 0 );
     2219    setNumRefIdx( eRefPicList, pcSlice->getNumRefIdx( eRefPicList ) - 1 );
     2220    assert( getNumRefIdx( eRefPicList) <= MAX_NUM_REF);
     2221
     2222    for(Int refIdx = 0; refIdx < getNumRefIdx( eRefPicList ); refIdx++)
     2223    {
     2224      setRefPOC( pcSlice->getRefPic( eRefPicList, refIdx )->getPOC(), eRefPicList, refIdx );
     2225      setRefPic( pcSlice->getRefPic( eRefPicList, refIdx ), eRefPicList, refIdx );
     2226      getRefPic( eRefPicList, refIdx )->setLayerId( 0 );
     2227      getRefPic( eRefPicList, refIdx )->setIsLongTerm( pcSlice->getRefPic( eRefPicList, refIdx )->getIsLongTerm() );
     2228      getRefPic( eRefPicList, refIdx )->setIsUsedAsLongTerm( pcSlice->getRefPic( eRefPicList, refIdx )->getIsUsedAsLongTerm() );
     2229
     2230    }
     2231  } 
     2232  return;
     2233}
     2234#endif
     2235
    21932236//! \}
  • branches/SHM-1.1-dev/source/Lib/TLibCommon/TComSlice.h

    r28 r42  
    14541454  Void        setFullPelBaseRec   ( TComPicYuv* p) { m_pcFullPelBaseRec = p; }
    14551455  TComPicYuv* getFullPelBaseRec   ()  { return  m_pcFullPelBaseRec;  }
     1456
     1457#if AVC_SYNTAX
     1458  Void      initBaseLayerRPL( TComSlice *pcSlice );
     1459#endif
    14561460#endif
    14571461
  • branches/SHM-1.1-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp

    r28 r42  
    227227#endif
    228228
    229 
    230 
    231229  assert ( iEWidth == 2*iBWidth || 2*iEWidth == 3*iBWidth );
    232230  assert ( iEHeight == 2*iBHeight || 2*iEHeight == 3*iBHeight );
  • branches/SHM-1.1-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r38 r42  
    561561  if (m_bFirstSliceInPicture)
    562562  {
    563 
    564563#if AVC_BASE
    565564  if( m_layerId == 1 )
     
    609608      }
    610609    }
    611 #if AVC_SYNTAX
    612     if( m_apcSlicePilot->getPOC() == 0 )
    613     {
    614       // initialize partition order.
    615       UInt* piTmp = &g_auiZscanToRaster[0];
    616       initZscanToRaster( pBLPic->getPicSym()->getMaxDepth() + 1, 1, 0, piTmp );
    617       initRasterToZscan( pBLPic->getPicSym()->getMaxCUWidth(), pBLPic->getPicSym()->getMaxCUHeight(), pBLPic->getPicSym()->getMaxDepth() + 1 );
    618     }
    619     pBLPic->getSlice( 0 )->setPOC( m_apcSlicePilot->getPOC() );
    620     pBLPic->getSlice( 0 )->setSliceType( m_apcSlicePilot->getSliceType() );
    621     pBLPic->readBLSyntax( m_ppcTDecTop[0]->getBLSyntaxFile(), SYNTAX_BYTES );
    622 #endif
    623610  }
    624611#endif
     
    758745  {
    759746    pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA, m_cListPic);
    760 #if !REF_IDX_FRAMEWORK
     747#if !REF_IDX_FRAMEWORK || AVC_SYNTAX
    761748    // Set reference list
    762749    pcSlice->setRefPicList( m_cListPic );
     
    768755#if AVC_BASE
    769756      pcSlice->setBaseColPic ( *m_ppcTDecTop[0]->getListPic()->begin() );
     757#if AVC_SYNTAX
     758      TComPic* pBLPic = pcSlice->getBaseColPic();
     759      if( pcSlice->getPOC() == 0 )
     760      {
     761        // initialize partition order.
     762        UInt* piTmp = &g_auiZscanToRaster[0];
     763        initZscanToRaster( pBLPic->getPicSym()->getMaxDepth() + 1, 1, 0, piTmp );
     764        initRasterToZscan( pBLPic->getPicSym()->getMaxCUWidth(), pBLPic->getPicSym()->getMaxCUHeight(), pBLPic->getPicSym()->getMaxDepth() + 1 );
     765      }     
     766      pBLPic->getSlice( 0 )->initBaseLayerRPL( pcSlice );
     767      pBLPic->readBLSyntax( m_ppcTDecTop[0]->getBLSyntaxFile(), SYNTAX_BYTES );
     768#endif
     769
    770770#else
    771771      TDecTop *pcTDecTop = (TDecTop *)getLayerDec( m_layerId-1 );
     
    788788
    789789#if REF_IDX_FRAMEWORK
     790#if !AVC_SYNTAX
    790791    // Set reference list
    791792    pcSlice->setRefPicList( m_cListPic );
     793#endif
    792794    if(m_layerId > 0)
    793795    {
Note: See TracChangeset for help on using the changeset viewer.