Changeset 110 in SHVCSoftware for branches/HM-10.0-dev-SHM/source/Lib


Ignore:
Timestamp:
3 Apr 2013, 21:34:49 (12 years ago)
Author:
qualcomm
Message:

Signal output layer sets in VPS extension (MACRO: VPS_EXTN_OP_LAYER_SETS)

Include signalling of output layer sets in the VPS extension. Does not include configuration support for specifying the output layer sets.

From: Adarsh K. Ramasubramonian <aramasub@…>

Location:
branches/HM-10.0-dev-SHM/source/Lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComSlice.cpp

    r108 r110  
    14741474, m_numLayerSets              (0)
    14751475#endif
     1476#if VPS_EXTN_OP_LAYER_SETS
     1477, m_numOutputLayerSets        (0) 
     1478#endif
    14761479{
    14771480
     
    14821485    m_uiMaxLatencyIncrease[i] = 0;
    14831486  }
     1487#if VPS_EXTN_OP_LAYER_SETS
     1488  ::memset(m_layerIdIncludedFlag, 0, sizeof(m_layerIdIncludedFlag));
     1489  // Consider dynamic allocation for outputLayerSetIdx and outputLayerFlag
     1490  ::memset(m_outputLayerSetIdx, 0, sizeof(m_outputLayerSetIdx));
     1491  ::memset(m_outputLayerFlag, 0, sizeof(m_outputLayerFlag));
     1492#endif
    14841493}
    14851494
  • branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComSlice.h

    r108 r110  
    507507#endif
    508508
     509  // ------------------------------------------
     510  // Variables related to VPS extensions
     511  // ------------------------------------------
     512#if VPS_EXTN_OP_LAYER_SETS
     513  // .. More declarations here
     514  // Target output layer signalling related
     515  UInt       m_numOutputLayerSets;
     516  UInt       m_outputLayerSetIdx[MAX_VPS_LAYER_SETS_PLUS1];
     517  Bool       m_outputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
     518  // .. More declarations here
     519#endif
     520
    509521public:
    510522  TComVPS();
     
    570582#if L0043_TIMING_INFO
    571583  TimingInfo* getTimingInfo() { return &m_timingInfo; }
     584#endif
     585
     586#if VPS_EXTN_OP_LAYER_SETS
     587  // Target output layer signalling related
     588  UInt   getNumOutputLayerSets()                                { return m_numOutputLayerSets;     }
     589  Void   setNumOutputLayerSets(Int x)                           { m_numOutputLayerSets = x;        }
     590 
     591  UInt   getOutputLayerSetIdx(Int idx)                          { return m_outputLayerSetIdx[idx]; }
     592  Void   setOutputLayerSetIdx(Int idx, UInt x)                  { m_outputLayerSetIdx[idx] = x;    }
     593
     594  Bool   getOutputLayerFlag(Int layerSet, Int layerId)          { return m_outputLayerFlag[layerSet][layerId]; }
     595  Void   setOutputLayerFlag(Int layerSet, Int layerId, Bool x)  { m_outputLayerFlag[layerSet][layerId] = x;    }
    572596#endif
    573597};
  • branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TypeDef.h

    r109 r110  
    4646#define VPS_RENAME                       1      ///< Rename variables max_layer_id and num_layer_sets_minus1 in VPS
    4747#define VPS_EXTNS                        1      ///< Include function structure for VPS extensions
     48#if VPS_EXTNS
     49#define VPS_EXTN_OP_LAYER_SETS           1      ///< Include output layer sets in VPS extension
     50#endif
    4851#define MAX_LAYERS                       2      ///< max number of layers the codec is supposed to handle
    4952
     
    135138#if VPS_RENAME
    136139#define MAX_VPS_LAYER_SETS_PLUS1                  1024
    137 #define MAX_VPS_LAYER_ID_PLUS1                    1
     140#define MAX_VPS_LAYER_ID_PLUS1                    2
    138141#else
    139142#define MAX_VPS_NUM_HRD_PARAMETERS                1
  • branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r109 r110  
    839839Void TDecCavlc::parseVPSExtension(TComVPS *vps)
    840840
     841  UInt uiCode;
    841842  // ... More syntax elements to be parsed here
    842843
     844  // Target output layer signalling
     845  READ_UVLC( uiCode,            "vps_num_output_layer_sets"); vps->setNumOutputLayerSets(uiCode);
     846  for(Int i = 0; i < vps->getNumOutputLayerSets(); i++)
     847  {
     848    READ_UVLC( uiCode,           "vps_output_layer_set_idx[i]"); vps->setOutputLayerSetIdx(i, uiCode);
     849    Int lsIdx = vps->getOutputLayerSetIdx(i);
     850    for(Int j = 0; j <= vps->getMaxLayerId(); j++)
     851    {
     852      if(vps->getLayerIdIncludedFlag(lsIdx, j))
     853      {
     854        READ_FLAG( uiCode, "vps_output_layer_flag[lsIdx][j]"); vps->setOutputLayerFlag(lsIdx, j, uiCode);
     855      }
     856    }
     857  } 
    843858  // ... More syntax elements to be parsed here
    844859}
  • branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder/TEncCavlc.cpp

    r109 r110  
    591591  assert( pcVPS->getNumHrdParameters() <= MAX_VPS_LAYER_SETS_PLUS1 );
    592592  assert( pcVPS->getMaxLayerId() < MAX_VPS_LAYER_ID_PLUS1 );
     593#if !VPS_EXTN_OP_LAYER_SETS     // num layer sets set in TAppEncTop.cpp
    593594  pcVPS->setNumLayerSets(1);
     595#endif
    594596  WRITE_CODE( pcVPS->getMaxLayerId(), 6,                       "vps_max_layer_id" );
    595597  WRITE_UVLC( pcVPS->getNumLayerSets() - 1,                 "vps_num_layer_sets_minus1" );
     
    610612#endif
    611613    {
     614#if !VPS_EXTN_OP_LAYER_SETS     // layer Id include flag set in TAppEncTop.cpp
    612615      // Only applicable for version 1
    613616      pcVPS->setLayerIdIncludedFlag( true, opsIdx, i );
     617#endif
    614618      WRITE_FLAG( pcVPS->getLayerIdIncludedFlag( opsIdx, i ) ? 1 : 0, "layer_id_included_flag[opsIdx][i]" );
    615619    }
     
    667671
    668672  // ... More syntax elements to be written here
     673  // Target output layer signalling
     674  WRITE_UVLC( vps->getNumOutputLayerSets(),            "vps_num_output_layer_sets");
     675  for(Int i = 0; i < vps->getNumOutputLayerSets(); i++)
     676  {
     677    WRITE_UVLC( vps->getOutputLayerSetIdx(i),           "vps_output_layer_set_idx[i]");
     678    Int lsIdx = vps->getOutputLayerSetIdx(i);
     679    for(Int j = 0; j <= vps->getMaxLayerId(); j++)
     680    {
     681      if(vps->getLayerIdIncludedFlag(lsIdx, j))
     682      {
     683        WRITE_FLAG( vps->getOutputLayerFlag(lsIdx, j), "vps_output_layer_flag[lsIdx][j]");
     684      }
     685    }
     686  }
    669687}
    670688#endif
Note: See TracChangeset for help on using the changeset viewer.