Changeset 1524 in SHVCSoftware for branches/SHM-dev/source/App


Ignore:
Timestamp:
3 Feb 2016, 23:00:44 (9 years ago)
Author:
seregin
Message:

fix target layer Id assignment, ticket #97

Location:
branches/SHM-dev/source/App
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.cpp

    r1475 r1524  
    170170  if( targetLayerId < 0 )
    171171  {
    172     targetLayerId = layerNum - 1;
     172    targetLayerId = MAX_VPS_LAYER_IDX_PLUS1 - 1;
    173173  }
    174174
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r1521 r1524  
    9191  for(Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++ )
    9292#else
    93   for( Int i = 0; i <= m_tgtLayerId; i++ )
     93  for( Int i = 0; i <= m_commonDecoderParams.getTargetLayerId(); i++ )
    9494#endif
    9595  {
     
    179179  for(UInt layer = 0; layer < MAX_VPS_LAYER_IDX_PLUS1; layer++)
    180180#else
    181   for(UInt layer=0; layer<=m_tgtLayerId; layer++)
     181  for(UInt layer=0; layer <= m_commonDecoderParams.getTargetLayerId(); layer++)
    182182#endif
    183183  {
     
    234234      read(nalu);
    235235
    236 #if SVC_EXTENSION
    237236      // ignore any NAL units with nuh_layer_id == 63
    238237      if( nalu.m_nuhLayerId == 63 )
     
    241240        continue;
    242241      }
    243 #endif
    244 
    245       if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu)  ||
    246 #if CONFORMANCE_BITSTREAM_MODE
    247         (nalu.m_nuhLayerId > m_commonDecoderParams.getTargetLayerId()) )
    248 #else
    249         (nalu.m_nuhLayerId > m_tgtLayerId) )
    250 #endif
     242
     243      if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) || nalu.m_nuhLayerId > m_commonDecoderParams.getTargetLayerId() )
    251244      {
    252245        bNewPicture = false;
     
    422415  for(UInt layer = layerIdxmin; layer < MAX_VPS_LAYER_IDX_PLUS1; layer++)
    423416#else
    424   for(UInt layer = layerIdxmin; layer <= m_tgtLayerId; layer++)
    425 #endif
    426 #else
    427   for(UInt layer = 0; layer <= m_tgtLayerId; layer++)
     417  for(UInt layer = layerIdxmin; layer <= m_commonDecoderParams.getTargetLayerId(); layer++)
     418#endif
     419#else
     420  for(UInt layer = 0; layer <= m_commonDecoderParams.getTargetLayerId(); layer++)
    428421#endif
    429422  {
     
    583576  for(UInt layer = 0; layer < MAX_VPS_LAYER_IDX_PLUS1; layer++)
    584577#else
    585   for(UInt layer = 0; layer <= m_tgtLayerId; layer++)
     578  for(UInt layer = 0; layer <= m_commonDecoderParams.getTargetLayerId(); layer++)
    586579#endif
    587580  {
     
    612605  for(UInt layer = 0; layer < MAX_VPS_LAYER_IDX_PLUS1; layer++)
    613606#else
    614   for(UInt layer = 0; layer <= m_tgtLayerId; layer++)
     607  for(UInt layer = 0; layer <= m_commonDecoderParams.getTargetLayerId(); layer++)
    615608#endif
    616609  {
     
    646639  for(UInt layer = 0; layer < MAX_VPS_LAYER_IDX_PLUS1; layer++)
    647640#else
    648   for(UInt layer = 0; layer <= m_tgtLayerId; layer++)
     641  for(UInt layer = 0; layer <= m_commonDecoderParams.getTargetLayerId(); layer++)
    649642#endif
    650643  {
     
    665658#if SVC_EXTENSION 
    666659#if CONFORMANCE_BITSTREAM_MODE
    667     m_cTDecTop.setNumLayer( MAX_LAYERS );
    668 #else
    669     m_cTDecTop.setNumLayer( m_tgtLayerId + 1 );
     660    m_cTDecTop.setConfModeFlag( m_confModeFlag );
    670661#endif
    671662    m_cTDecTop.setCommonDecoderParams( &m_commonDecoderParams );
    672     m_cTDecTop.setConfModeFlag( m_confModeFlag );
    673663  }
    674664#endif
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r1511 r1524  
    121121#if SVC_EXTENSION
    122122TAppEncCfg::TAppEncCfg()
    123 #if AVC_BASE
    124 : m_nonHEVCBaseLayerFlag(false)
    125 #endif
    126 , m_maxTidRefPresentFlag(1)
     123: m_maxTidRefPresentFlag(1)
    127124, m_defaultTargetOutputLayerIdc (-1)
    128125, m_numOutputLayerSets          (-1)
     
    131128, m_outputInternalColourSpace(false)
    132129, m_elRapSliceBEnabled(false)
     130#if AVC_BASE
     131, m_nonHEVCBaseLayerFlag(false)
     132#endif
    133133{
    134134  memset( m_apcLayerCfg, 0, sizeof(m_apcLayerCfg) );
     
    31303130    ii++;
    31313131  }
     3132#if AVC_BASE
    31323133  if( m_numLayers > 1 && m_numPTLInfo > 1 && !m_nonHEVCBaseLayerFlag )
     3134#else
     3135  if( m_numLayers > 1 && m_numPTLInfo > 1 )
     3136#endif
    31333137  {
    31343138    assert(m_profileList[0] <= Profile::MULTIVIEWMAIN);  //Profile IDC of PTL in VPS shall be one of single-layer profile IDCs
     
    35063510  m_numLayers = m_numLayers > MAX_LAYERS ? MAX_LAYERS : m_numLayers;
    35073511 
    3508   // it can be updated after AVC BL support will be added to the WD
     3512#if AVC_BASE
    35093513  if( m_nonHEVCBaseLayerFlag )
    35103514  {
     
    35133517    m_crossLayerAlignedIdrOnlyFlag = false;
    35143518  }
     3519#endif
    35153520
    35163521  // verify layer configuration parameters
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r1511 r1524  
    118118  Int       m_numLayers;                                      ///< number of layers
    119119  Int       m_scalabilityMask[MAX_VPS_NUM_SCALABILITY_TYPES]; ///< scalability_mask
    120 #if AVC_BASE
    121   Bool      m_nonHEVCBaseLayerFlag;                           ///< non HEVC BL
    122 #endif
    123120  Bool      m_maxTidRefPresentFlag;
    124121
     
    542539  Bool      m_altOutputLayerFlag;                             ///< Specifies the value of alt_output_laye_flag in VPS extension
    543540  Bool      m_elRapSliceBEnabled;
     541#if AVC_BASE
     542  Bool      m_nonHEVCBaseLayerFlag;                           ///< non HEVC BL
     543#endif
    544544#endif
    545545
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1517 r1524  
    249249    //1
    250250    m_cTEncTop.setInterLayerWeightedPredFlag                      ( m_useInterLayerWeightedPred );
     251#if AVC_BASE
    251252    m_cTEncTop.setMFMEnabledFlag                                  ( layer == 0 ? false : ( m_nonHEVCBaseLayerFlag ? false : true ) && m_apcLayerCfg[layer]->getNumMotionPredRefLayers());
     253#else
     254    m_cTEncTop.setMFMEnabledFlag                                  ( layer == 0 ? false : m_apcLayerCfg[layer]->getNumMotionPredRefLayers());
     255#endif
    252256
    253257    // set layer ID
     
    10591063#if AVC_BASE
    10601064  vps->setNonHEVCBaseLayerFlag( m_nonHEVCBaseLayerFlag );
    1061   if ( m_nonHEVCBaseLayerFlag )
    1062   {
    1063     vps->setBaseLayerInternalFlag (false);
    1064   }
    1065 #else
    1066   vps->setAvcBaseLayerFlag(false);
     1065  if( m_nonHEVCBaseLayerFlag )
     1066  {
     1067    vps->setBaseLayerInternalFlag(false);
     1068  }
    10671069#endif
    10681070 
     
    16071609    {
    16081610      list<AccessUnit>::iterator first_au = outputAccessUnits.begin();
     1611#if AVC_BASE
    16091612      if( m_nonHEVCBaseLayerFlag )
    16101613      {
    16111614        first_au++;
    16121615      }
     1616#endif
    16131617      AccessUnit::iterator it_sps;
    16141618      for (it_sps = first_au->begin(); it_sps != first_au->end(); it_sps++)
Note: See TracChangeset for help on using the changeset viewer.