Newer
Older

Karsten Suehring
committed
/* The copyright in this software is being made available under the BSD
* License, included below. This software may be subject to other third party
* and contributor rights, including patent rights, and no such rights are
* granted under this license.
*
* Copyright (c) 2010-2019, ITU/ISO/IEC

Karsten Suehring
committed
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the ITU/ISO/IEC nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/** \file Slice.h
\brief slice header and SPS class (header)
*/
#ifndef __SLICE__
#define __SLICE__
#include <cstring>
#include <list>
#include <map>
#include <vector>
#include "CommonDef.h"
#include "Rom.h"
#include "ChromaFormat.h"
#include "Common.h"

Karsten Suehring
committed
//! \ingroup CommonLib
//! \{
#include "CommonLib/MotionInfo.h"
struct MotionInfo;

Karsten Suehring
committed
struct Picture;
class Pic;
class TrQuant;
// ====================================================================================================================
// Constants
// ====================================================================================================================
class PreCalcValues;
static const uint32_t REF_PIC_LIST_NUM_IDX=32;
typedef std::list<Picture*> PicList;
// ====================================================================================================================
// Class definition
// ====================================================================================================================
class ReferencePictureList
{
private:
int m_numberOfShorttermPictures;
int m_numberOfLongtermPictures;
int m_isLongtermRefPic[MAX_NUM_REF_PICS];
int m_refPicIdentifier[MAX_NUM_REF_PICS]; //This can be delta POC for STRP or POC LSB for LTRP
int m_POC[MAX_NUM_REF_PICS];
int m_numberOfActivePictures;
bool m_deltaPocMSBPresentFlag[MAX_NUM_REF_PICS];
int m_deltaPOCMSBCycleLT[MAX_NUM_REF_PICS];
public:
ReferencePictureList();
virtual ~ReferencePictureList();
void setRefPicIdentifier(int idx, int identifier, bool isLongterm);
int getRefPicIdentifier(int idx) const;
bool isRefPicLongterm(int idx) const;
void setNumberOfShorttermPictures(int numberOfStrp);
int getNumberOfShorttermPictures() const;
void setNumberOfLongtermPictures(int numberOfLtrp);
int getNumberOfLongtermPictures() const;
int getNumRefEntries() const { return m_numberOfShorttermPictures + m_numberOfLongtermPictures; }
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
void setPOC(int idx, int POC);
int getPOC(int idx) const;
void setNumberOfActivePictures(int numberOfLtrp);
int getNumberOfActivePictures() const;
int getDeltaPocMSBCycleLT(int i) const { return m_deltaPOCMSBCycleLT[i]; }
void setDeltaPocMSBCycleLT(int i, int x) { m_deltaPOCMSBCycleLT[i] = x; }
bool getDeltaPocMSBPresentFlag(int i) const { return m_deltaPocMSBPresentFlag[i]; }
void setDeltaPocMSBPresentFlag(int i, bool x) { m_deltaPocMSBPresentFlag[i] = x; }
void printRefPicInfo() const;
};
/// Reference Picture List set class
class RPLList
{
private:
std::vector<ReferencePictureList> m_referencePictureLists;
public:
RPLList() { }
virtual ~RPLList() { }
void create(int numberOfEntries) { m_referencePictureLists.resize(numberOfEntries); }
void destroy() { }
ReferencePictureList* getReferencePictureList(int referencePictureListIdx) { return &m_referencePictureLists[referencePictureListIdx]; }
const ReferencePictureList* getReferencePictureList(int referencePictureListIdx) const { return &m_referencePictureLists[referencePictureListIdx]; }
int getNumberOfReferencePictureLists() const { return int(m_referencePictureLists.size()); }
};

