1 | /* The copyright in this software is being made available under the BSD |
---|
2 | * License, included below. This software may be subject to other third party |
---|
3 | * and contributor rights, including patent rights, and no such rights are |
---|
4 | * granted under this license. |
---|
5 | * |
---|
6 | * Copyright (c) 2010-2014, ITU/ISO/IEC |
---|
7 | * All rights reserved. |
---|
8 | * |
---|
9 | * Redistribution and use in source and binary forms, with or without |
---|
10 | * modification, are permitted provided that the following conditions are met: |
---|
11 | * |
---|
12 | * * Redistributions of source code must retain the above copyright notice, |
---|
13 | * this list of conditions and the following disclaimer. |
---|
14 | * * Redistributions in binary form must reproduce the above copyright notice, |
---|
15 | * this list of conditions and the following disclaimer in the documentation |
---|
16 | * and/or other materials provided with the distribution. |
---|
17 | * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may |
---|
18 | * be used to endorse or promote products derived from this software without |
---|
19 | * specific prior written permission. |
---|
20 | * |
---|
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
---|
22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS |
---|
25 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
---|
26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
---|
27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
---|
28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
---|
29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
---|
30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
---|
31 | * THE POSSIBILITY OF SUCH DAMAGE. |
---|
32 | */ |
---|
33 | |
---|
34 | /** \file TComSlice.h |
---|
35 | \brief slice header and SPS class (header) |
---|
36 | */ |
---|
37 | |
---|
38 | #ifndef __TCOMSLICE__ |
---|
39 | #define __TCOMSLICE__ |
---|
40 | |
---|
41 | #include <cstring> |
---|
42 | #include <map> |
---|
43 | #include <vector> |
---|
44 | #include "CommonDef.h" |
---|
45 | #include "TComRom.h" |
---|
46 | #include "TComList.h" |
---|
47 | #include "TComChromaFormat.h" |
---|
48 | |
---|
49 | //! \ingroup TLibCommon |
---|
50 | //! \{ |
---|
51 | |
---|
52 | class TComPic; |
---|
53 | class TComTrQuant; |
---|
54 | |
---|
55 | #if SVC_EXTENSION |
---|
56 | class TComPicYuv; |
---|
57 | #endif |
---|
58 | // ==================================================================================================================== |
---|
59 | // Constants |
---|
60 | // ==================================================================================================================== |
---|
61 | |
---|
62 | static const UInt REF_PIC_LIST_NUM_IDX=32; |
---|
63 | |
---|
64 | // ==================================================================================================================== |
---|
65 | // Class definition |
---|
66 | // ==================================================================================================================== |
---|
67 | |
---|
68 | /// Reference Picture Set class |
---|
69 | class TComReferencePictureSet |
---|
70 | { |
---|
71 | private: |
---|
72 | Int m_numberOfPictures; |
---|
73 | Int m_numberOfNegativePictures; |
---|
74 | Int m_numberOfPositivePictures; |
---|
75 | Int m_numberOfLongtermPictures; |
---|
76 | Int m_deltaPOC[MAX_NUM_REF_PICS]; |
---|
77 | Int m_POC[MAX_NUM_REF_PICS]; |
---|
78 | Bool m_used[MAX_NUM_REF_PICS]; |
---|
79 | Bool m_interRPSPrediction; |
---|
80 | Int m_deltaRIdxMinus1; |
---|
81 | Int m_deltaRPS; |
---|
82 | Int m_numRefIdc; |
---|
83 | Int m_refIdc[MAX_NUM_REF_PICS+1]; |
---|
84 | Bool m_bCheckLTMSB[MAX_NUM_REF_PICS]; |
---|
85 | Int m_pocLSBLT[MAX_NUM_REF_PICS]; |
---|
86 | Int m_deltaPOCMSBCycleLT[MAX_NUM_REF_PICS]; |
---|
87 | Bool m_deltaPocMSBPresentFlag[MAX_NUM_REF_PICS]; |
---|
88 | |
---|
89 | public: |
---|
90 | TComReferencePictureSet(); |
---|
91 | virtual ~TComReferencePictureSet(); |
---|
92 | Int getPocLSBLT(Int i) { return m_pocLSBLT[i]; } |
---|
93 | Void setPocLSBLT(Int i, Int x) { m_pocLSBLT[i] = x; } |
---|
94 | Int getDeltaPocMSBCycleLT(Int i) { return m_deltaPOCMSBCycleLT[i]; } |
---|
95 | Void setDeltaPocMSBCycleLT(Int i, Int x) { m_deltaPOCMSBCycleLT[i] = x; } |
---|
96 | Bool getDeltaPocMSBPresentFlag(Int i) { return m_deltaPocMSBPresentFlag[i]; } |
---|
97 | Void setDeltaPocMSBPresentFlag(Int i, Bool x) { m_deltaPocMSBPresentFlag[i] = x; } |
---|
98 | Void setUsed(Int bufferNum, Bool used); |
---|
99 | Void setDeltaPOC(Int bufferNum, Int deltaPOC); |
---|
100 | Void setPOC(Int bufferNum, Int deltaPOC); |
---|
101 | Void setNumberOfPictures(Int numberOfPictures); |
---|
102 | Void setCheckLTMSBPresent(Int bufferNum, Bool b ); |
---|
103 | Bool getCheckLTMSBPresent(Int bufferNum); |
---|
104 | |
---|
105 | Int getUsed(Int bufferNum); |
---|
106 | Int getDeltaPOC(Int bufferNum); |
---|
107 | Int getPOC(Int bufferNum); |
---|
108 | Int getNumberOfPictures(); |
---|
109 | |
---|
110 | Void setNumberOfNegativePictures(Int number) { m_numberOfNegativePictures = number; } |
---|
111 | Int getNumberOfNegativePictures() { return m_numberOfNegativePictures; } |
---|
112 | Void setNumberOfPositivePictures(Int number) { m_numberOfPositivePictures = number; } |
---|
113 | Int getNumberOfPositivePictures() { return m_numberOfPositivePictures; } |
---|
114 | Void setNumberOfLongtermPictures(Int number) { m_numberOfLongtermPictures = number; } |
---|
115 | Int getNumberOfLongtermPictures() { return m_numberOfLongtermPictures; } |
---|
116 | |
---|
117 | Void setInterRPSPrediction(Bool flag) { m_interRPSPrediction = flag; } |
---|
118 | Bool getInterRPSPrediction() { return m_interRPSPrediction; } |
---|
119 | Void setDeltaRIdxMinus1(Int x) { m_deltaRIdxMinus1 = x; } |
---|
120 | Int getDeltaRIdxMinus1() { return m_deltaRIdxMinus1; } |
---|
121 | Void setDeltaRPS(Int x) { m_deltaRPS = x; } |
---|
122 | Int getDeltaRPS() { return m_deltaRPS; } |
---|
123 | Void setNumRefIdc(Int x) { m_numRefIdc = x; } |
---|
124 | Int getNumRefIdc() { return m_numRefIdc; } |
---|
125 | |
---|
126 | Void setRefIdc(Int bufferNum, Int refIdc); |
---|
127 | Int getRefIdc(Int bufferNum); |
---|
128 | |
---|
129 | Void sortDeltaPOC(); |
---|
130 | Void printDeltaPOC(); |
---|
131 | }; |
---|
132 | |
---|
133 | /// Reference Picture Set set class |
---|
134 | class TComRPSList |
---|
135 | { |
---|
136 | private: |
---|
137 | Int m_numberOfReferencePictureSets; |
---|
138 | TComReferencePictureSet* m_referencePictureSets; |
---|
139 | |
---|
140 | public: |
---|
141 | TComRPSList(); |
---|
142 | virtual ~TComRPSList(); |
---|
143 | |
---|
144 | Void create (Int numberOfEntries); |
---|
145 | Void destroy (); |
---|
146 | |
---|
147 | |
---|
148 | TComReferencePictureSet* getReferencePictureSet(Int referencePictureSetNum); |
---|
149 | Int getNumberOfReferencePictureSets(); |
---|
150 | Void setNumberOfReferencePictureSets(Int numberOfReferencePictureSets); |
---|
151 | }; |
---|
152 | |
---|
153 | /// SCALING_LIST class |
---|
154 | class TComScalingList |
---|
155 | { |
---|
156 | public: |
---|
157 | TComScalingList(); |
---|
158 | virtual ~TComScalingList(); |
---|
159 | Void setScalingListPresentFlag (Bool b) { m_scalingListPresentFlag = b; } |
---|
160 | Bool getScalingListPresentFlag () { return m_scalingListPresentFlag; } |
---|
161 | Int* getScalingListAddress (UInt sizeId, UInt listId) { return m_scalingListCoef[sizeId][listId]; } //!< get matrix coefficient |
---|
162 | const Int* getScalingListAddress (UInt sizeId, UInt listId) const { return m_scalingListCoef[sizeId][listId]; } //!< get matrix coefficient |
---|
163 | Bool checkPredMode (UInt sizeId, UInt listId); |
---|
164 | Void setRefMatrixId (UInt sizeId, UInt listId, UInt u) { m_refMatrixId[sizeId][listId] = u; } //!< set reference matrix ID |
---|
165 | UInt getRefMatrixId (UInt sizeId, UInt listId) { return m_refMatrixId[sizeId][listId]; } //!< get reference matrix ID |
---|
166 | Int* getScalingListDefaultAddress (UInt sizeId, UInt listId); //!< get default matrix coefficient |
---|
167 | Void processDefaultMatrix (UInt sizeId, UInt listId); |
---|
168 | Void setScalingListDC (UInt sizeId, UInt listId, UInt u) { m_scalingListDC[sizeId][listId] = u; } //!< set DC value |
---|
169 | |
---|
170 | Int getScalingListDC (UInt sizeId, UInt listId) const { return m_scalingListDC[sizeId][listId]; } //!< get DC value |
---|
171 | Void checkDcOfMatrix (); |
---|
172 | Void processRefMatrix (UInt sizeId, UInt listId , UInt refListId ); |
---|
173 | Bool xParseScalingList (Char* pchFile); |
---|
174 | |
---|
175 | private: |
---|
176 | Void init (); |
---|
177 | Void destroy (); |
---|
178 | Void outputScalingLists(std::ostream &os) const; |
---|
179 | Int m_scalingListDC [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< the DC value of the matrix coefficient for 16x16 |
---|
180 | Bool m_useDefaultScalingMatrixFlag [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< UseDefaultScalingMatrixFlag |
---|
181 | UInt m_refMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< RefMatrixID |
---|
182 | Bool m_scalingListPresentFlag; //!< flag for using default matrix |
---|
183 | UInt m_predMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< reference list index |
---|
184 | Int *m_scalingListCoef [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< quantization matrix |
---|
185 | }; |
---|
186 | |
---|
187 | class ProfileTierLevel |
---|
188 | { |
---|
189 | Int m_profileSpace; |
---|
190 | Level::Tier m_tierFlag; |
---|
191 | Profile::Name m_profileIdc; |
---|
192 | Bool m_profileCompatibilityFlag[32]; |
---|
193 | Level::Name m_levelIdc; |
---|
194 | |
---|
195 | Bool m_progressiveSourceFlag; |
---|
196 | Bool m_interlacedSourceFlag; |
---|
197 | Bool m_nonPackedConstraintFlag; |
---|
198 | Bool m_frameOnlyConstraintFlag; |
---|
199 | UInt m_bitDepthConstraintValue; |
---|
200 | ChromaFormat m_chromaFormatConstraintValue; |
---|
201 | Bool m_intraConstraintFlag; |
---|
202 | Bool m_lowerBitRateConstraintFlag; |
---|
203 | |
---|
204 | public: |
---|
205 | ProfileTierLevel(); |
---|
206 | |
---|
207 | Int getProfileSpace() const { return m_profileSpace; } |
---|
208 | Void setProfileSpace(Int x) { m_profileSpace = x; } |
---|
209 | |
---|
210 | Level::Tier getTierFlag() const { return m_tierFlag; } |
---|
211 | Void setTierFlag(Level::Tier x) { m_tierFlag = x; } |
---|
212 | |
---|
213 | Profile::Name getProfileIdc() const { return m_profileIdc; } |
---|
214 | Void setProfileIdc(Profile::Name x) { m_profileIdc = x; } |
---|
215 | |
---|
216 | Bool getProfileCompatibilityFlag(Int i) const { return m_profileCompatibilityFlag[i]; } |
---|
217 | Void setProfileCompatibilityFlag(Int i, Bool x) { m_profileCompatibilityFlag[i] = x; } |
---|
218 | |
---|
219 | Level::Name getLevelIdc() const { return m_levelIdc; } |
---|
220 | Void setLevelIdc(Level::Name x) { m_levelIdc = x; } |
---|
221 | |
---|
222 | Bool getProgressiveSourceFlag() const { return m_progressiveSourceFlag; } |
---|
223 | Void setProgressiveSourceFlag(Bool b) { m_progressiveSourceFlag = b; } |
---|
224 | |
---|
225 | Bool getInterlacedSourceFlag() const { return m_interlacedSourceFlag; } |
---|
226 | Void setInterlacedSourceFlag(Bool b) { m_interlacedSourceFlag = b; } |
---|
227 | |
---|
228 | Bool getNonPackedConstraintFlag() const { return m_nonPackedConstraintFlag; } |
---|
229 | Void setNonPackedConstraintFlag(Bool b) { m_nonPackedConstraintFlag = b; } |
---|
230 | |
---|
231 | Bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; } |
---|
232 | Void setFrameOnlyConstraintFlag(Bool b) { m_frameOnlyConstraintFlag = b; } |
---|
233 | |
---|
234 | UInt getBitDepthConstraint() const { return m_bitDepthConstraintValue; } |
---|
235 | Void setBitDepthConstraint(UInt bitDepth) { m_bitDepthConstraintValue=bitDepth; } |
---|
236 | |
---|
237 | ChromaFormat getChromaFormatConstraint() const { return m_chromaFormatConstraintValue; } |
---|
238 | Void setChromaFormatConstraint(ChromaFormat fmt) { m_chromaFormatConstraintValue=fmt; } |
---|
239 | |
---|
240 | Bool getIntraConstraintFlag() const { return m_intraConstraintFlag; } |
---|
241 | Void setIntraConstraintFlag(Bool b) { m_intraConstraintFlag = b; } |
---|
242 | |
---|
243 | Bool getLowerBitRateConstraintFlag() const { return m_lowerBitRateConstraintFlag; } |
---|
244 | Void setLowerBitRateConstraintFlag(Bool b) { m_lowerBitRateConstraintFlag = b; } |
---|
245 | |
---|
246 | #if VPS_EXTN_PROFILE_INFO |
---|
247 | Void copyProfileInfo(ProfileTierLevel *ptl); |
---|
248 | #endif |
---|
249 | }; |
---|
250 | |
---|
251 | |
---|
252 | class TComPTL |
---|
253 | { |
---|
254 | ProfileTierLevel m_generalPTL; |
---|
255 | ProfileTierLevel m_subLayerPTL [MAX_TLAYER-1]; // max. value of max_sub_layers_minus1 is MAX_TLAYER-1 (= 6) |
---|
256 | Bool m_subLayerProfilePresentFlag [MAX_TLAYER-1]; |
---|
257 | Bool m_subLayerLevelPresentFlag [MAX_TLAYER-1]; |
---|
258 | |
---|
259 | public: |
---|
260 | TComPTL(); |
---|
261 | Bool getSubLayerProfilePresentFlag(Int i) const { return m_subLayerProfilePresentFlag[i]; } |
---|
262 | Void setSubLayerProfilePresentFlag(Int i, Bool x) { m_subLayerProfilePresentFlag[i] = x; } |
---|
263 | |
---|
264 | Bool getSubLayerLevelPresentFlag(Int i) const { return m_subLayerLevelPresentFlag[i]; } |
---|
265 | Void setSubLayerLevelPresentFlag(Int i, Bool x) { m_subLayerLevelPresentFlag[i] = x; } |
---|
266 | |
---|
267 | ProfileTierLevel* getGeneralPTL() { return &m_generalPTL; } |
---|
268 | ProfileTierLevel* getSubLayerPTL(Int i) { return &m_subLayerPTL[i]; } |
---|
269 | |
---|
270 | #if VPS_EXTN_PROFILE_INFO |
---|
271 | Void copyProfileInfo(TComPTL *ptl); |
---|
272 | #endif |
---|
273 | }; |
---|
274 | |
---|
275 | /// VPS class |
---|
276 | |
---|
277 | struct HrdSubLayerInfo |
---|
278 | { |
---|
279 | Bool fixedPicRateFlag; |
---|
280 | Bool fixedPicRateWithinCvsFlag; |
---|
281 | UInt picDurationInTcMinus1; |
---|
282 | Bool lowDelayHrdFlag; |
---|
283 | UInt cpbCntMinus1; |
---|
284 | UInt bitRateValueMinus1[MAX_CPB_CNT][2]; |
---|
285 | UInt cpbSizeValue [MAX_CPB_CNT][2]; |
---|
286 | UInt ducpbSizeValue [MAX_CPB_CNT][2]; |
---|
287 | UInt cbrFlag [MAX_CPB_CNT][2]; |
---|
288 | UInt duBitRateValue [MAX_CPB_CNT][2]; |
---|
289 | }; |
---|
290 | |
---|
291 | class TComHRD |
---|
292 | { |
---|
293 | private: |
---|
294 | Bool m_nalHrdParametersPresentFlag; |
---|
295 | Bool m_vclHrdParametersPresentFlag; |
---|
296 | Bool m_subPicCpbParamsPresentFlag; |
---|
297 | UInt m_tickDivisorMinus2; |
---|
298 | UInt m_duCpbRemovalDelayLengthMinus1; |
---|
299 | Bool m_subPicCpbParamsInPicTimingSEIFlag; |
---|
300 | UInt m_dpbOutputDelayDuLengthMinus1; |
---|
301 | UInt m_bitRateScale; |
---|
302 | UInt m_cpbSizeScale; |
---|
303 | UInt m_ducpbSizeScale; |
---|
304 | UInt m_initialCpbRemovalDelayLengthMinus1; |
---|
305 | UInt m_cpbRemovalDelayLengthMinus1; |
---|
306 | UInt m_dpbOutputDelayLengthMinus1; |
---|
307 | UInt m_numDU; |
---|
308 | HrdSubLayerInfo m_HRD[MAX_TLAYER]; |
---|
309 | |
---|
310 | public: |
---|
311 | TComHRD() |
---|
312 | :m_nalHrdParametersPresentFlag(0) |
---|
313 | ,m_vclHrdParametersPresentFlag(0) |
---|
314 | ,m_subPicCpbParamsPresentFlag(false) |
---|
315 | ,m_tickDivisorMinus2(0) |
---|
316 | ,m_duCpbRemovalDelayLengthMinus1(0) |
---|
317 | ,m_subPicCpbParamsInPicTimingSEIFlag(false) |
---|
318 | ,m_dpbOutputDelayDuLengthMinus1(0) |
---|
319 | ,m_bitRateScale(0) |
---|
320 | ,m_cpbSizeScale(0) |
---|
321 | ,m_initialCpbRemovalDelayLengthMinus1(23) |
---|
322 | ,m_cpbRemovalDelayLengthMinus1(23) |
---|
323 | ,m_dpbOutputDelayLengthMinus1(23) |
---|
324 | {} |
---|
325 | |
---|
326 | virtual ~TComHRD() {} |
---|
327 | |
---|
328 | Void setNalHrdParametersPresentFlag ( Bool flag ) { m_nalHrdParametersPresentFlag = flag; } |
---|
329 | Bool getNalHrdParametersPresentFlag ( ) { return m_nalHrdParametersPresentFlag; } |
---|
330 | |
---|
331 | Void setVclHrdParametersPresentFlag ( Bool flag ) { m_vclHrdParametersPresentFlag = flag; } |
---|
332 | Bool getVclHrdParametersPresentFlag ( ) { return m_vclHrdParametersPresentFlag; } |
---|
333 | |
---|
334 | Void setSubPicCpbParamsPresentFlag ( Bool flag ) { m_subPicCpbParamsPresentFlag = flag; } |
---|
335 | Bool getSubPicCpbParamsPresentFlag ( ) { return m_subPicCpbParamsPresentFlag; } |
---|
336 | |
---|
337 | Void setTickDivisorMinus2 ( UInt value ) { m_tickDivisorMinus2 = value; } |
---|
338 | UInt getTickDivisorMinus2 ( ) { return m_tickDivisorMinus2; } |
---|
339 | |
---|
340 | Void setDuCpbRemovalDelayLengthMinus1 ( UInt value ) { m_duCpbRemovalDelayLengthMinus1 = value; } |
---|
341 | UInt getDuCpbRemovalDelayLengthMinus1 ( ) { return m_duCpbRemovalDelayLengthMinus1; } |
---|
342 | |
---|
343 | Void setSubPicCpbParamsInPicTimingSEIFlag ( Bool flag) { m_subPicCpbParamsInPicTimingSEIFlag = flag; } |
---|
344 | Bool getSubPicCpbParamsInPicTimingSEIFlag () { return m_subPicCpbParamsInPicTimingSEIFlag; } |
---|
345 | |
---|
346 | Void setDpbOutputDelayDuLengthMinus1 (UInt value ) { m_dpbOutputDelayDuLengthMinus1 = value; } |
---|
347 | UInt getDpbOutputDelayDuLengthMinus1 () { return m_dpbOutputDelayDuLengthMinus1; } |
---|
348 | |
---|
349 | Void setBitRateScale ( UInt value ) { m_bitRateScale = value; } |
---|
350 | UInt getBitRateScale ( ) { return m_bitRateScale; } |
---|
351 | |
---|
352 | Void setCpbSizeScale ( UInt value ) { m_cpbSizeScale = value; } |
---|
353 | UInt getCpbSizeScale ( ) { return m_cpbSizeScale; } |
---|
354 | Void setDuCpbSizeScale ( UInt value ) { m_ducpbSizeScale = value; } |
---|
355 | UInt getDuCpbSizeScale ( ) { return m_ducpbSizeScale; } |
---|
356 | |
---|
357 | Void setInitialCpbRemovalDelayLengthMinus1( UInt value ) { m_initialCpbRemovalDelayLengthMinus1 = value; } |
---|
358 | UInt getInitialCpbRemovalDelayLengthMinus1( ) { return m_initialCpbRemovalDelayLengthMinus1; } |
---|
359 | |
---|
360 | Void setCpbRemovalDelayLengthMinus1 ( UInt value ) { m_cpbRemovalDelayLengthMinus1 = value; } |
---|
361 | UInt getCpbRemovalDelayLengthMinus1 ( ) { return m_cpbRemovalDelayLengthMinus1; } |
---|
362 | |
---|
363 | Void setDpbOutputDelayLengthMinus1 ( UInt value ) { m_dpbOutputDelayLengthMinus1 = value; } |
---|
364 | UInt getDpbOutputDelayLengthMinus1 ( ) { return m_dpbOutputDelayLengthMinus1; } |
---|
365 | |
---|
366 | Void setFixedPicRateFlag ( Int layer, Bool flag ) { m_HRD[layer].fixedPicRateFlag = flag; } |
---|
367 | Bool getFixedPicRateFlag ( Int layer ) { return m_HRD[layer].fixedPicRateFlag; } |
---|
368 | |
---|
369 | Void setFixedPicRateWithinCvsFlag ( Int layer, Bool flag ) { m_HRD[layer].fixedPicRateWithinCvsFlag = flag; } |
---|
370 | Bool getFixedPicRateWithinCvsFlag ( Int layer ) { return m_HRD[layer].fixedPicRateWithinCvsFlag; } |
---|
371 | |
---|
372 | Void setPicDurationInTcMinus1 ( Int layer, UInt value ) { m_HRD[layer].picDurationInTcMinus1 = value; } |
---|
373 | UInt getPicDurationInTcMinus1 ( Int layer ) { return m_HRD[layer].picDurationInTcMinus1; } |
---|
374 | |
---|
375 | Void setLowDelayHrdFlag ( Int layer, Bool flag ) { m_HRD[layer].lowDelayHrdFlag = flag; } |
---|
376 | Bool getLowDelayHrdFlag ( Int layer ) { return m_HRD[layer].lowDelayHrdFlag; } |
---|
377 | |
---|
378 | Void setCpbCntMinus1 ( Int layer, UInt value ) { m_HRD[layer].cpbCntMinus1 = value; } |
---|
379 | UInt getCpbCntMinus1 ( Int layer ) { return m_HRD[layer].cpbCntMinus1; } |
---|
380 | |
---|
381 | Void setBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].bitRateValueMinus1[cpbcnt][nalOrVcl] = value; } |
---|
382 | UInt getBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].bitRateValueMinus1[cpbcnt][nalOrVcl]; } |
---|
383 | |
---|
384 | Void setCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].cpbSizeValue[cpbcnt][nalOrVcl] = value; } |
---|
385 | UInt getCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].cpbSizeValue[cpbcnt][nalOrVcl]; } |
---|
386 | Void setDuCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].ducpbSizeValue[cpbcnt][nalOrVcl] = value; } |
---|
387 | UInt getDuCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].ducpbSizeValue[cpbcnt][nalOrVcl]; } |
---|
388 | Void setDuBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].duBitRateValue[cpbcnt][nalOrVcl] = value; } |
---|
389 | UInt getDuBitRateValueMinus1 (Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].duBitRateValue[cpbcnt][nalOrVcl]; } |
---|
390 | Void setCbrFlag ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].cbrFlag[cpbcnt][nalOrVcl] = value; } |
---|
391 | Bool getCbrFlag ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].cbrFlag[cpbcnt][nalOrVcl]; } |
---|
392 | |
---|
393 | Void setNumDU ( UInt value ) { m_numDU = value; } |
---|
394 | UInt getNumDU ( ) { return m_numDU; } |
---|
395 | Bool getCpbDpbDelaysPresentFlag() { return getNalHrdParametersPresentFlag() || getVclHrdParametersPresentFlag(); } |
---|
396 | |
---|
397 | #if VPS_VUI_BSP_HRD_PARAMS |
---|
398 | Void copyCommonInformation( TComHRD *refHrd ) |
---|
399 | { |
---|
400 | m_nalHrdParametersPresentFlag = refHrd->getNalHrdParametersPresentFlag(); |
---|
401 | m_vclHrdParametersPresentFlag = refHrd->getVclHrdParametersPresentFlag(); |
---|
402 | m_subPicCpbParamsPresentFlag = refHrd->getSubPicCpbParamsPresentFlag(); |
---|
403 | m_tickDivisorMinus2 = refHrd->getTickDivisorMinus2(); |
---|
404 | m_duCpbRemovalDelayLengthMinus1 = refHrd->getDuCpbRemovalDelayLengthMinus1(); |
---|
405 | m_subPicCpbParamsInPicTimingSEIFlag = refHrd->getSubPicCpbParamsInPicTimingSEIFlag(); |
---|
406 | m_dpbOutputDelayDuLengthMinus1 = refHrd->getDpbOutputDelayDuLengthMinus1(); |
---|
407 | m_bitRateScale = refHrd->getBitRateScale(); |
---|
408 | m_cpbSizeScale = refHrd->getCpbSizeScale(); |
---|
409 | m_ducpbSizeScale = refHrd->getDuCpbSizeScale(); |
---|
410 | m_initialCpbRemovalDelayLengthMinus1 = refHrd->getInitialCpbRemovalDelayLengthMinus1(); |
---|
411 | m_cpbRemovalDelayLengthMinus1 = refHrd->getCpbRemovalDelayLengthMinus1(); |
---|
412 | m_dpbOutputDelayLengthMinus1 = refHrd->getDpbOutputDelayLengthMinus1(); |
---|
413 | } |
---|
414 | #endif |
---|
415 | }; |
---|
416 | |
---|
417 | class TimingInfo |
---|
418 | { |
---|
419 | Bool m_timingInfoPresentFlag; |
---|
420 | UInt m_numUnitsInTick; |
---|
421 | UInt m_timeScale; |
---|
422 | Bool m_pocProportionalToTimingFlag; |
---|
423 | Int m_numTicksPocDiffOneMinus1; |
---|
424 | public: |
---|
425 | TimingInfo() |
---|
426 | : m_timingInfoPresentFlag(false) |
---|
427 | , m_numUnitsInTick(1001) |
---|
428 | , m_timeScale(60000) |
---|
429 | , m_pocProportionalToTimingFlag(false) |
---|
430 | , m_numTicksPocDiffOneMinus1(0) {} |
---|
431 | |
---|
432 | Void setTimingInfoPresentFlag ( Bool flag ) { m_timingInfoPresentFlag = flag; } |
---|
433 | Bool getTimingInfoPresentFlag ( ) { return m_timingInfoPresentFlag; } |
---|
434 | |
---|
435 | Void setNumUnitsInTick ( UInt value ) { m_numUnitsInTick = value; } |
---|
436 | UInt getNumUnitsInTick ( ) { return m_numUnitsInTick; } |
---|
437 | |
---|
438 | Void setTimeScale ( UInt value ) { m_timeScale = value; } |
---|
439 | UInt getTimeScale ( ) { return m_timeScale; } |
---|
440 | |
---|
441 | Bool getPocProportionalToTimingFlag ( ) { return m_pocProportionalToTimingFlag; } |
---|
442 | Void setPocProportionalToTimingFlag (Bool x ) { m_pocProportionalToTimingFlag = x; } |
---|
443 | |
---|
444 | Int getNumTicksPocDiffOneMinus1 ( ) { return m_numTicksPocDiffOneMinus1; } |
---|
445 | Void setNumTicksPocDiffOneMinus1 (Int x ) { m_numTicksPocDiffOneMinus1 = x; } |
---|
446 | }; |
---|
447 | |
---|
448 | struct ChromaQpAdj |
---|
449 | { |
---|
450 | union |
---|
451 | { |
---|
452 | struct { |
---|
453 | Int CbOffset; |
---|
454 | Int CrOffset; |
---|
455 | } comp; |
---|
456 | Int offset[2]; /* two chroma components */ |
---|
457 | } u; |
---|
458 | }; |
---|
459 | |
---|
460 | |
---|
461 | class Window |
---|
462 | { |
---|
463 | private: |
---|
464 | Bool m_enabledFlag; |
---|
465 | Int m_winLeftOffset; |
---|
466 | Int m_winRightOffset; |
---|
467 | Int m_winTopOffset; |
---|
468 | Int m_winBottomOffset; |
---|
469 | #if P0312_VERT_PHASE_ADJ |
---|
470 | Bool m_vertPhasePositionEnableFlag; |
---|
471 | #endif |
---|
472 | public: |
---|
473 | Window() |
---|
474 | : m_enabledFlag (false) |
---|
475 | , m_winLeftOffset (0) |
---|
476 | , m_winRightOffset (0) |
---|
477 | , m_winTopOffset (0) |
---|
478 | , m_winBottomOffset (0) |
---|
479 | #if P0312_VERT_PHASE_ADJ |
---|
480 | , m_vertPhasePositionEnableFlag(false) |
---|
481 | #endif |
---|
482 | { } |
---|
483 | |
---|
484 | Bool getWindowEnabledFlag() const { return m_enabledFlag; } |
---|
485 | #if P0312_VERT_PHASE_ADJ |
---|
486 | Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0; m_vertPhasePositionEnableFlag = false; } |
---|
487 | #else |
---|
488 | Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0; } |
---|
489 | #endif |
---|
490 | Int getWindowLeftOffset() const { return m_enabledFlag ? m_winLeftOffset : 0; } |
---|
491 | Void setWindowLeftOffset(Int val) { m_winLeftOffset = val; m_enabledFlag = true; } |
---|
492 | Int getWindowRightOffset() const { return m_enabledFlag ? m_winRightOffset : 0; } |
---|
493 | Void setWindowRightOffset(Int val) { m_winRightOffset = val; m_enabledFlag = true; } |
---|
494 | Int getWindowTopOffset() const { return m_enabledFlag ? m_winTopOffset : 0; } |
---|
495 | Void setWindowTopOffset(Int val) { m_winTopOffset = val; m_enabledFlag = true; } |
---|
496 | Int getWindowBottomOffset() const { return m_enabledFlag ? m_winBottomOffset: 0; } |
---|
497 | Void setWindowBottomOffset(Int val) { m_winBottomOffset = val; m_enabledFlag = true; } |
---|
498 | |
---|
499 | #if P0312_VERT_PHASE_ADJ |
---|
500 | Bool getVertPhasePositionEnableFlag() const { return m_vertPhasePositionEnableFlag; } |
---|
501 | Void setVertPhasePositionEnableFlag(Bool val) { m_vertPhasePositionEnableFlag = val; } |
---|
502 | #endif |
---|
503 | #if REF_REGION_OFFSET && RESAMPLING_FIX |
---|
504 | Bool hasEqualOffset(const Window& ref) const |
---|
505 | { |
---|
506 | return ( this->getWindowLeftOffset() == ref.getWindowLeftOffset() |
---|
507 | && this->getWindowTopOffset() == ref.getWindowTopOffset() |
---|
508 | && this->getWindowRightOffset() == ref.getWindowRightOffset() |
---|
509 | && this->getWindowBottomOffset() == ref.getWindowBottomOffset() ); |
---|
510 | } |
---|
511 | #endif |
---|
512 | |
---|
513 | #if P0312_VERT_PHASE_ADJ |
---|
514 | Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom, Bool vertPhasePositionEnableFlag = 0) |
---|
515 | #else |
---|
516 | Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom) |
---|
517 | #endif |
---|
518 | { |
---|
519 | m_enabledFlag = true; |
---|
520 | m_winLeftOffset = offsetLeft; |
---|
521 | m_winRightOffset = offsetLRight; |
---|
522 | m_winTopOffset = offsetLTop; |
---|
523 | m_winBottomOffset = offsetLBottom; |
---|
524 | |
---|
525 | #if P0312_VERT_PHASE_ADJ |
---|
526 | m_vertPhasePositionEnableFlag = vertPhasePositionEnableFlag; |
---|
527 | #endif |
---|
528 | } |
---|
529 | }; |
---|
530 | |
---|
531 | #if REPN_FORMAT_IN_VPS |
---|
532 | class RepFormat |
---|
533 | { |
---|
534 | #if REPN_FORMAT_CONTROL_FLAG |
---|
535 | Bool m_chromaAndBitDepthVpsPresentFlag; |
---|
536 | #endif |
---|
537 | #if AUXILIARY_PICTURES |
---|
538 | ChromaFormat m_chromaFormatVpsIdc; |
---|
539 | #else |
---|
540 | Int m_chromaFormatVpsIdc; |
---|
541 | #endif |
---|
542 | Bool m_separateColourPlaneVpsFlag; |
---|
543 | Int m_picWidthVpsInLumaSamples; |
---|
544 | Int m_picHeightVpsInLumaSamples; |
---|
545 | Int m_bitDepthVpsLuma; // coded as minus8 |
---|
546 | Int m_bitDepthVpsChroma; // coded as minus8 |
---|
547 | |
---|
548 | #if R0156_CONF_WINDOW_IN_REP_FORMAT |
---|
549 | Window m_conformanceWindowVps; |
---|
550 | #endif |
---|
551 | |
---|
552 | public: |
---|
553 | RepFormat(); |
---|
554 | #if RESOLUTION_BASED_DPB |
---|
555 | Void init(); |
---|
556 | RepFormat& operator= (const RepFormat &); |
---|
557 | static Bool checkSameSubDpb(const RepFormat &x, const RepFormat &y); |
---|
558 | #endif |
---|
559 | #if REPN_FORMAT_CONTROL_FLAG |
---|
560 | Bool getChromaAndBitDepthVpsPresentFlag() { return m_chromaAndBitDepthVpsPresentFlag; } |
---|
561 | void setChromaAndBitDepthVpsPresentFlag(Bool x) { m_chromaAndBitDepthVpsPresentFlag = x; } |
---|
562 | #endif |
---|
563 | |
---|
564 | #if AUXILIARY_PICTURES |
---|
565 | ChromaFormat getChromaFormatVpsIdc() { return m_chromaFormatVpsIdc; } |
---|
566 | Void setChromaFormatVpsIdc(ChromaFormat x) { m_chromaFormatVpsIdc = x; } |
---|
567 | #else |
---|
568 | Int getChromaFormatVpsIdc() { return m_chromaFormatVpsIdc; } |
---|
569 | Void setChromaFormatVpsIdc(Int x) { m_chromaFormatVpsIdc = x; } |
---|
570 | #endif |
---|
571 | |
---|
572 | Bool getSeparateColourPlaneVpsFlag() { return m_separateColourPlaneVpsFlag; } |
---|
573 | Void setSeparateColourPlaneVpsFlag(Bool x) { m_separateColourPlaneVpsFlag = x; } |
---|
574 | |
---|
575 | Int getPicWidthVpsInLumaSamples() { return m_picWidthVpsInLumaSamples; } |
---|
576 | Void setPicWidthVpsInLumaSamples(Int x) { m_picWidthVpsInLumaSamples = x; } |
---|
577 | |
---|
578 | Int getPicHeightVpsInLumaSamples() { return m_picHeightVpsInLumaSamples; } |
---|
579 | Void setPicHeightVpsInLumaSamples(Int x) { m_picHeightVpsInLumaSamples = x; } |
---|
580 | |
---|
581 | Int getBitDepthVpsLuma() { return m_bitDepthVpsLuma; } |
---|
582 | Void setBitDepthVpsLuma(Int x) { m_bitDepthVpsLuma = x; } |
---|
583 | |
---|
584 | Int getBitDepthVpsChroma() { return m_bitDepthVpsChroma; } |
---|
585 | Void setBitDepthVpsChroma(Int x) { m_bitDepthVpsChroma = x; } |
---|
586 | |
---|
587 | Int getBitDepthVps(ChannelType type) { return isLuma(type) ? m_bitDepthVpsLuma : m_bitDepthVpsChroma; } |
---|
588 | |
---|
589 | #if R0156_CONF_WINDOW_IN_REP_FORMAT |
---|
590 | Window& getConformanceWindowVps() { return m_conformanceWindowVps; } |
---|
591 | Void setConformanceWindowVps(Window& conformanceWindow ) { m_conformanceWindowVps = conformanceWindow; } |
---|
592 | #endif |
---|
593 | }; |
---|
594 | #endif |
---|
595 | |
---|
596 | class TComVPS |
---|
597 | { |
---|
598 | private: |
---|
599 | Int m_VPSId; |
---|
600 | #if VPS_RESERVED_FLAGS |
---|
601 | Bool m_baseLayerInternalFlag; |
---|
602 | Bool m_baseLayerAvailableFlag; |
---|
603 | #endif |
---|
604 | UInt m_uiMaxTLayers; |
---|
605 | UInt m_uiMaxLayers; |
---|
606 | Bool m_bTemporalIdNestingFlag; |
---|
607 | |
---|
608 | UInt m_numReorderPics[MAX_TLAYER]; |
---|
609 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
610 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) |
---|
611 | |
---|
612 | UInt m_numHrdParameters; |
---|
613 | #if !SVC_EXTENSION |
---|
614 | UInt m_maxNuhReservedZeroLayerId; |
---|
615 | #endif |
---|
616 | TComHRD* m_hrdParameters; |
---|
617 | UInt* m_hrdOpSetIdx; |
---|
618 | Bool* m_cprmsPresentFlag; |
---|
619 | #if !SVC_EXTENSION |
---|
620 | UInt m_numOpSets; |
---|
621 | Bool m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1]; |
---|
622 | #endif |
---|
623 | #if !MULTIPLE_PTL_SUPPORT |
---|
624 | TComPTL m_pcPTL; |
---|
625 | #endif |
---|
626 | TimingInfo m_timingInfo; |
---|
627 | |
---|
628 | #if SVC_EXTENSION |
---|
629 | #if MULTIPLE_PTL_SUPPORT |
---|
630 | TComPTL m_pcPTLList[MAX_NUM_LAYER_IDS + 1]; |
---|
631 | #endif |
---|
632 | #if DERIVE_LAYER_ID_LIST_VARIABLES |
---|
633 | #if Q0078_ADD_LAYER_SETS |
---|
634 | #if NECESSARY_LAYER_FLAG |
---|
635 | std::vector< std::vector<Int> > m_layerSetLayerIdList; |
---|
636 | std::vector<Int> m_numLayerInIdList; |
---|
637 | #else |
---|
638 | Int m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS][MAX_VPS_LAYER_IDX_PLUS1]; |
---|
639 | Int m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS]; |
---|
640 | #endif |
---|
641 | #else |
---|
642 | Int m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_IDX_PLUS1]; |
---|
643 | Int m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
644 | #endif |
---|
645 | #endif |
---|
646 | #if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED |
---|
647 | #if VPS_EXTN_OFFSET |
---|
648 | UInt m_extensionOffset; |
---|
649 | #endif |
---|
650 | #endif |
---|
651 | UInt m_maxLayerId; |
---|
652 | UInt m_numLayerSets; |
---|
653 | #if Q0078_ADD_LAYER_SETS |
---|
654 | UInt m_vpsNumLayerSetsMinus1; |
---|
655 | Bool m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS][MAX_NUM_LAYER_IDS]; |
---|
656 | #else |
---|
657 | Bool m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_IDX_PLUS1]; |
---|
658 | #endif |
---|
659 | |
---|
660 | // ------------------------------------------ |
---|
661 | // Variables related to VPS extensions |
---|
662 | // ------------------------------------------ |
---|
663 | #if VPS_EXTN_MASK_AND_DIM_INFO |
---|
664 | #if VPS_AVC_BL_FLAG_REMOVAL |
---|
665 | Bool m_nonHEVCBaseLayerFlag; |
---|
666 | #else |
---|
667 | Bool m_avcBaseLayerFlag; // For now, always set to true. |
---|
668 | #endif |
---|
669 | Bool m_splittingFlag; |
---|
670 | Bool m_scalabilityMask[MAX_VPS_NUM_SCALABILITY_TYPES]; |
---|
671 | UInt m_dimensionIdLen[MAX_VPS_NUM_SCALABILITY_TYPES]; |
---|
672 | Bool m_nuhLayerIdPresentFlag; |
---|
673 | UInt m_layerIdInNuh[MAX_VPS_LAYER_IDX_PLUS1]; // Maps layer ID in the VPS with layer_id_in_nuh |
---|
674 | UInt m_dimensionId[MAX_VPS_LAYER_IDX_PLUS1][MAX_VPS_NUM_SCALABILITY_TYPES]; |
---|
675 | |
---|
676 | // Below are derived variables |
---|
677 | UInt m_numScalabilityTypes; |
---|
678 | UInt m_layerIdxInVps[MAX_NUM_LAYER_IDS]; // Maps layer_id_in_nuh with the layer ID in the VPS |
---|
679 | #endif |
---|
680 | #if BITRATE_PICRATE_SIGNALLING |
---|
681 | #if Q0078_ADD_LAYER_SETS |
---|
682 | UInt m_maxSLInLayerSetMinus1[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS]; |
---|
683 | #else |
---|
684 | UInt m_maxSLInLayerSetMinus1[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
685 | #endif |
---|
686 | #endif |
---|
687 | |
---|
688 | Bool m_ilpSshSignalingEnabledFlag; |
---|
689 | #if VPS_EXTN_PROFILE_INFO |
---|
690 | // Profile-tier-level signalling related |
---|
691 | Bool m_profilePresentFlag[MAX_VPS_LAYER_SETS_PLUS1]; // The value with index 0 will not be used. |
---|
692 | #if !P0048_REMOVE_PROFILE_REF |
---|
693 | UInt m_profileLayerSetRef[MAX_VPS_LAYER_SETS_PLUS1]; // The value with index 0 will not be used. |
---|
694 | #endif |
---|
695 | #if !MULTIPLE_PTL_SUPPORT |
---|
696 | std::vector<TComPTL> m_pcPTLForExtn; |
---|
697 | #endif |
---|
698 | #endif |
---|
699 | #if VPS_EXTN_OP_LAYER_SETS |
---|
700 | // .. More declarations here |
---|
701 | // Target output layer signalling related |
---|
702 | UInt m_numOutputLayerSets; |
---|
703 | #if Q0078_ADD_LAYER_SETS |
---|
704 | UInt m_outputLayerSetIdx[MAX_VPS_LAYER_SETS_PLUS1 + 2*MAX_NUM_ADD_LAYER_SETS]; |
---|
705 | Bool m_outputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1 + 2*MAX_NUM_ADD_LAYER_SETS][MAX_VPS_LAYER_IDX_PLUS1]; |
---|
706 | #else |
---|
707 | UInt m_outputLayerSetIdx[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
708 | Bool m_outputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_IDX_PLUS1]; |
---|
709 | #endif |
---|
710 | #endif |
---|
711 | #if VPS_EXTN_DIRECT_REF_LAYERS |
---|
712 | Bool m_directDependencyFlag[MAX_VPS_LAYER_IDX_PLUS1][MAX_VPS_LAYER_IDX_PLUS1]; |
---|
713 | UInt m_numDirectRefLayers[MAX_VPS_LAYER_IDX_PLUS1]; |
---|
714 | UInt m_refLayerId[MAX_VPS_LAYER_IDX_PLUS1][MAX_VPS_LAYER_IDX_PLUS1]; |
---|
715 | UInt m_directDepTypeLen; |
---|
716 | #if O0096_DEFAULT_DEPENDENCY_TYPE |
---|
717 | Bool m_defaultDirectDependencyTypeFlag; |
---|
718 | UInt m_defaultDirectDependencyType; |
---|
719 | #endif |
---|
720 | UInt m_directDependencyType[MAX_VPS_LAYER_IDX_PLUS1][MAX_VPS_LAYER_IDX_PLUS1]; |
---|
721 | #endif |
---|
722 | UInt m_numProfileTierLevel; |
---|
723 | #if !VPS_EXTN_UEV_CODING |
---|
724 | Bool m_moreOutputLayerSetsThanDefaultFlag; |
---|
725 | #endif |
---|
726 | Int m_numAddOutputLayerSets; |
---|
727 | #if P0295_DEFAULT_OUT_LAYER_IDC |
---|
728 | UInt m_defaultTargetOutputLayerIdc; |
---|
729 | #else |
---|
730 | #if O0109_DEFAULT_ONE_OUT_LAYER_IDC |
---|
731 | UInt m_defaultOneTargetOutputLayerIdc; |
---|
732 | #else |
---|
733 | Bool m_defaultOneTargetOutputLayerFlag; |
---|
734 | #endif |
---|
735 | #endif |
---|
736 | #if PER_LAYER_PTL |
---|
737 | std::vector< std::vector<Int> > m_profileLevelTierIdx; |
---|
738 | #else |
---|
739 | Int m_profileLevelTierIdx[64]; |
---|
740 | #endif |
---|
741 | Bool m_maxOneActiveRefLayerFlag; |
---|
742 | #if O0062_POC_LSB_NOT_PRESENT_FLAG |
---|
743 | Bool m_pocLsbNotPresentFlag[MAX_VPS_LAYER_IDX_PLUS1]; |
---|
744 | #endif |
---|
745 | #if O0223_PICTURE_TYPES_ALIGN_FLAG |
---|
746 | Bool m_crossLayerPictureTypeAlignFlag; |
---|
747 | #endif |
---|
748 | Bool m_crossLayerIrapAlignFlag; |
---|
749 | #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG |
---|
750 | Bool m_crossLayerAlignedIdrOnlyFlag; |
---|
751 | #endif |
---|
752 | #if O0225_MAX_TID_FOR_REF_LAYERS |
---|
753 | UInt m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_IDX_PLUS1 - 1][MAX_VPS_LAYER_IDX_PLUS1]; |
---|
754 | #else |
---|
755 | UInt m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_IDX_PLUS1 - 1]; |
---|
756 | #endif |
---|
757 | Bool m_maxTidRefPresentFlag; |
---|
758 | #if VPS_TSLAYERS |
---|
759 | Bool m_maxTSLayersPresentFlag; |
---|
760 | UInt m_maxTSLayerMinus1[MAX_LAYERS]; |
---|
761 | #endif |
---|
762 | #if M0040_ADAPTIVE_RESOLUTION_CHANGE |
---|
763 | Bool m_singleLayerForNonIrapFlag; |
---|
764 | #endif |
---|
765 | #if HIGHER_LAYER_IRAP_SKIP_FLAG |
---|
766 | Bool m_higherLayerIrapSkipFlag; |
---|
767 | #endif |
---|
768 | #if VPS_VUI_TILES_NOT_IN_USE__FLAG |
---|
769 | Bool m_tilesNotInUseFlag; |
---|
770 | Bool m_tilesInUseFlag[MAX_VPS_LAYER_IDX_PLUS1]; |
---|
771 | Bool m_loopFilterNotAcrossTilesFlag[MAX_VPS_LAYER_IDX_PLUS1]; |
---|
772 | #endif |
---|
773 | Bool m_tileBoundariesAlignedFlag[MAX_VPS_LAYER_IDX_PLUS1][MAX_VPS_LAYER_IDX_PLUS1]; |
---|
774 | #if VPS_VUI_WPP_NOT_IN_USE__FLAG |
---|
775 | Bool m_wppNotInUseFlag; |
---|
776 | Bool m_wppInUseFlag[MAX_VPS_LAYER_IDX_PLUS1]; |
---|
777 | #endif |
---|
778 | #if N0160_VUI_EXT_ILP_REF |
---|
779 | Bool m_ilpRestrictedRefLayersFlag; |
---|
780 | Int m_minSpatialSegmentOffsetPlus1[MAX_VPS_LAYER_IDX_PLUS1][MAX_VPS_LAYER_IDX_PLUS1]; |
---|
781 | Bool m_ctuBasedOffsetEnabledFlag [MAX_VPS_LAYER_IDX_PLUS1][MAX_VPS_LAYER_IDX_PLUS1]; |
---|
782 | Int m_minHorizontalCtuOffsetPlus1 [MAX_VPS_LAYER_IDX_PLUS1][MAX_VPS_LAYER_IDX_PLUS1]; |
---|
783 | #endif |
---|
784 | #if VPS_VUI_VIDEO_SIGNAL |
---|
785 | Bool m_vidSigPresentVpsFlag; |
---|
786 | Int m_vpsVidSigInfo; |
---|
787 | Int m_vpsVidSigIdx[MAX_VPS_LAYER_IDX_PLUS1]; |
---|
788 | Int m_vpsVidFormat[16]; |
---|
789 | Bool m_vpsFullRangeFlag[16]; |
---|
790 | Int m_vpsColorPrimaries[16]; |
---|
791 | Int m_vpsTransChar[16]; |
---|
792 | Int m_vpsMatCoeff[16]; |
---|
793 | #endif |
---|
794 | |
---|
795 | Bool m_bitRatePresentVpsFlag; |
---|
796 | Bool m_picRatePresentVpsFlag; |
---|
797 | Bool m_bitRatePresentFlag [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
798 | Bool m_picRatePresentFlag [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
799 | Int m_avgBitRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
800 | Int m_maxBitRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
801 | Int m_constPicRateIdc [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
802 | Int m_avgPicRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
803 | |
---|
804 | #if P0312_VERT_PHASE_ADJ |
---|
805 | Bool m_vpsVuiVertPhaseInUseFlag; |
---|
806 | #endif |
---|
807 | |
---|
808 | #if P0300_ALT_OUTPUT_LAYER_FLAG |
---|
809 | #if Q0078_ADD_LAYER_SETS |
---|
810 | Bool m_altOutputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1 + 2*MAX_NUM_ADD_LAYER_SETS]; |
---|
811 | #else |
---|
812 | Bool m_altOutputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
813 | #endif |
---|
814 | #else |
---|
815 | #if O0153_ALT_OUTPUT_LAYER_FLAG |
---|
816 | Bool m_altOutputLayerFlag; |
---|
817 | #endif |
---|
818 | #endif |
---|
819 | #if REPN_FORMAT_IN_VPS |
---|
820 | Bool m_repFormatIdxPresentFlag; |
---|
821 | Int m_vpsNumRepFormats; // coded as minus1 |
---|
822 | RepFormat m_vpsRepFormat[16]; |
---|
823 | Int m_vpsRepFormatIdx[16]; |
---|
824 | #endif |
---|
825 | #if VIEW_ID_RELATED_SIGNALING |
---|
826 | #if O0109_VIEW_ID_LEN |
---|
827 | Int m_viewIdLen; |
---|
828 | #else |
---|
829 | Int m_viewIdLenMinus1; |
---|
830 | #endif |
---|
831 | Int m_viewIdVal [MAX_LAYERS]; |
---|
832 | #endif |
---|
833 | |
---|
834 | #if O0215_PHASE_ALIGNMENT |
---|
835 | Bool m_phaseAlignFlag; |
---|
836 | #endif |
---|
837 | |
---|
838 | #if O0092_0094_DEPENDENCY_CONSTRAINT |
---|
839 | Int m_numberRefLayers[MAX_NUM_LAYER_IDS]; // number of direct and indirect reference layers of a coding layer |
---|
840 | Bool m_recursiveRefLayerFlag[MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; // flag to indicate if j-th layer is a direct or indirect reference layer of i-th layer |
---|
841 | #endif |
---|
842 | #if Q0078_ADD_LAYER_SETS |
---|
843 | Int m_numAddLayerSets; |
---|
844 | UInt m_highestLayerIdxPlus1[MAX_NUM_ADD_LAYER_SETS][MAX_NUM_LAYER_IDS]; |
---|
845 | UInt m_predictedLayerId[MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; |
---|
846 | UInt m_numPredictedLayers[MAX_NUM_LAYER_IDS]; |
---|
847 | Int m_numIndependentLayers; |
---|
848 | Int m_numLayersInTreePartition[MAX_LAYERS]; |
---|
849 | UInt m_treePartitionLayerIdList[MAX_LAYERS][MAX_LAYERS]; |
---|
850 | #endif |
---|
851 | #if SPS_DPB_PARAMS |
---|
852 | Int m_TolsIdx; |
---|
853 | #endif |
---|
854 | #if VPS_DPB_SIZE_TABLE |
---|
855 | Bool m_subLayerFlagInfoPresentFlag [MAX_VPS_OP_LAYER_SETS_PLUS1]; |
---|
856 | Bool m_subLayerDpbInfoPresentFlag [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; |
---|
857 | Int m_maxVpsDecPicBufferingMinus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS][MAX_TLAYER]; |
---|
858 | #if RESOLUTION_BASED_DPB |
---|
859 | Int m_maxVpsLayerDecPicBuffMinus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS][MAX_TLAYER]; |
---|
860 | #endif |
---|
861 | Int m_maxVpsNumReorderPics [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; |
---|
862 | Int m_maxVpsLatencyIncreasePlus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; |
---|
863 | #if CHANGE_NUMSUBDPB_IDX |
---|
864 | #if Q0078_ADD_LAYER_SETS |
---|
865 | Int m_numSubDpbs [MAX_VPS_LAYER_SETS_PLUS1 + 2*MAX_NUM_ADD_LAYER_SETS]; |
---|
866 | #else |
---|
867 | Int m_numSubDpbs [MAX_VPS_LAYER_SETS_PLUS1]; |
---|
868 | #endif |
---|
869 | #else |
---|
870 | Int m_numSubDpbs [MAX_VPS_OP_LAYER_SETS_PLUS1]; |
---|
871 | #endif |
---|
872 | #endif |
---|
873 | |
---|
874 | #if O0109_MOVE_VPS_VUI_FLAG |
---|
875 | Bool m_vpsVuiPresentFlag; |
---|
876 | #endif |
---|
877 | Bool m_vpsExtensionFlag; |
---|
878 | |
---|
879 | #if O0164_MULTI_LAYER_HRD |
---|
880 | Bool m_vpsVuiBspHrdPresentFlag; |
---|
881 | #if VPS_VUI_BSP_HRD_PARAMS |
---|
882 | Int m_vpsNumAddHrdParams; |
---|
883 | std::vector<Bool> m_cprmsAddPresentFlag; |
---|
884 | std::vector<Int> m_numSubLayerHrdMinus1; |
---|
885 | std::vector<TComHRD> m_bspHrd; |
---|
886 | Int m_numSignalledPartitioningSchemes[MAX_VPS_OUTPUT_LAYER_SETS_PLUS1]; |
---|
887 | Int m_numPartitionsInSchemeMinus1 [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16]; |
---|
888 | Int m_layerIncludedInPartitionFlag [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16][MAX_LAYERS][MAX_LAYERS]; |
---|
889 | Int m_numBspSchedulesMinus1 [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16][MAX_TLAYER]; |
---|
890 | Int m_bspHrdIdx [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16][MAX_TLAYER][31][MAX_LAYERS]; |
---|
891 | Int m_bspSchedIdx [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16][MAX_TLAYER][31][MAX_LAYERS]; |
---|
892 | #else |
---|
893 | UInt m_vpsNumBspHrdParametersMinus1; |
---|
894 | Bool m_bspCprmsPresentFlag[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
895 | TComHRD *m_bspHrd; |
---|
896 | UInt m_numBitstreamPartitions[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
897 | Bool m_layerInBspFlag[MAX_VPS_LAYER_SETS_PLUS1][8][MAX_LAYERS]; |
---|
898 | UInt m_numBspSchedCombinations[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
899 | UInt m_bspCombHrdIdx[MAX_VPS_LAYER_SETS_PLUS1][16][16]; |
---|
900 | UInt m_bspCombSchedIdx[MAX_VPS_LAYER_SETS_PLUS1][16][16]; |
---|
901 | #endif |
---|
902 | #endif |
---|
903 | |
---|
904 | #if P0182_VPS_VUI_PS_FLAG |
---|
905 | UInt m_baseLayerPSCompatibilityFlag[MAX_LAYERS]; |
---|
906 | #endif |
---|
907 | |
---|
908 | #if !P0307_REMOVE_VPS_VUI_OFFSET |
---|
909 | #if VPS_VUI_OFFSET |
---|
910 | Int m_vpsVuiOffset; |
---|
911 | #endif |
---|
912 | #endif |
---|
913 | #if P0307_VPS_NON_VUI_EXTENSION |
---|
914 | Int m_vpsNonVuiExtLength; |
---|
915 | #endif |
---|
916 | #if P0297_VPS_POC_LSB_ALIGNED_FLAG |
---|
917 | Bool m_vpsPocLsbAlignedFlag; |
---|
918 | #endif |
---|
919 | #if RESOLUTION_BASED_DPB |
---|
920 | Int m_subDpbAssigned [MAX_VPS_LAYER_SETS_PLUS1][MAX_LAYERS]; |
---|
921 | #endif |
---|
922 | #if NECESSARY_LAYER_FLAG |
---|
923 | std::vector< std::vector<Bool> > m_necessaryLayerFlag; |
---|
924 | std::vector<Int> m_numNecessaryLayers; |
---|
925 | #endif |
---|
926 | #endif //SVC_EXTENSION |
---|
927 | public: |
---|
928 | TComVPS(); |
---|
929 | virtual ~TComVPS(); |
---|
930 | |
---|
931 | #if VPS_RESERVED_FLAGS |
---|
932 | Void setBaseLayerInternalFlag(Bool x) { m_baseLayerInternalFlag = x; } |
---|
933 | Bool getBaseLayerInternalFlag() { return m_baseLayerInternalFlag; } |
---|
934 | Void setBaseLayerAvailableFlag(Bool x) { m_baseLayerAvailableFlag = x; } |
---|
935 | Bool getBaseLayerAvailableFlag() { return m_baseLayerAvailableFlag; } |
---|
936 | #endif |
---|
937 | |
---|
938 | Void createHrdParamBuffer() |
---|
939 | { |
---|
940 | m_hrdParameters = new TComHRD[ getNumHrdParameters() ]; |
---|
941 | m_hrdOpSetIdx = new UInt [ getNumHrdParameters() ]; |
---|
942 | m_cprmsPresentFlag = new Bool [ getNumHrdParameters() ]; |
---|
943 | } |
---|
944 | |
---|
945 | #if O0164_MULTI_LAYER_HRD |
---|
946 | Void createBspHrdParamBuffer(UInt numHrds) |
---|
947 | { |
---|
948 | #if VPS_VUI_BSP_HRD_PARAMS |
---|
949 | m_bspHrd.resize( numHrds ); |
---|
950 | m_cprmsAddPresentFlag.resize( numHrds ); |
---|
951 | m_numSubLayerHrdMinus1.resize( numHrds ); |
---|
952 | #else |
---|
953 | m_bspHrd = new TComHRD[ numHrds ]; |
---|
954 | #endif |
---|
955 | // m_hrdOpSetIdx = new UInt [ getNumHrdParameters() ]; |
---|
956 | // m_cprmsPresentFlag = new Bool [ getNumHrdParameters() ]; |
---|
957 | } |
---|
958 | #endif |
---|
959 | #if HRD_BPB |
---|
960 | Int getBspHrdParamBufferCpbCntMinus1(UInt i, UInt sl) |
---|
961 | { |
---|
962 | #if VPS_VUI_BSP_HRD_PARAMS |
---|
963 | return m_bspHrd[i].getCpbCntMinus1(sl); |
---|
964 | #else |
---|
965 | return m_bspHrd->getCpbCntMinus1(sl); |
---|
966 | #endif |
---|
967 | } |
---|
968 | #endif |
---|
969 | |
---|
970 | TComHRD* getHrdParameters ( UInt i ) { return &m_hrdParameters[ i ]; } |
---|
971 | UInt getHrdOpSetIdx ( UInt i ) { return m_hrdOpSetIdx[ i ]; } |
---|
972 | Void setHrdOpSetIdx ( UInt val, UInt i ) { m_hrdOpSetIdx[ i ] = val; } |
---|
973 | Bool getCprmsPresentFlag ( UInt i ) { return m_cprmsPresentFlag[ i ]; } |
---|
974 | Void setCprmsPresentFlag ( Bool val, UInt i ) { m_cprmsPresentFlag[ i ] = val; } |
---|
975 | |
---|
976 | Int getVPSId () { return m_VPSId; } |
---|
977 | Void setVPSId (Int i) { m_VPSId = i; } |
---|
978 | |
---|
979 | UInt getMaxTLayers () { return m_uiMaxTLayers; } |
---|
980 | Void setMaxTLayers (UInt t) { m_uiMaxTLayers = t; } |
---|
981 | |
---|
982 | UInt getMaxLayers () { return m_uiMaxLayers; } |
---|
983 | Void setMaxLayers (UInt l) { m_uiMaxLayers = l; } |
---|
984 | |
---|
985 | Bool getTemporalNestingFlag () { return m_bTemporalIdNestingFlag; } |
---|
986 | Void setTemporalNestingFlag (Bool t) { m_bTemporalIdNestingFlag = t; } |
---|
987 | |
---|
988 | Void setNumReorderPics(UInt v, UInt tLayer) { m_numReorderPics[tLayer] = v; } |
---|
989 | UInt getNumReorderPics(UInt tLayer) { return m_numReorderPics[tLayer]; } |
---|
990 | |
---|
991 | Void setMaxDecPicBuffering(UInt v, UInt tLayer) { assert(tLayer < MAX_TLAYER); m_uiMaxDecPicBuffering[tLayer] = v; } |
---|
992 | UInt getMaxDecPicBuffering(UInt tLayer) { return m_uiMaxDecPicBuffering[tLayer]; } |
---|
993 | |
---|
994 | Void setMaxLatencyIncrease(UInt v, UInt tLayer) { m_uiMaxLatencyIncrease[tLayer] = v; } |
---|
995 | UInt getMaxLatencyIncrease(UInt tLayer) { return m_uiMaxLatencyIncrease[tLayer]; } |
---|
996 | |
---|
997 | UInt getNumHrdParameters() { return m_numHrdParameters; } |
---|
998 | Void setNumHrdParameters(UInt v) { m_numHrdParameters = v; } |
---|
999 | |
---|
1000 | #if !SVC_EXTENSION |
---|
1001 | UInt getMaxNuhReservedZeroLayerId() { return m_maxNuhReservedZeroLayerId; } |
---|
1002 | Void setMaxNuhReservedZeroLayerId(UInt v) { m_maxNuhReservedZeroLayerId = v; } |
---|
1003 | |
---|
1004 | UInt getMaxOpSets() { return m_numOpSets; } |
---|
1005 | Void setMaxOpSets(UInt v) { m_numOpSets = v; } |
---|
1006 | #endif |
---|
1007 | Bool getLayerIdIncludedFlag(UInt opsIdx, UInt id) { return m_layerIdIncludedFlag[opsIdx][id]; } |
---|
1008 | Void setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id) { m_layerIdIncludedFlag[opsIdx][id] = v; } |
---|
1009 | |
---|
1010 | #if !MULTIPLE_PTL_SUPPORT |
---|
1011 | TComPTL* getPTL() { return &m_pcPTL; } |
---|
1012 | #endif |
---|
1013 | |
---|
1014 | TimingInfo* getTimingInfo() { return &m_timingInfo; } |
---|
1015 | |
---|
1016 | #if SVC_EXTENSION |
---|
1017 | #if MULTIPLE_PTL_SUPPORT |
---|
1018 | TComPTL* getPTL() { return &m_pcPTLList[0]; } |
---|
1019 | TComPTL* getPTL(UInt idx) { return &m_pcPTLList[idx]; } |
---|
1020 | #endif |
---|
1021 | #if DERIVE_LAYER_ID_LIST_VARIABLES |
---|
1022 | Int getLayerSetLayerIdList(Int set, Int layerId) { return m_layerSetLayerIdList[set][layerId]; } |
---|
1023 | Void setLayerSetLayerIdList(Int set, Int layerId, Int x) { m_layerSetLayerIdList[set][layerId] = x; } |
---|
1024 | |
---|
1025 | Int getNumLayersInIdList(Int set) { return m_numLayerInIdList[set]; } |
---|
1026 | Void setNumLayersInIdList(Int set, Int x) { m_numLayerInIdList[set] = x; } |
---|
1027 | |
---|
1028 | Void deriveLayerIdListVariables(); |
---|
1029 | #endif |
---|
1030 | #if VPS_DPB_SIZE_TABLE |
---|
1031 | Void deriveNumberOfSubDpbs(); |
---|
1032 | #endif |
---|
1033 | |
---|
1034 | #if O0092_0094_DEPENDENCY_CONSTRAINT |
---|
1035 | Void setRefLayersFlags(Int currLayerId); |
---|
1036 | Bool getRecursiveRefLayerFlag(Int currLayerId, Int refLayerId) { return m_recursiveRefLayerFlag[currLayerId][refLayerId];} |
---|
1037 | Void setRecursiveRefLayerFlag(Int currLayerId, Int refLayerId, Bool x) { m_recursiveRefLayerFlag[currLayerId][refLayerId] = x; } |
---|
1038 | Int getNumRefLayers(Int currLayerId) { return m_numberRefLayers[currLayerId]; } |
---|
1039 | Void setNumRefLayers(); |
---|
1040 | #endif |
---|
1041 | #if Q0078_ADD_LAYER_SETS |
---|
1042 | #if FIX_LAYER_ID_INIT |
---|
1043 | void deriveLayerIdListVariablesForAddLayerSets(); |
---|
1044 | #else |
---|
1045 | void setLayerIdIncludedFlagsForAddLayerSets(); |
---|
1046 | #endif |
---|
1047 | UInt getVpsNumLayerSetsMinus1() { return m_vpsNumLayerSetsMinus1; } |
---|
1048 | Void setVpsNumLayerSetsMinus1(UInt x) { m_vpsNumLayerSetsMinus1 = x; } |
---|
1049 | UInt getNumAddLayerSets() { return m_numAddLayerSets; } |
---|
1050 | Void setNumAddLayerSets(UInt x) { m_numAddLayerSets = x; } |
---|
1051 | UInt getHighestLayerIdxPlus1(UInt set, UInt idx) { return m_highestLayerIdxPlus1[set][idx]; } |
---|
1052 | Void setHighestLayerIdxPlus1(UInt set, UInt idx, UInt layerIdx) { m_highestLayerIdxPlus1[set][idx] = layerIdx; } |
---|
1053 | Void setPredictedLayerIds(); |
---|
1054 | UInt getPredictedLayerId(UInt layerId, UInt predIdx) { return m_predictedLayerId[layerId][predIdx]; } |
---|
1055 | Void setPredictedLayerId(UInt layerId, UInt predIdx, UInt x) { m_predictedLayerId[layerId][predIdx] = x; } |
---|
1056 | UInt getNumPredictedLayers(UInt layerId) { return m_numPredictedLayers[layerId]; } |
---|
1057 | Void setNumPredictedLayers(UInt layerId, UInt x) { m_numPredictedLayers[layerId] = x; } |
---|
1058 | Void setTreePartitionLayerIdList(); |
---|
1059 | Int getNumIndependentLayers() { return m_numIndependentLayers; } |
---|
1060 | Void setNumIndependentLayers(Int x) { m_numIndependentLayers = x; } |
---|
1061 | Int getNumLayersInTreePartition(Int idx) { return m_numLayersInTreePartition[idx]; } |
---|
1062 | Void setNumLayersInTreePartition(Int idx, Int x) { m_numLayersInTreePartition[idx] = x; } |
---|
1063 | UInt getTreePartitionLayerId(Int idx, Int layerIdx) { return m_treePartitionLayerIdList[idx][layerIdx]; } |
---|
1064 | Void setTreePartitionLayerId(Int idx, Int layerIdx, UInt layerId) { m_treePartitionLayerIdList[idx][layerIdx] = layerId; } |
---|
1065 | #endif |
---|
1066 | UInt getMaxLayerId() { return m_maxLayerId; } |
---|
1067 | Void setMaxLayerId(UInt v) { m_maxLayerId = v; } |
---|
1068 | UInt getNumLayerSets() { return m_numLayerSets; } |
---|
1069 | Void setNumLayerSets(UInt v) { m_numLayerSets = v; } |
---|
1070 | #if VPS_EXTN_MASK_AND_DIM_INFO |
---|
1071 | #if VPS_AVC_BL_FLAG_REMOVAL |
---|
1072 | Bool getNonHEVCBaseLayerFlag() { return m_nonHEVCBaseLayerFlag; } |
---|
1073 | Void setNonHEVCBaseLayerFlag(Bool x) { m_nonHEVCBaseLayerFlag = x; } |
---|
1074 | #else |
---|
1075 | Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } |
---|
1076 | Void setAvcBaseLayerFlag(Bool x) { m_avcBaseLayerFlag = x; } |
---|
1077 | #endif |
---|
1078 | |
---|
1079 | Bool getSplittingFlag() { return m_splittingFlag; } |
---|
1080 | Void setSplittingFlag(Bool x) { m_splittingFlag = x; } |
---|
1081 | |
---|
1082 | Bool getScalabilityMask(Int id) { return m_scalabilityMask[id]; } |
---|
1083 | Void setScalabilityMask(Int id, Bool x) { m_scalabilityMask[id] = x; } |
---|
1084 | |
---|
1085 | UInt getDimensionIdLen(Int id) { return m_dimensionIdLen[id]; } |
---|
1086 | Void setDimensionIdLen(Int id, UInt x) { m_dimensionIdLen[id] = x; } |
---|
1087 | |
---|
1088 | Bool getNuhLayerIdPresentFlag() { return m_nuhLayerIdPresentFlag; } |
---|
1089 | Void setNuhLayerIdPresentFlag(Bool x) { m_nuhLayerIdPresentFlag = x; } |
---|
1090 | |
---|
1091 | UInt getLayerIdInNuh(Int layerIdx) { return m_layerIdInNuh[layerIdx]; } |
---|
1092 | Void setLayerIdInNuh(Int layerIdx, UInt layerId) { m_layerIdInNuh[layerIdx] = layerId; } |
---|
1093 | |
---|
1094 | UInt getDimensionId(Int layerIdx, Int id) { return m_dimensionId[layerIdx][id]; } |
---|
1095 | Void setDimensionId(Int layerIdx, Int id, UInt x) { m_dimensionId[layerIdx][id] = x; } |
---|
1096 | |
---|
1097 | UInt getNumScalabilityTypes() { return m_numScalabilityTypes; } |
---|
1098 | Void setNumScalabilityTypes(UInt x) { m_numScalabilityTypes = x; } |
---|
1099 | |
---|
1100 | UInt getLayerIdxInVps(Int layerId) { return m_layerIdxInVps[layerId]; } |
---|
1101 | Void setLayerIdxInVps(Int layerId, UInt layerIdx) { m_layerIdxInVps[layerId] = layerIdx; } |
---|
1102 | #endif |
---|
1103 | #if BITRATE_PICRATE_SIGNALLING |
---|
1104 | UInt getMaxSLayersInLayerSetMinus1(Int ls) { return m_maxSLInLayerSetMinus1[ls]; } |
---|
1105 | Void setMaxSLayersInLayerSetMinus1(Int ls, Int x) { m_maxSLInLayerSetMinus1[ls] = x; } |
---|
1106 | #endif |
---|
1107 | Bool getIlpSshSignalingEnabledFlag() { return m_ilpSshSignalingEnabledFlag;} |
---|
1108 | Void setIlpSshSignalingEnabledFlag(Bool x) { m_ilpSshSignalingEnabledFlag = x;} |
---|
1109 | #if VPS_EXTN_PROFILE_INFO |
---|
1110 | Bool getProfilePresentFlag(Int id) { return m_profilePresentFlag[id]; } |
---|
1111 | Void setProfilePresentFlag(Int id, Bool x) { m_profilePresentFlag[id] = x; } |
---|
1112 | |
---|
1113 | #if !P0048_REMOVE_PROFILE_REF |
---|
1114 | UInt getProfileLayerSetRef(Int id) { return m_profileLayerSetRef[id]; } |
---|
1115 | Void setProfileLayerSetRef(Int id, Bool x) { m_profileLayerSetRef[id] = x; } |
---|
1116 | #endif |
---|
1117 | |
---|
1118 | #if !MULTIPLE_PTL_SUPPORT |
---|
1119 | std::vector<TComPTL>* getPTLForExtnPtr() { return &m_pcPTLForExtn; } |
---|
1120 | TComPTL* getPTLForExtn(Int id) { return &m_pcPTLForExtn[id]; } |
---|
1121 | #endif |
---|
1122 | #endif |
---|
1123 | #if VPS_EXTN_OP_LAYER_SETS |
---|
1124 | // Target output layer signalling related |
---|
1125 | UInt getNumOutputLayerSets() { return m_numOutputLayerSets; } |
---|
1126 | Void setNumOutputLayerSets(Int x) { m_numOutputLayerSets = x; } |
---|
1127 | |
---|
1128 | UInt getOutputLayerSetIdx(Int idx) { return m_outputLayerSetIdx[idx]; } |
---|
1129 | Void setOutputLayerSetIdx(Int idx, UInt x) { m_outputLayerSetIdx[idx] = x; } |
---|
1130 | |
---|
1131 | Bool getOutputLayerFlag(Int layerSet, Int layerIdx) { return m_outputLayerFlag[layerSet][layerIdx]; } |
---|
1132 | Void setOutputLayerFlag(Int layerSet, Int layerIdx, Bool x) { m_outputLayerFlag[layerSet][layerIdx] = x; } |
---|
1133 | #endif |
---|
1134 | #if VPS_EXTN_DIRECT_REF_LAYERS |
---|
1135 | // Direct dependency of layers |
---|
1136 | Bool getDirectDependencyFlag(Int currLayerIdx, Int refLayerIdx) { return m_directDependencyFlag[currLayerIdx][refLayerIdx]; } |
---|
1137 | Void setDirectDependencyFlag(Int currLayerIdx, Int refLayerIdx, Bool x) { m_directDependencyFlag[currLayerIdx][refLayerIdx] = x; } |
---|
1138 | |
---|
1139 | UInt getNumDirectRefLayers(Int layerId) { return m_numDirectRefLayers[layerId]; } |
---|
1140 | Void setNumDirectRefLayers(Int layerId, UInt refLayerNum) { m_numDirectRefLayers[layerId] = refLayerNum; } |
---|
1141 | |
---|
1142 | UInt getRefLayerId(Int layerId, Int refLayerIdx) { return m_refLayerId[layerId][refLayerIdx]; } |
---|
1143 | Void setRefLayerId(Int layerId, Int refLayerIdx, UInt refLayerId) { m_refLayerId[layerId][refLayerIdx] = refLayerId; } |
---|
1144 | |
---|
1145 | UInt getDirectDepTypeLen() { return m_directDepTypeLen; } |
---|
1146 | Void setDirectDepTypeLen(UInt x) { m_directDepTypeLen = x; } |
---|
1147 | #if O0096_DEFAULT_DEPENDENCY_TYPE |
---|
1148 | Bool getDefaultDirectDependencyTypeFlag() { return m_defaultDirectDependencyTypeFlag; } |
---|
1149 | Void setDefaultDirectDependecyTypeFlag(Bool x) { m_defaultDirectDependencyTypeFlag = x; } |
---|
1150 | UInt getDefaultDirectDependencyType() { return m_defaultDirectDependencyType; } |
---|
1151 | Void setDefaultDirectDependecyType(UInt x) { m_defaultDirectDependencyType = x; } |
---|
1152 | #endif |
---|
1153 | UInt getDirectDependencyType(Int currLayerIdx, Int refLayerIdx) { return m_directDependencyType[currLayerIdx][refLayerIdx]; } |
---|
1154 | Void setDirectDependencyType(Int currLayerIdx, Int refLayerIdx, UInt x) { m_directDependencyType[currLayerIdx][refLayerIdx] = x; } |
---|
1155 | Bool isSamplePredictionType(Int currLayerIdx, Int refLayerIdx) { assert(currLayerIdx != refLayerIdx); return ( ( m_directDependencyType[currLayerIdx][refLayerIdx] + 1 ) & 1 ) ? true : false; } |
---|
1156 | Bool isMotionPredictionType(Int currLayerIdx, Int refLayerIdx) { assert(currLayerIdx != refLayerIdx); return ( ( ( m_directDependencyType[currLayerIdx][refLayerIdx] + 1 ) & 2 ) >> 1 ) ? true : false; } |
---|
1157 | #endif |
---|
1158 | UInt getNumProfileTierLevel() { return m_numProfileTierLevel; } |
---|
1159 | Void setNumProfileTierLevel(Int x) { m_numProfileTierLevel = x; } |
---|
1160 | |
---|
1161 | #if !VPS_EXTN_UEV_CODING |
---|
1162 | Bool getMoreOutputLayerSetsThanDefaultFlag() { return m_moreOutputLayerSetsThanDefaultFlag;} |
---|
1163 | Void setMoreOutputLayerSetsThanDefaultFlag(Bool x) { m_moreOutputLayerSetsThanDefaultFlag = x ;} |
---|
1164 | #endif |
---|
1165 | |
---|
1166 | Int getNumAddOutputLayerSets() { return m_numAddOutputLayerSets; } |
---|
1167 | Void setNumAddOutputLayerSets(Int x) { m_numAddOutputLayerSets = x ; } |
---|
1168 | |
---|
1169 | #if P0295_DEFAULT_OUT_LAYER_IDC |
---|
1170 | UInt getDefaultTargetOutputLayerIdc() { return m_defaultTargetOutputLayerIdc;} |
---|
1171 | Void setDefaultTargetOutputLayerIdc(UInt x) { m_defaultTargetOutputLayerIdc = x ;} |
---|
1172 | #else |
---|
1173 | #if O0109_DEFAULT_ONE_OUT_LAYER_IDC |
---|
1174 | UInt getDefaultOneTargetOutputLayerIdc() { return m_defaultOneTargetOutputLayerIdc;} |
---|
1175 | Void setDefaultOneTargetOutputLayerIdc(UInt x) { m_defaultOneTargetOutputLayerIdc= x ;} |
---|
1176 | #else |
---|
1177 | Bool getDefaultOneTargetOutputLayerFlag() { return m_defaultOneTargetOutputLayerFlag;} |
---|
1178 | Void setDefaultOneTargetOutputLayerFlag(Bool x) { m_defaultOneTargetOutputLayerFlag= x ;} |
---|
1179 | #endif |
---|
1180 | #endif |
---|
1181 | #if PER_LAYER_PTL |
---|
1182 | Bool getNecessaryLayerFlag(Int const i, Int const j) { return m_necessaryLayerFlag[i][j]; } |
---|
1183 | std::vector< std::vector<Int> >* getProfileLevelTierIdx() { return &m_profileLevelTierIdx; } |
---|
1184 | std::vector<Int>* getProfileLevelTierIdx(Int const olsIdx) { return &m_profileLevelTierIdx[olsIdx]; } |
---|
1185 | Int getProfileLevelTierIdx(Int const olsIdx, Int const layerIdx) { return m_profileLevelTierIdx[olsIdx][layerIdx]; } |
---|
1186 | Void setProfileLevelTierIdx(Int const olsIdx, Int const layerIdx, Int const ptlIdx) { m_profileLevelTierIdx[olsIdx][layerIdx] = ptlIdx; } |
---|
1187 | #if MULTIPLE_PTL_SUPPORT |
---|
1188 | Void addProfileLevelTierIdx(Int const olsIdx, Int const ptlIdx) { m_profileLevelTierIdx[olsIdx].push_back(ptlIdx); } |
---|
1189 | #endif |
---|
1190 | Int calculateLenOfSyntaxElement( Int const numVal ); |
---|
1191 | #else |
---|
1192 | Int getProfileLevelTierIdx(Int i) { return m_profileLevelTierIdx[i]; } |
---|
1193 | Void setProfileLevelTierIdx(Int i, Int x) { m_profileLevelTierIdx[i] = x ; } |
---|
1194 | #endif |
---|
1195 | Bool getMaxOneActiveRefLayerFlag() { return m_maxOneActiveRefLayerFlag; } |
---|
1196 | Void setMaxOneActiveRefLayerFlag(Bool x) { m_maxOneActiveRefLayerFlag = x; } |
---|
1197 | #if O0062_POC_LSB_NOT_PRESENT_FLAG |
---|
1198 | UInt getPocLsbNotPresentFlag(Int i) { return m_pocLsbNotPresentFlag[i]; } |
---|
1199 | Void setPocLsbNotPresentFlag(Int i, Bool x) { m_pocLsbNotPresentFlag[i] = x; } |
---|
1200 | #endif |
---|
1201 | #if P0297_VPS_POC_LSB_ALIGNED_FLAG |
---|
1202 | Bool getVpsPocLsbAlignedFlag() { return m_vpsPocLsbAlignedFlag; } |
---|
1203 | Void setVpsPocLsbAlignedFlag(Bool x) { m_vpsPocLsbAlignedFlag = x; } |
---|
1204 | #endif |
---|
1205 | #if O0223_PICTURE_TYPES_ALIGN_FLAG |
---|
1206 | Bool getCrossLayerPictureTypeAlignFlag() { return m_crossLayerPictureTypeAlignFlag; } |
---|
1207 | Void setCrossLayerPictureTypeAlignFlag(Bool x) { m_crossLayerPictureTypeAlignFlag = x; } |
---|
1208 | #endif |
---|
1209 | #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG |
---|
1210 | Bool getCrossLayerAlignedIdrOnlyFlag() { return m_crossLayerAlignedIdrOnlyFlag; } |
---|
1211 | Void setCrossLayerAlignedIdrOnlyFlag(Bool x) { m_crossLayerAlignedIdrOnlyFlag = x; } |
---|
1212 | #endif |
---|
1213 | Bool getCrossLayerIrapAlignFlag() { return m_crossLayerIrapAlignFlag; } |
---|
1214 | Void setCrossLayerIrapAlignFlag(Bool x) { m_crossLayerIrapAlignFlag = x; } |
---|
1215 | #if O0225_MAX_TID_FOR_REF_LAYERS |
---|
1216 | UInt getMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId) { return m_maxTidIlRefPicsPlus1[layerId][refLayerId]; } |
---|
1217 | Void setMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId, UInt maxSublayer) { m_maxTidIlRefPicsPlus1[layerId][refLayerId] = maxSublayer; } |
---|
1218 | #else |
---|
1219 | UInt getMaxTidIlRefPicsPlus1(Int layerId) { return m_maxTidIlRefPicsPlus1[layerId]; } |
---|
1220 | Void setMaxTidIlRefPicsPlus1(Int layerId, UInt maxSublayer) { m_maxTidIlRefPicsPlus1[layerId] = maxSublayer; } |
---|
1221 | #endif |
---|
1222 | Bool getMaxTidRefPresentFlag() { return m_maxTidRefPresentFlag ;} |
---|
1223 | Void setMaxTidRefPresentFlag(Bool x) { m_maxTidRefPresentFlag = x;} |
---|
1224 | #if VPS_TSLAYERS |
---|
1225 | Bool getMaxTSLayersPresentFlag() { return m_maxTSLayersPresentFlag ;} |
---|
1226 | Void setMaxTSLayersPresentFlag(Bool x) { m_maxTSLayersPresentFlag = x;} |
---|
1227 | UInt getMaxTSLayersMinus1(Int layerId) { return m_maxTSLayerMinus1[layerId];} |
---|
1228 | Void setMaxTSLayersMinus1(Int layerId, UInt maxTSublayer) { m_maxTSLayerMinus1[layerId] = maxTSublayer;} |
---|
1229 | #endif |
---|
1230 | #if M0040_ADAPTIVE_RESOLUTION_CHANGE |
---|
1231 | Bool getSingleLayerForNonIrapFlag() { return m_singleLayerForNonIrapFlag; } |
---|
1232 | Void setSingleLayerForNonIrapFlag(Bool x) { m_singleLayerForNonIrapFlag = x; } |
---|
1233 | #endif |
---|
1234 | #if HIGHER_LAYER_IRAP_SKIP_FLAG |
---|
1235 | Bool getHigherLayerIrapSkipFlag() { return m_higherLayerIrapSkipFlag; } |
---|
1236 | Void setHigherLayerIrapSkipFlag(Bool x) { m_higherLayerIrapSkipFlag = x; } |
---|
1237 | #endif |
---|
1238 | #if VPS_VUI_TILES_NOT_IN_USE__FLAG |
---|
1239 | Bool getTilesNotInUseFlag() { return m_tilesNotInUseFlag; } |
---|
1240 | Void setTilesNotInUseFlag(Bool x); |
---|
1241 | Bool getTilesInUseFlag(Int currLayerId) { return m_tilesInUseFlag[currLayerId]; } |
---|
1242 | Void setTilesInUseFlag(Int currLayerId, Bool x) { m_tilesInUseFlag[currLayerId] = x; } |
---|
1243 | Bool getLoopFilterNotAcrossTilesFlag(Int currLayerId) { return m_loopFilterNotAcrossTilesFlag[currLayerId]; } |
---|
1244 | Void setLoopFilterNotAcrossTilesFlag(Int currLayerId, Bool x) { m_loopFilterNotAcrossTilesFlag[currLayerId] = x; } |
---|
1245 | #endif |
---|
1246 | Bool getTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId) { return m_tileBoundariesAlignedFlag[currLayerId][refLayerId]; } |
---|
1247 | Void setTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId, Bool x) { m_tileBoundariesAlignedFlag[currLayerId][refLayerId] = x; } |
---|
1248 | #if VPS_VUI_WPP_NOT_IN_USE__FLAG |
---|
1249 | Bool getWppNotInUseFlag() { return m_wppNotInUseFlag; } |
---|
1250 | Void setWppNotInUseFlag(Bool x); |
---|
1251 | Bool getWppInUseFlag(Int currLayerId) { return m_wppInUseFlag[currLayerId]; } |
---|
1252 | Void setWppInUseFlag(Int currLayerId, Bool x) { m_wppInUseFlag[currLayerId] = x; } |
---|
1253 | #endif |
---|
1254 | #if N0160_VUI_EXT_ILP_REF |
---|
1255 | Bool getIlpRestrictedRefLayersFlag ( ) { return m_ilpRestrictedRefLayersFlag ;} |
---|
1256 | Void setIlpRestrictedRefLayersFlag ( Int val ) { m_ilpRestrictedRefLayersFlag = val;} |
---|
1257 | |
---|
1258 | Int getMinSpatialSegmentOffsetPlus1( Int currLayerId, Int refLayerId ) { return m_minSpatialSegmentOffsetPlus1[currLayerId][refLayerId];} |
---|
1259 | Void setMinSpatialSegmentOffsetPlus1( Int currLayerId, Int refLayerId, Int val ) { m_minSpatialSegmentOffsetPlus1[currLayerId][refLayerId] = val;} |
---|
1260 | |
---|
1261 | Bool getCtuBasedOffsetEnabledFlag ( Int currLayerId, Int refLayerId ) { return m_ctuBasedOffsetEnabledFlag[currLayerId][refLayerId];} |
---|
1262 | Void setCtuBasedOffsetEnabledFlag ( Int currLayerId, Int refLayerId, Bool flag ) { m_ctuBasedOffsetEnabledFlag[currLayerId][refLayerId] = flag;} |
---|
1263 | |
---|
1264 | Int getMinHorizontalCtuOffsetPlus1 ( Int currLayerId, Int refLayerId ) { return m_minHorizontalCtuOffsetPlus1[currLayerId][refLayerId];} |
---|
1265 | Void setMinHorizontalCtuOffsetPlus1 ( Int currLayerId, Int refLayerId, Int val ) { m_minHorizontalCtuOffsetPlus1[currLayerId][refLayerId] = val;} |
---|
1266 | #endif |
---|
1267 | #if VPS_VUI_VIDEO_SIGNAL |
---|
1268 | Bool getVideoSigPresentVpsFlag() { return m_vidSigPresentVpsFlag; } |
---|
1269 | Void setVideoSigPresentVpsFlag(Bool x) { m_vidSigPresentVpsFlag = x; } |
---|
1270 | Int getNumVideoSignalInfo() { return m_vpsVidSigInfo; } |
---|
1271 | Void setNumVideoSignalInfo(Int x) { m_vpsVidSigInfo = x; } |
---|
1272 | Int getVideoSignalInfoIdx(Int idx) { return m_vpsVidSigIdx[idx]; } |
---|
1273 | Void setVideoSignalInfoIdx(Int idx, Int x) { m_vpsVidSigIdx[idx] = x; } |
---|
1274 | Int getVideoVPSFormat(Int idx) { return m_vpsVidFormat[idx]; } |
---|
1275 | Void setVideoVPSFormat(Int idx, Int x) { m_vpsVidFormat[idx] = x; } |
---|
1276 | Bool getVideoFullRangeVpsFlag(Int idx) { return m_vpsFullRangeFlag[idx];} |
---|
1277 | Void setVideoFullRangeVpsFlag(Int idx, Bool x) { m_vpsFullRangeFlag[idx] = x; } |
---|
1278 | Int getColorPrimaries(Int idx) { return m_vpsColorPrimaries[idx]; } |
---|
1279 | Void setColorPrimaries(Int idx, Int x) { m_vpsColorPrimaries[idx] = x; } |
---|
1280 | Int getTransCharacter(Int idx) { return m_vpsTransChar[idx]; } |
---|
1281 | Void setTransCharacter(Int idx, Int x) { m_vpsTransChar[idx] = x; } |
---|
1282 | Int getMaxtrixCoeff(Int idx) { return m_vpsMatCoeff[idx]; } |
---|
1283 | Void setMaxtrixCoeff(Int idx, Int x) { m_vpsMatCoeff[idx] = x; } |
---|
1284 | #endif |
---|
1285 | Bool getBitRatePresentVpsFlag() { return m_bitRatePresentVpsFlag; } |
---|
1286 | Void setBitRatePresentVpsFlag(Bool x) { m_bitRatePresentVpsFlag = x; } |
---|
1287 | Bool getPicRatePresentVpsFlag() { return m_picRatePresentVpsFlag; } |
---|
1288 | Void setPicRatePresentVpsFlag(Bool x) { m_picRatePresentVpsFlag = x; } |
---|
1289 | |
---|
1290 | Bool getBitRatePresentFlag(Int i, Int j) { return m_bitRatePresentFlag[i][j]; } |
---|
1291 | Void setBitRatePresentFlag(Int i, Int j, Bool x) { m_bitRatePresentFlag[i][j] = x; } |
---|
1292 | Bool getPicRatePresentFlag(Int i, Int j) { return m_picRatePresentFlag[i][j]; } |
---|
1293 | Void setPicRatePresentFlag(Int i, Int j, Bool x) { m_picRatePresentFlag[i][j] = x; } |
---|
1294 | |
---|
1295 | Int getAvgBitRate(Int i, Int j) { return m_avgBitRate[i][j]; } |
---|
1296 | Void setAvgBitRate(Int i, Int j, Int x) { m_avgBitRate[i][j] = x; } |
---|
1297 | Int getMaxBitRate(Int i, Int j) { return m_maxBitRate[i][j]; } |
---|
1298 | Void setMaxBitRate(Int i, Int j, Int x) { m_maxBitRate[i][j] = x; } |
---|
1299 | |
---|
1300 | Int getConstPicRateIdc(Int i, Int j) { return m_constPicRateIdc[i][j]; } |
---|
1301 | Void setConstPicRateIdc(Int i, Int j, Int x) { m_constPicRateIdc[i][j] = x; } |
---|
1302 | Int getAvgPicRate(Int i, Int j) { return m_avgPicRate[i][j]; } |
---|
1303 | Void setAvgPicRate(Int i, Int j, Int x) { m_avgPicRate[i][j] = x; } |
---|
1304 | #if O0164_MULTI_LAYER_HRD |
---|
1305 | Bool getVpsVuiBspHrdPresentFlag() { return m_vpsVuiBspHrdPresentFlag; } |
---|
1306 | Void setVpsVuiBspHrdPresentFlag(Bool x) { m_vpsVuiBspHrdPresentFlag = x; } |
---|
1307 | #if VPS_VUI_BSP_HRD_PARAMS |
---|
1308 | Int getVpsNumAddHrdParams() { return m_vpsNumAddHrdParams; } |
---|
1309 | Void setVpsNumAddHrdParams(Int i) { m_vpsNumAddHrdParams = i; } |
---|
1310 | |
---|
1311 | Bool getCprmsAddPresentFlag(Int i) { return m_cprmsAddPresentFlag[i]; } |
---|
1312 | Void setCprmsAddPresentFlag(Int i, Bool val) { m_cprmsAddPresentFlag[i] = val; } |
---|
1313 | |
---|
1314 | Int getNumSubLayerHrdMinus1(Int i) { return m_numSubLayerHrdMinus1[i]; } |
---|
1315 | Void setNumSubLayerHrdMinus1(Int i, Int val) { m_numSubLayerHrdMinus1[i] = val; } |
---|
1316 | |
---|
1317 | TComHRD* getBspHrd(Int i) {return &m_bspHrd[i];} |
---|
1318 | |
---|
1319 | Int getNumSignalledPartitioningSchemes(Int i) { return m_numSignalledPartitioningSchemes[i]; } |
---|
1320 | Void setNumSignalledPartitioningSchemes(Int i, Int val) { m_numSignalledPartitioningSchemes[i] = val; } |
---|
1321 | |
---|
1322 | Int getNumPartitionsInSchemeMinus1(Int i, Int j) { return m_numPartitionsInSchemeMinus1[i][j];} |
---|
1323 | Void setNumPartitionsInSchemeMinus1(Int i, Int j, Int val) { m_numPartitionsInSchemeMinus1[i][j] = val; } |
---|
1324 | |
---|
1325 | Int getLayerIncludedInPartitionFlag(Int i, Int j, Int k, Int l) { return m_layerIncludedInPartitionFlag[i][j][k][l];} |
---|
1326 | Void setLayerIncludedInPartitionFlag(Int i, Int j, Int k, Int l, Int val) { m_layerIncludedInPartitionFlag[i][j][k][l] = val; } |
---|
1327 | |
---|
1328 | Int getNumBspSchedulesMinus1(Int i, Int j, Int k) { return m_numBspSchedulesMinus1[i][j][k];} |
---|
1329 | Void setNumBspSchedulesMinus1(Int i, Int j, Int k, Int val) { m_numBspSchedulesMinus1[i][j][k] = val; } |
---|
1330 | |
---|
1331 | Int getBspSchedIdx(Int i, Int j, Int k, Int l, Int m) { return m_bspSchedIdx[i][j][k][l][m];} |
---|
1332 | Void setBspSchedIdx(Int i, Int j, Int k, Int l, Int m, Int val) { m_bspSchedIdx[i][j][k][l][m] = val; } |
---|
1333 | |
---|
1334 | Int getBspHrdIdx(Int i, Int j, Int k, Int l, Int m) { return m_bspHrdIdx[i][j][k][l][m];} |
---|
1335 | Void setBspHrdIdx(Int i, Int j, Int k, Int l, Int m, Int val) { m_bspHrdIdx[i][j][k][l][m] = val; } |
---|
1336 | #else |
---|
1337 | UInt getVpsNumBspHrdParametersMinus1() { return m_vpsNumBspHrdParametersMinus1; } |
---|
1338 | Void setVpsNumBspHrdParametersMinus1(UInt i) { m_vpsNumBspHrdParametersMinus1 = i; } |
---|
1339 | Bool getBspCprmsPresentFlag(UInt i) { return m_bspCprmsPresentFlag[i]; } |
---|
1340 | Void setBspCprmsPresentFlag(UInt i, Bool val) { m_bspCprmsPresentFlag[i] = val; } |
---|
1341 | TComHRD* getBspHrd(UInt i) { return &m_bspHrd[i]; } |
---|
1342 | UInt getNumBitstreamPartitions(UInt i) { return m_numBitstreamPartitions[i]; } |
---|
1343 | Void setNumBitstreamPartitions(UInt i, UInt val) { m_numBitstreamPartitions[i] = val; } |
---|
1344 | UInt getLayerInBspFlag(UInt h, UInt i, UInt j) { return m_layerInBspFlag[h][i][j]; } |
---|
1345 | Void setLayerInBspFlag(UInt h, UInt i, UInt j, UInt val) { m_layerInBspFlag[h][i][j] = val; } |
---|
1346 | UInt getNumBspSchedCombinations(UInt i) { return m_numBspSchedCombinations[i]; } |
---|
1347 | Void setNumBspSchedCombinations(UInt i, UInt val) { m_numBspSchedCombinations[i] = val; } |
---|
1348 | UInt getBspCombHrdIdx(UInt h, UInt i, UInt j) { return m_bspCombHrdIdx[h][i][j]; } |
---|
1349 | Void setBspCombHrdIdx(UInt h, UInt i, UInt j, UInt val) { m_bspCombHrdIdx[h][i][j] = val; } |
---|
1350 | UInt getBspCombSchedIdx(UInt h, UInt i, UInt j) { return m_bspCombSchedIdx[h][i][j]; } |
---|
1351 | Void setBspCombSchedIdx(UInt h, UInt i, UInt j, UInt val) { m_bspCombSchedIdx[h][i][j] = val; } |
---|
1352 | #endif |
---|
1353 | #endif |
---|
1354 | #if P0182_VPS_VUI_PS_FLAG |
---|
1355 | Void setBaseLayerPSCompatibilityFlag (Int layer, int val) { m_baseLayerPSCompatibilityFlag[layer] = val; } |
---|
1356 | Int getBaseLayerPSCompatibilityFlag (Int layer) { return m_baseLayerPSCompatibilityFlag[layer];} |
---|
1357 | #endif |
---|
1358 | |
---|
1359 | #if P0312_VERT_PHASE_ADJ |
---|
1360 | Bool getVpsVuiVertPhaseInUseFlag() { return m_vpsVuiVertPhaseInUseFlag; } |
---|
1361 | Void setVpsVuiVertPhaseInUseFlag(Bool x) { m_vpsVuiVertPhaseInUseFlag = x; } |
---|
1362 | #endif |
---|
1363 | |
---|
1364 | #if P0300_ALT_OUTPUT_LAYER_FLAG |
---|
1365 | Bool getAltOuputLayerFlag(Int idx) { return m_altOutputLayerFlag[idx]; } |
---|
1366 | Void setAltOuputLayerFlag(Int idx, Bool x) { m_altOutputLayerFlag[idx] = x; } |
---|
1367 | #else |
---|
1368 | #if O0153_ALT_OUTPUT_LAYER_FLAG |
---|
1369 | Bool getAltOuputLayerFlag() { return m_altOutputLayerFlag; } |
---|
1370 | Void setAltOuputLayerFlag(Bool x) { m_altOutputLayerFlag = x; } |
---|
1371 | #endif |
---|
1372 | #endif |
---|
1373 | #if REPN_FORMAT_IN_VPS |
---|
1374 | Bool getRepFormatIdxPresentFlag() { return m_repFormatIdxPresentFlag; } |
---|
1375 | Void setRepFormatIdxPresentFlag(Bool x) { m_repFormatIdxPresentFlag = x; } |
---|
1376 | |
---|
1377 | Int getVpsNumRepFormats() { return m_vpsNumRepFormats; } |
---|
1378 | Void setVpsNumRepFormats(Int x) { m_vpsNumRepFormats = x; } |
---|
1379 | |
---|
1380 | RepFormat* getVpsRepFormat(Int idx) { return &m_vpsRepFormat[idx]; } |
---|
1381 | |
---|
1382 | Int getVpsRepFormatIdx(Int idx) { return m_vpsRepFormatIdx[idx]; } |
---|
1383 | Void setVpsRepFormatIdx(Int idx, Int x) { m_vpsRepFormatIdx[idx] = x; } |
---|
1384 | #endif |
---|
1385 | #if VIEW_ID_RELATED_SIGNALING |
---|
1386 | #if O0109_VIEW_ID_LEN |
---|
1387 | Void setViewIdLen( Int val ) { m_viewIdLen = val; } |
---|
1388 | Int getViewIdLen( ) { return m_viewIdLen; } |
---|
1389 | #else |
---|
1390 | Void setViewIdLenMinus1( Int val ) { m_viewIdLenMinus1 = val; } |
---|
1391 | Int getViewIdLenMinus1( ) { return m_viewIdLenMinus1; } |
---|
1392 | #endif |
---|
1393 | |
---|
1394 | Void setViewIdVal( Int viewOrderIndex, Int val ) { m_viewIdVal[viewOrderIndex] = val; } |
---|
1395 | Int getViewIdVal( Int viewOrderIndex ) { return m_viewIdVal[viewOrderIndex]; } |
---|
1396 | Int getScalabilityId(Int, ScalabilityType scalType ); |
---|
1397 | |
---|
1398 | Int getViewIndex ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdxInVps(layerIdInNuh), VIEW_ORDER_INDEX ); } |
---|
1399 | |
---|
1400 | Int getNumViews(); |
---|
1401 | Int scalTypeToScalIdx( ScalabilityType scalType ); |
---|
1402 | #endif |
---|
1403 | #if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED |
---|
1404 | #if VPS_EXTN_OFFSET |
---|
1405 | Int getExtensionOffset() { return m_extensionOffset; } |
---|
1406 | Void setExtensionOffset( UInt offset ) { m_extensionOffset = offset; } |
---|
1407 | #endif |
---|
1408 | #endif |
---|
1409 | #if O0215_PHASE_ALIGNMENT |
---|
1410 | Bool getPhaseAlignFlag() { return m_phaseAlignFlag; } |
---|
1411 | Void setPhaseAlignFlag(Bool x) { m_phaseAlignFlag = x; } |
---|
1412 | #endif |
---|
1413 | #if VPS_DPB_SIZE_TABLE |
---|
1414 | Bool getSubLayerFlagInfoPresentFlag(Int i) {return m_subLayerFlagInfoPresentFlag[i]; } |
---|
1415 | Void setSubLayerFlagInfoPresentFlag(Int i, Bool x) {m_subLayerFlagInfoPresentFlag[i] = x; } |
---|
1416 | |
---|
1417 | Bool getSubLayerDpbInfoPresentFlag(Int i, Int j) {return m_subLayerDpbInfoPresentFlag[i][j]; } |
---|
1418 | Void setSubLayerDpbInfoPresentFlag(Int i, Int j, Bool x) {m_subLayerDpbInfoPresentFlag[i][j] = x; } |
---|
1419 | |
---|
1420 | // For the 0-th output layer set, use the date from the active SPS for base layer. |
---|
1421 | Int getMaxVpsDecPicBufferingMinus1(Int i, Int k, Int j) { assert(i != 0); return m_maxVpsDecPicBufferingMinus1[i][k][j]; } |
---|
1422 | Void setMaxVpsDecPicBufferingMinus1(Int i, Int k, Int j, Int x) { m_maxVpsDecPicBufferingMinus1[i][k][j] = x; } |
---|
1423 | |
---|
1424 | #if RESOLUTION_BASED_DPB |
---|
1425 | Int getMaxVpsLayerDecPicBuffMinus1(Int i, Int k, Int j) { assert(i != 0); return m_maxVpsLayerDecPicBuffMinus1[i][k][j]; } |
---|
1426 | Void setMaxVpsLayerDecPicBuffMinus1(Int i, Int k, Int j, Int x) { m_maxVpsLayerDecPicBuffMinus1[i][k][j] = x; } |
---|
1427 | #endif |
---|
1428 | |
---|
1429 | Int getMaxVpsNumReorderPics(Int i, Int j) { assert(i != 0); return m_maxVpsNumReorderPics[i][j]; } |
---|
1430 | Void setMaxVpsNumReorderPics(Int i, Int j, Int x) { m_maxVpsNumReorderPics[i][j] = x; } |
---|
1431 | |
---|
1432 | Int getMaxVpsLatencyIncreasePlus1(Int i, Int j) { assert(i != 0); return m_maxVpsLatencyIncreasePlus1[i][j]; } |
---|
1433 | Void setMaxVpsLatencyIncreasePlus1(Int i, Int j, Int x) { m_maxVpsLatencyIncreasePlus1[i][j] = x; } |
---|
1434 | |
---|
1435 | Int getNumSubDpbs(Int i) { return m_numSubDpbs[i]; } |
---|
1436 | Void setNumSubDpbs(Int i, Int x) { m_numSubDpbs[i] = x; } |
---|
1437 | Void determineSubDpbInfoFlags(); |
---|
1438 | #endif |
---|
1439 | |
---|
1440 | #if O0109_MOVE_VPS_VUI_FLAG |
---|
1441 | Bool getVpsVuiPresentFlag() { return m_vpsVuiPresentFlag; } |
---|
1442 | Void setVpsVuiPresentFlag(Bool x) { m_vpsVuiPresentFlag = x; } |
---|
1443 | #endif |
---|
1444 | Bool getVpsExtensionFlag() { return m_vpsExtensionFlag; } |
---|
1445 | Void setVpsExtensionFlag(Bool x) { m_vpsExtensionFlag = x; } |
---|
1446 | |
---|
1447 | #if !P0307_REMOVE_VPS_VUI_OFFSET |
---|
1448 | #if VPS_VUI_OFFSET |
---|
1449 | Int getVpsVuiOffset() { return m_vpsVuiOffset; } |
---|
1450 | Void setVpsVuiOffset(Int x) { m_vpsVuiOffset = x; } |
---|
1451 | #endif |
---|
1452 | #endif |
---|
1453 | #if P0307_VPS_NON_VUI_EXTENSION |
---|
1454 | Int getVpsNonVuiExtLength() { return m_vpsNonVuiExtLength; } |
---|
1455 | Void setVpsNonVuiExtLength(Int x) { m_vpsNonVuiExtLength = x; } |
---|
1456 | #endif |
---|
1457 | #if RESOLUTION_BASED_DPB |
---|
1458 | Void assignSubDpbIndices(); |
---|
1459 | Int getSubDpbAssigned (Int lsIdx, Int layerIdx) { return m_subDpbAssigned[lsIdx][layerIdx]; } |
---|
1460 | Int findLayerIdxInLayerSet ( Int lsIdx, Int nuhLayerId ); |
---|
1461 | #endif |
---|
1462 | #if O0164_MULTI_LAYER_HRD |
---|
1463 | Void setBspHrdParameters( UInt hrdIdx, UInt frameRate, UInt numDU, UInt bitRate, Bool randomAccess ); |
---|
1464 | #endif |
---|
1465 | #if NECESSARY_LAYER_FLAG |
---|
1466 | Void deriveNecessaryLayerFlag(); |
---|
1467 | Void deriveNecessaryLayerFlag(Int const olsIdx); |
---|
1468 | Void checkNecessaryLayerFlagCondition(); |
---|
1469 | #endif |
---|
1470 | #if SUB_LAYERS_IN_LAYER_SET |
---|
1471 | Void calculateMaxSLInLayerSets(); |
---|
1472 | #endif |
---|
1473 | #endif //SVC_EXTENSION |
---|
1474 | }; |
---|
1475 | |
---|
1476 | class TComVUI |
---|
1477 | { |
---|
1478 | private: |
---|
1479 | Bool m_aspectRatioInfoPresentFlag; |
---|
1480 | Int m_aspectRatioIdc; |
---|
1481 | Int m_sarWidth; |
---|
1482 | Int m_sarHeight; |
---|
1483 | Bool m_overscanInfoPresentFlag; |
---|
1484 | Bool m_overscanAppropriateFlag; |
---|
1485 | Bool m_videoSignalTypePresentFlag; |
---|
1486 | Int m_videoFormat; |
---|
1487 | Bool m_videoFullRangeFlag; |
---|
1488 | Bool m_colourDescriptionPresentFlag; |
---|
1489 | Int m_colourPrimaries; |
---|
1490 | Int m_transferCharacteristics; |
---|
1491 | Int m_matrixCoefficients; |
---|
1492 | Bool m_chromaLocInfoPresentFlag; |
---|
1493 | Int m_chromaSampleLocTypeTopField; |
---|
1494 | Int m_chromaSampleLocTypeBottomField; |
---|
1495 | Bool m_neutralChromaIndicationFlag; |
---|
1496 | Bool m_fieldSeqFlag; |
---|
1497 | Window m_defaultDisplayWindow; |
---|
1498 | Bool m_frameFieldInfoPresentFlag; |
---|
1499 | Bool m_hrdParametersPresentFlag; |
---|
1500 | Bool m_bitstreamRestrictionFlag; |
---|
1501 | Bool m_tilesFixedStructureFlag; |
---|
1502 | Bool m_motionVectorsOverPicBoundariesFlag; |
---|
1503 | Bool m_restrictedRefPicListsFlag; |
---|
1504 | Int m_minSpatialSegmentationIdc; |
---|
1505 | Int m_maxBytesPerPicDenom; |
---|
1506 | Int m_maxBitsPerMinCuDenom; |
---|
1507 | Int m_log2MaxMvLengthHorizontal; |
---|
1508 | Int m_log2MaxMvLengthVertical; |
---|
1509 | TComHRD m_hrdParameters; |
---|
1510 | TimingInfo m_timingInfo; |
---|
1511 | |
---|
1512 | public: |
---|
1513 | TComVUI() |
---|
1514 | :m_aspectRatioInfoPresentFlag(false) //TODO: This initialiser list contains magic numbers |
---|
1515 | ,m_aspectRatioIdc(0) |
---|
1516 | ,m_sarWidth(0) |
---|
1517 | ,m_sarHeight(0) |
---|
1518 | ,m_overscanInfoPresentFlag(false) |
---|
1519 | ,m_overscanAppropriateFlag(false) |
---|
1520 | ,m_videoSignalTypePresentFlag(false) |
---|
1521 | ,m_videoFormat(5) |
---|
1522 | ,m_videoFullRangeFlag(false) |
---|
1523 | ,m_colourDescriptionPresentFlag(false) |
---|
1524 | ,m_colourPrimaries(2) |
---|
1525 | ,m_transferCharacteristics(2) |
---|
1526 | ,m_matrixCoefficients(2) |
---|
1527 | ,m_chromaLocInfoPresentFlag(false) |
---|
1528 | ,m_chromaSampleLocTypeTopField(0) |
---|
1529 | ,m_chromaSampleLocTypeBottomField(0) |
---|
1530 | ,m_neutralChromaIndicationFlag(false) |
---|
1531 | ,m_fieldSeqFlag(false) |
---|
1532 | ,m_frameFieldInfoPresentFlag(false) |
---|
1533 | ,m_hrdParametersPresentFlag(false) |
---|
1534 | ,m_bitstreamRestrictionFlag(false) |
---|
1535 | ,m_tilesFixedStructureFlag(false) |
---|
1536 | ,m_motionVectorsOverPicBoundariesFlag(true) |
---|
1537 | ,m_restrictedRefPicListsFlag(1) |
---|
1538 | ,m_minSpatialSegmentationIdc(0) |
---|
1539 | ,m_maxBytesPerPicDenom(2) |
---|
1540 | ,m_maxBitsPerMinCuDenom(1) |
---|
1541 | ,m_log2MaxMvLengthHorizontal(15) |
---|
1542 | ,m_log2MaxMvLengthVertical(15) |
---|
1543 | {} |
---|
1544 | |
---|
1545 | virtual ~TComVUI() {} |
---|
1546 | |
---|
1547 | Bool getAspectRatioInfoPresentFlag() { return m_aspectRatioInfoPresentFlag; } |
---|
1548 | Void setAspectRatioInfoPresentFlag(Bool i) { m_aspectRatioInfoPresentFlag = i; } |
---|
1549 | |
---|
1550 | Int getAspectRatioIdc() { return m_aspectRatioIdc; } |
---|
1551 | Void setAspectRatioIdc(Int i) { m_aspectRatioIdc = i; } |
---|
1552 | |
---|
1553 | Int getSarWidth() { return m_sarWidth; } |
---|
1554 | Void setSarWidth(Int i) { m_sarWidth = i; } |
---|
1555 | |
---|
1556 | Int getSarHeight() { return m_sarHeight; } |
---|
1557 | Void setSarHeight(Int i) { m_sarHeight = i; } |
---|
1558 | |
---|
1559 | Bool getOverscanInfoPresentFlag() { return m_overscanInfoPresentFlag; } |
---|
1560 | Void setOverscanInfoPresentFlag(Bool i) { m_overscanInfoPresentFlag = i; } |
---|
1561 | |
---|
1562 | Bool getOverscanAppropriateFlag() { return m_overscanAppropriateFlag; } |
---|
1563 | Void setOverscanAppropriateFlag(Bool i) { m_overscanAppropriateFlag = i; } |
---|
1564 | |
---|
1565 | Bool getVideoSignalTypePresentFlag() { return m_videoSignalTypePresentFlag; } |
---|
1566 | Void setVideoSignalTypePresentFlag(Bool i) { m_videoSignalTypePresentFlag = i; } |
---|
1567 | |
---|
1568 | Int getVideoFormat() { return m_videoFormat; } |
---|
1569 | Void setVideoFormat(Int i) { m_videoFormat = i; } |
---|
1570 | |
---|
1571 | Bool getVideoFullRangeFlag() { return m_videoFullRangeFlag; } |
---|
1572 | Void setVideoFullRangeFlag(Bool i) { m_videoFullRangeFlag = i; } |
---|
1573 | |
---|
1574 | Bool getColourDescriptionPresentFlag() { return m_colourDescriptionPresentFlag; } |
---|
1575 | Void setColourDescriptionPresentFlag(Bool i) { m_colourDescriptionPresentFlag = i; } |
---|
1576 | |
---|
1577 | Int getColourPrimaries() { return m_colourPrimaries; } |
---|
1578 | Void setColourPrimaries(Int i) { m_colourPrimaries = i; } |
---|
1579 | |
---|
1580 | Int getTransferCharacteristics() { return m_transferCharacteristics; } |
---|
1581 | Void setTransferCharacteristics(Int i) { m_transferCharacteristics = i; } |
---|
1582 | |
---|
1583 | Int getMatrixCoefficients() { return m_matrixCoefficients; } |
---|
1584 | Void setMatrixCoefficients(Int i) { m_matrixCoefficients = i; } |
---|
1585 | |
---|
1586 | Bool getChromaLocInfoPresentFlag() { return m_chromaLocInfoPresentFlag; } |
---|
1587 | Void setChromaLocInfoPresentFlag(Bool i) { m_chromaLocInfoPresentFlag = i; } |
---|
1588 | |
---|
1589 | Int getChromaSampleLocTypeTopField() { return m_chromaSampleLocTypeTopField; } |
---|
1590 | Void setChromaSampleLocTypeTopField(Int i) { m_chromaSampleLocTypeTopField = i; } |
---|
1591 | |
---|
1592 | Int getChromaSampleLocTypeBottomField() { return m_chromaSampleLocTypeBottomField; } |
---|
1593 | Void setChromaSampleLocTypeBottomField(Int i) { m_chromaSampleLocTypeBottomField = i; } |
---|
1594 | |
---|
1595 | Bool getNeutralChromaIndicationFlag() { return m_neutralChromaIndicationFlag; } |
---|
1596 | Void setNeutralChromaIndicationFlag(Bool i) { m_neutralChromaIndicationFlag = i; } |
---|
1597 | |
---|
1598 | Bool getFieldSeqFlag() { return m_fieldSeqFlag; } |
---|
1599 | Void setFieldSeqFlag(Bool i) { m_fieldSeqFlag = i; } |
---|
1600 | |
---|
1601 | Bool getFrameFieldInfoPresentFlag() { return m_frameFieldInfoPresentFlag; } |
---|
1602 | Void setFrameFieldInfoPresentFlag(Bool i) { m_frameFieldInfoPresentFlag = i; } |
---|
1603 | |
---|
1604 | Window& getDefaultDisplayWindow() { return m_defaultDisplayWindow; } |
---|
1605 | Void setDefaultDisplayWindow(Window& defaultDisplayWindow ) { m_defaultDisplayWindow = defaultDisplayWindow; } |
---|
1606 | |
---|
1607 | Bool getHrdParametersPresentFlag() { return m_hrdParametersPresentFlag; } |
---|
1608 | Void setHrdParametersPresentFlag(Bool i) { m_hrdParametersPresentFlag = i; } |
---|
1609 | |
---|
1610 | Bool getBitstreamRestrictionFlag() { return m_bitstreamRestrictionFlag; } |
---|
1611 | Void setBitstreamRestrictionFlag(Bool i) { m_bitstreamRestrictionFlag = i; } |
---|
1612 | |
---|
1613 | Bool getTilesFixedStructureFlag() { return m_tilesFixedStructureFlag; } |
---|
1614 | Void setTilesFixedStructureFlag(Bool i) { m_tilesFixedStructureFlag = i; } |
---|
1615 | |
---|
1616 | Bool getMotionVectorsOverPicBoundariesFlag() { return m_motionVectorsOverPicBoundariesFlag; } |
---|
1617 | Void setMotionVectorsOverPicBoundariesFlag(Bool i) { m_motionVectorsOverPicBoundariesFlag = i; } |
---|
1618 | |
---|
1619 | Bool getRestrictedRefPicListsFlag() { return m_restrictedRefPicListsFlag; } |
---|
1620 | Void setRestrictedRefPicListsFlag(Bool b) { m_restrictedRefPicListsFlag = b; } |
---|
1621 | |
---|
1622 | Int getMinSpatialSegmentationIdc() { return m_minSpatialSegmentationIdc; } |
---|
1623 | Void setMinSpatialSegmentationIdc(Int i) { m_minSpatialSegmentationIdc = i; } |
---|
1624 | |
---|
1625 | Int getMaxBytesPerPicDenom() { return m_maxBytesPerPicDenom; } |
---|
1626 | Void setMaxBytesPerPicDenom(Int i) { m_maxBytesPerPicDenom = i; } |
---|
1627 | |
---|
1628 | Int getMaxBitsPerMinCuDenom() { return m_maxBitsPerMinCuDenom; } |
---|
1629 | Void setMaxBitsPerMinCuDenom(Int i) { m_maxBitsPerMinCuDenom = i; } |
---|
1630 | |
---|
1631 | Int getLog2MaxMvLengthHorizontal() { return m_log2MaxMvLengthHorizontal; } |
---|
1632 | Void setLog2MaxMvLengthHorizontal(Int i) { m_log2MaxMvLengthHorizontal = i; } |
---|
1633 | |
---|
1634 | Int getLog2MaxMvLengthVertical() { return m_log2MaxMvLengthVertical; } |
---|
1635 | Void setLog2MaxMvLengthVertical(Int i) { m_log2MaxMvLengthVertical = i; } |
---|
1636 | |
---|
1637 | TComHRD* getHrdParameters () { return &m_hrdParameters; } |
---|
1638 | |
---|
1639 | TimingInfo* getTimingInfo() { return &m_timingInfo; } |
---|
1640 | }; |
---|
1641 | |
---|
1642 | /// SPS class |
---|
1643 | class TComSPS |
---|
1644 | { |
---|
1645 | private: |
---|
1646 | Int m_SPSId; |
---|
1647 | Int m_VPSId; |
---|
1648 | ChromaFormat m_chromaFormatIdc; |
---|
1649 | |
---|
1650 | UInt m_uiMaxTLayers; // maximum number of temporal layers |
---|
1651 | |
---|
1652 | #if R0279_REP_FORMAT_INBL |
---|
1653 | Bool m_bV1CompatibleSPSFlag; |
---|
1654 | #endif |
---|
1655 | |
---|
1656 | // Structure |
---|
1657 | UInt m_picWidthInLumaSamples; |
---|
1658 | UInt m_picHeightInLumaSamples; |
---|
1659 | |
---|
1660 | Int m_log2MinCodingBlockSize; |
---|
1661 | Int m_log2DiffMaxMinCodingBlockSize; |
---|
1662 | UInt m_uiMaxCUWidth; |
---|
1663 | UInt m_uiMaxCUHeight; |
---|
1664 | UInt m_uiMaxCUDepth; |
---|
1665 | |
---|
1666 | Window m_conformanceWindow; |
---|
1667 | |
---|
1668 | TComRPSList m_RPSList; |
---|
1669 | Bool m_bLongTermRefsPresent; |
---|
1670 | Bool m_TMVPFlagsPresent; |
---|
1671 | Int m_numReorderPics[MAX_TLAYER]; |
---|
1672 | |
---|
1673 | // Tool list |
---|
1674 | UInt m_uiQuadtreeTULog2MaxSize; |
---|
1675 | UInt m_uiQuadtreeTULog2MinSize; |
---|
1676 | UInt m_uiQuadtreeTUMaxDepthInter; |
---|
1677 | UInt m_uiQuadtreeTUMaxDepthIntra; |
---|
1678 | Bool m_usePCM; |
---|
1679 | UInt m_pcmLog2MaxSize; |
---|
1680 | UInt m_uiPCMLog2MinSize; |
---|
1681 | Bool m_useAMP; |
---|
1682 | |
---|
1683 | // Parameter |
---|
1684 | Int m_uiBitDepth[MAX_NUM_CHANNEL_TYPE]; |
---|
1685 | Int m_qpBDOffset[MAX_NUM_CHANNEL_TYPE]; |
---|
1686 | Bool m_useExtendedPrecision; |
---|
1687 | Bool m_useHighPrecisionPredictionWeighting; |
---|
1688 | Bool m_useResidualRotation; |
---|
1689 | Bool m_useSingleSignificanceMapContext; |
---|
1690 | Bool m_useGolombRiceParameterAdaptation; |
---|
1691 | Bool m_alignCABACBeforeBypass; |
---|
1692 | Bool m_useResidualDPCM[NUMBER_OF_RDPCM_SIGNALLING_MODES]; |
---|
1693 | UInt m_uiPCMBitDepth[MAX_NUM_CHANNEL_TYPE]; |
---|
1694 | Bool m_bPCMFilterDisableFlag; |
---|
1695 | Bool m_disableIntraReferenceSmoothing; |
---|
1696 | |
---|
1697 | UInt m_uiBitsForPOC; |
---|
1698 | UInt m_numLongTermRefPicSPS; |
---|
1699 | UInt m_ltRefPicPocLsbSps[MAX_NUM_LONG_TERM_REF_PICS]; |
---|
1700 | Bool m_usedByCurrPicLtSPSFlag[MAX_NUM_LONG_TERM_REF_PICS]; |
---|
1701 | // Max physical transform size |
---|
1702 | UInt m_uiMaxTrSize; |
---|
1703 | |
---|
1704 | Int m_iAMPAcc[MAX_CU_DEPTH]; |
---|
1705 | Bool m_bUseSAO; |
---|
1706 | |
---|
1707 | Bool m_bTemporalIdNestingFlag; // temporal_id_nesting_flag |
---|
1708 | |
---|
1709 | Bool m_scalingListEnabledFlag; |
---|
1710 | Bool m_scalingListPresentFlag; |
---|
1711 | TComScalingList* m_scalingList; //!< ScalingList class pointer |
---|
1712 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
1713 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) |
---|
1714 | |
---|
1715 | Bool m_useDF; |
---|
1716 | Bool m_useStrongIntraSmoothing; |
---|
1717 | |
---|
1718 | Bool m_vuiParametersPresentFlag; |
---|
1719 | TComVUI m_vuiParameters; |
---|
1720 | |
---|
1721 | static const Int m_winUnitX[MAX_CHROMA_FORMAT_IDC+1]; |
---|
1722 | static const Int m_winUnitY[MAX_CHROMA_FORMAT_IDC+1]; |
---|
1723 | TComPTL m_pcPTL; |
---|
1724 | |
---|
1725 | #if O0043_BEST_EFFORT_DECODING |
---|
1726 | UInt m_forceDecodeBitDepth; // 0 = do not force the decoder's bit depth, other = force the decoder's bit depth to this value (best effort decoding) |
---|
1727 | #endif |
---|
1728 | |
---|
1729 | #if SVC_EXTENSION |
---|
1730 | UInt m_layerId; |
---|
1731 | Bool m_extensionFlag; |
---|
1732 | UInt m_numScaledRefLayerOffsets; |
---|
1733 | #if R0042_PROFILE_INDICATION |
---|
1734 | Int m_NumDirectRefLayers; |
---|
1735 | #endif |
---|
1736 | #if P0312_VERT_PHASE_ADJ |
---|
1737 | Bool m_vertPhasePositionEnableFlag[MAX_LAYERS]; |
---|
1738 | #endif |
---|
1739 | #if !MOVE_SCALED_OFFSET_TO_PPS |
---|
1740 | #if O0098_SCALED_REF_LAYER_ID |
---|
1741 | UInt m_scaledRefLayerId[MAX_LAYERS]; |
---|
1742 | #endif |
---|
1743 | Window m_scaledRefLayerWindow[MAX_LAYERS]; |
---|
1744 | #endif |
---|
1745 | #if REPN_FORMAT_IN_VPS |
---|
1746 | Bool m_updateRepFormatFlag; |
---|
1747 | #if O0096_REP_FORMAT_INDEX |
---|
1748 | UInt m_updateRepFormatIndex; |
---|
1749 | #endif |
---|
1750 | #endif |
---|
1751 | #if SCALINGLIST_INFERRING |
---|
1752 | Bool m_inferScalingListFlag; |
---|
1753 | UInt m_scalingListRefLayerId; |
---|
1754 | #endif |
---|
1755 | #endif //SVC_EXTENSION |
---|
1756 | |
---|
1757 | public: |
---|
1758 | TComSPS(); |
---|
1759 | virtual ~TComSPS(); |
---|
1760 | #if O0043_BEST_EFFORT_DECODING |
---|
1761 | Void setForceDecodeBitDepth(UInt bitDepth) { m_forceDecodeBitDepth = bitDepth; } |
---|
1762 | UInt getForceDecodeBitDepth() const { return m_forceDecodeBitDepth; } |
---|
1763 | #endif |
---|
1764 | |
---|
1765 | Int getVPSId () { return m_VPSId; } |
---|
1766 | Void setVPSId (Int i) { m_VPSId = i; } |
---|
1767 | Int getSPSId () { return m_SPSId; } |
---|
1768 | Void setSPSId (Int i) { m_SPSId = i; } |
---|
1769 | ChromaFormat getChromaFormatIdc () { return m_chromaFormatIdc; } |
---|
1770 | Void setChromaFormatIdc (ChromaFormat i) { m_chromaFormatIdc = i; } |
---|
1771 | |
---|
1772 | static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitX[chromaFormatIdc]; } |
---|
1773 | static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc]; } |
---|
1774 | |
---|
1775 | #if R0279_REP_FORMAT_INBL //These two functions shall be used / called when the syntax element sps_ext_or_max_sub_layers_minus1 and V1CompatibleSPSFlag are implemented |
---|
1776 | Bool getV1CompatibleSPSFlag() {return m_bV1CompatibleSPSFlag;} |
---|
1777 | Void setV1CompatibleSPSFlag(Bool x) { m_bV1CompatibleSPSFlag = x;} |
---|
1778 | #endif |
---|
1779 | |
---|
1780 | // structure |
---|
1781 | Void setPicWidthInLumaSamples ( UInt u ) { m_picWidthInLumaSamples = u; } |
---|
1782 | UInt getPicWidthInLumaSamples () { return m_picWidthInLumaSamples; } |
---|
1783 | Void setPicHeightInLumaSamples ( UInt u ) { m_picHeightInLumaSamples = u; } |
---|
1784 | UInt getPicHeightInLumaSamples () { return m_picHeightInLumaSamples; } |
---|
1785 | |
---|
1786 | Window& getConformanceWindow() { return m_conformanceWindow; } |
---|
1787 | Void setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; } |
---|
1788 | |
---|
1789 | UInt getNumLongTermRefPicSPS() { return m_numLongTermRefPicSPS; } |
---|
1790 | Void setNumLongTermRefPicSPS(UInt val) { m_numLongTermRefPicSPS = val; } |
---|
1791 | |
---|
1792 | UInt getLtRefPicPocLsbSps(UInt index) { assert( index < MAX_NUM_LONG_TERM_REF_PICS ); return m_ltRefPicPocLsbSps[index]; } |
---|
1793 | Void setLtRefPicPocLsbSps(UInt index, UInt val) { assert( index < MAX_NUM_LONG_TERM_REF_PICS ); m_ltRefPicPocLsbSps[index] = val; } |
---|
1794 | |
---|
1795 | Bool getUsedByCurrPicLtSPSFlag(Int i) { assert( i < MAX_NUM_LONG_TERM_REF_PICS ); return m_usedByCurrPicLtSPSFlag[i];} |
---|
1796 | Void setUsedByCurrPicLtSPSFlag(Int i, Bool x) { assert( i < MAX_NUM_LONG_TERM_REF_PICS ); m_usedByCurrPicLtSPSFlag[i] = x;} |
---|
1797 | |
---|
1798 | Int getLog2MinCodingBlockSize() const { return m_log2MinCodingBlockSize; } |
---|
1799 | Void setLog2MinCodingBlockSize(Int val) { m_log2MinCodingBlockSize = val; } |
---|
1800 | Int getLog2DiffMaxMinCodingBlockSize() const { return m_log2DiffMaxMinCodingBlockSize; } |
---|
1801 | Void setLog2DiffMaxMinCodingBlockSize(Int val) { m_log2DiffMaxMinCodingBlockSize = val; } |
---|
1802 | |
---|
1803 | Void setMaxCUWidth ( UInt u ) { m_uiMaxCUWidth = u; } |
---|
1804 | UInt getMaxCUWidth () { return m_uiMaxCUWidth; } |
---|
1805 | Void setMaxCUHeight ( UInt u ) { m_uiMaxCUHeight = u; } |
---|
1806 | UInt getMaxCUHeight () { return m_uiMaxCUHeight; } |
---|
1807 | Void setMaxCUDepth ( UInt u ) { m_uiMaxCUDepth = u; } |
---|
1808 | UInt getMaxCUDepth () { return m_uiMaxCUDepth; } |
---|
1809 | Void setUsePCM ( Bool b ) { m_usePCM = b; } |
---|
1810 | Bool getUsePCM () { return m_usePCM; } |
---|
1811 | Void setPCMLog2MaxSize ( UInt u ) { m_pcmLog2MaxSize = u; } |
---|
1812 | UInt getPCMLog2MaxSize () { return m_pcmLog2MaxSize; } |
---|
1813 | Void setPCMLog2MinSize ( UInt u ) { m_uiPCMLog2MinSize = u; } |
---|
1814 | UInt getPCMLog2MinSize () { return m_uiPCMLog2MinSize; } |
---|
1815 | Void setBitsForPOC ( UInt u ) { m_uiBitsForPOC = u; } |
---|
1816 | UInt getBitsForPOC () { return m_uiBitsForPOC; } |
---|
1817 | Bool getUseAMP() { return m_useAMP; } |
---|
1818 | Void setUseAMP( Bool b ) { m_useAMP = b; } |
---|
1819 | Void setQuadtreeTULog2MaxSize( UInt u ) { m_uiQuadtreeTULog2MaxSize = u; } |
---|
1820 | UInt getQuadtreeTULog2MaxSize() { return m_uiQuadtreeTULog2MaxSize; } |
---|
1821 | Void setQuadtreeTULog2MinSize( UInt u ) { m_uiQuadtreeTULog2MinSize = u; } |
---|
1822 | UInt getQuadtreeTULog2MinSize() { return m_uiQuadtreeTULog2MinSize; } |
---|
1823 | Void setQuadtreeTUMaxDepthInter( UInt u ) { m_uiQuadtreeTUMaxDepthInter = u; } |
---|
1824 | Void setQuadtreeTUMaxDepthIntra( UInt u ) { m_uiQuadtreeTUMaxDepthIntra = u; } |
---|
1825 | UInt getQuadtreeTUMaxDepthInter() { return m_uiQuadtreeTUMaxDepthInter; } |
---|
1826 | UInt getQuadtreeTUMaxDepthIntra() { return m_uiQuadtreeTUMaxDepthIntra; } |
---|
1827 | Void setNumReorderPics(Int i, UInt tlayer) { m_numReorderPics[tlayer] = i; } |
---|
1828 | Int getNumReorderPics(UInt tlayer) { return m_numReorderPics[tlayer]; } |
---|
1829 | Void createRPSList( Int numRPS ); |
---|
1830 | TComRPSList* getRPSList() { return &m_RPSList; } |
---|
1831 | Bool getLongTermRefsPresent() { return m_bLongTermRefsPresent; } |
---|
1832 | Void setLongTermRefsPresent(Bool b) { m_bLongTermRefsPresent=b; } |
---|
1833 | Bool getTMVPFlagsPresent() { return m_TMVPFlagsPresent; } |
---|
1834 | Void setTMVPFlagsPresent(Bool b) { m_TMVPFlagsPresent=b; } |
---|
1835 | // physical transform |
---|
1836 | Void setMaxTrSize ( UInt u ) { m_uiMaxTrSize = u; } |
---|
1837 | UInt getMaxTrSize () { return m_uiMaxTrSize; } |
---|
1838 | |
---|
1839 | // AMP accuracy |
---|
1840 | Int getAMPAcc ( UInt uiDepth ) { return m_iAMPAcc[uiDepth]; } |
---|
1841 | Void setAMPAcc ( UInt uiDepth, Int iAccu ) { assert( uiDepth < g_uiMaxCUDepth); m_iAMPAcc[uiDepth] = iAccu; } |
---|
1842 | |
---|
1843 | // Bit-depth |
---|
1844 | Int getBitDepth (ChannelType type) { return m_uiBitDepth[type]; } |
---|
1845 | Void setBitDepth (ChannelType type, Int u ) { m_uiBitDepth[type] = u; } |
---|
1846 | Int getDifferentialLumaChromaBitDepth() const { return Int(m_uiBitDepth[CHANNEL_TYPE_LUMA]) - Int(m_uiBitDepth[CHANNEL_TYPE_CHROMA]); } |
---|
1847 | Int getQpBDOffset (ChannelType type) const { return m_qpBDOffset[type]; } |
---|
1848 | Void setQpBDOffset (ChannelType type, Int i) { m_qpBDOffset[type] = i; } |
---|
1849 | Bool getUseExtendedPrecision() const { return m_useExtendedPrecision; } |
---|
1850 | Void setUseExtendedPrecision(Bool value) { m_useExtendedPrecision = value; } |
---|
1851 | Bool getUseHighPrecisionPredictionWeighting() const { return m_useHighPrecisionPredictionWeighting; } |
---|
1852 | Void setUseHighPrecisionPredictionWeighting(Bool value) { m_useHighPrecisionPredictionWeighting = value; } |
---|
1853 | |
---|
1854 | Void setUseSAO (Bool bVal) {m_bUseSAO = bVal;} |
---|
1855 | Bool getUseSAO () {return m_bUseSAO;} |
---|
1856 | |
---|
1857 | Bool getUseResidualRotation () const { return m_useResidualRotation; } |
---|
1858 | Void setUseResidualRotation (const Bool value) { m_useResidualRotation = value; } |
---|
1859 | |
---|
1860 | Bool getUseSingleSignificanceMapContext() const { return m_useSingleSignificanceMapContext; } |
---|
1861 | Void setUseSingleSignificanceMapContext(const Bool value) { m_useSingleSignificanceMapContext = value; } |
---|
1862 | |
---|
1863 | Bool getUseGolombRiceParameterAdaptation() const { return m_useGolombRiceParameterAdaptation; } |
---|
1864 | Void setUseGolombRiceParameterAdaptation(const Bool value) { m_useGolombRiceParameterAdaptation = value; } |
---|
1865 | |
---|
1866 | Bool getAlignCABACBeforeBypass () const { return m_alignCABACBeforeBypass; } |
---|
1867 | Void setAlignCABACBeforeBypass (const Bool value) { m_alignCABACBeforeBypass = value; } |
---|
1868 | |
---|
1869 | Bool getUseResidualDPCM (const RDPCMSignallingMode signallingMode) const { return m_useResidualDPCM[signallingMode]; } |
---|
1870 | Void setUseResidualDPCM (const RDPCMSignallingMode signallingMode, const Bool value) { m_useResidualDPCM[signallingMode] = value; } |
---|
1871 | |
---|
1872 | UInt getMaxTLayers() { return m_uiMaxTLayers; } |
---|
1873 | Void setMaxTLayers( UInt uiMaxTLayers ) { assert( uiMaxTLayers <= MAX_TLAYER ); m_uiMaxTLayers = uiMaxTLayers; } |
---|
1874 | |
---|
1875 | Bool getTemporalIdNestingFlag() { return m_bTemporalIdNestingFlag; } |
---|
1876 | Void setTemporalIdNestingFlag( Bool bValue ) { m_bTemporalIdNestingFlag = bValue; } |
---|
1877 | UInt getPCMBitDepth (ChannelType type) const { return m_uiPCMBitDepth[type]; } |
---|
1878 | Void setPCMBitDepth (ChannelType type, UInt u) { m_uiPCMBitDepth[type] = u; } |
---|
1879 | Void setPCMFilterDisableFlag ( Bool bValue ) { m_bPCMFilterDisableFlag = bValue; } |
---|
1880 | Bool getPCMFilterDisableFlag () { return m_bPCMFilterDisableFlag; } |
---|
1881 | Void setDisableIntraReferenceSmoothing (Bool bValue) { m_disableIntraReferenceSmoothing=bValue; } |
---|
1882 | Bool getDisableIntraReferenceSmoothing () const { return m_disableIntraReferenceSmoothing; } |
---|
1883 | |
---|
1884 | Bool getScalingListFlag () { return m_scalingListEnabledFlag; } |
---|
1885 | Void setScalingListFlag ( Bool b ) { m_scalingListEnabledFlag = b; } |
---|
1886 | Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } |
---|
1887 | Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } |
---|
1888 | |
---|
1889 | #if SCALINGLIST_INFERRING |
---|
1890 | Void setScalingList( TComScalingList *scalingList ) { m_scalingList = scalingList; } |
---|
1891 | #else |
---|
1892 | Void setScalingList ( TComScalingList *scalingList); |
---|
1893 | #endif |
---|
1894 | TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in SPS |
---|
1895 | UInt getMaxDecPicBuffering (UInt tlayer) { return m_uiMaxDecPicBuffering[tlayer]; } |
---|
1896 | Void setMaxDecPicBuffering ( UInt ui, UInt tlayer ) { assert(tlayer < MAX_TLAYER); m_uiMaxDecPicBuffering[tlayer] = ui; } |
---|
1897 | UInt getMaxLatencyIncrease (UInt tlayer) { return m_uiMaxLatencyIncrease[tlayer]; } |
---|
1898 | Void setMaxLatencyIncrease ( UInt ui , UInt tlayer) { m_uiMaxLatencyIncrease[tlayer] = ui; } |
---|
1899 | |
---|
1900 | Void setUseStrongIntraSmoothing (Bool bVal) {m_useStrongIntraSmoothing = bVal;} |
---|
1901 | Bool getUseStrongIntraSmoothing () {return m_useStrongIntraSmoothing;} |
---|
1902 | |
---|
1903 | Bool getVuiParametersPresentFlag() { return m_vuiParametersPresentFlag; } |
---|
1904 | Void setVuiParametersPresentFlag(Bool b) { m_vuiParametersPresentFlag = b; } |
---|
1905 | TComVUI* getVuiParameters() { return &m_vuiParameters; } |
---|
1906 | Void setHrdParameters( UInt frameRate, UInt numDU, UInt bitRate, Bool randomAccess ); |
---|
1907 | |
---|
1908 | TComPTL* getPTL() { return &m_pcPTL; } |
---|
1909 | |
---|
1910 | #if SVC_EXTENSION |
---|
1911 | Void setLayerId(UInt layerId) { m_layerId = layerId; } |
---|
1912 | UInt getLayerId() { return m_layerId; } |
---|
1913 | Int getExtensionFlag() { return m_extensionFlag; } |
---|
1914 | Void setExtensionFlag(Int n) { m_extensionFlag = n; } |
---|
1915 | #if R0042_PROFILE_INDICATION |
---|
1916 | Int getNumDirectRefLayers() { return m_NumDirectRefLayers; } |
---|
1917 | Void setNumDirectRefLayers(Int n) { m_NumDirectRefLayers = n; } |
---|
1918 | #endif |
---|
1919 | #if !MOVE_SCALED_OFFSET_TO_PPS |
---|
1920 | UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } |
---|
1921 | Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } |
---|
1922 | #if P0312_VERT_PHASE_ADJ |
---|
1923 | Bool getVertPhasePositionEnableFlag(Int x) { return m_vertPhasePositionEnableFlag[x]; } |
---|
1924 | Void setVertPhasePositionEnableFlag(Int x, Bool b) { m_vertPhasePositionEnableFlag[x] = b; } |
---|
1925 | #endif |
---|
1926 | #if O0098_SCALED_REF_LAYER_ID |
---|
1927 | UInt getScaledRefLayerId(Int x) { return m_scaledRefLayerId[x]; } |
---|
1928 | Void setScaledRefLayerId(Int x, UInt id) { m_scaledRefLayerId[x] = id; } |
---|
1929 | Window& getScaledRefLayerWindowForLayer( Int layerId ); |
---|
1930 | #endif |
---|
1931 | Window& getScaledRefLayerWindow( Int x ) { return m_scaledRefLayerWindow[x]; } |
---|
1932 | #endif |
---|
1933 | #if REPN_FORMAT_IN_VPS |
---|
1934 | Bool getUpdateRepFormatFlag() { return m_updateRepFormatFlag; } |
---|
1935 | Void setUpdateRepFormatFlag(Bool x) { m_updateRepFormatFlag = x; } |
---|
1936 | #if O0096_REP_FORMAT_INDEX |
---|
1937 | Int getUpdateRepFormatIndex() { return m_updateRepFormatIndex; } |
---|
1938 | Void setUpdateRepFormatIndex(UInt index) { m_updateRepFormatIndex = index; } |
---|
1939 | #endif |
---|
1940 | #endif |
---|
1941 | #if SCALINGLIST_INFERRING |
---|
1942 | Bool getInferScalingListFlag() { return m_inferScalingListFlag; } |
---|
1943 | UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; } |
---|
1944 | Void setInferScalingListFlag( Bool flag ) { m_inferScalingListFlag = flag; } |
---|
1945 | Void setScalingListRefLayerId( UInt layerId ) { m_scalingListRefLayerId = layerId; } |
---|
1946 | #endif |
---|
1947 | #endif //SVC_EXTENSION |
---|
1948 | }; |
---|
1949 | |
---|
1950 | /// Reference Picture Lists class |
---|
1951 | |
---|
1952 | class TComRefPicListModification |
---|
1953 | { |
---|
1954 | private: |
---|
1955 | UInt m_bRefPicListModificationFlagL0; |
---|
1956 | UInt m_bRefPicListModificationFlagL1; |
---|
1957 | UInt m_RefPicSetIdxL0[REF_PIC_LIST_NUM_IDX]; |
---|
1958 | UInt m_RefPicSetIdxL1[REF_PIC_LIST_NUM_IDX]; |
---|
1959 | |
---|
1960 | public: |
---|
1961 | TComRefPicListModification(); |
---|
1962 | virtual ~TComRefPicListModification(); |
---|
1963 | |
---|
1964 | Void create (); |
---|
1965 | Void destroy (); |
---|
1966 | |
---|
1967 | Bool getRefPicListModificationFlagL0() { return m_bRefPicListModificationFlagL0; } |
---|
1968 | Void setRefPicListModificationFlagL0(Bool flag) { m_bRefPicListModificationFlagL0 = flag; } |
---|
1969 | Bool getRefPicListModificationFlagL1() { return m_bRefPicListModificationFlagL1; } |
---|
1970 | Void setRefPicListModificationFlagL1(Bool flag) { m_bRefPicListModificationFlagL1 = flag; } |
---|
1971 | Void setRefPicSetIdxL0(UInt idx, UInt refPicSetIdx) { assert(idx<REF_PIC_LIST_NUM_IDX); m_RefPicSetIdxL0[idx] = refPicSetIdx; } |
---|
1972 | UInt getRefPicSetIdxL0(UInt idx) { assert(idx<REF_PIC_LIST_NUM_IDX); return m_RefPicSetIdxL0[idx]; } |
---|
1973 | Void setRefPicSetIdxL1(UInt idx, UInt refPicSetIdx) { assert(idx<REF_PIC_LIST_NUM_IDX); m_RefPicSetIdxL1[idx] = refPicSetIdx; } |
---|
1974 | UInt getRefPicSetIdxL1(UInt idx) { assert(idx<REF_PIC_LIST_NUM_IDX); return m_RefPicSetIdxL1[idx]; } |
---|
1975 | }; |
---|
1976 | |
---|
1977 | /// PPS class |
---|
1978 | class TComPPS |
---|
1979 | { |
---|
1980 | private: |
---|
1981 | Int m_PPSId; // pic_parameter_set_id |
---|
1982 | Int m_SPSId; // seq_parameter_set_id |
---|
1983 | Int m_picInitQPMinus26; |
---|
1984 | Bool m_useDQP; |
---|
1985 | Bool m_bConstrainedIntraPred; // constrained_intra_pred_flag |
---|
1986 | Bool m_bSliceChromaQpFlag; // slicelevel_chroma_qp_flag |
---|
1987 | |
---|
1988 | // access channel |
---|
1989 | TComSPS* m_pcSPS; |
---|
1990 | UInt m_uiMaxCuDQPDepth; |
---|
1991 | UInt m_uiMinCuDQPSize; |
---|
1992 | |
---|
1993 | /* Chroma QP Adjustments*/ |
---|
1994 | Int m_MaxCuChromaQpAdjDepth; |
---|
1995 | Int m_MinCuChromaQpAdjSize; |
---|
1996 | Int m_ChromaQpAdjTableSize; |
---|
1997 | ChromaQpAdj m_ChromaQpAdjTable[7]; |
---|
1998 | |
---|
1999 | Int m_chromaCbQpOffset; |
---|
2000 | Int m_chromaCrQpOffset; |
---|
2001 | |
---|
2002 | UInt m_numRefIdxL0DefaultActive; |
---|
2003 | UInt m_numRefIdxL1DefaultActive; |
---|
2004 | |
---|
2005 | Bool m_bUseWeightPred; // Use of Weighting Prediction (P_SLICE) |
---|
2006 | Bool m_useWeightedBiPred; // Use of Weighting Bi-Prediction (B_SLICE) |
---|
2007 | Bool m_OutputFlagPresentFlag; // Indicates the presence of output_flag in slice header |
---|
2008 | Bool m_useCrossComponentPrediction; |
---|
2009 | UInt m_saoOffsetBitShift[MAX_NUM_CHANNEL_TYPE]; |
---|
2010 | Bool m_TransquantBypassEnableFlag; // Indicates presence of cu_transquant_bypass_flag in CUs. |
---|
2011 | Bool m_useTransformSkip; |
---|
2012 | Int m_transformSkipLog2MaxSize; |
---|
2013 | Bool m_dependentSliceSegmentsEnabledFlag; //!< Indicates the presence of dependent slices |
---|
2014 | Bool m_tilesEnabledFlag; //!< Indicates the presence of tiles |
---|
2015 | Bool m_entropyCodingSyncEnabledFlag; //!< Indicates the presence of wavefronts |
---|
2016 | |
---|
2017 | Bool m_loopFilterAcrossTilesEnabledFlag; |
---|
2018 | Bool m_uniformSpacingFlag; |
---|
2019 | Int m_numTileColumnsMinus1; |
---|
2020 | Int m_numTileRowsMinus1; |
---|
2021 | std::vector<Int> m_tileColumnWidth; |
---|
2022 | std::vector<Int> m_tileRowHeight; |
---|
2023 | |
---|
2024 | Int m_numSubstreams; |
---|
2025 | |
---|
2026 | Int m_signHideFlag; |
---|
2027 | |
---|
2028 | Bool m_cabacInitPresentFlag; |
---|
2029 | UInt m_encCABACTableIdx; // Used to transmit table selection across slices |
---|
2030 | |
---|
2031 | Bool m_sliceHeaderExtensionPresentFlag; |
---|
2032 | Bool m_loopFilterAcrossSlicesEnabledFlag; |
---|
2033 | Bool m_deblockingFilterControlPresentFlag; |
---|
2034 | Bool m_deblockingFilterOverrideEnabledFlag; |
---|
2035 | Bool m_picDisableDeblockingFilterFlag; |
---|
2036 | Int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
2037 | Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
2038 | Bool m_scalingListPresentFlag; |
---|
2039 | TComScalingList* m_scalingList; //!< ScalingList class pointer |
---|
2040 | Bool m_listsModificationPresentFlag; |
---|
2041 | UInt m_log2ParallelMergeLevelMinus2; |
---|
2042 | Int m_numExtraSliceHeaderBits; |
---|
2043 | |
---|
2044 | #if SVC_EXTENSION |
---|
2045 | Bool m_extensionFlag; |
---|
2046 | #if SCALINGLIST_INFERRING |
---|
2047 | UInt m_layerId; |
---|
2048 | Bool m_inferScalingListFlag; |
---|
2049 | UInt m_scalingListRefLayerId; |
---|
2050 | #endif |
---|
2051 | #if POC_RESET_IDC |
---|
2052 | Bool m_pocResetInfoPresentFlag; |
---|
2053 | #endif |
---|
2054 | #if MOVE_SCALED_OFFSET_TO_PPS |
---|
2055 | UInt m_numRefLayerLocationOffsets; |
---|
2056 | #if O0098_SCALED_REF_LAYER_ID |
---|
2057 | UInt m_refLocationOffsetLayerId[MAX_LAYERS]; |
---|
2058 | #endif |
---|
2059 | Window m_scaledRefLayerWindow[MAX_LAYERS]; |
---|
2060 | #if REF_REGION_OFFSET |
---|
2061 | Window m_refLayerWindow[MAX_LAYERS]; |
---|
2062 | Bool m_scaledRefLayerOffsetPresentFlag[MAX_LAYERS]; |
---|
2063 | Bool m_refRegionOffsetPresentFlag[MAX_LAYERS]; |
---|
2064 | #endif |
---|
2065 | #if R0209_GENERIC_PHASE |
---|
2066 | Int m_phaseHorLuma[MAX_LAYERS]; |
---|
2067 | Int m_phaseVerLuma[MAX_LAYERS]; |
---|
2068 | Int m_phaseHorChroma[MAX_LAYERS]; |
---|
2069 | Int m_phaseVerChroma[MAX_LAYERS]; |
---|
2070 | Bool m_resamplePhaseSetPresentFlag[MAX_LAYERS]; |
---|
2071 | #endif |
---|
2072 | #endif |
---|
2073 | #if Q0048_CGS_3D_ASYMLUT |
---|
2074 | Int m_nCGSFlag; |
---|
2075 | Int m_nCGSOutputBitDepthY; // not for syntax |
---|
2076 | Int m_nCGSOutputBitDepthC; // not for syntax |
---|
2077 | #endif |
---|
2078 | #endif |
---|
2079 | |
---|
2080 | public: |
---|
2081 | TComPPS(); |
---|
2082 | virtual ~TComPPS(); |
---|
2083 | |
---|
2084 | Int getPPSId () { return m_PPSId; } |
---|
2085 | Void setPPSId (Int i) { m_PPSId = i; } |
---|
2086 | Int getSPSId () { return m_SPSId; } |
---|
2087 | Void setSPSId (Int i) { m_SPSId = i; } |
---|
2088 | |
---|
2089 | Int getPicInitQPMinus26 () { return m_picInitQPMinus26; } |
---|
2090 | Void setPicInitQPMinus26 ( Int i ) { m_picInitQPMinus26 = i; } |
---|
2091 | Bool getUseDQP () { return m_useDQP; } |
---|
2092 | Void setUseDQP ( Bool b ) { m_useDQP = b; } |
---|
2093 | Bool getConstrainedIntraPred () { return m_bConstrainedIntraPred; } |
---|
2094 | Void setConstrainedIntraPred ( Bool b ) { m_bConstrainedIntraPred = b; } |
---|
2095 | Bool getSliceChromaQpFlag () { return m_bSliceChromaQpFlag; } |
---|
2096 | Void setSliceChromaQpFlag ( Bool b ) { m_bSliceChromaQpFlag = b; } |
---|
2097 | |
---|
2098 | Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
2099 | TComSPS* getSPS () { return m_pcSPS; } |
---|
2100 | Void setMaxCuDQPDepth ( UInt u ) { m_uiMaxCuDQPDepth = u; } |
---|
2101 | UInt getMaxCuDQPDepth () { return m_uiMaxCuDQPDepth;} |
---|
2102 | Void setMinCuDQPSize ( UInt u ) { m_uiMinCuDQPSize = u; } |
---|
2103 | UInt getMinCuDQPSize () { return m_uiMinCuDQPSize; } |
---|
2104 | |
---|
2105 | Void setQpOffset(ComponentID compID, Int i ) { if (compID==COMPONENT_Cb) m_chromaCbQpOffset = i; else if (compID==COMPONENT_Cr) m_chromaCrQpOffset = i; else assert(0); } |
---|
2106 | Int getQpOffset(ComponentID compID) const { return (compID==COMPONENT_Y) ? 0 : (compID==COMPONENT_Cb ? m_chromaCbQpOffset : m_chromaCrQpOffset ); } |
---|
2107 | |
---|
2108 | Void setMaxCuChromaQpAdjDepth ( UInt u ) { m_MaxCuChromaQpAdjDepth = u; } |
---|
2109 | UInt getMaxCuChromaQpAdjDepth () { return m_MaxCuChromaQpAdjDepth; } |
---|
2110 | Void setMinCuChromaQpAdjSize ( UInt u ) { m_MinCuChromaQpAdjSize = u; } |
---|
2111 | UInt getMinCuChromaQpAdjSize () { return m_MinCuChromaQpAdjSize; } |
---|
2112 | Void clearChromaQpAdjTable() { m_ChromaQpAdjTableSize = 0; } |
---|
2113 | Int getChromaQpAdjTableSize() { return m_ChromaQpAdjTableSize; } |
---|
2114 | const ChromaQpAdj& getChromaQpAdjTableAt( Int idx ) const { return m_ChromaQpAdjTable[idx]; } |
---|
2115 | Void setChromaQpAdjTableAt( Int idx, Int cbOffset, Int crOffset ) |
---|
2116 | { |
---|
2117 | m_ChromaQpAdjTable[idx].u.comp.CbOffset = cbOffset; |
---|
2118 | m_ChromaQpAdjTable[idx].u.comp.CrOffset = crOffset; |
---|
2119 | m_ChromaQpAdjTableSize = max(m_ChromaQpAdjTableSize, idx); |
---|
2120 | } |
---|
2121 | |
---|
2122 | Void setNumRefIdxL0DefaultActive(UInt ui) { m_numRefIdxL0DefaultActive=ui; } |
---|
2123 | UInt getNumRefIdxL0DefaultActive() { return m_numRefIdxL0DefaultActive; } |
---|
2124 | Void setNumRefIdxL1DefaultActive(UInt ui) { m_numRefIdxL1DefaultActive=ui; } |
---|
2125 | UInt getNumRefIdxL1DefaultActive() { return m_numRefIdxL1DefaultActive; } |
---|
2126 | |
---|
2127 | Bool getUseWP () { return m_bUseWeightPred; } |
---|
2128 | Bool getWPBiPred () { return m_useWeightedBiPred; } |
---|
2129 | Void setUseWP ( Bool b ) { m_bUseWeightPred = b; } |
---|
2130 | Void setWPBiPred ( Bool b ) { m_useWeightedBiPred = b; } |
---|
2131 | |
---|
2132 | Bool getUseCrossComponentPrediction() const { return m_useCrossComponentPrediction; } |
---|
2133 | Void setUseCrossComponentPrediction(Bool value) { m_useCrossComponentPrediction = value; } |
---|
2134 | |
---|
2135 | UInt getSaoOffsetBitShift(ChannelType type) const { return m_saoOffsetBitShift[type]; } |
---|
2136 | Void setSaoOffsetBitShift(ChannelType type, UInt uiBitShift) { m_saoOffsetBitShift[type] = uiBitShift; } |
---|
2137 | |
---|
2138 | Void setOutputFlagPresentFlag( Bool b ) { m_OutputFlagPresentFlag = b; } |
---|
2139 | Bool getOutputFlagPresentFlag() { return m_OutputFlagPresentFlag; } |
---|
2140 | Void setTransquantBypassEnableFlag( Bool b ) { m_TransquantBypassEnableFlag = b; } |
---|
2141 | Bool getTransquantBypassEnableFlag() { return m_TransquantBypassEnableFlag; } |
---|
2142 | |
---|
2143 | Bool getUseTransformSkip () { return m_useTransformSkip; } |
---|
2144 | Void setUseTransformSkip ( Bool b ) { m_useTransformSkip = b; } |
---|
2145 | UInt getTransformSkipLog2MaxSize () { return m_transformSkipLog2MaxSize; } |
---|
2146 | Void setTransformSkipLog2MaxSize ( UInt u ) { m_transformSkipLog2MaxSize = u; } |
---|
2147 | |
---|
2148 | Void setLoopFilterAcrossTilesEnabledFlag (Bool b) { m_loopFilterAcrossTilesEnabledFlag = b; } |
---|
2149 | Bool getLoopFilterAcrossTilesEnabledFlag () { return m_loopFilterAcrossTilesEnabledFlag; } |
---|
2150 | Bool getDependentSliceSegmentsEnabledFlag() const { return m_dependentSliceSegmentsEnabledFlag; } |
---|
2151 | Void setDependentSliceSegmentsEnabledFlag(Bool val) { m_dependentSliceSegmentsEnabledFlag = val; } |
---|
2152 | Bool getEntropyCodingSyncEnabledFlag() const { return m_entropyCodingSyncEnabledFlag; } |
---|
2153 | Void setEntropyCodingSyncEnabledFlag(Bool val) { m_entropyCodingSyncEnabledFlag = val; } |
---|
2154 | |
---|
2155 | Void setTilesEnabledFlag (Bool val) { m_tilesEnabledFlag = val; } |
---|
2156 | Bool getTilesEnabledFlag () const { return m_tilesEnabledFlag; } |
---|
2157 | Void setTileUniformSpacingFlag (Bool b) { m_uniformSpacingFlag = b; } |
---|
2158 | Bool getTileUniformSpacingFlag () const { return m_uniformSpacingFlag; } |
---|
2159 | Void setNumTileColumnsMinus1 (Int i) { m_numTileColumnsMinus1 = i; } |
---|
2160 | Int getNumTileColumnsMinus1 () const { return m_numTileColumnsMinus1; } |
---|
2161 | Void setTileColumnWidth (const std::vector<Int>& columnWidth ) { m_tileColumnWidth = columnWidth; } |
---|
2162 | UInt getTileColumnWidth (UInt columnIdx) const { return m_tileColumnWidth[columnIdx]; } |
---|
2163 | Void setNumTileRowsMinus1 (Int i) { m_numTileRowsMinus1 = i; } |
---|
2164 | Int getNumTileRowsMinus1 () const { return m_numTileRowsMinus1; } |
---|
2165 | Void setTileRowHeight (const std::vector<Int>& rowHeight) { m_tileRowHeight = rowHeight; } |
---|
2166 | UInt getTileRowHeight (UInt rowIdx) const { return m_tileRowHeight[rowIdx]; } |
---|
2167 | |
---|
2168 | Void setNumSubstreams (Int numSubstreams) { m_numSubstreams = numSubstreams; } |
---|
2169 | Int getNumSubstreams () { return m_numSubstreams; } |
---|
2170 | |
---|
2171 | Void setSignHideFlag( Int signHideFlag ) { m_signHideFlag = signHideFlag; } |
---|
2172 | Int getSignHideFlag() { return m_signHideFlag; } |
---|
2173 | |
---|
2174 | Void setCabacInitPresentFlag( Bool flag ) { m_cabacInitPresentFlag = flag; } |
---|
2175 | Void setEncCABACTableIdx( Int idx ) { m_encCABACTableIdx = idx; } |
---|
2176 | Bool getCabacInitPresentFlag() { return m_cabacInitPresentFlag; } |
---|
2177 | UInt getEncCABACTableIdx() { return m_encCABACTableIdx; } |
---|
2178 | Void setDeblockingFilterControlPresentFlag( Bool val ) { m_deblockingFilterControlPresentFlag = val; } |
---|
2179 | Bool getDeblockingFilterControlPresentFlag() { return m_deblockingFilterControlPresentFlag; } |
---|
2180 | Void setDeblockingFilterOverrideEnabledFlag( Bool val ) { m_deblockingFilterOverrideEnabledFlag = val; } |
---|
2181 | Bool getDeblockingFilterOverrideEnabledFlag() { return m_deblockingFilterOverrideEnabledFlag; } |
---|
2182 | Void setPicDisableDeblockingFilterFlag(Bool val) { m_picDisableDeblockingFilterFlag = val; } //!< set offset for deblocking filter disabled |
---|
2183 | Bool getPicDisableDeblockingFilterFlag() { return m_picDisableDeblockingFilterFlag; } //!< get offset for deblocking filter disabled |
---|
2184 | Void setDeblockingFilterBetaOffsetDiv2(Int val) { m_deblockingFilterBetaOffsetDiv2 = val; } //!< set beta offset for deblocking filter |
---|
2185 | Int getDeblockingFilterBetaOffsetDiv2() { return m_deblockingFilterBetaOffsetDiv2; } //!< get beta offset for deblocking filter |
---|
2186 | Void setDeblockingFilterTcOffsetDiv2(Int val) { m_deblockingFilterTcOffsetDiv2 = val; } //!< set tc offset for deblocking filter |
---|
2187 | Int getDeblockingFilterTcOffsetDiv2() { return m_deblockingFilterTcOffsetDiv2; } //!< get tc offset for deblocking filter |
---|
2188 | Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } |
---|
2189 | Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } |
---|
2190 | |
---|
2191 | #if SCALINGLIST_INFERRING |
---|
2192 | Void setScalingList( TComScalingList *scalingList ) { m_scalingList = scalingList; } |
---|
2193 | #else |
---|
2194 | Void setScalingList ( TComScalingList *scalingList); |
---|
2195 | #endif |
---|
2196 | TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in PPS |
---|
2197 | Bool getListsModificationPresentFlag () { return m_listsModificationPresentFlag; } |
---|
2198 | Void setListsModificationPresentFlag ( Bool b ) { m_listsModificationPresentFlag = b; } |
---|
2199 | UInt getLog2ParallelMergeLevelMinus2 () { return m_log2ParallelMergeLevelMinus2; } |
---|
2200 | Void setLog2ParallelMergeLevelMinus2 (UInt mrgLevel) { m_log2ParallelMergeLevelMinus2 = mrgLevel; } |
---|
2201 | Int getNumExtraSliceHeaderBits() { return m_numExtraSliceHeaderBits; } |
---|
2202 | Void setNumExtraSliceHeaderBits(Int i) { m_numExtraSliceHeaderBits = i; } |
---|
2203 | Void setLoopFilterAcrossSlicesEnabledFlag ( Bool bValue ) { m_loopFilterAcrossSlicesEnabledFlag = bValue; } |
---|
2204 | Bool getLoopFilterAcrossSlicesEnabledFlag () { return m_loopFilterAcrossSlicesEnabledFlag; } |
---|
2205 | Bool getSliceHeaderExtensionPresentFlag () { return m_sliceHeaderExtensionPresentFlag; } |
---|
2206 | Void setSliceHeaderExtensionPresentFlag (Bool val) { m_sliceHeaderExtensionPresentFlag = val; } |
---|
2207 | #if SVC_EXTENSION |
---|
2208 | Int getExtensionFlag() { return m_extensionFlag; } |
---|
2209 | Void setExtensionFlag(Int n) { m_extensionFlag = n; } |
---|
2210 | #if SCALINGLIST_INFERRING |
---|
2211 | UInt getLayerId() { return m_layerId; } |
---|
2212 | Void setLayerId( UInt layerId ) { m_layerId = layerId; } |
---|
2213 | Bool getInferScalingListFlag() { return m_inferScalingListFlag; } |
---|
2214 | UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; } |
---|
2215 | Void setInferScalingListFlag( Bool flag ) { m_inferScalingListFlag = flag; } |
---|
2216 | Void setScalingListRefLayerId( UInt layerId ) { m_scalingListRefLayerId = layerId; } |
---|
2217 | #endif |
---|
2218 | #if POC_RESET_IDC |
---|
2219 | Bool getPocResetInfoPresentFlag () { return m_pocResetInfoPresentFlag; } |
---|
2220 | Void setPocResetInfoPresentFlag (const Bool val) { m_pocResetInfoPresentFlag = val; } |
---|
2221 | #endif |
---|
2222 | #if MOVE_SCALED_OFFSET_TO_PPS |
---|
2223 | UInt getNumRefLayerLocationOffsets() { return m_numRefLayerLocationOffsets; } |
---|
2224 | Void setNumRefLayerLocationOffsets(Int x) { m_numRefLayerLocationOffsets = x; } |
---|
2225 | #if O0098_SCALED_REF_LAYER_ID |
---|
2226 | UInt getRefLocationOffsetLayerId(Int x) { return m_refLocationOffsetLayerId[x]; } |
---|
2227 | Void setRefLocationOffsetLayerId(Int x, UInt id) { m_refLocationOffsetLayerId[x] = id; } |
---|
2228 | Window& getScaledRefLayerWindowForLayer( Int layerId ); |
---|
2229 | #endif |
---|
2230 | Window& getScaledRefLayerWindow( Int x ) { return m_scaledRefLayerWindow[x]; } |
---|
2231 | #if REF_REGION_OFFSET |
---|
2232 | Window& getRefLayerWindowForLayer( Int layerId ); |
---|
2233 | Window& getRefLayerWindow( Int x ) { return m_refLayerWindow[x]; } |
---|
2234 | Bool getScaledRefLayerOffsetPresentFlag(Int x) { return m_scaledRefLayerOffsetPresentFlag[x]; } |
---|
2235 | Void setScaledRefLayerOffsetPresentFlag(Int x, Bool b) { m_scaledRefLayerOffsetPresentFlag[x] = b; } |
---|
2236 | Bool getRefRegionOffsetPresentFlag(Int x) { return m_refRegionOffsetPresentFlag[x]; } |
---|
2237 | Void setRefRegionOffsetPresentFlag(Int x, Bool b) { m_refRegionOffsetPresentFlag[x] = b; } |
---|
2238 | #endif |
---|
2239 | #if R0209_GENERIC_PHASE |
---|
2240 | Int getPhaseHorLuma(Int x) { return m_phaseHorLuma[x]; } |
---|
2241 | Int getPhaseVerLuma(Int x) { return m_phaseVerLuma[x]; } |
---|
2242 | Int getPhaseHorChroma(Int x) { return m_phaseHorChroma[x]; } |
---|
2243 | Int getPhaseVerChroma(Int x) { return m_phaseVerChroma[x]; } |
---|
2244 | Void setPhaseHorLuma(Int x, Int val) { m_phaseHorLuma[x] = val; } |
---|
2245 | Void setPhaseVerLuma(Int x, Int val) { m_phaseVerLuma[x] = val; } |
---|
2246 | Void setPhaseHorChroma(Int x, Int val) { m_phaseHorChroma[x] = val; } |
---|
2247 | Void setPhaseVerChroma(Int x, Int val) { m_phaseVerChroma[x] = val; } |
---|
2248 | Bool getResamplePhaseSetPresentFlag(Int x) { return m_resamplePhaseSetPresentFlag[x]; } |
---|
2249 | Void setResamplePhaseSetPresentFlag(Int x, Bool b) { m_resamplePhaseSetPresentFlag[x] = b; } |
---|
2250 | #if RESAMPLING_FIX |
---|
2251 | Bool hasZeroResamplingPhase(Int refLayerId); |
---|
2252 | Void getResamplingPhase(Int refLayerId, Bool& phaseSetPresentFlag, Int& phaseHorLuma, Int& phaseVerLuma, Int& phaseHorChroma, Int& phaseVerChroma); |
---|
2253 | #endif |
---|
2254 | #endif |
---|
2255 | #endif |
---|
2256 | #if Q0048_CGS_3D_ASYMLUT |
---|
2257 | Int getCGSFlag() { return m_nCGSFlag; } |
---|
2258 | Void setCGSFlag(Int n) { m_nCGSFlag = n; } |
---|
2259 | Int getCGSOutputBitDepthY() { return m_nCGSOutputBitDepthY; } |
---|
2260 | Void setCGSOutputBitDepthY(Int n){ m_nCGSOutputBitDepthY = n; } |
---|
2261 | Int getCGSOutputBitDepthC() { return m_nCGSOutputBitDepthC; } |
---|
2262 | Void setCGSOutputBitDepthC(Int n){ m_nCGSOutputBitDepthC = n; } |
---|
2263 | #endif |
---|
2264 | #endif //SVC_EXTENSION |
---|
2265 | }; |
---|
2266 | |
---|
2267 | struct WPScalingParam |
---|
2268 | { |
---|
2269 | // Explicit weighted prediction parameters parsed in slice header, |
---|
2270 | // or Implicit weighted prediction parameters (8 bits depth values). |
---|
2271 | Bool bPresentFlag; |
---|
2272 | UInt uiLog2WeightDenom; |
---|
2273 | Int iWeight; |
---|
2274 | Int iOffset; |
---|
2275 | |
---|
2276 | // Weighted prediction scaling values built from above parameters (bitdepth scaled): |
---|
2277 | Int w; |
---|
2278 | Int o; |
---|
2279 | Int offset; |
---|
2280 | Int shift; |
---|
2281 | Int round; |
---|
2282 | }; |
---|
2283 | |
---|
2284 | struct WPACDCParam |
---|
2285 | { |
---|
2286 | Int64 iAC; |
---|
2287 | Int64 iDC; |
---|
2288 | #if O0194_WEIGHTED_PREDICTION_CGS |
---|
2289 | Int iSamples; |
---|
2290 | #endif |
---|
2291 | }; |
---|
2292 | |
---|
2293 | /// slice header class |
---|
2294 | class TComSlice |
---|
2295 | { |
---|
2296 | |
---|
2297 | private: |
---|
2298 | // Bitstream writing |
---|
2299 | Bool m_saoEnabledFlag[MAX_NUM_CHANNEL_TYPE]; |
---|
2300 | Int m_iPPSId; ///< picture parameter set ID |
---|
2301 | Bool m_PicOutputFlag; ///< pic_output_flag |
---|
2302 | Int m_iPOC; |
---|
2303 | Int m_iLastIDR; |
---|
2304 | Int m_iAssociatedIRAP; |
---|
2305 | #if POC_RESET_IDC_ENCODER |
---|
2306 | Int m_associatedIrapPocBeforeReset; |
---|
2307 | #endif |
---|
2308 | NalUnitType m_iAssociatedIRAPType; |
---|
2309 | static Int m_prevTid0POC; |
---|
2310 | TComReferencePictureSet *m_pcRPS; |
---|
2311 | TComReferencePictureSet m_LocalRPS; |
---|
2312 | Int m_iBDidx; |
---|
2313 | TComRefPicListModification m_RefPicListModification; |
---|
2314 | NalUnitType m_eNalUnitType; ///< Nal unit type for the slice |
---|
2315 | SliceType m_eSliceType; |
---|
2316 | Int m_iSliceQp; |
---|
2317 | Bool m_dependentSliceSegmentFlag; |
---|
2318 | #if ADAPTIVE_QP_SELECTION |
---|
2319 | Int m_iSliceQpBase; |
---|
2320 | #endif |
---|
2321 | Bool m_ChromaQpAdjEnabled; |
---|
2322 | Bool m_deblockingFilterDisable; |
---|
2323 | Bool m_deblockingFilterOverrideFlag; //< offsets for deblocking filter inherit from PPS |
---|
2324 | Int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
2325 | Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
2326 | Int m_list1IdxToList0Idx[MAX_NUM_REF]; |
---|
2327 | Int m_aiNumRefIdx [NUM_REF_PIC_LIST_01]; // for multiple reference of current slice |
---|
2328 | |
---|
2329 | Bool m_bCheckLDC; |
---|
2330 | |
---|
2331 | // Data |
---|
2332 | Int m_iSliceQpDelta; |
---|
2333 | Int m_iSliceChromaQpDelta[MAX_NUM_COMPONENT]; |
---|
2334 | TComPic* m_apcRefPicList [NUM_REF_PIC_LIST_01][MAX_NUM_REF+1]; |
---|
2335 | Int m_aiRefPOCList [NUM_REF_PIC_LIST_01][MAX_NUM_REF+1]; |
---|
2336 | Bool m_bIsUsedAsLongTerm[NUM_REF_PIC_LIST_01][MAX_NUM_REF+1]; |
---|
2337 | Int m_iDepth; |
---|
2338 | |
---|
2339 | // referenced slice? |
---|
2340 | Bool m_bRefenced; |
---|
2341 | |
---|
2342 | // access channel |
---|
2343 | TComVPS* m_pcVPS; |
---|
2344 | TComSPS* m_pcSPS; |
---|
2345 | TComPPS* m_pcPPS; |
---|
2346 | TComPic* m_pcPic; |
---|
2347 | #if ADAPTIVE_QP_SELECTION |
---|
2348 | TComTrQuant* m_pcTrQuant; |
---|
2349 | #endif |
---|
2350 | UInt m_colFromL0Flag; // collocated picture from List0 flag |
---|
2351 | |
---|
2352 | Bool m_noOutputPriorPicsFlag; |
---|
2353 | Bool m_noRaslOutputFlag; |
---|
2354 | Bool m_handleCraAsBlaFlag; |
---|
2355 | |
---|
2356 | UInt m_colRefIdx; |
---|
2357 | UInt m_maxNumMergeCand; |
---|
2358 | |
---|
2359 | Double m_lambdas[MAX_NUM_COMPONENT]; |
---|
2360 | |
---|
2361 | Bool m_abEqualRef [NUM_REF_PIC_LIST_01][MAX_NUM_REF][MAX_NUM_REF]; |
---|
2362 | UInt m_uiTLayer; |
---|
2363 | Bool m_bTLayerSwitchingFlag; |
---|
2364 | |
---|
2365 | SliceConstraint m_sliceMode; |
---|
2366 | UInt m_sliceArgument; |
---|
2367 | UInt m_sliceCurStartCtuTsAddr; |
---|
2368 | UInt m_sliceCurEndCtuTsAddr; |
---|
2369 | UInt m_sliceIdx; |
---|
2370 | SliceConstraint m_sliceSegmentMode; |
---|
2371 | UInt m_sliceSegmentArgument; |
---|
2372 | UInt m_sliceSegmentCurStartCtuTsAddr; |
---|
2373 | UInt m_sliceSegmentCurEndCtuTsAddr; |
---|
2374 | Bool m_nextSlice; |
---|
2375 | Bool m_nextSliceSegment; |
---|
2376 | UInt m_sliceBits; |
---|
2377 | UInt m_sliceSegmentBits; |
---|
2378 | Bool m_bFinalized; |
---|
2379 | |
---|
2380 | WPScalingParam m_weightPredTable[NUM_REF_PIC_LIST_01][MAX_NUM_REF][MAX_NUM_COMPONENT]; // [REF_PIC_LIST_0 or REF_PIC_LIST_1][refIdx][0:Y, 1:U, 2:V] |
---|
2381 | WPACDCParam m_weightACDCParam[MAX_NUM_COMPONENT]; |
---|
2382 | |
---|
2383 | std::vector<UInt> m_substreamSizes; |
---|
2384 | |
---|
2385 | TComScalingList* m_scalingList; //!< pointer of quantization matrix |
---|
2386 | Bool m_cabacInitFlag; |
---|
2387 | |
---|
2388 | Bool m_bLMvdL1Zero; |
---|
2389 | Bool m_temporalLayerNonReferenceFlag; |
---|
2390 | Bool m_LFCrossSliceBoundaryFlag; |
---|
2391 | |
---|
2392 | Bool m_enableTMVPFlag; |
---|
2393 | |
---|
2394 | #if SVC_EXTENSION |
---|
2395 | #if R0226_SLICE_TMVP |
---|
2396 | Bool m_availableForTMVPRefFlag; |
---|
2397 | #endif |
---|
2398 | UInt m_layerId; |
---|
2399 | TComPic* m_pcBaseColPic[MAX_LAYERS]; |
---|
2400 | TComPicYuv* m_pcFullPelBaseRec[MAX_LAYERS]; |
---|
2401 | Int m_numMotionPredRefLayers; |
---|
2402 | #if REF_IDX_MFM |
---|
2403 | Bool m_bMFMEnabledFlag; |
---|
2404 | Int m_colRefLayerIdx; |
---|
2405 | Bool m_altColIndicationFlag; |
---|
2406 | TComPic* m_pcIlpPic; |
---|
2407 | #endif |
---|
2408 | |
---|
2409 | Bool m_interLayerPredEnabledFlag; |
---|
2410 | Int m_activeNumILRRefIdx; //< Active inter-layer reference pictures |
---|
2411 | Int m_interLayerPredLayerIdc [MAX_VPS_LAYER_IDX_PLUS1]; |
---|
2412 | #if P0312_VERT_PHASE_ADJ |
---|
2413 | Bool m_vertPhasePositionFlag[MAX_VPS_LAYER_IDX_PLUS1]; |
---|
2414 | #endif |
---|
2415 | #if POC_RESET_FLAG |
---|
2416 | Bool m_bPocResetFlag; |
---|
2417 | Int m_pocValueBeforeReset; |
---|
2418 | #endif |
---|
2419 | Bool m_bDiscardableFlag; |
---|
2420 | #if O0149_CROSS_LAYER_BLA_FLAG |
---|
2421 | Bool m_bCrossLayerBLAFlag; |
---|
2422 | #endif |
---|
2423 | #if POC_RESET_IDC_SIGNALLING |
---|
2424 | Int m_pocResetIdc; |
---|
2425 | Int m_pocResetPeriodId; |
---|
2426 | Bool m_fullPocResetFlag; |
---|
2427 | Int m_pocLsbVal; |
---|
2428 | Int m_pocMsbVal; |
---|
2429 | Bool m_pocMsbValRequiredFlag; |
---|
2430 | Bool m_pocMsbValPresentFlag; |
---|
2431 | #if P0297_VPS_POC_LSB_ALIGNED_FLAG |
---|
2432 | Bool m_pocMsbValNeeded; |
---|
2433 | Int m_pocResetDeltaPoc; |
---|
2434 | #endif |
---|
2435 | #endif |
---|
2436 | #if POC_RESET_IDC_ENCODER |
---|
2437 | Int m_pocValueBeforeReset; |
---|
2438 | #endif |
---|
2439 | #if POC_RESET_IDC_DECODER || POC_RESET_IDC_ENCODER |
---|
2440 | Int m_picOrderCntLsb; |
---|
2441 | #endif |
---|
2442 | #if Q0048_CGS_3D_ASYMLUT |
---|
2443 | Int m_nCGSOverWritePPS; // for optimization, not output to bitstream |
---|
2444 | #endif |
---|
2445 | #endif //SVC_EXTENSION |
---|
2446 | |
---|
2447 | public: |
---|
2448 | TComSlice(); |
---|
2449 | virtual ~TComSlice(); |
---|
2450 | #if SVC_EXTENSION |
---|
2451 | Void initSlice ( UInt layerId ); |
---|
2452 | #else |
---|
2453 | Void initSlice (); |
---|
2454 | #endif |
---|
2455 | Void initTiles(); |
---|
2456 | |
---|
2457 | Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } |
---|
2458 | TComVPS* getVPS () { return m_pcVPS; } |
---|
2459 | Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
2460 | TComSPS* getSPS () { return m_pcSPS; } |
---|
2461 | const TComSPS* getSPS() const { return m_pcSPS; } |
---|
2462 | |
---|
2463 | Void setPPS ( TComPPS* pcPPS ) { assert(pcPPS!=NULL); m_pcPPS = pcPPS; m_iPPSId = pcPPS->getPPSId(); } |
---|
2464 | TComPPS* getPPS () { return m_pcPPS; } |
---|
2465 | const TComPPS* getPPS() const { return m_pcPPS; } |
---|
2466 | |
---|
2467 | #if ADAPTIVE_QP_SELECTION |
---|
2468 | Void setTrQuant ( TComTrQuant* pcTrQuant ) { m_pcTrQuant = pcTrQuant; } |
---|
2469 | TComTrQuant* getTrQuant () { return m_pcTrQuant; } |
---|
2470 | #endif |
---|
2471 | |
---|
2472 | Void setPPSId ( Int PPSId ) { m_iPPSId = PPSId; } |
---|
2473 | Int getPPSId () { return m_iPPSId; } |
---|
2474 | Void setPicOutputFlag( Bool b ) { m_PicOutputFlag = b; } |
---|
2475 | Bool getPicOutputFlag() { return m_PicOutputFlag; } |
---|
2476 | Void setSaoEnabledFlag(ChannelType chType, Bool s) {m_saoEnabledFlag[chType] =s; } |
---|
2477 | Bool getSaoEnabledFlag(ChannelType chType) { return m_saoEnabledFlag[chType]; } |
---|
2478 | Void setRPS ( TComReferencePictureSet *pcRPS ) { m_pcRPS = pcRPS; } |
---|
2479 | TComReferencePictureSet* getRPS () { return m_pcRPS; } |
---|
2480 | TComReferencePictureSet* getLocalRPS () { return &m_LocalRPS; } |
---|
2481 | |
---|
2482 | Void setRPSidx ( Int iBDidx ) { m_iBDidx = iBDidx; } |
---|
2483 | Int getRPSidx () { return m_iBDidx; } |
---|
2484 | Int getPrevTid0POC () { return m_prevTid0POC; } |
---|
2485 | TComRefPicListModification* getRefPicListModification() { return &m_RefPicListModification; } |
---|
2486 | Void setLastIDR(Int iIDRPOC) { m_iLastIDR = iIDRPOC; } |
---|
2487 | Int getLastIDR() { return m_iLastIDR; } |
---|
2488 | Void setAssociatedIRAPPOC(Int iAssociatedIRAPPOC) { m_iAssociatedIRAP = iAssociatedIRAPPOC; } |
---|
2489 | Int getAssociatedIRAPPOC() { return m_iAssociatedIRAP; } |
---|
2490 | Void setAssociatedIRAPType(NalUnitType associatedIRAPType) { m_iAssociatedIRAPType = associatedIRAPType; } |
---|
2491 | NalUnitType getAssociatedIRAPType() { return m_iAssociatedIRAPType; } |
---|
2492 | SliceType getSliceType () { return m_eSliceType; } |
---|
2493 | Int getPOC () { return m_iPOC; } |
---|
2494 | Int getSliceQp () { return m_iSliceQp; } |
---|
2495 | Bool getDependentSliceSegmentFlag() const { return m_dependentSliceSegmentFlag; } |
---|
2496 | Void setDependentSliceSegmentFlag(Bool val) { m_dependentSliceSegmentFlag = val; } |
---|
2497 | #if ADAPTIVE_QP_SELECTION |
---|
2498 | Int getSliceQpBase () const { return m_iSliceQpBase; } |
---|
2499 | #endif |
---|
2500 | Int getSliceQpDelta () const { return m_iSliceQpDelta; } |
---|
2501 | Int getSliceChromaQpDelta (ComponentID compID) const { return isLuma(compID) ? 0 : m_iSliceChromaQpDelta[compID]; } |
---|
2502 | Bool getUseChromaQpAdj() const { return m_ChromaQpAdjEnabled; } |
---|
2503 | Bool getDeblockingFilterDisable() const { return m_deblockingFilterDisable; } |
---|
2504 | Bool getDeblockingFilterOverrideFlag() const { return m_deblockingFilterOverrideFlag; } |
---|
2505 | Int getDeblockingFilterBetaOffsetDiv2() const { return m_deblockingFilterBetaOffsetDiv2; } |
---|
2506 | Int getDeblockingFilterTcOffsetDiv2() const { return m_deblockingFilterTcOffsetDiv2; } |
---|
2507 | |
---|
2508 | Int getNumRefIdx ( RefPicList e ) const { return m_aiNumRefIdx[e]; } |
---|
2509 | TComPic* getPic () { return m_pcPic; } |
---|
2510 | TComPic* getRefPic ( RefPicList e, Int iRefIdx) { return m_apcRefPicList[e][iRefIdx]; } |
---|
2511 | Int getRefPOC ( RefPicList e, Int iRefIdx) { return m_aiRefPOCList[e][iRefIdx]; } |
---|
2512 | Int getDepth () { return m_iDepth; } |
---|
2513 | UInt getColFromL0Flag () { return m_colFromL0Flag; } |
---|
2514 | UInt getColRefIdx () { return m_colRefIdx; } |
---|
2515 | Void checkColRefIdx (UInt curSliceIdx, TComPic* pic); |
---|
2516 | Bool getIsUsedAsLongTerm (Int i, Int j) { return m_bIsUsedAsLongTerm[i][j]; } |
---|
2517 | Void setIsUsedAsLongTerm (Int i, Int j, Bool value) { m_bIsUsedAsLongTerm[i][j] = value; } |
---|
2518 | Bool getCheckLDC () { return m_bCheckLDC; } |
---|
2519 | Bool getMvdL1ZeroFlag () { return m_bLMvdL1Zero; } |
---|
2520 | Int getNumRpsCurrTempList(); |
---|
2521 | Int getList1IdxToList0Idx ( Int list1Idx ) { return m_list1IdxToList0Idx[list1Idx]; } |
---|
2522 | Void setReferenced(Bool b) { m_bRefenced = b; } |
---|
2523 | Bool isReferenced() { return m_bRefenced; } |
---|
2524 | Bool isReferenceNalu() { return ((getNalUnitType() <= NAL_UNIT_RESERVED_VCL_R15) && (getNalUnitType()%2 != 0)) || ((getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP) && (getNalUnitType() <= NAL_UNIT_RESERVED_IRAP_VCL23) ); } |
---|
2525 | Void setPOC ( Int i ) { m_iPOC = i; if ((getTLayer()==0) && (isReferenceNalu() && (getNalUnitType()!=NAL_UNIT_CODED_SLICE_RASL_R)&& (getNalUnitType()!=NAL_UNIT_CODED_SLICE_RADL_R))) {m_prevTid0POC=i;} } |
---|
2526 | Void setNalUnitType ( NalUnitType e ) { m_eNalUnitType = e; } |
---|
2527 | NalUnitType getNalUnitType () const { return m_eNalUnitType; } |
---|
2528 | Bool getRapPicFlag (); |
---|
2529 | Bool getIdrPicFlag () { return getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP; } |
---|
2530 | Bool isIRAP () const { return (getNalUnitType() >= 16) && (getNalUnitType() <= 23); } |
---|
2531 | Void checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, NalUnitType& associatedIRAPType, TComList<TComPic *>& rcListPic); |
---|
2532 | #if NO_CLRAS_OUTPUT_FLAG |
---|
2533 | #if R0235_SMALLEST_LAYER_ID |
---|
2534 | Void decodingRefreshMarking( TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag, UInt smallestLayerId = 0 ); |
---|
2535 | #else |
---|
2536 | Void decodingRefreshMarking( TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag ); |
---|
2537 | #endif |
---|
2538 | Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag); |
---|
2539 | #else |
---|
2540 | Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic); |
---|
2541 | #endif |
---|
2542 | Void setSliceType ( SliceType e ) { m_eSliceType = e; } |
---|
2543 | Void setSliceQp ( Int i ) { m_iSliceQp = i; } |
---|
2544 | #if ADAPTIVE_QP_SELECTION |
---|
2545 | Void setSliceQpBase ( Int i ) { m_iSliceQpBase = i; } |
---|
2546 | #endif |
---|
2547 | Void setSliceQpDelta ( Int i ) { m_iSliceQpDelta = i; } |
---|
2548 | Void setSliceChromaQpDelta( ComponentID compID, Int i ) { m_iSliceChromaQpDelta[compID] = isLuma(compID) ? 0 : i; } |
---|
2549 | Void setUseChromaQpAdj ( Bool b ) { m_ChromaQpAdjEnabled = b; } |
---|
2550 | Void setDeblockingFilterDisable( Bool b ) { m_deblockingFilterDisable= b; } |
---|
2551 | Void setDeblockingFilterOverrideFlag( Bool b ) { m_deblockingFilterOverrideFlag = b; } |
---|
2552 | Void setDeblockingFilterBetaOffsetDiv2( Int i ) { m_deblockingFilterBetaOffsetDiv2 = i; } |
---|
2553 | Void setDeblockingFilterTcOffsetDiv2( Int i ) { m_deblockingFilterTcOffsetDiv2 = i; } |
---|
2554 | |
---|
2555 | Void setRefPic ( TComPic* p, RefPicList e, Int iRefIdx ) { m_apcRefPicList[e][iRefIdx] = p; } |
---|
2556 | Void setRefPOC ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefPOCList[e][iRefIdx] = i; } |
---|
2557 | Void setNumRefIdx ( RefPicList e, Int i ) { m_aiNumRefIdx[e] = i; } |
---|
2558 | Void setPic ( TComPic* p ) { m_pcPic = p; } |
---|
2559 | Void setDepth ( Int iDepth ) { m_iDepth = iDepth; } |
---|
2560 | |
---|
2561 | #if SVC_EXTENSION |
---|
2562 | #if PREVTID0_POC_RESET |
---|
2563 | Void adjustPrevTid0POC (Int adj) { m_prevTid0POC=m_prevTid0POC-adj; } |
---|
2564 | #endif |
---|
2565 | #if POC_RESET_IDC_DECODER |
---|
2566 | Void setPrevTid0POC( Int x ) { m_prevTid0POC = x; } |
---|
2567 | #endif |
---|
2568 | #if POC_RESET_IDC_ENCODER |
---|
2569 | Void setAssociatedIrapPocBeforeReset(Int x) { m_associatedIrapPocBeforeReset = x; } |
---|
2570 | Int getAssociatedIrapPocBeforeReset( ) { return m_associatedIrapPocBeforeReset; } |
---|
2571 | #endif |
---|
2572 | |
---|
2573 | Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false, TComPic** ilpPic = NULL ); |
---|
2574 | #if Q0048_CGS_3D_ASYMLUT |
---|
2575 | Int getCGSOverWritePPS() { return m_nCGSOverWritePPS; } |
---|
2576 | Void setCGSOverWritePPS(Int n) { m_nCGSOverWritePPS = n; } |
---|
2577 | #endif |
---|
2578 | #else |
---|
2579 | Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false ); |
---|
2580 | #endif |
---|
2581 | Void setRefPOCList (); |
---|
2582 | Void setColFromL0Flag ( UInt colFromL0 ) { m_colFromL0Flag = colFromL0; } |
---|
2583 | Void setColRefIdx ( UInt refIdx) { m_colRefIdx = refIdx; } |
---|
2584 | Void setCheckLDC ( Bool b ) { m_bCheckLDC = b; } |
---|
2585 | Void setMvdL1ZeroFlag ( Bool b) { m_bLMvdL1Zero = b; } |
---|
2586 | |
---|
2587 | Bool isIntra () { return m_eSliceType == I_SLICE; } |
---|
2588 | Bool isInterB () { return m_eSliceType == B_SLICE; } |
---|
2589 | Bool isInterP () { return m_eSliceType == P_SLICE; } |
---|
2590 | |
---|
2591 | Void setLambdas ( const Double lambdas[MAX_NUM_COMPONENT] ) { for (Int component = 0; component < MAX_NUM_COMPONENT; component++) m_lambdas[component] = lambdas[component]; } |
---|
2592 | const Double* getLambdas() const { return m_lambdas; } |
---|
2593 | |
---|
2594 | Void initEqualRef(); |
---|
2595 | Bool isEqualRef ( RefPicList e, Int iRefIdx1, Int iRefIdx2 ) |
---|
2596 | { |
---|
2597 | assert(e<NUM_REF_PIC_LIST_01); |
---|
2598 | if (iRefIdx1 < 0 || iRefIdx2 < 0) return false; |
---|
2599 | return m_abEqualRef[e][iRefIdx1][iRefIdx2]; |
---|
2600 | } |
---|
2601 | |
---|
2602 | Void setEqualRef( RefPicList e, Int iRefIdx1, Int iRefIdx2, Bool b) |
---|
2603 | { |
---|
2604 | assert(e<NUM_REF_PIC_LIST_01); |
---|
2605 | m_abEqualRef[e][iRefIdx1][iRefIdx2] = m_abEqualRef[e][iRefIdx2][iRefIdx1] = b; |
---|
2606 | } |
---|
2607 | |
---|
2608 | static Void sortPicList ( TComList<TComPic*>& rcListPic ); |
---|
2609 | Void setList1IdxToList0Idx(); |
---|
2610 | |
---|
2611 | UInt getTLayer () { return m_uiTLayer; } |
---|
2612 | Void setTLayer ( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } |
---|
2613 | |
---|
2614 | Void setTLayerInfo( UInt uiTLayer ); |
---|
2615 | Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum ); |
---|
2616 | #if POC_RESET_IDC_ENCODER |
---|
2617 | Void checkLeadingPictureRestrictions(TComList<TComPic*>& rcListPic, Bool usePocBeforeReset = false); |
---|
2618 | #else |
---|
2619 | Void checkLeadingPictureRestrictions( TComList<TComPic*>& rcListPic ); |
---|
2620 | #endif |
---|
2621 | Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList); |
---|
2622 | Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); |
---|
2623 | Bool isStepwiseTemporalLayerSwitchingPointCandidate( TComList<TComPic*>& rcListPic ); |
---|
2624 | #if ALLOW_RECOVERY_POINT_AS_RAP |
---|
2625 | Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0, Bool bUseRecoveryPoint = false); |
---|
2626 | Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess = 0, Bool bUseRecoveryPoint = false); |
---|
2627 | #else |
---|
2628 | Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0); |
---|
2629 | Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP); |
---|
2630 | #endif |
---|
2631 | Void setMaxNumMergeCand (UInt val ) { m_maxNumMergeCand = val; } |
---|
2632 | UInt getMaxNumMergeCand () { return m_maxNumMergeCand; } |
---|
2633 | |
---|
2634 | Void setNoOutputPriorPicsFlag ( Bool val ) { m_noOutputPriorPicsFlag = val; } |
---|
2635 | Bool getNoOutputPriorPicsFlag () { return m_noOutputPriorPicsFlag; } |
---|
2636 | |
---|
2637 | Void setNoRaslOutputFlag ( Bool val ) { m_noRaslOutputFlag = val; } |
---|
2638 | Bool getNoRaslOutputFlag () { return m_noRaslOutputFlag; } |
---|
2639 | |
---|
2640 | Void setHandleCraAsBlaFlag ( Bool val ) { m_handleCraAsBlaFlag = val; } |
---|
2641 | Bool getHandleCraAsBlaFlag () { return m_handleCraAsBlaFlag; } |
---|
2642 | |
---|
2643 | Void setSliceMode ( SliceConstraint mode ) { m_sliceMode = mode; } |
---|
2644 | SliceConstraint getSliceMode () const { return m_sliceMode; } |
---|
2645 | Void setSliceArgument ( UInt uiArgument ) { m_sliceArgument = uiArgument; } |
---|
2646 | UInt getSliceArgument () { return m_sliceArgument; } |
---|
2647 | Void setSliceCurStartCtuTsAddr ( UInt ctuTsAddr ) { m_sliceCurStartCtuTsAddr = ctuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan) |
---|
2648 | UInt getSliceCurStartCtuTsAddr () const { return m_sliceCurStartCtuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan) |
---|
2649 | Void setSliceCurEndCtuTsAddr ( UInt ctuTsAddr ) { m_sliceCurEndCtuTsAddr = ctuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan) |
---|
2650 | UInt getSliceCurEndCtuTsAddr () const { return m_sliceCurEndCtuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan) |
---|
2651 | Void setSliceIdx ( UInt i) { m_sliceIdx = i; } |
---|
2652 | UInt getSliceIdx () { return m_sliceIdx; } |
---|
2653 | Void copySliceInfo (TComSlice *pcSliceSrc); |
---|
2654 | Void setSliceSegmentMode ( SliceConstraint mode ) { m_sliceSegmentMode = mode; } |
---|
2655 | SliceConstraint getSliceSegmentMode () const { return m_sliceSegmentMode; } |
---|
2656 | Void setSliceSegmentArgument ( UInt uiArgument ) { m_sliceSegmentArgument = uiArgument; } |
---|
2657 | UInt getSliceSegmentArgument () { return m_sliceSegmentArgument; } |
---|
2658 | Void setSliceSegmentCurStartCtuTsAddr ( UInt ctuTsAddr ) { m_sliceSegmentCurStartCtuTsAddr = ctuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan) |
---|
2659 | UInt getSliceSegmentCurStartCtuTsAddr () const { return m_sliceSegmentCurStartCtuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan) |
---|
2660 | Void setSliceSegmentCurEndCtuTsAddr ( UInt ctuTsAddr ) { m_sliceSegmentCurEndCtuTsAddr = ctuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan) |
---|
2661 | UInt getSliceSegmentCurEndCtuTsAddr () const { return m_sliceSegmentCurEndCtuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan) |
---|
2662 | Void setSliceBits ( UInt uiVal ) { m_sliceBits = uiVal; } |
---|
2663 | UInt getSliceBits () { return m_sliceBits; } |
---|
2664 | Void setSliceSegmentBits ( UInt uiVal ) { m_sliceSegmentBits = uiVal; } |
---|
2665 | UInt getSliceSegmentBits () { return m_sliceSegmentBits; } |
---|
2666 | Void setFinalized ( Bool uiVal ) { m_bFinalized = uiVal; } |
---|
2667 | Bool getFinalized () { return m_bFinalized; } |
---|
2668 | Void setWpScaling ( WPScalingParam wp[NUM_REF_PIC_LIST_01][MAX_NUM_REF][MAX_NUM_COMPONENT] ) { memcpy(m_weightPredTable, wp, sizeof(WPScalingParam)*NUM_REF_PIC_LIST_01*MAX_NUM_REF*MAX_NUM_COMPONENT); } |
---|
2669 | Void getWpScaling ( RefPicList e, Int iRefIdx, WPScalingParam *&wp); |
---|
2670 | |
---|
2671 | Void resetWpScaling (); |
---|
2672 | Void initWpScaling (); |
---|
2673 | inline Bool applyWP () { return( (m_eSliceType==P_SLICE && m_pcPPS->getUseWP()) || (m_eSliceType==B_SLICE && m_pcPPS->getWPBiPred()) ); } |
---|
2674 | |
---|
2675 | Void setWpAcDcParam ( WPACDCParam wp[MAX_NUM_COMPONENT] ) { memcpy(m_weightACDCParam, wp, sizeof(WPACDCParam)*MAX_NUM_COMPONENT); } |
---|
2676 | Void getWpAcDcParam ( WPACDCParam *&wp ); |
---|
2677 | Void initWpAcDcParam (); |
---|
2678 | |
---|
2679 | Void clearSubstreamSizes ( ) { return m_substreamSizes.clear(); } |
---|
2680 | UInt getNumberOfSubstreamSizes ( ) { return (UInt) m_substreamSizes.size(); } |
---|
2681 | Void addSubstreamSize ( UInt size ) { m_substreamSizes.push_back(size); } |
---|
2682 | UInt getSubstreamSize ( Int idx ) { assert(idx<getNumberOfSubstreamSizes()); return m_substreamSizes[idx]; } |
---|
2683 | |
---|
2684 | Void setScalingList ( TComScalingList* scalingList ) { m_scalingList = scalingList; } |
---|
2685 | TComScalingList* getScalingList () { return m_scalingList; } |
---|
2686 | Void setDefaultScalingList (); |
---|
2687 | Bool checkDefaultScalingList (); |
---|
2688 | Void setCabacInitFlag ( Bool val ) { m_cabacInitFlag = val; } //!< set CABAC initial flag |
---|
2689 | Bool getCabacInitFlag () { return m_cabacInitFlag; } //!< get CABAC initial flag |
---|
2690 | Bool getTemporalLayerNonReferenceFlag() { return m_temporalLayerNonReferenceFlag;} |
---|
2691 | Void setTemporalLayerNonReferenceFlag(Bool x) { m_temporalLayerNonReferenceFlag = x;} |
---|
2692 | Void setLFCrossSliceBoundaryFlag ( Bool val ) { m_LFCrossSliceBoundaryFlag = val; } |
---|
2693 | Bool getLFCrossSliceBoundaryFlag () { return m_LFCrossSliceBoundaryFlag;} |
---|
2694 | |
---|
2695 | Void setEnableTMVPFlag ( Bool b ) { m_enableTMVPFlag = b; } |
---|
2696 | Bool getEnableTMVPFlag () { return m_enableTMVPFlag;} |
---|
2697 | |
---|
2698 | #if SVC_EXTENSION |
---|
2699 | #if R0226_SLICE_TMVP |
---|
2700 | Void setAvailableForTMVPRefFlag ( Bool b ) { m_availableForTMVPRefFlag = b; } |
---|
2701 | Bool getAvailableForTMVPRefFlag () { return m_availableForTMVPRefFlag;} |
---|
2702 | #endif |
---|
2703 | Bool setBaseColPic ( TComList<TComPic*>& rcListPic , UInt refLayerIdc ); |
---|
2704 | Void setBaseColPic (UInt refLayerIdc, TComPic* p) { m_pcBaseColPic[refLayerIdc] = p; } |
---|
2705 | TComPic* getBaseColPic (UInt refLayerIdc) { return m_pcBaseColPic[refLayerIdc]; } |
---|
2706 | TComPic** getBaseColPic () { return &m_pcBaseColPic[0]; } |
---|
2707 | #if MFM_ENCCONSTRAINT |
---|
2708 | TComPic* getBaseColPic( TComList<TComPic*>& rcListPic ); |
---|
2709 | #endif |
---|
2710 | |
---|
2711 | Void setLayerId (UInt layerId) { m_layerId = layerId; } |
---|
2712 | UInt getLayerId () { return m_layerId; } |
---|
2713 | UInt getLayerIdx() { return m_pcVPS->getLayerIdxInVps(m_layerId); } |
---|
2714 | |
---|
2715 | Void setFullPelBaseRec (UInt refLayerIdc, TComPicYuv* p) { m_pcFullPelBaseRec[refLayerIdc] = p; } |
---|
2716 | TComPicYuv* getFullPelBaseRec (UInt refLayerIdc) { return m_pcFullPelBaseRec[refLayerIdc]; } |
---|
2717 | |
---|
2718 | Void setRefPicListModificationSvc(); |
---|
2719 | Int getNumILRRefIdx ( ) { return m_pcVPS->getNumDirectRefLayers( m_layerId ); } |
---|
2720 | |
---|
2721 | Int getActiveNumILRRefIdx ( ) { return m_activeNumILRRefIdx; } |
---|
2722 | Void setActiveNumILRRefIdx ( Int i ) { m_activeNumILRRefIdx = i; } |
---|
2723 | |
---|
2724 | Int getInterLayerPredLayerIdc (UInt layerIdx) { return m_interLayerPredLayerIdc[layerIdx];} |
---|
2725 | Void setInterLayerPredLayerIdc (UInt refLayerIdc, UInt layerIdx) { m_interLayerPredLayerIdc[layerIdx] = refLayerIdc; } |
---|
2726 | |
---|
2727 | Void setInterLayerPredEnabledFlag ( Bool val ) { m_interLayerPredEnabledFlag = val; } |
---|
2728 | Bool getInterLayerPredEnabledFlag () { return m_interLayerPredEnabledFlag;} |
---|
2729 | |
---|
2730 | #if P0312_VERT_PHASE_ADJ |
---|
2731 | Int getVertPhasePositionFlag (UInt layerIdx) { return m_vertPhasePositionFlag[layerIdx];} |
---|
2732 | Void setVertPhasePositionFlag (Bool b, UInt layerIdx) { m_vertPhasePositionFlag[layerIdx] = b; } |
---|
2733 | #endif |
---|
2734 | |
---|
2735 | Void setNumMotionPredRefLayers(int i) { m_numMotionPredRefLayers = i; } |
---|
2736 | Int getNumMotionPredRefLayers() { return m_numMotionPredRefLayers; } |
---|
2737 | #if REF_IDX_MFM |
---|
2738 | Void setMFMEnabledFlag(Bool flag) { m_bMFMEnabledFlag = flag; } |
---|
2739 | Bool getMFMEnabledFlag() { return m_bMFMEnabledFlag; } |
---|
2740 | #endif |
---|
2741 | |
---|
2742 | TComPic* getRefPic(TComList<TComPic*>& rcListPic, Int poc) { return xGetRefPic( rcListPic, poc ); } |
---|
2743 | |
---|
2744 | Bool isRADL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_R); } |
---|
2745 | Bool isRASL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_R); } |
---|
2746 | |
---|
2747 | #if POC_RESET_RESTRICTIONS |
---|
2748 | Bool isIDR() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL |
---|
2749 | || m_eNalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP); } |
---|
2750 | Bool isCRA() { return m_eNalUnitType == NAL_UNIT_CODED_SLICE_CRA; } |
---|
2751 | Bool isBLA() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_LP |
---|
2752 | || m_eNalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_RADL |
---|
2753 | || m_eNalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP ); } |
---|
2754 | Bool isSLNR() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_TRAIL_N |
---|
2755 | || m_eNalUnitType == NAL_UNIT_CODED_SLICE_TSA_N |
---|
2756 | || m_eNalUnitType == NAL_UNIT_CODED_SLICE_STSA_N |
---|
2757 | || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_N |
---|
2758 | || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_N |
---|
2759 | || m_eNalUnitType == NAL_UNIT_RESERVED_VCL_N10 |
---|
2760 | || m_eNalUnitType == NAL_UNIT_RESERVED_VCL_N12 |
---|
2761 | || m_eNalUnitType == NAL_UNIT_RESERVED_VCL_N14 ); } |
---|
2762 | #endif |
---|
2763 | #if POC_RESET_FLAG |
---|
2764 | Bool getPocResetFlag () { return m_bPocResetFlag; } |
---|
2765 | Void setPocResetFlag (Bool b) { m_bPocResetFlag = b; } |
---|
2766 | Int getPocValueBeforeReset () { return m_pocValueBeforeReset; } |
---|
2767 | Void setPocValueBeforeReset (Int x) { m_pocValueBeforeReset = x ; } |
---|
2768 | #endif |
---|
2769 | Bool getDiscardableFlag () { return m_bDiscardableFlag; } |
---|
2770 | Void setDiscardableFlag (Bool b) { m_bDiscardableFlag = b; } |
---|
2771 | #if O0149_CROSS_LAYER_BLA_FLAG |
---|
2772 | Bool getCrossLayerBLAFlag () { return m_bCrossLayerBLAFlag; } |
---|
2773 | Void setCrossLayerBLAFlag (Bool b) { m_bCrossLayerBLAFlag = b; } |
---|
2774 | #endif |
---|
2775 | |
---|
2776 | #if RPL_INIT_N0316_N0082 |
---|
2777 | Int getNumNegativeRpsCurrTempList(); |
---|
2778 | #endif |
---|
2779 | |
---|
2780 | #if REPN_FORMAT_IN_VPS |
---|
2781 | UInt getPicWidthInLumaSamples(); |
---|
2782 | UInt getPicHeightInLumaSamples(); |
---|
2783 | #if AUXILIARY_PICTURES |
---|
2784 | ChromaFormat getChromaFormatIdc(); |
---|
2785 | #else |
---|
2786 | UInt getChromaFormatIdc(); |
---|
2787 | #endif |
---|
2788 | UInt getBitDepthY(); |
---|
2789 | UInt getBitDepthC(); |
---|
2790 | Int getQpBDOffsetY(); |
---|
2791 | Int getQpBDOffsetC(); |
---|
2792 | |
---|
2793 | #if R0156_CONF_WINDOW_IN_REP_FORMAT |
---|
2794 | Window& getConformanceWindow(); |
---|
2795 | #endif |
---|
2796 | #endif |
---|
2797 | |
---|
2798 | Void setILRPic(TComPic **pcIlpPic); |
---|
2799 | #if POC_RESET_IDC_SIGNALLING |
---|
2800 | Int getPocResetIdc () { return m_pocResetIdc; } |
---|
2801 | Void setPocResetIdc (Int b) { m_pocResetIdc = b; } |
---|
2802 | Int getPocResetPeriodId () { return m_pocResetPeriodId; } |
---|
2803 | Void setPocResetPeriodId (Int b) { m_pocResetPeriodId = b; } |
---|
2804 | Bool getFullPocResetFlag () { return m_fullPocResetFlag; } |
---|
2805 | Void setFullPocResetFlag (Bool b) { m_fullPocResetFlag = b; } |
---|
2806 | Int getPocLsbVal () { return m_pocLsbVal; } |
---|
2807 | Void setPocLsbVal (Int b) { m_pocLsbVal = b; } |
---|
2808 | #if P0297_VPS_POC_LSB_ALIGNED_FLAG |
---|
2809 | Void setPocMsbNeeded (Bool x) { m_pocMsbValNeeded = x; } |
---|
2810 | Bool getPocMsbNeeded () { return m_pocMsbValNeeded; } |
---|
2811 | Int getPocResetDeltaPoc () { return m_pocResetDeltaPoc; } |
---|
2812 | Void setPocResetDeltaPoc (Int x) { m_pocResetDeltaPoc = x; } |
---|
2813 | #endif |
---|
2814 | Int getPocMsbVal () { return m_pocMsbVal; } |
---|
2815 | Void setPocMsbVal (Int b) { m_pocMsbVal = b; } |
---|
2816 | Bool getPocMsbValPresentFlag () { return m_pocMsbValPresentFlag; } |
---|
2817 | Void setPocMsbValPresentFlag (Bool x) { m_pocMsbValPresentFlag = x; } |
---|
2818 | Bool getPocMsbValRequiredFlag () { return m_pocMsbValRequiredFlag; } |
---|
2819 | Void setPocMsbValRequiredFlag (Bool x) { m_pocMsbValRequiredFlag = x; } |
---|
2820 | #endif |
---|
2821 | |
---|
2822 | #if NO_OUTPUT_OF_PRIOR_PICS |
---|
2823 | Bool getBlaPicFlag (); |
---|
2824 | Bool getCraPicFlag (); |
---|
2825 | #endif |
---|
2826 | #if POC_RESET_IDC_DECODER |
---|
2827 | Bool getRaslPicFlag (); |
---|
2828 | Bool getRadlPicFlag (); |
---|
2829 | #endif |
---|
2830 | #if POC_RESET_IDC_DECODER || POC_RESET_IDC_ENCODER |
---|
2831 | Int getPicOrderCntLsb() { return m_picOrderCntLsb; } |
---|
2832 | Void setPicOrderCntLsb(Int x) { m_picOrderCntLsb = x; } |
---|
2833 | #endif |
---|
2834 | |
---|
2835 | #if POC_RESET_IDC_ENCODER |
---|
2836 | Int getPocValueBeforeReset () { return m_pocValueBeforeReset; } |
---|
2837 | Void setPocValueBeforeReset (Int x) { m_pocValueBeforeReset = x ; } |
---|
2838 | Void decrementRefPocValues(Int const decrementValue); |
---|
2839 | Int getCurrMsb( Int currLsb, Int prevLsb, Int prevMsb, Int maxLsbVal ); |
---|
2840 | #endif |
---|
2841 | Int getReferenceLayerIdc( UInt refLayerId ); |
---|
2842 | |
---|
2843 | #endif //SVC_EXTENSION |
---|
2844 | protected: |
---|
2845 | TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, Int poc); |
---|
2846 | TComPic* xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb); |
---|
2847 | };// END CLASS DEFINITION TComSlice |
---|
2848 | |
---|
2849 | |
---|
2850 | template <class T> class ParameterSetMap |
---|
2851 | { |
---|
2852 | public: |
---|
2853 | ParameterSetMap(Int maxId) |
---|
2854 | :m_maxId (maxId) |
---|
2855 | {} |
---|
2856 | |
---|
2857 | ~ParameterSetMap() |
---|
2858 | { |
---|
2859 | for (typename std::map<Int,T *>::iterator i = m_paramsetMap.begin(); i!= m_paramsetMap.end(); i++) |
---|
2860 | { |
---|
2861 | delete (*i).second; |
---|
2862 | } |
---|
2863 | } |
---|
2864 | |
---|
2865 | Void storePS(Int psId, T *ps) |
---|
2866 | { |
---|
2867 | assert ( psId < m_maxId ); |
---|
2868 | if ( m_paramsetMap.find(psId) != m_paramsetMap.end() ) |
---|
2869 | { |
---|
2870 | delete m_paramsetMap[psId]; |
---|
2871 | } |
---|
2872 | m_paramsetMap[psId] = ps; |
---|
2873 | } |
---|
2874 | |
---|
2875 | Void mergePSList(ParameterSetMap<T> &rPsList) |
---|
2876 | { |
---|
2877 | for (typename std::map<Int,T *>::iterator i = rPsList.m_paramsetMap.begin(); i!= rPsList.m_paramsetMap.end(); i++) |
---|
2878 | { |
---|
2879 | storePS(i->first, i->second); |
---|
2880 | } |
---|
2881 | rPsList.m_paramsetMap.clear(); |
---|
2882 | } |
---|
2883 | |
---|
2884 | |
---|
2885 | T* getPS(Int psId) |
---|
2886 | { |
---|
2887 | return ( m_paramsetMap.find(psId) == m_paramsetMap.end() ) ? NULL : m_paramsetMap[psId]; |
---|
2888 | } |
---|
2889 | |
---|
2890 | T* getFirstPS() |
---|
2891 | { |
---|
2892 | return (m_paramsetMap.begin() == m_paramsetMap.end() ) ? NULL : m_paramsetMap.begin()->second; |
---|
2893 | } |
---|
2894 | |
---|
2895 | private: |
---|
2896 | std::map<Int,T *> m_paramsetMap; |
---|
2897 | Int m_maxId; |
---|
2898 | }; |
---|
2899 | |
---|
2900 | class ParameterSetManager |
---|
2901 | { |
---|
2902 | public: |
---|
2903 | ParameterSetManager(); |
---|
2904 | virtual ~ParameterSetManager(); |
---|
2905 | |
---|
2906 | //! store sequence parameter set and take ownership of it |
---|
2907 | Void storeVPS(TComVPS *vps) { m_vpsMap.storePS( vps->getVPSId(), vps); }; |
---|
2908 | //! get pointer to existing video parameter set |
---|
2909 | TComVPS* getVPS(Int vpsId) { return m_vpsMap.getPS(vpsId); }; |
---|
2910 | TComVPS* getFirstVPS() { return m_vpsMap.getFirstPS(); }; |
---|
2911 | |
---|
2912 | //! store sequence parameter set and take ownership of it |
---|
2913 | Void storeSPS(TComSPS *sps) { m_spsMap.storePS( sps->getSPSId(), sps); }; |
---|
2914 | //! get pointer to existing sequence parameter set |
---|
2915 | TComSPS* getSPS(Int spsId) { return m_spsMap.getPS(spsId); }; |
---|
2916 | TComSPS* getFirstSPS() { return m_spsMap.getFirstPS(); }; |
---|
2917 | |
---|
2918 | //! store picture parameter set and take ownership of it |
---|
2919 | Void storePPS(TComPPS *pps) { m_ppsMap.storePS( pps->getPPSId(), pps); }; |
---|
2920 | //! get pointer to existing picture parameter set |
---|
2921 | TComPPS* getPPS(Int ppsId) { return m_ppsMap.getPS(ppsId); }; |
---|
2922 | TComPPS* getFirstPPS() { return m_ppsMap.getFirstPS(); }; |
---|
2923 | |
---|
2924 | //! activate a SPS from a active parameter sets SEI message |
---|
2925 | //! \returns true, if activation is successful |
---|
2926 | Bool activateSPSWithSEI(Int SPSId); |
---|
2927 | |
---|
2928 | //! activate a PPS and depending on isIDR parameter also SPS and VPS |
---|
2929 | //! \returns true, if activation is successful |
---|
2930 | Bool activatePPS(Int ppsId, Bool isIRAP); |
---|
2931 | |
---|
2932 | TComVPS* getActiveVPS(){ return m_vpsMap.getPS(m_activeVPSId); }; |
---|
2933 | TComSPS* getActiveSPS(){ return m_spsMap.getPS(m_activeSPSId); }; |
---|
2934 | TComPPS* getActivePPS(){ return m_ppsMap.getPS(m_activePPSId); }; |
---|
2935 | |
---|
2936 | protected: |
---|
2937 | |
---|
2938 | #if SVC_EXTENSION |
---|
2939 | static ParameterSetMap<TComVPS> m_vpsMap; |
---|
2940 | static ParameterSetMap<TComSPS> m_spsMap; |
---|
2941 | static ParameterSetMap<TComPPS> m_ppsMap; |
---|
2942 | #else |
---|
2943 | ParameterSetMap<TComVPS> m_vpsMap; |
---|
2944 | ParameterSetMap<TComSPS> m_spsMap; |
---|
2945 | ParameterSetMap<TComPPS> m_ppsMap; |
---|
2946 | #endif |
---|
2947 | |
---|
2948 | #if SVC_EXTENSION |
---|
2949 | static Int m_activeVPSId; |
---|
2950 | #else |
---|
2951 | Int m_activeVPSId; |
---|
2952 | #endif |
---|
2953 | Int m_activeSPSId; |
---|
2954 | Int m_activePPSId; |
---|
2955 | }; |
---|
2956 | |
---|
2957 | //! \} |
---|
2958 | |
---|
2959 | #endif // __TCOMSLICE__ |
---|