Changeset 862 in 3DVCSoftware
- Timestamp:
- 5 Mar 2014, 03:54:16 (11 years ago)
- 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 737 737 ("SEISOPDescription", m_SOPDescriptionSEIEnabled, 0, "Control generation of SOP description SEI messages") 738 738 ("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 739 748 #if H_3D 740 749 ("CameraParameterFile,cpf", m_pchCameraParameterFile, (Char *) 0, "Camera Parameter File Name") … … 2244 2253 } 2245 2254 #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 2246 2274 #undef xConfirmPara 2247 2275 if (check_failed) -
branches/HTM-10.0-dev0/source/App/TAppEncoder/TAppEncCfg.h
r854 r862 440 440 Int m_log2MaxMvLengthHorizontal; ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units 441 441 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 443 451 #if H_3D 444 452 // Camera parameters -
branches/HTM-10.0-dev0/source/App/TAppEncoder/TAppEncTop.cpp
r854 r862 429 429 m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); 430 430 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 431 443 m_cTEncTop.setUniformSpacingIdr ( m_iUniformSpacingIdr ); 432 444 m_cTEncTop.setNumColumnsMinus1 ( m_iNumColumnsMinus1 ); -
branches/HTM-10.0-dev0/source/Lib/TLibCommon/SEI.h
r852 r862 72 72 SCALABLE_NESTING = 133, 73 73 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 74 77 }; 75 78 … … 363 366 }; 364 367 368 #if H_MV_HLS_7_SEI_P0204_26 369 class SEISubBitstreamProperty : public SEI 370 { 371 public: 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 365 387 typedef std::list<SEI*> SEIMessages; 366 388 -
branches/HTM-10.0-dev0/source/Lib/TLibCommon/TypeDef.h
r859 r862 339 339 // #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) 340 340 // #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: Adopt341 #define H_MV_HLS_7_SEI_P0204_26 1 // (SEI/P0204/sub-bitstream SEI) #26 Add sub-bitstream property SEI message. Decision: Adopt 342 342 #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, 343 343 … … 416 416 #define MAX_NUM_BITSTREAM_PARTITIONS 100 ///< Maximum value is actually not specified 417 417 #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 418 421 #else 419 422 #define MAX_NUM_LAYER_IDS 64 -
branches/HTM-10.0-dev0/source/Lib/TLibDecoder/SEIread.cpp
r852 r862 99 99 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n"); 100 100 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 101 106 default: 102 107 fprintf( g_hTrace, "=========== Unknown SEI message ===========\n"); … … 240 245 xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, sps); 241 246 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 242 253 default: 243 254 for (UInt i = 0; i < payloadSize; i++) … … 766 777 767 778 } 779 #if H_MV_HLS_7_SEI_P0204_26 780 Void 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 } 797 Void 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 768 806 769 807 Void SEIReader::xParseByteAlign() -
branches/HTM-10.0-dev0/source/Lib/TLibDecoder/SEIread.h
r852 r862 73 73 Void xParseSEISOPDescription (SEISOPDescription &sei, UInt payloadSize); 74 74 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 75 79 Void xParseByteAlign(); 76 80 }; -
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.