Changeset 884 in SHVCSoftware for branches/SHM-dev/source


Ignore:
Timestamp:
11 Sep 2014, 12:48:48 (11 years ago)
Author:
nokia
Message:

implementation of jct-vc R0247
(1) Only the base layer creates the Active Parameter Sets SEI message.
(2) Active Parameter Sets SEI message can active more than 1 sps.

Location:
branches/SHM-dev/source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r877 r884  
    20302030      }
    20312031    }
     2032#if R0247_SEI_ACTIVE
     2033    if(bFirstFrame)
     2034    {
     2035      list<AccessUnit>::iterator first_au = outputAccessUnits.begin();
     2036      AccessUnit::iterator it_sps;
     2037      for (it_sps = first_au->begin(); it_sps != first_au->end(); it_sps++)
     2038      {
     2039        if( (*it_sps)->m_nalUnitType == NAL_UNIT_SPS )
     2040        {
     2041          break;
     2042        }
     2043      }
     2044
     2045      for (list<AccessUnit>::iterator it_au = ++outputAccessUnits.begin(); it_au != outputAccessUnits.end(); it_au++)
     2046      {
     2047        for (AccessUnit::iterator it_nalu = it_au->begin(); it_nalu != it_au->end(); it_nalu++)
     2048        {
     2049          if( (*it_nalu)->m_nalUnitType == NAL_UNIT_SPS )
     2050          {
     2051            first_au->insert(++it_sps, *it_nalu);
     2052            it_nalu = it_au->erase(it_nalu);
     2053          }
     2054        }
     2055      }
     2056    }
     2057
     2058#endif
    20322059
    20332060#if RC_SHVC_HARMONIZATION
  • branches/SHM-dev/source/Lib/TLibCommon/SEI.h

    r868 r884  
    175175  Int numSpsIdsMinus1;
    176176  std::vector<Int> activeSeqParameterSetId;
     177#if R0247_SEI_ACTIVE
     178  std::vector<Int> layerSpsIdx;
     179#endif
    177180};
    178181
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r880 r884  
    301301#define Q0189_TMVP_CONSTRAINTS           1      ///< JCTVC-Q0189: indicate constraints on TMVP
    302302#define Q0247_FRAME_FIELD_INFO           1      ///< JCTVC-Q0247: field_frame_info SEI message
    303 
     303#define R0247_SEI_ACTIVE                 1      ///< JCTVC-R0247: active parameter sets SEI message
    304304
    305305#endif // SVC_EXTENSION
  • branches/SHM-dev/source/Lib/TLibDecoder/SEIread.cpp

    r871 r884  
    584584
    585585  sei.activeSeqParameterSetId.resize(sei.numSpsIdsMinus1 + 1);
     586#if R0247_SEI_ACTIVE
     587  sei.layerSpsIdx.resize(sei.numSpsIdsMinus1 + 1);
     588#endif
    586589  for (Int i=0; i < (sei.numSpsIdsMinus1 + 1); i++)
    587590  {
    588591    READ_UVLC(val, "active_seq_parameter_set_id");      sei.activeSeqParameterSetId[i] = val;
    589592  }
    590 
     593#if R0247_SEI_ACTIVE
     594  for (Int i=1; i < (sei.numSpsIdsMinus1 + 1); i++)
     595  {
     596    READ_UVLC(val, "layer_sps_idx"); sei.layerSpsIdx[i] = val;
     597  }
     598#endif
    591599  xParseByteAlign();
    592600}
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r874 r884  
    23982398    {
    23992399      SEIActiveParameterSets *seiAps = (SEIActiveParameterSets*)(*activeParamSets.begin());
     2400#if !R0247_SEI_ACTIVE
    24002401      m_parameterSetManagerDecoder.applyPrefetchedPS();
    24012402      assert(seiAps->activeSeqParameterSetId.size()>0);
     
    24042405        printf ("Warning SPS activation with Active parameter set SEI failed");
    24052406      }
     2407#else
     2408      getLayerDec(0)->m_parameterSetManagerDecoder.applyPrefetchedPS();
     2409      assert(seiAps->activeSeqParameterSetId.size()>0);
     2410      if( !getLayerDec(0)->m_parameterSetManagerDecoder.activateSPSWithSEI( seiAps->activeSeqParameterSetId[0] ) )
     2411      {
     2412        printf ("Warning SPS activation with Active parameter set SEI failed");
     2413      }
     2414      for (Int c=1 ; c <= seiAps->numSpsIdsMinus1; c++)
     2415      {
     2416        Int layerIdx = seiAps->layerSpsIdx[c];
     2417        getLayerDec(layerIdx)->m_parameterSetManagerDecoder.applyPrefetchedPS();
     2418        if( !getLayerDec(layerIdx)->m_parameterSetManagerDecoder.activateSPSWithSEI( seiAps->activeSeqParameterSetId[layerIdx] ) )
     2419        {
     2420          printf ("Warning SPS activation with Active parameter set SEI failed");
     2421        }
     2422      }
     2423#endif
    24062424    }
    24072425  }
  • branches/SHM-dev/source/Lib/TLibEncoder/SEIwrite.cpp

    r871 r884  
    394394    WRITE_UVLC(sei.activeSeqParameterSetId[i], "active_seq_parameter_set_id");
    395395  }
     396#if R0247_SEI_ACTIVE
     397  for (Int i = 1; i < sei.activeSeqParameterSetId.size(); i++)
     398  {
     399    WRITE_UVLC(sei.layerSpsIdx[i], "layer_sps_idx");
     400  }
     401#endif
    396402  xWriteByteAlign();
    397403}
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r880 r884  
    202202  seiActiveParameterSets->m_selfContainedCvsFlag = false;
    203203  seiActiveParameterSets->m_noParameterSetUpdateFlag = false;
     204#if !R0247_SEI_ACTIVE
    204205  seiActiveParameterSets->numSpsIdsMinus1 = 0;
    205206  seiActiveParameterSets->activeSeqParameterSetId.resize(seiActiveParameterSets->numSpsIdsMinus1 + 1);
    206207  seiActiveParameterSets->activeSeqParameterSetId[0] = sps->getSPSId();
     208#else
     209  seiActiveParameterSets->numSpsIdsMinus1 = m_pcCfg->getNumLayer()-1;
     210  seiActiveParameterSets->activeSeqParameterSetId.resize(seiActiveParameterSets->numSpsIdsMinus1 + 1);
     211  seiActiveParameterSets->layerSpsIdx.resize(seiActiveParameterSets->numSpsIdsMinus1+ 1); 
     212  for (Int c=0; c <= seiActiveParameterSets->numSpsIdsMinus1; c++)
     213  {
     214     seiActiveParameterSets->activeSeqParameterSetId[c] = c;
     215  }
     216  for (Int c=1; c <= seiActiveParameterSets->numSpsIdsMinus1; c++)
     217  {
     218     seiActiveParameterSets->layerSpsIdx[c] = c;
     219  }
     220#endif
    207221  return seiActiveParameterSets;
    208222}
     
    429443  OutputNALUnit nalu(NAL_UNIT_PREFIX_SEI);
    430444
    431   if(m_pcCfg->getActiveParameterSetsSEIEnabled())
     445  if(m_pcCfg->getActiveParameterSetsSEIEnabled()
     446#if R0247_SEI_ACTIVE
     447    && m_layerId == 0
     448#endif
     449    )
    432450  {
    433451    SEIActiveParameterSets *sei = xCreateSEIActiveParameterSets (sps);
Note: See TracChangeset for help on using the changeset viewer.