HEVC Test Model (HM)  HM-16.18
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TAppDecTop.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-2017, 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 <list>
39 #include <vector>
40 #include <stdio.h>
41 #include <fcntl.h>
42 #include <assert.h>
43 
44 #include "TAppDecTop.h"
45 #include "TLibDecoder/AnnexBread.h"
46 #include "TLibDecoder/NALread.h"
47 #if RExt__DECODER_DEBUG_BIT_STATISTICS
49 #endif
50 
53 
54 // ====================================================================================================================
55 // Constructor / destructor / initialization / destroy
56 // ====================================================================================================================
57 
59 : m_iPOCLastDisplay(-MAX_INT)
60  ,m_pcSeiColourRemappingInfoPrevious(NULL)
61 {
62 }
63 
65 {
66 }
67 
69 {
70  m_bitstreamFileName.clear();
71  m_reconFileName.clear();
72 }
73 
74 // ====================================================================================================================
75 // Public member functions
76 // ====================================================================================================================
77 
87 {
88  Int poc;
89  TComList<TComPic*>* pcListPic = NULL;
90 
91  ifstream bitstreamFile(m_bitstreamFileName.c_str(), ifstream::in | ifstream::binary);
92  if (!bitstreamFile)
93  {
94  fprintf(stderr, "\nfailed to open bitstream file `%s' for reading\n", m_bitstreamFileName.c_str());
95  exit(EXIT_FAILURE);
96  }
97 
98  InputByteStream bytestream(bitstreamFile);
99 
101  {
102  m_seiMessageFileStream.open(m_outputDecodedSEIMessagesFilename.c_str(), std::ios::out);
103  if (!m_seiMessageFileStream.is_open() || !m_seiMessageFileStream.good())
104  {
105  fprintf(stderr, "\nUnable to open file `%s' for writing decoded SEI messages\n", m_outputDecodedSEIMessagesFilename.c_str());
106  exit(EXIT_FAILURE);
107  }
108  }
109 
110  // create & initialize internal classes
111  xCreateDecLib();
112  xInitDecLib ();
113  m_iPOCLastDisplay += m_iSkipFrame; // set the last displayed POC correctly for skip forward.
114 
115  // clear contents of colour-remap-information-SEI output file
116  if (!m_colourRemapSEIFileName.empty())
117  {
118  std::ofstream ofile(m_colourRemapSEIFileName.c_str());
119  if (!ofile.good() || !ofile.is_open())
120  {
121  fprintf(stderr, "\nUnable to open file '%s' for writing colour-remap-information-SEI video\n", m_colourRemapSEIFileName.c_str());
122  exit(EXIT_FAILURE);
123  }
124  }
125 
126  // main decoder loop
127  Bool openedReconFile = false; // reconstruction file not yet opened. (must be performed after SPS is seen)
128  Bool loopFiltered = false;
129 
130  while (!!bitstreamFile)
131  {
132  /* location serves to work around a design fault in the decoder, whereby
133  * the process of reading a new slice that is the first slice of a new frame
134  * requires the TDecTop::decode() method to be called again with the same
135  * nal unit. */
136 #if RExt__DECODER_DEBUG_BIT_STATISTICS
138  streampos location = bitstreamFile.tellg() - streampos(bytestream.GetNumBufferedBytes());
139 #else
140  streampos location = bitstreamFile.tellg();
141 #endif
142  AnnexBStats stats = AnnexBStats();
143 
144  InputNALUnit nalu;
145  byteStreamNALUnit(bytestream, nalu.getBitstream().getFifo(), stats);
146 
147  // call actual decoding function
148  Bool bNewPicture = false;
149  if (nalu.getBitstream().getFifo().empty())
150  {
151  /* this can happen if the following occur:
152  * - empty input file
153  * - two back-to-back start_code_prefixes
154  * - start_code_prefix immediately followed by EOF
155  */
156  fprintf(stderr, "Warning: Attempt to decode an empty NAL unit\n");
157  }
158  else
159  {
160  read(nalu);
162  {
163  bNewPicture = false;
164  }
165  else
166  {
167  bNewPicture = m_cTDecTop.decode(nalu, m_iSkipFrame, m_iPOCLastDisplay);
168  if (bNewPicture)
169  {
170  bitstreamFile.clear();
171  /* location points to the current nalunit payload[1] due to the
172  * need for the annexB parser to read three extra bytes.
173  * [1] except for the first NAL unit in the file
174  * (but bNewPicture doesn't happen then) */
175 #if RExt__DECODER_DEBUG_BIT_STATISTICS
176  bitstreamFile.seekg(location);
177  bytestream.reset();
179 #else
180  bitstreamFile.seekg(location-streamoff(3));
181  bytestream.reset();
182 #endif
183  }
184  }
185  }
186 
187  if ( (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS) &&
189  {
190  if (!loopFiltered || bitstreamFile)
191  {
192  m_cTDecTop.executeLoopFilters(poc, pcListPic);
193  }
194  loopFiltered = (nalu.m_nalUnitType == NAL_UNIT_EOS);
195  if (nalu.m_nalUnitType == NAL_UNIT_EOS)
196  {
198  }
199  }
200  else if ( (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS ) &&
202  {
204  }
205 
206  if( pcListPic )
207  {
208  if ( (!m_reconFileName.empty()) && (!openedReconFile) )
209  {
210  const BitDepths &bitDepths=pcListPic->front()->getPicSym()->getSPS().getBitDepths(); // use bit depths of first reconstructed picture.
211  for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++)
212  {
213  if (m_outputBitDepth[channelType] == 0)
214  {
215  m_outputBitDepth[channelType] = bitDepths.recon[channelType];
216  }
217  }
218 
220  openedReconFile = true;
221  }
222  // write reconstruction to file
223  if( bNewPicture )
224  {
225  xWriteOutput( pcListPic, nalu.m_temporalId );
226  }
228  {
229  m_cTDecTop.checkNoOutputPriorPics( pcListPic );
231  }
232  if ( bNewPicture &&
238  {
239  xFlushOutput( pcListPic );
240  }
241  if (nalu.m_nalUnitType == NAL_UNIT_EOS)
242  {
243  xWriteOutput( pcListPic, nalu.m_temporalId );
245  }
246  // write reconstruction to file -- for additional bumping as defined in C.5.2.3
248  {
249  xWriteOutput( pcListPic, nalu.m_temporalId );
250  }
251  }
252  }
253 
254  xFlushOutput( pcListPic );
255  // delete buffers
257 
258  // destroy internal classes
259  xDestroyDecLib();
260 }
261 
262 // ====================================================================================================================
263 // Protected member functions
264 // ====================================================================================================================
265 
267 {
268  // create decoder class
269  m_cTDecTop.create();
270 }
271 
273 {
274  if ( !m_reconFileName.empty() )
275  {
277  }
278 
279  // destroy decoder class
281 
283  {
286  }
287 }
288 
290 {
291  // initialize decoder class
292  m_cTDecTop.init();
294 #if MCTS_ENC_CHECK
296 #endif
297 #if O0043_BEST_EFFORT_DECODING
298  m_cTDecTop.setForceDecodeBitDepth(m_forceDecodeBitDepth);
299 #endif
301  {
302  std::ostream &os=m_seiMessageFileStream.is_open() ? m_seiMessageFileStream : std::cout;
304  }
306  {
309  }
310 }
311 
316 {
317  if (pcListPic->empty())
318  {
319  return;
320  }
321 
322  TComList<TComPic*>::iterator iterPic = pcListPic->begin();
323  Int numPicsNotYetDisplayed = 0;
324  Int dpbFullness = 0;
325  const TComSPS* activeSPS = &(pcListPic->front()->getPicSym()->getSPS());
326  UInt numReorderPicsHighestTid;
327  UInt maxDecPicBufferingHighestTid;
328  UInt maxNrSublayers = activeSPS->getMaxTLayers();
329 
330  if(m_iMaxTemporalLayer == -1 || m_iMaxTemporalLayer >= maxNrSublayers)
331  {
332  numReorderPicsHighestTid = activeSPS->getNumReorderPics(maxNrSublayers-1);
333  maxDecPicBufferingHighestTid = activeSPS->getMaxDecPicBuffering(maxNrSublayers-1);
334  }
335  else
336  {
337  numReorderPicsHighestTid = activeSPS->getNumReorderPics(m_iMaxTemporalLayer);
338  maxDecPicBufferingHighestTid = activeSPS->getMaxDecPicBuffering(m_iMaxTemporalLayer);
339  }
340 
341  while (iterPic != pcListPic->end())
342  {
343  TComPic* pcPic = *(iterPic);
344  if(pcPic->getOutputMark() && pcPic->getPOC() > m_iPOCLastDisplay)
345  {
346  numPicsNotYetDisplayed++;
347  dpbFullness++;
348  }
349  else if(pcPic->getSlice( 0 )->isReferenced())
350  {
351  dpbFullness++;
352  }
353  iterPic++;
354  }
355 
356  iterPic = pcListPic->begin();
357 
358  if (numPicsNotYetDisplayed>2)
359  {
360  iterPic++;
361  }
362 
363  TComPic* pcPic = *(iterPic);
364  if (numPicsNotYetDisplayed>2 && pcPic->isField()) //Field Decoding
365  {
366  TComList<TComPic*>::iterator endPic = pcListPic->end();
367  endPic--;
368  iterPic = pcListPic->begin();
369  while (iterPic != endPic)
370  {
371  TComPic* pcPicTop = *(iterPic);
372  iterPic++;
373  TComPic* pcPicBottom = *(iterPic);
374 
375  if ( pcPicTop->getOutputMark() && pcPicBottom->getOutputMark() &&
376  (numPicsNotYetDisplayed > numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid) &&
377  (!(pcPicTop->getPOC()%2) && pcPicBottom->getPOC() == pcPicTop->getPOC()+1) &&
378  (pcPicTop->getPOC() == m_iPOCLastDisplay+1 || m_iPOCLastDisplay < 0))
379  {
380  // write to file
381  numPicsNotYetDisplayed = numPicsNotYetDisplayed-2;
382  if ( !m_reconFileName.empty() )
383  {
384  const Window &conf = pcPicTop->getConformanceWindow();
385  const Window defDisp = m_respectDefDispWindow ? pcPicTop->getDefDisplayWindow() : Window();
386  const Bool isTff = pcPicTop->isTopField();
387 
388  Bool display = true;
390  {
391  SEIMessages noDisplay = getSeisByType(pcPic->getSEIs(), SEI::NO_DISPLAY );
392  const SEINoDisplay *nd = ( noDisplay.size() > 0 ) ? (SEINoDisplay*) *(noDisplay.begin()) : NULL;
393  if( (nd != NULL) && nd->m_noDisplay )
394  {
395  display = false;
396  }
397  }
398 
399  if (display)
400  {
401  m_cTVideoIOYuvReconFile.write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),
403  conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
404  conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
405  conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
407  }
408  }
409 
410  // update POC of display order
411  m_iPOCLastDisplay = pcPicBottom->getPOC();
412 
413  // erase non-referenced picture in the reference picture list after display
414  if ( !pcPicTop->getSlice(0)->isReferenced() && pcPicTop->getReconMark() == true )
415  {
416  pcPicTop->setReconMark(false);
417 
418  // mark it should be extended later
419  pcPicTop->getPicYuvRec()->setBorderExtension( false );
420  }
421  if ( !pcPicBottom->getSlice(0)->isReferenced() && pcPicBottom->getReconMark() == true )
422  {
423  pcPicBottom->setReconMark(false);
424 
425  // mark it should be extended later
426  pcPicBottom->getPicYuvRec()->setBorderExtension( false );
427  }
428  pcPicTop->setOutputMark(false);
429  pcPicBottom->setOutputMark(false);
430  }
431  }
432  }
433  else if (!pcPic->isField()) //Frame Decoding
434  {
435  iterPic = pcListPic->begin();
436 
437  while (iterPic != pcListPic->end())
438  {
439  pcPic = *(iterPic);
440 
441  if(pcPic->getOutputMark() && pcPic->getPOC() > m_iPOCLastDisplay &&
442  (numPicsNotYetDisplayed > numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid))
443  {
444  // write to file
445  numPicsNotYetDisplayed--;
446  if(pcPic->getSlice(0)->isReferenced() == false)
447  {
448  dpbFullness--;
449  }
450 
451  if ( !m_reconFileName.empty() )
452  {
453  const Window &conf = pcPic->getConformanceWindow();
454  const Window defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
455 
458  conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
459  conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
460  conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
461  conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(),
463  }
464 
465  if (!m_colourRemapSEIFileName.empty())
466  {
467  xOutputColourRemapPic(pcPic);
468  }
469 
470  // update POC of display order
471  m_iPOCLastDisplay = pcPic->getPOC();
472 
473  // erase non-referenced picture in the reference picture list after display
474  if ( !pcPic->getSlice(0)->isReferenced() && pcPic->getReconMark() == true )
475  {
476  pcPic->setReconMark(false);
477 
478  // mark it should be extended later
479  pcPic->getPicYuvRec()->setBorderExtension( false );
480  }
481  pcPic->setOutputMark(false);
482  }
483 
484  iterPic++;
485  }
486  }
487 }
488 
492 {
493  if(!pcListPic || pcListPic->empty())
494  {
495  return;
496  }
497  TComList<TComPic*>::iterator iterPic = pcListPic->begin();
498 
499  iterPic = pcListPic->begin();
500  TComPic* pcPic = *(iterPic);
501 
502  if (pcPic->isField()) //Field Decoding
503  {
504  TComList<TComPic*>::iterator endPic = pcListPic->end();
505  endPic--;
506  TComPic *pcPicTop, *pcPicBottom = NULL;
507  while (iterPic != endPic)
508  {
509  pcPicTop = *(iterPic);
510  iterPic++;
511  pcPicBottom = *(iterPic);
512 
513  if ( pcPicTop->getOutputMark() && pcPicBottom->getOutputMark() && !(pcPicTop->getPOC()%2) && (pcPicBottom->getPOC() == pcPicTop->getPOC()+1) )
514  {
515  // write to file
516  if ( !m_reconFileName.empty() )
517  {
518  const Window &conf = pcPicTop->getConformanceWindow();
519  const Window defDisp = m_respectDefDispWindow ? pcPicTop->getDefDisplayWindow() : Window();
520  const Bool isTff = pcPicTop->isTopField();
521  m_cTVideoIOYuvReconFile.write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),
523  conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
524  conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
525  conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
527  }
528 
529  // update POC of display order
530  m_iPOCLastDisplay = pcPicBottom->getPOC();
531 
532  // erase non-referenced picture in the reference picture list after display
533  if ( !pcPicTop->getSlice(0)->isReferenced() && pcPicTop->getReconMark() == true )
534  {
535  pcPicTop->setReconMark(false);
536 
537  // mark it should be extended later
538  pcPicTop->getPicYuvRec()->setBorderExtension( false );
539  }
540  if ( !pcPicBottom->getSlice(0)->isReferenced() && pcPicBottom->getReconMark() == true )
541  {
542  pcPicBottom->setReconMark(false);
543 
544  // mark it should be extended later
545  pcPicBottom->getPicYuvRec()->setBorderExtension( false );
546  }
547  pcPicTop->setOutputMark(false);
548  pcPicBottom->setOutputMark(false);
549 
550  if(pcPicTop)
551  {
552  pcPicTop->destroy();
553  delete pcPicTop;
554  pcPicTop = NULL;
555  }
556  }
557  }
558  if(pcPicBottom)
559  {
560  pcPicBottom->destroy();
561  delete pcPicBottom;
562  pcPicBottom = NULL;
563  }
564  }
565  else //Frame decoding
566  {
567  while (iterPic != pcListPic->end())
568  {
569  pcPic = *(iterPic);
570 
571  if ( pcPic->getOutputMark() )
572  {
573  // write to file
574  if ( !m_reconFileName.empty() )
575  {
576  const Window &conf = pcPic->getConformanceWindow();
577  const Window defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
578 
581  conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
582  conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
583  conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
584  conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(),
586  }
587 
588  if (!m_colourRemapSEIFileName.empty())
589  {
590  xOutputColourRemapPic(pcPic);
591  }
592 
593  // update POC of display order
594  m_iPOCLastDisplay = pcPic->getPOC();
595 
596  // erase non-referenced picture in the reference picture list after display
597  if ( !pcPic->getSlice(0)->isReferenced() && pcPic->getReconMark() == true )
598  {
599  pcPic->setReconMark(false);
600 
601  // mark it should be extended later
602  pcPic->getPicYuvRec()->setBorderExtension( false );
603  }
604  pcPic->setOutputMark(false);
605  }
606  if(pcPic != NULL)
607  {
608  pcPic->destroy();
609  delete pcPic;
610  pcPic = NULL;
611  }
612  iterPic++;
613  }
614  }
615  pcListPic->clear();
617 }
618 
622 {
623  if ( m_targetDecLayerIdSet.size() == 0 ) // By default, the set is empty, meaning all LayerIds are allowed
624  {
625  return true;
626  }
627  for (std::vector<Int>::iterator it = m_targetDecLayerIdSet.begin(); it != m_targetDecLayerIdSet.end(); it++)
628  {
629  if ( nalu->m_nuhLayerId == (*it) )
630  {
631  return true;
632  }
633  }
634  return false;
635 }
636 
638 {
639  const TComSPS &sps=pcPic->getPicSym()->getSPS();
640  SEIMessages colourRemappingInfo = getSeisByType(pcPic->getSEIs(), SEI::COLOUR_REMAPPING_INFO );
641  SEIColourRemappingInfo *seiColourRemappingInfo = ( colourRemappingInfo.size() > 0 ) ? (SEIColourRemappingInfo*) *(colourRemappingInfo.begin()) : NULL;
642 
643  if (colourRemappingInfo.size() > 1)
644  {
645  printf ("Warning: Got multiple Colour Remapping Information SEI messages. Using first.");
646  }
647  if (seiColourRemappingInfo)
648  {
649  applyColourRemapping(*pcPic->getPicYuvRec(), *seiColourRemappingInfo, sps);
650 
651  // save the last CRI SEI received
653  {
655  }
656  m_pcSeiColourRemappingInfoPrevious->copyFrom(*seiColourRemappingInfo);
657  }
658  else // using the last CRI SEI received
659  {
660  // TODO: prevent persistence of CRI SEI across C(L)VS.
662  {
664  {
665  printf("Warning No SEI-CRI message is present for the current picture, persistence of the CRI is not managed\n");
666  }
668  }
669  }
670 }
671 
672 // compute lut from SEI
673 // use at lutPoints points aligned on a power of 2 value
674 // SEI Lut must be in ascending values of coded Values
675 static std::vector<Int>
676 initColourRemappingInfoLut(const Int bitDepth_in, // bit-depth of the input values of the LUT
677  const Int nbDecimalValues, // Position of the fixed point
678  const std::vector<SEIColourRemappingInfo::CRIlut> &lut,
679  const Int maxValue, // maximum output value
680  const Int lutOffset)
681 {
682  const Int lutPoints = (1 << bitDepth_in) + 1 ;
683  std::vector<Int> retLut(lutPoints);
684 
685  // missing values: need to define default values before first definition (check codedValue[0] == 0)
686  Int iTargetPrev = (lut.size() && lut[0].codedValue == 0) ? lut[0].targetValue: 0;
687  Int startPivot = (lut.size())? ((lut[0].codedValue == 0)? 1: 0): 1;
688  Int iCodedPrev = 0;
689  // set max value with the coded bit-depth
690  // + ((1 << nbDecimalValues) - 1) is for the added bits
691  const Int maxValueFixedPoint = (maxValue << nbDecimalValues) + ((1 << nbDecimalValues) - 1);
692 
693  Int iValue = 0;
694 
695  for ( Int iPivot=startPivot ; iPivot < (Int)lut.size(); iPivot++ )
696  {
697  Int iCodedNext = lut[iPivot].codedValue;
698  Int iTargetNext = lut[iPivot].targetValue;
699 
700  // ensure correct bit depth and avoid overflow in lut address
701  Int iCodedNext_bitDepth = std::min(iCodedNext, (1 << bitDepth_in));
702 
703  const Int divValue = (iCodedNext - iCodedPrev > 0)? (iCodedNext - iCodedPrev): 1;
704  const Int lutValInit = (lutOffset + iTargetPrev) << nbDecimalValues;
705  const Int roundValue = divValue / 2;
706  for ( ; iValue<iCodedNext_bitDepth; iValue++ )
707  {
708  Int value = iValue;
709  Int interpol = ((((value-iCodedPrev) * (iTargetNext - iTargetPrev)) << nbDecimalValues) + roundValue) / divValue;
710  retLut[iValue] = std::min(lutValInit + interpol , maxValueFixedPoint);
711  }
712  iCodedPrev = iCodedNext;
713  iTargetPrev = iTargetNext;
714  }
715  // fill missing values if necessary
716  if(iCodedPrev < (1 << bitDepth_in)+1)
717  {
718  Int iCodedNext = (1 << bitDepth_in);
719  Int iTargetNext = (1 << bitDepth_in) - 1;
720 
721  const Int divValue = (iCodedNext - iCodedPrev > 0)? (iCodedNext - iCodedPrev): 1;
722  const Int lutValInit = (lutOffset + iTargetPrev) << nbDecimalValues;
723  const Int roundValue = divValue / 2;
724 
725  for ( ; iValue<=iCodedNext; iValue++ )
726  {
727  Int value = iValue;
728  Int interpol = ((((value-iCodedPrev) * (iTargetNext - iTargetPrev)) << nbDecimalValues) + roundValue) / divValue;
729  retLut[iValue] = std::min(lutValInit + interpol , maxValueFixedPoint);
730  }
731  }
732  return retLut;
733 }
734 
735 static Void
736 initColourRemappingInfoLuts(std::vector<Int> (&preLut)[3],
737  std::vector<Int> (&postLut)[3],
738  SEIColourRemappingInfo &pCriSEI,
739  const Int maxBitDepth)
740 {
741  Int internalBitDepth = pCriSEI.m_colourRemapBitDepth;
742  for ( Int c=0 ; c<3 ; c++ )
743  {
744  std::sort(pCriSEI.m_preLut[c].begin(), pCriSEI.m_preLut[c].end()); // ensure preLut is ordered in ascending values of codedValues
745  preLut[c] = initColourRemappingInfoLut(pCriSEI.m_colourRemapInputBitDepth, maxBitDepth - pCriSEI.m_colourRemapInputBitDepth, pCriSEI.m_preLut[c], ((1 << internalBitDepth) - 1), 0); //Fill preLut
746 
747  std::sort(pCriSEI.m_postLut[c].begin(), pCriSEI.m_postLut[c].end()); // ensure postLut is ordered in ascending values of codedValues
748  postLut[c] = initColourRemappingInfoLut(pCriSEI.m_colourRemapBitDepth, maxBitDepth - pCriSEI.m_colourRemapBitDepth, pCriSEI.m_postLut[c], (1 << internalBitDepth) - 1, 0); //Fill postLut
749  }
750 }
751 
752 // apply lut.
753 // Input lut values are aligned on power of 2 boundaries
754 static Int
755 applyColourRemappingInfoLut1D(Int inVal, const std::vector<Int> &lut, const Int inValPrecisionBits)
756 {
757  const Int roundValue = (inValPrecisionBits)? 1 << (inValPrecisionBits - 1): 0;
758  inVal = std::min(std::max(0, inVal), (Int)(((lut.size()-1) << inValPrecisionBits)));
759  Int index = (Int) std::min((inVal >> inValPrecisionBits), (Int)(lut.size()-2));
760  Int outVal = (( inVal - (index<<inValPrecisionBits) ) * (lut[index+1] - lut[index]) + roundValue) >> inValPrecisionBits;
761  outVal += lut[index] ;
762 
763  return outVal;
764 }
765 
766 static Int
767 applyColourRemappingInfoMatrix(const Int (&colourRemapCoeffs)[3], const Int postOffsetShift, const Int p0, const Int p1, const Int p2, const Int offset)
768 {
769  Int YUVMat = (colourRemapCoeffs[0]* p0 + colourRemapCoeffs[1]* p1 + colourRemapCoeffs[2]* p2 + offset) >> postOffsetShift;
770  return YUVMat;
771 }
772 
773 static Void
774 setColourRemappingInfoMatrixOffset(Int (&matrixOffset)[3], Int offset0, Int offset1, Int offset2)
775 {
776  matrixOffset[0] = offset0;
777  matrixOffset[1] = offset1;
778  matrixOffset[2] = offset2;
779 }
780 
781 static Void
782 setColourRemappingInfoMatrixOffsets( Int (&matrixInputOffset)[3],
783  Int (&matrixOutputOffset)[3],
784  const Int bitDepth,
785  const Bool crInputFullRangeFlag,
786  const Int crInputMatrixCoefficients,
787  const Bool crFullRangeFlag,
788  const Int crMatrixCoefficients)
789 {
790  // set static matrix offsets
791  Int crInputOffsetLuma = (crInputFullRangeFlag)? 0:-(16 << (bitDepth-8));
792  Int crOffsetLuma = (crFullRangeFlag)? 0:(16 << (bitDepth-8));
793  Int crInputOffsetChroma = 0;
794  Int crOffsetChroma = 0;
795 
796  switch(crInputMatrixCoefficients)
797  {
799  crInputOffsetChroma = 0;
800  if(!crInputFullRangeFlag)
801  {
802  fprintf(stderr, "WARNING: crInputMatrixCoefficients set to MATRIX_COEFFICIENTS_RGB and crInputFullRangeFlag not set\n");
803  crInputOffsetLuma = 0;
804  }
805  break;
809  crInputOffsetChroma = -(1 << (bitDepth-1));
810  break;
811  default:
812  fprintf(stderr, "WARNING: crInputMatrixCoefficients set to undefined value: %d\n", crInputMatrixCoefficients);
813  }
814 
815  switch(crMatrixCoefficients)
816  {
818  crOffsetChroma = 0;
819  if(!crFullRangeFlag)
820  {
821  fprintf(stderr, "WARNING: crMatrixCoefficients set to MATRIX_COEFFICIENTS_RGB and crInputFullRangeFlag not set\n");
822  crOffsetLuma = 0;
823  }
824  break;
828  crOffsetChroma = (1 << (bitDepth-1));
829  break;
830  default:
831  fprintf(stderr, "WARNING: crMatrixCoefficients set to undefined value: %d\n", crMatrixCoefficients);
832  }
833 
834  setColourRemappingInfoMatrixOffset(matrixInputOffset, crInputOffsetLuma, crInputOffsetChroma, crInputOffsetChroma);
835  setColourRemappingInfoMatrixOffset(matrixOutputOffset, crOffsetLuma, crOffsetChroma, crOffsetChroma);
836 }
837 
839 {
840  const Int maxBitDepth = 16;
841 
842  // create colour remapped picture
843  if( !criSEI.m_colourRemapCancelFlag && pic.getChromaFormat()!=CHROMA_400) // 4:0:0 not supported.
844  {
845  const Int iHeight = pic.getHeight(COMPONENT_Y);
846  const Int iWidth = pic.getWidth(COMPONENT_Y);
847  const ChromaFormat chromaFormatIDC = pic.getChromaFormat();
848 
849  TComPicYuv picYuvColourRemapped;
850  picYuvColourRemapped.createWithoutCUInfo( iWidth, iHeight, chromaFormatIDC );
851 
852  const Int iStrideIn = pic.getStride(COMPONENT_Y);
853  const Int iCStrideIn = pic.getStride(COMPONENT_Cb);
854  const Int iStrideOut = picYuvColourRemapped.getStride(COMPONENT_Y);
855  const Int iCStrideOut = picYuvColourRemapped.getStride(COMPONENT_Cb);
856  const Bool b444 = ( pic.getChromaFormat() == CHROMA_444 );
857  const Bool b422 = ( pic.getChromaFormat() == CHROMA_422 );
858  const Bool b420 = ( pic.getChromaFormat() == CHROMA_420 );
859 
860  std::vector<Int> preLut[3];
861  std::vector<Int> postLut[3];
862  Int matrixInputOffset[3];
863  Int matrixOutputOffset[3];
864  const Pel *YUVIn[MAX_NUM_COMPONENT];
865  Pel *YUVOut[MAX_NUM_COMPONENT];
866  YUVIn[COMPONENT_Y] = pic.getAddr(COMPONENT_Y);
867  YUVIn[COMPONENT_Cb] = pic.getAddr(COMPONENT_Cb);
868  YUVIn[COMPONENT_Cr] = pic.getAddr(COMPONENT_Cr);
869  YUVOut[COMPONENT_Y] = picYuvColourRemapped.getAddr(COMPONENT_Y);
870  YUVOut[COMPONENT_Cb] = picYuvColourRemapped.getAddr(COMPONENT_Cb);
871  YUVOut[COMPONENT_Cr] = picYuvColourRemapped.getAddr(COMPONENT_Cr);
872 
873  const Int bitDepth = criSEI.m_colourRemapBitDepth;
874  BitDepths bitDepthsCriFile;
875  bitDepthsCriFile.recon[CHANNEL_TYPE_LUMA] = bitDepth;
876  bitDepthsCriFile.recon[CHANNEL_TYPE_CHROMA] = bitDepth; // Different bitdepth is not implemented
877 
878  const Int postOffsetShift = criSEI.m_log2MatrixDenom;
879  const Int matrixRound = 1 << (postOffsetShift - 1);
880  const Int postLutInputPrecision = (maxBitDepth - criSEI.m_colourRemapBitDepth);
881 
882  if ( ! criSEI.m_colourRemapVideoSignalInfoPresentFlag ) // setting default
883  {
884  setColourRemappingInfoMatrixOffsets(matrixInputOffset, matrixOutputOffset, maxBitDepth,
887  }
888  else
889  {
890  setColourRemappingInfoMatrixOffsets(matrixInputOffset, matrixOutputOffset, maxBitDepth,
893  }
894 
895  // add matrix rounding to output matrix offsets
896  matrixOutputOffset[0] = (matrixOutputOffset[0] << postOffsetShift) + matrixRound;
897  matrixOutputOffset[1] = (matrixOutputOffset[1] << postOffsetShift) + matrixRound;
898  matrixOutputOffset[2] = (matrixOutputOffset[2] << postOffsetShift) + matrixRound;
899 
900  // Merge matrixInputOffset and matrixOutputOffset to matrixOutputOffset
901  matrixOutputOffset[0] += applyColourRemappingInfoMatrix(criSEI.m_colourRemapCoeffs[0], 0, matrixInputOffset[0], matrixInputOffset[1], matrixInputOffset[2], 0);
902  matrixOutputOffset[1] += applyColourRemappingInfoMatrix(criSEI.m_colourRemapCoeffs[1], 0, matrixInputOffset[0], matrixInputOffset[1], matrixInputOffset[2], 0);
903  matrixOutputOffset[2] += applyColourRemappingInfoMatrix(criSEI.m_colourRemapCoeffs[2], 0, matrixInputOffset[0], matrixInputOffset[1], matrixInputOffset[2], 0);
904 
905  // rescaling output: include CRI/output frame difference
906  const Int scaleShiftOut_neg = abs(bitDepth - maxBitDepth);
907  const Int scaleOut_round = 1 << (scaleShiftOut_neg-1);
908 
909  initColourRemappingInfoLuts(preLut, postLut, criSEI, maxBitDepth);
910 
911  assert(pic.getChromaFormat() != CHROMA_400);
913  const Int maxOutputValue = (1 << bitDepth) - 1;
914 
915  for( Int y = 0; y < iHeight; y++ )
916  {
917  for( Int x = 0; x < iWidth; x++ )
918  {
919  const Int xc = (x>>hs);
920  Bool computeChroma = b444 || ((b422 || !(y&1)) && !(x&1));
921 
922  Int YUVPre_0 = applyColourRemappingInfoLut1D(YUVIn[COMPONENT_Y][x], preLut[0], 0);
923  Int YUVPre_1 = applyColourRemappingInfoLut1D(YUVIn[COMPONENT_Cb][xc], preLut[1], 0);
924  Int YUVPre_2 = applyColourRemappingInfoLut1D(YUVIn[COMPONENT_Cr][xc], preLut[2], 0);
925 
926  Int YUVMat_0 = applyColourRemappingInfoMatrix(criSEI.m_colourRemapCoeffs[0], postOffsetShift, YUVPre_0, YUVPre_1, YUVPre_2, matrixOutputOffset[0]);
927  Int YUVLutB_0 = applyColourRemappingInfoLut1D(YUVMat_0, postLut[0], postLutInputPrecision);
928  YUVOut[COMPONENT_Y][x] = std::min(maxOutputValue, (YUVLutB_0 + scaleOut_round) >> scaleShiftOut_neg);
929 
930  if( computeChroma )
931  {
932  Int YUVMat_1 = applyColourRemappingInfoMatrix(criSEI.m_colourRemapCoeffs[1], postOffsetShift, YUVPre_0, YUVPre_1, YUVPre_2, matrixOutputOffset[1]);
933  Int YUVLutB_1 = applyColourRemappingInfoLut1D(YUVMat_1, postLut[1], postLutInputPrecision);
934  YUVOut[COMPONENT_Cb][xc] = std::min(maxOutputValue, (YUVLutB_1 + scaleOut_round) >> scaleShiftOut_neg);
935 
936  Int YUVMat_2 = applyColourRemappingInfoMatrix(criSEI.m_colourRemapCoeffs[2], postOffsetShift, YUVPre_0, YUVPre_1, YUVPre_2, matrixOutputOffset[2]);
937  Int YUVLutB_2 = applyColourRemappingInfoLut1D(YUVMat_2, postLut[2], postLutInputPrecision);
938  YUVOut[COMPONENT_Cr][xc] = std::min(maxOutputValue, (YUVLutB_2 + scaleOut_round) >> scaleShiftOut_neg);
939  }
940  }
941 
942  YUVIn[COMPONENT_Y] += iStrideIn;
943  YUVOut[COMPONENT_Y] += iStrideOut;
944  if( !(b420 && !(y&1)) )
945  {
946  YUVIn[COMPONENT_Cb] += iCStrideIn;
947  YUVIn[COMPONENT_Cr] += iCStrideIn;
948  YUVOut[COMPONENT_Cb] += iCStrideOut;
949  YUVOut[COMPONENT_Cr] += iCStrideOut;
950  }
951  }
952  //Write remapped picture in display order
953  picYuvColourRemapped.dump( m_colourRemapSEIFileName, bitDepthsCriFile, true );
954  picYuvColourRemapped.destroy();
955  }
956 }
957 
virtual Void destroy()
Definition: TComPic.cpp:189
Void xInitDecLib()
initialize decoder class
Definition: TAppDecTop.cpp:289
Void executeLoopFilters(Int &poc, TComList< TComPic * > *&rpcListPic)
Definition: TDecTop.cpp:219
Int m_outputBitDepth[MAX_NUM_CHANNEL_TYPE]
bit depth used for writing output
Definition: TAppDecCfg.h:62
Void setDecodedSEIMessageOutputStream(std::ostream *pOpStream)
Definition: TDecTop.h:150
Int getWindowTopOffset() const
Definition: TypeDef.h:929
Bool isField() const
Definition: TComPic.h:166
Void create()
create internal members
Definition: TAppDecTop.cpp:64
Bool write(TComPicYuv *pPicYuv, const InputColourSpaceConversion ipCSC, Int confLeft=0, Int confRight=0, Int confTop=0, Int confBottom=0, ChromaFormat fileFormat=NUM_CHROMA_FORMAT, const Bool bClipToRec709=false)
write one YUV frame with padding parameter
picture YUV buffer class
Definition: TComPicYuv.h:55
Bool isTopField()
Definition: TComPic.h:164
Bool getFirstSliceInSequence()
Definition: TDecTop.h:145
TVideoIOYuv m_cTVideoIOYuvReconFile
reconstruction YUV class
Definition: TAppDecTop.h:64
Bool getVideoFullRangeFlag() const
Definition: TComSlice.h:610
picture class (symbol + YUV buffers)
Definition: TComPic.h:56
void Void
Definition: TypeDef.h:203
std::string m_reconFileName
output reconstruction file name
Definition: TAppDecCfg.h:60
Int getStride(const ComponentID id) const
Definition: TComPicYuv.h:121
Int getWindowBottomOffset() const
Definition: TypeDef.h:931
reading functionality for NAL units
Int m_colourRemapMatrixCoefficients
Definition: SEI.h:917
Int getWindowLeftOffset() const
Definition: TypeDef.h:925
Void open(const std::string &fileName, Bool bWriteMode, const Int fileBitDepth[MAX_NUM_CHANNEL_TYPE], const Int MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE], const Int internalBitDepth[MAX_NUM_CHANNEL_TYPE])
open or create file
Void init()
Definition: TDecTop.cpp:129
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:42
#define NULL
Definition: CommonDef.h:107
Void createWithoutCUInfo(const Int picWidth, const Int picHeight, const ChromaFormat chromaFormatIDC, const Bool bUseMargin=false, const UInt maxCUWidth=0, const UInt maxCUHeight=0)
used for margin only
Definition: TComPicYuv.cpp:81
const std::vector< uint8_t > & getFifo() const
Int getHeight(const ComponentID id) const
Definition: TComPicYuv.h:117
TComSlice * getSlice(Int i)
Definition: TComPic.h:113
std::string m_colourRemapSEIFileName
output Colour Remapping file name
Definition: TAppDecCfg.h:68
Bool getNoOutputPriorPicsFlag()
Definition: TDecTop.h:142
unsigned int UInt
Definition: TypeDef.h:212
Int m_iMaxTemporalLayer
maximum temporal layer to be decoded
Definition: TAppDecCfg.h:65
InputColourSpaceConversion m_outputColourSpaceConvert
Definition: TAppDecCfg.h:63
static Void setColourRemappingInfoMatrixOffsets(Int(&matrixInputOffset)[3], Int(&matrixOutputOffset)[3], const Int bitDepth, const Bool crInputFullRangeFlag, const Int crInputMatrixCoefficients, const Bool crFullRangeFlag, const Int crMatrixCoefficients)
Definition: TAppDecTop.cpp:782
Void setFirstSliceInSequence(bool val)
Definition: TDecTop.h:146
Bool m_colourRemapVideoSignalInfoPresentFlag
Definition: SEI.h:913
NalUnitType m_nalUnitType
nal_unit_type
Definition: NAL.h:49
Bool isReferenced() const
Definition: TComSlice.h:1387
Short Pel
pixel type
Definition: TypeDef.h:249
UInt getMaxDecPicBuffering(UInt tlayer) const
Definition: TComSlice.h:926
Int recon[MAX_NUM_CHANNEL_TYPE]
the bit depth as indicated in the SPS
Definition: TypeDef.h:793
std::string m_bitstreamFileName
input bitstream file name
Definition: TAppDecCfg.h:59
TComVUI * getVuiParameters()
Definition: TComSlice.h:936
Bool isNaluWithinTargetDecLayerIdSet(InputNALUnit *nalu)
check whether given Nalu is within targetDecLayerIdSet
Definition: TAppDecTop.cpp:621
const Window & getConformanceWindow() const
Definition: TComPic.h:154
Bool m_colourRemapCancelFlag
Definition: SEI.h:911
TComPicYuv * getPicYuvRec()
Definition: TComPic.h:120
std::vector< CRIlut > m_postLut[3]
Definition: SEI.h:926
Void xFlushOutput(TComList< TComPic * > *pcListPic)
flush all remaining decoded pictures to file
Definition: TAppDecTop.cpp:491
Bool m_colourRemapFullRangeFlag
Definition: SEI.h:914
Decoder application class (header)
Window getDefDisplayWindow() const
Definition: TComPic.h:155
Bool m_tmctsCheck
Definition: TAppDecCfg.h:77
Int getWidth(const ComponentID id) const
Definition: TComPicYuv.h:116
Void setFirstSliceInPicture(bool val)
Definition: TDecTop.h:144
UInt getComponentScaleX(const ComponentID id) const
Definition: TComPicYuv.h:150
Int m_colourRemapCoeffs[3][3]
Definition: SEI.h:924
bool Bool
Definition: TypeDef.h:204
reading functions for Annex B byte streams
Void setDecodedPictureHashSEIEnabled(Int enabled)
Definition: TDecTop.h:129
static const Int MAX_INT
max. value of signed 32-bit integer
Definition: CommonDef.h:115
TDecTop m_cTDecTop
decoder class
Definition: TAppDecTop.h:63
Int getMatrixCoefficients() const
Definition: TComSlice.h:622
Void deletePicBuffer()
Definition: TDecTop.cpp:142
std::vector< CRIlut > m_preLut[3]
Definition: SEI.h:921
static std::vector< Int > initColourRemappingInfoLut(const Int bitDepth_in, const Int nbDecimalValues, const std::vector< SEIColourRemappingInfo::CRIlut > &lut, const Int maxValue, const Int lutOffset)
Definition: TAppDecTop.cpp:676
Void copyFrom(const SEIColourRemappingInfo &seiCriInput)
Definition: SEI.h:905
Void close()
close file
TComPicSym * getPicSym()
Definition: TComPic.h:111
ChromaFormat
chroma formats (according to semantics of chroma_format_idc)
Definition: TypeDef.h:292
Bool m_bClipOutputVideoToRec709Range
If true, clip the output video to the Rec 709 range on saving.
Definition: TAppDecCfg.h:75
Void xOutputColourRemapPic(TComPic *pcPic)
Definition: TAppDecTop.cpp:637
Int m_colourRemapInputBitDepth
Definition: SEI.h:918
Void setNoOutputPriorPicsFlag(Bool val)
Definition: TDecTop.h:143
UInt m_nuhLayerId
nuh_layer_id
Definition: NAL.h:51
const TComInputBitstream & getBitstream() const
Definition: NALread.h:64
Void decode()
main decoding function
Definition: TAppDecTop.cpp:86
static Void initColourRemappingInfoLuts(std::vector< Int >(&preLut)[3], std::vector< Int >(&postLut)[3], SEIColourRemappingInfo &pCriSEI, const Int maxBitDepth)
Definition: TAppDecTop.cpp:736
static Int applyColourRemappingInfoLut1D(Int inVal, const std::vector< Int > &lut, const Int inValPrecisionBits)
Definition: TAppDecTop.cpp:755
std::string m_outputDecodedSEIMessagesFilename
filename to output decoded SEI messages to. If &#39;-&#39;, then use stdout. If empty, do not output details...
Definition: TAppDecCfg.h:74
const TComSPS & getSPS() const
Definition: TComPicSym.h:163
Int getPOC() const
Definition: TComPic.h:115
Void setOutputMark(Bool b)
Definition: TComPic.h:144
Int m_iPOCLastDisplay
last POC in display order
Definition: TAppDecTop.h:67
Void setTMctsCheckEnabled(Bool enabled)
Definition: TDecTop.h:131
Void xWriteOutput(TComList< TComPic * > *pcListPic, UInt tId)
write YUV to file
Definition: TAppDecTop.cpp:315
Int m_iSkipFrame
counter for frames prior to the random access point to skip
Definition: TAppDecCfg.h:61
Void destroy()
Definition: TDecTop.cpp:119
Bool m_decodedNoDisplaySEIEnabled
Enable(true)/disable(false) writing only pictures that get displayed based on the no display SEI mess...
Definition: TAppDecCfg.h:67
Void dump(const std::string &fileName, const BitDepths &bitDepths, const Bool bAppend=false, const Bool bForceTo8Bit=false) const
Definition: TComPicYuv.cpp:281
Void setReconMark(Bool b)
Definition: TComPic.h:142
Pel * getAddr(const ComponentID ch)
Definition: TComPicYuv.h:139
std::list< SEI * > SEIMessages
Definition: SEI.h:123
Void xDestroyDecLib()
destroy internal classes
Definition: TAppDecTop.cpp:272
int Int
Definition: TypeDef.h:211
SEIColourRemappingInfo * m_pcSeiColourRemappingInfoPrevious
Definition: TAppDecTop.h:70
UInt getMaxTLayers() const
Definition: TComSlice.h:910
ComponentID
Definition: TypeDef.h:308
Int m_respectDefDispWindow
Only output content inside the default display window.
Definition: TAppDecCfg.h:70
std::ofstream m_seiMessageFileStream
Used for outputing SEI messages.
Definition: TAppDecTop.h:68
Bool m_colourRemapPersistenceFlag
Definition: SEI.h:912
static const TComCodingStatisticsData & GetStatistics()
Int getWindowRightOffset() const
Definition: TypeDef.h:927
Bool getReconMark() const
Definition: TComPic.h:143
return YUVMat
Definition: TAppDecTop.cpp:770
SEIMessages & getSEIs()
Definition: TComPic.h:174
Void read(InputNALUnit &nalu)
Definition: NALread.cpp:175
Void setBorderExtension(Bool b)
Definition: TComPicYuv.h:170
Void applyColourRemapping(const TComPicYuv &pic, SEIColourRemappingInfo &pCriSEI, const TComSPS &activeSPS)
Definition: TAppDecTop.cpp:838
Void destroy()
destroy internal members
Definition: TAppDecTop.cpp:68
Bool getOutputMark() const
Definition: TComPic.h:145
UInt m_temporalId
temporal_id
Definition: NAL.h:50
Bool byteStreamNALUnit(InputByteStream &bs, vector< uint8_t > &nalUnit, AnnexBStats &stats)
Definition: AnnexBread.cpp:182
Int m_colourRemapBitDepth
Definition: SEI.h:919
Bool decode(InputNALUnit &nalu, Int &iSkipFrame, Int &iPOCLastDisplay)
Definition: TDecTop.cpp:778
static Void SetStatistics(const TComCodingStatisticsData &src)
std::vector< Int > m_targetDecLayerIdSet
set of LayerIds to be included in the sub-bitstream extraction process.
Definition: TAppDecCfg.h:69
Void create()
Definition: TDecTop.cpp:112
Void checkNoOutputPriorPics(TComList< TComPic * > *rpcListPic)
Definition: TDecTop.cpp:242
Void destroy()
Definition: TComPicYuv.cpp:168
Int m_decodedPictureHashSEIEnabled
Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message.
Definition: TAppDecCfg.h:66
Void xCreateDecLib()
create internal classes
Definition: TAppDecTop.cpp:266
matrixOffset[1]
Definition: TAppDecTop.cpp:777
Int getNumReorderPics(UInt tlayer) const
Definition: TComSlice.h:881
SPS class.
Definition: TComSlice.h:740
ChromaFormat getChromaFormat() const
Definition: TComPicYuv.h:118