Karsten Suehring
committed
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
/// SCALING_LIST class
class ScalingList
{
public:
ScalingList();
virtual ~ScalingList() { }
int* getScalingListAddress(uint32_t sizeId, uint32_t listId) { return &(m_scalingListCoef[sizeId][listId][0]); } //!< get matrix coefficient
const int* getScalingListAddress(uint32_t sizeId, uint32_t listId) const { return &(m_scalingListCoef[sizeId][listId][0]); } //!< get matrix coefficient
void checkPredMode(uint32_t sizeId, uint32_t listId);
void setRefMatrixId(uint32_t sizeId, uint32_t listId, uint32_t u) { m_refMatrixId[sizeId][listId] = u; } //!< set reference matrix ID
uint32_t getRefMatrixId(uint32_t sizeId, uint32_t listId) const { return m_refMatrixId[sizeId][listId]; } //!< get reference matrix ID
const int* getScalingListDefaultAddress(uint32_t sizeId, uint32_t listId); //!< get default matrix coefficient
void processDefaultMatrix(uint32_t sizeId, uint32_t listId);
void setScalingListDC(uint32_t sizeId, uint32_t listId, uint32_t u) { m_scalingListDC[sizeId][listId] = u; } //!< set DC value
int getScalingListDC(uint32_t sizeId, uint32_t listId) const { return m_scalingListDC[sizeId][listId]; } //!< get DC value
void setScalingListPredModeFlag(uint32_t sizeId, uint32_t listId, bool bIsDPCM) { m_scalingListPredModeFlagIsDPCM[sizeId][listId] = bIsDPCM; }
bool getScalingListPredModeFlag(uint32_t sizeId, uint32_t listId) const { return m_scalingListPredModeFlagIsDPCM[sizeId][listId]; }
void checkDcOfMatrix();
void processRefMatrix(uint32_t sizeId, uint32_t listId , uint32_t refListId );
bool xParseScalingList(const std::string &fileName);
void setDefaultScalingList();
bool checkDefaultScalingList();
private:
void outputScalingLists(std::ostream &os) const;
bool m_scalingListPredModeFlagIsDPCM [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< reference list index
int m_scalingListDC [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< the DC value of the matrix coefficient for 16x16
uint32_t m_refMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< RefMatrixID
std::vector<int> m_scalingListCoef [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< quantization matrix
};
class ConstraintInfo
{
bool m_progressiveSourceFlag;
bool m_interlacedSourceFlag;
bool m_nonPackedConstraintFlag;
bool m_frameOnlyConstraintFlag;
bool m_intraOnlyConstraintFlag;
uint32_t m_maxBitDepthConstraintIdc;
ChromaFormat m_maxChromaFormatConstraintIdc;
bool m_onePictureOnlyConstraintFlag;
bool m_lowerBitRateConstraintFlag;
bool m_noQtbttDualTreeIntraConstraintFlag;
bool m_noPartitionConstraintsOverrideConstraintFlag;
bool m_noSaoConstraintFlag;
bool m_noAlfConstraintFlag;
bool m_noPcmConstraintFlag;
bool m_noRefWraparoundConstraintFlag;
bool m_noTemporalMvpConstraintFlag;
bool m_noSbtmvpConstraintFlag;
bool m_noAmvrConstraintFlag;
bool m_noBdofConstraintFlag;
bool m_noCclmConstraintFlag;
bool m_noMtsConstraintFlag;
bool m_noAffineMotionConstraintFlag;
bool m_noGbiConstraintFlag;
bool m_noTriangleConstraintFlag;
bool m_noLadfConstraintFlag;
#if JVET_O1136_TS_BDPCM_SIGNALLING
bool m_noBDPCMConstraintFlag;
#endif
bool m_noQpDeltaConstraintFlag;
bool m_noDepQuantConstraintFlag;
bool m_noSignDataHidingConstraintFlag;
public:
ConstraintInfo()
: m_progressiveSourceFlag (false)
, m_interlacedSourceFlag (false)
, m_nonPackedConstraintFlag (false)
, m_frameOnlyConstraintFlag (false)
, m_intraOnlyConstraintFlag (false)
, m_maxBitDepthConstraintIdc ( 0)
, m_maxChromaFormatConstraintIdc(CHROMA_420)
, m_noQtbttDualTreeIntraConstraintFlag(false)
, m_noPartitionConstraintsOverrideConstraintFlag(false)
, m_noSaoConstraintFlag (false)
, m_noAlfConstraintFlag (false)
, m_noPcmConstraintFlag (false)
, m_noRefWraparoundConstraintFlag(false)
, m_noTemporalMvpConstraintFlag(false)
, m_noSbtmvpConstraintFlag (false)
, m_noAmvrConstraintFlag (false)
, m_noBdofConstraintFlag (false)
, m_noCclmConstraintFlag (false)
, m_noMtsConstraintFlag (false)
, m_noAffineMotionConstraintFlag(false)
, m_noGbiConstraintFlag (false)
, m_noMhIntraConstraintFlag (false)
, m_noTriangleConstraintFlag (false)
, m_noLadfConstraintFlag (false)
, m_noTransformSkipConstraintFlag(false)
#if JVET_O1136_TS_BDPCM_SIGNALLING
, m_noBDPCMConstraintFlag (false)
#endif
, m_noQpDeltaConstraintFlag (false)
, m_noDepQuantConstraintFlag (false)
, m_noSignDataHidingConstraintFlag(false)
{}
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
bool getProgressiveSourceFlag() const { return m_progressiveSourceFlag; }
void setProgressiveSourceFlag(bool b) { m_progressiveSourceFlag = b; }
bool getInterlacedSourceFlag() const { return m_interlacedSourceFlag; }
void setInterlacedSourceFlag(bool b) { m_interlacedSourceFlag = b; }
bool getNonPackedConstraintFlag() const { return m_nonPackedConstraintFlag; }
void setNonPackedConstraintFlag(bool b) { m_nonPackedConstraintFlag = b; }
bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; }
void setFrameOnlyConstraintFlag(bool b) { m_frameOnlyConstraintFlag = b; }
uint32_t getMaxBitDepthConstraintIdc() const { return m_maxBitDepthConstraintIdc; }
void setMaxBitDepthConstraintIdc(uint32_t bitDepth) { m_maxBitDepthConstraintIdc = bitDepth; }
ChromaFormat getMaxChromaFormatConstraintIdc() const { return m_maxChromaFormatConstraintIdc; }
void setMaxChromaFormatConstraintIdc(ChromaFormat fmt) { m_maxChromaFormatConstraintIdc = fmt; }
bool getIntraOnlyConstraintFlag() const { return m_intraOnlyConstraintFlag; }
void setIntraOnlyConstraintFlag(bool b) { m_intraOnlyConstraintFlag = b; }
bool getOnePictureOnlyConstraintFlag() const { return m_onePictureOnlyConstraintFlag; }
void setOnePictureOnlyConstraintFlag(bool b) { m_onePictureOnlyConstraintFlag = b; }
bool getLowerBitRateConstraintFlag() const { return m_lowerBitRateConstraintFlag; }
void setLowerBitRateConstraintFlag(bool b) { m_lowerBitRateConstraintFlag = b; }
bool getNoQtbttDualTreeIntraConstraintFlag() const { return m_noQtbttDualTreeIntraConstraintFlag; }
void setNoQtbttDualTreeIntraConstraintFlag(bool bVal) { m_noQtbttDualTreeIntraConstraintFlag = bVal; }
bool getNoPartitionConstraintsOverrideConstraintFlag() const { return m_noPartitionConstraintsOverrideConstraintFlag; }
void setNoPartitionConstraintsOverrideConstraintFlag(bool bVal) { m_noPartitionConstraintsOverrideConstraintFlag = bVal; }
bool getNoSaoConstraintFlag() const { return m_noSaoConstraintFlag; }
void setNoSaoConstraintFlag(bool bVal) { m_noSaoConstraintFlag = bVal; }
bool getNoAlfConstraintFlag() const { return m_noAlfConstraintFlag; }
void setNoAlfConstraintFlag(bool bVal) { m_noAlfConstraintFlag = bVal; }
bool getNoPcmConstraintFlag() const { return m_noPcmConstraintFlag; }
void setNoPcmConstraintFlag(bool bVal) { m_noPcmConstraintFlag = bVal; }
bool getNoRefWraparoundConstraintFlag() const { return m_noRefWraparoundConstraintFlag; }
void setNoRefWraparoundConstraintFlag(bool bVal) { m_noRefWraparoundConstraintFlag = bVal; }
bool getNoTemporalMvpConstraintFlag() const { return m_noTemporalMvpConstraintFlag; }
void setNoTemporalMvpConstraintFlag(bool bVal) { m_noTemporalMvpConstraintFlag = bVal; }
bool getNoSbtmvpConstraintFlag() const { return m_noSbtmvpConstraintFlag; }
void setNoSbtmvpConstraintFlag(bool bVal) { m_noSbtmvpConstraintFlag = bVal; }
bool getNoAmvrConstraintFlag() const { return m_noAmvrConstraintFlag; }
void setNoAmvrConstraintFlag(bool bVal) { m_noAmvrConstraintFlag = bVal; }
bool getNoBdofConstraintFlag() const { return m_noBdofConstraintFlag; }
void setNoBdofConstraintFlag(bool bVal) { m_noBdofConstraintFlag = bVal; }
bool getNoDmvrConstraintFlag() const { return m_noDmvrConstraintFlag; }
void setNoDmvrConstraintFlag(bool bVal) { m_noDmvrConstraintFlag = bVal; }
bool getNoCclmConstraintFlag() const { return m_noCclmConstraintFlag; }
void setNoCclmConstraintFlag(bool bVal) { m_noCclmConstraintFlag = bVal; }
bool getNoMtsConstraintFlag() const { return m_noMtsConstraintFlag; }
void setNoMtsConstraintFlag(bool bVal) { m_noMtsConstraintFlag = bVal; }
bool getNoSbtConstraintFlag() const { return m_noSbtConstraintFlag; }
void setNoSbtConstraintFlag(bool bVal) { m_noSbtConstraintFlag = bVal; }
bool getNoAffineMotionConstraintFlag() const { return m_noAffineMotionConstraintFlag; }
void setNoAffineMotionConstraintFlag(bool bVal) { m_noAffineMotionConstraintFlag = bVal; }
bool getNoGbiConstraintFlag() const { return m_noGbiConstraintFlag; }
void setNoGbiConstraintFlag(bool bVal) { m_noGbiConstraintFlag = bVal; }
bool getNoIbcConstraintFlag() const { return m_noIbcConstraintFlag; }
void setNoIbcConstraintFlag(bool bVal) { m_noIbcConstraintFlag = bVal; }
bool getNoMhIntraConstraintFlag() const { return m_noMhIntraConstraintFlag; }
void setNoMhIntraConstraintFlag(bool bVal) { m_noMhIntraConstraintFlag = bVal; }
bool getNoFPelMmvdConstraintFlag() const { return m_noFPelMmvdConstraintFlag; }
void setNoFPelMmvdConstraintFlag(bool bVal) { m_noFPelMmvdConstraintFlag = bVal; }
bool getNoTriangleConstraintFlag() const { return m_noTriangleConstraintFlag; }
void setNoTriangleConstraintFlag(bool bVal) { m_noTriangleConstraintFlag = bVal; }
bool getNoLadfConstraintFlag() const { return m_noLadfConstraintFlag; }
void setNoLadfConstraintFlag(bool bVal) { m_noLadfConstraintFlag = bVal; }
bool getNoTransformSkipConstraintFlag() const { return m_noTransformSkipConstraintFlag; }
void setNoTransformSkipConstraintFlag(bool bVal) { m_noTransformSkipConstraintFlag = bVal; }
#if JVET_O1136_TS_BDPCM_SIGNALLING
bool getNoBDPCMConstraintFlag() const { return m_noBDPCMConstraintFlag; }
void setNoBDPCMConstraintFlag(bool bVal) { m_noBDPCMConstraintFlag = bVal; }
#endif
bool getNoQpDeltaConstraintFlag() const { return m_noQpDeltaConstraintFlag; }
void setNoQpDeltaConstraintFlag(bool bVal) { m_noQpDeltaConstraintFlag = bVal; }
bool getNoDepQuantConstraintFlag() const { return m_noDepQuantConstraintFlag; }
void setNoDepQuantConstraintFlag(bool bVal) { m_noDepQuantConstraintFlag = bVal; }
bool getNoSignDataHidingConstraintFlag() const { return m_noSignDataHidingConstraintFlag; }
void setNoSignDataHidingConstraintFlag(bool bVal) { m_noSignDataHidingConstraintFlag = bVal; }
};

Karsten Suehring
committed
class ProfileTierLevel
{
Level::Tier m_tierFlag;
Profile::Name m_profileIdc;

Karsten Suehring
committed
Level::Name m_levelIdc;
ConstraintInfo m_constraintInfo;
bool m_subLayerLevelPresentFlag[MAX_TLAYER - 1];
Level::Name m_subLayerLevelIdc[MAX_TLAYER - 1];

Karsten Suehring
committed
public:
ProfileTierLevel();
Level::Tier getTierFlag() const { return m_tierFlag; }
void setTierFlag(Level::Tier x) { m_tierFlag = x; }
Profile::Name getProfileIdc() const { return m_profileIdc; }
void setProfileIdc(Profile::Name x) { m_profileIdc = x; }
uint32_t getSubProfileIdc() const { return m_subProfileIdc; }
void setSubProfileIdc(uint32_t x) { m_subProfileIdc = x; }

Karsten Suehring
committed
Level::Name getLevelIdc() const { return m_levelIdc; }
void setLevelIdc(Level::Name x) { m_levelIdc = x; }
ConstraintInfo* getConstraintInfo() { return &m_constraintInfo; }
const ConstraintInfo* getConstraintInfo() const { return &m_constraintInfo; }
bool getSubLayerLevelPresentFlag(int i) const { return m_subLayerLevelPresentFlag[i]; }
void setSubLayerLevelPresentFlag(int i, bool x) { m_subLayerLevelPresentFlag[i] = x; }
Level::Name getSubLayerLevelIdc(int i) const { return m_subLayerLevelIdc[i]; }
void setSubLayerLevelIdc(int i, Level::Name x) { m_subLayerLevelIdc[i] = x; }

Karsten Suehring
committed
};
bool sliceReshaperEnableFlag;
bool sliceReshaperModelPresentFlag;
unsigned enableChromaAdj;
uint32_t reshaperModelMinBinIdx;
uint32_t reshaperModelMaxBinIdx;
int reshaperModelBinCWDelta[PIC_CODE_CW_BINS];
void setUseSliceReshaper(bool b) { sliceReshaperEnableFlag = b; }
bool getUseSliceReshaper() const { return sliceReshaperEnableFlag; }
void setSliceReshapeModelPresentFlag(bool b) { sliceReshaperModelPresentFlag = b; }
bool getSliceReshapeModelPresentFlag() const { return sliceReshaperModelPresentFlag; }
void setSliceReshapeChromaAdj(unsigned adj) { enableChromaAdj = adj; }
unsigned getSliceReshapeChromaAdj() const { return enableChromaAdj; }
std::vector<uint32_t> binCW;
int rspPicSize;
int rspIntraPeriod;
int rspFps;
int rspBaseQP;
int rspTid;
int rspSliceQP;
int rspFpsToIp;

Karsten Suehring
committed
struct ChromaQpAdj
{
union
{
struct {
int CbOffset;
int CrOffset;
#if JVET_O1168_CU_CHROMA_QP_OFFSET
int JointCbCrOffset;
#endif

Karsten Suehring
committed
} comp;
#if JVET_O1168_CU_CHROMA_QP_OFFSET
int offset[3];
#else

Karsten Suehring
committed
int offset[2]; /* two chroma components */

Karsten Suehring
committed
} u;
};
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
class DPS
{
private:
int m_decodingParameterSetId;
int m_maxSubLayersMinus1;
ProfileTierLevel m_profileTierLevel;
public:
DPS()
: m_decodingParameterSetId(-1)
, m_maxSubLayersMinus1 (0)
{};
virtual ~DPS() {};
int getDecodingParameterSetId() const { return m_decodingParameterSetId; }
void setDecodingParameterSetId(int val) { m_decodingParameterSetId = val; }
int getMaxSubLayersMinus1() const { return m_maxSubLayersMinus1; }
void setMaxSubLayersMinus1(int val) { m_maxSubLayersMinus1 = val; }
void setProfileTierLevel(const ProfileTierLevel &val) { m_profileTierLevel = val; }
const ProfileTierLevel& getProfileTierLevel() const { return m_profileTierLevel; }
};
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
class VPS
{
private:
int m_VPSId;
uint32_t m_uiMaxLayers;
uint32_t m_vpsIncludedLayerId[MAX_VPS_LAYERS];
bool m_vpsExtensionFlag;
public:
VPS();
virtual ~VPS();
int getVPSId() const { return m_VPSId; }
void setVPSId(int i) { m_VPSId = i; }
uint32_t getMaxLayers() const { return m_uiMaxLayers; }
void setMaxLayers(uint32_t l) { m_uiMaxLayers = l; }
bool getVPSExtensionFlag() const { return m_vpsExtensionFlag; }
void setVPSExtensionFlag(bool t) { m_vpsExtensionFlag = t; }
void setVPSIncludedLayerId(uint32_t v, uint32_t Layer) { m_vpsIncludedLayerId[Layer] = v; }
uint32_t getVPSIncludedLayerId(uint32_t Layer) const { return m_vpsIncludedLayerId[Layer]; }
};

Karsten Suehring
committed
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
class Window
{
private:
bool m_enabledFlag;
int m_winLeftOffset;
int m_winRightOffset;
int m_winTopOffset;
int m_winBottomOffset;
public:
Window()
: m_enabledFlag (false)
, m_winLeftOffset (0)
, m_winRightOffset (0)
, m_winTopOffset (0)
, m_winBottomOffset(0)
{ }
bool getWindowEnabledFlag() const { return m_enabledFlag; }
int getWindowLeftOffset() const { return m_enabledFlag ? m_winLeftOffset : 0; }
void setWindowLeftOffset(int val) { m_winLeftOffset = val; m_enabledFlag = true; }
int getWindowRightOffset() const { return m_enabledFlag ? m_winRightOffset : 0; }
void setWindowRightOffset(int val) { m_winRightOffset = val; m_enabledFlag = true; }
int getWindowTopOffset() const { return m_enabledFlag ? m_winTopOffset : 0; }
void setWindowTopOffset(int val) { m_winTopOffset = val; m_enabledFlag = true; }
int getWindowBottomOffset() const { return m_enabledFlag ? m_winBottomOffset: 0; }
void setWindowBottomOffset(int val) { m_winBottomOffset = val; m_enabledFlag = true; }
void setWindow(int offsetLeft, int offsetLRight, int offsetLTop, int offsetLBottom)
{
m_enabledFlag = true;
m_winLeftOffset = offsetLeft;
m_winRightOffset = offsetLRight;
m_winTopOffset = offsetLTop;
m_winBottomOffset = offsetLBottom;
}
};
class VUI
{
private:
bool m_aspectRatioInfoPresentFlag;
int m_aspectRatioIdc;
int m_sarWidth;
int m_sarHeight;
bool m_colourDescriptionPresentFlag;
int m_colourPrimaries;
int m_transferCharacteristics;
int m_matrixCoefficients;
bool m_fieldSeqFlag;
bool m_chromaLocInfoPresentFlag;
int m_chromaSampleLocTypeTopField;
int m_chromaSampleLocTypeBottomField;
int m_chromaSampleLocType;
bool m_overscanInfoPresentFlag;
bool m_overscanAppropriateFlag;
bool m_videoSignalTypePresentFlag;
bool m_videoFullRangeFlag;

Karsten Suehring
committed
public:
VUI()
: m_aspectRatioInfoPresentFlag (false) //TODO: This initialiser list contains magic numbers
, m_aspectRatioIdc (0)
, m_sarWidth (0)
, m_sarHeight (0)
, m_colourDescriptionPresentFlag (false)
, m_colourPrimaries (2)
, m_transferCharacteristics (2)
, m_matrixCoefficients (2)
, m_fieldSeqFlag (false)
, m_chromaLocInfoPresentFlag (false)
, m_chromaSampleLocTypeTopField (0)
, m_chromaSampleLocTypeBottomField (0)
, m_chromaSampleLocType (0)
, m_overscanInfoPresentFlag (false)
, m_overscanAppropriateFlag (false)
, m_videoSignalTypePresentFlag (false)
, m_videoFullRangeFlag (false)
{}

Karsten Suehring
committed
virtual ~VUI() {}
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
bool getAspectRatioInfoPresentFlag() const { return m_aspectRatioInfoPresentFlag; }
void setAspectRatioInfoPresentFlag(bool i) { m_aspectRatioInfoPresentFlag = i; }
int getAspectRatioIdc() const { return m_aspectRatioIdc; }
void setAspectRatioIdc(int i) { m_aspectRatioIdc = i; }
int getSarWidth() const { return m_sarWidth; }
void setSarWidth(int i) { m_sarWidth = i; }
int getSarHeight() const { return m_sarHeight; }
void setSarHeight(int i) { m_sarHeight = i; }
bool getColourDescriptionPresentFlag() const { return m_colourDescriptionPresentFlag; }
void setColourDescriptionPresentFlag(bool i) { m_colourDescriptionPresentFlag = i; }
int getColourPrimaries() const { return m_colourPrimaries; }
void setColourPrimaries(int i) { m_colourPrimaries = i; }
int getTransferCharacteristics() const { return m_transferCharacteristics; }
void setTransferCharacteristics(int i) { m_transferCharacteristics = i; }
int getMatrixCoefficients() const { return m_matrixCoefficients; }
void setMatrixCoefficients(int i) { m_matrixCoefficients = i; }
bool getFieldSeqFlag() const { return m_fieldSeqFlag; }
void setFieldSeqFlag(bool i) { m_fieldSeqFlag = i; }
bool getChromaLocInfoPresentFlag() const { return m_chromaLocInfoPresentFlag; }
void setChromaLocInfoPresentFlag(bool i) { m_chromaLocInfoPresentFlag = i; }
int getChromaSampleLocTypeTopField() const { return m_chromaSampleLocTypeTopField; }
void setChromaSampleLocTypeTopField(int i) { m_chromaSampleLocTypeTopField = i; }
int getChromaSampleLocTypeBottomField() const { return m_chromaSampleLocTypeBottomField; }
void setChromaSampleLocTypeBottomField(int i) { m_chromaSampleLocTypeBottomField = i; }
int getChromaSampleLocType() const { return m_chromaSampleLocType; }
void setChromaSampleLocType(int i) { m_chromaSampleLocType = i; }
bool getOverscanInfoPresentFlag() const { return m_overscanInfoPresentFlag; }
void setOverscanInfoPresentFlag(bool i) { m_overscanInfoPresentFlag = i; }
bool getOverscanAppropriateFlag() const { return m_overscanAppropriateFlag; }
void setOverscanAppropriateFlag(bool i) { m_overscanAppropriateFlag = i; }
bool getVideoSignalTypePresentFlag() const { return m_videoSignalTypePresentFlag; }
void setVideoSignalTypePresentFlag(bool i) { m_videoSignalTypePresentFlag = i; }
bool getVideoFullRangeFlag() const { return m_videoFullRangeFlag; }
void setVideoFullRangeFlag(bool i) { m_videoFullRangeFlag = i; }

Karsten Suehring
committed
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
};
/// SPS RExt class
class SPSRExt // Names aligned to text specification
{
private:
bool m_transformSkipRotationEnabledFlag;
bool m_transformSkipContextEnabledFlag;
bool m_rdpcmEnabledFlag[NUMBER_OF_RDPCM_SIGNALLING_MODES];
bool m_extendedPrecisionProcessingFlag;
bool m_intraSmoothingDisabledFlag;
bool m_highPrecisionOffsetsEnabledFlag;
bool m_persistentRiceAdaptationEnabledFlag;
bool m_cabacBypassAlignmentEnabledFlag;
public:
SPSRExt();
bool settingsDifferFromDefaults() const
{
return getTransformSkipRotationEnabledFlag()
|| getTransformSkipContextEnabledFlag()
|| getRdpcmEnabledFlag(RDPCM_SIGNAL_IMPLICIT)
|| getRdpcmEnabledFlag(RDPCM_SIGNAL_EXPLICIT)
|| getExtendedPrecisionProcessingFlag()
|| getIntraSmoothingDisabledFlag()
|| getHighPrecisionOffsetsEnabledFlag()
|| getPersistentRiceAdaptationEnabledFlag()
|| getCabacBypassAlignmentEnabledFlag();
}
bool getTransformSkipRotationEnabledFlag() const { return m_transformSkipRotationEnabledFlag; }
void setTransformSkipRotationEnabledFlag(const bool value) { m_transformSkipRotationEnabledFlag = value; }
bool getTransformSkipContextEnabledFlag() const { return m_transformSkipContextEnabledFlag; }
void setTransformSkipContextEnabledFlag(const bool value) { m_transformSkipContextEnabledFlag = value; }
bool getRdpcmEnabledFlag(const RDPCMSignallingMode signallingMode) const { return m_rdpcmEnabledFlag[signallingMode]; }
void setRdpcmEnabledFlag(const RDPCMSignallingMode signallingMode, const bool value) { m_rdpcmEnabledFlag[signallingMode] = value; }
bool getExtendedPrecisionProcessingFlag() const { return m_extendedPrecisionProcessingFlag; }
void setExtendedPrecisionProcessingFlag(bool value) { m_extendedPrecisionProcessingFlag = value; }
bool getIntraSmoothingDisabledFlag() const { return m_intraSmoothingDisabledFlag; }
void setIntraSmoothingDisabledFlag(bool bValue) { m_intraSmoothingDisabledFlag=bValue; }
bool getHighPrecisionOffsetsEnabledFlag() const { return m_highPrecisionOffsetsEnabledFlag; }
void setHighPrecisionOffsetsEnabledFlag(bool value) { m_highPrecisionOffsetsEnabledFlag = value; }
bool getPersistentRiceAdaptationEnabledFlag() const { return m_persistentRiceAdaptationEnabledFlag; }
void setPersistentRiceAdaptationEnabledFlag(const bool value) { m_persistentRiceAdaptationEnabledFlag = value; }
bool getCabacBypassAlignmentEnabledFlag() const { return m_cabacBypassAlignmentEnabledFlag; }
void setCabacBypassAlignmentEnabledFlag(const bool value) { m_cabacBypassAlignmentEnabledFlag = value; }
};
/// SPS class
class SPS
{
private:
int m_SPSId;
int m_decodingParameterSetId;
Zhipin Deng
committed
bool m_affineAmvrEnabledFlag;
Yin Zhao
committed
bool m_SBT;
uint8_t m_MaxSbtSize;

Karsten Suehring
committed
ChromaFormat m_chromaFormatIdc;
uint32_t m_uiMaxTLayers; // maximum number of temporal layers
// Structure
uint32_t m_picWidthInLumaSamples;
uint32_t m_picHeightInLumaSamples;
int m_log2MinCodingBlockSize;
int m_log2DiffMaxMinCodingBlockSize;
unsigned m_CTUSize;
unsigned m_partitionOverrideEnalbed; // enable partition constraints override function
unsigned m_minQT[3]; // 0: I slice luma; 1: P/B slice; 2: I slice chroma
unsigned m_maxBTDepth[3];
unsigned m_maxBTSize[3];
unsigned m_maxTTSize[3];

Karsten Suehring
committed
uint32_t m_uiMaxCUWidth;
uint32_t m_uiMaxCUHeight;
uint32_t m_uiMaxCodingDepth; ///< Total CU depth, relative to the smallest possible transform block size.
Window m_conformanceWindow;
RPLList m_RPLList0;
RPLList m_RPLList1;
uint32_t m_numRPL0;
uint32_t m_numRPL1;
bool m_rpl1CopyFromRpl0Flag;
bool m_rpl1IdxPresentFlag;
bool m_allRplEntriesHasSameSignFlag;

Karsten Suehring
committed
bool m_bLongTermRefsPresent;
bool m_SPSTemporalMVPEnabledFlag;
int m_numReorderPics[MAX_TLAYER];
// Tool list

Karsten Suehring
committed
uint32_t m_pcmLog2MaxSize;
uint32_t m_uiPCMLog2MinSize;
#if JVET_O1136_TS_BDPCM_SIGNALLING
bool m_transformSkipEnabledFlag;
bool m_BDPCMEnabledFlag;
#endif

Karsten Suehring
committed
// Parameter
BitDepths m_bitDepths;
int m_qpBDOffset[MAX_NUM_CHANNEL_TYPE];
int m_pcmBitDepths[MAX_NUM_CHANNEL_TYPE];
bool m_bPCMFilterDisableFlag;
bool m_sbtmvpEnabledFlag;
bool m_bdofEnabledFlag;
bool m_fpelMmvdEnabledFlag;
#if JVET_O1140_SLICE_DISABLE_BDOF_DMVR_FLAG
bool m_BdofDmvrSlicePresentFlag;
#endif

Karsten Suehring
committed
uint32_t m_uiBitsForPOC;
uint32_t m_numLongTermRefPicSPS;
uint32_t m_ltRefPicPocLsbSps[MAX_NUM_LONG_TERM_REF_PICS];
bool m_usedByCurrPicLtSPSFlag[MAX_NUM_LONG_TERM_REF_PICS];
#if MAX_TB_SIZE_SIGNALLING
uint32_t m_log2MaxTbSize;
#endif

Karsten Suehring
committed

Karsten Suehring
committed
bool m_bTemporalIdNestingFlag; // temporal_id_nesting_flag
bool m_scalingListEnabledFlag;
bool m_scalingListPresentFlag;
ScalingList m_scalingList;
uint32_t m_uiMaxDecPicBuffering[MAX_TLAYER];
uint32_t m_uiMaxLatencyIncreasePlus1[MAX_TLAYER];
TimingInfo m_timingInfo;
bool m_hrdParametersPresentFlag;
HRDParameters m_hrdParameters;

Karsten Suehring
committed
bool m_vuiParametersPresentFlag;
VUI m_vuiParameters;
SPSRExt m_spsRangeExtension;
static const int m_winUnitX[NUM_CHROMA_FORMAT];
static const int m_winUnitY[NUM_CHROMA_FORMAT];
ProfileTierLevel m_profileTierLevel;

Karsten Suehring
committed

Karsten Suehring
committed
unsigned m_wrapAroundOffset;
bool m_cclmCollocatedChromaFlag;
bool m_MTS;
bool m_IntraMTS; // 18
bool m_InterMTS; // 19
bool m_Affine;
bool m_AffineType;
bool m_GBi; //
bool m_MHIntra;
bool m_Triangle;
#if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
bool m_LadfEnabled;
int m_LadfNumIntervals;
int m_LadfQpOffset[MAX_LADF_INTERVALS];
int m_LadfIntervalLowerBound[MAX_LADF_INTERVALS];
#endif

Karsten Suehring
committed
public:
SPS();
virtual ~SPS();
int getSPSId() const { return m_SPSId; }
void setSPSId(int i) { m_SPSId = i; }
void setDecodingParameterSetId(int val) { m_decodingParameterSetId = val; }
int getDecodingParameterSetId() const { return m_decodingParameterSetId; }

Karsten Suehring
committed
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
ChromaFormat getChromaFormatIdc () const { return m_chromaFormatIdc; }
void setChromaFormatIdc (ChromaFormat i) { m_chromaFormatIdc = i; }
static int getWinUnitX (int chromaFormatIdc) { CHECK(chromaFormatIdc < 0 || chromaFormatIdc >= NUM_CHROMA_FORMAT, "Invalid chroma format parameter"); return m_winUnitX[chromaFormatIdc]; }
static int getWinUnitY (int chromaFormatIdc) { CHECK(chromaFormatIdc < 0 || chromaFormatIdc >= NUM_CHROMA_FORMAT, "Invalid chroma format parameter"); return m_winUnitY[chromaFormatIdc]; }
// structure
void setPicWidthInLumaSamples( uint32_t u ) { m_picWidthInLumaSamples = u; }
uint32_t getPicWidthInLumaSamples() const { return m_picWidthInLumaSamples; }
void setPicHeightInLumaSamples( uint32_t u ) { m_picHeightInLumaSamples = u; }
uint32_t getPicHeightInLumaSamples() const { return m_picHeightInLumaSamples; }
Window& getConformanceWindow() { return m_conformanceWindow; }
const Window& getConformanceWindow() const { return m_conformanceWindow; }
void setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; }
uint32_t getNumLongTermRefPicSPS() const { return m_numLongTermRefPicSPS; }
void setNumLongTermRefPicSPS(uint32_t val) { m_numLongTermRefPicSPS = val; }
uint32_t getLtRefPicPocLsbSps(uint32_t index) const { CHECK( index >= MAX_NUM_LONG_TERM_REF_PICS, "Index exceeds boundary" ); return m_ltRefPicPocLsbSps[index]; }
void setLtRefPicPocLsbSps(uint32_t index, uint32_t val) { CHECK( index >= MAX_NUM_LONG_TERM_REF_PICS, "Index exceeds boundary" ); m_ltRefPicPocLsbSps[index] = val; }
bool getUsedByCurrPicLtSPSFlag(int i) const { CHECK( i >= MAX_NUM_LONG_TERM_REF_PICS, "Index exceeds boundary" ); return m_usedByCurrPicLtSPSFlag[i]; }
void setUsedByCurrPicLtSPSFlag(int i, bool x) { CHECK( i >= MAX_NUM_LONG_TERM_REF_PICS, "Index exceeds boundary" ); m_usedByCurrPicLtSPSFlag[i] = x; }
int getLog2MinCodingBlockSize() const { return m_log2MinCodingBlockSize; }
void setLog2MinCodingBlockSize(int val) { m_log2MinCodingBlockSize = val; }
int getLog2DiffMaxMinCodingBlockSize() const { return m_log2DiffMaxMinCodingBlockSize; }
void setLog2DiffMaxMinCodingBlockSize(int val) { m_log2DiffMaxMinCodingBlockSize = val; }
void setCTUSize(unsigned ctuSize) { m_CTUSize = ctuSize; }
unsigned getCTUSize() const { return m_CTUSize; }
void setSplitConsOverrideEnabledFlag(bool b) { m_partitionOverrideEnalbed = b; }
bool getSplitConsOverrideEnabledFlag() const { return m_partitionOverrideEnalbed; }
void setMinQTSizes(unsigned* minQT) { m_minQT[0] = minQT[0]; m_minQT[1] = minQT[1]; m_minQT[2] = minQT[2]; }
unsigned getMinQTSize(SliceType slicetype,
ChannelType chType = CHANNEL_TYPE_LUMA)
const { return slicetype == I_SLICE ? (chType == CHANNEL_TYPE_LUMA ? m_minQT[0] : m_minQT[2]) : m_minQT[1]; }
void setMaxBTDepth(unsigned maxBTDepth,
unsigned maxBTDepthI,
unsigned maxBTDepthIChroma)
{ m_maxBTDepth[1] = maxBTDepth; m_maxBTDepth[0] = maxBTDepthI; m_maxBTDepth[2] = maxBTDepthIChroma; }
unsigned getMaxBTDepth() const { return m_maxBTDepth[1]; }
unsigned getMaxBTDepthI() const { return m_maxBTDepth[0]; }
unsigned getMaxBTDepthIChroma() const { return m_maxBTDepth[2]; }
void setMaxBTSize(unsigned maxBTSize,
unsigned maxBTSizeI,
{ m_maxBTSize[1] = maxBTSize; m_maxBTSize[0] = maxBTSizeI; m_maxBTSize[2] = maxBTSizeC; }
unsigned getMaxBTSize() const { return m_maxBTSize[1]; }
unsigned getMaxBTSizeI() const { return m_maxBTSize[0]; }
unsigned getMaxBTSizeIChroma() const { return m_maxBTSize[2]; }
void setMaxTTSize(unsigned maxTTSize,
unsigned maxTTSizeI,
unsigned maxTTSizeC)
{ m_maxTTSize[1] = maxTTSize; m_maxTTSize[0] = maxTTSizeI; m_maxTTSize[2] = maxTTSizeC; }
unsigned getMaxTTSize() const { return m_maxTTSize[1]; }
unsigned getMaxTTSizeI() const { return m_maxTTSize[0]; }
unsigned getMaxTTSizeIChroma() const { return m_maxTTSize[2]; }
void setIDRRefParamListPresent(bool b) { m_idrRefParamList = b; }
bool getIDRRefParamListPresent() const { return m_idrRefParamList; }
void setUseDualITree(bool b) { m_dualITree = b; }
bool getUseDualITree() const { return m_dualITree; }

Karsten Suehring
committed
void setMaxCUWidth( uint32_t u ) { m_uiMaxCUWidth = u; }
uint32_t getMaxCUWidth() const { return m_uiMaxCUWidth; }
void setMaxCUHeight( uint32_t u ) { m_uiMaxCUHeight = u; }
uint32_t getMaxCUHeight() const { return m_uiMaxCUHeight; }
void setMaxCodingDepth( uint32_t u ) { m_uiMaxCodingDepth = u; }
uint32_t getMaxCodingDepth() const { return m_uiMaxCodingDepth; }
void setPCMEnabledFlag( bool b ) { m_pcmEnabledFlag = b; }
bool getPCMEnabledFlag() const { return m_pcmEnabledFlag; }

Karsten Suehring
committed
void setPCMLog2MaxSize( uint32_t u ) { m_pcmLog2MaxSize = u; }
uint32_t getPCMLog2MaxSize() const { return m_pcmLog2MaxSize; }
void setPCMLog2MinSize( uint32_t u ) { m_uiPCMLog2MinSize = u; }
uint32_t getPCMLog2MinSize() const { return m_uiPCMLog2MinSize; }
#if JVET_O1136_TS_BDPCM_SIGNALLING
bool getTransformSkipEnabledFlag() const { return m_transformSkipEnabledFlag; }
void setTransformSkipEnabledFlag( bool b ) { m_transformSkipEnabledFlag = b; }
bool getBDPCMEnabledFlag() const { return m_BDPCMEnabledFlag; }
void setBDPCMEnabledFlag( bool b ) { m_BDPCMEnabledFlag = b; }
#endif

Karsten Suehring
committed
void setBitsForPOC( uint32_t u ) { m_uiBitsForPOC = u; }
uint32_t getBitsForPOC() const { return m_uiBitsForPOC; }
void setNumReorderPics(int i, uint32_t tlayer) { m_numReorderPics[tlayer] = i; }
int getNumReorderPics(uint32_t tlayer) const { return m_numReorderPics[tlayer]; }
void createRPLList0(int numRPL);
void createRPLList1(int numRPL);
const RPLList* getRPLList0() const { return &m_RPLList0; }
RPLList* getRPLList0() { return &m_RPLList0; }
const RPLList* getRPLList1() const { return &m_RPLList1; }
RPLList* getRPLList1() { return &m_RPLList1; }
uint32_t getNumRPL0() const { return m_numRPL0; }
uint32_t getNumRPL1() const { return m_numRPL1; }
void setRPL1CopyFromRPL0Flag(bool isCopy) { m_rpl1CopyFromRpl0Flag = isCopy; }
bool getRPL1CopyFromRPL0Flag() const { return m_rpl1CopyFromRpl0Flag; }
bool getRPL1IdxPresentFlag() const { return m_rpl1IdxPresentFlag; }
void setAllActiveRplEntriesHasSameSignFlag(bool isAllSame) { m_allRplEntriesHasSameSignFlag = isAllSame; }
bool getAllActiveRplEntriesHasSameSignFlag() const { return m_allRplEntriesHasSameSignFlag; }

Karsten Suehring
committed
bool getLongTermRefsPresent() const { return m_bLongTermRefsPresent; }
void setLongTermRefsPresent(bool b) { m_bLongTermRefsPresent=b; }
bool getSPSTemporalMVPEnabledFlag() const { return m_SPSTemporalMVPEnabledFlag; }
void setSPSTemporalMVPEnabledFlag(bool b) { m_SPSTemporalMVPEnabledFlag=b; }
#if MAX_TB_SIZE_SIGNALLING
void setLog2MaxTbSize( uint32_t u ) { m_log2MaxTbSize = u; }
uint32_t getLog2MaxTbSize() const { return m_log2MaxTbSize; }
uint32_t getMaxTbSize() const { return 1 << m_log2MaxTbSize; }
#endif

Karsten Suehring
committed
// Bit-depth
int getBitDepth(ChannelType type) const { return m_bitDepths.recon[type]; }
void setBitDepth(ChannelType type, int u ) { m_bitDepths.recon[type] = u; }
const BitDepths& getBitDepths() const { return m_bitDepths; }
int getMaxLog2TrDynamicRange(ChannelType channelType) const { return getSpsRangeExtension().getExtendedPrecisionProcessingFlag() ? std::max<int>(15, int(m_bitDepths.recon[channelType] + 6)) : 15; }
int getDifferentialLumaChromaBitDepth() const { return int(m_bitDepths.recon[CHANNEL_TYPE_LUMA]) - int(m_bitDepths.recon[CHANNEL_TYPE_CHROMA]); }
int getQpBDOffset(ChannelType type) const { return m_qpBDOffset[type]; }
void setQpBDOffset(ChannelType type, int i) { m_qpBDOffset[type] = i; }
void setSAOEnabledFlag(bool bVal) { m_saoEnabledFlag = bVal; }
bool getSAOEnabledFlag() const { return m_saoEnabledFlag; }
bool getALFEnabledFlag() const { return m_alfEnabledFlag; }
void setALFEnabledFlag( bool b ) { m_alfEnabledFlag = b; }

Karsten Suehring
committed
bool getSBTMVPEnabledFlag() const { return m_sbtmvpEnabledFlag; }
void setSBTMVPEnabledFlag(bool b) { m_sbtmvpEnabledFlag = b; }
void setBDOFEnabledFlag(bool b) { m_bdofEnabledFlag = b; }
bool getBDOFEnabledFlag() const { return m_bdofEnabledFlag; }
bool getFpelMmvdEnabledFlag() const { return m_fpelMmvdEnabledFlag; }
void setFpelMmvdEnabledFlag( bool b ) { m_fpelMmvdEnabledFlag = b; }
bool getUseDMVR()const { return m_DMVR; }
void setUseDMVR(bool b) { m_DMVR = b; }
bool getUseMMVD()const { return m_MMVD; }
void setUseMMVD(bool b) { m_MMVD = b; }
#if JVET_O1140_SLICE_DISABLE_BDOF_DMVR_FLAG
bool getBdofDmvrSlicePresentFlag()const { return m_BdofDmvrSlicePresentFlag; }
void setBdofDmvrSlicePresentFlag(bool b) { m_BdofDmvrSlicePresentFlag = b; }
#endif
uint32_t getMaxTLayers() const { return m_uiMaxTLayers; }
void setMaxTLayers( uint32_t uiMaxTLayers ) { CHECK( uiMaxTLayers > MAX_TLAYER, "Invalid number T-layers" ); m_uiMaxTLayers = uiMaxTLayers; }

Karsten Suehring
committed
bool getTemporalIdNestingFlag() const { return m_bTemporalIdNestingFlag; }
void setTemporalIdNestingFlag( bool bValue ) { m_bTemporalIdNestingFlag = bValue; }
uint32_t getPCMBitDepth(ChannelType type) const { return m_pcmBitDepths[type]; }
void setPCMBitDepth(ChannelType type, uint32_t u) { m_pcmBitDepths[type] = u; }
void setPCMFilterDisableFlag( bool bValue ) { m_bPCMFilterDisableFlag = bValue; }
bool getPCMFilterDisableFlag() const { return m_bPCMFilterDisableFlag; }
bool getScalingListFlag() const { return m_scalingListEnabledFlag; }
void setScalingListFlag( bool b ) { m_scalingListEnabledFlag = b; }
bool getScalingListPresentFlag() const { return m_scalingListPresentFlag; }
void setScalingListPresentFlag( bool b ) { m_scalingListPresentFlag = b; }
ScalingList& getScalingList() { return m_scalingList; }
const ScalingList& getScalingList() const { return m_scalingList; }
uint32_t getMaxDecPicBuffering(uint32_t tlayer) const { return m_uiMaxDecPicBuffering[tlayer]; }
void setMaxDecPicBuffering( uint32_t ui, uint32_t tlayer ) { CHECK(tlayer >= MAX_TLAYER, "Invalid T-layer"); m_uiMaxDecPicBuffering[tlayer] = ui; }
uint32_t getMaxLatencyIncreasePlus1(uint32_t tlayer) const { return m_uiMaxLatencyIncreasePlus1[tlayer]; }
void setMaxLatencyIncreasePlus1( uint32_t ui , uint32_t tlayer) { m_uiMaxLatencyIncreasePlus1[tlayer] = ui; }
void setAffineAmvrEnabledFlag( bool val ) { m_affineAmvrEnabledFlag = val; }
bool getAffineAmvrEnabledFlag() const { return m_affineAmvrEnabledFlag; }
TimingInfo* getTimingInfo() { return &m_timingInfo; }
const TimingInfo* getTimingInfo() const { return &m_timingInfo; }
bool getHrdParametersPresentFlag() const { return m_hrdParametersPresentFlag; }
void setHrdParametersPresentFlag(bool b) { m_hrdParametersPresentFlag = b; }
HRDParameters* getHrdParameters() { return &m_hrdParameters; }
const HRDParameters* getHrdParameters() const { return &m_hrdParameters; }

Karsten Suehring
committed
bool getVuiParametersPresentFlag() const { return m_vuiParametersPresentFlag; }
void setVuiParametersPresentFlag(bool b) { m_vuiParametersPresentFlag = b; }
VUI* getVuiParameters() { return &m_vuiParameters; }
const VUI* getVuiParameters() const { return &m_vuiParameters; }
const ProfileTierLevel* getProfileTierLevel() const { return &m_profileTierLevel; }
ProfileTierLevel* getProfileTierLevel() { return &m_profileTierLevel; }

Karsten Suehring
committed
const SPSRExt& getSpsRangeExtension() const { return m_spsRangeExtension; }
SPSRExt& getSpsRangeExtension() { return m_spsRangeExtension; }
void setWrapAroundEnabledFlag(bool b) { m_wrapAroundEnabledFlag = b; }
bool getWrapAroundEnabledFlag() const { return m_wrapAroundEnabledFlag; }
void setWrapAroundOffset(unsigned offset) { m_wrapAroundOffset = offset; }
unsigned getWrapAroundOffset() const { return m_wrapAroundOffset; }
void setUseReshaper(bool b) { m_lumaReshapeEnable = b; }
bool getUseReshaper() const { return m_lumaReshapeEnable; }
void setIBCFlag(unsigned IBCFlag) { m_IBCFlag = IBCFlag; }
unsigned getIBCFlag() const { return m_IBCFlag; }
Yin Zhao
committed
void setUseSBT( bool b ) { m_SBT = b; }
bool getUseSBT() const { return m_SBT; }
void setUseISP( bool b ) { m_ISP = b; }
bool getUseISP() const { return m_ISP; }
Yin Zhao
committed
void setMaxSbtSize( uint8_t val ) { m_MaxSbtSize = val; }
uint8_t getMaxSbtSize() const { return m_MaxSbtSize; }