Changeset 1313 in 3DVCSoftware for trunk/source/Lib/TLibCommon/SEI.h
- Timestamp:
- 13 Aug 2015, 17:38:13 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/SEI.h
r1179 r1313 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2015, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 32 32 */ 33 33 34 #ifndef __SEI__ 35 #define __SEI__ 36 34 37 #pragma once 35 38 #include <list> … … 37 40 #include <cstring> 38 41 42 #include "CommonDef.h" 43 #include "libmd5/MD5.h" 39 44 //! \ingroup TLibCommon 40 45 //! \{ … … 72 77 SCALABLE_NESTING = 133, 73 78 REGION_REFRESH_INFO = 134, 74 #if H_MV 75 SUB_BITSTREAM_PROPERTY = 139, // Final PayloadType to be defined after finalization 79 NO_DISPLAY = 135, 80 TIME_CODE = 136, 81 MASTERING_DISPLAY_COLOUR_VOLUME = 137, 82 SEGM_RECT_FRAME_PACKING = 138, 83 TEMP_MOTION_CONSTRAINED_TILE_SETS = 139, 84 CHROMA_SAMPLING_FILTER_HINT = 140, 85 KNEE_FUNCTION_INFO = 141 86 #if NH_MV 87 ,SUB_BITSTREAM_PROPERTY = 164 76 88 #endif 89 77 90 }; 78 91 79 92 SEI() {} 80 93 virtual ~SEI() {} 81 94 95 static const Char *getSEIMessageString(SEI::PayloadType payloadType); 96 82 97 virtual PayloadType payloadType() const = 0; 83 98 }; 99 100 static const UInt ISO_IEC_11578_LEN=16; 84 101 85 102 class SEIuserDataUnregistered : public SEI … … 97 114 } 98 115 99 UChar uuid_iso_iec_11578[ 16];100 UInt userDataLength;116 UChar uuid_iso_iec_11578[ISO_IEC_11578_LEN]; 117 UInt userDataLength; 101 118 UChar *userData; 102 119 }; … … 109 126 SEIDecodedPictureHash() {} 110 127 virtual ~SEIDecodedPictureHash() {} 111 128 112 129 enum Method 113 130 { … … 118 135 } method; 119 136 120 UChar digest[3][16];121 }; 122 123 class SEIActiveParameterSets : public SEI 137 TComPictureHash m_pictureHash; 138 }; 139 140 class SEIActiveParameterSets : public SEI 124 141 { 125 142 public: 126 143 PayloadType payloadType() const { return ACTIVE_PARAMETER_SETS; } 127 144 128 SEIActiveParameterSets() 145 SEIActiveParameterSets() 129 146 : activeVPSId (0) 130 147 , m_selfContainedCvsFlag (false) … … 134 151 virtual ~SEIActiveParameterSets() {} 135 152 136 Int activeVPSId; 153 Int activeVPSId; 137 154 Bool m_selfContainedCvsFlag; 138 155 Bool m_noParameterSetUpdateFlag; … … 145 162 public: 146 163 PayloadType payloadType() const { return BUFFERING_PERIOD; } 164 void copyTo (SEIBufferingPeriod& target); 147 165 148 166 SEIBufferingPeriod() … … 174 192 public: 175 193 PayloadType payloadType() const { return PICTURE_TIMING; } 194 void copyTo (SEIPictureTiming& target); 176 195 177 196 SEIPictureTiming() … … 180 199 , m_duplicateFlag (false) 181 200 , m_picDpbOutputDuDelay (0) 182 , m_numNalusInDuMinus1 (NULL)183 , m_duCpbRemovalDelayMinus1 (NULL)184 201 {} 185 202 virtual ~SEIPictureTiming() 186 203 { 187 if( m_numNalusInDuMinus1 != NULL )188 {189 delete m_numNalusInDuMinus1;190 }191 if( m_duCpbRemovalDelayMinus1 != NULL )192 {193 delete m_duCpbRemovalDelayMinus1;194 }195 204 } 196 205 … … 205 214 Bool m_duCommonCpbRemovalDelayFlag; 206 215 UInt m_duCommonCpbRemovalDelayMinus1; 207 UInt*m_numNalusInDuMinus1;208 UInt*m_duCpbRemovalDelayMinus1;216 std::vector<UInt> m_numNalusInDuMinus1; 217 std::vector<UInt> m_duCpbRemovalDelayMinus1; 209 218 }; 210 219 … … 239 248 Bool m_brokenLinkFlag; 240 249 }; 250 241 251 class SEIFramePacking : public SEI 242 252 { … … 267 277 }; 268 278 279 class SEISegmentedRectFramePacking : public SEI 280 { 281 public: 282 PayloadType payloadType() const { return SEGM_RECT_FRAME_PACKING; } 283 284 SEISegmentedRectFramePacking() {} 285 virtual ~SEISegmentedRectFramePacking() {} 286 287 Bool m_arrangementCancelFlag; 288 Int m_contentInterpretationType; 289 Bool m_arrangementPersistenceFlag; 290 }; 291 269 292 class SEIDisplayOrientation : public SEI 270 293 { … … 314 337 315 338 Bool m_gdrForegroundFlag; 339 }; 340 341 class SEINoDisplay : public SEI 342 { 343 public: 344 PayloadType payloadType() const { return NO_DISPLAY; } 345 346 SEINoDisplay() 347 : m_noDisplay(false) 348 {} 349 virtual ~SEINoDisplay() {} 350 351 Bool m_noDisplay; 316 352 }; 317 353 … … 358 394 Int m_exposureIndexIdc; 359 395 Int m_exposureIndexValue; 360 Intm_exposureCompensationValueSignFlag;396 Bool m_exposureCompensationValueSignFlag; 361 397 Int m_exposureCompensationValueNumerator; 362 398 Int m_exposureCompensationValueDenomIdc; … … 368 404 }; 369 405 370 #if H_MV 406 class SEIKneeFunctionInfo : public SEI 407 { 408 public: 409 PayloadType payloadType() const { return KNEE_FUNCTION_INFO; } 410 SEIKneeFunctionInfo() {} 411 virtual ~SEIKneeFunctionInfo() {} 412 413 Int m_kneeId; 414 Bool m_kneeCancelFlag; 415 Bool m_kneePersistenceFlag; 416 Int m_kneeInputDrange; 417 Int m_kneeInputDispLuminance; 418 Int m_kneeOutputDrange; 419 Int m_kneeOutputDispLuminance; 420 Int m_kneeNumKneePointsMinus1; 421 std::vector<Int> m_kneeInputKneePoint; 422 std::vector<Int> m_kneeOutputKneePoint; 423 }; 424 425 class SEIChromaSamplingFilterHint : public SEI 426 { 427 public: 428 PayloadType payloadType() const {return CHROMA_SAMPLING_FILTER_HINT;} 429 SEIChromaSamplingFilterHint() {} 430 virtual ~SEIChromaSamplingFilterHint() { 431 if(m_verChromaFilterIdc == 1) 432 { 433 for(Int i = 0; i < m_numVerticalFilters; i ++) 434 { 435 free(m_verFilterCoeff[i]); 436 } 437 free(m_verFilterCoeff); 438 free(m_verTapLengthMinus1); 439 } 440 if(m_horChromaFilterIdc == 1) 441 { 442 for(Int i = 0; i < m_numHorizontalFilters; i ++) 443 { 444 free(m_horFilterCoeff[i]); 445 } 446 free(m_horFilterCoeff); 447 free(m_horTapLengthMinus1); 448 } 449 } 450 451 Int m_verChromaFilterIdc; 452 Int m_horChromaFilterIdc; 453 Bool m_verFilteringProcessFlag; 454 Int m_targetFormatIdc; 455 Bool m_perfectReconstructionFlag; 456 Int m_numVerticalFilters; 457 Int* m_verTapLengthMinus1; 458 Int** m_verFilterCoeff; 459 Int m_numHorizontalFilters; 460 Int* m_horTapLengthMinus1; 461 Int** m_horFilterCoeff; 462 }; 463 464 class SEIMasteringDisplayColourVolume : public SEI 465 { 466 public: 467 PayloadType payloadType() const { return MASTERING_DISPLAY_COLOUR_VOLUME; } 468 SEIMasteringDisplayColourVolume() {} 469 virtual ~SEIMasteringDisplayColourVolume(){} 470 471 TComSEIMasteringDisplay values; 472 }; 473 474 #if NH_MV 371 475 class SEISubBitstreamProperty : public SEI 372 476 { … … 392 496 SEIMessages getSeisByType(SEIMessages &seiList, SEI::PayloadType seiType); 393 497 394 /// remove a selection of SEI messages by payload type from the original list and return them in a new list. 498 /// remove a selection of SEI messages by payload type from the original list and return them in a new list. 395 499 SEIMessages extractSeisByType(SEIMessages &seiList, SEI::PayloadType seiType); 396 500 … … 404 508 405 509 SEIScalableNesting() {} 510 406 511 virtual ~SEIScalableNesting() 407 512 { 408 if (!m_callerOwnsSEIs) 409 { 410 deleteSEIs(m_nestedSEIs); 411 } 513 deleteSEIs(m_nestedSEIs); 412 514 } 413 515 … … 422 524 UInt m_nestingNoOpMaxTemporalIdPlus1; //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0 423 525 UInt m_nestingNumLayersMinus1; //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0 424 UChar m_nestingLayerId[MAX_NESTING_NUM_LAYER]; //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0. This can e.g. be a static array of 64 unsigned char values 425 426 Bool m_callerOwnsSEIs; 526 UChar m_nestingLayerId[MAX_NESTING_NUM_LAYER]; //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0. This can e.g. be a static array of 64 UChar values 527 427 528 SEIMessages m_nestedSEIs; 428 529 }; 429 530 531 class SEITimeCode : public SEI 532 { 533 public: 534 PayloadType payloadType() const { return TIME_CODE; } 535 SEITimeCode() {} 536 virtual ~SEITimeCode(){} 537 538 UInt numClockTs; 539 TComSEITimeSet timeSetArray[MAX_TIMECODE_SEI_SETS]; 540 }; 541 542 //definition according to P1005_v1; 543 class SEITempMotionConstrainedTileSets: public SEI 544 { 545 struct TileSetData 546 { 547 protected: 548 std::vector<Int> m_top_left_tile_index; //[tileSetIdx][tileIdx]; 549 std::vector<Int> m_bottom_right_tile_index; 550 551 public: 552 Int m_mcts_id; 553 Bool m_display_tile_set_flag; 554 Int m_num_tile_rects_in_set; //_minus1; 555 Bool m_exact_sample_value_match_flag; 556 Bool m_mcts_tier_level_idc_present_flag; 557 Bool m_mcts_tier_flag; 558 Int m_mcts_level_idc; 559 560 Void setNumberOfTileRects(const Int number) 561 { 562 m_top_left_tile_index .resize(number); 563 m_bottom_right_tile_index.resize(number); 564 } 565 566 Int getNumberOfTileRects() const 567 { 568 assert(m_top_left_tile_index.size() == m_bottom_right_tile_index.size()); 569 return Int(m_top_left_tile_index.size()); 570 } 571 572 Int &topLeftTileIndex (const Int tileRectIndex) { return m_top_left_tile_index [tileRectIndex]; } 573 Int &bottomRightTileIndex(const Int tileRectIndex) { return m_bottom_right_tile_index[tileRectIndex]; } 574 const Int &topLeftTileIndex (const Int tileRectIndex) const { return m_top_left_tile_index [tileRectIndex]; } 575 const Int &bottomRightTileIndex(const Int tileRectIndex) const { return m_bottom_right_tile_index[tileRectIndex]; } 576 }; 577 578 protected: 579 std::vector<TileSetData> m_tile_set_data; 580 581 public: 582 583 Bool m_mc_all_tiles_exact_sample_value_match_flag; 584 Bool m_each_tile_one_tile_set_flag; 585 Bool m_limited_tile_set_display_flag; 586 Bool m_max_mcs_tier_level_idc_present_flag; 587 Bool m_max_mcts_tier_flag; 588 Int m_max_mcts_level_idc; 589 590 PayloadType payloadType() const { return TEMP_MOTION_CONSTRAINED_TILE_SETS; } 591 592 Void setNumberOfTileSets(const Int number) { m_tile_set_data.resize(number); } 593 Int getNumberOfTileSets() const { return Int(m_tile_set_data.size()); } 594 595 TileSetData &tileSetData (const Int index) { return m_tile_set_data[index]; } 596 const TileSetData &tileSetData (const Int index) const { return m_tile_set_data[index]; } 597 598 }; 599 600 #endif 601 430 602 //! \}
Note: See TracChangeset for help on using the changeset viewer.