HEVC Test Model (HM)  HM-16.3
SEIread.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 
39 #include "TLibCommon/CommonDef.h"
41 #include "TLibCommon/SEI.h"
42 #include "TLibCommon/TComSlice.h"
43 #include "SyntaxElementParser.h"
44 #include "SEIread.h"
45 #include "TLibCommon/TComPicYuv.h"
46 #include <iomanip>
47 
48 
51 
52 
53 #if ENC_DEC_TRACE
55 {
56  fprintf( g_hTrace, "=========== SEI message ===========\n");
57 }
58 
60 {
61  fprintf( g_hTrace, "=========== %s SEI message ===========\n", SEI::getSEIMessageString(payloadType));
62 }
63 #endif
64 
65 Void SEIReader::sei_read_code(std::ostream *pOS, UInt uiLength, UInt& ruiCode, const Char *pSymbolName)
66 {
67  READ_CODE(uiLength, ruiCode, pSymbolName);
68  if (pOS)
69  {
70  (*pOS) << " " << std::setw(55) << pSymbolName << ": " << ruiCode << "\n";
71  }
72 }
73 
74 Void SEIReader::sei_read_uvlc(std::ostream *pOS, UInt& ruiCode, const Char *pSymbolName)
75 {
76  READ_UVLC(ruiCode, pSymbolName);
77  if (pOS)
78  {
79  (*pOS) << " " << std::setw(55) << pSymbolName << ": " << ruiCode << "\n";
80  }
81 }
82 
83 Void SEIReader::sei_read_svlc(std::ostream *pOS, Int& ruiCode, const Char *pSymbolName)
84 {
85  READ_SVLC(ruiCode, pSymbolName);
86  if (pOS)
87  {
88  (*pOS) << " " << std::setw(55) << pSymbolName << ": " << ruiCode << "\n";
89  }
90 }
91 
92 Void SEIReader::sei_read_flag(std::ostream *pOS, UInt& ruiCode, const Char *pSymbolName)
93 {
94  READ_FLAG(ruiCode, pSymbolName);
95  if (pOS)
96  {
97  (*pOS) << " " << std::setw(55) << pSymbolName << ": " << (ruiCode?1:0) << "\n";
98  }
99 }
100 
101 static inline Void output_sei_message_header(SEI &sei, std::ostream *pDecodedMessageOutputStream, UInt payloadSize)
102 {
103  if (pDecodedMessageOutputStream)
104  {
105  std::string seiMessageHdr(SEI::getSEIMessageString(sei.payloadType())); seiMessageHdr+=" SEI message";
106  (*pDecodedMessageOutputStream) << std::setfill('-') << std::setw(seiMessageHdr.size()) << "-" << std::setfill(' ') << "\n" << seiMessageHdr << "\n";
107  }
108 }
109 
110 #undef READ_CODE
111 #undef READ_SVLC
112 #undef READ_UVLC
113 #undef READ_FLAG
114 
115 
119 Void SEIReader::parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream)
120 {
121  setBitstream(bs);
122 
124  do
125  {
126  xReadSEImessage(seis, nalUnitType, sps, pDecodedMessageOutputStream);
127 
128  /* SEI messages are an integer number of bytes, something has failed
129  * in the parsing if bitstream not byte-aligned */
131  }
132  while (m_pcBitstream->getNumBitsLeft() > 8);
133 
134  UInt rbspTrailingBits;
135  sei_read_code(NULL, 8, rbspTrailingBits, "rbsp_trailing_bits");
136  assert(rbspTrailingBits == 0x80);
137 }
138 
139 Void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream)
140 {
141 #if ENC_DEC_TRACE
142  xTraceSEIHeader();
143 #endif
144  Int payloadType = 0;
145  UInt val = 0;
146 
147  do
148  {
149  sei_read_code(NULL, 8, val, "payload_type");
150  payloadType += val;
151  } while (val==0xFF);
152 
153  UInt payloadSize = 0;
154  do
155  {
156  sei_read_code(NULL, 8, val, "payload_size");
157  payloadSize += val;
158  } while (val==0xFF);
159 
160 #if ENC_DEC_TRACE
162 #endif
163 
164  /* extract the payload for this single SEI message.
165  * This allows greater safety in erroneous parsing of an SEI message
166  * from affecting subsequent messages.
167  * After parsing the payload, bs needs to be restored as the primary
168  * bitstream.
169  */
171  setBitstream(bs->extractSubstream(payloadSize * 8));
172 
173  SEI *sei = NULL;
174 
175  if(nalUnitType == NAL_UNIT_PREFIX_SEI)
176  {
177  switch (payloadType)
178  {
180  sei = new SEIuserDataUnregistered;
181  xParseSEIuserDataUnregistered((SEIuserDataUnregistered&) *sei, payloadSize, pDecodedMessageOutputStream);
182  break;
184  sei = new SEIActiveParameterSets;
185  xParseSEIActiveParameterSets((SEIActiveParameterSets&) *sei, payloadSize, pDecodedMessageOutputStream);
186  break;
188  if (!sps)
189  {
190  printf ("Warning: Found Decoding unit SEI message, but no active SPS is available. Ignoring.");
191  }
192  else
193  {
194  sei = new SEIDecodingUnitInfo;
195  xParseSEIDecodingUnitInfo((SEIDecodingUnitInfo&) *sei, payloadSize, sps, pDecodedMessageOutputStream);
196  }
197  break;
199  if (!sps)
200  {
201  printf ("Warning: Found Buffering period SEI message, but no active SPS is available. Ignoring.");
202  }
203  else
204  {
205  sei = new SEIBufferingPeriod;
206  xParseSEIBufferingPeriod((SEIBufferingPeriod&) *sei, payloadSize, sps, pDecodedMessageOutputStream);
207  }
208  break;
209  case SEI::PICTURE_TIMING:
210  if (!sps)
211  {
212  printf ("Warning: Found Picture timing SEI message, but no active SPS is available. Ignoring.");
213  }
214  else
215  {
216  sei = new SEIPictureTiming;
217  xParseSEIPictureTiming((SEIPictureTiming&)*sei, payloadSize, sps, pDecodedMessageOutputStream);
218  }
219  break;
220  case SEI::RECOVERY_POINT:
221  sei = new SEIRecoveryPoint;
222  xParseSEIRecoveryPoint((SEIRecoveryPoint&) *sei, payloadSize, pDecodedMessageOutputStream);
223  break;
224  case SEI::FRAME_PACKING:
225  sei = new SEIFramePacking;
226  xParseSEIFramePacking((SEIFramePacking&) *sei, payloadSize, pDecodedMessageOutputStream);
227  break;
230  xParseSEISegmentedRectFramePacking((SEISegmentedRectFramePacking&) *sei, payloadSize, pDecodedMessageOutputStream);
231  break;
233  sei = new SEIDisplayOrientation;
234  xParseSEIDisplayOrientation((SEIDisplayOrientation&) *sei, payloadSize, pDecodedMessageOutputStream);
235  break;
237  sei = new SEITemporalLevel0Index;
238  xParseSEITemporalLevel0Index((SEITemporalLevel0Index&) *sei, payloadSize, pDecodedMessageOutputStream);
239  break;
242  xParseSEIRegionRefreshInfo((SEIGradualDecodingRefreshInfo&) *sei, payloadSize, pDecodedMessageOutputStream);
243  break;
244  case SEI::NO_DISPLAY:
245  sei = new SEINoDisplay;
246  xParseSEINoDisplay((SEINoDisplay&) *sei, payloadSize, pDecodedMessageOutputStream);
247  break;
249  sei = new SEIToneMappingInfo;
250  xParseSEIToneMappingInfo((SEIToneMappingInfo&) *sei, payloadSize, pDecodedMessageOutputStream);
251  break;
253  sei = new SEISOPDescription;
254  xParseSEISOPDescription((SEISOPDescription&) *sei, payloadSize, pDecodedMessageOutputStream);
255  break;
257  sei = new SEIScalableNesting;
258  xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, sps, pDecodedMessageOutputStream);
259  break;
262  xParseSEITempMotionConstraintsTileSets((SEITempMotionConstrainedTileSets&) *sei, payloadSize, pDecodedMessageOutputStream);
263  break;
264  case SEI::TIME_CODE:
265  sei = new SEITimeCode;
266  xParseSEITimeCode((SEITimeCode&) *sei, payloadSize, pDecodedMessageOutputStream);
267  break;
269  sei = new SEIChromaSamplingFilterHint;
270  xParseSEIChromaSamplingFilterHint((SEIChromaSamplingFilterHint&) *sei, payloadSize/*, sps*/, pDecodedMessageOutputStream);
271  //}
272  break;
274  sei = new SEIKneeFunctionInfo;
275  xParseSEIKneeFunctionInfo((SEIKneeFunctionInfo&) *sei, payloadSize, pDecodedMessageOutputStream);
276  break;
279  xParseSEIMasteringDisplayColourVolume((SEIMasteringDisplayColourVolume&) *sei, payloadSize, pDecodedMessageOutputStream);
280  break;
281  default:
282  for (UInt i = 0; i < payloadSize; i++)
283  {
284  UInt seiByte;
285  sei_read_code (NULL, 8, seiByte, "unknown prefix SEI payload byte");
286  }
287  printf ("Unknown prefix SEI message (payloadType = %d) was found!\n", payloadType);
288  if (pDecodedMessageOutputStream)
289  {
290  (*pDecodedMessageOutputStream) << "Unknown prefix SEI message (payloadType = " << payloadType << ") was found!\n";
291  }
292  break;
293  }
294  }
295  else
296  {
297  switch (payloadType)
298  {
300  sei = new SEIuserDataUnregistered;
301  xParseSEIuserDataUnregistered((SEIuserDataUnregistered&) *sei, payloadSize, pDecodedMessageOutputStream);
302  break;
304  sei = new SEIDecodedPictureHash;
305  xParseSEIDecodedPictureHash((SEIDecodedPictureHash&) *sei, payloadSize, pDecodedMessageOutputStream);
306  break;
307  default:
308  for (UInt i = 0; i < payloadSize; i++)
309  {
310  UInt seiByte;
311  sei_read_code( NULL, 8, seiByte, "unknown suffix SEI payload byte");
312  }
313  printf ("Unknown suffix SEI message (payloadType = %d) was found!\n", payloadType);
314  if (pDecodedMessageOutputStream)
315  {
316  (*pDecodedMessageOutputStream) << "Unknown suffix SEI message (payloadType = " << payloadType << ") was found!\n";
317  }
318  break;
319  }
320  }
321 
322  if (sei != NULL)
323  {
324  seis.push_back(sei);
325  }
326 
327  /* By definition the underlying bitstream terminates in a byte-aligned manner.
328  * 1. Extract all bar the last MIN(bitsremaining,nine) bits as reserved_payload_extension_data
329  * 2. Examine the final 8 bits to determine the payload_bit_equal_to_one marker
330  * 3. Extract the remainingreserved_payload_extension_data bits.
331  *
332  * If there are fewer than 9 bits available, extract them.
333  */
334  Int payloadBitsRemaining = getBitstream()->getNumBitsLeft();
335  if (payloadBitsRemaining) /* more_data_in_payload() */
336  {
337  for (; payloadBitsRemaining > 9; payloadBitsRemaining--)
338  {
339  UInt reservedPayloadExtensionData;
340  sei_read_code ( pDecodedMessageOutputStream, 1, reservedPayloadExtensionData, "reserved_payload_extension_data");
341  }
342 
343  /* 2 */
344  Int finalBits = getBitstream()->peekBits(payloadBitsRemaining);
345  Int finalPayloadBits = 0;
346  for (Int mask = 0xff; finalBits & (mask >> finalPayloadBits); finalPayloadBits++)
347  {
348  continue;
349  }
350 
351  /* 3 */
352  for (; payloadBitsRemaining > 9 - finalPayloadBits; payloadBitsRemaining--)
353  {
354  UInt reservedPayloadExtensionData;
355  sei_read_flag ( 0, reservedPayloadExtensionData, "reserved_payload_extension_data");
356  }
357 
358  UInt dummy;
359  sei_read_flag( 0, dummy, "payload_bit_equal_to_one"); payloadBitsRemaining--;
360  while (payloadBitsRemaining)
361  {
362  sei_read_flag( 0, dummy, "payload_bit_equal_to_zero"); payloadBitsRemaining--;
363  }
364  }
365 
366  /* restore primary bitstream for sei_message */
368  delete getBitstream();
369  setBitstream(bs);
370 }
371 
377 Void SEIReader::xParseSEIuserDataUnregistered(SEIuserDataUnregistered &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
378 {
379  assert(payloadSize >= ISO_IEC_11578_LEN);
380  UInt val;
381  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
382 
383  for (UInt i = 0; i < ISO_IEC_11578_LEN; i++)
384  {
385  sei_read_code( pDecodedMessageOutputStream, 8, val, "uuid_iso_iec_11578");
386  sei.uuid_iso_iec_11578[i] = val;
387  }
388 
389  sei.userDataLength = payloadSize - ISO_IEC_11578_LEN;
390  if (!sei.userDataLength)
391  {
392  sei.userData = 0;
393  return;
394  }
395 
396  sei.userData = new UChar[sei.userDataLength];
397  for (UInt i = 0; i < sei.userDataLength; i++)
398  {
399  sei_read_code( NULL, 8, val, "user_data_payload_byte" );
400  sei.userData[i] = val;
401  }
402  if (pDecodedMessageOutputStream)
403  {
404  (*pDecodedMessageOutputStream) << " User data payload size: " << sei.userDataLength << "\n";
405  }
406 }
407 
412 Void SEIReader::xParseSEIDecodedPictureHash(SEIDecodedPictureHash& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
413 {
414  UInt bytesRead = 0;
415  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
416 
417  UInt val;
418  sei_read_code( pDecodedMessageOutputStream, 8, val, "hash_type");
419  sei.method = static_cast<SEIDecodedPictureHash::Method>(val); bytesRead++;
420 
421  const Char *traceString="\0";
422  switch (sei.method)
423  {
424  case SEIDecodedPictureHash::MD5: traceString="picture_md5"; break;
425  case SEIDecodedPictureHash::CRC: traceString="picture_crc"; break;
426  case SEIDecodedPictureHash::CHECKSUM: traceString="picture_checksum"; break;
427  default: assert(false); break;
428  }
429 
430  if (pDecodedMessageOutputStream)
431  {
432  (*pDecodedMessageOutputStream) << " " << std::setw(55) << traceString << ": " << std::hex << std::setfill('0');
433  }
434 
435  sei.m_digest.hash.clear();
436  for(;bytesRead < payloadSize; bytesRead++)
437  {
438  sei_read_code( NULL, 8, val, traceString);
439  sei.m_digest.hash.push_back((UChar)val);
440  if (pDecodedMessageOutputStream)
441  {
442  (*pDecodedMessageOutputStream) << std::setw(2) << val;
443  }
444  }
445 
446  if (pDecodedMessageOutputStream)
447  {
448  (*pDecodedMessageOutputStream) << std::dec << std::setfill(' ') << "\n";
449  }
450 }
451 
452 Void SEIReader::xParseSEIActiveParameterSets(SEIActiveParameterSets& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
453 {
454  UInt val;
455  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
456 
457  sei_read_code( pDecodedMessageOutputStream, 4, val, "active_video_parameter_set_id"); sei.activeVPSId = val;
458  sei_read_flag( pDecodedMessageOutputStream, val, "self_contained_cvs_flag"); sei.m_selfContainedCvsFlag = (val != 0);
459  sei_read_flag( pDecodedMessageOutputStream, val, "no_parameter_set_update_flag"); sei.m_noParameterSetUpdateFlag = (val != 0);
460  sei_read_uvlc( pDecodedMessageOutputStream, val, "num_sps_ids_minus1"); sei.numSpsIdsMinus1 = val;
461 
462  sei.activeSeqParameterSetId.resize(sei.numSpsIdsMinus1 + 1);
463  for (Int i=0; i < (sei.numSpsIdsMinus1 + 1); i++)
464  {
465  sei_read_uvlc( pDecodedMessageOutputStream, val, "active_seq_parameter_set_id[i]"); sei.activeSeqParameterSetId[i] = val;
466  }
467 }
468 
469 Void SEIReader::xParseSEIDecodingUnitInfo(SEIDecodingUnitInfo& sei, UInt payloadSize, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream)
470 {
471  UInt val;
472  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
473  sei_read_uvlc( pDecodedMessageOutputStream, val, "decoding_unit_idx");
474  sei.m_decodingUnitIdx = val;
475 
476  const TComVUI *vui = sps->getVuiParameters();
478  {
479  sei_read_code( pDecodedMessageOutputStream, ( vui->getHrdParameters()->getDuCpbRemovalDelayLengthMinus1() + 1 ), val, "du_spt_cpb_removal_delay_increment");
480  sei.m_duSptCpbRemovalDelay = val;
481  }
482  else
483  {
484  sei.m_duSptCpbRemovalDelay = 0;
485  }
486  sei_read_flag( pDecodedMessageOutputStream, val, "dpb_output_du_delay_present_flag"); sei.m_dpbOutputDuDelayPresentFlag = (val != 0);
488  {
489  sei_read_code( pDecodedMessageOutputStream, vui->getHrdParameters()->getDpbOutputDelayDuLengthMinus1() + 1, val, "pic_spt_dpb_output_du_delay");
490  sei.m_picSptDpbOutputDuDelay = val;
491  }
492 }
493 
494 Void SEIReader::xParseSEIBufferingPeriod(SEIBufferingPeriod& sei, UInt payloadSize, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream)
495 {
496  Int i, nalOrVcl;
497  UInt code;
498 
499  const TComVUI *pVUI = sps->getVuiParameters();
500  const TComHRD *pHRD = pVUI->getHrdParameters();
501 
502  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
503 
504  sei_read_uvlc( pDecodedMessageOutputStream, code, "bp_seq_parameter_set_id" ); sei.m_bpSeqParameterSetId = code;
505  if( !pHRD->getSubPicCpbParamsPresentFlag() )
506  {
507  sei_read_flag( pDecodedMessageOutputStream, code, "irap_cpb_params_present_flag" ); sei.m_rapCpbParamsPresentFlag = code;
508  }
509  if( sei.m_rapCpbParamsPresentFlag )
510  {
511  sei_read_code( pDecodedMessageOutputStream, pHRD->getCpbRemovalDelayLengthMinus1() + 1, code, "cpb_delay_offset" ); sei.m_cpbDelayOffset = code;
512  sei_read_code( pDecodedMessageOutputStream, pHRD->getDpbOutputDelayLengthMinus1() + 1, code, "dpb_delay_offset" ); sei.m_dpbDelayOffset = code;
513  }
514 
515  //read splicing flag and cpb_removal_delay_delta
516  sei_read_flag( pDecodedMessageOutputStream, code, "concatenation_flag");
517  sei.m_concatenationFlag = code;
518  sei_read_code( pDecodedMessageOutputStream, ( pHRD->getCpbRemovalDelayLengthMinus1() + 1 ), code, "au_cpb_removal_delay_delta_minus1" );
519  sei.m_auCpbRemovalDelayDelta = code + 1;
520 
521  for( nalOrVcl = 0; nalOrVcl < 2; nalOrVcl ++ )
522  {
523  if( ( ( nalOrVcl == 0 ) && ( pHRD->getNalHrdParametersPresentFlag() ) ) ||
524  ( ( nalOrVcl == 1 ) && ( pHRD->getVclHrdParametersPresentFlag() ) ) )
525  {
526  for( i = 0; i < ( pHRD->getCpbCntMinus1( 0 ) + 1 ); i ++ )
527  {
528  sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_cpb_removal_delay":"nal_initial_cpb_removal_delay" );
529  sei.m_initialCpbRemovalDelay[i][nalOrVcl] = code;
530  sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_cpb_removal_offset":"vcl_initial_cpb_removal_offset" );
531  sei.m_initialCpbRemovalDelayOffset[i][nalOrVcl] = code;
533  {
534  sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_alt_cpb_removal_delay":"vcl_initial_alt_cpb_removal_delay" );
535  sei.m_initialAltCpbRemovalDelay[i][nalOrVcl] = code;
536  sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_alt_cpb_removal_offset":"vcl_initial_alt_cpb_removal_offset" );
537  sei.m_initialAltCpbRemovalDelayOffset[i][nalOrVcl] = code;
538  }
539  }
540  }
541  }
542 }
543 
544 Void SEIReader::xParseSEIPictureTiming(SEIPictureTiming& sei, UInt payloadSize, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream)
545 {
546  Int i;
547  UInt code;
548 
549  const TComVUI *vui = sps->getVuiParameters();
550  const TComHRD *hrd = vui->getHrdParameters();
551  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
552 
553  if( vui->getFrameFieldInfoPresentFlag() )
554  {
555  sei_read_code( pDecodedMessageOutputStream, 4, code, "pic_struct" ); sei.m_picStruct = code;
556  sei_read_code( pDecodedMessageOutputStream, 2, code, "source_scan_type" ); sei.m_sourceScanType = code;
557  sei_read_flag( pDecodedMessageOutputStream, code, "duplicate_flag" ); sei.m_duplicateFlag = (code == 1);
558  }
559 
560  if( hrd->getCpbDpbDelaysPresentFlag())
561  {
562  sei_read_code( pDecodedMessageOutputStream, ( hrd->getCpbRemovalDelayLengthMinus1() + 1 ), code, "au_cpb_removal_delay_minus1" );
563  sei.m_auCpbRemovalDelay = code + 1;
564  sei_read_code( pDecodedMessageOutputStream, ( hrd->getDpbOutputDelayLengthMinus1() + 1 ), code, "pic_dpb_output_delay" );
565  sei.m_picDpbOutputDelay = code;
566 
568  {
569  sei_read_code( pDecodedMessageOutputStream, hrd->getDpbOutputDelayDuLengthMinus1()+1, code, "pic_dpb_output_du_delay" );
570  sei.m_picDpbOutputDuDelay = code;
571  }
572 
574  {
575  sei_read_uvlc( pDecodedMessageOutputStream, code, "num_decoding_units_minus1");
576  sei.m_numDecodingUnitsMinus1 = code;
577  sei_read_flag( pDecodedMessageOutputStream, code, "du_common_cpb_removal_delay_flag" );
580  {
581  sei_read_code( pDecodedMessageOutputStream, ( hrd->getDuCpbRemovalDelayLengthMinus1() + 1 ), code, "du_common_cpb_removal_delay_increment_minus1" );
583  }
584  if( sei.m_numNalusInDuMinus1 != NULL )
585  {
586  delete sei.m_numNalusInDuMinus1;
587  }
588  sei.m_numNalusInDuMinus1 = new UInt[ ( sei.m_numDecodingUnitsMinus1 + 1 ) ];
589  if( sei.m_duCpbRemovalDelayMinus1 != NULL )
590  {
591  delete sei.m_duCpbRemovalDelayMinus1;
592  }
594 
595  for( i = 0; i <= sei.m_numDecodingUnitsMinus1; i ++ )
596  {
597  sei_read_uvlc( pDecodedMessageOutputStream, code, "num_nalus_in_du_minus1[i]");
598  sei.m_numNalusInDuMinus1[ i ] = code;
599  if( ( !sei.m_duCommonCpbRemovalDelayFlag ) && ( i < sei.m_numDecodingUnitsMinus1 ) )
600  {
601  sei_read_code( pDecodedMessageOutputStream, ( hrd->getDuCpbRemovalDelayLengthMinus1() + 1 ), code, "du_cpb_removal_delay_minus1[i]" );
602  sei.m_duCpbRemovalDelayMinus1[ i ] = code;
603  }
604  }
605  }
606  }
607 }
608 
609 Void SEIReader::xParseSEIRecoveryPoint(SEIRecoveryPoint& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
610 {
611  Int iCode;
612  UInt uiCode;
613  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
614 
615  sei_read_svlc( pDecodedMessageOutputStream, iCode, "recovery_poc_cnt" ); sei.m_recoveryPocCnt = iCode;
616  sei_read_flag( pDecodedMessageOutputStream, uiCode, "exact_matching_flag" ); sei.m_exactMatchingFlag = uiCode;
617  sei_read_flag( pDecodedMessageOutputStream, uiCode, "broken_link_flag" ); sei.m_brokenLinkFlag = uiCode;
618 }
619 
620 Void SEIReader::xParseSEIFramePacking(SEIFramePacking& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
621 {
622  UInt val;
623  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
624 
625  sei_read_uvlc( pDecodedMessageOutputStream, val, "frame_packing_arrangement_id" ); sei.m_arrangementId = val;
626  sei_read_flag( pDecodedMessageOutputStream, val, "frame_packing_arrangement_cancel_flag" ); sei.m_arrangementCancelFlag = val;
627 
628  if ( !sei.m_arrangementCancelFlag )
629  {
630  sei_read_code( pDecodedMessageOutputStream, 7, val, "frame_packing_arrangement_type" ); sei.m_arrangementType = val;
631  assert((sei.m_arrangementType > 2) && (sei.m_arrangementType < 6) );
632 
633  sei_read_flag( pDecodedMessageOutputStream, val, "quincunx_sampling_flag" ); sei.m_quincunxSamplingFlag = val;
634 
635  sei_read_code( pDecodedMessageOutputStream, 6, val, "content_interpretation_type" ); sei.m_contentInterpretationType = val;
636  sei_read_flag( pDecodedMessageOutputStream, val, "spatial_flipping_flag" ); sei.m_spatialFlippingFlag = val;
637  sei_read_flag( pDecodedMessageOutputStream, val, "frame0_flipped_flag" ); sei.m_frame0FlippedFlag = val;
638  sei_read_flag( pDecodedMessageOutputStream, val, "field_views_flag" ); sei.m_fieldViewsFlag = val;
639  sei_read_flag( pDecodedMessageOutputStream, val, "current_frame_is_frame0_flag" ); sei.m_currentFrameIsFrame0Flag = val;
640  sei_read_flag( pDecodedMessageOutputStream, val, "frame0_self_contained_flag" ); sei.m_frame0SelfContainedFlag = val;
641  sei_read_flag( pDecodedMessageOutputStream, val, "frame1_self_contained_flag" ); sei.m_frame1SelfContainedFlag = val;
642 
643  if ( sei.m_quincunxSamplingFlag == 0 && sei.m_arrangementType != 5)
644  {
645  sei_read_code( pDecodedMessageOutputStream, 4, val, "frame0_grid_position_x" ); sei.m_frame0GridPositionX = val;
646  sei_read_code( pDecodedMessageOutputStream, 4, val, "frame0_grid_position_y" ); sei.m_frame0GridPositionY = val;
647  sei_read_code( pDecodedMessageOutputStream, 4, val, "frame1_grid_position_x" ); sei.m_frame1GridPositionX = val;
648  sei_read_code( pDecodedMessageOutputStream, 4, val, "frame1_grid_position_y" ); sei.m_frame1GridPositionY = val;
649  }
650 
651  sei_read_code( pDecodedMessageOutputStream, 8, val, "frame_packing_arrangement_reserved_byte" ); sei.m_arrangementReservedByte = val;
652  sei_read_flag( pDecodedMessageOutputStream, val, "frame_packing_arrangement_persistence_flag" ); sei.m_arrangementPersistenceFlag = (val != 0);
653  }
654  sei_read_flag( pDecodedMessageOutputStream, val, "upsampled_aspect_ratio_flag" ); sei.m_upsampledAspectRatio = val;
655 }
656 
657 Void SEIReader::xParseSEISegmentedRectFramePacking(SEISegmentedRectFramePacking& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
658 {
659  UInt val;
660  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
661  sei_read_flag( pDecodedMessageOutputStream, val, "segmented_rect_frame_packing_arrangement_cancel_flag" ); sei.m_arrangementCancelFlag = val;
662  if( !sei.m_arrangementCancelFlag )
663  {
664  sei_read_code( pDecodedMessageOutputStream, 2, val, "segmented_rect_content_interpretation_type" ); sei.m_contentInterpretationType = val;
665  sei_read_flag( pDecodedMessageOutputStream, val, "segmented_rect_frame_packing_arrangement_persistence" ); sei.m_arrangementPersistenceFlag = val;
666  }
667 }
668 
669 Void SEIReader::xParseSEIDisplayOrientation(SEIDisplayOrientation& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
670 {
671  UInt val;
672  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
673  sei_read_flag( pDecodedMessageOutputStream, val, "display_orientation_cancel_flag" ); sei.cancelFlag = val;
674  if( !sei.cancelFlag )
675  {
676  sei_read_flag( pDecodedMessageOutputStream, val, "hor_flip" ); sei.horFlip = val;
677  sei_read_flag( pDecodedMessageOutputStream, val, "ver_flip" ); sei.verFlip = val;
678  sei_read_code( pDecodedMessageOutputStream, 16, val, "anticlockwise_rotation" ); sei.anticlockwiseRotation = val;
679  sei_read_flag( pDecodedMessageOutputStream, val, "display_orientation_persistence_flag" ); sei.persistenceFlag = val;
680  }
681 }
682 
683 Void SEIReader::xParseSEITemporalLevel0Index(SEITemporalLevel0Index& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
684 {
685  UInt val;
686  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
687  sei_read_code( pDecodedMessageOutputStream, 8, val, "temporal_sub_layer_zero_idx" ); sei.tl0Idx = val;
688  sei_read_code( pDecodedMessageOutputStream, 8, val, "irap_pic_id" ); sei.rapIdx = val;
689 }
690 
691 Void SEIReader::xParseSEIRegionRefreshInfo(SEIGradualDecodingRefreshInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
692 {
693  UInt val;
694  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
695  sei_read_flag( pDecodedMessageOutputStream, val, "refreshed_region_flag" ); sei.m_gdrForegroundFlag = val ? 1 : 0;
696 }
697 
698 Void SEIReader::xParseSEINoDisplay(SEINoDisplay& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
699 {
700  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
701  sei.m_noDisplay = true;
702 }
703 
704 Void SEIReader::xParseSEIToneMappingInfo(SEIToneMappingInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
705 {
706  Int i;
707  UInt val;
708  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
709  sei_read_uvlc( pDecodedMessageOutputStream, val, "tone_map_id" ); sei.m_toneMapId = val;
710  sei_read_flag( pDecodedMessageOutputStream, val, "tone_map_cancel_flag" ); sei.m_toneMapCancelFlag = val;
711 
712  if ( !sei.m_toneMapCancelFlag )
713  {
714  sei_read_flag( pDecodedMessageOutputStream, val, "tone_map_persistence_flag" ); sei.m_toneMapPersistenceFlag = val;
715  sei_read_code( pDecodedMessageOutputStream, 8, val, "coded_data_bit_depth" ); sei.m_codedDataBitDepth = val;
716  sei_read_code( pDecodedMessageOutputStream, 8, val, "target_bit_depth" ); sei.m_targetBitDepth = val;
717  sei_read_uvlc( pDecodedMessageOutputStream, val, "tone_map_model_id" ); sei.m_modelId = val;
718  switch(sei.m_modelId)
719  {
720  case 0:
721  {
722  sei_read_code( pDecodedMessageOutputStream, 32, val, "min_value" ); sei.m_minValue = val;
723  sei_read_code( pDecodedMessageOutputStream, 32, val, "max_value" ); sei.m_maxValue = val;
724  break;
725  }
726  case 1:
727  {
728  sei_read_code( pDecodedMessageOutputStream, 32, val, "sigmoid_midpoint" ); sei.m_sigmoidMidpoint = val;
729  sei_read_code( pDecodedMessageOutputStream, 32, val, "sigmoid_width" ); sei.m_sigmoidWidth = val;
730  break;
731  }
732  case 2:
733  {
734  UInt num = 1u << sei.m_targetBitDepth;
735  sei.m_startOfCodedInterval.resize(num+1);
736  for(i = 0; i < num; i++)
737  {
738  sei_read_code( pDecodedMessageOutputStream, ((( sei.m_codedDataBitDepth + 7 ) >> 3 ) << 3), val, "start_of_coded_interval[i]" );
739  sei.m_startOfCodedInterval[i] = val;
740  }
741  sei.m_startOfCodedInterval[num] = 1u << sei.m_codedDataBitDepth;
742  break;
743  }
744  case 3:
745  {
746  sei_read_code( pDecodedMessageOutputStream, 16, val, "num_pivots" ); sei.m_numPivots = val;
747  sei.m_codedPivotValue.resize(sei.m_numPivots);
748  sei.m_targetPivotValue.resize(sei.m_numPivots);
749  for(i = 0; i < sei.m_numPivots; i++ )
750  {
751  sei_read_code( pDecodedMessageOutputStream, ((( sei.m_codedDataBitDepth + 7 ) >> 3 ) << 3), val, "coded_pivot_value[i]" );
752  sei.m_codedPivotValue[i] = val;
753  sei_read_code( pDecodedMessageOutputStream, ((( sei.m_targetBitDepth + 7 ) >> 3 ) << 3), val, "target_pivot_value[i]" );
754  sei.m_targetPivotValue[i] = val;
755  }
756  break;
757  }
758  case 4:
759  {
760  sei_read_code( pDecodedMessageOutputStream, 8, val, "camera_iso_speed_idc" ); sei.m_cameraIsoSpeedIdc = val;
761  if( sei.m_cameraIsoSpeedIdc == 255) //Extended_ISO
762  {
763  sei_read_code( pDecodedMessageOutputStream, 32, val, "camera_iso_speed_value" ); sei.m_cameraIsoSpeedValue = val;
764  }
765  sei_read_code( pDecodedMessageOutputStream, 8, val, "exposure_index_idc" ); sei.m_exposureIndexIdc = val;
766  if( sei.m_exposureIndexIdc == 255) //Extended_ISO
767  {
768  sei_read_code( pDecodedMessageOutputStream, 32, val, "exposure_index_value" ); sei.m_exposureIndexValue = val;
769  }
770  sei_read_flag( pDecodedMessageOutputStream, val, "exposure_compensation_value_sign_flag" ); sei.m_exposureCompensationValueSignFlag = val;
771  sei_read_code( pDecodedMessageOutputStream, 16, val, "exposure_compensation_value_numerator" ); sei.m_exposureCompensationValueNumerator = val;
772  sei_read_code( pDecodedMessageOutputStream, 16, val, "exposure_compensation_value_denom_idc" ); sei.m_exposureCompensationValueDenomIdc = val;
773  sei_read_code( pDecodedMessageOutputStream, 32, val, "ref_screen_luminance_white" ); sei.m_refScreenLuminanceWhite = val;
774  sei_read_code( pDecodedMessageOutputStream, 32, val, "extended_range_white_level" ); sei.m_extendedRangeWhiteLevel = val;
775  sei_read_code( pDecodedMessageOutputStream, 16, val, "nominal_black_level_code_value" ); sei.m_nominalBlackLevelLumaCodeValue = val;
776  sei_read_code( pDecodedMessageOutputStream, 16, val, "nominal_white_level_code_value" ); sei.m_nominalWhiteLevelLumaCodeValue= val;
777  sei_read_code( pDecodedMessageOutputStream, 16, val, "extended_white_level_code_value" ); sei.m_extendedWhiteLevelLumaCodeValue = val;
778  break;
779  }
780  default:
781  {
782  assert(!"Undefined SEIToneMapModelId");
783  break;
784  }
785  }//switch model id
786  }// if(!sei.m_toneMapCancelFlag)
787 }
788 
789 Void SEIReader::xParseSEISOPDescription(SEISOPDescription &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
790 {
791  Int iCode;
792  UInt uiCode;
793  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
794 
795  sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "sop_seq_parameter_set_id" ); sei.m_sopSeqParameterSetId = uiCode;
796  sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "num_pics_in_sop_minus1" ); sei.m_numPicsInSopMinus1 = uiCode;
797  for (UInt i = 0; i <= sei.m_numPicsInSopMinus1; i++)
798  {
799  sei_read_code( pDecodedMessageOutputStream, 6, uiCode, "sop_vcl_nut[i]" ); sei.m_sopDescVclNaluType[i] = uiCode;
800  sei_read_code( pDecodedMessageOutputStream, 3, sei.m_sopDescTemporalId[i], "sop_temporal_id[i]" ); sei.m_sopDescTemporalId[i] = uiCode;
802  {
803  sei_read_uvlc( pDecodedMessageOutputStream, sei.m_sopDescStRpsIdx[i], "sop_short_term_rps_idx[i]" ); sei.m_sopDescStRpsIdx[i] = uiCode;
804  }
805  if (i > 0)
806  {
807  sei_read_svlc( pDecodedMessageOutputStream, iCode, "sop_poc_delta[i]" ); sei.m_sopDescPocDelta[i] = iCode;
808  }
809  }
810 }
811 
812 Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream)
813 {
814  UInt uiCode;
815  SEIMessages seis;
816  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
817 
818  sei_read_flag( pDecodedMessageOutputStream, uiCode, "bitstream_subset_flag" ); sei.m_bitStreamSubsetFlag = uiCode;
819  sei_read_flag( pDecodedMessageOutputStream, uiCode, "nesting_op_flag" ); sei.m_nestingOpFlag = uiCode;
820  if (sei.m_nestingOpFlag)
821  {
822  sei_read_flag( pDecodedMessageOutputStream, uiCode, "default_op_flag" ); sei.m_defaultOpFlag = uiCode;
823  sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "nesting_num_ops_minus1" ); sei.m_nestingNumOpsMinus1 = uiCode;
824  for (UInt i = sei.m_defaultOpFlag; i <= sei.m_nestingNumOpsMinus1; i++)
825  {
826  sei_read_code( pDecodedMessageOutputStream, 3, uiCode, "nesting_max_temporal_id_plus1[i]" ); sei.m_nestingMaxTemporalIdPlus1[i] = uiCode;
827  sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "nesting_op_idx[i]" ); sei.m_nestingOpIdx[i] = uiCode;
828  }
829  }
830  else
831  {
832  sei_read_flag( pDecodedMessageOutputStream, uiCode, "all_layers_flag" ); sei.m_allLayersFlag = uiCode;
833  if (!sei.m_allLayersFlag)
834  {
835  sei_read_code( pDecodedMessageOutputStream, 3, uiCode, "nesting_no_op_max_temporal_id_plus1" ); sei.m_nestingNoOpMaxTemporalIdPlus1 = uiCode;
836  sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "nesting_num_layers_minus1" ); sei.m_nestingNumLayersMinus1 = uiCode;
837  for (UInt i = 0; i <= sei.m_nestingNumLayersMinus1; i++)
838  {
839  sei_read_code( pDecodedMessageOutputStream, 6, uiCode, "nesting_layer_id[i]" ); sei.m_nestingLayerId[i] = uiCode;
840  }
841  }
842  }
843 
844  // byte alignment
845  while ( m_pcBitstream->getNumBitsRead() % 8 != 0 )
846  {
847  UInt code;
848  sei_read_flag( pDecodedMessageOutputStream, code, "nesting_zero_bit" );
849  }
850 
851  sei.m_callerOwnsSEIs = false;
852 
853  // read nested SEI messages
854  do
855  {
856  xReadSEImessage(sei.m_nestedSEIs, nalUnitType, sps, pDecodedMessageOutputStream);
857  } while (m_pcBitstream->getNumBitsLeft() > 8);
858 
859  if (pDecodedMessageOutputStream)
860  {
861  (*pDecodedMessageOutputStream) << "End of scalable nesting SEI message\n";
862  }
863 }
864 
865 Void SEIReader::xParseSEITempMotionConstraintsTileSets(SEITempMotionConstrainedTileSets& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
866 {
867  UInt code;
868  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
869  sei_read_flag( pDecodedMessageOutputStream, code, "mc_all_tiles_exact_sample_value_match_flag"); sei.m_mc_all_tiles_exact_sample_value_match_flag = (code != 0);
870  sei_read_flag( pDecodedMessageOutputStream, code, "each_tile_one_tile_set_flag"); sei.m_each_tile_one_tile_set_flag = (code != 0);
871 
873  {
874  sei_read_flag( pDecodedMessageOutputStream, code, "limited_tile_set_display_flag"); sei.m_limited_tile_set_display_flag = (code != 0);
875  sei_read_uvlc( pDecodedMessageOutputStream, code, "num_sets_in_message_minus1"); sei.setNumberOfTileSets(code + 1);
876 
877  if(sei.getNumberOfTileSets() != 0)
878  {
879  for(Int i = 0; i < sei.getNumberOfTileSets(); i++)
880  {
881  sei_read_uvlc( pDecodedMessageOutputStream, code, "mcts_id"); sei.tileSetData(i).m_mcts_id = code;
882 
884  {
885  sei_read_flag( pDecodedMessageOutputStream, code, "display_tile_set_flag"); sei.tileSetData(i).m_display_tile_set_flag = (code != 1);
886  }
887 
888  sei_read_uvlc( pDecodedMessageOutputStream, code, "num_tile_rects_in_set_minus1"); sei.tileSetData(i).setNumberOfTileRects(code + 1);
889 
890  for(Int j=0; j<sei.tileSetData(i).getNumberOfTileRects(); j++)
891  {
892  sei_read_uvlc( pDecodedMessageOutputStream, code, "top_left_tile_index"); sei.tileSetData(i).topLeftTileIndex(j) = code;
893  sei_read_uvlc( pDecodedMessageOutputStream, code, "bottom_right_tile_index"); sei.tileSetData(i).bottomRightTileIndex(j) = code;
894  }
895 
897  {
898  sei_read_flag( pDecodedMessageOutputStream, code, "exact_sample_value_match_flag"); sei.tileSetData(i).m_exact_sample_value_match_flag = (code != 0);
899  }
900  sei_read_flag( pDecodedMessageOutputStream, code, "mcts_tier_level_idc_present_flag"); sei.tileSetData(i).m_mcts_tier_level_idc_present_flag = (code != 0);
901 
903  {
904  sei_read_flag( pDecodedMessageOutputStream, code, "mcts_tier_flag"); sei.tileSetData(i).m_mcts_tier_flag = (code != 0);
905  sei_read_code( pDecodedMessageOutputStream, 8, code, "mcts_level_idc"); sei.tileSetData(i).m_mcts_level_idc = code;
906  }
907  }
908  }
909  }
910  else
911  {
912  sei_read_flag( pDecodedMessageOutputStream, code, "max_mcs_tier_level_idc_present_flag"); sei.m_max_mcs_tier_level_idc_present_flag = code;
914  {
915  sei_read_flag( pDecodedMessageOutputStream, code, "max_mcts_tier_flag"); sei.m_max_mcts_tier_flag = code;
916  sei_read_code( pDecodedMessageOutputStream, 8, code, "max_mcts_level_idc"); sei.m_max_mcts_level_idc = code;
917  }
918  }
919 }
920 
921 Void SEIReader::xParseSEITimeCode(SEITimeCode& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
922 {
923  UInt code;
924  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
925  sei_read_code( pDecodedMessageOutputStream, 2, code, "num_clock_ts"); sei.numClockTs = code;
926  for(Int i = 0; i < sei.numClockTs; i++)
927  {
928  TComSEITimeSet currentTimeSet;
929  sei_read_flag( pDecodedMessageOutputStream, code, "clock_time_stamp_flag[i]"); currentTimeSet.clockTimeStampFlag = code;
930  if(currentTimeSet.clockTimeStampFlag)
931  {
932  sei_read_flag( pDecodedMessageOutputStream, code, "nuit_field_based_flag"); currentTimeSet.numUnitFieldBasedFlag = code;
933  sei_read_code( pDecodedMessageOutputStream, 5, code, "counting_type"); currentTimeSet.countingType = code;
934  sei_read_flag( pDecodedMessageOutputStream, code, "full_timestamp_flag"); currentTimeSet.fullTimeStampFlag = code;
935  sei_read_flag( pDecodedMessageOutputStream, code, "discontinuity_flag"); currentTimeSet.discontinuityFlag = code;
936  sei_read_flag( pDecodedMessageOutputStream, code, "cnt_dropped_flag"); currentTimeSet.cntDroppedFlag = code;
937  sei_read_code( pDecodedMessageOutputStream, 9, code, "n_frames"); currentTimeSet.numberOfFrames = code;
938  if(currentTimeSet.fullTimeStampFlag)
939  {
940  sei_read_code( pDecodedMessageOutputStream, 6, code, "seconds_value"); currentTimeSet.secondsValue = code;
941  sei_read_code( pDecodedMessageOutputStream, 6, code, "minutes_value"); currentTimeSet.minutesValue = code;
942  sei_read_code( pDecodedMessageOutputStream, 5, code, "hours_value"); currentTimeSet.hoursValue = code;
943  }
944  else
945  {
946  sei_read_flag( pDecodedMessageOutputStream, code, "seconds_flag"); currentTimeSet.secondsFlag = code;
947  if(currentTimeSet.secondsFlag)
948  {
949  sei_read_code( pDecodedMessageOutputStream, 6, code, "seconds_value"); currentTimeSet.secondsValue = code;
950  sei_read_flag( pDecodedMessageOutputStream, code, "minutes_flag"); currentTimeSet.minutesFlag = code;
951  if(currentTimeSet.minutesFlag)
952  {
953  sei_read_code( pDecodedMessageOutputStream, 6, code, "minutes_value"); currentTimeSet.minutesValue = code;
954  sei_read_flag( pDecodedMessageOutputStream, code, "hours_flag"); currentTimeSet.hoursFlag = code;
955  if(currentTimeSet.hoursFlag)
956  {
957  sei_read_code( pDecodedMessageOutputStream, 5, code, "hours_value"); currentTimeSet.hoursValue = code;
958  }
959  }
960  }
961  }
962  sei_read_code( pDecodedMessageOutputStream, 5, code, "time_offset_length"); currentTimeSet.timeOffsetLength = code;
963  if(currentTimeSet.timeOffsetLength > 0)
964  {
965  sei_read_code( pDecodedMessageOutputStream, currentTimeSet.timeOffsetLength, code, "time_offset_value");
966  if((code & (1 << (currentTimeSet.timeOffsetLength-1))) == 0)
967  {
968  currentTimeSet.timeOffsetValue = code;
969  }
970  else
971  {
972  code &= (1<< (currentTimeSet.timeOffsetLength-1)) - 1;
973  currentTimeSet.timeOffsetValue = ~code + 1;
974  }
975  }
976  }
977  sei.timeSetArray[i] = currentTimeSet;
978  }
979 }
980 
981 Void SEIReader::xParseSEIChromaSamplingFilterHint(SEIChromaSamplingFilterHint& sei, UInt payloadSize/*, TComSPS* sps*/, std::ostream *pDecodedMessageOutputStream)
982 {
983  UInt uiCode;
984  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
985 
986  sei_read_code( pDecodedMessageOutputStream, 8, uiCode, "ver_chroma_filter_idc"); sei.m_verChromaFilterIdc = uiCode;
987  sei_read_code( pDecodedMessageOutputStream, 8, uiCode, "hor_chroma_filter_idc"); sei.m_horChromaFilterIdc = uiCode;
988  sei_read_flag( pDecodedMessageOutputStream, uiCode, "ver_filtering_process_flag"); sei.m_verFilteringProcessFlag = uiCode;
989  if(sei.m_verChromaFilterIdc == 1 || sei.m_horChromaFilterIdc == 1)
990  {
991  sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "target_format_idc"); sei.m_targetFormatIdc = uiCode;
992  if(sei.m_verChromaFilterIdc == 1)
993  {
994  sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "num_vertical_filters"); sei.m_numVerticalFilters = uiCode;
995  if(sei.m_numVerticalFilters > 0)
996  {
997  sei.m_verTapLengthMinus1 = (Int*)malloc(sei.m_numVerticalFilters * sizeof(Int));
998  sei.m_verFilterCoeff = (Int**)malloc(sei.m_numVerticalFilters * sizeof(Int*));
999  for(Int i = 0; i < sei.m_numVerticalFilters; i ++)
1000  {
1001  sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "ver_tap_length_minus_1"); sei.m_verTapLengthMinus1[i] = uiCode;
1002  sei.m_verFilterCoeff[i] = (Int*)malloc(sei.m_verTapLengthMinus1[i] * sizeof(Int));
1003  for(Int j = 0; j < sei.m_verTapLengthMinus1[i]; j ++)
1004  {
1005  sei_read_svlc( pDecodedMessageOutputStream, sei.m_verFilterCoeff[i][j], "ver_filter_coeff");
1006  }
1007  }
1008  }
1009  }
1010  if(sei.m_horChromaFilterIdc == 1)
1011  {
1012  sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "num_horizontal_filters"); sei.m_numHorizontalFilters = uiCode;
1013  if(sei.m_numHorizontalFilters > 0)
1014  {
1015  sei.m_horTapLengthMinus1 = (Int*)malloc(sei.m_numHorizontalFilters * sizeof(Int));
1016  sei.m_horFilterCoeff = (Int**)malloc(sei.m_numHorizontalFilters * sizeof(Int*));
1017  for(Int i = 0; i < sei.m_numHorizontalFilters; i ++)
1018  {
1019  sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "hor_tap_length_minus_1"); sei.m_horTapLengthMinus1[i] = uiCode;
1020  sei.m_horFilterCoeff[i] = (Int*)malloc(sei.m_horTapLengthMinus1[i] * sizeof(Int));
1021  for(Int j = 0; j < sei.m_horTapLengthMinus1[i]; j ++)
1022  {
1023  sei_read_svlc( pDecodedMessageOutputStream, sei.m_horFilterCoeff[i][j], "hor_filter_coeff");
1024  }
1025  }
1026  }
1027  }
1028  }
1029 }
1030 
1031 Void SEIReader::xParseSEIKneeFunctionInfo(SEIKneeFunctionInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
1032 {
1033  Int i;
1034  UInt val;
1035  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
1036 
1037  sei_read_uvlc( pDecodedMessageOutputStream, val, "knee_function_id" ); sei.m_kneeId = val;
1038  sei_read_flag( pDecodedMessageOutputStream, val, "knee_function_cancel_flag" ); sei.m_kneeCancelFlag = val;
1039  if ( !sei.m_kneeCancelFlag )
1040  {
1041  sei_read_flag( pDecodedMessageOutputStream, val, "knee_function_persistence_flag" ); sei.m_kneePersistenceFlag = val;
1042  sei_read_code( pDecodedMessageOutputStream, 32, val, "input_d_range" ); sei.m_kneeInputDrange = val;
1043  sei_read_code( pDecodedMessageOutputStream, 32, val, "input_disp_luminance" ); sei.m_kneeInputDispLuminance = val;
1044  sei_read_code( pDecodedMessageOutputStream, 32, val, "output_d_range" ); sei.m_kneeOutputDrange = val;
1045  sei_read_code( pDecodedMessageOutputStream, 32, val, "output_disp_luminance" ); sei.m_kneeOutputDispLuminance = val;
1046  sei_read_uvlc( pDecodedMessageOutputStream, val, "num_knee_points_minus1" ); sei.m_kneeNumKneePointsMinus1 = val;
1047  assert( sei.m_kneeNumKneePointsMinus1 > 0 );
1050  for(i = 0; i <= sei.m_kneeNumKneePointsMinus1; i++ )
1051  {
1052  sei_read_code( pDecodedMessageOutputStream, 10, val, "input_knee_point" ); sei.m_kneeInputKneePoint[i] = val;
1053  sei_read_code( pDecodedMessageOutputStream, 10, val, "output_knee_point" ); sei.m_kneeOutputKneePoint[i] = val;
1054  }
1055  }
1056 }
1057 
1058 Void SEIReader::xParseSEIMasteringDisplayColourVolume(SEIMasteringDisplayColourVolume& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
1059 {
1060  UInt code;
1061  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
1062 
1063  sei_read_code( pDecodedMessageOutputStream, 16, code, "display_primaries_x[0]" ); sei.values.primaries[0][0] = code;
1064  sei_read_code( pDecodedMessageOutputStream, 16, code, "display_primaries_y[0]" ); sei.values.primaries[0][1] = code;
1065 
1066  sei_read_code( pDecodedMessageOutputStream, 16, code, "display_primaries_x[1]" ); sei.values.primaries[1][0] = code;
1067  sei_read_code( pDecodedMessageOutputStream, 16, code, "display_primaries_y[1]" ); sei.values.primaries[1][1] = code;
1068 
1069  sei_read_code( pDecodedMessageOutputStream, 16, code, "display_primaries_x[2]" ); sei.values.primaries[2][0] = code;
1070  sei_read_code( pDecodedMessageOutputStream, 16, code, "display_primaries_y[2]" ); sei.values.primaries[2][1] = code;
1071 
1072 
1073  sei_read_code( pDecodedMessageOutputStream, 16, code, "white_point_x" ); sei.values.whitePoint[0] = code;
1074  sei_read_code( pDecodedMessageOutputStream, 16, code, "white_point_y" ); sei.values.whitePoint[1] = code;
1075 
1076  sei_read_code( pDecodedMessageOutputStream, 32, code, "max_display_mastering_luminance" ); sei.values.maxLuminance = code;
1077  sei_read_code( pDecodedMessageOutputStream, 32, code, "min_display_mastering_luminance" ); sei.values.minLuminance = code;
1078 }
1079 
SEIMessages m_nestedSEIs
Definition: SEI.h:517
Bool m_callerOwnsSEIs
Definition: SEI.h:516
Bool getNalHrdParametersPresentFlag() const
Definition: TComSlice.h:321
Bool m_currentFrameIsFrame0Flag
Definition: SEI.h:272
Int m_duSptCpbRemovalDelay
Definition: SEI.h:238
UInt getDuCpbRemovalDelayLengthMinus1() const
Definition: TComSlice.h:333
Void xParseSEIKneeFunctionInfo(SEIKneeFunctionInfo &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:1031
PayloadType
Definition: SEI.h:55
Bool getVclHrdParametersPresentFlag() const
Definition: TComSlice.h:324
Void xParseSEIFramePacking(SEIFramePacking &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:620
Bool m_selfContainedCvsFlag
Definition: SEI.h:151
Void sei_read_code(std::ostream *pOS, UInt uiLength, UInt &ruiCode, const Char *pSymbolName)
Definition: SEIread.cpp:65
Bool m_exposureCompensationValueSignFlag
Definition: SEI.h:401
TComSEIMasteringDisplay values
Definition: SEI.h:476
Bool m_max_mcs_tier_level_idc_present_flag
Definition: SEI.h:575
Int m_frame1GridPositionX
Definition: SEI.h:277
UInt m_nestingOpIdx[1024]
Definition: SEI.h:509
UInt getNumBitsUntilByteAligned()
Void xParseSEIBufferingPeriod(SEIBufferingPeriod &sei, UInt payloadSize, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:494
Int m_contentInterpretationType
Definition: SEI.h:268
Int m_exposureIndexIdc
Definition: SEI.h:399
Bool m_frame1SelfContainedFlag
Definition: SEI.h:274
#define READ_CODE(length, code, name)
Defines constants, macros and tool parameters.
Int m_exposureCompensationValueNumerator
Definition: SEI.h:402
void Void
Definition: TypeDef.h:285
std::vector< Int > m_targetPivotValue
Definition: SEI.h:396
static const Char * getSEIMessageString(SEI::PayloadType payloadType)
Definition: SEI.cpp:90
Bool m_fieldViewsFlag
Definition: SEI.h:271
TComInputBitstream * extractSubstream(UInt uiNumBits)
UInt m_dpbDelayOffset
Definition: SEI.h:178
Bool m_exactMatchingFlag
Definition: SEI.h:252
Void xReadSEImessage(SEIMessages &seis, const NalUnitType nalUnitType, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:139
Int timeOffsetValue
Definition: TypeDef.h:819
Bool m_arrangementPersistenceFlag
Definition: SEI.h:280
Int numberOfFrames
Definition: TypeDef.h:811
Void sei_read_svlc(std::ostream *pOS, Int &ruiCode, const Char *pSymbolName)
Definition: SEIread.cpp:83
#define NULL
Definition: CommonDef.h:100
Bool m_kneePersistenceFlag
Definition: SEI.h:420
Int & topLeftTileIndex(const Int tileRectIndex)
Definition: SEI.h:561
UInt m_picDpbOutputDelay
Definition: SEI.h:216
slice header and SPS class (header)
std::vector< Int > m_kneeOutputKneePoint
Definition: SEI.h:427
#define READ_SVLC(code, name)
Void xParseSEIScalableNesting(SEIScalableNesting &sei, const NalUnitType nalUnitType, UInt payloadSize, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:812
Int m_decodingUnitIdx
Definition: SEI.h:237
Bool m_frame0FlippedFlag
Definition: SEI.h:270
std::vector< Int > m_kneeInputKneePoint
Definition: SEI.h:426
char Char
Definition: TypeDef.h:291
unsigned int UInt
Definition: TypeDef.h:297
Bool clockTimeStampFlag
Definition: TypeDef.h:805
Bool m_rapCpbParamsPresentFlag
Definition: SEI.h:176
Int m_frame0GridPositionX
Definition: SEI.h:275
UInt m_cpbDelayOffset
Definition: SEI.h:177
Bool m_frame0SelfContainedFlag
Definition: SEI.h:273
Int m_numPivots
Definition: SEI.h:394
Int m_minValue
Definition: SEI.h:389
UChar m_nestingLayerId[64]
Definition: SEI.h:514
UChar * userData
Definition: SEI.h:115
UInt numClockTs
Definition: SEI.h:527
TileSetData & tileSetData(const Int index)
Definition: SEI.h:584
Void xTraceSEIHeader()
Definition: SEIread.cpp:54
Bool m_verFilteringProcessFlag
Definition: SEI.h:458
Int m_nominalBlackLevelLumaCodeValue
Definition: SEI.h:406
std::vector< Int > activeSeqParameterSetId
Definition: SEI.h:154
TComInputBitstream * m_pcBitstream
TComVUI * getVuiParameters()
Definition: TComSlice.h:939
Int m_sopDescPocDelta[1024]
Definition: SEI.h:373
Void xParseSEIActiveParameterSets(SEIActiveParameterSets &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:452
UInt m_picStruct
Definition: SEI.h:211
Int countingType
Definition: TypeDef.h:807
Int m_picSptDpbOutputDuDelay
Definition: SEI.h:240
Int m_kneeOutputDrange
Definition: SEI.h:423
UInt m_initialCpbRemovalDelay[32][2]
Definition: SEI.h:179
Bool hoursFlag
Definition: TypeDef.h:817
Void xParseSEITempMotionConstraintsTileSets(SEITempMotionConstrainedTileSets &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:865
Int m_frame1GridPositionY
Definition: SEI.h:278
Int m_kneeInputDispLuminance
Definition: SEI.h:422
Bool secondsFlag
Definition: TypeDef.h:815
UInt m_sopDescTemporalId[1024]
Definition: SEI.h:371
UInt m_sourceScanType
Definition: SEI.h:212
FILE * g_hTrace
Definition: TComRom.cpp:561
std::vector< Int > m_startOfCodedInterval
Definition: SEI.h:393
UInt m_numPicsInSopMinus1
Definition: SEI.h:368
Int hoursValue
Definition: TypeDef.h:814
Int m_maxValue
Definition: SEI.h:390
TComInputBitstream * getBitstream()
static const UInt ISO_IEC_11578_LEN
Definition: SEI.h:97
Void sei_read_uvlc(std::ostream *pOS, UInt &ruiCode, const Char *pSymbolName)
Definition: SEIread.cpp:74
Int minutesValue
Definition: TypeDef.h:813
Void xParseSEIDecodedPictureHash(SEIDecodedPictureHash &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:412
Bool getSubPicCpbParamsPresentFlag() const
Definition: TComSlice.h:327
Bool m_allLayersFlag
Definition: SEI.h:511
Int m_sigmoidWidth
Definition: SEI.h:392
Void xParseSEIRegionRefreshInfo(SEIGradualDecodingRefreshInfo &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:691
Parsing functionality high level syntax.
TComDigest m_digest
Definition: SEI.h:134
Void sei_read_flag(std::ostream *pOS, UInt &ruiCode, const Char *pSymbolName)
Definition: SEIread.cpp:92
Bool getSubPicCpbParamsInPicTimingSEIFlag() const
Definition: TComSlice.h:336
Int m_nominalWhiteLevelLumaCodeValue
Definition: SEI.h:407
Int m_cameraIsoSpeedIdc
Definition: SEI.h:397
Void setBitstream(TComInputBitstream *p)
Bool numUnitFieldBasedFlag
Definition: TypeDef.h:806
Definition: SEI.h:52
Void xParseSEITemporalLevel0Index(SEITemporalLevel0Index &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:683
Int & bottomRightTileIndex(const Int tileRectIndex)
Definition: SEI.h:562
UChar uuid_iso_iec_11578[ISO_IEC_11578_LEN]
Definition: SEI.h:113
virtual PayloadType payloadType() const =0
Int m_toneMapId
Definition: SEI.h:383
UInt * m_duCpbRemovalDelayMinus1
Definition: SEI.h:222
UInt m_numDecodingUnitsMinus1
Definition: SEI.h:218
UInt m_bpSeqParameterSetId
Definition: SEI.h:175
Bool m_quincunxSamplingFlag
Definition: SEI.h:267
Void xParseSEIChromaSamplingFilterHint(SEIChromaSamplingFilterHint &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:981
UInt m_nestingNumOpsMinus1
Definition: SEI.h:507
Bool getFrameFieldInfoPresentFlag() const
Definition: TComSlice.h:677
Void parseSEImessage(TComInputBitstream *bs, SEIMessages &seis, const NalUnitType nalUnitType, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:119
Void xTraceSEIMessageType(SEI::PayloadType payloadType)
Definition: SEIread.cpp:59
UInt m_auCpbRemovalDelayDelta
Definition: SEI.h:184
UInt getInitialCpbRemovalDelayLengthMinus1() const
Definition: TComSlice.h:350
unsigned char UChar
Definition: TypeDef.h:293
UInt getDpbOutputDelayLengthMinus1() const
Definition: TComSlice.h:356
class for handling bitstream (header)
Bool m_arrangementCancelFlag
Definition: SEI.h:265
Int m_codedDataBitDepth
Definition: SEI.h:386
UInt m_nestingNoOpMaxTemporalIdPlus1
Definition: SEI.h:512
Bool discontinuityFlag
Definition: TypeDef.h:809
Void xParseSEIToneMappingInfo(SEIToneMappingInfo &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:704
std::vector< UChar > hash
Definition: TypeDef.h:763
Int m_extendedWhiteLevelLumaCodeValue
Definition: SEI.h:408
Void setNumberOfTileRects(const Int number)
Definition: SEI.h:549
UInt m_duCommonCpbRemovalDelayMinus1
Definition: SEI.h:220
picture YUV buffer class (header)
Int getNumberOfTileSets() const
Definition: SEI.h:582
UInt anticlockwiseRotation
Definition: SEI.h:313
#define READ_FLAG(code, name)
Bool m_spatialFlippingFlag
Definition: SEI.h:269
Bool minutesFlag
Definition: TypeDef.h:816
#define READ_UVLC(code, name)
Void setNumberOfTileSets(const Int number)
Definition: SEI.h:581
Void xParseSEINoDisplay(SEINoDisplay &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:698
Void xParseSEIRecoveryPoint(SEIRecoveryPoint &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:609
UInt m_sopDescVclNaluType[1024]
Definition: SEI.h:370
UInt getCpbRemovalDelayLengthMinus1() const
Definition: TComSlice.h:353
UInt m_nestingMaxTemporalIdPlus1[MAX_TLAYER]
Definition: SEI.h:508
Bool m_noDisplay
Definition: SEI.h:356
Void xParseSEIuserDataUnregistered(SEIuserDataUnregistered &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:377
Int m_recoveryPocCnt
Definition: SEI.h:251
UInt m_initialAltCpbRemovalDelayOffset[32][2]
Definition: SEI.h:182
UInt m_initialCpbRemovalDelayOffset[32][2]
Definition: SEI.h:180
UInt getDpbOutputDelayDuLengthMinus1() const
Definition: TComSlice.h:339
Int secondsValue
Definition: TypeDef.h:812
Int m_exposureIndexValue
Definition: SEI.h:400
Bool m_nestingOpFlag
Definition: SEI.h:505
UShort whitePoint[2]
Definition: TypeDef.h:828
Bool getCpbDpbDelaysPresentFlag() const
Definition: TComSlice.h:387
Void xParseSEIMasteringDisplayColourVolume(SEIMasteringDisplayColourVolume &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:1058
Int m_arrangementType
Definition: SEI.h:266
Bool m_duCommonCpbRemovalDelayFlag
Definition: SEI.h:219
Int m_exposureCompensationValueDenomIdc
Definition: SEI.h:403
Int m_arrangementId
Definition: SEI.h:264
UInt * m_numNalusInDuMinus1
Definition: SEI.h:221
Void xParseSEISOPDescription(SEISOPDescription &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:789
std::vector< Int > m_codedPivotValue
Definition: SEI.h:395
Int m_kneeOutputDispLuminance
Definition: SEI.h:424
Int m_sigmoidMidpoint
Definition: SEI.h:391
UInt m_auCpbRemovalDelay
Definition: SEI.h:215
std::list< SEI * > SEIMessages
Definition: SEI.h:479
enum SEIDecodedPictureHash::Method method
Int m_extendedRangeWhiteLevel
Definition: SEI.h:405
UInt m_nestingNumLayersMinus1
Definition: SEI.h:513
int Int
Definition: TypeDef.h:296
Bool persistenceFlag
Definition: SEI.h:314
Bool m_mc_all_tiles_exact_sample_value_match_flag
Definition: SEI.h:572
Void xParseSEIDisplayOrientation(SEIDisplayOrientation &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:669
Void xParseSEIDecodingUnitInfo(SEIDecodingUnitInfo &sei, UInt payloadSize, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:469
Int m_refScreenLuminanceWhite
Definition: SEI.h:404
Bool m_concatenationFlag
Definition: SEI.h:183
Bool m_brokenLinkFlag
Definition: SEI.h:253
Bool m_toneMapPersistenceFlag
Definition: SEI.h:385
NalUnitType
Definition: CommonDef.h:218
Int m_kneeInputDrange
Definition: SEI.h:421
UInt getCpbCntMinus1(Int layer) const
Definition: TComSlice.h:371
Int m_kneeNumKneePointsMinus1
Definition: SEI.h:425
Int m_frame0GridPositionY
Definition: SEI.h:276
UInt m_picDpbOutputDuDelay
Definition: SEI.h:217
Bool fullTimeStampFlag
Definition: TypeDef.h:808
UInt peekBits(UInt uiBits)
Int timeOffsetLength
Definition: TypeDef.h:818
Bool m_toneMapCancelFlag
Definition: SEI.h:384
Int m_cameraIsoSpeedValue
Definition: SEI.h:398
UInt m_initialAltCpbRemovalDelay[32][2]
Definition: SEI.h:181
Bool m_dpbOutputDuDelayPresentFlag
Definition: SEI.h:239
Bool m_noParameterSetUpdateFlag
Definition: SEI.h:152
Bool m_upsampledAspectRatio
Definition: SEI.h:281
Bool m_kneeCancelFlag
Definition: SEI.h:419
Int m_arrangementReservedByte
Definition: SEI.h:279
Bool cntDroppedFlag
Definition: TypeDef.h:810
Bool m_defaultOpFlag
Definition: SEI.h:506
Void xParseSEISegmentedRectFramePacking(SEISegmentedRectFramePacking &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:657
Int m_targetBitDepth
Definition: SEI.h:387
Bool m_bitStreamSubsetFlag
Definition: SEI.h:504
reading funtionality for SEI messages
Void xParseSEIPictureTiming(SEIPictureTiming &sei, UInt payloadSize, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:544
UInt m_sopSeqParameterSetId
Definition: SEI.h:367
TComHRD * getHrdParameters()
Definition: TComSlice.h:714
static Void output_sei_message_header(SEI &sei, std::ostream *pDecodedMessageOutputStream, UInt payloadSize)
Definition: SEIread.cpp:101
UShort primaries[3][2]
Definition: TypeDef.h:827
TComSEITimeSet timeSetArray[3]
Definition: SEI.h:528
Bool m_duplicateFlag
Definition: SEI.h:213
Void xParseSEITimeCode(SEITimeCode &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Definition: SEIread.cpp:921
SPS class.
Definition: TComSlice.h:722
Bool m_arrangementPersistenceFlag
Definition: SEI.h:294
UInt m_sopDescStRpsIdx[1024]
Definition: SEI.h:372