source: SHVCSoftware/branches/SHM-dev/source/Lib/TLibCommon/SEI.h @ 1092

Last change on this file since 1092 was 1089, checked in by seregin, 10 years ago

Patch provided by Hiron Franck <franck.hiron@…> to complete implementation of the CRI (Colour remapping info) with the following features:

  • Management of SEI-CRI messages per picture
  • Management of the persistence of the colour remapping information (parameter “colour_remap_persistence_flag”)
  • Output the remapping picture in display order
  • Maintains the HM like mode (#define SVC_EXTENSION 0)
  • Property svn:eol-style set to native
File size: 25.7 KB
Line 
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#ifndef __SEI__
35#define __SEI__
36
37#pragma once
38#include <list>
39#include <vector>
40#include <cstring>
41
42#include "TypeDef.h"
43#include "libmd5/MD5.h"
44#if Q0078_ADD_LAYER_SETS
45#include "TLibCommon/NAL.h"
46#endif
47
48//! \ingroup TLibCommon
49//! \{
50class TComSPS;
51#if O0164_MULTI_LAYER_HRD
52class TComHRD;
53#endif
54
55/**
56 * Abstract class representing an SEI message with lightweight RTTI.
57 */
58class SEI
59{
60public:
61  enum PayloadType
62  {
63    BUFFERING_PERIOD                     = 0,
64    PICTURE_TIMING                       = 1,
65    PAN_SCAN_RECT                        = 2,
66    FILLER_PAYLOAD                       = 3,
67    USER_DATA_REGISTERED_ITU_T_T35       = 4,
68    USER_DATA_UNREGISTERED               = 5,
69    RECOVERY_POINT                       = 6,
70    SCENE_INFO                           = 9,
71    FULL_FRAME_SNAPSHOT                  = 15,
72    PROGRESSIVE_REFINEMENT_SEGMENT_START = 16,
73    PROGRESSIVE_REFINEMENT_SEGMENT_END   = 17,
74    FILM_GRAIN_CHARACTERISTICS           = 19,
75    POST_FILTER_HINT                     = 22,
76    TONE_MAPPING_INFO                    = 23,
77    FRAME_PACKING                        = 45,
78    DISPLAY_ORIENTATION                  = 47,
79    SOP_DESCRIPTION                      = 128,
80    ACTIVE_PARAMETER_SETS                = 129,
81    DECODING_UNIT_INFO                   = 130,
82    TEMPORAL_LEVEL0_INDEX                = 131,
83    DECODED_PICTURE_HASH                 = 132,
84    SCALABLE_NESTING                     = 133,
85    REGION_REFRESH_INFO                  = 134,
86    NO_DISPLAY                           = 135,
87    TIME_CODE                            = 136,
88    MASTERING_DISPLAY_COLOUR_VOLUME      = 137,
89    SEGM_RECT_FRAME_PACKING              = 138,
90    TEMP_MOTION_CONSTRAINED_TILE_SETS    = 139,
91    CHROMA_SAMPLING_FILTER_HINT          = 140,
92    KNEE_FUNCTION_INFO                   = 141,
93#if LAYERS_NOT_PRESENT_SEI
94    LAYERS_NOT_PRESENT                   = 142,
95#endif
96#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
97    INTER_LAYER_CONSTRAINED_TILE_SETS    = 143,
98#endif
99#if SUB_BITSTREAM_PROPERTY_SEI
100    SUB_BITSTREAM_PROPERTY               = 144,    // Final PayloadType to be defined after finalization
101#endif
102#if O0164_MULTI_LAYER_HRD
103    BSP_NESTING                          = 145,
104    BSP_INITIAL_ARRIVAL_TIME             = 146,
105#if !REMOVE_BSP_HRD_SEI
106    BSP_HRD                              = 147,
107#endif
108#endif
109#if Q0074_COLOUR_REMAPPING_SEI
110    COLOUR_REMAPPING_INFO                = 148,
111#endif
112#if Q0078_ADD_LAYER_SETS
113    OUTPUT_LAYER_SET_NESTING             = 149,
114    VPS_REWRITING                        = 150,
115#endif
116#if Q0189_TMVP_CONSTRAINTS
117    TMVP_CONSTRAINTS                     = 151,
118#endif
119#if Q0247_FRAME_FIELD_INFO
120    FRAME_FIELD_INFO                     = 152,
121#endif
122#if Q0096_OVERLAY_SEI
123    OVERLAY_INFO                         = 153,
124#endif
125#if P0123_ALPHA_CHANNEL_SEI
126    ALPHA_CHANNEL_INFO                   = 165,
127#endif
128  };
129 
130  SEI() {}
131  virtual ~SEI() {}
132 
133  static const Char *getSEIMessageString(SEI::PayloadType payloadType);
134
135  virtual PayloadType payloadType() const = 0;
136};
137
138static const UInt ISO_IEC_11578_LEN=16;
139
140class SEIuserDataUnregistered : public SEI
141{
142public:
143  PayloadType payloadType() const { return USER_DATA_UNREGISTERED; }
144
145  SEIuserDataUnregistered()
146    : userData(0)
147    {}
148
149  virtual ~SEIuserDataUnregistered()
150  {
151    delete userData;
152  }
153
154  UChar uuid_iso_iec_11578[ISO_IEC_11578_LEN];
155  UInt userDataLength;
156  UChar *userData;
157};
158
159class SEIDecodedPictureHash : public SEI
160{
161public:
162  PayloadType payloadType() const { return DECODED_PICTURE_HASH; }
163
164  SEIDecodedPictureHash() {}
165  virtual ~SEIDecodedPictureHash() {}
166 
167  enum Method
168  {
169    MD5,
170    CRC,
171    CHECKSUM,
172    RESERVED,
173  } method;
174
175  TComDigest m_digest;
176};
177
178class SEIActiveParameterSets : public SEI
179{
180public:
181  PayloadType payloadType() const { return ACTIVE_PARAMETER_SETS; }
182
183  SEIActiveParameterSets() 
184    : activeVPSId            (0)
185    , m_selfContainedCvsFlag (false)
186    , m_noParameterSetUpdateFlag (false)
187    , numSpsIdsMinus1        (0)
188  {}
189  virtual ~SEIActiveParameterSets() {}
190
191  Int activeVPSId; 
192  Bool m_selfContainedCvsFlag;
193  Bool m_noParameterSetUpdateFlag;
194  Int numSpsIdsMinus1;
195  std::vector<Int> activeSeqParameterSetId; 
196#if R0247_SEI_ACTIVE
197  std::vector<Int> layerSpsIdx; 
198#endif
199};
200
201class SEIBufferingPeriod : public SEI
202{
203public:
204  PayloadType payloadType() const { return BUFFERING_PERIOD; }
205
206  SEIBufferingPeriod()
207  : m_bpSeqParameterSetId (0)
208  , m_rapCpbParamsPresentFlag (false)
209  , m_cpbDelayOffset      (0)
210  , m_dpbDelayOffset      (0)
211#if P0138_USE_ALT_CPB_PARAMS_FLAG
212  , m_useAltCpbParamsFlagPresent(false)
213  , m_useAltCpbParamsFlag (false)
214#endif
215  {
216    ::memset(m_initialCpbRemovalDelay, 0, sizeof(m_initialCpbRemovalDelay));
217    ::memset(m_initialCpbRemovalDelayOffset, 0, sizeof(m_initialCpbRemovalDelayOffset));
218    ::memset(m_initialAltCpbRemovalDelay, 0, sizeof(m_initialAltCpbRemovalDelay));
219    ::memset(m_initialAltCpbRemovalDelayOffset, 0, sizeof(m_initialAltCpbRemovalDelayOffset));
220  }
221  virtual ~SEIBufferingPeriod() {}
222
223  UInt m_bpSeqParameterSetId;
224  Bool m_rapCpbParamsPresentFlag;
225  UInt m_cpbDelayOffset;
226  UInt m_dpbDelayOffset;
227  UInt m_initialCpbRemovalDelay         [MAX_CPB_CNT][2];
228  UInt m_initialCpbRemovalDelayOffset   [MAX_CPB_CNT][2];
229  UInt m_initialAltCpbRemovalDelay      [MAX_CPB_CNT][2];
230  UInt m_initialAltCpbRemovalDelayOffset[MAX_CPB_CNT][2];
231  Bool m_concatenationFlag;
232  UInt m_auCpbRemovalDelayDelta;
233#if P0138_USE_ALT_CPB_PARAMS_FLAG
234  Bool m_useAltCpbParamsFlagPresent;
235  Bool m_useAltCpbParamsFlag;
236#endif
237};
238class SEIPictureTiming : public SEI
239{
240public:
241  PayloadType payloadType() const { return PICTURE_TIMING; }
242
243  SEIPictureTiming()
244  : m_picStruct               (0)
245  , m_sourceScanType          (0)
246  , m_duplicateFlag           (false)
247  , m_picDpbOutputDuDelay     (0)
248  , m_numNalusInDuMinus1      (NULL)
249  , m_duCpbRemovalDelayMinus1 (NULL)
250  {}
251  virtual ~SEIPictureTiming()
252  {
253    if( m_numNalusInDuMinus1 != NULL )
254    {
255      delete m_numNalusInDuMinus1;
256    }
257    if( m_duCpbRemovalDelayMinus1  != NULL )
258    {
259      delete m_duCpbRemovalDelayMinus1;
260    }
261  }
262
263  UInt  m_picStruct;
264  UInt  m_sourceScanType;
265  Bool  m_duplicateFlag;
266
267  UInt  m_auCpbRemovalDelay;
268  UInt  m_picDpbOutputDelay;
269  UInt  m_picDpbOutputDuDelay;
270  UInt  m_numDecodingUnitsMinus1;
271  Bool  m_duCommonCpbRemovalDelayFlag;
272  UInt  m_duCommonCpbRemovalDelayMinus1;
273  UInt* m_numNalusInDuMinus1;
274  UInt* m_duCpbRemovalDelayMinus1;
275};
276
277class SEIDecodingUnitInfo : public SEI
278{
279public:
280  PayloadType payloadType() const { return DECODING_UNIT_INFO; }
281
282  SEIDecodingUnitInfo()
283    : m_decodingUnitIdx(0)
284    , m_duSptCpbRemovalDelay(0)
285    , m_dpbOutputDuDelayPresentFlag(false)
286    , m_picSptDpbOutputDuDelay(0)
287  {}
288  virtual ~SEIDecodingUnitInfo() {}
289  Int m_decodingUnitIdx;
290  Int m_duSptCpbRemovalDelay;
291  Bool m_dpbOutputDuDelayPresentFlag;
292  Int m_picSptDpbOutputDuDelay;
293};
294
295class SEIRecoveryPoint : public SEI
296{
297public:
298  PayloadType payloadType() const { return RECOVERY_POINT; }
299
300  SEIRecoveryPoint() {}
301  virtual ~SEIRecoveryPoint() {}
302
303  Int  m_recoveryPocCnt;
304  Bool m_exactMatchingFlag;
305  Bool m_brokenLinkFlag;
306};
307
308class SEIFramePacking : public SEI
309{
310public:
311  PayloadType payloadType() const { return FRAME_PACKING; }
312
313  SEIFramePacking() {}
314  virtual ~SEIFramePacking() {}
315
316  Int  m_arrangementId;
317  Bool m_arrangementCancelFlag;
318  Int  m_arrangementType;
319  Bool m_quincunxSamplingFlag;
320  Int  m_contentInterpretationType;
321  Bool m_spatialFlippingFlag;
322  Bool m_frame0FlippedFlag;
323  Bool m_fieldViewsFlag;
324  Bool m_currentFrameIsFrame0Flag;
325  Bool m_frame0SelfContainedFlag;
326  Bool m_frame1SelfContainedFlag;
327  Int  m_frame0GridPositionX;
328  Int  m_frame0GridPositionY;
329  Int  m_frame1GridPositionX;
330  Int  m_frame1GridPositionY;
331  Int  m_arrangementReservedByte;
332  Bool m_arrangementPersistenceFlag;
333  Bool m_upsampledAspectRatio;
334};
335
336class SEISegmentedRectFramePacking : public SEI
337{
338public:
339  PayloadType payloadType() const { return SEGM_RECT_FRAME_PACKING; }
340
341  SEISegmentedRectFramePacking() {}
342  virtual ~SEISegmentedRectFramePacking() {}
343
344  Bool m_arrangementCancelFlag;
345  Int  m_contentInterpretationType;
346  Bool m_arrangementPersistenceFlag;
347};
348
349class SEIDisplayOrientation : public SEI
350{
351public:
352  PayloadType payloadType() const { return DISPLAY_ORIENTATION; }
353
354  SEIDisplayOrientation()
355    : cancelFlag(true)
356    , persistenceFlag(0)
357    , extensionFlag(false)
358    {}
359  virtual ~SEIDisplayOrientation() {}
360
361  Bool cancelFlag;
362  Bool horFlip;
363  Bool verFlip;
364
365  UInt anticlockwiseRotation;
366  Bool persistenceFlag;
367  Bool extensionFlag;
368};
369
370class SEITemporalLevel0Index : public SEI
371{
372public:
373  PayloadType payloadType() const { return TEMPORAL_LEVEL0_INDEX; }
374
375  SEITemporalLevel0Index()
376    : tl0Idx(0)
377    , rapIdx(0)
378    {}
379  virtual ~SEITemporalLevel0Index() {}
380
381  UInt tl0Idx;
382  UInt rapIdx;
383};
384
385class SEIGradualDecodingRefreshInfo : public SEI
386{
387public:
388  PayloadType payloadType() const { return REGION_REFRESH_INFO; }
389
390  SEIGradualDecodingRefreshInfo()
391    : m_gdrForegroundFlag(0)
392  {}
393  virtual ~SEIGradualDecodingRefreshInfo() {}
394
395  Bool m_gdrForegroundFlag;
396};
397
398class SEINoDisplay : public SEI
399{
400public:
401  PayloadType payloadType() const { return NO_DISPLAY; }
402
403  SEINoDisplay()
404    : m_noDisplay(false)
405  {}
406  virtual ~SEINoDisplay() {}
407
408  Bool m_noDisplay;
409};
410
411class SEISOPDescription : public SEI
412{
413public:
414  PayloadType payloadType() const { return SOP_DESCRIPTION; }
415
416  SEISOPDescription() {}
417  virtual ~SEISOPDescription() {}
418
419  UInt m_sopSeqParameterSetId;
420  UInt m_numPicsInSopMinus1;
421
422  UInt m_sopDescVclNaluType[MAX_NUM_PICS_IN_SOP];
423  UInt m_sopDescTemporalId[MAX_NUM_PICS_IN_SOP];
424  UInt m_sopDescStRpsIdx[MAX_NUM_PICS_IN_SOP];
425  Int m_sopDescPocDelta[MAX_NUM_PICS_IN_SOP];
426};
427
428class SEIToneMappingInfo : public SEI
429{
430public:
431  PayloadType payloadType() const { return TONE_MAPPING_INFO; }
432  SEIToneMappingInfo() {}
433  virtual ~SEIToneMappingInfo() {}
434
435  Int    m_toneMapId;
436  Bool   m_toneMapCancelFlag;
437  Bool   m_toneMapPersistenceFlag;
438  Int    m_codedDataBitDepth;
439  Int    m_targetBitDepth;
440  Int    m_modelId;
441  Int    m_minValue;
442  Int    m_maxValue;
443  Int    m_sigmoidMidpoint;
444  Int    m_sigmoidWidth;
445  std::vector<Int> m_startOfCodedInterval;
446  Int    m_numPivots;
447  std::vector<Int> m_codedPivotValue;
448  std::vector<Int> m_targetPivotValue;
449  Int    m_cameraIsoSpeedIdc;
450  Int    m_cameraIsoSpeedValue;
451  Int    m_exposureIndexIdc;
452  Int    m_exposureIndexValue;
453  Int    m_exposureCompensationValueSignFlag;
454  Int    m_exposureCompensationValueNumerator;
455  Int    m_exposureCompensationValueDenomIdc;
456  Int    m_refScreenLuminanceWhite;
457  Int    m_extendedRangeWhiteLevel;
458  Int    m_nominalBlackLevelLumaCodeValue;
459  Int    m_nominalWhiteLevelLumaCodeValue;
460  Int    m_extendedWhiteLevelLumaCodeValue;
461};
462
463class SEIKneeFunctionInfo : public SEI
464{
465public:
466  PayloadType payloadType() const { return KNEE_FUNCTION_INFO; }
467  SEIKneeFunctionInfo() {}
468  virtual ~SEIKneeFunctionInfo() {}
469
470  Int   m_kneeId;
471  Bool  m_kneeCancelFlag;
472  Bool  m_kneePersistenceFlag;
473  Int   m_kneeInputDrange;
474  Int   m_kneeInputDispLuminance;
475  Int   m_kneeOutputDrange;
476  Int   m_kneeOutputDispLuminance;
477  Int   m_kneeNumKneePointsMinus1;
478  std::vector<Int> m_kneeInputKneePoint;
479  std::vector<Int> m_kneeOutputKneePoint;
480};
481
482class SEIChromaSamplingFilterHint : public SEI
483{
484public:
485  PayloadType payloadType() const {return CHROMA_SAMPLING_FILTER_HINT;}
486  SEIChromaSamplingFilterHint() {}
487  virtual ~SEIChromaSamplingFilterHint() {
488    if(m_verChromaFilterIdc == 1)
489    {
490      for(Int i = 0; i < m_numVerticalFilters; i ++)
491      {
492        free(m_verFilterCoeff[i]);
493      }
494      free(m_verFilterCoeff);
495      free(m_verTapLengthMinus1);
496    }
497    if(m_horChromaFilterIdc == 1)
498    {
499      for(Int i = 0; i < m_numHorizontalFilters; i ++)
500      {
501        free(m_horFilterCoeff[i]);
502      }
503      free(m_horFilterCoeff);
504      free(m_horTapLengthMinus1);
505    }
506  }
507
508  Int   m_verChromaFilterIdc;
509  Int   m_horChromaFilterIdc;
510  Bool  m_verFilteringProcessFlag;
511  Int   m_targetFormatIdc;
512  Bool  m_perfectReconstructionFlag;
513  Int   m_numVerticalFilters;
514  Int*  m_verTapLengthMinus1;
515  Int** m_verFilterCoeff;
516  Int   m_numHorizontalFilters;
517  Int*  m_horTapLengthMinus1;
518  Int** m_horFilterCoeff;
519};
520
521class SEIMasteringDisplayColourVolume : public SEI
522{
523public:
524    PayloadType payloadType() const { return MASTERING_DISPLAY_COLOUR_VOLUME; }
525    SEIMasteringDisplayColourVolume() {}
526    virtual ~SEIMasteringDisplayColourVolume(){}
527   
528    TComSEIMasteringDisplay values;
529};
530
531typedef std::list<SEI*> SEIMessages;
532
533/// output a selection of SEI messages by payload type. Ownership stays in original message list.
534SEIMessages getSeisByType(SEIMessages &seiList, SEI::PayloadType seiType);
535
536/// remove a selection of SEI messages by payload type from the original list and return them in a new list.
537SEIMessages extractSeisByType(SEIMessages &seiList, SEI::PayloadType seiType);
538
539/// delete list of SEI messages (freeing the referenced objects)
540Void deleteSEIs (SEIMessages &seiList);
541
542class SEIScalableNesting : public SEI
543{
544public:
545  PayloadType payloadType() const { return SCALABLE_NESTING; }
546
547  SEIScalableNesting()
548    : m_callerOwnsSEIs(false)
549  {}
550  virtual ~SEIScalableNesting()
551  {
552    if (!m_callerOwnsSEIs)
553    {
554      deleteSEIs(m_nestedSEIs);
555    }
556  }
557
558  Bool  m_bitStreamSubsetFlag;
559  Bool  m_nestingOpFlag;
560  Bool  m_defaultOpFlag;                             //value valid if m_nestingOpFlag != 0
561  UInt  m_nestingNumOpsMinus1;                       // -"-
562  UInt  m_nestingMaxTemporalIdPlus1[MAX_TLAYER];     // -"-
563  UInt  m_nestingOpIdx[MAX_NESTING_NUM_OPS];         // -"-
564
565  Bool  m_allLayersFlag;                             //value valid if m_nestingOpFlag == 0
566  UInt  m_nestingNoOpMaxTemporalIdPlus1;             //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0
567  UInt  m_nestingNumLayersMinus1;                    //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0
568  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
569
570  Bool  m_callerOwnsSEIs;
571  SEIMessages m_nestedSEIs;
572};
573
574class SEITimeCode : public SEI
575{
576public:
577  PayloadType payloadType() const { return TIME_CODE; }
578  SEITimeCode() {}
579  virtual ~SEITimeCode(){}
580
581  UInt numClockTs;
582  TComSEITimeSet timeSetArray[MAX_TIMECODE_SEI_SETS];
583};
584
585//definition according to P1005_v1;
586class SEITempMotionConstrainedTileSets: public SEI
587{
588  struct TileSetData
589  {
590    protected:
591      std::vector<Int> m_top_left_tile_index;  //[tileSetIdx][tileIdx];
592      std::vector<Int> m_bottom_right_tile_index;
593
594    public:
595      Int     m_mcts_id; 
596      Bool    m_display_tile_set_flag;
597      Int     m_num_tile_rects_in_set; //_minus1;
598      Bool    m_exact_sample_value_match_flag;
599      Bool    m_mcts_tier_level_idc_present_flag;
600      Bool    m_mcts_tier_flag;
601      Int     m_mcts_level_idc;
602
603      Void setNumberOfTileRects(const Int number)
604      {
605        m_top_left_tile_index    .resize(number);
606        m_bottom_right_tile_index.resize(number);
607      }
608
609      Int  getNumberOfTileRects() const
610      {
611        assert(m_top_left_tile_index.size() == m_bottom_right_tile_index.size());
612        return Int(m_top_left_tile_index.size());
613      }
614
615            Int &topLeftTileIndex    (const Int tileRectIndex)       { return m_top_left_tile_index    [tileRectIndex]; }
616            Int &bottomRightTileIndex(const Int tileRectIndex)       { return m_bottom_right_tile_index[tileRectIndex]; }
617      const Int &topLeftTileIndex    (const Int tileRectIndex) const { return m_top_left_tile_index    [tileRectIndex]; }
618      const Int &bottomRightTileIndex(const Int tileRectIndex) const { return m_bottom_right_tile_index[tileRectIndex]; }
619  };
620
621protected:
622  std::vector<TileSetData> m_tile_set_data;
623
624public:
625
626  Bool    m_mc_all_tiles_exact_sample_value_match_flag;
627  Bool    m_each_tile_one_tile_set_flag;
628  Bool    m_limited_tile_set_display_flag;
629  Bool    m_max_mcs_tier_level_idc_present_flag;
630  Bool    m_max_mcts_tier_flag;
631  Int     m_max_mcts_level_idc;
632
633  PayloadType payloadType() const { return TEMP_MOTION_CONSTRAINED_TILE_SETS; }
634
635  Void setNumberOfTileSets(const Int number)       { m_tile_set_data.resize(number);     }
636  Int  getNumberOfTileSets()                 const { return Int(m_tile_set_data.size()); }
637
638        TileSetData &tileSetData (const Int index)       { return m_tile_set_data[index]; }
639  const TileSetData &tileSetData (const Int index) const { return m_tile_set_data[index]; }
640
641};
642
643#if Q0078_ADD_LAYER_SETS
644class SEIOutputLayerSetNesting : public SEI
645{
646public:
647  PayloadType payloadType() const { return OUTPUT_LAYER_SET_NESTING; }
648
649  SEIOutputLayerSetNesting()
650    : m_callerOwnsSEIs(false)
651  {}
652
653  virtual ~SEIOutputLayerSetNesting()
654  {
655    if (!m_callerOwnsSEIs)
656    {
657      deleteSEIs(m_nestedSEIs);
658    }
659  }
660
661  Bool m_olsFlag;
662  UInt m_numOlsIndicesMinus1;
663  UInt m_olsIdx[1024];
664  Bool  m_callerOwnsSEIs;
665  SEIMessages m_nestedSEIs;
666};
667
668class SEIVPSRewriting : public SEI
669{
670public:
671  PayloadType payloadType() const { return VPS_REWRITING; }
672
673  SEIVPSRewriting() {}
674  virtual ~SEIVPSRewriting() {}
675
676  NALUnit* nalu;
677};
678#endif
679
680#if P0123_ALPHA_CHANNEL_SEI
681class SEIAlphaChannelInfo : public SEI
682{
683public:
684  PayloadType payloadType() const { return ALPHA_CHANNEL_INFO; }
685  SEIAlphaChannelInfo() {}
686  virtual ~SEIAlphaChannelInfo() {}
687  Bool m_alphaChannelCancelFlag;
688  UInt m_alphaChannelUseIdc;
689  UInt m_alphaChannelBitDepthMinus8;
690  UInt m_alphaTransparentValue;
691  UInt m_alphaOpaqueValue;
692  Bool m_alphaChannelIncrFlag;
693  Bool m_alphaChannelClipFlag;
694  Bool m_alphaChannelClipTypeFlag;
695};
696#endif
697
698#if Q0096_OVERLAY_SEI
699class SEIOverlayInfo : public SEI
700{
701public:
702  PayloadType payloadType() const { return OVERLAY_INFO; }
703  SEIOverlayInfo() 
704    :  m_numOverlaysMinus1(-1) 
705    {}
706
707  virtual ~SEIOverlayInfo() 
708  {
709    for (Int i=0 ; i<=m_numOverlaysMinus1 ; i++)
710    { 
711      delete [] m_overlayLanguage[i];         
712      delete [] m_overlayName[i];
713      for (Int j=0 ; j<=m_numOverlayElementsMinus1[i] ; j++)
714      {
715        delete [] m_overlayElementName[i][j];
716      }
717    }
718  }
719
720  Bool                                m_overlayInfoCancelFlag;
721  UInt                                m_overlayContentAuxIdMinus128;
722  UInt                                m_overlayLabelAuxIdMinus128;
723  UInt                                m_overlayAlphaAuxIdMinus128;
724  UInt                                m_overlayElementLabelValueLengthMinus8;
725  UInt                                m_numOverlaysMinus1;
726  std::vector<UInt>                   m_overlayIdx;
727  std::vector<Bool>                   m_languageOverlayPresentFlag;
728  std::vector<UInt>                   m_overlayContentLayerId;
729  std::vector<Bool>                   m_overlayLabelPresentFlag;
730  std::vector<UInt>                   m_overlayLabelLayerId;
731  std::vector<Bool>                   m_overlayAlphaPresentFlag;
732  std::vector<UInt>                   m_overlayAlphaLayerId;
733  std::vector<UInt>                   m_numOverlayElementsMinus1;
734  std::vector< std::vector<UInt> >    m_overlayElementLabelMin;
735  std::vector< std::vector<UInt> >    m_overlayElementLabelMax;
736  std::vector<UChar*>                 m_overlayLanguage;
737  std::vector<UInt>                   m_overlayLanguageLength;
738  std::vector<UChar*>                 m_overlayName;
739  std::vector<UInt>                   m_overlayNameLength;
740  std::vector< std::vector<UChar*> >  m_overlayElementName;
741  std::vector< std::vector<UInt> >    m_overlayElementNameLength;
742  Bool                                m_overlayInfoPersistenceFlag;
743};
744#endif
745
746#if LAYERS_NOT_PRESENT_SEI
747class SEILayersNotPresent : public SEI
748{
749public:
750  PayloadType payloadType() const { return LAYERS_NOT_PRESENT; }
751
752  SEILayersNotPresent() {}
753  virtual ~SEILayersNotPresent() {}
754
755  UInt m_activeVpsId;
756  UInt m_vpsMaxLayers;
757  Bool m_layerNotPresentFlag[MAX_LAYERS];
758};
759#endif
760
761#if Q0074_COLOUR_REMAPPING_SEI
762class SEIColourRemappingInfo : public SEI
763{
764public:
765  PayloadType payloadType() const { return COLOUR_REMAPPING_INFO; }
766  SEIColourRemappingInfo() {}
767  ~SEIColourRemappingInfo() {}
768
769  Void  copyFrom( SEIColourRemappingInfo const * SeiCriInput);
770 
771  Int   m_colourRemapId;
772  Bool  m_colourRemapCancelFlag;
773  Bool  m_colourRemapPersistenceFlag;
774  Bool  m_colourRemapVideoSignalInfoPresentFlag;
775  Bool  m_colourRemapFullRangeFlag;
776  Int   m_colourRemapPrimaries;
777  Int   m_colourRemapTransferFunction;
778  Int   m_colourRemapMatrixCoefficients;
779  Int   m_colourRemapInputBitDepth;
780  Int   m_colourRemapBitDepth;
781  Int   m_preLutNumValMinus1[3];
782  std::vector<Int> m_preLutCodedValue[3];
783  std::vector<Int> m_preLutTargetValue[3];
784  Bool  m_colourRemapMatrixPresentFlag;
785  Int   m_log2MatrixDenom;
786  Int   m_colourRemapCoeffs[3][3];
787  Int   m_postLutNumValMinus1[3];
788  std::vector<Int> m_postLutCodedValue[3];
789  std::vector<Int> m_postLutTargetValue[3];
790};
791#endif
792
793#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
794class SEIInterLayerConstrainedTileSets : public SEI
795{
796public:
797  PayloadType payloadType() const { return INTER_LAYER_CONSTRAINED_TILE_SETS; }
798
799  SEIInterLayerConstrainedTileSets() {}
800  virtual ~SEIInterLayerConstrainedTileSets() {}
801
802  Bool m_ilAllTilesExactSampleValueMatchFlag;
803  Bool m_ilOneTilePerTileSetFlag;
804  UInt m_ilNumSetsInMessageMinus1;
805  Bool m_skippedTileSetPresentFlag;
806  UInt m_ilctsId[256];
807  UInt m_ilNumTileRectsInSetMinus1[256];
808  UInt m_ilTopLeftTileIndex[256][440];
809  UInt m_ilBottomRightTileIndex[256][440];
810  UInt m_ilcIdc[256];
811  Bool m_ilExactSampleValueMatchFlag[256];
812  UInt m_allTilesIlcIdc;
813};
814#endif
815
816#if SUB_BITSTREAM_PROPERTY_SEI
817class SEISubBitstreamProperty : public SEI
818{
819public:
820  PayloadType payloadType() const { return SUB_BITSTREAM_PROPERTY; }
821
822  SEISubBitstreamProperty();
823  virtual ~SEISubBitstreamProperty() {}
824
825  Int  m_activeVpsId;
826  Int  m_numAdditionalSubStreams;
827  Int  m_subBitstreamMode       [MAX_SUB_STREAMS];
828  Int  m_outputLayerSetIdxToVps [MAX_SUB_STREAMS];
829  Int  m_highestSublayerId      [MAX_SUB_STREAMS];
830  Int  m_avgBitRate             [MAX_SUB_STREAMS];
831  Int  m_maxBitRate             [MAX_SUB_STREAMS];
832};
833#endif
834
835#if Q0189_TMVP_CONSTRAINTS
836class SEITMVPConstrains : public SEI
837{
838public:
839  PayloadType payloadType() const { return TMVP_CONSTRAINTS; }
840
841  SEITMVPConstrains()
842    : prev_pics_not_used_flag(0),no_intra_layer_col_pic_flag(0)
843    {}
844
845  virtual ~SEITMVPConstrains()
846  {
847  }
848
849  UInt prev_pics_not_used_flag;
850  UInt no_intra_layer_col_pic_flag;
851};
852#endif
853
854#if Q0247_FRAME_FIELD_INFO
855class SEIFrameFieldInfo: public SEI
856{
857public:
858  PayloadType payloadType() const { return FRAME_FIELD_INFO; }
859
860  SEIFrameFieldInfo()
861    : m_ffinfo_picStruct(0),m_ffinfo_sourceScanType(0), m_ffinfo_duplicateFlag(false)
862    {}
863
864  virtual ~SEIFrameFieldInfo()
865  {
866  }
867
868  UInt  m_ffinfo_picStruct;
869  UInt  m_ffinfo_sourceScanType;
870  Bool  m_ffinfo_duplicateFlag;
871};
872#endif
873
874#if O0164_MULTI_LAYER_HRD
875class SEIBspNesting : public SEI
876{
877public:
878  PayloadType payloadType() const { return BSP_NESTING; }
879
880  SEIBspNesting()
881    : m_callerOwnsSEIs(false)
882  {}
883  virtual ~SEIBspNesting()
884  {
885    if (!m_callerOwnsSEIs)
886    {
887      deleteSEIs(m_nestedSEIs);
888    }
889  }
890
891  Int  m_bspIdx;
892  Bool  m_callerOwnsSEIs;
893  SEIMessages m_nestedSEIs;
894#if VPS_VUI_BSP_HRD_PARAMS
895  Int  m_seiPartitioningSchemeIdx;
896  Int  m_seiOlsIdx;
897#endif
898};
899
900class SEIBspInitialArrivalTime : public SEI
901{
902public:
903  PayloadType payloadType() const { return BSP_INITIAL_ARRIVAL_TIME; }
904
905  SEIBspInitialArrivalTime () {}
906  virtual ~SEIBspInitialArrivalTime () {}
907
908  UInt m_nalInitialArrivalDelay[256];
909  UInt m_vclInitialArrivalDelay[256];
910};
911
912#if !REMOVE_BSP_HRD_SEI
913class SEIBspHrd : public SEI
914{
915public:
916  PayloadType payloadType() const { return BSP_HRD; }
917
918  SEIBspHrd () {}
919  virtual ~SEIBspHrd () {}
920
921  UInt m_seiNumBspHrdParametersMinus1;
922  Bool m_seiBspCprmsPresentFlag[MAX_VPS_LAYER_SETS_PLUS1];
923  UInt m_seiNumBitstreamPartitionsMinus1[MAX_VPS_LAYER_SETS_PLUS1];
924  Bool m_seiLayerInBspFlag[MAX_VPS_LAYER_SETS_PLUS1][8][MAX_LAYERS];
925  UInt m_seiNumBspSchedCombinationsMinus1[MAX_VPS_LAYER_SETS_PLUS1];
926  UInt m_seiBspCombHrdIdx[MAX_VPS_LAYER_SETS_PLUS1][16][16];
927  UInt m_seiBspCombScheddx[MAX_VPS_LAYER_SETS_PLUS1][16][16];
928  UInt m_vpsMaxLayers;
929  Bool m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_IDX_PLUS1];
930
931  TComHRD *hrd;
932};
933#endif
934
935#endif
936
937#endif
938//! \}
Note: See TracBrowser for help on using the repository browser.