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