Changeset 583 in SHVCSoftware for branches/SHM-5.0-dev/source
- Timestamp:
- 1 Feb 2014, 00:19:46 (11 years ago)
- 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 41 41 //Table D-7 Meaning of camera iso sensitivity indicator and exposure index rating indicator 42 42 Int 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 45 SEISubBitstreamProperty::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 43 56 44 57 SEIMessages getSeisByType(SEIMessages &seiList, SEI::PayloadType seiType) -
branches/SHM-5.0-dev/source/Lib/TLibCommon/SEI.h
r567 r583 78 78 INTER_LAYER_CONSTRAINED_TILE_SETS = 138 79 79 #endif 80 #if SUB_BITSTREAM_PROPERTY_SEI 81 ,SUB_BITSTREAM_PROPERTY = 139 // Final PayloadType to be defined after finalization 82 #endif 80 83 }; 81 84 … … 407 410 #endif 408 411 412 #if SUB_BITSTREAM_PROPERTY_SEI 413 class SEISubBitstreamProperty : public SEI 414 { 415 public: 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 409 430 410 431 typedef std::list<SEI*> SEIMessages; -
branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h
r582 r583 58 58 #define CHANGE_NUMSUBDPB_IDX 1 ///< Change index of NumSubDpb from output layer set to layer set, to be more aligned with the Spec 59 59 #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 60 61 #define O0109_O0199_FLAGS_TO_VUI 1 ///< JCTVC-O0109, O0199: move single_layer_for_non_irap_flag and higher_layer_flag to vps_vui 61 62 #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 … … 250 251 #define MAX_VPS_OP_SETS_PLUS1 1024 251 252 #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 252 257 #endif 253 258 -
branches/SHM-5.0-dev/source/Lib/TLibDecoder/SEIread.cpp
r567 r583 106 106 break; 107 107 #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 108 113 case SEI::SCALABLE_NESTING: 109 114 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n"); … … 276 281 xParseSEIInterLayerConstrainedTileSets((SEIInterLayerConstrainedTileSets&) *sei, payloadSize); 277 282 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; 278 289 #endif 279 290 case SEI::SCALABLE_NESTING: … … 829 840 } 830 841 #endif 831 842 #if SUB_BITSTREAM_PROPERTY_SEI 843 Void 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 832 860 #if LAYERS_NOT_PRESENT_SEI 833 861 Void 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 83 83 Void xParseSEIInterLayerConstrainedTileSets (SEIInterLayerConstrainedTileSets &sei, UInt payloadSize); 84 84 #endif 85 #if SUB_BITSTREAM_PROPERTY_SEI 86 Void xParseSEISubBitstreamProperty (SEISubBitstreamProperty &sei); 87 #endif 85 88 #if LAYERS_NOT_PRESENT_SEI 86 89 Void xParseSEILayersNotPresent (SEILayersNotPresent &sei, UInt payloadSize, TComVPS *vps); -
branches/SHM-5.0-dev/source/Lib/TLibEncoder/SEIwrite.cpp
r567 r583 100 100 break; 101 101 #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 102 107 case SEI::SCALABLE_NESTING: 103 108 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n"); … … 162 167 xWriteSEIInterLayerConstrainedTileSets(*static_cast<const SEIInterLayerConstrainedTileSets*>(&sei)); 163 168 break; 169 #endif 170 #if SUB_BITSTREAM_PROPERTY_SEI 171 case SEI::SUB_BITSTREAM_PROPERTY: 172 xWriteSEISubBitstreamProperty(*static_cast<const SEISubBitstreamProperty*>(&sei)); 173 break; 164 174 #endif 165 175 case SEI::SCALABLE_NESTING: … … 606 616 } 607 617 #endif 608 618 #if SUB_BITSTREAM_PROPERTY_SEI 619 Void 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 609 636 Void SEIWriter::xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps) 610 637 { -
branches/SHM-5.0-dev/source/Lib/TLibEncoder/SEIwrite.h
r567 r583 71 71 Void xWriteSEIInterLayerConstrainedTileSets(const SEIInterLayerConstrainedTileSets& sei); 72 72 #endif 73 #if SUB_BITSTREAM_PROPERTY_SEI 74 Void xWriteSEISubBitstreamProperty(const SEISubBitstreamProperty &sei); 75 #endif 73 76 Void xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps); 74 77 Void xWriteByteAlign();
Note: See TracChangeset for help on using the changeset viewer.