Changeset 583 in SHVCSoftware for branches/SHM-5.0-dev/source


Ignore:
Timestamp:
1 Feb 2014, 00:19:46 (11 years ago)
Author:
qualcomm
Message:

JCTVC-P0204: Support for sub-bitstream property SEI message (MACRO: SUB_BITSTREAM_PROPERTY_SEI)

From: Adarsh K. Ramasubramonian <aramasub@…>

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

Legend:

Unmodified
Added
Removed
  • branches/SHM-5.0-dev/source/Lib/TLibCommon/SEI.cpp

    r313 r583  
    4141//Table D-7 Meaning of camera iso sensitivity indicator and exposure index rating indicator
    4242Int  Table_exp_indicator[32] = {0, 10, 12, 16, 20, 25, 32, 40, 50, 64, 80, 100, 125, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 8000, -1};
     43
     44#if SUB_BITSTREAM_PROPERTY_SEI
     45SEISubBitstreamProperty::SEISubBitstreamProperty()
     46{
     47  m_activeVpsId             = -1;
     48  m_numAdditionalSubStreams = 0;
     49  ::memset(m_subBitstreamMode       , 0, sizeof(m_subBitstreamMode));
     50  ::memset(m_outputLayerSetIdxToVps , 0, sizeof(m_outputLayerSetIdxToVps));
     51  ::memset(m_highestSublayerId      , 0, sizeof(m_highestSublayerId));
     52  ::memset(m_avgBitRate             , 0, sizeof(m_avgBitRate));
     53  ::memset(m_maxBitRate             , 0, sizeof(m_maxBitRate));
     54}
     55#endif
    4356
    4457SEIMessages getSeisByType(SEIMessages &seiList, SEI::PayloadType seiType)
  • branches/SHM-5.0-dev/source/Lib/TLibCommon/SEI.h

    r567 r583  
    7878    INTER_LAYER_CONSTRAINED_TILE_SETS    = 138
    7979#endif
     80#if SUB_BITSTREAM_PROPERTY_SEI
     81   ,SUB_BITSTREAM_PROPERTY               = 139    // Final PayloadType to be defined after finalization
     82#endif
    8083  };
    8184 
     
    407410#endif
    408411
     412#if SUB_BITSTREAM_PROPERTY_SEI
     413class SEISubBitstreamProperty : public SEI
     414{
     415public:
     416  PayloadType payloadType() const { return SUB_BITSTREAM_PROPERTY; }
     417
     418  SEISubBitstreamProperty();
     419  virtual ~SEISubBitstreamProperty() {}
     420
     421  Int  m_activeVpsId;
     422  Int  m_numAdditionalSubStreams;
     423  Int  m_subBitstreamMode       [MAX_SUB_STREAMS];
     424  Int  m_outputLayerSetIdxToVps [MAX_SUB_STREAMS];
     425  Int  m_highestSublayerId      [MAX_SUB_STREAMS];
     426  Int  m_avgBitRate             [MAX_SUB_STREAMS];
     427  Int  m_maxBitRate             [MAX_SUB_STREAMS];
     428};
     429#endif
    409430
    410431typedef std::list<SEI*> SEIMessages;
  • branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h

    r582 r583  
    5858#define CHANGE_NUMSUBDPB_IDX             1      ///< Change index of NumSubDpb from output layer set to layer set, to be more aligned with the Spec
    5959#define RESOLUTION_BASED_DPB             1      ///< JCTVC-P0192: Assign layers to sub-DPBs based on the rep_format() signaled in the VPS
     60#define SUB_BITSTREAM_PROPERTY_SEI       1      ///< JCTVC-P0204: Sub-bitstream property SEI message
    6061#define O0109_O0199_FLAGS_TO_VUI         1      ///< JCTVC-O0109, O0199: move single_layer_for_non_irap_flag and higher_layer_flag to vps_vui
    6162#define O0109_VIEW_ID_LEN                1      ///< JCTVC-O0109: view_id_len_minus1 to view_id_len, and add constraint (1<<view_id_len) is greater than or equal to NumViews
     
    250251#define MAX_VPS_OP_SETS_PLUS1                     1024
    251252#define MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1  1
     253#endif
     254
     255#if SUB_BITSTREAM_PROPERTY_SEI
     256#define MAX_SUB_STREAMS                           1024
    252257#endif
    253258
  • branches/SHM-5.0-dev/source/Lib/TLibDecoder/SEIread.cpp

    r567 r583  
    106106    break;
    107107#endif
     108#if SUB_BITSTREAM_PROPERTY_SEI
     109    case SEI::SUB_BITSTREAM_PROPERTY:
     110      fprintf( g_hTrace, "=========== Sub-bitstream property SEI message ===========\n");
     111      break;
     112#endif
    108113  case SEI::SCALABLE_NESTING:
    109114    fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");
     
    276281      xParseSEIInterLayerConstrainedTileSets((SEIInterLayerConstrainedTileSets&) *sei, payloadSize);
    277282      break;
     283#endif
     284#if SUB_BITSTREAM_PROPERTY_SEI
     285   case SEI::SUB_BITSTREAM_PROPERTY:
     286     sei = new SEISubBitstreamProperty;
     287     xParseSEISubBitstreamProperty((SEISubBitstreamProperty&) *sei);
     288     break;
    278289#endif
    279290    case SEI::SCALABLE_NESTING:
     
    829840}
    830841#endif
    831 
     842#if SUB_BITSTREAM_PROPERTY_SEI
     843Void SEIReader::xParseSEISubBitstreamProperty(SEISubBitstreamProperty &sei)
     844{
     845  UInt uiCode;
     846  READ_CODE( 4, uiCode, "active_vps_id" );                      sei.m_activeVpsId = uiCode;
     847  READ_UVLC(    uiCode, "num_additional_sub_streams_minus1" );  sei.m_numAdditionalSubStreams = uiCode + 1;
     848
     849  for( Int i = 0; i < sei.m_numAdditionalSubStreams; i++ )
     850  {
     851    READ_CODE(  2, uiCode, "sub_bitstream_mode[i]"           ); sei.m_subBitstreamMode[i] = uiCode;
     852    READ_UVLC(     uiCode, "output_layer_set_idx_to_vps[i]"  ); sei.m_outputLayerSetIdxToVps[i] = uiCode;
     853    READ_CODE(  3, uiCode, "highest_sub_layer_id[i]"         ); sei.m_highestSublayerId[i] = uiCode;
     854    READ_CODE( 16, uiCode, "avg_bit_rate[i]"                 ); sei.m_avgBitRate[i] = uiCode;
     855    READ_CODE( 16, uiCode, "max_bit_rate[i]"                 ); sei.m_maxBitRate[i] = uiCode;
     856  }
     857  xParseByteAlign();
     858}
     859#endif
    832860#if LAYERS_NOT_PRESENT_SEI
    833861Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComVPS *vps, TComSPS *sps)
  • branches/SHM-5.0-dev/source/Lib/TLibDecoder/SEIread.h

    r567 r583  
    8383  Void xParseSEIInterLayerConstrainedTileSets (SEIInterLayerConstrainedTileSets &sei, UInt payloadSize);
    8484#endif
     85#if SUB_BITSTREAM_PROPERTY_SEI
     86Void   xParseSEISubBitstreamProperty   (SEISubBitstreamProperty &sei);
     87#endif
    8588#if LAYERS_NOT_PRESENT_SEI
    8689  Void xParseSEILayersNotPresent      (SEILayersNotPresent &sei, UInt payloadSize, TComVPS *vps);
  • branches/SHM-5.0-dev/source/Lib/TLibEncoder/SEIwrite.cpp

    r567 r583  
    100100    break;
    101101#endif
     102#if SUB_BITSTREAM_PROPERTY_SEI
     103    case SEI::SUB_BITSTREAM_PROPERTY:
     104      fprintf( g_hTrace, "=========== Sub-bitstream property SEI message ===========\n");
     105      break;
     106#endif
    102107  case SEI::SCALABLE_NESTING:
    103108    fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");
     
    162167    xWriteSEIInterLayerConstrainedTileSets(*static_cast<const SEIInterLayerConstrainedTileSets*>(&sei));
    163168    break;
     169#endif
     170#if SUB_BITSTREAM_PROPERTY_SEI
     171   case SEI::SUB_BITSTREAM_PROPERTY:
     172     xWriteSEISubBitstreamProperty(*static_cast<const SEISubBitstreamProperty*>(&sei));
     173     break;
    164174#endif
    165175  case SEI::SCALABLE_NESTING:
     
    606616}
    607617#endif
    608 
     618#if SUB_BITSTREAM_PROPERTY_SEI
     619Void SEIWriter::xWriteSEISubBitstreamProperty(const SEISubBitstreamProperty &sei)
     620{
     621  WRITE_CODE( sei.m_activeVpsId, 4, "active_vps_id" );
     622  assert( sei.m_numAdditionalSubStreams >= 1 );
     623  WRITE_UVLC( sei.m_numAdditionalSubStreams - 1, "num_additional_sub_streams_minus1" );
     624
     625  for( Int i = 0; i < sei.m_numAdditionalSubStreams; i++ )
     626  {
     627    WRITE_CODE( sei.m_subBitstreamMode[i],       2, "sub_bitstream_mode[i]"           );
     628    WRITE_UVLC( sei.m_outputLayerSetIdxToVps[i],    "output_layer_set_idx_to_vps[i]"  );
     629    WRITE_CODE( sei.m_highestSublayerId[i],      3, "highest_sub_layer_id[i]"         );
     630    WRITE_CODE( sei.m_avgBitRate[i],            16, "avg_bit_rate[i]"                 );
     631    WRITE_CODE( sei.m_maxBitRate[i],            16, "max_bit_rate[i]"                 );
     632  }
     633  xWriteByteAlign();
     634}
     635#endif
    609636Void SEIWriter::xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps)
    610637{
  • branches/SHM-5.0-dev/source/Lib/TLibEncoder/SEIwrite.h

    r567 r583  
    7171  Void xWriteSEIInterLayerConstrainedTileSets(const SEIInterLayerConstrainedTileSets& sei);
    7272#endif
     73#if SUB_BITSTREAM_PROPERTY_SEI
     74  Void xWriteSEISubBitstreamProperty(const SEISubBitstreamProperty &sei);
     75#endif
    7376  Void xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps);
    7477  Void xWriteByteAlign();
Note: See TracChangeset for help on using the changeset viewer.