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 | * |
---|
6 | * Copyright (c) 2010-2014, ITU/ISO/IEC |
---|
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. |
---|
17 | * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may |
---|
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 | */ |
---|
33 | |
---|
34 | #pragma once |
---|
35 | #include <list> |
---|
36 | #include <vector> |
---|
37 | #include <cstring> |
---|
38 | |
---|
39 | #if Q0078_ADD_LAYER_SETS |
---|
40 | #include "TLibCommon/NAL.h" |
---|
41 | #endif |
---|
42 | |
---|
43 | //! \ingroup TLibCommon |
---|
44 | //! \{ |
---|
45 | class TComSPS; |
---|
46 | #if O0164_MULTI_LAYER_HRD |
---|
47 | class TComHRD; |
---|
48 | #endif |
---|
49 | |
---|
50 | /** |
---|
51 | * Abstract class representing an SEI message with lightweight RTTI. |
---|
52 | */ |
---|
53 | class SEI |
---|
54 | { |
---|
55 | public: |
---|
56 | enum PayloadType |
---|
57 | { |
---|
58 | BUFFERING_PERIOD = 0, |
---|
59 | PICTURE_TIMING = 1, |
---|
60 | PAN_SCAN_RECT = 2, |
---|
61 | FILLER_PAYLOAD = 3, |
---|
62 | USER_DATA_REGISTERED_ITU_T_T35 = 4, |
---|
63 | USER_DATA_UNREGISTERED = 5, |
---|
64 | RECOVERY_POINT = 6, |
---|
65 | SCENE_INFO = 9, |
---|
66 | FULL_FRAME_SNAPSHOT = 15, |
---|
67 | PROGRESSIVE_REFINEMENT_SEGMENT_START = 16, |
---|
68 | PROGRESSIVE_REFINEMENT_SEGMENT_END = 17, |
---|
69 | FILM_GRAIN_CHARACTERISTICS = 19, |
---|
70 | POST_FILTER_HINT = 22, |
---|
71 | TONE_MAPPING_INFO = 23, |
---|
72 | #if P0050_KNEE_FUNCTION_SEI |
---|
73 | KNEE_FUNCTION_INFO = 24, |
---|
74 | #endif |
---|
75 | FRAME_PACKING = 45, |
---|
76 | DISPLAY_ORIENTATION = 47, |
---|
77 | SOP_DESCRIPTION = 128, |
---|
78 | ACTIVE_PARAMETER_SETS = 129, |
---|
79 | DECODING_UNIT_INFO = 130, |
---|
80 | TEMPORAL_LEVEL0_INDEX = 131, |
---|
81 | DECODED_PICTURE_HASH = 132, |
---|
82 | SCALABLE_NESTING = 133, |
---|
83 | REGION_REFRESH_INFO = 134, |
---|
84 | #if LAYERS_NOT_PRESENT_SEI |
---|
85 | LAYERS_NOT_PRESENT = 137, |
---|
86 | #endif |
---|
87 | #if N0383_IL_CONSTRAINED_TILE_SETS_SEI |
---|
88 | INTER_LAYER_CONSTRAINED_TILE_SETS = 138, |
---|
89 | #endif |
---|
90 | #if SUB_BITSTREAM_PROPERTY_SEI |
---|
91 | SUB_BITSTREAM_PROPERTY = 139, // Final PayloadType to be defined after finalization |
---|
92 | #endif |
---|
93 | #if O0164_MULTI_LAYER_HRD |
---|
94 | BSP_NESTING = 140, |
---|
95 | BSP_INITIAL_ARRIVAL_TIME = 141, |
---|
96 | #if !REMOVE_BSP_HRD_SEI |
---|
97 | BSP_HRD = 142, |
---|
98 | #endif |
---|
99 | #endif |
---|
100 | #if Q0074_COLOUR_REMAPPING_SEI |
---|
101 | COLOUR_REMAPPING_INFO = 143, |
---|
102 | #endif |
---|
103 | #if Q0078_ADD_LAYER_SETS |
---|
104 | OUTPUT_LAYER_SET_NESTING = 144, |
---|
105 | VPS_REWRITING = 145, |
---|
106 | #endif |
---|
107 | #if Q0189_TMVP_CONSTRAINTS |
---|
108 | TMVP_CONSTRAINTS = 146, |
---|
109 | #endif |
---|
110 | #if Q0247_FRAME_FIELD_INFO |
---|
111 | FRAME_FIELD_INFO = 147, |
---|
112 | #endif |
---|
113 | #if Q0096_OVERLAY_SEI |
---|
114 | OVERLAY_INFO = 166, |
---|
115 | #endif |
---|
116 | }; |
---|
117 | |
---|
118 | SEI() {} |
---|
119 | virtual ~SEI() {} |
---|
120 | |
---|
121 | virtual PayloadType payloadType() const = 0; |
---|
122 | }; |
---|
123 | |
---|
124 | class SEIuserDataUnregistered : public SEI |
---|
125 | { |
---|
126 | public: |
---|
127 | PayloadType payloadType() const { return USER_DATA_UNREGISTERED; } |
---|
128 | |
---|
129 | SEIuserDataUnregistered() |
---|
130 | : userData(0) |
---|
131 | {} |
---|
132 | |
---|
133 | virtual ~SEIuserDataUnregistered() |
---|
134 | { |
---|
135 | delete userData; |
---|
136 | } |
---|
137 | |
---|
138 | UChar uuid_iso_iec_11578[16]; |
---|
139 | UInt userDataLength; |
---|
140 | UChar *userData; |
---|
141 | }; |
---|
142 | |
---|
143 | class SEIDecodedPictureHash : public SEI |
---|
144 | { |
---|
145 | public: |
---|
146 | PayloadType payloadType() const { return DECODED_PICTURE_HASH; } |
---|
147 | |
---|
148 | SEIDecodedPictureHash() {} |
---|
149 | virtual ~SEIDecodedPictureHash() {} |
---|
150 | |
---|
151 | enum Method |
---|
152 | { |
---|
153 | MD5, |
---|
154 | CRC, |
---|
155 | CHECKSUM, |
---|
156 | RESERVED, |
---|
157 | } method; |
---|
158 | |
---|
159 | UChar digest[3][16]; |
---|
160 | }; |
---|
161 | |
---|
162 | class SEIActiveParameterSets : public SEI |
---|
163 | { |
---|
164 | public: |
---|
165 | PayloadType payloadType() const { return ACTIVE_PARAMETER_SETS; } |
---|
166 | |
---|
167 | SEIActiveParameterSets() |
---|
168 | : activeVPSId (0) |
---|
169 | , m_selfContainedCvsFlag (false) |
---|
170 | , m_noParameterSetUpdateFlag (false) |
---|
171 | , numSpsIdsMinus1 (0) |
---|
172 | {} |
---|
173 | virtual ~SEIActiveParameterSets() {} |
---|
174 | |
---|
175 | Int activeVPSId; |
---|
176 | Bool m_selfContainedCvsFlag; |
---|
177 | Bool m_noParameterSetUpdateFlag; |
---|
178 | Int numSpsIdsMinus1; |
---|
179 | std::vector<Int> activeSeqParameterSetId; |
---|
180 | #if R0247_SEI_ACTIVE |
---|
181 | std::vector<Int> layerSpsIdx; |
---|
182 | #endif |
---|
183 | }; |
---|
184 | |
---|
185 | class SEIBufferingPeriod : public SEI |
---|
186 | { |
---|
187 | public: |
---|
188 | PayloadType payloadType() const { return BUFFERING_PERIOD; } |
---|
189 | |
---|
190 | SEIBufferingPeriod() |
---|
191 | : m_bpSeqParameterSetId (0) |
---|
192 | , m_rapCpbParamsPresentFlag (false) |
---|
193 | , m_cpbDelayOffset (0) |
---|
194 | , m_dpbDelayOffset (0) |
---|
195 | #if P0138_USE_ALT_CPB_PARAMS_FLAG |
---|
196 | , m_useAltCpbParamsFlagPresent(false) |
---|
197 | , m_useAltCpbParamsFlag (false) |
---|
198 | #endif |
---|
199 | { |
---|
200 | ::memset(m_initialCpbRemovalDelay, 0, sizeof(m_initialCpbRemovalDelay)); |
---|
201 | ::memset(m_initialCpbRemovalDelayOffset, 0, sizeof(m_initialCpbRemovalDelayOffset)); |
---|
202 | ::memset(m_initialAltCpbRemovalDelay, 0, sizeof(m_initialAltCpbRemovalDelay)); |
---|
203 | ::memset(m_initialAltCpbRemovalDelayOffset, 0, sizeof(m_initialAltCpbRemovalDelayOffset)); |
---|
204 | } |
---|
205 | virtual ~SEIBufferingPeriod() {} |
---|
206 | |
---|
207 | UInt m_bpSeqParameterSetId; |
---|
208 | Bool m_rapCpbParamsPresentFlag; |
---|
209 | UInt m_cpbDelayOffset; |
---|
210 | UInt m_dpbDelayOffset; |
---|
211 | UInt m_initialCpbRemovalDelay [MAX_CPB_CNT][2]; |
---|
212 | UInt m_initialCpbRemovalDelayOffset [MAX_CPB_CNT][2]; |
---|
213 | UInt m_initialAltCpbRemovalDelay [MAX_CPB_CNT][2]; |
---|
214 | UInt m_initialAltCpbRemovalDelayOffset[MAX_CPB_CNT][2]; |
---|
215 | Bool m_concatenationFlag; |
---|
216 | UInt m_auCpbRemovalDelayDelta; |
---|
217 | #if P0138_USE_ALT_CPB_PARAMS_FLAG |
---|
218 | Bool m_useAltCpbParamsFlagPresent; |
---|
219 | Bool m_useAltCpbParamsFlag; |
---|
220 | #endif |
---|
221 | }; |
---|
222 | class SEIPictureTiming : public SEI |
---|
223 | { |
---|
224 | public: |
---|
225 | PayloadType payloadType() const { return PICTURE_TIMING; } |
---|
226 | |
---|
227 | SEIPictureTiming() |
---|
228 | : m_picStruct (0) |
---|
229 | , m_sourceScanType (0) |
---|
230 | , m_duplicateFlag (false) |
---|
231 | , m_picDpbOutputDuDelay (0) |
---|
232 | , m_numNalusInDuMinus1 (NULL) |
---|
233 | , m_duCpbRemovalDelayMinus1 (NULL) |
---|
234 | {} |
---|
235 | virtual ~SEIPictureTiming() |
---|
236 | { |
---|
237 | if( m_numNalusInDuMinus1 != NULL ) |
---|
238 | { |
---|
239 | delete m_numNalusInDuMinus1; |
---|
240 | } |
---|
241 | if( m_duCpbRemovalDelayMinus1 != NULL ) |
---|
242 | { |
---|
243 | delete m_duCpbRemovalDelayMinus1; |
---|
244 | } |
---|
245 | } |
---|
246 | |
---|
247 | UInt m_picStruct; |
---|
248 | UInt m_sourceScanType; |
---|
249 | Bool m_duplicateFlag; |
---|
250 | |
---|
251 | UInt m_auCpbRemovalDelay; |
---|
252 | UInt m_picDpbOutputDelay; |
---|
253 | UInt m_picDpbOutputDuDelay; |
---|
254 | UInt m_numDecodingUnitsMinus1; |
---|
255 | Bool m_duCommonCpbRemovalDelayFlag; |
---|
256 | UInt m_duCommonCpbRemovalDelayMinus1; |
---|
257 | UInt* m_numNalusInDuMinus1; |
---|
258 | UInt* m_duCpbRemovalDelayMinus1; |
---|
259 | }; |
---|
260 | |
---|
261 | class SEIDecodingUnitInfo : public SEI |
---|
262 | { |
---|
263 | public: |
---|
264 | PayloadType payloadType() const { return DECODING_UNIT_INFO; } |
---|
265 | |
---|
266 | SEIDecodingUnitInfo() |
---|
267 | : m_decodingUnitIdx(0) |
---|
268 | , m_duSptCpbRemovalDelay(0) |
---|
269 | , m_dpbOutputDuDelayPresentFlag(false) |
---|
270 | , m_picSptDpbOutputDuDelay(0) |
---|
271 | {} |
---|
272 | virtual ~SEIDecodingUnitInfo() {} |
---|
273 | Int m_decodingUnitIdx; |
---|
274 | Int m_duSptCpbRemovalDelay; |
---|
275 | Bool m_dpbOutputDuDelayPresentFlag; |
---|
276 | Int m_picSptDpbOutputDuDelay; |
---|
277 | }; |
---|
278 | |
---|
279 | class SEIRecoveryPoint : public SEI |
---|
280 | { |
---|
281 | public: |
---|
282 | PayloadType payloadType() const { return RECOVERY_POINT; } |
---|
283 | |
---|
284 | SEIRecoveryPoint() {} |
---|
285 | virtual ~SEIRecoveryPoint() {} |
---|
286 | |
---|
287 | Int m_recoveryPocCnt; |
---|
288 | Bool m_exactMatchingFlag; |
---|
289 | Bool m_brokenLinkFlag; |
---|
290 | }; |
---|
291 | class SEIFramePacking : public SEI |
---|
292 | { |
---|
293 | public: |
---|
294 | PayloadType payloadType() const { return FRAME_PACKING; } |
---|
295 | |
---|
296 | SEIFramePacking() {} |
---|
297 | virtual ~SEIFramePacking() {} |
---|
298 | |
---|
299 | Int m_arrangementId; |
---|
300 | Bool m_arrangementCancelFlag; |
---|
301 | Int m_arrangementType; |
---|
302 | Bool m_quincunxSamplingFlag; |
---|
303 | Int m_contentInterpretationType; |
---|
304 | Bool m_spatialFlippingFlag; |
---|
305 | Bool m_frame0FlippedFlag; |
---|
306 | Bool m_fieldViewsFlag; |
---|
307 | Bool m_currentFrameIsFrame0Flag; |
---|
308 | Bool m_frame0SelfContainedFlag; |
---|
309 | Bool m_frame1SelfContainedFlag; |
---|
310 | Int m_frame0GridPositionX; |
---|
311 | Int m_frame0GridPositionY; |
---|
312 | Int m_frame1GridPositionX; |
---|
313 | Int m_frame1GridPositionY; |
---|
314 | Int m_arrangementReservedByte; |
---|
315 | Bool m_arrangementPersistenceFlag; |
---|
316 | Bool m_upsampledAspectRatio; |
---|
317 | }; |
---|
318 | |
---|
319 | class SEIDisplayOrientation : public SEI |
---|
320 | { |
---|
321 | public: |
---|
322 | PayloadType payloadType() const { return DISPLAY_ORIENTATION; } |
---|
323 | |
---|
324 | SEIDisplayOrientation() |
---|
325 | : cancelFlag(true) |
---|
326 | , persistenceFlag(0) |
---|
327 | , extensionFlag(false) |
---|
328 | {} |
---|
329 | virtual ~SEIDisplayOrientation() {} |
---|
330 | |
---|
331 | Bool cancelFlag; |
---|
332 | Bool horFlip; |
---|
333 | Bool verFlip; |
---|
334 | |
---|
335 | UInt anticlockwiseRotation; |
---|
336 | Bool persistenceFlag; |
---|
337 | Bool extensionFlag; |
---|
338 | }; |
---|
339 | |
---|
340 | class SEITemporalLevel0Index : public SEI |
---|
341 | { |
---|
342 | public: |
---|
343 | PayloadType payloadType() const { return TEMPORAL_LEVEL0_INDEX; } |
---|
344 | |
---|
345 | SEITemporalLevel0Index() |
---|
346 | : tl0Idx(0) |
---|
347 | , rapIdx(0) |
---|
348 | {} |
---|
349 | virtual ~SEITemporalLevel0Index() {} |
---|
350 | |
---|
351 | UInt tl0Idx; |
---|
352 | UInt rapIdx; |
---|
353 | }; |
---|
354 | |
---|
355 | class SEIGradualDecodingRefreshInfo : public SEI |
---|
356 | { |
---|
357 | public: |
---|
358 | PayloadType payloadType() const { return REGION_REFRESH_INFO; } |
---|
359 | |
---|
360 | SEIGradualDecodingRefreshInfo() |
---|
361 | : m_gdrForegroundFlag(0) |
---|
362 | {} |
---|
363 | virtual ~SEIGradualDecodingRefreshInfo() {} |
---|
364 | |
---|
365 | Bool m_gdrForegroundFlag; |
---|
366 | }; |
---|
367 | |
---|
368 | #if LAYERS_NOT_PRESENT_SEI |
---|
369 | class SEILayersNotPresent : public SEI |
---|
370 | { |
---|
371 | public: |
---|
372 | PayloadType payloadType() const { return LAYERS_NOT_PRESENT; } |
---|
373 | |
---|
374 | SEILayersNotPresent() {} |
---|
375 | virtual ~SEILayersNotPresent() {} |
---|
376 | |
---|
377 | UInt m_activeVpsId; |
---|
378 | UInt m_vpsMaxLayers; |
---|
379 | Bool m_layerNotPresentFlag[MAX_LAYERS]; |
---|
380 | }; |
---|
381 | #endif |
---|
382 | |
---|
383 | class SEISOPDescription : public SEI |
---|
384 | { |
---|
385 | public: |
---|
386 | PayloadType payloadType() const { return SOP_DESCRIPTION; } |
---|
387 | |
---|
388 | SEISOPDescription() {} |
---|
389 | virtual ~SEISOPDescription() {} |
---|
390 | |
---|
391 | UInt m_sopSeqParameterSetId; |
---|
392 | UInt m_numPicsInSopMinus1; |
---|
393 | |
---|
394 | UInt m_sopDescVclNaluType[MAX_NUM_PICS_IN_SOP]; |
---|
395 | UInt m_sopDescTemporalId[MAX_NUM_PICS_IN_SOP]; |
---|
396 | UInt m_sopDescStRpsIdx[MAX_NUM_PICS_IN_SOP]; |
---|
397 | Int m_sopDescPocDelta[MAX_NUM_PICS_IN_SOP]; |
---|
398 | }; |
---|
399 | |
---|
400 | class SEIToneMappingInfo : public SEI |
---|
401 | { |
---|
402 | public: |
---|
403 | PayloadType payloadType() const { return TONE_MAPPING_INFO; } |
---|
404 | SEIToneMappingInfo() {} |
---|
405 | virtual ~SEIToneMappingInfo() {} |
---|
406 | |
---|
407 | Int m_toneMapId; |
---|
408 | Bool m_toneMapCancelFlag; |
---|
409 | Bool m_toneMapPersistenceFlag; |
---|
410 | Int m_codedDataBitDepth; |
---|
411 | Int m_targetBitDepth; |
---|
412 | Int m_modelId; |
---|
413 | Int m_minValue; |
---|
414 | Int m_maxValue; |
---|
415 | Int m_sigmoidMidpoint; |
---|
416 | Int m_sigmoidWidth; |
---|
417 | std::vector<Int> m_startOfCodedInterval; |
---|
418 | Int m_numPivots; |
---|
419 | std::vector<Int> m_codedPivotValue; |
---|
420 | std::vector<Int> m_targetPivotValue; |
---|
421 | Int m_cameraIsoSpeedIdc; |
---|
422 | Int m_cameraIsoSpeedValue; |
---|
423 | Int m_exposureIndexIdc; |
---|
424 | Int m_exposureIndexValue; |
---|
425 | Int m_exposureCompensationValueSignFlag; |
---|
426 | Int m_exposureCompensationValueNumerator; |
---|
427 | Int m_exposureCompensationValueDenomIdc; |
---|
428 | Int m_refScreenLuminanceWhite; |
---|
429 | Int m_extendedRangeWhiteLevel; |
---|
430 | Int m_nominalBlackLevelLumaCodeValue; |
---|
431 | Int m_nominalWhiteLevelLumaCodeValue; |
---|
432 | Int m_extendedWhiteLevelLumaCodeValue; |
---|
433 | }; |
---|
434 | #if P0050_KNEE_FUNCTION_SEI |
---|
435 | class SEIKneeFunctionInfo : public SEI |
---|
436 | { |
---|
437 | public: |
---|
438 | PayloadType payloadType() const { return KNEE_FUNCTION_INFO; } |
---|
439 | SEIKneeFunctionInfo() {} |
---|
440 | virtual ~SEIKneeFunctionInfo() {} |
---|
441 | |
---|
442 | Int m_kneeId; |
---|
443 | Bool m_kneeCancelFlag; |
---|
444 | Bool m_kneePersistenceFlag; |
---|
445 | Bool m_kneeMappingFlag; |
---|
446 | Int m_kneeInputDrange; |
---|
447 | Int m_kneeInputDispLuminance; |
---|
448 | Int m_kneeOutputDrange; |
---|
449 | Int m_kneeOutputDispLuminance; |
---|
450 | Int m_kneeNumKneePointsMinus1; |
---|
451 | std::vector<Int> m_kneeInputKneePoint; |
---|
452 | std::vector<Int> m_kneeOutputKneePoint; |
---|
453 | }; |
---|
454 | #endif |
---|
455 | #if Q0074_COLOUR_REMAPPING_SEI |
---|
456 | class SEIColourRemappingInfo : public SEI |
---|
457 | { |
---|
458 | public: |
---|
459 | PayloadType payloadType() const { return COLOUR_REMAPPING_INFO; } |
---|
460 | SEIColourRemappingInfo() {} |
---|
461 | ~SEIColourRemappingInfo() {} |
---|
462 | |
---|
463 | Int m_colourRemapId; |
---|
464 | Bool m_colourRemapCancelFlag; |
---|
465 | Bool m_colourRemapPersistenceFlag; |
---|
466 | Bool m_colourRemapVideoSignalInfoPresentFlag; |
---|
467 | Bool m_colourRemapFullRangeFlag; |
---|
468 | Int m_colourRemapPrimaries; |
---|
469 | Int m_colourRemapTransferFunction; |
---|
470 | Int m_colourRemapMatrixCoefficients; |
---|
471 | Int m_colourRemapInputBitDepth; |
---|
472 | Int m_colourRemapBitDepth; |
---|
473 | Int m_preLutNumValMinus1[3]; |
---|
474 | std::vector<Int> m_preLutCodedValue[3]; |
---|
475 | std::vector<Int> m_preLutTargetValue[3]; |
---|
476 | Bool m_colourRemapMatrixPresentFlag; |
---|
477 | Int m_log2MatrixDenom; |
---|
478 | Int m_colourRemapCoeffs[3][3]; |
---|
479 | Int m_postLutNumValMinus1[3]; |
---|
480 | std::vector<Int> m_postLutCodedValue[3]; |
---|
481 | std::vector<Int> m_postLutTargetValue[3]; |
---|
482 | }; |
---|
483 | #endif |
---|
484 | |
---|
485 | #if N0383_IL_CONSTRAINED_TILE_SETS_SEI |
---|
486 | class SEIInterLayerConstrainedTileSets : public SEI |
---|
487 | { |
---|
488 | public: |
---|
489 | PayloadType payloadType() const { return INTER_LAYER_CONSTRAINED_TILE_SETS; } |
---|
490 | |
---|
491 | SEIInterLayerConstrainedTileSets() {} |
---|
492 | virtual ~SEIInterLayerConstrainedTileSets() {} |
---|
493 | |
---|
494 | Bool m_ilAllTilesExactSampleValueMatchFlag; |
---|
495 | Bool m_ilOneTilePerTileSetFlag; |
---|
496 | UInt m_ilNumSetsInMessageMinus1; |
---|
497 | Bool m_skippedTileSetPresentFlag; |
---|
498 | UInt m_ilctsId[256]; |
---|
499 | UInt m_ilNumTileRectsInSetMinus1[256]; |
---|
500 | UInt m_ilTopLeftTileIndex[256][440]; |
---|
501 | UInt m_ilBottomRightTileIndex[256][440]; |
---|
502 | UInt m_ilcIdc[256]; |
---|
503 | Bool m_ilExactSampleValueMatchFlag[256]; |
---|
504 | UInt m_allTilesIlcIdc; |
---|
505 | }; |
---|
506 | #endif |
---|
507 | |
---|
508 | #if SUB_BITSTREAM_PROPERTY_SEI |
---|
509 | class SEISubBitstreamProperty : public SEI |
---|
510 | { |
---|
511 | public: |
---|
512 | PayloadType payloadType() const { return SUB_BITSTREAM_PROPERTY; } |
---|
513 | |
---|
514 | SEISubBitstreamProperty(); |
---|
515 | virtual ~SEISubBitstreamProperty() {} |
---|
516 | |
---|
517 | Int m_activeVpsId; |
---|
518 | Int m_numAdditionalSubStreams; |
---|
519 | Int m_subBitstreamMode [MAX_SUB_STREAMS]; |
---|
520 | Int m_outputLayerSetIdxToVps [MAX_SUB_STREAMS]; |
---|
521 | Int m_highestSublayerId [MAX_SUB_STREAMS]; |
---|
522 | Int m_avgBitRate [MAX_SUB_STREAMS]; |
---|
523 | Int m_maxBitRate [MAX_SUB_STREAMS]; |
---|
524 | }; |
---|
525 | #endif |
---|
526 | |
---|
527 | #if Q0189_TMVP_CONSTRAINTS |
---|
528 | class SEITMVPConstrains : public SEI |
---|
529 | { |
---|
530 | public: |
---|
531 | PayloadType payloadType() const { return TMVP_CONSTRAINTS; } |
---|
532 | |
---|
533 | SEITMVPConstrains() |
---|
534 | : prev_pics_not_used_flag(0),no_intra_layer_col_pic_flag(0) |
---|
535 | {} |
---|
536 | |
---|
537 | virtual ~SEITMVPConstrains() |
---|
538 | { |
---|
539 | } |
---|
540 | |
---|
541 | UInt prev_pics_not_used_flag; |
---|
542 | UInt no_intra_layer_col_pic_flag; |
---|
543 | }; |
---|
544 | #endif |
---|
545 | |
---|
546 | #if Q0247_FRAME_FIELD_INFO |
---|
547 | class SEIFrameFieldInfo: public SEI |
---|
548 | { |
---|
549 | public: |
---|
550 | PayloadType payloadType() const { return FRAME_FIELD_INFO; } |
---|
551 | |
---|
552 | SEIFrameFieldInfo() |
---|
553 | : m_ffinfo_picStruct(0),m_ffinfo_sourceScanType(0), m_ffinfo_duplicateFlag(false) |
---|
554 | {} |
---|
555 | |
---|
556 | virtual ~SEIFrameFieldInfo() |
---|
557 | { |
---|
558 | } |
---|
559 | |
---|
560 | UInt m_ffinfo_picStruct; |
---|
561 | UInt m_ffinfo_sourceScanType; |
---|
562 | Bool m_ffinfo_duplicateFlag; |
---|
563 | }; |
---|
564 | |
---|
565 | #endif |
---|
566 | |
---|
567 | typedef std::list<SEI*> SEIMessages; |
---|
568 | |
---|
569 | /// output a selection of SEI messages by payload type. Ownership stays in original message list. |
---|
570 | SEIMessages getSeisByType(SEIMessages &seiList, SEI::PayloadType seiType); |
---|
571 | |
---|
572 | /// remove a selection of SEI messages by payload type from the original list and return them in a new list. |
---|
573 | SEIMessages extractSeisByType(SEIMessages &seiList, SEI::PayloadType seiType); |
---|
574 | |
---|
575 | /// delete list of SEI messages (freeing the referenced objects) |
---|
576 | Void deleteSEIs (SEIMessages &seiList); |
---|
577 | |
---|
578 | #if O0164_MULTI_LAYER_HRD |
---|
579 | |
---|
580 | class SEIBspNesting : public SEI |
---|
581 | { |
---|
582 | public: |
---|
583 | PayloadType payloadType() const { return BSP_NESTING; } |
---|
584 | |
---|
585 | SEIBspNesting() {} |
---|
586 | virtual ~SEIBspNesting() |
---|
587 | { |
---|
588 | if (!m_callerOwnsSEIs) |
---|
589 | { |
---|
590 | deleteSEIs(m_nestedSEIs); |
---|
591 | } |
---|
592 | } |
---|
593 | |
---|
594 | Int m_bspIdx; |
---|
595 | Bool m_callerOwnsSEIs; |
---|
596 | SEIMessages m_nestedSEIs; |
---|
597 | #if VPS_VUI_BSP_HRD_PARAMS |
---|
598 | Int m_seiPartitioningSchemeIdx; |
---|
599 | Int m_seiOlsIdx; |
---|
600 | #endif |
---|
601 | }; |
---|
602 | |
---|
603 | class SEIBspInitialArrivalTime : public SEI |
---|
604 | { |
---|
605 | public: |
---|
606 | PayloadType payloadType() const { return BSP_INITIAL_ARRIVAL_TIME; } |
---|
607 | |
---|
608 | SEIBspInitialArrivalTime () {} |
---|
609 | virtual ~SEIBspInitialArrivalTime () {} |
---|
610 | |
---|
611 | UInt m_nalInitialArrivalDelay[256]; |
---|
612 | UInt m_vclInitialArrivalDelay[256]; |
---|
613 | }; |
---|
614 | |
---|
615 | #if !REMOVE_BSP_HRD_SEI |
---|
616 | class SEIBspHrd : public SEI |
---|
617 | { |
---|
618 | public: |
---|
619 | PayloadType payloadType() const { return BSP_HRD; } |
---|
620 | |
---|
621 | SEIBspHrd () {} |
---|
622 | virtual ~SEIBspHrd () {} |
---|
623 | |
---|
624 | UInt m_seiNumBspHrdParametersMinus1; |
---|
625 | Bool m_seiBspCprmsPresentFlag[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
626 | UInt m_seiNumBitstreamPartitionsMinus1[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
627 | Bool m_seiLayerInBspFlag[MAX_VPS_LAYER_SETS_PLUS1][8][MAX_LAYERS]; |
---|
628 | UInt m_seiNumBspSchedCombinationsMinus1[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
629 | UInt m_seiBspCombHrdIdx[MAX_VPS_LAYER_SETS_PLUS1][16][16]; |
---|
630 | UInt m_seiBspCombScheddx[MAX_VPS_LAYER_SETS_PLUS1][16][16]; |
---|
631 | UInt m_vpsMaxLayers; |
---|
632 | Bool m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
633 | |
---|
634 | TComHRD *hrd; |
---|
635 | }; |
---|
636 | #endif |
---|
637 | |
---|
638 | #endif |
---|
639 | |
---|
640 | class SEIScalableNesting : public SEI |
---|
641 | { |
---|
642 | public: |
---|
643 | PayloadType payloadType() const { return SCALABLE_NESTING; } |
---|
644 | |
---|
645 | SEIScalableNesting() {} |
---|
646 | virtual ~SEIScalableNesting() |
---|
647 | { |
---|
648 | if (!m_callerOwnsSEIs) |
---|
649 | { |
---|
650 | deleteSEIs(m_nestedSEIs); |
---|
651 | } |
---|
652 | } |
---|
653 | |
---|
654 | Bool m_bitStreamSubsetFlag; |
---|
655 | Bool m_nestingOpFlag; |
---|
656 | Bool m_defaultOpFlag; //value valid if m_nestingOpFlag != 0 |
---|
657 | UInt m_nestingNumOpsMinus1; // -"- |
---|
658 | UInt m_nestingMaxTemporalIdPlus1[MAX_TLAYER]; // -"- |
---|
659 | UInt m_nestingOpIdx[MAX_NESTING_NUM_OPS]; // -"- |
---|
660 | |
---|
661 | Bool m_allLayersFlag; //value valid if m_nestingOpFlag == 0 |
---|
662 | UInt m_nestingNoOpMaxTemporalIdPlus1; //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0 |
---|
663 | UInt m_nestingNumLayersMinus1; //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0 |
---|
664 | 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 |
---|
665 | |
---|
666 | Bool m_callerOwnsSEIs; |
---|
667 | SEIMessages m_nestedSEIs; |
---|
668 | }; |
---|
669 | |
---|
670 | #if Q0078_ADD_LAYER_SETS |
---|
671 | class SEIOutputLayerSetNesting : public SEI |
---|
672 | { |
---|
673 | public: |
---|
674 | PayloadType payloadType() const { return OUTPUT_LAYER_SET_NESTING; } |
---|
675 | |
---|
676 | SEIOutputLayerSetNesting() {} |
---|
677 | virtual ~SEIOutputLayerSetNesting() |
---|
678 | { |
---|
679 | if (!m_callerOwnsSEIs) |
---|
680 | { |
---|
681 | deleteSEIs(m_nestedSEIs); |
---|
682 | } |
---|
683 | } |
---|
684 | |
---|
685 | Bool m_olsFlag; |
---|
686 | UInt m_numOlsIndicesMinus1; |
---|
687 | UInt m_olsIdx[1024]; |
---|
688 | Bool m_callerOwnsSEIs; |
---|
689 | SEIMessages m_nestedSEIs; |
---|
690 | }; |
---|
691 | |
---|
692 | class SEIVPSRewriting : public SEI |
---|
693 | { |
---|
694 | public: |
---|
695 | PayloadType payloadType() const { return VPS_REWRITING; } |
---|
696 | |
---|
697 | SEIVPSRewriting() {} |
---|
698 | virtual ~SEIVPSRewriting() {} |
---|
699 | |
---|
700 | NALUnit* nalu; |
---|
701 | }; |
---|
702 | #endif |
---|
703 | |
---|
704 | #if Q0096_OVERLAY_SEI |
---|
705 | class SEIOverlayInfo : public SEI |
---|
706 | { |
---|
707 | public: |
---|
708 | PayloadType payloadType() const { return OVERLAY_INFO; } |
---|
709 | SEIOverlayInfo() |
---|
710 | : m_numOverlaysMinus1(-1) |
---|
711 | {} |
---|
712 | |
---|
713 | virtual ~SEIOverlayInfo() |
---|
714 | { |
---|
715 | for (Int i=0 ; i<=m_numOverlaysMinus1 ; i++) |
---|
716 | { |
---|
717 | delete [] m_overlayLanguage[i]; |
---|
718 | delete [] m_overlayName[i]; |
---|
719 | for (Int j=0 ; j<=m_numOverlayElementsMinus1[i] ; j++) |
---|
720 | { |
---|
721 | delete [] m_overlayElementName[i][j]; |
---|
722 | } |
---|
723 | } |
---|
724 | } |
---|
725 | |
---|
726 | Bool m_overlayInfoCancelFlag; |
---|
727 | UInt m_overlayContentAuxIdMinus128; |
---|
728 | UInt m_overlayLabelAuxIdMinus128; |
---|
729 | UInt m_overlayAlphaAuxIdMinus128; |
---|
730 | UInt m_overlayElementLabelValueLengthMinus8; |
---|
731 | UInt m_numOverlaysMinus1; |
---|
732 | std::vector<UInt> m_overlayIdx; |
---|
733 | std::vector<Bool> m_languageOverlayPresentFlag; |
---|
734 | std::vector<UInt> m_overlayContentLayerId; |
---|
735 | std::vector<Bool> m_overlayLabelPresentFlag; |
---|
736 | std::vector<UInt> m_overlayLabelLayerId; |
---|
737 | std::vector<Bool> m_overlayAlphaPresentFlag; |
---|
738 | std::vector<UInt> m_overlayAlphaLayerId; |
---|
739 | std::vector<UInt> m_numOverlayElementsMinus1; |
---|
740 | std::vector< std::vector<UInt> > m_overlayElementLabelMin; |
---|
741 | std::vector< std::vector<UInt> > m_overlayElementLabelMax; |
---|
742 | std::vector<UChar*> m_overlayLanguage; |
---|
743 | std::vector<UInt> m_overlayLanguageLength; |
---|
744 | std::vector<UChar*> m_overlayName; |
---|
745 | std::vector<UInt> m_overlayNameLength; |
---|
746 | std::vector< std::vector<UChar*> > m_overlayElementName; |
---|
747 | std::vector< std::vector<UInt> > m_overlayElementNameLength; |
---|
748 | Bool m_overlayInfoPersistenceFlag; |
---|
749 | }; |
---|
750 | #endif |
---|
751 | |
---|
752 | //! \} |
---|