HEVC Test Model (HM)  HM-16.3
SEI.cpp
Go to the documentation of this file.
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-2015, 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 
38 #include "CommonDef.h"
39 #include "SEI.h"
40 
41 //Table D-7 Meaning of camera iso sensitivity indicator and exposure index rating indicator
42 Int Table_exp_indicator[32] = {0, 10, 12, 16, 20, 25, 32, 40, 50, 64, 80, 100, 125, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 8000, -1};
43 
45 {
46  SEIMessages result;
47 
48  for (SEIMessages::iterator it=seiList.begin(); it!=seiList.end(); it++)
49  {
50  if ((*it)->payloadType() == seiType)
51  {
52  result.push_back(*it);
53  }
54  }
55  return result;
56 }
57 
59 {
60  SEIMessages result;
61 
62  SEIMessages::iterator it=seiList.begin();
63  while ( it!=seiList.end() )
64  {
65  if ((*it)->payloadType() == seiType)
66  {
67  result.push_back(*it);
68  it = seiList.erase(it);
69  }
70  else
71  {
72  it++;
73  }
74  }
75  return result;
76 }
77 
78 
80 {
81  for (SEIMessages::iterator it=seiList.begin(); it!=seiList.end(); it++)
82  {
83  delete (*it);
84  }
85  seiList.clear();
86 }
87 
88 
89 // Static member
91 {
92  switch (payloadType)
93  {
94  case SEI::BUFFERING_PERIOD: return "Buffering period";
95  case SEI::PICTURE_TIMING: return "Picture timing";
96  case SEI::PAN_SCAN_RECT: return "Pan-scan rectangle"; // not currently decoded
97  case SEI::FILLER_PAYLOAD: return "Filler payload"; // not currently decoded
98  case SEI::USER_DATA_REGISTERED_ITU_T_T35: return "User data registered"; // not currently decoded
99  case SEI::USER_DATA_UNREGISTERED: return "User data unregistered";
100  case SEI::RECOVERY_POINT: return "Recovery point";
101  case SEI::SCENE_INFO: return "Scene information"; // not currently decoded
102  case SEI::FULL_FRAME_SNAPSHOT: return "Picture snapshot"; // not currently decoded
103  case SEI::PROGRESSIVE_REFINEMENT_SEGMENT_START: return "Progressive refinement segment start"; // not currently decoded
104  case SEI::PROGRESSIVE_REFINEMENT_SEGMENT_END: return "Progressive refinement segment end"; // not currently decoded
105  case SEI::FILM_GRAIN_CHARACTERISTICS: return "Film grain characteristics"; // not currently decoded
106  case SEI::POST_FILTER_HINT: return "Post filter hint"; // not currently decoded
107  case SEI::TONE_MAPPING_INFO: return "Tone mapping information";
108  case SEI::KNEE_FUNCTION_INFO: return "Knee function information";
109  case SEI::FRAME_PACKING: return "Frame packing arrangement";
110  case SEI::DISPLAY_ORIENTATION: return "Display orientation";
111  case SEI::SOP_DESCRIPTION: return "Structure of pictures information";
112  case SEI::ACTIVE_PARAMETER_SETS: return "Active parameter sets";
113  case SEI::DECODING_UNIT_INFO: return "Decoding unit information";
114  case SEI::TEMPORAL_LEVEL0_INDEX: return "Temporal sub-layer zero index";
115  case SEI::DECODED_PICTURE_HASH: return "Decoded picture hash";
116  case SEI::SCALABLE_NESTING: return "Scalable nesting";
117  case SEI::REGION_REFRESH_INFO: return "Region refresh information";
118  case SEI::NO_DISPLAY: return "No display";
119  case SEI::TIME_CODE: return "Time code";
120  case SEI::MASTERING_DISPLAY_COLOUR_VOLUME: return "Mastering display colour volume";
121  case SEI::SEGM_RECT_FRAME_PACKING: return "Segmented rectangular frame packing arrangement";
122  case SEI::TEMP_MOTION_CONSTRAINED_TILE_SETS: return "Temporal motion constrained tile sets";
123  case SEI::CHROMA_SAMPLING_FILTER_HINT: return "Chroma sampling filter hint";
124  default: return "Unknown";
125  }
126 }
PayloadType
Definition: SEI.h:55
Defines constants, macros and tool parameters.
void Void
Definition: TypeDef.h:285
static const Char * getSEIMessageString(SEI::PayloadType payloadType)
Definition: SEI.cpp:90
Void deleteSEIs(SEIMessages &seiList)
delete list of SEI messages (freeing the referenced objects)
Definition: SEI.cpp:79
SEIMessages getSeisByType(SEIMessages &seiList, SEI::PayloadType seiType)
output a selection of SEI messages by payload type. Ownership stays in original message list...
Definition: SEI.cpp:44
char Char
Definition: TypeDef.h:291
SEIMessages extractSeisByType(SEIMessages &seiList, SEI::PayloadType seiType)
remove a selection of SEI messages by payload type from the original list and return them in a new li...
Definition: SEI.cpp:58
Int Table_exp_indicator[32]
Definition: SEI.cpp:42
std::list< SEI * > SEIMessages
Definition: SEI.h:479
int Int
Definition: TypeDef.h:296