Changeset 866 in SHVCSoftware


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@…>

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

Legend:

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

    r865 r866  
    14811481#endif
    14821482#endif
     1483#if !PER_LAYER_PTL
    14831484  for(i = 1; i < vps->getNumLayerSets(); i++)
    14841485  {
     
    14881489#endif
    14891490  } 
     1491#endif
    14901492#endif
    14911493 #if VPS_DPB_SIZE_TABLE
     
    15541556  vps->deriveNecessaryLayerFlag();
    15551557  vps->checkNecessaryLayerFlagCondition();
     1558#endif
     1559#if PER_LAYER_PTL
     1560  vps->getProfileLevelTierIdx()->resize(vps->getNumOutputLayerSets());
     1561  vps->getProfileLevelTierIdx(0)->push_back( vps->getBaseLayerInternalFlag() && vps->getMaxLayers() > 1 ? 1 : 0 ); // Default 0-th output layer set
     1562  for(i = 1; i < vps->getNumOutputLayerSets(); i++)
     1563  {
     1564    Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx( i );
     1565    Int numLayerInLayerSet = vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet );
     1566    for(Int j = 0; j < numLayerInLayerSet; j++)
     1567    {
     1568      Int layerIdxInVps = vps->getLayerIdInVps( vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j) );
     1569      if( vps->getNecessaryLayerFlag(i, j) )
     1570      {
     1571        vps->getProfileLevelTierIdx(i)->push_back( vps->getBaseLayerInternalFlag() && vps->getMaxLayers() > 1 ? layerIdxInVps + 1 : layerIdxInVps);
     1572      }
     1573      else
     1574      {
     1575        vps->getProfileLevelTierIdx(i)->push_back( -1 );
     1576      }
     1577    }
     1578  }
    15561579#endif
    15571580  // Initialize dpb_size_table() for all ouput layer sets in the VPS extension
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r865 r866  
    24462446#endif
    24472447#endif
     2448#if !PER_LAYER_PTL
    24482449  ::memset(m_profileLevelTierIdx,  0, sizeof(m_profileLevelTierIdx));
     2450#endif
    24492451  m_maxOneActiveRefLayerFlag = true;
    24502452#if O0062_POC_LSB_NOT_PRESENT_FLAG
     
    30743076    assert( layerFoundNecessaryLayerFlag );
    30753077  }
     3078}
     3079#endif
     3080#if PER_LAYER_PTL
     3081Int const TComVPS::calculateLenOfSyntaxElement( Int const numVal )
     3082{
     3083  Int numBits = 1;
     3084  while((1 << numBits) < numVal)
     3085  {
     3086    numBits++;
     3087  }
     3088  return numBits;
    30763089}
    30773090#endif
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r865 r866  
    585585#endif
    586586#endif
     587#if PER_LAYER_PTL
     588  std::vector< std::vector<Int> >  m_profileLevelTierIdx;
     589#else
    587590  Int        m_profileLevelTierIdx[64];     
     591#endif
    588592  Bool       m_maxOneActiveRefLayerFlag;
    589593#if O0062_POC_LSB_NOT_PRESENT_FLAG
     
    984988#endif
    985989#endif
     990#if PER_LAYER_PTL
     991  Bool const getNecessaryLayerFlag(Int const i, Int const j) { return m_necessaryLayerFlag[i][j]; }
     992  std::vector< std::vector<Int> >* const getProfileLevelTierIdx() { return &m_profileLevelTierIdx; }
     993  std::vector<Int>* const getProfileLevelTierIdx(Int const olsIdx) { return &m_profileLevelTierIdx[olsIdx]; }
     994  Int    getProfileLevelTierIdx(Int const olsIdx, Int const layerIdx)     { return m_profileLevelTierIdx[olsIdx][layerIdx]; }
     995  Void   setProfileLevelTierIdx(Int const olsIdx, Int const layerIdx, Int const ptlIdx)     { m_profileLevelTierIdx[olsIdx][layerIdx] = ptlIdx; }
     996  Int const calculateLenOfSyntaxElement( Int const numVal );
     997#else
    986998  Int    getProfileLevelTierIdx(Int i)                        { return m_profileLevelTierIdx[i]; }
    987999  Void   setProfileLevelTierIdx(Int i, Int x)                 { m_profileLevelTierIdx[i] = x   ; }
     1000#endif
    9881001  Bool   getMaxOneActiveRefLayerFlag()                                          { return m_maxOneActiveRefLayerFlag;                      }
    9891002  Void   setMaxOneActiveRefLayerFlag(Bool x)                                    { m_maxOneActiveRefLayerFlag = x;                         }
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r865 r866  
    5757#define LIST_OF_PTL                      1      ///< JCTVC-R0272: Signalling the PTL for the 0-th OLS
    5858#define NECESSARY_LAYER_FLAG                   1      ////< Derivation of NecessaryLayerFlag
     59#define PER_LAYER_PTL                    1      ///< Signal profile-tier-level information for each layer.
    5960#endif
    6061#define O0137_MAX_LAYERID                1      ///< JCTVC-O0137, JCTVC-O0200, JCTVC-O0223: restrict nuh_layer_id and vps_max_layers_minus1
  • 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    {
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r865 r866  
    10701070#else
    10711071  WRITE_UVLC( vps->getNumProfileTierLevel() - 1, "vps_num_profile_tier_level_minus1");
     1072#if PER_LAYER_PTL
     1073  Int const numBitsForPtlIdx = vps->calculateLenOfSyntaxElement( vps->getNumProfileTierLevel() );
     1074#endif
    10721075#endif
    10731076#if LIST_OF_PTL
     
    11531156  for(i = 1; i < numOutputLayerSets; i++)
    11541157  {
     1158    Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx(i);
    11551159    if( i > (vps->getNumLayerSets() - 1) )
    11561160    {
     
    11701174    {
    11711175#endif
    1172       Int lsIdx = vps->getOutputLayerSetIdx(i);
    11731176#if NUM_OL_FLAGS
    1174       for(j = 0; j < vps->getNumLayersInIdList(lsIdx) ; j++)
     1177      for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet) ; j++)
    11751178#else
    11761179      for(j = 0; j < vps->getNumLayersInIdList(lsIdx) - 1; j++)
     
    11801183      }
    11811184    }
     1185#if PER_LAYER_PTL
     1186    for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet) ; j++)
     1187    {
     1188      if( vps->getNecessaryLayerFlag(i, j) )
     1189      {
     1190        WRITE_CODE( vps->getProfileLevelTierIdx(i, j), numBitsForPtlIdx, "profile_level_tier_idx[i]" );
     1191      }
     1192    }
     1193#else
    11821194    Int numBits = 1;
    11831195    while ((1 << numBits) < (vps->getNumProfileTierLevel()))
     
    11861198    }
    11871199    WRITE_CODE( vps->getProfileLevelTierIdx(i), numBits, "profile_level_tier_idx[i]" );     
     1200#endif
    11881201#if P0300_ALT_OUTPUT_LAYER_FLAG
    11891202    NumOutputLayersInOutputLayerSet[i] = 0;
    1190     Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx(i);
    11911203    for (j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet); j++)
    11921204    {
Note: See TracChangeset for help on using the changeset viewer.