Changeset 862 in 3DVCSoftware for branches/HTM-10.0-dev0/source/Lib/TLibEncoder


Ignore:
Timestamp:
5 Mar 2014, 03:54:16 (11 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/Lib/TLibEncoder
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • 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.