Changeset 862 in 3DVCSoftware


Ignore:
Timestamp:
5 Mar 2014, 03:54:16 (10 years ago)
Author:
qualcomm
Message:

JCTVC-P0204: Sub-bitstream property SEI message (Macro: H_MV_HLS_7_SEI_P0204_26)

Includes signaling, and option to input parameters of the SEI message in the configuration file.

From: Adarsh K. Ramasubramonian <aramasub@…>

Location:
branches/HTM-10.0-dev0/source
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-10.0-dev0/source/App/TAppEncoder/TAppEncCfg.cpp

    r854 r862  
    737737  ("SEISOPDescription",              m_SOPDescriptionSEIEnabled,              0, "Control generation of SOP description SEI messages")
    738738  ("SEIScalableNesting",             m_scalableNestingSEIEnabled,              0, "Control generation of scalable nesting SEI messages")
     739#if H_MV_HLS_7_SEI_P0204_26
     740  ("SubBitstreamPropSEIEnabled",              m_subBistreamPropSEIEnabled,    false                     ,"Enable signaling of sub-bitstream property SEI message")
     741  ("SEISubBitstreamNumAdditionalSubStreams",  m_sbPropNumAdditionalSubStreams,0, "Number of substreams for which additional information is signalled")
     742  ("SEISubBitstreamSubBitstreamMode",         m_sbPropSubBitstreamMode,       std::vector< Int  >(1,0)  ,"Specifies mode of generation of the i-th sub-bitstream (0 or 1)")
     743  ("SEISubBitstreamOutputLayerSetIdxToVps",   m_sbPropOutputLayerSetIdxToVps, std::vector< Int  >(1,0)  ,"Specifies output layer set index of the i-th sub-bitstream ")
     744  ("SEISubBitstreamHighestSublayerId",        m_sbPropHighestSublayerId,      std::vector< Int  >(1,0)  ,"Specifies highest TemporalId of the i-th sub-bitstream")
     745  ("SEISubBitstreamAvgBitRate",               m_sbPropAvgBitRate,             std::vector< Int  >(1,0)  ,"Specifies average bit rate of the i-th sub-bitstream")
     746  ("SEISubBitstreamMaxBitRate",               m_sbPropMaxBitRate,             std::vector< Int  >(1,0)  ,"Specifies maximum bit rate of the i-th sub-bitstream")
     747#endif
    739748#if H_3D
    740749  ("CameraParameterFile,cpf", m_pchCameraParameterFile,    (Char *) 0, "Camera Parameter File Name")
     
    22442253  }
    22452254#endif
     2255#if H_MV_HLS_7_SEI_P0204_26
     2256  // Check input parameters for Sub-bitstream property SEI message
     2257  if( m_subBistreamPropSEIEnabled )
     2258  {
     2259    xConfirmPara(
     2260      (this->m_sbPropNumAdditionalSubStreams != m_sbPropAvgBitRate.size() )
     2261      || (this->m_sbPropNumAdditionalSubStreams != m_sbPropHighestSublayerId.size() )
     2262      || (this->m_sbPropNumAdditionalSubStreams != m_sbPropMaxBitRate.size() )
     2263      || (this->m_sbPropNumAdditionalSubStreams != m_sbPropOutputLayerSetIdxToVps.size() )
     2264      || (this->m_sbPropNumAdditionalSubStreams != m_sbPropSubBitstreamMode.size()), "Some parameters of some sub-bitstream not defined");
     2265
     2266    for( Int i = 0; i < m_sbPropNumAdditionalSubStreams; i++ )
     2267    {
     2268      xConfirmPara( m_sbPropSubBitstreamMode[i] < 0 || m_sbPropSubBitstreamMode[i] > 1, "Mode value should be 0 or 1" );
     2269      xConfirmPara( m_sbPropHighestSublayerId[i] < 0 || m_sbPropHighestSublayerId[i] > MAX_TLAYER-1, "Maximum sub-layer ID out of range" );
     2270      xConfirmPara( m_sbPropOutputLayerSetIdxToVps[i] < 0 || m_sbPropOutputLayerSetIdxToVps[i] >= MAX_VPS_OUTPUTLAYER_SETS, "OutputLayerSetIdxToVps should be within allowed range" );
     2271    }
     2272  }
     2273#endif
    22462274#undef xConfirmPara
    22472275  if (check_failed)
  • branches/HTM-10.0-dev0/source/App/TAppEncoder/TAppEncCfg.h

    r854 r862  
    440440  Int       m_log2MaxMvLengthHorizontal;                      ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units
    441441  Int       m_log2MaxMvLengthVertical;                        ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units
    442 
     442#if H_MV_HLS_7_SEI_P0204_26
     443  Bool              m_subBistreamPropSEIEnabled;
     444  Int               m_sbPropNumAdditionalSubStreams;
     445  std::vector<Int>  m_sbPropSubBitstreamMode;
     446  std::vector<Int>  m_sbPropOutputLayerSetIdxToVps;
     447  std::vector<Int>  m_sbPropHighestSublayerId;
     448  std::vector<Int>  m_sbPropAvgBitRate;
     449  std::vector<Int>  m_sbPropMaxBitRate;
     450#endif
    443451#if H_3D
    444452  // Camera parameters
  • branches/HTM-10.0-dev0/source/App/TAppEncoder/TAppEncTop.cpp

    r854 r862  
    429429  m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled );
    430430  m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled );
     431#if H_MV_HLS_7_SEI_P0204_26
     432  m_cTEncTop.setSubBitstreamPropSEIEnabled( m_subBistreamPropSEIEnabled );
     433  if( m_subBistreamPropSEIEnabled )
     434  {
     435    m_cTEncTop.setNumAdditionalSubStreams ( m_sbPropNumAdditionalSubStreams );
     436    m_cTEncTop.setSubBitstreamMode        ( m_sbPropSubBitstreamMode );
     437    m_cTEncTop.setOutputLayerSetIdxToVps  ( m_sbPropOutputLayerSetIdxToVps );
     438    m_cTEncTop.setHighestSublayerId       ( m_sbPropHighestSublayerId );
     439    m_cTEncTop.setAvgBitRate              ( m_sbPropAvgBitRate );
     440    m_cTEncTop.setMaxBitRate              ( m_sbPropMaxBitRate );
     441  }
     442#endif
    431443  m_cTEncTop.setUniformSpacingIdr          ( m_iUniformSpacingIdr );
    432444  m_cTEncTop.setNumColumnsMinus1           ( m_iNumColumnsMinus1 );
  • branches/HTM-10.0-dev0/source/Lib/TLibCommon/SEI.h

    r852 r862  
    7272    SCALABLE_NESTING                     = 133,
    7373    REGION_REFRESH_INFO                  = 134,
     74#if H_MV_HLS_7_SEI_P0204_26
     75    SUB_BITSTREAM_PROPERTY               = 139,    // Final PayloadType to be defined after finalization
     76#endif
    7477  };
    7578 
     
    363366};
    364367
     368#if H_MV_HLS_7_SEI_P0204_26
     369class SEISubBitstreamProperty : public SEI
     370{
     371public:
     372  PayloadType payloadType() const { return SUB_BITSTREAM_PROPERTY; }
     373
     374  SEISubBitstreamProperty():   m_activeVpsId(-1), m_numAdditionalSubStreams(0) {}
     375  virtual ~SEISubBitstreamProperty() {}
     376
     377  Int  m_activeVpsId;
     378  Int  m_numAdditionalSubStreams;
     379  std::vector<Int>  m_subBitstreamMode;
     380  std::vector<Int>  m_outputLayerSetIdxToVps;
     381  std::vector<Int>  m_highestSublayerId;
     382  std::vector<Int>  m_avgBitRate;
     383  std::vector<Int>  m_maxBitRate;
     384};
     385#endif
     386
    365387typedef std::list<SEI*> SEIMessages;
    366388
  • branches/HTM-10.0-dev0/source/Lib/TLibCommon/TypeDef.h

    r859 r862  
    339339// #define H_MV_HLS_7_POC_P0041_3            0 // (POC/P0041/POC reset) #3 It was remarked that we should require each non-IRAP picture that has discardable_flag equal to 1 to have NUT value indicating that it is a sub-layer non-reference picture. This was agreed. Decision: Adopt (with constraint for discardable_flag as described above)
    340340// #define H_MV_HLS_7_POC_P0041_FIXES        0 // (POC/P0041/Fixes) For each non-IRAP picture that has discardable_flag equal to 1 to have NUT value indicating that it is a sub-layer non-reference picture.
    341 // #define H_MV_HLS_7_SEI_P0204_26           0 // (SEI/P0204/sub-bitstream SEI) #26 Add sub-bitstream property SEI message. Decision: Adopt
     341#define H_MV_HLS_7_SEI_P0204_26           1 // (SEI/P0204/sub-bitstream SEI) #26 Add sub-bitstream property SEI message. Decision: Adopt
    342342#define H_MV_HLS_7_MISC_P0130_20          1 // (MISC/P0130/discardable not in inter-layer RPS) #20 Add constraint restricting pictures marked as discardable from being present in the temporal or inter-layer RPS,
    343343
     
    416416#define MAX_NUM_BITSTREAM_PARTITIONS    100 ///< Maximum value is actually not specified
    417417#define MAX_NUM_BSP_SCHED_COMBINATION   100 ///< Maximum value is actually not specified
     418#if H_MV_HLS_7_SEI_P0204_26
     419#define MAX_SUB_STREAMS                 1024
     420#endif
    418421#else
    419422#define MAX_NUM_LAYER_IDS                64
  • branches/HTM-10.0-dev0/source/Lib/TLibDecoder/SEIread.cpp

    r852 r862  
    9999    fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");
    100100    break;
     101#if H_MV_HLS_7_SEI_P0204_26
     102  case SEI::SUB_BITSTREAM_PROPERTY:
     103    fprintf( g_hTrace, "=========== Sub-bitstream property SEI message ===========\n");
     104    break;
     105#endif
    101106  default:
    102107    fprintf( g_hTrace, "=========== Unknown SEI message ===========\n");
     
    240245      xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, sps);
    241246      break;
     247#if H_MV_HLS_7_SEI_P0204_26
     248     case SEI::SUB_BITSTREAM_PROPERTY:
     249       sei = new SEISubBitstreamProperty;
     250       xParseSEISubBitstreamProperty((SEISubBitstreamProperty&) *sei);
     251       break;
     252#endif
    242253    default:
    243254      for (UInt i = 0; i < payloadSize; i++)
     
    766777
    767778}
     779#if H_MV_HLS_7_SEI_P0204_26
     780Void SEIReader::xParseSEISubBitstreamProperty(SEISubBitstreamProperty &sei)
     781{
     782  UInt uiCode;
     783  READ_CODE( 4, uiCode, "active_vps_id" );                      sei.m_activeVpsId = uiCode;
     784  READ_UVLC(    uiCode, "num_additional_sub_streams_minus1" );  sei.m_numAdditionalSubStreams = uiCode + 1;
     785
     786  xResizeSubBitstreamPropertySeiArrays(sei);
     787  for( Int i = 0; i < sei.m_numAdditionalSubStreams; i++ )
     788  {
     789    READ_CODE(  2, uiCode, "sub_bitstream_mode[i]"           ); sei.m_subBitstreamMode[i] = uiCode;
     790    READ_UVLC(     uiCode, "output_layer_set_idx_to_vps[i]"  ); sei.m_outputLayerSetIdxToVps[i] = uiCode;
     791    READ_CODE(  3, uiCode, "highest_sub_layer_id[i]"         ); sei.m_highestSublayerId[i] = uiCode;
     792    READ_CODE( 16, uiCode, "avg_bit_rate[i]"                 ); sei.m_avgBitRate[i] = uiCode;
     793    READ_CODE( 16, uiCode, "max_bit_rate[i]"                 ); sei.m_maxBitRate[i] = uiCode;
     794  }
     795  xParseByteAlign();
     796}
     797Void SEIReader::xResizeSubBitstreamPropertySeiArrays(SEISubBitstreamProperty &sei)
     798{
     799  sei.m_subBitstreamMode.resize( sei.m_numAdditionalSubStreams );
     800  sei.m_outputLayerSetIdxToVps.resize( sei.m_numAdditionalSubStreams );
     801  sei.m_highestSublayerId.resize( sei.m_numAdditionalSubStreams );
     802  sei.m_avgBitRate.resize( sei.m_numAdditionalSubStreams );
     803  sei.m_maxBitRate.resize( sei.m_numAdditionalSubStreams );
     804}
     805#endif
    768806
    769807Void SEIReader::xParseByteAlign()
  • branches/HTM-10.0-dev0/source/Lib/TLibDecoder/SEIread.h

    r852 r862  
    7373  Void xParseSEISOPDescription        (SEISOPDescription &sei, UInt payloadSize);
    7474  Void xParseSEIScalableNesting       (SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps);
     75#if H_MV_HLS_7_SEI_P0204_26
     76  Void  xParseSEISubBitstreamProperty   (SEISubBitstreamProperty &sei);
     77  Void  xResizeSubBitstreamPropertySeiArrays(SEISubBitstreamProperty &sei);
     78#endif
    7579  Void xParseByteAlign();
    7680};
  • branches/HTM-10.0-dev0/source/Lib/TLibEncoder/SEIwrite.cpp

    r852 r862  
    9393    fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");
    9494    break;
     95#if H_MV_HLS_7_SEI_P0204_26
     96    case SEI::SUB_BITSTREAM_PROPERTY:
     97    fprintf( g_hTrace, "=========== Sub-bitstream property SEI message ===========\n");
     98    break;
     99#endif
    95100  default:
    96101    fprintf( g_hTrace, "=========== Unknown SEI message ===========\n");
     
    146151    xWriteSEIScalableNesting(bs, *static_cast<const SEIScalableNesting*>(&sei), sps);
    147152    break;
     153#if H_MV_HLS_7_SEI_P0204_26
     154   case SEI::SUB_BITSTREAM_PROPERTY:
     155   xWriteSEISubBitstreamProperty(*static_cast<const SEISubBitstreamProperty*>(&sei));
     156   break;
     157#endif
    148158  default:
    149159    assert(!"Unhandled SEI message");
     
    579589}
    580590
     591#if H_MV_HLS_7_SEI_P0204_26
     592Void SEIWriter::xWriteSEISubBitstreamProperty(const SEISubBitstreamProperty &sei)
     593{
     594  WRITE_CODE( sei.m_activeVpsId, 4, "active_vps_id" );
     595  assert( sei.m_numAdditionalSubStreams >= 1 );
     596  WRITE_UVLC( sei.m_numAdditionalSubStreams - 1, "num_additional_sub_streams_minus1" );
     597
     598  for( Int i = 0; i < sei.m_numAdditionalSubStreams; i++ )
     599  {
     600    WRITE_CODE( sei.m_subBitstreamMode[i],       2, "sub_bitstream_mode[i]"           );
     601    WRITE_UVLC( sei.m_outputLayerSetIdxToVps[i],    "output_layer_set_idx_to_vps[i]"  );
     602    WRITE_CODE( sei.m_highestSublayerId[i],      3, "highest_sub_layer_id[i]"         );
     603    WRITE_CODE( sei.m_avgBitRate[i],            16, "avg_bit_rate[i]"                 );
     604    WRITE_CODE( sei.m_maxBitRate[i],            16, "max_bit_rate[i]"                 );
     605  }
     606  xWriteByteAlign();
     607}
     608#endif
     609
    581610Void SEIWriter::xWriteByteAlign()
    582611{
  • branches/HTM-10.0-dev0/source/Lib/TLibEncoder/SEIwrite.h

    r852 r862  
    6666  Void xWriteSEISOPDescription(const SEISOPDescription& sei);
    6767  Void xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps);
     68#if H_MV_HLS_7_SEI_P0204_26
     69  Void xWriteSEISubBitstreamProperty(const SEISubBitstreamProperty &sei);
     70#endif
    6871  Void xWriteByteAlign();
    6972};
  • branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncCfg.h

    r852 r862  
    347347
    348348  Bool      m_useStrongIntraSmoothing;                        ///< enable the use of strong intra smoothing (bi_linear interpolation) for 32x32 blocks when reference samples are flat.
     349#if H_MV_HLS_7_SEI_P0204_26
     350  Bool              m_subBistreamPropSEIEnabled;
     351  Int               m_numAdditionalSubStreams;
     352  std::vector<Int>  m_subBitstreamMode;
     353  std::vector<Int>  m_outputLayerSetIdxToVps;
     354  std::vector<Int>  m_highestSublayerId;
     355  std::vector<Int>  m_avgBitRate;
     356  std::vector<Int>  m_maxBitRate;
     357#endif
    349358
    350359#if H_MV
     
    779788  Void  setScalableNestingSEIEnabled(Int b)                { m_scalableNestingSEIEnabled = b; }
    780789  Int   getScalableNestingSEIEnabled()                     { return m_scalableNestingSEIEnabled; }
     790
     791#if H_MV_HLS_7_SEI_P0204_26
     792  Bool   getSubBitstreamPropSEIEnabled()        { return m_subBistreamPropSEIEnabled;}
     793  Void   setSubBitstreamPropSEIEnabled(Bool x)  { m_subBistreamPropSEIEnabled = x;}
     794
     795  Int    getNumAdditionalSubStreams()           { return m_numAdditionalSubStreams;}
     796  Void   setNumAdditionalSubStreams(Int x)      { m_numAdditionalSubStreams = x;}
     797
     798  std::vector<Int> const &getSubBitstreamMode()  { return m_subBitstreamMode;}
     799  Int   getSubBitstreamMode(Int idx)  { return m_subBitstreamMode[idx];}
     800  Void  setSubBitstreamMode(std::vector<Int> &x)  { m_subBitstreamMode = x;}
     801
     802  std::vector<Int> const &getOutputLayerSetIdxToVps()  { return m_outputLayerSetIdxToVps;}
     803  Int   getOutputLayerSetIdxToVps(Int idx)  { return m_outputLayerSetIdxToVps[idx];}
     804  Void  setOutputLayerSetIdxToVps(std::vector<Int> &x)  { m_outputLayerSetIdxToVps = x;}
     805
     806  std::vector<Int> const &getHighestSublayerId()  { return m_highestSublayerId;}
     807  Int   getHighestSublayerId(Int idx)  { return m_highestSublayerId[idx];}
     808  Void  setHighestSublayerId(std::vector<Int> &x)  { m_highestSublayerId = x;}
     809
     810  std::vector<Int> const &getAvgBitRate()  { return m_avgBitRate;}
     811  Int   getAvgBitRate(Int idx)  { return m_avgBitRate[idx];}
     812  Void  setAvgBitRate(std::vector<Int> &x)  { m_avgBitRate = x;}
     813
     814  std::vector<Int> const &getMaxBitRate()  { return m_maxBitRate;}
     815  Int   getMaxBitRate(Int idx)  { return m_maxBitRate[idx];}
     816  Void  setMaxBitRate(std::vector<Int> &x)  { m_maxBitRate = x;}
     817
     818#endif
    781819  Void      setUseWP               ( Bool b )    { m_useWeightedPred   = b;    }
    782820  Void      setWPBiPred            ( Bool b )    { m_useWeightedBiPred = b;    }
  • branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncGOP.cpp

    r854 r862  
    296296}
    297297
     298#if H_MV_HLS_7_SEI_P0204_26
     299SEISubBitstreamProperty *TEncGOP::xCreateSEISubBitstreamProperty( TComSPS *sps)
     300{
     301  SEISubBitstreamProperty *seiSubBitstreamProperty = new SEISubBitstreamProperty();
     302
     303  seiSubBitstreamProperty->m_activeVpsId = sps->getVPSId();
     304  /* These values can be determined by the encoder; for now we will use the input parameter */
     305  TEncTop *encTop = this->m_pcEncTop;
     306  seiSubBitstreamProperty->m_numAdditionalSubStreams = encTop->getNumAdditionalSubStreams();
     307  seiSubBitstreamProperty->m_subBitstreamMode        = encTop->getSubBitstreamMode();
     308  seiSubBitstreamProperty->m_outputLayerSetIdxToVps  = encTop->getOutputLayerSetIdxToVps();
     309  seiSubBitstreamProperty->m_highestSublayerId       = encTop->getHighestSublayerId();
     310  seiSubBitstreamProperty->m_avgBitRate              = encTop->getAvgBitRate();
     311  seiSubBitstreamProperty->m_maxBitRate              = encTop->getMaxBitRate();
     312
     313  return seiSubBitstreamProperty;
     314}
     315#endif
     316
    298317Void TEncGOP::xCreateLeadingSEIMessages (/*SEIMessages seiMessages,*/ AccessUnit &accessUnit, TComSPS *sps)
    299318{
     
    346365    delete sei;
    347366  }
     367#if H_MV_HLS_7_SEI_P0204_26
     368  if( m_pcCfg->getSubBitstreamPropSEIEnabled() )
     369  {
     370    SEISubBitstreamProperty *sei = xCreateSEISubBitstreamProperty ( sps );
     371
     372    nalu = NALUnit(NAL_UNIT_PREFIX_SEI);
     373    m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
     374    m_seiWriter.writeSEImessage(nalu.m_Bitstream, *sei, sps);
     375    writeRBSPTrailingBits(nalu.m_Bitstream);
     376    accessUnit.push_back(new NALUnitEBSP(nalu));
     377    delete sei;
     378  }
     379#endif
    348380}
    349381
  • branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncGOP.h

    r852 r862  
    212212
    213213  SEIToneMappingInfo*     xCreateSEIToneMappingInfo();
     214#if H_MV_HLS_7_SEI_P0204_26
     215  SEISubBitstreamProperty *xCreateSEISubBitstreamProperty( TComSPS *sps);
     216#endif
    214217
    215218  Void xCreateLeadingSEIMessages (/*SEIMessages seiMessages,*/ AccessUnit &accessUnit, TComSPS *sps);
Note: See TracChangeset for help on using the changeset viewer.