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


Ignore:
Timestamp:
13 Aug 2014, 03:52:31 (10 years ago)
Author:
qualcomm
Message:

PTL information for each layer (Macro: PER_LAYER_PTL)

Signal PTL information for each layer in each output layer set. Support for specifying different PTL information for different output layer sets will be added in a future patch.

From: Adarsh K. Ramasubramonian <aramasub@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r865 r866  
    13741374  READ_UVLC(  uiCode, "vps_num_profile_tier_level_minus1"); vps->setNumProfileTierLevel( uiCode + 1 );
    13751375#endif
     1376#if PER_LAYER_PTL
     1377  Int const numBitsForPtlIdx = vps->calculateLenOfSyntaxElement( vps->getNumProfileTierLevel() );
     1378#endif
    13761379  vps->getPTLForExtnPtr()->resize(vps->getNumProfileTierLevel());
    13771380#if LIST_OF_PTL
     
    14721475  vps->setOutputLayerFlag(0, 0, true);
    14731476  vps->deriveNecessaryLayerFlag(0);
     1477#if PER_LAYER_PTL
     1478  vps->getProfileLevelTierIdx()->resize(numOutputLayerSets);
     1479  vps->getProfileLevelTierIdx(0)->push_back( vps->getBaseLayerInternalFlag() && vps->getMaxLayers() > 1 ? 1 : 0);
     1480#endif
    14741481#endif
    14751482  for(i = 1; i < numOutputLayerSets; i++)
     
    14881495      vps->setOutputLayerSetIdx( i, i );
    14891496    }
     1497    Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx(i);
    14901498#if Q0078_ADD_LAYER_SETS
    14911499    if ( i > vps->getVpsNumLayerSetsMinus1() || vps->getDefaultTargetOutputLayerIdc() >= 2 )
     
    14941502#endif
    14951503    {
    1496       Int lsIdx = vps->getOutputLayerSetIdx(i);
    14971504#if NUM_OL_FLAGS
    1498       for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++)
     1505      for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet); j++)
    14991506#else
    15001507      for(j = 0; j < vps->getNumLayersInIdList(lsIdx) - 1; j++)
     
    15081515      // i <= (vps->getNumLayerSets() - 1)
    15091516      // Assign OutputLayerFlag depending on default_one_target_output_layer_flag
    1510       Int lsIdx = i;
    15111517      if( vps->getDefaultTargetOutputLayerIdc() == 1 )
    15121518      {
    1513         for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++)
    1514         {
    1515           vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(lsIdx)-1)) && (vps->getDimensionId(j,1) == 0) );
     1519        for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet); j++)
     1520        {
     1521          vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet)-1)) && (vps->getDimensionId(j,1) == 0) );
    15161522        }
    15171523      }
    15181524      else if ( vps->getDefaultTargetOutputLayerIdc() == 0 )
    15191525      {
    1520         for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++)
     1526        for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet); j++)
    15211527        {
    15221528          vps->setOutputLayerFlag(i, j, 1);
     
    15271533    vps->deriveNecessaryLayerFlag(i); 
    15281534#endif
     1535#if PER_LAYER_PTL
     1536    vps->getProfileLevelTierIdx(i)->assign(vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet), -1);
     1537    for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet) ; j++)
     1538    {
     1539      if( vps->getNecessaryLayerFlag(i, j) )
     1540      {
     1541        READ_CODE( numBitsForPtlIdx, uiCode, "profile_level_tier_idx[i]" );
     1542        vps->setProfileLevelTierIdx(i, j, uiCode );
     1543      }
     1544    }
     1545#else
    15291546    Int numBits = 1;
    15301547    while ((1 << numBits) < (vps->getNumProfileTierLevel()))
     
    15331550    }
    15341551    READ_CODE( numBits, uiCode, "profile_level_tier_idx[i]" );     vps->setProfileLevelTierIdx(i, uiCode);
     1552#endif
    15351553#if P0300_ALT_OUTPUT_LAYER_FLAG
    15361554    NumOutputLayersInOutputLayerSet[i] = 0;
    1537     Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx(i);
    15381555    for (j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet); j++)
    15391556    {
Note: See TracChangeset for help on using the changeset viewer.