Changeset 872 in 3DVCSoftware for trunk/source/App/TAppDecoder/TAppDecTop.cpp


Ignore:
Timestamp:
27 Mar 2014, 10:11:29 (11 years ago)
Author:
tech
Message:

Merged HTM-10.0-dev0@871. (MV-HEVC 7 HLS)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/App/TAppDecoder/TAppDecTop.cpp

    r773 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6* Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    140140    AOF( m_pScaleOffsetFile );
    141141  }
     142#if !FIX_CAM_PARS_COLLECTOR
    142143  m_cCamParsCollector.init( m_pScaleOffsetFile );
     144#endif
    143145#endif
    144146  InputByteStream bytestream(bitstreamFile);
     
    165167  Bool firstSlice        = true;
    166168#endif
    167  
     169  Bool loopFiltered      = false;
     170
    168171  while (!!bitstreamFile)
    169172  {
     
    206209      read(nalu, nalUnit);
    207210#if H_MV     
     211#if H_MV_FIX_VPS_LAYER_ID_NOT_EQUAL_ZERO
     212      if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer)
     213          || !isNaluWithinTargetDecLayerIdSet(&nalu)
     214          || nalu.m_layerId > MAX_NUM_LAYER_IDS-1
     215          || (nalu.m_nalUnitType == NAL_UNIT_VPS && nalu.m_layerId > 0)           
     216#if H_MV_HLS_7_MISC_P0130_EOS
     217          || (nalu.m_nalUnitType == NAL_UNIT_EOB && nalu.m_layerId > 0)           
     218#endif
     219         )
     220#else
    208221      if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) || nalu.m_layerId > MAX_NUM_LAYER_IDS-1 )
     222#endif
    209223      {
    210224        bNewPicture = false;
     
    234248          }
    235249
     250#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     251          if ( m_targetOptLayerSetIdx < 0 || m_targetOptLayerSetIdx >= vps->getNumOutputLayerSets() )
     252          {
     253            fprintf(stderr, "\ntarget output layer set index must be in the range of 0 to %d, inclusive \n", vps->getNumOutputLayerSets() - 1 );           
     254            exit(EXIT_FAILURE);
     255          }
     256#endif
    236257          m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx );
    237258        }
     259
     260#if FIX_CAM_PARS_COLLECTOR
     261#if H_3D
     262        if (nalu.m_nalUnitType == NAL_UNIT_VPS )
     263        {       
     264         
     265          m_cCamParsCollector.init( m_pScaleOffsetFile, m_tDecTop[decIdx]->getPrefetchedVPS() );
     266        }       
     267#endif
     268#endif
    238269        bNewPicture       = ( newSliceDiffLayer || newSliceDiffPoc ) && !sliceSkippedFlag;
    239270        if ( nalu.isSlice() && firstSlice && !sliceSkippedFlag )       
     
    278309          bitstreamFile.seekg(location-streamoff(3));
    279310          bytestream.reset();
     311#if H_MV_ENC_DEC_TRAC
    280312#if ENC_DEC_TRACE
    281 #if H_MV_ENC_DEC_TRAC
    282313          const Bool resetCounter = false;
    283314          if ( resetCounter )
     
    287318          else
    288319          {
    289             g_disableHLSTrace = true;     // Trancing of second parsing of SH is not carried out
    290           }         
    291 #else
    292           g_nSymbolCounter = symCount;
    293 #endif
    294 #endif
    295         }
    296       }
    297     }
    298     if (bNewPicture || !bitstreamFile)
    299     {
    300 #if H_MV
    301       assert( decIdxLastPic != -1 );
    302       m_tDecTop[decIdxLastPic]->endPicDecoding(poc, pcListPic, m_targetDecLayerIdSet );
    303 #else
    304       m_cTDecTop.executeLoopFilters(poc, pcListPic);
    305 #endif
     320            g_disableHLSTrace = true;     // Tracing of second parsing of SH is not carried out
     321          }     
     322#endif
     323#endif
     324        }
     325      }
     326    }
     327    if (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS )
     328    {
     329      if (!loopFiltered || bitstreamFile)
     330      {
     331#if H_MV
     332        assert( decIdxLastPic != -1 );
     333        m_tDecTop[decIdxLastPic]->endPicDecoding(poc, pcListPic, m_targetDecLayerIdSet );
     334#else
     335        m_cTDecTop.executeLoopFilters(poc, pcListPic);
     336#endif
     337      }
     338      loopFiltered = (nalu.m_nalUnitType == NAL_UNIT_EOS);
    306339    }
    307340#if H_3D
     
    351384#endif
    352385      }
     386      if (nalu.m_nalUnitType == NAL_UNIT_EOS)
     387      {
     388#if H_MV
     389        xFlushOutput( pcListPic, decIdxLastPic );
     390#else
     391        xFlushOutput( pcListPic );
     392#endif
     393      }
    353394      // write reconstruction to file
    354395      if(bNewPicture)
     
    462503#endif
    463504{
     505
     506  if (pcListPic->empty())
     507  {
     508    return;
     509  }
     510
    464511  TComList<TComPic*>::iterator iterPic   = pcListPic->begin();
    465512  Int numPicsNotYetDisplayed = 0;
     
    647694#endif
    648695{
    649   if(!pcListPic)
     696  if(!pcListPic || pcListPic->empty())
    650697  {
    651698    return;
Note: See TracChangeset for help on using the changeset viewer.