Changeset 622 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecTop.cpp


Ignore:
Timestamp:
11 Sep 2013, 14:40:25 (12 years ago)
Author:
tech
Message:

Merged 8.0-dev0@621 (MV-HEVC 5 HLS).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r608 r622  
    436436  Window defaultDisplayWindow = pcSlice->getSPS()->getVuiParametersPresentFlag() ? pcSlice->getSPS()->getVuiParameters()->getDefaultDisplayWindow() : Window();
    437437
     438#if H_MV5
     439#if H_MV
     440    assert( conformanceWindow   .getScaledFlag() );
     441    assert( defaultDisplayWindow.getScaledFlag() );
     442#endif
     443#endif
    438444  for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++)
    439445  {
     
    512518  m_cCuDecoder.destroy();       
    513519#if H_MV
     520#if H_MV5
     521  TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 
     522#else
    514523  TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer ); 
     524#endif
    515525  TComSlice::markCurrPic( pcPic );
    516526  TComSlice::markIvRefPicsAsUnused   ( m_ivPicLists, targetDecLayerIdSet, m_parameterSetManagerDecoder.getActiveVPS(), m_layerId, poc );
     
    581591  assert (sps != 0);
    582592
     593#if H_MV5
     594#if H_MV
     595  TComVPS* vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId());
     596  assert (vps != 0);
     597  if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP(), m_layerId ) )
     598#else
    583599  if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP()))
     600#endif
     601#else
     602  if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP()))
     603#endif
    584604  {
    585605    printf ("Parameter set activation failed!");
     
    607627  m_apcSlicePilot->setSPS(sps);
    608628#if H_MV
     629#if H_MV5
     630  m_apcSlicePilot->setVPS(vps); 
     631  sps->inferRepFormat  ( vps , m_layerId );
     632  sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) );
     633#else
    609634  m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder.getActiveVPS() );
     635#endif
    610636#endif
    611637  pps->setSPS(sps);
     
    669695
    670696#if H_MV
     697#if H_MV5
     698  m_apcSlicePilot->setRefPicSetInterLayer( & m_refPicSetInterLayer0, &m_refPicSetInterLayer1 );
     699#else
    671700  m_apcSlicePilot->setRefPicSetInterLayer( & m_refPicSetInterLayer );
     701#endif
    672702  m_apcSlicePilot->setLayerId( nalu.m_layerId );
    673703#endif
     
    676706#if H_MV 
    677707  TComVPS* vps     = m_apcSlicePilot->getVPS();
     708#if H_MV5
     709  Int layerId  = nalu.m_layerId;   
     710  setViewId   ( vps->getViewId   ( layerId )      ); 
     711#if H_3D
     712  setViewIndex( vps->getViewIndex( layerId )      ); 
     713  setIsDepth  ( vps->getDepthId  ( layerId ) == 1 ); 
     714  m_ivPicLists->setVPS( vps );
     715#endif
     716#else
    678717  Int layerIdInVps = vps->getLayerIdInVps( nalu.m_layerId ); 
    679718  setViewId   ( vps->getViewId   ( layerIdInVps )      ); 
     
    684723#endif
    685724#endif
     725#endif
    686726    // Skip pictures due to random access
    687727    if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay))
     
    723763#endif
    724764  // actual decoding starts here
     765#if H_MV5
     766#if H_MV
     767   // This part needs further testing !
     768   if ( m_apcSlicePilot->getPocResetFlag() )
     769   {   
     770     xResetPocInPicBuffer();
     771   }
     772#endif
     773#endif
    725774  xActivateParameterSets();
    726775
     
    742791    m_apcSlicePilot->applyReferencePictureSet(m_cListPic, m_apcSlicePilot->getRPS());
    743792#if H_MV
     793#if H_MV5
     794    m_apcSlicePilot->createInterLayerReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer0, m_refPicSetInterLayer1 );
     795#else
    744796    m_apcSlicePilot->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer );
     797#endif
    745798#endif
    746799    //  Get a new picture buffer
     
    888941    // Set reference list
    889942#if H_MV   
     943#if H_MV5
     944    std::vector< TComPic* > tempRefPicLists[2];
     945    std::vector< Bool     > usedAsLongTerm [2];
     946    Int       numPocTotalCurr;
     947
     948    pcSlice->getTempRefPicLists( m_cListPic, m_refPicSetInterLayer0, m_refPicSetInterLayer1, tempRefPicLists, usedAsLongTerm, numPocTotalCurr);
     949    pcSlice->setRefPicList     ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true );
     950#else
    890951    pcSlice->setRefPicList( m_cListPic, m_refPicSetInterLayer, true );   
     952#endif
    891953#if H_3D_ARP
    892954    pcSlice->setARPStepNum();
    893955    if( pcSlice->getARPStepNum() > 1 )
    894956    {
     957      // GT: This seems to be broken, not all nuh_layer_ids are necessarily present
    895958      for(Int iLayerId = 0; iLayerId < nalu.m_layerId; iLayerId ++ )
    896959      {
     
    10211084  TComVPS* vps = m_parameterSetManagerDecoder.getPrefetchedVPS( 0 );
    10221085  assert( vps != 0 );
     1086#if H_MV5
     1087  m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( m_layerId ), ( vps->getDepthId( m_layerId ) == 1 ) );
     1088#else
    10231089  Int layerIdInVPS = vps->getLayerIdInVps( m_layerId );
    10241090  m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( layerIdInVPS ), ( vps->getDepthId( layerIdInVPS ) == 1 ) );
     1091#endif
    10251092#else
    10261093  m_cEntropyDecoder.decodeSPS( sps );
     
    10321099{
    10331100  TComPPS* pps = new TComPPS();
     1101#if H_MV5
     1102#if H_MV
     1103  pps->setLayerId( getLayerId() );
     1104#endif
     1105#endif
    10341106  m_cEntropyDecoder.decodePPS( pps );
    10351107  m_parameterSetManagerDecoder.storePrefetchedPPS( pps );
     
    10401112  if(nalUnitType == NAL_UNIT_SUFFIX_SEI)
    10411113  {
     1114#if H_MV5
     1115#if H_MV
     1116    m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS( m_layerId ) );
     1117#else
    10421118    m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );
     1119#endif
     1120#else
     1121    m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 
     1122#endif
    10431123  }
    10441124  else
    10451125  {
     1126#if H_MV5
     1127#if H_MV
     1128    m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS( m_layerId ) );
     1129#else
    10461130    m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );
     1131#endif
     1132#else
     1133    m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );
     1134#endif
    10471135    SEIMessages activeParamSets = getSeisByType(m_SEIs, SEI::ACTIVE_PARAMETER_SETS);
    10481136    if (activeParamSets.size()>0)
     
    10511139      m_parameterSetManagerDecoder.applyPrefetchedPS();
    10521140      assert(seiAps->activeSeqParamSetId.size()>0);
     1141#if H_MV5
     1142#if H_MV
     1143      if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0], m_layerId ))
     1144#else
    10531145      if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0] ))
     1146#endif
     1147#else
     1148      if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0] ))
     1149#endif
    10541150      {
    10551151        printf ("Warning SPS activation with Active parameter set SEI failed");
     
    12101306}
    12111307
     1308#if H_MV5
     1309Void TDecTop::xResetPocInPicBuffer()
     1310{
     1311  TComList<TComPic*>::iterator  iterPic   = m_cListPic.begin();
     1312  while (iterPic != m_cListPic.end())
     1313  {
     1314    TComPic* pic = *(iterPic++);
     1315    if ( pic->getReconMark() )
     1316    {
     1317      for( Int i = 0; i < pic->getNumAllocatedSlice(); i++)
     1318      {
     1319        TComSlice* slice = pic->getSlice( i );
     1320        slice->setPOC ( slice->getPOC() - m_apcSlicePilot->getPocBeforeReset() );           
     1321      }         
     1322    }     
     1323  }
     1324}
     1325#endif
    12121326#endif
    12131327//! \}
Note: See TracChangeset for help on using the changeset viewer.