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


Ignore:
Timestamp:
7 May 2013, 00:03:47 (12 years ago)
Author:
seregin
Message:

set and check for avc_base_layer_flag

File:
1 edited

Legend:

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

    r153 r154  
    581581  {
    582582#if AVC_BASE
    583   if( m_layerId == 1 )
     583  if( m_layerId == 1 && m_parameterSetManagerDecoder[0].getPrefetchedVPS(0)->getAvcBaseLayerFlag() )
    584584  {
    585585    TComPic* pBLPic = (*m_ppcTDecTop[0]->getListPic()->begin());
    586586    fstream* pFile  = m_ppcTDecTop[0]->getBLReconFile();
     587#if ILP_DECODED_PICTURE
     588    UInt uiWidth    = pBLPic->getPicYuvRec()->getWidth();
     589    UInt uiHeight   = pBLPic->getPicYuvRec()->getHeight();
     590#else
    587591    const Window &conf = pBLPic->getConformanceWindow();
    588592#if ILP_DECODED_PICTURE
     
    796800    {
    797801#if AVC_BASE
    798       pcSlice->setBaseColPic ( *m_ppcTDecTop[0]->getListPic()->begin() );
     802      if( m_parameterSetManagerDecoder[0].getActiveVPS()->getAvcBaseLayerFlag() )
     803      {
     804        pcSlice->setBaseColPic ( *m_ppcTDecTop[0]->getListPic()->begin() );
    799805#if AVC_SYNTAX
    800       TComPic* pBLPic = pcSlice->getBaseColPic();
    801       if( pcSlice->getPOC() == 0 )
    802       {
    803         // initialize partition order.
    804         UInt* piTmp = &g_auiZscanToRaster[0];
    805         initZscanToRaster( pBLPic->getPicSym()->getMaxDepth() + 1, 1, 0, piTmp );
    806         initRasterToZscan( pBLPic->getPicSym()->getMaxCUWidth(), pBLPic->getPicSym()->getMaxCUHeight(), pBLPic->getPicSym()->getMaxDepth() + 1 );
    807       }     
    808       pBLPic->getSlice( 0 )->initBaseLayerRPL( pcSlice );
    809       pBLPic->readBLSyntax( m_ppcTDecTop[0]->getBLSyntaxFile(), SYNTAX_BYTES );
    810 #endif
    811 
     806        TComPic* pBLPic = pcSlice->getBaseColPic();
     807        if( pcSlice->getPOC() == 0 )
     808        {
     809          // initialize partition order.
     810          UInt* piTmp = &g_auiZscanToRaster[0];
     811          initZscanToRaster( pBLPic->getPicSym()->getMaxDepth() + 1, 1, 0, piTmp );
     812          initRasterToZscan( pBLPic->getPicSym()->getMaxCUWidth(), pBLPic->getPicSym()->getMaxCUHeight(), pBLPic->getPicSym()->getMaxDepth() + 1 );
     813        }     
     814        pBLPic->getSlice( 0 )->initBaseLayerRPL( pcSlice );
     815        pBLPic->readBLSyntax( m_ppcTDecTop[0]->getBLSyntaxFile(), SYNTAX_BYTES );
     816#endif
     817      }
     818      else
     819      {
     820#if VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE
     821        TDecTop *pcTDecTop = (TDecTop *)getRefLayerDec( m_layerId );
     822#else
     823        TDecTop *pcTDecTop = (TDecTop *)getLayerDec( m_layerId-1 );
     824#endif
     825        TComList<TComPic*> *cListPic = pcTDecTop->getListPic();
     826        pcSlice->setBaseColPic ( *cListPic, m_layerId );
     827      }
    812828#else
    813829#if VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE
     
    837853      setILRPic(pcPic);
    838854#if REF_IDX_MFM
    839       pcSlice->setRefPOCListILP(m_ppcTDecTop[m_layerId]->m_cIlpPic, pcSlice->getBaseColPic());
     855      if( pcSlice->getSPS()->getMFMEnabledFlag() )
     856      {
     857        pcSlice->setRefPOCListILP(m_ppcTDecTop[m_layerId]->m_cIlpPic, pcSlice->getBaseColPic());
     858      }
    840859#endif
    841860#if REF_LIST_BUGFIX
     
    10791098    case NAL_UNIT_VPS:
    10801099      xDecodeVPS();
     1100#if AVC_BASE
     1101      if( m_parameterSetManagerDecoder[0].getPrefetchedVPS(0)->getAvcBaseLayerFlag() )
     1102      {
     1103        if( !m_ppcTDecTop[0]->getBLReconFile()->good() )
     1104        {
     1105          printf( "Base layer YUV input reading error\n" );
     1106          exit(EXIT_FAILURE);
     1107        }       
     1108#if AVC_SYNTAX
     1109        if( !m_ppcTDecTop[0]->getBLSyntaxFile()->good() )
     1110        {
     1111          printf( "Base layer syntax input reading error\n" );
     1112          exit(EXIT_FAILURE);
     1113        }
     1114#endif
     1115      }
     1116      else
     1117      {
     1118        TComList<TComPic*> *cListPic = m_ppcTDecTop[0]->getListPic();
     1119        cListPic->clear();
     1120      }
     1121#endif
    10811122      return false;
    10821123     
     
    10841125      xDecodeSPS();
    10851126#if AVC_BASE
     1127      if( m_parameterSetManagerDecoder[0].getPrefetchedVPS(0)->getAvcBaseLayerFlag() )
    10861128      {
    10871129        TComPic* pBLPic = (*m_ppcTDecTop[0]->getListPic()->begin());
Note: See TracChangeset for help on using the changeset viewer.