Changeset 862 in 3DVCSoftware for branches/HTM-10.0-dev0/source/Lib/TLibEncoder
- Timestamp:
- 5 Mar 2014, 03:54:16 (11 years ago)
- 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 93 93 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n"); 94 94 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 95 100 default: 96 101 fprintf( g_hTrace, "=========== Unknown SEI message ===========\n"); … … 146 151 xWriteSEIScalableNesting(bs, *static_cast<const SEIScalableNesting*>(&sei), sps); 147 152 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 148 158 default: 149 159 assert(!"Unhandled SEI message"); … … 579 589 } 580 590 591 #if H_MV_HLS_7_SEI_P0204_26 592 Void 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 581 610 Void SEIWriter::xWriteByteAlign() 582 611 { -
branches/HTM-10.0-dev0/source/Lib/TLibEncoder/SEIwrite.h
r852 r862 66 66 Void xWriteSEISOPDescription(const SEISOPDescription& sei); 67 67 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 68 71 Void xWriteByteAlign(); 69 72 }; -
branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncCfg.h
r852 r862 347 347 348 348 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 349 358 350 359 #if H_MV … … 779 788 Void setScalableNestingSEIEnabled(Int b) { m_scalableNestingSEIEnabled = b; } 780 789 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 781 819 Void setUseWP ( Bool b ) { m_useWeightedPred = b; } 782 820 Void setWPBiPred ( Bool b ) { m_useWeightedBiPred = b; } -
branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
r854 r862 296 296 } 297 297 298 #if H_MV_HLS_7_SEI_P0204_26 299 SEISubBitstreamProperty *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 298 317 Void TEncGOP::xCreateLeadingSEIMessages (/*SEIMessages seiMessages,*/ AccessUnit &accessUnit, TComSPS *sps) 299 318 { … … 346 365 delete sei; 347 366 } 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 348 380 } 349 381 -
branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncGOP.h
r852 r862 212 212 213 213 SEIToneMappingInfo* xCreateSEIToneMappingInfo(); 214 #if H_MV_HLS_7_SEI_P0204_26 215 SEISubBitstreamProperty *xCreateSEISubBitstreamProperty( TComSPS *sps); 216 #endif 214 217 215 218 Void xCreateLeadingSEIMessages (/*SEIMessages seiMessages,*/ AccessUnit &accessUnit, TComSPS *sps);
Note: See TracChangeset for help on using the changeset viewer.