[5] | 1 | /* The copyright in this software is being made available under the BSD |
---|
| 2 | * License, included below. This software may be subject to other third party |
---|
| 3 | * and contributor rights, including patent rights, and no such rights are |
---|
| 4 | * granted under this license. |
---|
| 5 | * |
---|
[1313] | 6 | * Copyright (c) 2010-2015, ITU/ISO/IEC |
---|
[5] | 7 | * All rights reserved. |
---|
| 8 | * |
---|
| 9 | * Redistribution and use in source and binary forms, with or without |
---|
| 10 | * modification, are permitted provided that the following conditions are met: |
---|
| 11 | * |
---|
| 12 | * * Redistributions of source code must retain the above copyright notice, |
---|
| 13 | * this list of conditions and the following disclaimer. |
---|
| 14 | * * Redistributions in binary form must reproduce the above copyright notice, |
---|
| 15 | * this list of conditions and the following disclaimer in the documentation |
---|
| 16 | * and/or other materials provided with the distribution. |
---|
[56] | 17 | * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may |
---|
[5] | 18 | * be used to endorse or promote products derived from this software without |
---|
| 19 | * specific prior written permission. |
---|
| 20 | * |
---|
| 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
---|
| 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
| 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
| 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS |
---|
| 25 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
---|
| 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
---|
| 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
---|
| 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
---|
| 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
---|
| 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
---|
| 31 | * THE POSSIBILITY OF SUCH DAMAGE. |
---|
| 32 | */ |
---|
[2] | 33 | |
---|
[1313] | 34 | #ifndef __SEI__ |
---|
| 35 | #define __SEI__ |
---|
| 36 | |
---|
[56] | 37 | #pragma once |
---|
[608] | 38 | #include <list> |
---|
| 39 | #include <vector> |
---|
| 40 | #include <cstring> |
---|
[2] | 41 | |
---|
[1313] | 42 | #include "CommonDef.h" |
---|
| 43 | #include "libmd5/MD5.h" |
---|
[56] | 44 | //! \ingroup TLibCommon |
---|
| 45 | //! \{ |
---|
[608] | 46 | class TComSPS; |
---|
[5] | 47 | |
---|
[2] | 48 | /** |
---|
| 49 | * Abstract class representing an SEI message with lightweight RTTI. |
---|
| 50 | */ |
---|
| 51 | class SEI |
---|
| 52 | { |
---|
| 53 | public: |
---|
[56] | 54 | enum PayloadType |
---|
| 55 | { |
---|
[608] | 56 | BUFFERING_PERIOD = 0, |
---|
| 57 | PICTURE_TIMING = 1, |
---|
| 58 | PAN_SCAN_RECT = 2, |
---|
| 59 | FILLER_PAYLOAD = 3, |
---|
| 60 | USER_DATA_REGISTERED_ITU_T_T35 = 4, |
---|
| 61 | USER_DATA_UNREGISTERED = 5, |
---|
| 62 | RECOVERY_POINT = 6, |
---|
| 63 | SCENE_INFO = 9, |
---|
| 64 | FULL_FRAME_SNAPSHOT = 15, |
---|
| 65 | PROGRESSIVE_REFINEMENT_SEGMENT_START = 16, |
---|
| 66 | PROGRESSIVE_REFINEMENT_SEGMENT_END = 17, |
---|
| 67 | FILM_GRAIN_CHARACTERISTICS = 19, |
---|
| 68 | POST_FILTER_HINT = 22, |
---|
| 69 | TONE_MAPPING_INFO = 23, |
---|
| 70 | FRAME_PACKING = 45, |
---|
| 71 | DISPLAY_ORIENTATION = 47, |
---|
| 72 | SOP_DESCRIPTION = 128, |
---|
| 73 | ACTIVE_PARAMETER_SETS = 129, |
---|
| 74 | DECODING_UNIT_INFO = 130, |
---|
| 75 | TEMPORAL_LEVEL0_INDEX = 131, |
---|
| 76 | DECODED_PICTURE_HASH = 132, |
---|
| 77 | SCALABLE_NESTING = 133, |
---|
| 78 | REGION_REFRESH_INFO = 134, |
---|
[1313] | 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 |
---|
[872] | 88 | #endif |
---|
[1313] | 89 | |
---|
[2] | 90 | }; |
---|
[1313] | 91 | |
---|
[2] | 92 | SEI() {} |
---|
| 93 | virtual ~SEI() {} |
---|
[1313] | 94 | |
---|
| 95 | static const Char *getSEIMessageString(SEI::PayloadType payloadType); |
---|
| 96 | |
---|
[2] | 97 | virtual PayloadType payloadType() const = 0; |
---|
| 98 | }; |
---|
| 99 | |
---|
[1313] | 100 | static const UInt ISO_IEC_11578_LEN=16; |
---|
| 101 | |
---|
[2] | 102 | class SEIuserDataUnregistered : public SEI |
---|
| 103 | { |
---|
| 104 | public: |
---|
| 105 | PayloadType payloadType() const { return USER_DATA_UNREGISTERED; } |
---|
| 106 | |
---|
| 107 | SEIuserDataUnregistered() |
---|
| 108 | : userData(0) |
---|
| 109 | {} |
---|
| 110 | |
---|
| 111 | virtual ~SEIuserDataUnregistered() |
---|
| 112 | { |
---|
| 113 | delete userData; |
---|
| 114 | } |
---|
| 115 | |
---|
[1313] | 116 | UChar uuid_iso_iec_11578[ISO_IEC_11578_LEN]; |
---|
| 117 | UInt userDataLength; |
---|
[608] | 118 | UChar *userData; |
---|
[2] | 119 | }; |
---|
| 120 | |
---|
[608] | 121 | class SEIDecodedPictureHash : public SEI |
---|
[2] | 122 | { |
---|
| 123 | public: |
---|
[608] | 124 | PayloadType payloadType() const { return DECODED_PICTURE_HASH; } |
---|
[2] | 125 | |
---|
[608] | 126 | SEIDecodedPictureHash() {} |
---|
| 127 | virtual ~SEIDecodedPictureHash() {} |
---|
[1313] | 128 | |
---|
[56] | 129 | enum Method |
---|
| 130 | { |
---|
[2] | 131 | MD5, |
---|
[608] | 132 | CRC, |
---|
| 133 | CHECKSUM, |
---|
[2] | 134 | RESERVED, |
---|
| 135 | } method; |
---|
| 136 | |
---|
[1313] | 137 | TComPictureHash m_pictureHash; |
---|
[2] | 138 | }; |
---|
| 139 | |
---|
[1313] | 140 | class SEIActiveParameterSets : public SEI |
---|
[2] | 141 | { |
---|
| 142 | public: |
---|
[608] | 143 | PayloadType payloadType() const { return ACTIVE_PARAMETER_SETS; } |
---|
| 144 | |
---|
[1313] | 145 | SEIActiveParameterSets() |
---|
[608] | 146 | : activeVPSId (0) |
---|
[964] | 147 | , m_selfContainedCvsFlag (false) |
---|
| 148 | , m_noParameterSetUpdateFlag (false) |
---|
[608] | 149 | , numSpsIdsMinus1 (0) |
---|
| 150 | {} |
---|
| 151 | virtual ~SEIActiveParameterSets() {} |
---|
| 152 | |
---|
[1313] | 153 | Int activeVPSId; |
---|
[964] | 154 | Bool m_selfContainedCvsFlag; |
---|
| 155 | Bool m_noParameterSetUpdateFlag; |
---|
[608] | 156 | Int numSpsIdsMinus1; |
---|
[964] | 157 | std::vector<Int> activeSeqParameterSetId; |
---|
[608] | 158 | }; |
---|
| 159 | |
---|
| 160 | class SEIBufferingPeriod : public SEI |
---|
| 161 | { |
---|
| 162 | public: |
---|
| 163 | PayloadType payloadType() const { return BUFFERING_PERIOD; } |
---|
[1313] | 164 | void copyTo (SEIBufferingPeriod& target); |
---|
[608] | 165 | |
---|
| 166 | SEIBufferingPeriod() |
---|
| 167 | : m_bpSeqParameterSetId (0) |
---|
| 168 | , m_rapCpbParamsPresentFlag (false) |
---|
| 169 | , m_cpbDelayOffset (0) |
---|
| 170 | , m_dpbDelayOffset (0) |
---|
| 171 | { |
---|
| 172 | ::memset(m_initialCpbRemovalDelay, 0, sizeof(m_initialCpbRemovalDelay)); |
---|
| 173 | ::memset(m_initialCpbRemovalDelayOffset, 0, sizeof(m_initialCpbRemovalDelayOffset)); |
---|
| 174 | ::memset(m_initialAltCpbRemovalDelay, 0, sizeof(m_initialAltCpbRemovalDelay)); |
---|
| 175 | ::memset(m_initialAltCpbRemovalDelayOffset, 0, sizeof(m_initialAltCpbRemovalDelayOffset)); |
---|
| 176 | } |
---|
| 177 | virtual ~SEIBufferingPeriod() {} |
---|
| 178 | |
---|
| 179 | UInt m_bpSeqParameterSetId; |
---|
| 180 | Bool m_rapCpbParamsPresentFlag; |
---|
[1084] | 181 | UInt m_cpbDelayOffset; |
---|
| 182 | UInt m_dpbDelayOffset; |
---|
[608] | 183 | UInt m_initialCpbRemovalDelay [MAX_CPB_CNT][2]; |
---|
| 184 | UInt m_initialCpbRemovalDelayOffset [MAX_CPB_CNT][2]; |
---|
| 185 | UInt m_initialAltCpbRemovalDelay [MAX_CPB_CNT][2]; |
---|
| 186 | UInt m_initialAltCpbRemovalDelayOffset[MAX_CPB_CNT][2]; |
---|
| 187 | Bool m_concatenationFlag; |
---|
| 188 | UInt m_auCpbRemovalDelayDelta; |
---|
| 189 | }; |
---|
| 190 | class SEIPictureTiming : public SEI |
---|
| 191 | { |
---|
| 192 | public: |
---|
| 193 | PayloadType payloadType() const { return PICTURE_TIMING; } |
---|
[1313] | 194 | void copyTo (SEIPictureTiming& target); |
---|
[608] | 195 | |
---|
| 196 | SEIPictureTiming() |
---|
| 197 | : m_picStruct (0) |
---|
| 198 | , m_sourceScanType (0) |
---|
| 199 | , m_duplicateFlag (false) |
---|
| 200 | , m_picDpbOutputDuDelay (0) |
---|
| 201 | {} |
---|
| 202 | virtual ~SEIPictureTiming() |
---|
| 203 | { |
---|
| 204 | } |
---|
| 205 | |
---|
| 206 | UInt m_picStruct; |
---|
| 207 | UInt m_sourceScanType; |
---|
| 208 | Bool m_duplicateFlag; |
---|
| 209 | |
---|
| 210 | UInt m_auCpbRemovalDelay; |
---|
| 211 | UInt m_picDpbOutputDelay; |
---|
| 212 | UInt m_picDpbOutputDuDelay; |
---|
| 213 | UInt m_numDecodingUnitsMinus1; |
---|
| 214 | Bool m_duCommonCpbRemovalDelayFlag; |
---|
| 215 | UInt m_duCommonCpbRemovalDelayMinus1; |
---|
[1313] | 216 | std::vector<UInt> m_numNalusInDuMinus1; |
---|
| 217 | std::vector<UInt> m_duCpbRemovalDelayMinus1; |
---|
[608] | 218 | }; |
---|
| 219 | |
---|
| 220 | class SEIDecodingUnitInfo : public SEI |
---|
| 221 | { |
---|
| 222 | public: |
---|
| 223 | PayloadType payloadType() const { return DECODING_UNIT_INFO; } |
---|
| 224 | |
---|
| 225 | SEIDecodingUnitInfo() |
---|
| 226 | : m_decodingUnitIdx(0) |
---|
| 227 | , m_duSptCpbRemovalDelay(0) |
---|
| 228 | , m_dpbOutputDuDelayPresentFlag(false) |
---|
| 229 | , m_picSptDpbOutputDuDelay(0) |
---|
| 230 | {} |
---|
| 231 | virtual ~SEIDecodingUnitInfo() {} |
---|
| 232 | Int m_decodingUnitIdx; |
---|
| 233 | Int m_duSptCpbRemovalDelay; |
---|
| 234 | Bool m_dpbOutputDuDelayPresentFlag; |
---|
| 235 | Int m_picSptDpbOutputDuDelay; |
---|
| 236 | }; |
---|
| 237 | |
---|
| 238 | class SEIRecoveryPoint : public SEI |
---|
| 239 | { |
---|
| 240 | public: |
---|
| 241 | PayloadType payloadType() const { return RECOVERY_POINT; } |
---|
| 242 | |
---|
| 243 | SEIRecoveryPoint() {} |
---|
| 244 | virtual ~SEIRecoveryPoint() {} |
---|
| 245 | |
---|
| 246 | Int m_recoveryPocCnt; |
---|
| 247 | Bool m_exactMatchingFlag; |
---|
| 248 | Bool m_brokenLinkFlag; |
---|
| 249 | }; |
---|
[1313] | 250 | |
---|
[608] | 251 | class SEIFramePacking : public SEI |
---|
| 252 | { |
---|
| 253 | public: |
---|
| 254 | PayloadType payloadType() const { return FRAME_PACKING; } |
---|
| 255 | |
---|
| 256 | SEIFramePacking() {} |
---|
| 257 | virtual ~SEIFramePacking() {} |
---|
| 258 | |
---|
| 259 | Int m_arrangementId; |
---|
| 260 | Bool m_arrangementCancelFlag; |
---|
| 261 | Int m_arrangementType; |
---|
| 262 | Bool m_quincunxSamplingFlag; |
---|
| 263 | Int m_contentInterpretationType; |
---|
| 264 | Bool m_spatialFlippingFlag; |
---|
| 265 | Bool m_frame0FlippedFlag; |
---|
| 266 | Bool m_fieldViewsFlag; |
---|
| 267 | Bool m_currentFrameIsFrame0Flag; |
---|
| 268 | Bool m_frame0SelfContainedFlag; |
---|
| 269 | Bool m_frame1SelfContainedFlag; |
---|
| 270 | Int m_frame0GridPositionX; |
---|
| 271 | Int m_frame0GridPositionY; |
---|
| 272 | Int m_frame1GridPositionX; |
---|
| 273 | Int m_frame1GridPositionY; |
---|
| 274 | Int m_arrangementReservedByte; |
---|
| 275 | Bool m_arrangementPersistenceFlag; |
---|
| 276 | Bool m_upsampledAspectRatio; |
---|
| 277 | }; |
---|
| 278 | |
---|
[1313] | 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 | |
---|
[608] | 292 | class SEIDisplayOrientation : public SEI |
---|
| 293 | { |
---|
| 294 | public: |
---|
| 295 | PayloadType payloadType() const { return DISPLAY_ORIENTATION; } |
---|
| 296 | |
---|
| 297 | SEIDisplayOrientation() |
---|
| 298 | : cancelFlag(true) |
---|
| 299 | , persistenceFlag(0) |
---|
| 300 | , extensionFlag(false) |
---|
[2] | 301 | {} |
---|
[608] | 302 | virtual ~SEIDisplayOrientation() {} |
---|
[2] | 303 | |
---|
[608] | 304 | Bool cancelFlag; |
---|
| 305 | Bool horFlip; |
---|
| 306 | Bool verFlip; |
---|
| 307 | |
---|
| 308 | UInt anticlockwiseRotation; |
---|
| 309 | Bool persistenceFlag; |
---|
| 310 | Bool extensionFlag; |
---|
| 311 | }; |
---|
| 312 | |
---|
| 313 | class SEITemporalLevel0Index : public SEI |
---|
| 314 | { |
---|
| 315 | public: |
---|
| 316 | PayloadType payloadType() const { return TEMPORAL_LEVEL0_INDEX; } |
---|
| 317 | |
---|
| 318 | SEITemporalLevel0Index() |
---|
| 319 | : tl0Idx(0) |
---|
| 320 | , rapIdx(0) |
---|
| 321 | {} |
---|
| 322 | virtual ~SEITemporalLevel0Index() {} |
---|
| 323 | |
---|
| 324 | UInt tl0Idx; |
---|
| 325 | UInt rapIdx; |
---|
| 326 | }; |
---|
| 327 | |
---|
| 328 | class SEIGradualDecodingRefreshInfo : public SEI |
---|
| 329 | { |
---|
| 330 | public: |
---|
| 331 | PayloadType payloadType() const { return REGION_REFRESH_INFO; } |
---|
| 332 | |
---|
| 333 | SEIGradualDecodingRefreshInfo() |
---|
| 334 | : m_gdrForegroundFlag(0) |
---|
| 335 | {} |
---|
| 336 | virtual ~SEIGradualDecodingRefreshInfo() {} |
---|
| 337 | |
---|
| 338 | Bool m_gdrForegroundFlag; |
---|
| 339 | }; |
---|
| 340 | |
---|
[1313] | 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; |
---|
| 352 | }; |
---|
| 353 | |
---|
[608] | 354 | class SEISOPDescription : public SEI |
---|
| 355 | { |
---|
| 356 | public: |
---|
| 357 | PayloadType payloadType() const { return SOP_DESCRIPTION; } |
---|
| 358 | |
---|
| 359 | SEISOPDescription() {} |
---|
| 360 | virtual ~SEISOPDescription() {} |
---|
| 361 | |
---|
| 362 | UInt m_sopSeqParameterSetId; |
---|
| 363 | UInt m_numPicsInSopMinus1; |
---|
| 364 | |
---|
| 365 | UInt m_sopDescVclNaluType[MAX_NUM_PICS_IN_SOP]; |
---|
| 366 | UInt m_sopDescTemporalId[MAX_NUM_PICS_IN_SOP]; |
---|
| 367 | UInt m_sopDescStRpsIdx[MAX_NUM_PICS_IN_SOP]; |
---|
| 368 | Int m_sopDescPocDelta[MAX_NUM_PICS_IN_SOP]; |
---|
| 369 | }; |
---|
| 370 | |
---|
| 371 | class SEIToneMappingInfo : public SEI |
---|
| 372 | { |
---|
| 373 | public: |
---|
| 374 | PayloadType payloadType() const { return TONE_MAPPING_INFO; } |
---|
| 375 | SEIToneMappingInfo() {} |
---|
| 376 | virtual ~SEIToneMappingInfo() {} |
---|
| 377 | |
---|
| 378 | Int m_toneMapId; |
---|
| 379 | Bool m_toneMapCancelFlag; |
---|
| 380 | Bool m_toneMapPersistenceFlag; |
---|
| 381 | Int m_codedDataBitDepth; |
---|
| 382 | Int m_targetBitDepth; |
---|
| 383 | Int m_modelId; |
---|
| 384 | Int m_minValue; |
---|
| 385 | Int m_maxValue; |
---|
| 386 | Int m_sigmoidMidpoint; |
---|
| 387 | Int m_sigmoidWidth; |
---|
| 388 | std::vector<Int> m_startOfCodedInterval; |
---|
| 389 | Int m_numPivots; |
---|
| 390 | std::vector<Int> m_codedPivotValue; |
---|
| 391 | std::vector<Int> m_targetPivotValue; |
---|
| 392 | Int m_cameraIsoSpeedIdc; |
---|
| 393 | Int m_cameraIsoSpeedValue; |
---|
[964] | 394 | Int m_exposureIndexIdc; |
---|
| 395 | Int m_exposureIndexValue; |
---|
[1313] | 396 | Bool m_exposureCompensationValueSignFlag; |
---|
[608] | 397 | Int m_exposureCompensationValueNumerator; |
---|
| 398 | Int m_exposureCompensationValueDenomIdc; |
---|
| 399 | Int m_refScreenLuminanceWhite; |
---|
| 400 | Int m_extendedRangeWhiteLevel; |
---|
| 401 | Int m_nominalBlackLevelLumaCodeValue; |
---|
| 402 | Int m_nominalWhiteLevelLumaCodeValue; |
---|
| 403 | Int m_extendedWhiteLevelLumaCodeValue; |
---|
| 404 | }; |
---|
| 405 | |
---|
[1313] | 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 |
---|
[872] | 475 | class SEISubBitstreamProperty : public SEI |
---|
| 476 | { |
---|
| 477 | public: |
---|
| 478 | PayloadType payloadType() const { return SUB_BITSTREAM_PROPERTY; } |
---|
| 479 | |
---|
| 480 | SEISubBitstreamProperty(): m_activeVpsId(-1), m_numAdditionalSubStreams(0) {} |
---|
| 481 | virtual ~SEISubBitstreamProperty() {} |
---|
| 482 | |
---|
| 483 | Int m_activeVpsId; |
---|
| 484 | Int m_numAdditionalSubStreams; |
---|
| 485 | std::vector<Int> m_subBitstreamMode; |
---|
| 486 | std::vector<Int> m_outputLayerSetIdxToVps; |
---|
| 487 | std::vector<Int> m_highestSublayerId; |
---|
| 488 | std::vector<Int> m_avgBitRate; |
---|
| 489 | std::vector<Int> m_maxBitRate; |
---|
| 490 | }; |
---|
| 491 | #endif |
---|
| 492 | |
---|
[608] | 493 | typedef std::list<SEI*> SEIMessages; |
---|
| 494 | |
---|
| 495 | /// output a selection of SEI messages by payload type. Ownership stays in original message list. |
---|
| 496 | SEIMessages getSeisByType(SEIMessages &seiList, SEI::PayloadType seiType); |
---|
| 497 | |
---|
[1313] | 498 | /// remove a selection of SEI messages by payload type from the original list and return them in a new list. |
---|
[608] | 499 | SEIMessages extractSeisByType(SEIMessages &seiList, SEI::PayloadType seiType); |
---|
| 500 | |
---|
| 501 | /// delete list of SEI messages (freeing the referenced objects) |
---|
| 502 | Void deleteSEIs (SEIMessages &seiList); |
---|
| 503 | |
---|
| 504 | class SEIScalableNesting : public SEI |
---|
| 505 | { |
---|
| 506 | public: |
---|
| 507 | PayloadType payloadType() const { return SCALABLE_NESTING; } |
---|
| 508 | |
---|
| 509 | SEIScalableNesting() {} |
---|
[1313] | 510 | |
---|
[608] | 511 | virtual ~SEIScalableNesting() |
---|
[2] | 512 | { |
---|
[1313] | 513 | deleteSEIs(m_nestedSEIs); |
---|
[2] | 514 | } |
---|
| 515 | |
---|
[608] | 516 | Bool m_bitStreamSubsetFlag; |
---|
| 517 | Bool m_nestingOpFlag; |
---|
| 518 | Bool m_defaultOpFlag; //value valid if m_nestingOpFlag != 0 |
---|
| 519 | UInt m_nestingNumOpsMinus1; // -"- |
---|
| 520 | UInt m_nestingMaxTemporalIdPlus1[MAX_TLAYER]; // -"- |
---|
| 521 | UInt m_nestingOpIdx[MAX_NESTING_NUM_OPS]; // -"- |
---|
| 522 | |
---|
| 523 | Bool m_allLayersFlag; //value valid if m_nestingOpFlag == 0 |
---|
| 524 | UInt m_nestingNoOpMaxTemporalIdPlus1; //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0 |
---|
| 525 | UInt m_nestingNumLayersMinus1; //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0 |
---|
[1313] | 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 |
---|
[608] | 527 | |
---|
| 528 | SEIMessages m_nestedSEIs; |
---|
[2] | 529 | }; |
---|
[608] | 530 | |
---|
[1313] | 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 | |
---|
[56] | 602 | //! \} |
---|