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-2013, 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 | Void destroy (); |
---|
143 | |
---|
144 | |
---|
145 | TComReferencePictureSet* getReferencePictureSet(Int referencePictureSetNum); |
---|
146 | Int getNumberOfReferencePictureSets(); |
---|
147 | Void setNumberOfReferencePictureSets(Int numberOfReferencePictureSets); |
---|
148 | }; |
---|
149 | |
---|
150 | /// SCALING_LIST class |
---|
151 | class TComScalingList |
---|
152 | { |
---|
153 | public: |
---|
154 | TComScalingList(); |
---|
155 | virtual ~TComScalingList(); |
---|
156 | Void setScalingListPresentFlag (Bool b) { m_scalingListPresentFlag = b; } |
---|
157 | Bool getScalingListPresentFlag () { return m_scalingListPresentFlag; } |
---|
158 | |
---|
159 | #if IL_SL_SIGNALLING_N0371 |
---|
160 | UInt m_layerId; |
---|
161 | |
---|
162 | Void setPredScalingListFlag (Bool b) { m_predScalingListFlag = b; } |
---|
163 | Bool getPredScalingListFlag () { return m_predScalingListFlag; } |
---|
164 | Void setScalingListRefLayerId (UInt b) { m_scalingListRefLayerId = b; } |
---|
165 | UInt getScalingListRefLayerId () { return m_scalingListRefLayerId; } |
---|
166 | #endif |
---|
167 | |
---|
168 | Int* getScalingListAddress (UInt sizeId, UInt listId) { return m_scalingListCoef[sizeId][listId]; } //!< get matrix coefficient |
---|
169 | Bool checkPredMode (UInt sizeId, UInt listId); |
---|
170 | Void setRefMatrixId (UInt sizeId, UInt listId, UInt u) { m_refMatrixId[sizeId][listId] = u; } //!< set reference matrix ID |
---|
171 | UInt getRefMatrixId (UInt sizeId, UInt listId) { return m_refMatrixId[sizeId][listId]; } //!< get reference matrix ID |
---|
172 | Int* getScalingListDefaultAddress (UInt sizeId, UInt listId); //!< get default matrix coefficient |
---|
173 | |
---|
174 | #if IL_SL_SIGNALLING_N0371 |
---|
175 | Void processDefaultMarix (UInt sizeId, UInt listId, UInt layerId ); |
---|
176 | #else |
---|
177 | Void processDefaultMarix (UInt sizeId, UInt listId); |
---|
178 | #endif |
---|
179 | |
---|
180 | Void setScalingListDC (UInt sizeId, UInt listId, UInt u) { m_scalingListDC[sizeId][listId] = u; } //!< set DC value |
---|
181 | |
---|
182 | Int getScalingListDC (UInt sizeId, UInt listId) { return m_scalingListDC[sizeId][listId]; } //!< get DC value |
---|
183 | |
---|
184 | #if IL_SL_SIGNALLING_N0371 |
---|
185 | Void setLayerId(UInt layerId) { m_layerId = layerId; } |
---|
186 | UInt getLayerId() { return m_layerId; } |
---|
187 | Void checkDcOfMatrix ( UInt m_layerId ); |
---|
188 | #else |
---|
189 | Void checkDcOfMatrix (); |
---|
190 | #endif |
---|
191 | |
---|
192 | Void processRefMatrix (UInt sizeId, UInt listId , UInt refListId ); |
---|
193 | Bool xParseScalingList (Char* pchFile); |
---|
194 | |
---|
195 | private: |
---|
196 | Void init (); |
---|
197 | Void destroy (); |
---|
198 | Int m_scalingListDC [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< the DC value of the matrix coefficient for 16x16 |
---|
199 | Bool m_useDefaultScalingMatrixFlag [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< UseDefaultScalingMatrixFlag |
---|
200 | UInt m_refMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< RefMatrixID |
---|
201 | Bool m_scalingListPresentFlag; //!< flag for using default matrix |
---|
202 | |
---|
203 | #if IL_SL_SIGNALLING_N0371 |
---|
204 | Bool m_predScalingListFlag; //!< flag for inter-layer scaling-list prediction |
---|
205 | UInt m_scalingListRefLayerId; //!< scaling_list_ref_layer_id |
---|
206 | #endif |
---|
207 | |
---|
208 | UInt m_predMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< reference list index |
---|
209 | Int *m_scalingListCoef [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< quantization matrix |
---|
210 | }; |
---|
211 | |
---|
212 | class ProfileTierLevel |
---|
213 | { |
---|
214 | Int m_profileSpace; |
---|
215 | Bool m_tierFlag; |
---|
216 | Int m_profileIdc; |
---|
217 | Bool m_profileCompatibilityFlag[32]; |
---|
218 | Int m_levelIdc; |
---|
219 | |
---|
220 | Bool m_progressiveSourceFlag; |
---|
221 | Bool m_interlacedSourceFlag; |
---|
222 | Bool m_nonPackedConstraintFlag; |
---|
223 | Bool m_frameOnlyConstraintFlag; |
---|
224 | |
---|
225 | public: |
---|
226 | ProfileTierLevel(); |
---|
227 | |
---|
228 | Int getProfileSpace() const { return m_profileSpace; } |
---|
229 | Void setProfileSpace(Int x) { m_profileSpace = x; } |
---|
230 | |
---|
231 | Bool getTierFlag() const { return m_tierFlag; } |
---|
232 | Void setTierFlag(Bool x) { m_tierFlag = x; } |
---|
233 | |
---|
234 | Int getProfileIdc() const { return m_profileIdc; } |
---|
235 | Void setProfileIdc(Int x) { m_profileIdc = x; } |
---|
236 | |
---|
237 | Bool getProfileCompatibilityFlag(Int i) const { return m_profileCompatibilityFlag[i]; } |
---|
238 | Void setProfileCompatibilityFlag(Int i, Bool x) { m_profileCompatibilityFlag[i] = x; } |
---|
239 | |
---|
240 | Int getLevelIdc() const { return m_levelIdc; } |
---|
241 | Void setLevelIdc(Int x) { m_levelIdc = x; } |
---|
242 | |
---|
243 | Bool getProgressiveSourceFlag() const { return m_progressiveSourceFlag; } |
---|
244 | Void setProgressiveSourceFlag(Bool b) { m_progressiveSourceFlag = b; } |
---|
245 | |
---|
246 | Bool getInterlacedSourceFlag() const { return m_interlacedSourceFlag; } |
---|
247 | Void setInterlacedSourceFlag(Bool b) { m_interlacedSourceFlag = b; } |
---|
248 | |
---|
249 | Bool getNonPackedConstraintFlag() const { return m_nonPackedConstraintFlag; } |
---|
250 | Void setNonPackedConstraintFlag(Bool b) { m_nonPackedConstraintFlag = b; } |
---|
251 | |
---|
252 | Bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; } |
---|
253 | Void setFrameOnlyConstraintFlag(Bool b) { m_frameOnlyConstraintFlag = b; } |
---|
254 | #if VPS_EXTN_PROFILE_INFO |
---|
255 | Void copyProfileInfo(ProfileTierLevel *ptl); |
---|
256 | #endif |
---|
257 | }; |
---|
258 | |
---|
259 | |
---|
260 | class TComPTL |
---|
261 | { |
---|
262 | ProfileTierLevel m_generalPTL; |
---|
263 | ProfileTierLevel m_subLayerPTL[6]; // max. value of max_sub_layers_minus1 is 6 |
---|
264 | Bool m_subLayerProfilePresentFlag[6]; |
---|
265 | Bool m_subLayerLevelPresentFlag[6]; |
---|
266 | |
---|
267 | public: |
---|
268 | TComPTL(); |
---|
269 | Bool getSubLayerProfilePresentFlag(Int i) const { return m_subLayerProfilePresentFlag[i]; } |
---|
270 | Void setSubLayerProfilePresentFlag(Int i, Bool x) { m_subLayerProfilePresentFlag[i] = x; } |
---|
271 | |
---|
272 | Bool getSubLayerLevelPresentFlag(Int i) const { return m_subLayerLevelPresentFlag[i]; } |
---|
273 | Void setSubLayerLevelPresentFlag(Int i, Bool x) { m_subLayerLevelPresentFlag[i] = x; } |
---|
274 | |
---|
275 | ProfileTierLevel* getGeneralPTL() { return &m_generalPTL; } |
---|
276 | ProfileTierLevel* getSubLayerPTL(Int i) { return &m_subLayerPTL[i]; } |
---|
277 | #if VPS_EXTN_PROFILE_INFO |
---|
278 | Void copyProfileInfo(TComPTL *ptl); |
---|
279 | #endif |
---|
280 | }; |
---|
281 | /// VPS class |
---|
282 | |
---|
283 | struct HrdSubLayerInfo |
---|
284 | { |
---|
285 | Bool fixedPicRateFlag; |
---|
286 | Bool fixedPicRateWithinCvsFlag; |
---|
287 | UInt picDurationInTcMinus1; |
---|
288 | Bool lowDelayHrdFlag; |
---|
289 | UInt cpbCntMinus1; |
---|
290 | UInt bitRateValueMinus1[MAX_CPB_CNT][2]; |
---|
291 | UInt cpbSizeValue [MAX_CPB_CNT][2]; |
---|
292 | UInt ducpbSizeValue [MAX_CPB_CNT][2]; |
---|
293 | UInt cbrFlag [MAX_CPB_CNT][2]; |
---|
294 | UInt duBitRateValue [MAX_CPB_CNT][2]; |
---|
295 | }; |
---|
296 | |
---|
297 | class TComHRD |
---|
298 | { |
---|
299 | private: |
---|
300 | Bool m_nalHrdParametersPresentFlag; |
---|
301 | Bool m_vclHrdParametersPresentFlag; |
---|
302 | Bool m_subPicCpbParamsPresentFlag; |
---|
303 | UInt m_tickDivisorMinus2; |
---|
304 | UInt m_duCpbRemovalDelayLengthMinus1; |
---|
305 | Bool m_subPicCpbParamsInPicTimingSEIFlag; |
---|
306 | UInt m_dpbOutputDelayDuLengthMinus1; |
---|
307 | UInt m_bitRateScale; |
---|
308 | UInt m_cpbSizeScale; |
---|
309 | UInt m_ducpbSizeScale; |
---|
310 | UInt m_initialCpbRemovalDelayLengthMinus1; |
---|
311 | UInt m_cpbRemovalDelayLengthMinus1; |
---|
312 | UInt m_dpbOutputDelayLengthMinus1; |
---|
313 | UInt m_numDU; |
---|
314 | HrdSubLayerInfo m_HRD[MAX_TLAYER]; |
---|
315 | |
---|
316 | public: |
---|
317 | TComHRD() |
---|
318 | :m_nalHrdParametersPresentFlag(0) |
---|
319 | ,m_vclHrdParametersPresentFlag(0) |
---|
320 | ,m_subPicCpbParamsPresentFlag(false) |
---|
321 | ,m_tickDivisorMinus2(0) |
---|
322 | ,m_duCpbRemovalDelayLengthMinus1(0) |
---|
323 | ,m_subPicCpbParamsInPicTimingSEIFlag(false) |
---|
324 | ,m_dpbOutputDelayDuLengthMinus1(0) |
---|
325 | ,m_bitRateScale(0) |
---|
326 | ,m_cpbSizeScale(0) |
---|
327 | ,m_initialCpbRemovalDelayLengthMinus1(0) |
---|
328 | ,m_cpbRemovalDelayLengthMinus1(0) |
---|
329 | ,m_dpbOutputDelayLengthMinus1(0) |
---|
330 | {} |
---|
331 | |
---|
332 | virtual ~TComHRD() {} |
---|
333 | |
---|
334 | Void setNalHrdParametersPresentFlag ( Bool flag ) { m_nalHrdParametersPresentFlag = flag; } |
---|
335 | Bool getNalHrdParametersPresentFlag ( ) { return m_nalHrdParametersPresentFlag; } |
---|
336 | |
---|
337 | Void setVclHrdParametersPresentFlag ( Bool flag ) { m_vclHrdParametersPresentFlag = flag; } |
---|
338 | Bool getVclHrdParametersPresentFlag ( ) { return m_vclHrdParametersPresentFlag; } |
---|
339 | |
---|
340 | Void setSubPicCpbParamsPresentFlag ( Bool flag ) { m_subPicCpbParamsPresentFlag = flag; } |
---|
341 | Bool getSubPicCpbParamsPresentFlag ( ) { return m_subPicCpbParamsPresentFlag; } |
---|
342 | |
---|
343 | Void setTickDivisorMinus2 ( UInt value ) { m_tickDivisorMinus2 = value; } |
---|
344 | UInt getTickDivisorMinus2 ( ) { return m_tickDivisorMinus2; } |
---|
345 | |
---|
346 | Void setDuCpbRemovalDelayLengthMinus1 ( UInt value ) { m_duCpbRemovalDelayLengthMinus1 = value; } |
---|
347 | UInt getDuCpbRemovalDelayLengthMinus1 ( ) { return m_duCpbRemovalDelayLengthMinus1; } |
---|
348 | |
---|
349 | Void setSubPicCpbParamsInPicTimingSEIFlag ( Bool flag) { m_subPicCpbParamsInPicTimingSEIFlag = flag; } |
---|
350 | Bool getSubPicCpbParamsInPicTimingSEIFlag () { return m_subPicCpbParamsInPicTimingSEIFlag; } |
---|
351 | |
---|
352 | Void setDpbOutputDelayDuLengthMinus1 (UInt value ) { m_dpbOutputDelayDuLengthMinus1 = value; } |
---|
353 | UInt getDpbOutputDelayDuLengthMinus1 () { return m_dpbOutputDelayDuLengthMinus1; } |
---|
354 | |
---|
355 | Void setBitRateScale ( UInt value ) { m_bitRateScale = value; } |
---|
356 | UInt getBitRateScale ( ) { return m_bitRateScale; } |
---|
357 | |
---|
358 | Void setCpbSizeScale ( UInt value ) { m_cpbSizeScale = value; } |
---|
359 | UInt getCpbSizeScale ( ) { return m_cpbSizeScale; } |
---|
360 | Void setDuCpbSizeScale ( UInt value ) { m_ducpbSizeScale = value; } |
---|
361 | UInt getDuCpbSizeScale ( ) { return m_ducpbSizeScale; } |
---|
362 | |
---|
363 | Void setInitialCpbRemovalDelayLengthMinus1( UInt value ) { m_initialCpbRemovalDelayLengthMinus1 = value; } |
---|
364 | UInt getInitialCpbRemovalDelayLengthMinus1( ) { return m_initialCpbRemovalDelayLengthMinus1; } |
---|
365 | |
---|
366 | Void setCpbRemovalDelayLengthMinus1 ( UInt value ) { m_cpbRemovalDelayLengthMinus1 = value; } |
---|
367 | UInt getCpbRemovalDelayLengthMinus1 ( ) { return m_cpbRemovalDelayLengthMinus1; } |
---|
368 | |
---|
369 | Void setDpbOutputDelayLengthMinus1 ( UInt value ) { m_dpbOutputDelayLengthMinus1 = value; } |
---|
370 | UInt getDpbOutputDelayLengthMinus1 ( ) { return m_dpbOutputDelayLengthMinus1; } |
---|
371 | |
---|
372 | Void setFixedPicRateFlag ( Int layer, Bool flag ) { m_HRD[layer].fixedPicRateFlag = flag; } |
---|
373 | Bool getFixedPicRateFlag ( Int layer ) { return m_HRD[layer].fixedPicRateFlag; } |
---|
374 | |
---|
375 | Void setFixedPicRateWithinCvsFlag ( Int layer, Bool flag ) { m_HRD[layer].fixedPicRateWithinCvsFlag = flag; } |
---|
376 | Bool getFixedPicRateWithinCvsFlag ( Int layer ) { return m_HRD[layer].fixedPicRateWithinCvsFlag; } |
---|
377 | |
---|
378 | Void setPicDurationInTcMinus1 ( Int layer, UInt value ) { m_HRD[layer].picDurationInTcMinus1 = value; } |
---|
379 | UInt getPicDurationInTcMinus1 ( Int layer ) { return m_HRD[layer].picDurationInTcMinus1; } |
---|
380 | |
---|
381 | Void setLowDelayHrdFlag ( Int layer, Bool flag ) { m_HRD[layer].lowDelayHrdFlag = flag; } |
---|
382 | Bool getLowDelayHrdFlag ( Int layer ) { return m_HRD[layer].lowDelayHrdFlag; } |
---|
383 | |
---|
384 | Void setCpbCntMinus1 ( Int layer, UInt value ) { m_HRD[layer].cpbCntMinus1 = value; } |
---|
385 | UInt getCpbCntMinus1 ( Int layer ) { return m_HRD[layer].cpbCntMinus1; } |
---|
386 | |
---|
387 | Void setBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].bitRateValueMinus1[cpbcnt][nalOrVcl] = value; } |
---|
388 | UInt getBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].bitRateValueMinus1[cpbcnt][nalOrVcl]; } |
---|
389 | |
---|
390 | Void setCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].cpbSizeValue[cpbcnt][nalOrVcl] = value; } |
---|
391 | UInt getCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].cpbSizeValue[cpbcnt][nalOrVcl]; } |
---|
392 | Void setDuCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].ducpbSizeValue[cpbcnt][nalOrVcl] = value; } |
---|
393 | UInt getDuCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].ducpbSizeValue[cpbcnt][nalOrVcl]; } |
---|
394 | Void setDuBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].duBitRateValue[cpbcnt][nalOrVcl] = value; } |
---|
395 | UInt getDuBitRateValueMinus1 (Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].duBitRateValue[cpbcnt][nalOrVcl]; } |
---|
396 | Void setCbrFlag ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].cbrFlag[cpbcnt][nalOrVcl] = value; } |
---|
397 | Bool getCbrFlag ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].cbrFlag[cpbcnt][nalOrVcl]; } |
---|
398 | |
---|
399 | Void setNumDU ( UInt value ) { m_numDU = value; } |
---|
400 | UInt getNumDU ( ) { return m_numDU; } |
---|
401 | Bool getCpbDpbDelaysPresentFlag() { return getNalHrdParametersPresentFlag() || getVclHrdParametersPresentFlag(); } |
---|
402 | }; |
---|
403 | |
---|
404 | class TimingInfo |
---|
405 | { |
---|
406 | Bool m_timingInfoPresentFlag; |
---|
407 | UInt m_numUnitsInTick; |
---|
408 | UInt m_timeScale; |
---|
409 | Bool m_pocProportionalToTimingFlag; |
---|
410 | Int m_numTicksPocDiffOneMinus1; |
---|
411 | public: |
---|
412 | TimingInfo() |
---|
413 | : m_timingInfoPresentFlag(false) |
---|
414 | , m_numUnitsInTick(1001) |
---|
415 | , m_timeScale(60000) |
---|
416 | , m_pocProportionalToTimingFlag(false) |
---|
417 | , m_numTicksPocDiffOneMinus1(0) {} |
---|
418 | |
---|
419 | Void setTimingInfoPresentFlag ( Bool flag ) { m_timingInfoPresentFlag = flag; } |
---|
420 | Bool getTimingInfoPresentFlag ( ) { return m_timingInfoPresentFlag; } |
---|
421 | |
---|
422 | Void setNumUnitsInTick ( UInt value ) { m_numUnitsInTick = value; } |
---|
423 | UInt getNumUnitsInTick ( ) { return m_numUnitsInTick; } |
---|
424 | |
---|
425 | Void setTimeScale ( UInt value ) { m_timeScale = value; } |
---|
426 | UInt getTimeScale ( ) { return m_timeScale; } |
---|
427 | |
---|
428 | Bool getPocProportionalToTimingFlag ( ) { return m_pocProportionalToTimingFlag; } |
---|
429 | Void setPocProportionalToTimingFlag (Bool x ) { m_pocProportionalToTimingFlag = x; } |
---|
430 | |
---|
431 | Int getNumTicksPocDiffOneMinus1 ( ) { return m_numTicksPocDiffOneMinus1; } |
---|
432 | Void setNumTicksPocDiffOneMinus1 (Int x ) { m_numTicksPocDiffOneMinus1 = x; } |
---|
433 | }; |
---|
434 | |
---|
435 | #if REPN_FORMAT_IN_VPS |
---|
436 | class RepFormat |
---|
437 | { |
---|
438 | #if AUXILIARY_PICTURES |
---|
439 | ChromaFormat m_chromaFormatVpsIdc; |
---|
440 | #else |
---|
441 | Int m_chromaFormatVpsIdc; |
---|
442 | #endif |
---|
443 | Bool m_separateColourPlaneVpsFlag; |
---|
444 | Int m_picWidthVpsInLumaSamples; |
---|
445 | Int m_picHeightVpsInLumaSamples; |
---|
446 | Int m_bitDepthVpsLuma; // coded as minus8 |
---|
447 | Int m_bitDepthVpsChroma; // coded as minus8 |
---|
448 | |
---|
449 | public: |
---|
450 | RepFormat(); |
---|
451 | |
---|
452 | #if AUXILIARY_PICTURES |
---|
453 | ChromaFormat getChromaFormatVpsIdc() { return m_chromaFormatVpsIdc; } |
---|
454 | Void setChromaFormatVpsIdc(ChromaFormat x) { m_chromaFormatVpsIdc = x; } |
---|
455 | #else |
---|
456 | Int getChromaFormatVpsIdc() { return m_chromaFormatVpsIdc; } |
---|
457 | Void setChromaFormatVpsIdc(Int x) { m_chromaFormatVpsIdc = x; } |
---|
458 | #endif |
---|
459 | |
---|
460 | Bool getSeparateColourPlaneVpsFlag() { return m_separateColourPlaneVpsFlag; } |
---|
461 | Void setSeparateColourPlaneVpsFlag(Bool x) { m_separateColourPlaneVpsFlag = x; } |
---|
462 | |
---|
463 | Int getPicWidthVpsInLumaSamples() { return m_picWidthVpsInLumaSamples; } |
---|
464 | Void setPicWidthVpsInLumaSamples(Int x) { m_picWidthVpsInLumaSamples = x; } |
---|
465 | |
---|
466 | Int getPicHeightVpsInLumaSamples() { return m_picHeightVpsInLumaSamples; } |
---|
467 | Void setPicHeightVpsInLumaSamples(Int x) { m_picHeightVpsInLumaSamples = x; } |
---|
468 | |
---|
469 | Int getBitDepthVpsLuma() { return m_bitDepthVpsLuma; } |
---|
470 | Void setBitDepthVpsLuma(Int x) { m_bitDepthVpsLuma = x; } |
---|
471 | |
---|
472 | Int getBitDepthVpsChroma() { return m_bitDepthVpsChroma; } |
---|
473 | Void setBitDepthVpsChroma(Int x) { m_bitDepthVpsChroma = x; } |
---|
474 | }; |
---|
475 | #endif |
---|
476 | class TComVPS |
---|
477 | { |
---|
478 | private: |
---|
479 | Int m_VPSId; |
---|
480 | UInt m_uiMaxTLayers; |
---|
481 | UInt m_uiMaxLayers; |
---|
482 | Bool m_bTemporalIdNestingFlag; |
---|
483 | |
---|
484 | UInt m_numReorderPics[MAX_TLAYER]; |
---|
485 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
486 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) |
---|
487 | |
---|
488 | UInt m_numHrdParameters; |
---|
489 | #if !VPS_RENAME |
---|
490 | UInt m_maxNuhReservedZeroLayerId; |
---|
491 | #endif |
---|
492 | TComHRD* m_hrdParameters; |
---|
493 | UInt* m_hrdOpSetIdx; |
---|
494 | Bool* m_cprmsPresentFlag; |
---|
495 | #if !SVC_EXTENSION |
---|
496 | UInt m_numOpSets; |
---|
497 | Bool m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1]; |
---|
498 | #endif |
---|
499 | TComPTL m_pcPTL; |
---|
500 | TimingInfo m_timingInfo; |
---|
501 | |
---|
502 | #if SVC_EXTENSION |
---|
503 | #if DERIVE_LAYER_ID_LIST_VARIABLES |
---|
504 | Int m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
505 | Int m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
506 | #endif |
---|
507 | #if IL_SL_SIGNALLING_N0371 |
---|
508 | Bool m_scalingListLayerDependency[MAX_LAYERS][MAX_LAYERS]; // layer dependency for scaling list |
---|
509 | #endif |
---|
510 | #if VPS_EXTN_OFFSET |
---|
511 | UInt m_extensionOffset; |
---|
512 | #endif |
---|
513 | #if VPS_RENAME |
---|
514 | UInt m_maxLayerId; |
---|
515 | UInt m_numLayerSets; |
---|
516 | Bool m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
517 | #endif |
---|
518 | |
---|
519 | // ------------------------------------------ |
---|
520 | // Variables related to VPS extensions |
---|
521 | // ------------------------------------------ |
---|
522 | #if VPS_EXTN_MASK_AND_DIM_INFO |
---|
523 | Bool m_avcBaseLayerFlag; // For now, always set to true. |
---|
524 | Bool m_splittingFlag; |
---|
525 | Bool m_scalabilityMask[MAX_VPS_NUM_SCALABILITY_TYPES]; |
---|
526 | UInt m_dimensionIdLen[MAX_VPS_NUM_SCALABILITY_TYPES]; |
---|
527 | Bool m_nuhLayerIdPresentFlag; |
---|
528 | UInt m_layerIdInNuh[MAX_VPS_LAYER_ID_PLUS1]; // Maps layer ID in the VPS with layer_id_in_nuh |
---|
529 | UInt m_dimensionId[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_NUM_SCALABILITY_TYPES]; |
---|
530 | |
---|
531 | // Below are derived variables |
---|
532 | UInt m_numScalabilityTypes; |
---|
533 | UInt m_layerIdInVps[MAX_VPS_LAYER_ID_PLUS1]; // Maps layer_id_in_nuh with the layer ID in the VPS |
---|
534 | #endif |
---|
535 | #if ILP_SSH_SIG |
---|
536 | Bool m_ilpSshSignalingEnabledFlag; |
---|
537 | #endif |
---|
538 | #if VPS_EXTN_PROFILE_INFO |
---|
539 | // Profile-tier-level signalling related |
---|
540 | Bool m_profilePresentFlag[MAX_VPS_LAYER_SETS_PLUS1]; // The value with index 0 will not be used. |
---|
541 | UInt m_profileLayerSetRef[MAX_VPS_LAYER_SETS_PLUS1]; // The value with index 0 will not be used. |
---|
542 | std::vector<TComPTL> m_pcPTLForExtn; |
---|
543 | #endif |
---|
544 | #if VPS_EXTN_OP_LAYER_SETS |
---|
545 | // .. More declarations here |
---|
546 | // Target output layer signalling related |
---|
547 | UInt m_numOutputLayerSets; |
---|
548 | UInt m_outputLayerSetIdx[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
549 | Bool m_outputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
550 | #endif |
---|
551 | #if VPS_EXTN_DIRECT_REF_LAYERS |
---|
552 | Bool m_directDependencyFlag[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
553 | UInt m_numDirectRefLayers[MAX_VPS_LAYER_ID_PLUS1]; |
---|
554 | UInt m_refLayerId[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
555 | #if M0457_PREDICTION_INDICATIONS |
---|
556 | UInt m_directDepTypeLen; |
---|
557 | UInt m_directDependencyType[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
558 | #endif |
---|
559 | #endif |
---|
560 | UInt m_numProfileTierLevel; |
---|
561 | Bool m_moreOutputLayerSetsThanDefaultFlag; |
---|
562 | Int m_numAddOutputLayerSets; |
---|
563 | Bool m_defaultOneTargetOutputLayerFlag; |
---|
564 | Int m_profileLevelTierIdx[64]; |
---|
565 | #if JCTVC_M0458_INTERLAYER_RPS_SIG |
---|
566 | Bool m_maxOneActiveRefLayerFlag; |
---|
567 | #endif |
---|
568 | #if O0062_POC_LSB_NOT_PRESENT_FLAG |
---|
569 | Bool m_pocLsbNotPresentFlag[MAX_VPS_LAYER_ID_PLUS1]; |
---|
570 | #endif |
---|
571 | #if N0147_IRAP_ALIGN_FLAG |
---|
572 | Bool m_crossLayerIrapAlignFlag; |
---|
573 | #endif |
---|
574 | #if JCTVC_M0203_INTERLAYER_PRED_IDC |
---|
575 | #if O0225_MAX_TID_FOR_REF_LAYERS |
---|
576 | UInt m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
577 | #else |
---|
578 | UInt m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1]; |
---|
579 | #endif |
---|
580 | #endif |
---|
581 | #if N0120_MAX_TID_REF_PRESENT_FLAG |
---|
582 | Bool m_maxTidRefPresentFlag; |
---|
583 | #endif |
---|
584 | #if M0040_ADAPTIVE_RESOLUTION_CHANGE |
---|
585 | Bool m_singleLayerForNonIrapFlag; |
---|
586 | #endif |
---|
587 | #if TILE_BOUNDARY_ALIGNED_FLAG |
---|
588 | Bool m_tileBoundariesAlignedFlag[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
589 | #endif |
---|
590 | #if N0160_VUI_EXT_ILP_REF |
---|
591 | Bool m_numIlpRestrictedRefLayers; |
---|
592 | Int m_minSpatialSegmentOffsetPlus1[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
593 | Bool m_ctuBasedOffsetEnabledFlag [MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
594 | Int m_minHorizontalCtuOffsetPlus1 [MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
595 | #endif |
---|
596 | #if VPS_VUI_BITRATE_PICRATE |
---|
597 | Bool m_bitRatePresentVpsFlag; |
---|
598 | Bool m_picRatePresentVpsFlag; |
---|
599 | Bool m_bitRatePresentFlag [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
600 | Bool m_picRatePresentFlag [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
601 | Int m_avgBitRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
602 | Int m_maxBitRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
603 | Int m_constPicRateIdc [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
604 | Int m_avgPicRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
605 | #endif |
---|
606 | #if REPN_FORMAT_IN_VPS |
---|
607 | Bool m_repFormatIdxPresentFlag; |
---|
608 | Int m_vpsNumRepFormats; // coded as minus1 |
---|
609 | RepFormat m_vpsRepFormat[16]; |
---|
610 | Int m_vpsRepFormatIdx[16]; |
---|
611 | #endif |
---|
612 | #if VIEW_ID_RELATED_SIGNALING |
---|
613 | Int m_viewIdLenMinus1; |
---|
614 | Int m_viewIdVal [MAX_LAYERS]; |
---|
615 | #endif |
---|
616 | |
---|
617 | #if O0215_PHASE_ALIGNMENT |
---|
618 | Bool m_phaseAlignFlag; |
---|
619 | #endif |
---|
620 | #endif //SVC_EXTENSION |
---|
621 | public: |
---|
622 | TComVPS(); |
---|
623 | virtual ~TComVPS(); |
---|
624 | |
---|
625 | Void createHrdParamBuffer() |
---|
626 | { |
---|
627 | m_hrdParameters = new TComHRD[ getNumHrdParameters() ]; |
---|
628 | m_hrdOpSetIdx = new UInt [ getNumHrdParameters() ]; |
---|
629 | m_cprmsPresentFlag = new Bool [ getNumHrdParameters() ]; |
---|
630 | } |
---|
631 | |
---|
632 | TComHRD* getHrdParameters ( UInt i ) { return &m_hrdParameters[ i ]; } |
---|
633 | UInt getHrdOpSetIdx ( UInt i ) { return m_hrdOpSetIdx[ i ]; } |
---|
634 | Void setHrdOpSetIdx ( UInt val, UInt i ) { m_hrdOpSetIdx[ i ] = val; } |
---|
635 | Bool getCprmsPresentFlag ( UInt i ) { return m_cprmsPresentFlag[ i ]; } |
---|
636 | Void setCprmsPresentFlag ( Bool val, UInt i ) { m_cprmsPresentFlag[ i ] = val; } |
---|
637 | |
---|
638 | Int getVPSId () { return m_VPSId; } |
---|
639 | Void setVPSId (Int i) { m_VPSId = i; } |
---|
640 | |
---|
641 | UInt getMaxTLayers () { return m_uiMaxTLayers; } |
---|
642 | Void setMaxTLayers (UInt t) { m_uiMaxTLayers = t; } |
---|
643 | |
---|
644 | UInt getMaxLayers () { return m_uiMaxLayers; } |
---|
645 | Void setMaxLayers (UInt l) { m_uiMaxLayers = l; } |
---|
646 | |
---|
647 | Bool getTemporalNestingFlag () { return m_bTemporalIdNestingFlag; } |
---|
648 | Void setTemporalNestingFlag (Bool t) { m_bTemporalIdNestingFlag = t; } |
---|
649 | |
---|
650 | Void setNumReorderPics(UInt v, UInt tLayer) { m_numReorderPics[tLayer] = v; } |
---|
651 | UInt getNumReorderPics(UInt tLayer) { return m_numReorderPics[tLayer]; } |
---|
652 | |
---|
653 | Void setMaxDecPicBuffering(UInt v, UInt tLayer) { m_uiMaxDecPicBuffering[tLayer] = v; } |
---|
654 | UInt getMaxDecPicBuffering(UInt tLayer) { return m_uiMaxDecPicBuffering[tLayer]; } |
---|
655 | |
---|
656 | Void setMaxLatencyIncrease(UInt v, UInt tLayer) { m_uiMaxLatencyIncrease[tLayer] = v; } |
---|
657 | UInt getMaxLatencyIncrease(UInt tLayer) { return m_uiMaxLatencyIncrease[tLayer]; } |
---|
658 | |
---|
659 | UInt getNumHrdParameters() { return m_numHrdParameters; } |
---|
660 | Void setNumHrdParameters(UInt v) { m_numHrdParameters = v; } |
---|
661 | |
---|
662 | #if !SVC_EXTENSION |
---|
663 | UInt getMaxNuhReservedZeroLayerId() { return m_maxNuhReservedZeroLayerId; } |
---|
664 | Void setMaxNuhReservedZeroLayerId(UInt v) { m_maxNuhReservedZeroLayerId = v; } |
---|
665 | |
---|
666 | UInt getMaxOpSets() { return m_numOpSets; } |
---|
667 | Void setMaxOpSets(UInt v) { m_numOpSets = v; } |
---|
668 | #endif |
---|
669 | Bool getLayerIdIncludedFlag(UInt opsIdx, UInt id) { return m_layerIdIncludedFlag[opsIdx][id]; } |
---|
670 | Void setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id) { m_layerIdIncludedFlag[opsIdx][id] = v; } |
---|
671 | |
---|
672 | TComPTL* getPTL() { return &m_pcPTL; } |
---|
673 | TimingInfo* getTimingInfo() { return &m_timingInfo; } |
---|
674 | |
---|
675 | #if SVC_EXTENSION |
---|
676 | #if DERIVE_LAYER_ID_LIST_VARIABLES |
---|
677 | Int getLayerSetLayerIdList(Int set, Int layerId) { return m_layerSetLayerIdList[set][layerId]; } |
---|
678 | Void setLayerSetLayerIdList(Int set, Int layerId, Int x) { m_layerSetLayerIdList[set][layerId] = x ; } |
---|
679 | |
---|
680 | Int getNumLayersInIdList(Int set) { return m_numLayerInIdList[set]; } |
---|
681 | Void setNumLayersInIdList(Int set, Int x) { m_numLayerInIdList[set] = x ; } |
---|
682 | |
---|
683 | Void deriveLayerIdListVariables(); |
---|
684 | #endif |
---|
685 | |
---|
686 | #if IL_SL_SIGNALLING_N0371 |
---|
687 | Bool checkLayerDependency(UInt i, UInt j); |
---|
688 | Bool getScalingListLayerDependency ( UInt layerId, UInt refLayerId ) { return m_scalingListLayerDependency[layerId][refLayerId]; } |
---|
689 | Void setScalingListLayerDependency ( UInt layerId, UInt refLayerId, Bool val ) { m_scalingListLayerDependency[layerId][refLayerId] = val; } |
---|
690 | #endif |
---|
691 | |
---|
692 | #if VPS_RENAME |
---|
693 | UInt getMaxLayerId() { return m_maxLayerId; } |
---|
694 | Void setMaxLayerId(UInt v) { m_maxLayerId = v; } |
---|
695 | |
---|
696 | UInt getNumLayerSets() { return m_numLayerSets; } |
---|
697 | Void setNumLayerSets(UInt v) { m_numLayerSets = v; } |
---|
698 | #endif |
---|
699 | #if VPS_EXTN_MASK_AND_DIM_INFO |
---|
700 | Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } |
---|
701 | Void setAvcBaseLayerFlag(Bool x) { m_avcBaseLayerFlag = x; } |
---|
702 | |
---|
703 | Bool getSplittingFlag() { return m_splittingFlag; } |
---|
704 | Void setSplittingFlag(Bool x) { m_splittingFlag = x; } |
---|
705 | |
---|
706 | Bool getScalabilityMask(Int id) { return m_scalabilityMask[id]; } |
---|
707 | Void setScalabilityMask(Int id, Bool x) { m_scalabilityMask[id] = x; } |
---|
708 | |
---|
709 | UInt getDimensionIdLen(Int id) { return m_dimensionIdLen[id]; } |
---|
710 | Void setDimensionIdLen(Int id, UInt x) { m_dimensionIdLen[id] = x; } |
---|
711 | |
---|
712 | Bool getNuhLayerIdPresentFlag() { return m_nuhLayerIdPresentFlag; } |
---|
713 | Void setNuhLayerIdPresentFlag(Bool x) { m_nuhLayerIdPresentFlag = x; } |
---|
714 | |
---|
715 | UInt getLayerIdInNuh(Int id) { return m_layerIdInNuh[id]; } |
---|
716 | Void setLayerIdInNuh(Int id, UInt x) { m_layerIdInNuh[id] = x; } |
---|
717 | |
---|
718 | UInt getDimensionId(Int lyrId, Int id) { return m_dimensionId[lyrId][id]; } |
---|
719 | Void setDimensionId(Int lyrId, Int id, UInt x) { m_dimensionId[lyrId][id] = x; } |
---|
720 | |
---|
721 | UInt getNumScalabilityTypes() { return m_numScalabilityTypes; } |
---|
722 | Void setNumScalabilityTypes(UInt x) { m_numScalabilityTypes = x; } |
---|
723 | |
---|
724 | UInt getLayerIdInVps(Int id) { return m_layerIdInVps[id]; } |
---|
725 | Void setLayerIdInVps(Int id, UInt x) { m_layerIdInVps[id] = x; } |
---|
726 | #endif |
---|
727 | #if ILP_SSH_SIG |
---|
728 | Bool getIlpSshSignalingEnabledFlag() { return m_ilpSshSignalingEnabledFlag;} |
---|
729 | Void setIlpSshSignalingEnabledFlag(Bool x) { m_ilpSshSignalingEnabledFlag = x;} |
---|
730 | #endif |
---|
731 | #if VPS_EXTN_PROFILE_INFO |
---|
732 | Bool getProfilePresentFlag(Int id) { return m_profilePresentFlag[id]; } |
---|
733 | Void setProfilePresentFlag(Int id, Bool x) { m_profilePresentFlag[id] = x; } |
---|
734 | |
---|
735 | UInt getProfileLayerSetRef(Int id) { return m_profileLayerSetRef[id]; } |
---|
736 | Void setProfileLayerSetRef(Int id, Bool x) { m_profileLayerSetRef[id] = x; } |
---|
737 | |
---|
738 | std::vector<TComPTL>* getPTLForExtnPtr() { return &m_pcPTLForExtn; } |
---|
739 | TComPTL* getPTLForExtn(Int id) { return &m_pcPTLForExtn[id]; } |
---|
740 | #endif |
---|
741 | #if VPS_EXTN_OP_LAYER_SETS |
---|
742 | // Target output layer signalling related |
---|
743 | UInt getNumOutputLayerSets() { return m_numOutputLayerSets; } |
---|
744 | Void setNumOutputLayerSets(Int x) { m_numOutputLayerSets = x; } |
---|
745 | |
---|
746 | UInt getOutputLayerSetIdx(Int idx) { return m_outputLayerSetIdx[idx]; } |
---|
747 | Void setOutputLayerSetIdx(Int idx, UInt x) { m_outputLayerSetIdx[idx] = x; } |
---|
748 | |
---|
749 | Bool getOutputLayerFlag(Int layerSet, Int layerId) { return m_outputLayerFlag[layerSet][layerId]; } |
---|
750 | Void setOutputLayerFlag(Int layerSet, Int layerId, Bool x) { m_outputLayerFlag[layerSet][layerId] = x; } |
---|
751 | #endif |
---|
752 | #if VPS_EXTN_DIRECT_REF_LAYERS |
---|
753 | // Direct dependency of layers |
---|
754 | Bool getDirectDependencyFlag(Int currLayerId, Int refLayerId) { return m_directDependencyFlag[currLayerId][refLayerId]; } |
---|
755 | Void setDirectDependencyFlag(Int currLayerId, Int refLayerId, Bool x) { m_directDependencyFlag[currLayerId][refLayerId] = x; } |
---|
756 | |
---|
757 | UInt getNumDirectRefLayers(Int layerId) { return m_numDirectRefLayers[layerId]; } |
---|
758 | Void setNumDirectRefLayers(Int layerId, UInt refLayerNum) { m_numDirectRefLayers[layerId] = refLayerNum; } |
---|
759 | |
---|
760 | UInt getRefLayerId(Int layerId, Int refLayerIdx) { return m_refLayerId[layerId][refLayerIdx]; } |
---|
761 | Void setRefLayerId(Int layerId, Int refLayerIdx, UInt refLayerId) { m_refLayerId[layerId][refLayerIdx] = refLayerId; } |
---|
762 | |
---|
763 | #if M0457_PREDICTION_INDICATIONS |
---|
764 | UInt getDirectDepTypeLen() { return m_directDepTypeLen; } |
---|
765 | Void setDirectDepTypeLen(UInt x) { m_directDepTypeLen = x; } |
---|
766 | |
---|
767 | UInt getDirectDependencyType(Int currLayerId, Int refLayerId) { return m_directDependencyType[currLayerId][refLayerId]; } |
---|
768 | Void setDirectDependencyType(Int currLayerId, Int refLayerId, UInt x) { m_directDependencyType[currLayerId][refLayerId] = x; } |
---|
769 | #endif |
---|
770 | #endif |
---|
771 | UInt getNumProfileTierLevel() { return m_numProfileTierLevel; } |
---|
772 | Void setNumProfileTierLevel(Int x) { m_numProfileTierLevel = x; } |
---|
773 | |
---|
774 | Bool getMoreOutputLayerSetsThanDefaultFlag() { return m_moreOutputLayerSetsThanDefaultFlag;} |
---|
775 | Void setMoreOutputLayerSetsThanDefaultFlag(Bool x) { m_moreOutputLayerSetsThanDefaultFlag = x ;} |
---|
776 | |
---|
777 | Int getNumAddOutputLayerSets() { return m_numAddOutputLayerSets; } |
---|
778 | Void setNumAddOutputLayerSets(Int x) { m_numAddOutputLayerSets = x ; } |
---|
779 | |
---|
780 | Bool getDefaultOneTargetOutputLayerFlag() { return m_defaultOneTargetOutputLayerFlag;} |
---|
781 | Void setDefaultOneTargetOutputLayerFlag(Bool x) { m_defaultOneTargetOutputLayerFlag= x ;} |
---|
782 | |
---|
783 | Int getProfileLevelTierIdx(Int i) { return m_profileLevelTierIdx[i]; } |
---|
784 | Void setProfileLevelTierIdx(Int i, Int x) { m_profileLevelTierIdx[i] = x ; } |
---|
785 | #if JCTVC_M0458_INTERLAYER_RPS_SIG |
---|
786 | Bool getMaxOneActiveRefLayerFlag() { return m_maxOneActiveRefLayerFlag; } |
---|
787 | Void setMaxOneActiveRefLayerFlag(Bool x) { m_maxOneActiveRefLayerFlag = x; } |
---|
788 | #endif |
---|
789 | #if O0062_POC_LSB_NOT_PRESENT_FLAG |
---|
790 | UInt getPocLsbNotPresentFlag(Int i) { return m_pocLsbNotPresentFlag[i]; } |
---|
791 | Void setPocLsbNotPresentFlag(Int i, Bool x) { m_pocLsbNotPresentFlag[i] = x; } |
---|
792 | #endif |
---|
793 | #if N0147_IRAP_ALIGN_FLAG |
---|
794 | Bool getCrossLayerIrapAlignFlag() { return m_crossLayerIrapAlignFlag; } |
---|
795 | Void setCrossLayerIrapAlignFlag(Bool x) { m_crossLayerIrapAlignFlag = x; } |
---|
796 | #endif |
---|
797 | #if JCTVC_M0203_INTERLAYER_PRED_IDC |
---|
798 | #if O0225_MAX_TID_FOR_REF_LAYERS |
---|
799 | UInt getMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId) { return m_maxTidIlRefPicsPlus1[layerId][refLayerId]; } |
---|
800 | Void setMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId, UInt maxSublayer) { m_maxTidIlRefPicsPlus1[layerId][refLayerId] = maxSublayer; } |
---|
801 | #else |
---|
802 | UInt getMaxTidIlRefPicsPlus1(Int layerId) { return m_maxTidIlRefPicsPlus1[layerId]; } |
---|
803 | Void setMaxTidIlRefPicsPlus1(Int layerId, UInt maxSublayer) { m_maxTidIlRefPicsPlus1[layerId] = maxSublayer; } |
---|
804 | #endif |
---|
805 | #endif |
---|
806 | #if N0120_MAX_TID_REF_PRESENT_FLAG |
---|
807 | Bool getMaxTidRefPresentFlag() { return m_maxTidRefPresentFlag ;} |
---|
808 | Void setMaxTidRefPresentFlag(Bool x) { m_maxTidRefPresentFlag = x;} |
---|
809 | #endif |
---|
810 | #if M0040_ADAPTIVE_RESOLUTION_CHANGE |
---|
811 | Bool getSingleLayerForNonIrapFlag() { return m_singleLayerForNonIrapFlag; } |
---|
812 | Void setSingleLayerForNonIrapFlag(Bool x) { m_singleLayerForNonIrapFlag = x; } |
---|
813 | #endif |
---|
814 | #if TILE_BOUNDARY_ALIGNED_FLAG |
---|
815 | Bool getTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId) { return m_tileBoundariesAlignedFlag[currLayerId][refLayerId]; } |
---|
816 | Void setTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId, Bool x) { m_tileBoundariesAlignedFlag[currLayerId][refLayerId] = x; } |
---|
817 | #endif |
---|
818 | #if N0160_VUI_EXT_ILP_REF |
---|
819 | Bool getNumIlpRestrictedRefLayers ( ) { return m_numIlpRestrictedRefLayers ;} |
---|
820 | Void setNumIlpRestrictedRefLayers ( Int val ) { m_numIlpRestrictedRefLayers = val;} |
---|
821 | |
---|
822 | Int getMinSpatialSegmentOffsetPlus1( Int currLayerId, Int refLayerId ) { return m_minSpatialSegmentOffsetPlus1[currLayerId][refLayerId];} |
---|
823 | Void setMinSpatialSegmentOffsetPlus1( Int currLayerId, Int refLayerId, Int val ) { m_minSpatialSegmentOffsetPlus1[currLayerId][refLayerId] = val;} |
---|
824 | |
---|
825 | Bool getCtuBasedOffsetEnabledFlag ( Int currLayerId, Int refLayerId ) { return m_ctuBasedOffsetEnabledFlag[currLayerId][refLayerId];} |
---|
826 | Void setCtuBasedOffsetEnabledFlag ( Int currLayerId, Int refLayerId, Bool flag ) { m_ctuBasedOffsetEnabledFlag[currLayerId][refLayerId] = flag;} |
---|
827 | |
---|
828 | Int getMinHorizontalCtuOffsetPlus1 ( Int currLayerId, Int refLayerId ) { return m_minHorizontalCtuOffsetPlus1[currLayerId][refLayerId];} |
---|
829 | Void setMinHorizontalCtuOffsetPlus1 ( Int currLayerId, Int refLayerId, Int val ) { m_minHorizontalCtuOffsetPlus1[currLayerId][refLayerId] = val;} |
---|
830 | #endif |
---|
831 | #if VPS_VUI_BITRATE_PICRATE |
---|
832 | Bool getBitRatePresentVpsFlag() { return m_bitRatePresentVpsFlag; } |
---|
833 | Void setBitRatePresentVpsFlag(Bool x) { m_bitRatePresentVpsFlag = x; } |
---|
834 | Bool getPicRatePresentVpsFlag() { return m_picRatePresentVpsFlag; } |
---|
835 | Void setPicRatePresentVpsFlag(Bool x) { m_picRatePresentVpsFlag = x; } |
---|
836 | |
---|
837 | Bool getBitRatePresentFlag(Int i, Int j) { return m_bitRatePresentFlag[i][j]; } |
---|
838 | Void setBitRatePresentFlag(Int i, Int j, Bool x) { m_bitRatePresentFlag[i][j] = x; } |
---|
839 | Bool getPicRatePresentFlag(Int i, Int j) { return m_picRatePresentFlag[i][j]; } |
---|
840 | Void setPicRatePresentFlag(Int i, Int j, Bool x) { m_picRatePresentFlag[i][j] = x; } |
---|
841 | |
---|
842 | Int getAvgBitRate(Int i, Int j) { return m_avgBitRate[i][j]; } |
---|
843 | Void setAvgBitRate(Int i, Int j, Int x) { m_avgBitRate[i][j] = x; } |
---|
844 | Int getMaxBitRate(Int i, Int j) { return m_maxBitRate[i][j]; } |
---|
845 | Void setMaxBitRate(Int i, Int j, Int x) { m_maxBitRate[i][j] = x; } |
---|
846 | |
---|
847 | Int getConstPicRateIdc(Int i, Int j) { return m_constPicRateIdc[i][j]; } |
---|
848 | Void setConstPicRateIdc(Int i, Int j, Int x) { m_constPicRateIdc[i][j] = x; } |
---|
849 | Int getAvgPicRate(Int i, Int j) { return m_avgPicRate[i][j]; } |
---|
850 | Void setAvgPicRate(Int i, Int j, Int x) { m_avgPicRate[i][j] = x; } |
---|
851 | #endif |
---|
852 | |
---|
853 | #if REPN_FORMAT_IN_VPS |
---|
854 | Bool getRepFormatIdxPresentFlag() { return m_repFormatIdxPresentFlag; } |
---|
855 | Void setRepFormatIdxPresentFlag(Bool x) { m_repFormatIdxPresentFlag = x; } |
---|
856 | |
---|
857 | Int getVpsNumRepFormats() { return m_vpsNumRepFormats; } |
---|
858 | Void setVpsNumRepFormats(Int x) { m_vpsNumRepFormats = x; } |
---|
859 | |
---|
860 | RepFormat* getVpsRepFormat(Int idx) { return &m_vpsRepFormat[idx]; } |
---|
861 | |
---|
862 | Int getVpsRepFormatIdx(Int idx) { return m_vpsRepFormatIdx[idx]; } |
---|
863 | Void setVpsRepFormatIdx(Int idx, Int x) { m_vpsRepFormatIdx[idx] = x; } |
---|
864 | #endif |
---|
865 | #if VIEW_ID_RELATED_SIGNALING |
---|
866 | Void setViewIdLenMinus1( Int val ) { m_viewIdLenMinus1 = val; } |
---|
867 | Int getViewIdLenMinus1( ) { return m_viewIdLenMinus1; } |
---|
868 | |
---|
869 | Void setViewIdVal( Int viewOrderIndex, Int val ) { m_viewIdVal[viewOrderIndex] = val; } |
---|
870 | Int getViewIdVal( Int viewOrderIndex ) { return m_viewIdVal[viewOrderIndex]; } |
---|
871 | Int getScalabilityId(Int, ScalabilityType scalType ); |
---|
872 | |
---|
873 | Int getViewIndex ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX ); } |
---|
874 | |
---|
875 | Int getNumViews(); |
---|
876 | Int scalTypeToScalIdx( ScalabilityType scalType ); |
---|
877 | #endif |
---|
878 | #if VPS_EXTN_OFFSET |
---|
879 | Int getExtensionOffset() { return m_extensionOffset; } |
---|
880 | Void setExtensionOffset( UInt offset ) { m_extensionOffset = offset; } |
---|
881 | #endif |
---|
882 | #if O0215_PHASE_ALIGNMENT |
---|
883 | Bool getPhaseAlignFlag() { return m_phaseAlignFlag; } |
---|
884 | Void setPhaseAlignFlag(Bool x) { m_phaseAlignFlag = x; } |
---|
885 | #endif |
---|
886 | #endif //SVC_EXTENSION |
---|
887 | }; |
---|
888 | |
---|
889 | class Window |
---|
890 | { |
---|
891 | private: |
---|
892 | Bool m_enabledFlag; |
---|
893 | Int m_winLeftOffset; |
---|
894 | Int m_winRightOffset; |
---|
895 | Int m_winTopOffset; |
---|
896 | Int m_winBottomOffset; |
---|
897 | public: |
---|
898 | Window() |
---|
899 | : m_enabledFlag (false) |
---|
900 | , m_winLeftOffset (0) |
---|
901 | , m_winRightOffset (0) |
---|
902 | , m_winTopOffset (0) |
---|
903 | , m_winBottomOffset (0) |
---|
904 | { } |
---|
905 | |
---|
906 | Bool getWindowEnabledFlag() const { return m_enabledFlag; } |
---|
907 | Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0; } |
---|
908 | Int getWindowLeftOffset() const { return m_enabledFlag ? m_winLeftOffset : 0; } |
---|
909 | Void setWindowLeftOffset(Int val) { m_winLeftOffset = val; m_enabledFlag = true; } |
---|
910 | Int getWindowRightOffset() const { return m_enabledFlag ? m_winRightOffset : 0; } |
---|
911 | Void setWindowRightOffset(Int val) { m_winRightOffset = val; m_enabledFlag = true; } |
---|
912 | Int getWindowTopOffset() const { return m_enabledFlag ? m_winTopOffset : 0; } |
---|
913 | Void setWindowTopOffset(Int val) { m_winTopOffset = val; m_enabledFlag = true; } |
---|
914 | Int getWindowBottomOffset() const { return m_enabledFlag ? m_winBottomOffset: 0; } |
---|
915 | Void setWindowBottomOffset(Int val) { m_winBottomOffset = val; m_enabledFlag = true; } |
---|
916 | |
---|
917 | Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom) |
---|
918 | { |
---|
919 | m_enabledFlag = true; |
---|
920 | m_winLeftOffset = offsetLeft; |
---|
921 | m_winRightOffset = offsetLRight; |
---|
922 | m_winTopOffset = offsetLTop; |
---|
923 | m_winBottomOffset = offsetLBottom; |
---|
924 | } |
---|
925 | }; |
---|
926 | |
---|
927 | |
---|
928 | class TComVUI |
---|
929 | { |
---|
930 | private: |
---|
931 | Bool m_aspectRatioInfoPresentFlag; |
---|
932 | Int m_aspectRatioIdc; |
---|
933 | Int m_sarWidth; |
---|
934 | Int m_sarHeight; |
---|
935 | Bool m_overscanInfoPresentFlag; |
---|
936 | Bool m_overscanAppropriateFlag; |
---|
937 | Bool m_videoSignalTypePresentFlag; |
---|
938 | Int m_videoFormat; |
---|
939 | Bool m_videoFullRangeFlag; |
---|
940 | Bool m_colourDescriptionPresentFlag; |
---|
941 | Int m_colourPrimaries; |
---|
942 | Int m_transferCharacteristics; |
---|
943 | Int m_matrixCoefficients; |
---|
944 | Bool m_chromaLocInfoPresentFlag; |
---|
945 | Int m_chromaSampleLocTypeTopField; |
---|
946 | Int m_chromaSampleLocTypeBottomField; |
---|
947 | Bool m_neutralChromaIndicationFlag; |
---|
948 | Bool m_fieldSeqFlag; |
---|
949 | |
---|
950 | Window m_defaultDisplayWindow; |
---|
951 | Bool m_frameFieldInfoPresentFlag; |
---|
952 | Bool m_hrdParametersPresentFlag; |
---|
953 | Bool m_bitstreamRestrictionFlag; |
---|
954 | Bool m_tilesFixedStructureFlag; |
---|
955 | Bool m_motionVectorsOverPicBoundariesFlag; |
---|
956 | Bool m_restrictedRefPicListsFlag; |
---|
957 | Int m_minSpatialSegmentationIdc; |
---|
958 | Int m_maxBytesPerPicDenom; |
---|
959 | Int m_maxBitsPerMinCuDenom; |
---|
960 | Int m_log2MaxMvLengthHorizontal; |
---|
961 | Int m_log2MaxMvLengthVertical; |
---|
962 | TComHRD m_hrdParameters; |
---|
963 | TimingInfo m_timingInfo; |
---|
964 | |
---|
965 | public: |
---|
966 | TComVUI() |
---|
967 | :m_aspectRatioInfoPresentFlag(false) |
---|
968 | ,m_aspectRatioIdc(0) |
---|
969 | ,m_sarWidth(0) |
---|
970 | ,m_sarHeight(0) |
---|
971 | ,m_overscanInfoPresentFlag(false) |
---|
972 | ,m_overscanAppropriateFlag(false) |
---|
973 | ,m_videoSignalTypePresentFlag(false) |
---|
974 | ,m_videoFormat(5) |
---|
975 | ,m_videoFullRangeFlag(false) |
---|
976 | ,m_colourDescriptionPresentFlag(false) |
---|
977 | ,m_colourPrimaries(2) |
---|
978 | ,m_transferCharacteristics(2) |
---|
979 | ,m_matrixCoefficients(2) |
---|
980 | ,m_chromaLocInfoPresentFlag(false) |
---|
981 | ,m_chromaSampleLocTypeTopField(0) |
---|
982 | ,m_chromaSampleLocTypeBottomField(0) |
---|
983 | ,m_neutralChromaIndicationFlag(false) |
---|
984 | ,m_fieldSeqFlag(false) |
---|
985 | ,m_frameFieldInfoPresentFlag(false) |
---|
986 | ,m_hrdParametersPresentFlag(false) |
---|
987 | ,m_bitstreamRestrictionFlag(false) |
---|
988 | ,m_tilesFixedStructureFlag(false) |
---|
989 | ,m_motionVectorsOverPicBoundariesFlag(true) |
---|
990 | ,m_restrictedRefPicListsFlag(1) |
---|
991 | ,m_minSpatialSegmentationIdc(0) |
---|
992 | ,m_maxBytesPerPicDenom(2) |
---|
993 | ,m_maxBitsPerMinCuDenom(1) |
---|
994 | ,m_log2MaxMvLengthHorizontal(15) |
---|
995 | ,m_log2MaxMvLengthVertical(15) |
---|
996 | {} |
---|
997 | |
---|
998 | virtual ~TComVUI() {} |
---|
999 | |
---|
1000 | Bool getAspectRatioInfoPresentFlag() { return m_aspectRatioInfoPresentFlag; } |
---|
1001 | Void setAspectRatioInfoPresentFlag(Bool i) { m_aspectRatioInfoPresentFlag = i; } |
---|
1002 | |
---|
1003 | Int getAspectRatioIdc() { return m_aspectRatioIdc; } |
---|
1004 | Void setAspectRatioIdc(Int i) { m_aspectRatioIdc = i; } |
---|
1005 | |
---|
1006 | Int getSarWidth() { return m_sarWidth; } |
---|
1007 | Void setSarWidth(Int i) { m_sarWidth = i; } |
---|
1008 | |
---|
1009 | Int getSarHeight() { return m_sarHeight; } |
---|
1010 | Void setSarHeight(Int i) { m_sarHeight = i; } |
---|
1011 | |
---|
1012 | Bool getOverscanInfoPresentFlag() { return m_overscanInfoPresentFlag; } |
---|
1013 | Void setOverscanInfoPresentFlag(Bool i) { m_overscanInfoPresentFlag = i; } |
---|
1014 | |
---|
1015 | Bool getOverscanAppropriateFlag() { return m_overscanAppropriateFlag; } |
---|
1016 | Void setOverscanAppropriateFlag(Bool i) { m_overscanAppropriateFlag = i; } |
---|
1017 | |
---|
1018 | Bool getVideoSignalTypePresentFlag() { return m_videoSignalTypePresentFlag; } |
---|
1019 | Void setVideoSignalTypePresentFlag(Bool i) { m_videoSignalTypePresentFlag = i; } |
---|
1020 | |
---|
1021 | Int getVideoFormat() { return m_videoFormat; } |
---|
1022 | Void setVideoFormat(Int i) { m_videoFormat = i; } |
---|
1023 | |
---|
1024 | Bool getVideoFullRangeFlag() { return m_videoFullRangeFlag; } |
---|
1025 | Void setVideoFullRangeFlag(Bool i) { m_videoFullRangeFlag = i; } |
---|
1026 | |
---|
1027 | Bool getColourDescriptionPresentFlag() { return m_colourDescriptionPresentFlag; } |
---|
1028 | Void setColourDescriptionPresentFlag(Bool i) { m_colourDescriptionPresentFlag = i; } |
---|
1029 | |
---|
1030 | Int getColourPrimaries() { return m_colourPrimaries; } |
---|
1031 | Void setColourPrimaries(Int i) { m_colourPrimaries = i; } |
---|
1032 | |
---|
1033 | Int getTransferCharacteristics() { return m_transferCharacteristics; } |
---|
1034 | Void setTransferCharacteristics(Int i) { m_transferCharacteristics = i; } |
---|
1035 | |
---|
1036 | Int getMatrixCoefficients() { return m_matrixCoefficients; } |
---|
1037 | Void setMatrixCoefficients(Int i) { m_matrixCoefficients = i; } |
---|
1038 | |
---|
1039 | Bool getChromaLocInfoPresentFlag() { return m_chromaLocInfoPresentFlag; } |
---|
1040 | Void setChromaLocInfoPresentFlag(Bool i) { m_chromaLocInfoPresentFlag = i; } |
---|
1041 | |
---|
1042 | Int getChromaSampleLocTypeTopField() { return m_chromaSampleLocTypeTopField; } |
---|
1043 | Void setChromaSampleLocTypeTopField(Int i) { m_chromaSampleLocTypeTopField = i; } |
---|
1044 | |
---|
1045 | Int getChromaSampleLocTypeBottomField() { return m_chromaSampleLocTypeBottomField; } |
---|
1046 | Void setChromaSampleLocTypeBottomField(Int i) { m_chromaSampleLocTypeBottomField = i; } |
---|
1047 | |
---|
1048 | Bool getNeutralChromaIndicationFlag() { return m_neutralChromaIndicationFlag; } |
---|
1049 | Void setNeutralChromaIndicationFlag(Bool i) { m_neutralChromaIndicationFlag = i; } |
---|
1050 | |
---|
1051 | Bool getFieldSeqFlag() { return m_fieldSeqFlag; } |
---|
1052 | Void setFieldSeqFlag(Bool i) { m_fieldSeqFlag = i; } |
---|
1053 | |
---|
1054 | Bool getFrameFieldInfoPresentFlag() { return m_frameFieldInfoPresentFlag; } |
---|
1055 | Void setFrameFieldInfoPresentFlag(Bool i) { m_frameFieldInfoPresentFlag = i; } |
---|
1056 | |
---|
1057 | Window& getDefaultDisplayWindow() { return m_defaultDisplayWindow; } |
---|
1058 | Void setDefaultDisplayWindow(Window& defaultDisplayWindow ) { m_defaultDisplayWindow = defaultDisplayWindow; } |
---|
1059 | |
---|
1060 | Bool getHrdParametersPresentFlag() { return m_hrdParametersPresentFlag; } |
---|
1061 | Void setHrdParametersPresentFlag(Bool i) { m_hrdParametersPresentFlag = i; } |
---|
1062 | |
---|
1063 | Bool getBitstreamRestrictionFlag() { return m_bitstreamRestrictionFlag; } |
---|
1064 | Void setBitstreamRestrictionFlag(Bool i) { m_bitstreamRestrictionFlag = i; } |
---|
1065 | |
---|
1066 | Bool getTilesFixedStructureFlag() { return m_tilesFixedStructureFlag; } |
---|
1067 | Void setTilesFixedStructureFlag(Bool i) { m_tilesFixedStructureFlag = i; } |
---|
1068 | |
---|
1069 | Bool getMotionVectorsOverPicBoundariesFlag() { return m_motionVectorsOverPicBoundariesFlag; } |
---|
1070 | Void setMotionVectorsOverPicBoundariesFlag(Bool i) { m_motionVectorsOverPicBoundariesFlag = i; } |
---|
1071 | |
---|
1072 | Bool getRestrictedRefPicListsFlag() { return m_restrictedRefPicListsFlag; } |
---|
1073 | Void setRestrictedRefPicListsFlag(Bool b) { m_restrictedRefPicListsFlag = b; } |
---|
1074 | |
---|
1075 | Int getMinSpatialSegmentationIdc() { return m_minSpatialSegmentationIdc; } |
---|
1076 | Void setMinSpatialSegmentationIdc(Int i) { m_minSpatialSegmentationIdc = i; } |
---|
1077 | Int getMaxBytesPerPicDenom() { return m_maxBytesPerPicDenom; } |
---|
1078 | Void setMaxBytesPerPicDenom(Int i) { m_maxBytesPerPicDenom = i; } |
---|
1079 | |
---|
1080 | Int getMaxBitsPerMinCuDenom() { return m_maxBitsPerMinCuDenom; } |
---|
1081 | Void setMaxBitsPerMinCuDenom(Int i) { m_maxBitsPerMinCuDenom = i; } |
---|
1082 | |
---|
1083 | Int getLog2MaxMvLengthHorizontal() { return m_log2MaxMvLengthHorizontal; } |
---|
1084 | Void setLog2MaxMvLengthHorizontal(Int i) { m_log2MaxMvLengthHorizontal = i; } |
---|
1085 | |
---|
1086 | Int getLog2MaxMvLengthVertical() { return m_log2MaxMvLengthVertical; } |
---|
1087 | Void setLog2MaxMvLengthVertical(Int i) { m_log2MaxMvLengthVertical = i; } |
---|
1088 | |
---|
1089 | TComHRD* getHrdParameters () { return &m_hrdParameters; } |
---|
1090 | TimingInfo* getTimingInfo() { return &m_timingInfo; } |
---|
1091 | }; |
---|
1092 | |
---|
1093 | /// SPS class |
---|
1094 | class TComSPS |
---|
1095 | { |
---|
1096 | private: |
---|
1097 | Int m_SPSId; |
---|
1098 | Int m_VPSId; |
---|
1099 | #if AUXILIARY_PICTURES |
---|
1100 | ChromaFormat m_chromaFormatIdc; |
---|
1101 | #else |
---|
1102 | Int m_chromaFormatIdc; |
---|
1103 | #endif |
---|
1104 | |
---|
1105 | UInt m_uiMaxTLayers; // maximum number of temporal layers |
---|
1106 | |
---|
1107 | // Structure |
---|
1108 | UInt m_picWidthInLumaSamples; |
---|
1109 | UInt m_picHeightInLumaSamples; |
---|
1110 | |
---|
1111 | Int m_log2MinCodingBlockSize; |
---|
1112 | Int m_log2DiffMaxMinCodingBlockSize; |
---|
1113 | UInt m_uiMaxCUWidth; |
---|
1114 | UInt m_uiMaxCUHeight; |
---|
1115 | UInt m_uiMaxCUDepth; |
---|
1116 | |
---|
1117 | Window m_conformanceWindow; |
---|
1118 | |
---|
1119 | TComRPSList m_RPSList; |
---|
1120 | Bool m_bLongTermRefsPresent; |
---|
1121 | Bool m_TMVPFlagsPresent; |
---|
1122 | Int m_numReorderPics[MAX_TLAYER]; |
---|
1123 | |
---|
1124 | // Tool list |
---|
1125 | UInt m_uiQuadtreeTULog2MaxSize; |
---|
1126 | UInt m_uiQuadtreeTULog2MinSize; |
---|
1127 | UInt m_uiQuadtreeTUMaxDepthInter; |
---|
1128 | UInt m_uiQuadtreeTUMaxDepthIntra; |
---|
1129 | Bool m_usePCM; |
---|
1130 | UInt m_pcmLog2MaxSize; |
---|
1131 | UInt m_uiPCMLog2MinSize; |
---|
1132 | Bool m_useAMP; |
---|
1133 | |
---|
1134 | // Parameter |
---|
1135 | Int m_bitDepthY; |
---|
1136 | Int m_bitDepthC; |
---|
1137 | Int m_qpBDOffsetY; |
---|
1138 | Int m_qpBDOffsetC; |
---|
1139 | |
---|
1140 | Bool m_useLossless; |
---|
1141 | |
---|
1142 | UInt m_uiPCMBitDepthLuma; |
---|
1143 | UInt m_uiPCMBitDepthChroma; |
---|
1144 | Bool m_bPCMFilterDisableFlag; |
---|
1145 | |
---|
1146 | UInt m_uiBitsForPOC; |
---|
1147 | UInt m_numLongTermRefPicSPS; |
---|
1148 | UInt m_ltRefPicPocLsbSps[33]; |
---|
1149 | Bool m_usedByCurrPicLtSPSFlag[33]; |
---|
1150 | // Max physical transform size |
---|
1151 | UInt m_uiMaxTrSize; |
---|
1152 | |
---|
1153 | Int m_iAMPAcc[MAX_CU_DEPTH]; |
---|
1154 | Bool m_bUseSAO; |
---|
1155 | |
---|
1156 | Bool m_bTemporalIdNestingFlag; // temporal_id_nesting_flag |
---|
1157 | |
---|
1158 | Bool m_scalingListEnabledFlag; |
---|
1159 | Bool m_scalingListPresentFlag; |
---|
1160 | |
---|
1161 | TComScalingList* m_scalingList; //!< ScalingList class pointer |
---|
1162 | |
---|
1163 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
1164 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) |
---|
1165 | |
---|
1166 | Bool m_useDF; |
---|
1167 | Bool m_useStrongIntraSmoothing; |
---|
1168 | |
---|
1169 | Bool m_vuiParametersPresentFlag; |
---|
1170 | TComVUI m_vuiParameters; |
---|
1171 | |
---|
1172 | static const Int m_winUnitX[MAX_CHROMA_FORMAT_IDC+1]; |
---|
1173 | static const Int m_winUnitY[MAX_CHROMA_FORMAT_IDC+1]; |
---|
1174 | TComPTL m_pcPTL; |
---|
1175 | |
---|
1176 | #if SVC_EXTENSION |
---|
1177 | #if M0463_VUI_EXT_ILP_REF |
---|
1178 | Bool m_interViewMvVertConstraintFlag; |
---|
1179 | Int m_numIlpRestrictedRefLayers ; |
---|
1180 | Int m_minSpatialSegmentOffsetPlus1[MAX_LAYERS]; |
---|
1181 | Bool m_ctuBasedOffsetEnabledFlag [MAX_LAYERS]; |
---|
1182 | Int m_minHorizontalCtuOffsetPlus1 [MAX_LAYERS]; |
---|
1183 | #endif |
---|
1184 | |
---|
1185 | UInt m_layerId; |
---|
1186 | |
---|
1187 | #if IL_SL_SIGNALLING_N0371 |
---|
1188 | TComVPS* m_pVPS; |
---|
1189 | static TComSPS* m_pcSPS[MAX_LAYERS]; |
---|
1190 | Bool m_predScalingListFlag; |
---|
1191 | UInt m_scalingListRefLayerId; |
---|
1192 | #endif |
---|
1193 | |
---|
1194 | #if REF_IDX_MFM |
---|
1195 | #if !M0457_COL_PICTURE_SIGNALING |
---|
1196 | Bool m_bMFMEnabledFlag; |
---|
1197 | #endif |
---|
1198 | #endif |
---|
1199 | UInt m_numScaledRefLayerOffsets; |
---|
1200 | Window m_scaledRefLayerWindow[MAX_LAYERS]; |
---|
1201 | #if REPN_FORMAT_IN_VPS |
---|
1202 | Bool m_updateRepFormatFlag; |
---|
1203 | #endif |
---|
1204 | #endif //SVC_EXTENSION |
---|
1205 | public: |
---|
1206 | TComSPS(); |
---|
1207 | virtual ~TComSPS(); |
---|
1208 | |
---|
1209 | Int getVPSId () { return m_VPSId; } |
---|
1210 | Void setVPSId (Int i) { m_VPSId = i; } |
---|
1211 | Int getSPSId () { return m_SPSId; } |
---|
1212 | Void setSPSId (Int i) { m_SPSId = i; } |
---|
1213 | |
---|
1214 | #if AUXILIARY_PICTURES |
---|
1215 | ChromaFormat getChromaFormatIdc () { return m_chromaFormatIdc; } |
---|
1216 | Void setChromaFormatIdc (ChromaFormat i) { m_chromaFormatIdc = i; } |
---|
1217 | |
---|
1218 | static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitX[chromaFormatIdc]; } |
---|
1219 | static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc]; } |
---|
1220 | #else |
---|
1221 | Int getChromaFormatIdc () { return m_chromaFormatIdc; } |
---|
1222 | Void setChromaFormatIdc (Int i) { m_chromaFormatIdc = i; } |
---|
1223 | |
---|
1224 | static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitX[chromaFormatIdc]; } |
---|
1225 | static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc]; } |
---|
1226 | #endif |
---|
1227 | |
---|
1228 | // structure |
---|
1229 | Void setPicWidthInLumaSamples ( UInt u ) { m_picWidthInLumaSamples = u; } |
---|
1230 | UInt getPicWidthInLumaSamples () { return m_picWidthInLumaSamples; } |
---|
1231 | Void setPicHeightInLumaSamples ( UInt u ) { m_picHeightInLumaSamples = u; } |
---|
1232 | UInt getPicHeightInLumaSamples () { return m_picHeightInLumaSamples; } |
---|
1233 | |
---|
1234 | Window& getConformanceWindow() { return m_conformanceWindow; } |
---|
1235 | Void setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; } |
---|
1236 | |
---|
1237 | UInt getNumLongTermRefPicSPS() { return m_numLongTermRefPicSPS; } |
---|
1238 | Void setNumLongTermRefPicSPS(UInt val) { m_numLongTermRefPicSPS = val; } |
---|
1239 | |
---|
1240 | UInt getLtRefPicPocLsbSps(UInt index) { return m_ltRefPicPocLsbSps[index]; } |
---|
1241 | Void setLtRefPicPocLsbSps(UInt index, UInt val) { m_ltRefPicPocLsbSps[index] = val; } |
---|
1242 | |
---|
1243 | Bool getUsedByCurrPicLtSPSFlag(Int i) {return m_usedByCurrPicLtSPSFlag[i];} |
---|
1244 | Void setUsedByCurrPicLtSPSFlag(Int i, Bool x) { m_usedByCurrPicLtSPSFlag[i] = x;} |
---|
1245 | |
---|
1246 | Int getLog2MinCodingBlockSize() const { return m_log2MinCodingBlockSize; } |
---|
1247 | Void setLog2MinCodingBlockSize(Int val) { m_log2MinCodingBlockSize = val; } |
---|
1248 | Int getLog2DiffMaxMinCodingBlockSize() const { return m_log2DiffMaxMinCodingBlockSize; } |
---|
1249 | Void setLog2DiffMaxMinCodingBlockSize(Int val) { m_log2DiffMaxMinCodingBlockSize = val; } |
---|
1250 | |
---|
1251 | Void setMaxCUWidth ( UInt u ) { m_uiMaxCUWidth = u; } |
---|
1252 | UInt getMaxCUWidth () { return m_uiMaxCUWidth; } |
---|
1253 | Void setMaxCUHeight ( UInt u ) { m_uiMaxCUHeight = u; } |
---|
1254 | UInt getMaxCUHeight () { return m_uiMaxCUHeight; } |
---|
1255 | Void setMaxCUDepth ( UInt u ) { m_uiMaxCUDepth = u; } |
---|
1256 | UInt getMaxCUDepth () { return m_uiMaxCUDepth; } |
---|
1257 | Void setUsePCM ( Bool b ) { m_usePCM = b; } |
---|
1258 | Bool getUsePCM () { return m_usePCM; } |
---|
1259 | Void setPCMLog2MaxSize ( UInt u ) { m_pcmLog2MaxSize = u; } |
---|
1260 | UInt getPCMLog2MaxSize () { return m_pcmLog2MaxSize; } |
---|
1261 | Void setPCMLog2MinSize ( UInt u ) { m_uiPCMLog2MinSize = u; } |
---|
1262 | UInt getPCMLog2MinSize () { return m_uiPCMLog2MinSize; } |
---|
1263 | Void setBitsForPOC ( UInt u ) { m_uiBitsForPOC = u; } |
---|
1264 | UInt getBitsForPOC () { return m_uiBitsForPOC; } |
---|
1265 | Bool getUseAMP() { return m_useAMP; } |
---|
1266 | Void setUseAMP( Bool b ) { m_useAMP = b; } |
---|
1267 | Void setQuadtreeTULog2MaxSize( UInt u ) { m_uiQuadtreeTULog2MaxSize = u; } |
---|
1268 | UInt getQuadtreeTULog2MaxSize() { return m_uiQuadtreeTULog2MaxSize; } |
---|
1269 | Void setQuadtreeTULog2MinSize( UInt u ) { m_uiQuadtreeTULog2MinSize = u; } |
---|
1270 | UInt getQuadtreeTULog2MinSize() { return m_uiQuadtreeTULog2MinSize; } |
---|
1271 | Void setQuadtreeTUMaxDepthInter( UInt u ) { m_uiQuadtreeTUMaxDepthInter = u; } |
---|
1272 | Void setQuadtreeTUMaxDepthIntra( UInt u ) { m_uiQuadtreeTUMaxDepthIntra = u; } |
---|
1273 | UInt getQuadtreeTUMaxDepthInter() { return m_uiQuadtreeTUMaxDepthInter; } |
---|
1274 | UInt getQuadtreeTUMaxDepthIntra() { return m_uiQuadtreeTUMaxDepthIntra; } |
---|
1275 | Void setNumReorderPics(Int i, UInt tlayer) { m_numReorderPics[tlayer] = i; } |
---|
1276 | Int getNumReorderPics(UInt tlayer) { return m_numReorderPics[tlayer]; } |
---|
1277 | Void createRPSList( Int numRPS ); |
---|
1278 | TComRPSList* getRPSList() { return &m_RPSList; } |
---|
1279 | Bool getLongTermRefsPresent() { return m_bLongTermRefsPresent; } |
---|
1280 | Void setLongTermRefsPresent(Bool b) { m_bLongTermRefsPresent=b; } |
---|
1281 | Bool getTMVPFlagsPresent() { return m_TMVPFlagsPresent; } |
---|
1282 | Void setTMVPFlagsPresent(Bool b) { m_TMVPFlagsPresent=b; } |
---|
1283 | // physical transform |
---|
1284 | Void setMaxTrSize ( UInt u ) { m_uiMaxTrSize = u; } |
---|
1285 | UInt getMaxTrSize () { return m_uiMaxTrSize; } |
---|
1286 | |
---|
1287 | // Tool list |
---|
1288 | Bool getUseLossless () { return m_useLossless; } |
---|
1289 | Void setUseLossless ( Bool b ) { m_useLossless = b; } |
---|
1290 | |
---|
1291 | // AMP accuracy |
---|
1292 | Int getAMPAcc ( UInt uiDepth ) { return m_iAMPAcc[uiDepth]; } |
---|
1293 | Void setAMPAcc ( UInt uiDepth, Int iAccu ) { assert( uiDepth < g_uiMaxCUDepth); m_iAMPAcc[uiDepth] = iAccu; } |
---|
1294 | |
---|
1295 | // Bit-depth |
---|
1296 | Int getBitDepthY() { return m_bitDepthY; } |
---|
1297 | Void setBitDepthY(Int u) { m_bitDepthY = u; } |
---|
1298 | Int getBitDepthC() { return m_bitDepthC; } |
---|
1299 | Void setBitDepthC(Int u) { m_bitDepthC = u; } |
---|
1300 | Int getQpBDOffsetY () { return m_qpBDOffsetY; } |
---|
1301 | Void setQpBDOffsetY ( Int value ) { m_qpBDOffsetY = value; } |
---|
1302 | Int getQpBDOffsetC () { return m_qpBDOffsetC; } |
---|
1303 | Void setQpBDOffsetC ( Int value ) { m_qpBDOffsetC = value; } |
---|
1304 | Void setUseSAO (Bool bVal) {m_bUseSAO = bVal;} |
---|
1305 | Bool getUseSAO () {return m_bUseSAO;} |
---|
1306 | |
---|
1307 | UInt getMaxTLayers() { return m_uiMaxTLayers; } |
---|
1308 | Void setMaxTLayers( UInt uiMaxTLayers ) { assert( uiMaxTLayers <= MAX_TLAYER ); m_uiMaxTLayers = uiMaxTLayers; } |
---|
1309 | |
---|
1310 | Bool getTemporalIdNestingFlag() { return m_bTemporalIdNestingFlag; } |
---|
1311 | Void setTemporalIdNestingFlag( Bool bValue ) { m_bTemporalIdNestingFlag = bValue; } |
---|
1312 | UInt getPCMBitDepthLuma () { return m_uiPCMBitDepthLuma; } |
---|
1313 | Void setPCMBitDepthLuma ( UInt u ) { m_uiPCMBitDepthLuma = u; } |
---|
1314 | UInt getPCMBitDepthChroma () { return m_uiPCMBitDepthChroma; } |
---|
1315 | Void setPCMBitDepthChroma ( UInt u ) { m_uiPCMBitDepthChroma = u; } |
---|
1316 | Void setPCMFilterDisableFlag ( Bool bValue ) { m_bPCMFilterDisableFlag = bValue; } |
---|
1317 | Bool getPCMFilterDisableFlag () { return m_bPCMFilterDisableFlag; } |
---|
1318 | |
---|
1319 | Bool getScalingListFlag () { return m_scalingListEnabledFlag; } |
---|
1320 | Void setScalingListFlag ( Bool b ) { m_scalingListEnabledFlag = b; } |
---|
1321 | Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } |
---|
1322 | Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } |
---|
1323 | |
---|
1324 | #if IL_SL_SIGNALLING_N0371 |
---|
1325 | Bool getPredScalingListFlag() { return m_predScalingListFlag; } |
---|
1326 | Void setPredScalingListFlag( Bool b ) { m_predScalingListFlag = b; } |
---|
1327 | UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; } |
---|
1328 | Void setScalingListRefLayerId( UInt b ) { m_scalingListRefLayerId = b; } |
---|
1329 | |
---|
1330 | TComVPS* getVPS() { return m_pVPS; } |
---|
1331 | Void setVPS( TComVPS* vps ) { m_pVPS = vps; } |
---|
1332 | static TComSPS* getSPS(UInt layerId) { return m_pcSPS[layerId]; } |
---|
1333 | static Void setSPS(UInt layerId, TComSPS* sps) { m_pcSPS[layerId] = sps; } |
---|
1334 | #endif |
---|
1335 | |
---|
1336 | Void setScalingList ( TComScalingList *scalingList); |
---|
1337 | TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in SPS |
---|
1338 | |
---|
1339 | UInt getMaxDecPicBuffering (UInt tlayer) { return m_uiMaxDecPicBuffering[tlayer]; } |
---|
1340 | Void setMaxDecPicBuffering ( UInt ui, UInt tlayer ) { m_uiMaxDecPicBuffering[tlayer] = ui; } |
---|
1341 | UInt getMaxLatencyIncrease (UInt tlayer) { return m_uiMaxLatencyIncrease[tlayer]; } |
---|
1342 | Void setMaxLatencyIncrease ( UInt ui , UInt tlayer) { m_uiMaxLatencyIncrease[tlayer] = ui; } |
---|
1343 | |
---|
1344 | Void setUseStrongIntraSmoothing (Bool bVal) {m_useStrongIntraSmoothing = bVal;} |
---|
1345 | Bool getUseStrongIntraSmoothing () {return m_useStrongIntraSmoothing;} |
---|
1346 | |
---|
1347 | Bool getVuiParametersPresentFlag() { return m_vuiParametersPresentFlag; } |
---|
1348 | Void setVuiParametersPresentFlag(Bool b) { m_vuiParametersPresentFlag = b; } |
---|
1349 | TComVUI* getVuiParameters() { return &m_vuiParameters; } |
---|
1350 | Void setHrdParameters( UInt frameRate, UInt numDU, UInt bitRate, Bool randomAccess ); |
---|
1351 | |
---|
1352 | TComPTL* getPTL() { return &m_pcPTL; } |
---|
1353 | |
---|
1354 | #if SVC_EXTENSION |
---|
1355 | #if M0463_VUI_EXT_ILP_REF |
---|
1356 | Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; } |
---|
1357 | Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;} |
---|
1358 | |
---|
1359 | //// sps_extension_vui_parameters( ) |
---|
1360 | Void setNumIlpRestrictedRefLayers ( Int val ) { m_numIlpRestrictedRefLayers = val;} |
---|
1361 | Int getNumIlpRestrictedRefLayers ( ) { return m_numIlpRestrictedRefLayers ;} |
---|
1362 | |
---|
1363 | Void setMinSpatialSegmentOffsetPlus1( Int i, Int val ) { m_minSpatialSegmentOffsetPlus1[ i ] = val;} |
---|
1364 | Int getMinSpatialSegmentOffsetPlus1( Int i ) { return m_minSpatialSegmentOffsetPlus1[ i ];} |
---|
1365 | |
---|
1366 | Void setCtuBasedOffsetEnabledFlag ( Int i, Bool flag ) { m_ctuBasedOffsetEnabledFlag [ i ] = flag;} |
---|
1367 | Bool getCtuBasedOffsetEnabledFlag ( Int i ) { return m_ctuBasedOffsetEnabledFlag [ i ];} |
---|
1368 | |
---|
1369 | Void setMinHorizontalCtuOffsetPlus1 ( Int i, Int val ) { m_minHorizontalCtuOffsetPlus1 [ i ] = val;} |
---|
1370 | Int getMinHorizontalCtuOffsetPlus1 ( Int i ) { return m_minHorizontalCtuOffsetPlus1 [ i ];} |
---|
1371 | #endif |
---|
1372 | Void setLayerId(UInt layerId) { m_layerId = layerId; } |
---|
1373 | UInt getLayerId() { return m_layerId; } |
---|
1374 | #if REF_IDX_MFM |
---|
1375 | #if !M0457_COL_PICTURE_SIGNALING |
---|
1376 | Void setMFMEnabledFlag(Bool flag) {m_bMFMEnabledFlag = flag;} |
---|
1377 | Bool getMFMEnabledFlag() {return m_bMFMEnabledFlag;} |
---|
1378 | #endif |
---|
1379 | #endif |
---|
1380 | UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } |
---|
1381 | Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } |
---|
1382 | Window& getScaledRefLayerWindow( Int x ) { return m_scaledRefLayerWindow[x]; } |
---|
1383 | #if REPN_FORMAT_IN_VPS |
---|
1384 | Bool getUpdateRepFormatFlag() { return m_updateRepFormatFlag; } |
---|
1385 | Void setUpdateRepFormatFlag(Bool x) { m_updateRepFormatFlag = x; } |
---|
1386 | #endif |
---|
1387 | #endif //SVC_EXTENSION |
---|
1388 | }; |
---|
1389 | |
---|
1390 | /// Reference Picture Lists class |
---|
1391 | class TComRefPicListModification |
---|
1392 | { |
---|
1393 | private: |
---|
1394 | UInt m_bRefPicListModificationFlagL0; |
---|
1395 | UInt m_bRefPicListModificationFlagL1; |
---|
1396 | UInt m_RefPicSetIdxL0[32]; |
---|
1397 | UInt m_RefPicSetIdxL1[32]; |
---|
1398 | |
---|
1399 | public: |
---|
1400 | TComRefPicListModification(); |
---|
1401 | virtual ~TComRefPicListModification(); |
---|
1402 | |
---|
1403 | Void create (); |
---|
1404 | Void destroy (); |
---|
1405 | |
---|
1406 | Bool getRefPicListModificationFlagL0() { return m_bRefPicListModificationFlagL0; } |
---|
1407 | Void setRefPicListModificationFlagL0(Bool flag) { m_bRefPicListModificationFlagL0 = flag; } |
---|
1408 | Bool getRefPicListModificationFlagL1() { return m_bRefPicListModificationFlagL1; } |
---|
1409 | Void setRefPicListModificationFlagL1(Bool flag) { m_bRefPicListModificationFlagL1 = flag; } |
---|
1410 | Void setRefPicSetIdxL0(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL0[idx] = refPicSetIdx; } |
---|
1411 | UInt getRefPicSetIdxL0(UInt idx) { return m_RefPicSetIdxL0[idx]; } |
---|
1412 | Void setRefPicSetIdxL1(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL1[idx] = refPicSetIdx; } |
---|
1413 | UInt getRefPicSetIdxL1(UInt idx) { return m_RefPicSetIdxL1[idx]; } |
---|
1414 | }; |
---|
1415 | |
---|
1416 | /// PPS class |
---|
1417 | class TComPPS |
---|
1418 | { |
---|
1419 | private: |
---|
1420 | Int m_PPSId; // pic_parameter_set_id |
---|
1421 | Int m_SPSId; // seq_parameter_set_id |
---|
1422 | Int m_picInitQPMinus26; |
---|
1423 | Bool m_useDQP; |
---|
1424 | Bool m_bConstrainedIntraPred; // constrained_intra_pred_flag |
---|
1425 | Bool m_bSliceChromaQpFlag; // slicelevel_chroma_qp_flag |
---|
1426 | |
---|
1427 | // access channel |
---|
1428 | TComSPS* m_pcSPS; |
---|
1429 | UInt m_uiMaxCuDQPDepth; |
---|
1430 | UInt m_uiMinCuDQPSize; |
---|
1431 | |
---|
1432 | Int m_chromaCbQpOffset; |
---|
1433 | Int m_chromaCrQpOffset; |
---|
1434 | |
---|
1435 | UInt m_numRefIdxL0DefaultActive; |
---|
1436 | UInt m_numRefIdxL1DefaultActive; |
---|
1437 | |
---|
1438 | Bool m_bUseWeightPred; // Use of Weighting Prediction (P_SLICE) |
---|
1439 | Bool m_useWeightedBiPred; // Use of Weighting Bi-Prediction (B_SLICE) |
---|
1440 | Bool m_OutputFlagPresentFlag; // Indicates the presence of output_flag in slice header |
---|
1441 | |
---|
1442 | Bool m_TransquantBypassEnableFlag; // Indicates presence of cu_transquant_bypass_flag in CUs. |
---|
1443 | Bool m_useTransformSkip; |
---|
1444 | Bool m_dependentSliceSegmentsEnabledFlag; //!< Indicates the presence of dependent slices |
---|
1445 | Bool m_tilesEnabledFlag; //!< Indicates the presence of tiles |
---|
1446 | Bool m_entropyCodingSyncEnabledFlag; //!< Indicates the presence of wavefronts |
---|
1447 | |
---|
1448 | Bool m_loopFilterAcrossTilesEnabledFlag; |
---|
1449 | Int m_uniformSpacingFlag; |
---|
1450 | Int m_iNumColumnsMinus1; |
---|
1451 | UInt* m_puiColumnWidth; |
---|
1452 | Int m_iNumRowsMinus1; |
---|
1453 | UInt* m_puiRowHeight; |
---|
1454 | |
---|
1455 | Int m_iNumSubstreams; |
---|
1456 | |
---|
1457 | Int m_signHideFlag; |
---|
1458 | |
---|
1459 | Bool m_cabacInitPresentFlag; |
---|
1460 | UInt m_encCABACTableIdx; // Used to transmit table selection across slices |
---|
1461 | |
---|
1462 | Bool m_sliceHeaderExtensionPresentFlag; |
---|
1463 | Bool m_loopFilterAcrossSlicesEnabledFlag; |
---|
1464 | Bool m_deblockingFilterControlPresentFlag; |
---|
1465 | Bool m_deblockingFilterOverrideEnabledFlag; |
---|
1466 | Bool m_picDisableDeblockingFilterFlag; |
---|
1467 | Int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
1468 | Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
1469 | Bool m_scalingListPresentFlag; |
---|
1470 | |
---|
1471 | #if SVC_EXTENSION |
---|
1472 | UInt m_layerId; |
---|
1473 | |
---|
1474 | #if IL_SL_SIGNALLING_N0371 |
---|
1475 | static TComPPS* m_pcPPS[MAX_LAYERS]; |
---|
1476 | Bool m_predScalingListFlag; |
---|
1477 | UInt m_scalingListRefLayerId; |
---|
1478 | #endif |
---|
1479 | |
---|
1480 | #endif |
---|
1481 | |
---|
1482 | TComScalingList* m_scalingList; //!< ScalingList class pointer |
---|
1483 | |
---|
1484 | Bool m_listsModificationPresentFlag; |
---|
1485 | UInt m_log2ParallelMergeLevelMinus2; |
---|
1486 | Int m_numExtraSliceHeaderBits; |
---|
1487 | |
---|
1488 | public: |
---|
1489 | TComPPS(); |
---|
1490 | virtual ~TComPPS(); |
---|
1491 | |
---|
1492 | Int getPPSId () { return m_PPSId; } |
---|
1493 | Void setPPSId (Int i) { m_PPSId = i; } |
---|
1494 | Int getSPSId () { return m_SPSId; } |
---|
1495 | Void setSPSId (Int i) { m_SPSId = i; } |
---|
1496 | |
---|
1497 | Int getPicInitQPMinus26 () { return m_picInitQPMinus26; } |
---|
1498 | Void setPicInitQPMinus26 ( Int i ) { m_picInitQPMinus26 = i; } |
---|
1499 | Bool getUseDQP () { return m_useDQP; } |
---|
1500 | Void setUseDQP ( Bool b ) { m_useDQP = b; } |
---|
1501 | Bool getConstrainedIntraPred () { return m_bConstrainedIntraPred; } |
---|
1502 | Void setConstrainedIntraPred ( Bool b ) { m_bConstrainedIntraPred = b; } |
---|
1503 | Bool getSliceChromaQpFlag () { return m_bSliceChromaQpFlag; } |
---|
1504 | Void setSliceChromaQpFlag ( Bool b ) { m_bSliceChromaQpFlag = b; } |
---|
1505 | |
---|
1506 | Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
1507 | TComSPS* getSPS () { return m_pcSPS; } |
---|
1508 | Void setMaxCuDQPDepth ( UInt u ) { m_uiMaxCuDQPDepth = u; } |
---|
1509 | UInt getMaxCuDQPDepth () { return m_uiMaxCuDQPDepth;} |
---|
1510 | Void setMinCuDQPSize ( UInt u ) { m_uiMinCuDQPSize = u; } |
---|
1511 | UInt getMinCuDQPSize () { return m_uiMinCuDQPSize; } |
---|
1512 | |
---|
1513 | Void setChromaCbQpOffset( Int i ) { m_chromaCbQpOffset = i; } |
---|
1514 | Int getChromaCbQpOffset() { return m_chromaCbQpOffset; } |
---|
1515 | Void setChromaCrQpOffset( Int i ) { m_chromaCrQpOffset = i; } |
---|
1516 | Int getChromaCrQpOffset() { return m_chromaCrQpOffset; } |
---|
1517 | |
---|
1518 | Void setNumRefIdxL0DefaultActive(UInt ui) { m_numRefIdxL0DefaultActive=ui; } |
---|
1519 | UInt getNumRefIdxL0DefaultActive() { return m_numRefIdxL0DefaultActive; } |
---|
1520 | Void setNumRefIdxL1DefaultActive(UInt ui) { m_numRefIdxL1DefaultActive=ui; } |
---|
1521 | UInt getNumRefIdxL1DefaultActive() { return m_numRefIdxL1DefaultActive; } |
---|
1522 | |
---|
1523 | Bool getUseWP () { return m_bUseWeightPred; } |
---|
1524 | Bool getWPBiPred () { return m_useWeightedBiPred; } |
---|
1525 | Void setUseWP ( Bool b ) { m_bUseWeightPred = b; } |
---|
1526 | Void setWPBiPred ( Bool b ) { m_useWeightedBiPred = b; } |
---|
1527 | Void setOutputFlagPresentFlag( Bool b ) { m_OutputFlagPresentFlag = b; } |
---|
1528 | Bool getOutputFlagPresentFlag() { return m_OutputFlagPresentFlag; } |
---|
1529 | Void setTransquantBypassEnableFlag( Bool b ) { m_TransquantBypassEnableFlag = b; } |
---|
1530 | Bool getTransquantBypassEnableFlag() { return m_TransquantBypassEnableFlag; } |
---|
1531 | |
---|
1532 | Bool getUseTransformSkip () { return m_useTransformSkip; } |
---|
1533 | Void setUseTransformSkip ( Bool b ) { m_useTransformSkip = b; } |
---|
1534 | |
---|
1535 | Void setLoopFilterAcrossTilesEnabledFlag (Bool b) { m_loopFilterAcrossTilesEnabledFlag = b; } |
---|
1536 | Bool getLoopFilterAcrossTilesEnabledFlag () { return m_loopFilterAcrossTilesEnabledFlag; } |
---|
1537 | Bool getDependentSliceSegmentsEnabledFlag() const { return m_dependentSliceSegmentsEnabledFlag; } |
---|
1538 | Void setDependentSliceSegmentsEnabledFlag(Bool val) { m_dependentSliceSegmentsEnabledFlag = val; } |
---|
1539 | Bool getTilesEnabledFlag() const { return m_tilesEnabledFlag; } |
---|
1540 | Void setTilesEnabledFlag(Bool val) { m_tilesEnabledFlag = val; } |
---|
1541 | Bool getEntropyCodingSyncEnabledFlag() const { return m_entropyCodingSyncEnabledFlag; } |
---|
1542 | Void setEntropyCodingSyncEnabledFlag(Bool val) { m_entropyCodingSyncEnabledFlag = val; } |
---|
1543 | Void setUniformSpacingFlag ( Bool b ) { m_uniformSpacingFlag = b; } |
---|
1544 | Bool getUniformSpacingFlag () { return m_uniformSpacingFlag; } |
---|
1545 | Void setNumColumnsMinus1 ( Int i ) { m_iNumColumnsMinus1 = i; } |
---|
1546 | Int getNumColumnsMinus1 () { return m_iNumColumnsMinus1; } |
---|
1547 | Void setColumnWidth ( UInt* columnWidth ) |
---|
1548 | { |
---|
1549 | if( m_uniformSpacingFlag == 0 && m_iNumColumnsMinus1 > 0 ) |
---|
1550 | { |
---|
1551 | m_puiColumnWidth = new UInt[ m_iNumColumnsMinus1 ]; |
---|
1552 | |
---|
1553 | for(Int i=0; i<m_iNumColumnsMinus1; i++) |
---|
1554 | { |
---|
1555 | m_puiColumnWidth[i] = columnWidth[i]; |
---|
1556 | } |
---|
1557 | } |
---|
1558 | } |
---|
1559 | UInt getColumnWidth (UInt columnIdx) { return *( m_puiColumnWidth + columnIdx ); } |
---|
1560 | Void setNumRowsMinus1( Int i ) { m_iNumRowsMinus1 = i; } |
---|
1561 | Int getNumRowsMinus1() { return m_iNumRowsMinus1; } |
---|
1562 | Void setRowHeight ( UInt* rowHeight ) |
---|
1563 | { |
---|
1564 | if( m_uniformSpacingFlag == 0 && m_iNumRowsMinus1 > 0 ) |
---|
1565 | { |
---|
1566 | m_puiRowHeight = new UInt[ m_iNumRowsMinus1 ]; |
---|
1567 | |
---|
1568 | for(Int i=0; i<m_iNumRowsMinus1; i++) |
---|
1569 | { |
---|
1570 | m_puiRowHeight[i] = rowHeight[i]; |
---|
1571 | } |
---|
1572 | } |
---|
1573 | } |
---|
1574 | UInt getRowHeight (UInt rowIdx) { return *( m_puiRowHeight + rowIdx ); } |
---|
1575 | Void setNumSubstreams(Int iNumSubstreams) { m_iNumSubstreams = iNumSubstreams; } |
---|
1576 | Int getNumSubstreams() { return m_iNumSubstreams; } |
---|
1577 | |
---|
1578 | Void setSignHideFlag( Int signHideFlag ) { m_signHideFlag = signHideFlag; } |
---|
1579 | Int getSignHideFlag() { return m_signHideFlag; } |
---|
1580 | |
---|
1581 | Void setCabacInitPresentFlag( Bool flag ) { m_cabacInitPresentFlag = flag; } |
---|
1582 | Void setEncCABACTableIdx( Int idx ) { m_encCABACTableIdx = idx; } |
---|
1583 | Bool getCabacInitPresentFlag() { return m_cabacInitPresentFlag; } |
---|
1584 | UInt getEncCABACTableIdx() { return m_encCABACTableIdx; } |
---|
1585 | Void setDeblockingFilterControlPresentFlag( Bool val ) { m_deblockingFilterControlPresentFlag = val; } |
---|
1586 | Bool getDeblockingFilterControlPresentFlag() { return m_deblockingFilterControlPresentFlag; } |
---|
1587 | Void setDeblockingFilterOverrideEnabledFlag( Bool val ) { m_deblockingFilterOverrideEnabledFlag = val; } |
---|
1588 | Bool getDeblockingFilterOverrideEnabledFlag() { return m_deblockingFilterOverrideEnabledFlag; } |
---|
1589 | Void setPicDisableDeblockingFilterFlag(Bool val) { m_picDisableDeblockingFilterFlag = val; } //!< set offset for deblocking filter disabled |
---|
1590 | Bool getPicDisableDeblockingFilterFlag() { return m_picDisableDeblockingFilterFlag; } //!< get offset for deblocking filter disabled |
---|
1591 | Void setDeblockingFilterBetaOffsetDiv2(Int val) { m_deblockingFilterBetaOffsetDiv2 = val; } //!< set beta offset for deblocking filter |
---|
1592 | Int getDeblockingFilterBetaOffsetDiv2() { return m_deblockingFilterBetaOffsetDiv2; } //!< get beta offset for deblocking filter |
---|
1593 | Void setDeblockingFilterTcOffsetDiv2(Int val) { m_deblockingFilterTcOffsetDiv2 = val; } //!< set tc offset for deblocking filter |
---|
1594 | Int getDeblockingFilterTcOffsetDiv2() { return m_deblockingFilterTcOffsetDiv2; } //!< get tc offset for deblocking filter |
---|
1595 | Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } |
---|
1596 | Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } |
---|
1597 | |
---|
1598 | #if IL_SL_SIGNALLING_N0371 |
---|
1599 | Void setLayerId(UInt layerId) { m_layerId = layerId; } |
---|
1600 | UInt getLayerId() { return m_layerId; } |
---|
1601 | |
---|
1602 | Bool getPredScalingListFlag() { return m_predScalingListFlag; } |
---|
1603 | Void setPredScalingListFlag( Bool b ) { m_predScalingListFlag = b; } |
---|
1604 | UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; } |
---|
1605 | Void setScalingListRefLayerId( UInt b ) { m_scalingListRefLayerId = b; } |
---|
1606 | |
---|
1607 | static TComPPS* getPPS(UInt layerId) { return m_pcPPS[layerId]; } |
---|
1608 | static Void setPPS(UInt layerId, TComPPS* pps) { m_pcPPS[layerId] = pps; } |
---|
1609 | #endif |
---|
1610 | |
---|
1611 | Void setScalingList ( TComScalingList *scalingList); |
---|
1612 | TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in PPS |
---|
1613 | Bool getListsModificationPresentFlag () { return m_listsModificationPresentFlag; } |
---|
1614 | Void setListsModificationPresentFlag ( Bool b ) { m_listsModificationPresentFlag = b; } |
---|
1615 | UInt getLog2ParallelMergeLevelMinus2 () { return m_log2ParallelMergeLevelMinus2; } |
---|
1616 | Void setLog2ParallelMergeLevelMinus2 (UInt mrgLevel) { m_log2ParallelMergeLevelMinus2 = mrgLevel; } |
---|
1617 | Int getNumExtraSliceHeaderBits() { return m_numExtraSliceHeaderBits; } |
---|
1618 | Void setNumExtraSliceHeaderBits(Int i) { m_numExtraSliceHeaderBits = i; } |
---|
1619 | Void setLoopFilterAcrossSlicesEnabledFlag ( Bool bValue ) { m_loopFilterAcrossSlicesEnabledFlag = bValue; } |
---|
1620 | Bool getLoopFilterAcrossSlicesEnabledFlag () { return m_loopFilterAcrossSlicesEnabledFlag; } |
---|
1621 | Bool getSliceHeaderExtensionPresentFlag () { return m_sliceHeaderExtensionPresentFlag; } |
---|
1622 | Void setSliceHeaderExtensionPresentFlag (Bool val) { m_sliceHeaderExtensionPresentFlag = val; } |
---|
1623 | }; |
---|
1624 | |
---|
1625 | typedef struct |
---|
1626 | { |
---|
1627 | // Explicit weighted prediction parameters parsed in slice header, |
---|
1628 | // or Implicit weighted prediction parameters (8 bits depth values). |
---|
1629 | Bool bPresentFlag; |
---|
1630 | UInt uiLog2WeightDenom; |
---|
1631 | Int iWeight; |
---|
1632 | Int iOffset; |
---|
1633 | |
---|
1634 | // Weighted prediction scaling values built from above parameters (bitdepth scaled): |
---|
1635 | Int w, o, offset, shift, round; |
---|
1636 | } wpScalingParam; |
---|
1637 | |
---|
1638 | typedef struct |
---|
1639 | { |
---|
1640 | Int64 iAC; |
---|
1641 | Int64 iDC; |
---|
1642 | #if O0194_WEIGHTED_PREDICTION_CGS |
---|
1643 | Int iSamples; |
---|
1644 | #endif |
---|
1645 | } wpACDCParam; |
---|
1646 | |
---|
1647 | /// slice header class |
---|
1648 | class TComSlice |
---|
1649 | { |
---|
1650 | |
---|
1651 | private: |
---|
1652 | // Bitstream writing |
---|
1653 | Bool m_saoEnabledFlag; |
---|
1654 | Bool m_saoEnabledFlagChroma; ///< SAO Cb&Cr enabled flag |
---|
1655 | Int m_iPPSId; ///< picture parameter set ID |
---|
1656 | Bool m_PicOutputFlag; ///< pic_output_flag |
---|
1657 | Int m_iPOC; |
---|
1658 | Int m_iLastIDR; |
---|
1659 | Int m_iAssociatedIRAP; |
---|
1660 | NalUnitType m_iAssociatedIRAPType; |
---|
1661 | static Int m_prevTid0POC; |
---|
1662 | TComReferencePictureSet *m_pcRPS; |
---|
1663 | TComReferencePictureSet m_LocalRPS; |
---|
1664 | Int m_iBDidx; |
---|
1665 | TComRefPicListModification m_RefPicListModification; |
---|
1666 | NalUnitType m_eNalUnitType; ///< Nal unit type for the slice |
---|
1667 | SliceType m_eSliceType; |
---|
1668 | Int m_iSliceQp; |
---|
1669 | Bool m_dependentSliceSegmentFlag; |
---|
1670 | #if ADAPTIVE_QP_SELECTION |
---|
1671 | Int m_iSliceQpBase; |
---|
1672 | #endif |
---|
1673 | Bool m_deblockingFilterDisable; |
---|
1674 | Bool m_deblockingFilterOverrideFlag; //< offsets for deblocking filter inherit from PPS |
---|
1675 | Int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
1676 | Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
1677 | Int m_list1IdxToList0Idx[MAX_NUM_REF]; |
---|
1678 | Int m_aiNumRefIdx [2]; // for multiple reference of current slice |
---|
1679 | |
---|
1680 | Bool m_bCheckLDC; |
---|
1681 | |
---|
1682 | // Data |
---|
1683 | Int m_iSliceQpDelta; |
---|
1684 | Int m_iSliceQpDeltaCb; |
---|
1685 | Int m_iSliceQpDeltaCr; |
---|
1686 | TComPic* m_apcRefPicList [2][MAX_NUM_REF+1]; |
---|
1687 | Int m_aiRefPOCList [2][MAX_NUM_REF+1]; |
---|
1688 | Bool m_bIsUsedAsLongTerm[2][MAX_NUM_REF+1]; |
---|
1689 | Int m_iDepth; |
---|
1690 | |
---|
1691 | // referenced slice? |
---|
1692 | Bool m_bRefenced; |
---|
1693 | |
---|
1694 | // access channel |
---|
1695 | TComVPS* m_pcVPS; |
---|
1696 | TComSPS* m_pcSPS; |
---|
1697 | TComPPS* m_pcPPS; |
---|
1698 | TComPic* m_pcPic; |
---|
1699 | #if ADAPTIVE_QP_SELECTION |
---|
1700 | TComTrQuant* m_pcTrQuant; |
---|
1701 | #endif |
---|
1702 | UInt m_colFromL0Flag; // collocated picture from List0 flag |
---|
1703 | |
---|
1704 | UInt m_colRefIdx; |
---|
1705 | UInt m_maxNumMergeCand; |
---|
1706 | |
---|
1707 | #if SAO_CHROMA_LAMBDA |
---|
1708 | Double m_dLambdaLuma; |
---|
1709 | Double m_dLambdaChroma; |
---|
1710 | #else |
---|
1711 | Double m_dLambda; |
---|
1712 | #endif |
---|
1713 | |
---|
1714 | Bool m_abEqualRef [2][MAX_NUM_REF][MAX_NUM_REF]; |
---|
1715 | UInt m_uiTLayer; |
---|
1716 | Bool m_bTLayerSwitchingFlag; |
---|
1717 | |
---|
1718 | UInt m_sliceMode; |
---|
1719 | UInt m_sliceArgument; |
---|
1720 | UInt m_sliceCurStartCUAddr; |
---|
1721 | UInt m_sliceCurEndCUAddr; |
---|
1722 | UInt m_sliceIdx; |
---|
1723 | UInt m_sliceSegmentMode; |
---|
1724 | UInt m_sliceSegmentArgument; |
---|
1725 | UInt m_sliceSegmentCurStartCUAddr; |
---|
1726 | UInt m_sliceSegmentCurEndCUAddr; |
---|
1727 | Bool m_nextSlice; |
---|
1728 | Bool m_nextSliceSegment; |
---|
1729 | UInt m_sliceBits; |
---|
1730 | UInt m_sliceSegmentBits; |
---|
1731 | Bool m_bFinalized; |
---|
1732 | |
---|
1733 | wpScalingParam m_weightPredTable[2][MAX_NUM_REF][3]; // [REF_PIC_LIST_0 or REF_PIC_LIST_1][refIdx][0:Y, 1:U, 2:V] |
---|
1734 | wpACDCParam m_weightACDCParam[3]; // [0:Y, 1:U, 2:V] |
---|
1735 | |
---|
1736 | std::vector<UInt> m_tileByteLocation; |
---|
1737 | UInt m_uiTileOffstForMultES; |
---|
1738 | |
---|
1739 | UInt* m_puiSubstreamSizes; |
---|
1740 | TComScalingList* m_scalingList; //!< pointer of quantization matrix |
---|
1741 | Bool m_cabacInitFlag; |
---|
1742 | |
---|
1743 | Bool m_bLMvdL1Zero; |
---|
1744 | Int m_numEntryPointOffsets; |
---|
1745 | Bool m_temporalLayerNonReferenceFlag; |
---|
1746 | Bool m_LFCrossSliceBoundaryFlag; |
---|
1747 | |
---|
1748 | Bool m_enableTMVPFlag; |
---|
1749 | |
---|
1750 | #if SVC_EXTENSION |
---|
1751 | UInt m_layerId; |
---|
1752 | TComPic* m_pcBaseColPic[MAX_LAYERS]; |
---|
1753 | TComPicYuv* m_pcFullPelBaseRec[MAX_LAYERS]; |
---|
1754 | #if M0457_COL_PICTURE_SIGNALING |
---|
1755 | Int m_numMotionPredRefLayers; |
---|
1756 | #if REF_IDX_MFM |
---|
1757 | Bool m_bMFMEnabledFlag; |
---|
1758 | Int m_colRefLayerIdx; |
---|
1759 | Bool m_altColIndicationFlag; |
---|
1760 | TComPic* m_pcIlpPic; |
---|
1761 | #endif |
---|
1762 | #endif |
---|
1763 | |
---|
1764 | #if JCTVC_M0458_INTERLAYER_RPS_SIG |
---|
1765 | Bool m_interLayerPredEnabledFlag; |
---|
1766 | Int m_activeNumILRRefIdx; //< Active inter-layer reference pictures |
---|
1767 | Int m_interLayerPredLayerIdc [MAX_VPS_LAYER_ID_PLUS1]; |
---|
1768 | #else |
---|
1769 | #if SVC_EXTENSION |
---|
1770 | Int m_numILRRefIdx; //< for inter-layer reference picture ser |
---|
1771 | #endif |
---|
1772 | #endif |
---|
1773 | #if M0457_IL_SAMPLE_PRED_ONLY_FLAG |
---|
1774 | Int m_numSamplePredRefLayers; |
---|
1775 | Bool m_interLayerSamplePredOnlyFlag; |
---|
1776 | #endif |
---|
1777 | #if POC_RESET_FLAG |
---|
1778 | Bool m_bPocResetFlag; |
---|
1779 | Int m_pocValueBeforeReset; |
---|
1780 | #endif |
---|
1781 | Bool m_bDiscardableFlag; |
---|
1782 | #endif //SVC_EXTENSION |
---|
1783 | |
---|
1784 | public: |
---|
1785 | TComSlice(); |
---|
1786 | virtual ~TComSlice(); |
---|
1787 | #if SVC_EXTENSION |
---|
1788 | Void initSlice ( UInt layerId ); |
---|
1789 | #else |
---|
1790 | Void initSlice (); |
---|
1791 | #endif |
---|
1792 | |
---|
1793 | Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } |
---|
1794 | TComVPS* getVPS () { return m_pcVPS; } |
---|
1795 | Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
1796 | TComSPS* getSPS () { return m_pcSPS; } |
---|
1797 | |
---|
1798 | Void setPPS ( TComPPS* pcPPS ) { assert(pcPPS!=NULL); m_pcPPS = pcPPS; m_iPPSId = pcPPS->getPPSId(); } |
---|
1799 | TComPPS* getPPS () { return m_pcPPS; } |
---|
1800 | |
---|
1801 | #if ADAPTIVE_QP_SELECTION |
---|
1802 | Void setTrQuant ( TComTrQuant* pcTrQuant ) { m_pcTrQuant = pcTrQuant; } |
---|
1803 | TComTrQuant* getTrQuant () { return m_pcTrQuant; } |
---|
1804 | #endif |
---|
1805 | |
---|
1806 | Void setPPSId ( Int PPSId ) { m_iPPSId = PPSId; } |
---|
1807 | Int getPPSId () { return m_iPPSId; } |
---|
1808 | Void setPicOutputFlag( Bool b ) { m_PicOutputFlag = b; } |
---|
1809 | Bool getPicOutputFlag() { return m_PicOutputFlag; } |
---|
1810 | Void setSaoEnabledFlag(Bool s) {m_saoEnabledFlag =s; } |
---|
1811 | Bool getSaoEnabledFlag() { return m_saoEnabledFlag; } |
---|
1812 | Void setSaoEnabledFlagChroma(Bool s) {m_saoEnabledFlagChroma =s; } //!< set SAO Cb&Cr enabled flag |
---|
1813 | Bool getSaoEnabledFlagChroma() { return m_saoEnabledFlagChroma; } //!< get SAO Cb&Cr enabled flag |
---|
1814 | Void setRPS ( TComReferencePictureSet *pcRPS ) { m_pcRPS = pcRPS; } |
---|
1815 | TComReferencePictureSet* getRPS () { return m_pcRPS; } |
---|
1816 | TComReferencePictureSet* getLocalRPS () { return &m_LocalRPS; } |
---|
1817 | |
---|
1818 | Void setRPSidx ( Int iBDidx ) { m_iBDidx = iBDidx; } |
---|
1819 | Int getRPSidx () { return m_iBDidx; } |
---|
1820 | Int getPrevTid0POC () { return m_prevTid0POC; } |
---|
1821 | TComRefPicListModification* getRefPicListModification() { return &m_RefPicListModification; } |
---|
1822 | Void setLastIDR(Int iIDRPOC) { m_iLastIDR = iIDRPOC; } |
---|
1823 | Int getLastIDR() { return m_iLastIDR; } |
---|
1824 | Void setAssociatedIRAPPOC(Int iAssociatedIRAPPOC) { m_iAssociatedIRAP = iAssociatedIRAPPOC; } |
---|
1825 | Int getAssociatedIRAPPOC() { return m_iAssociatedIRAP; } |
---|
1826 | Void setAssociatedIRAPType(NalUnitType associatedIRAPType) { m_iAssociatedIRAPType = associatedIRAPType; } |
---|
1827 | NalUnitType getAssociatedIRAPType() { return m_iAssociatedIRAPType; } |
---|
1828 | SliceType getSliceType () { return m_eSliceType; } |
---|
1829 | Int getPOC () { return m_iPOC; } |
---|
1830 | Int getSliceQp () { return m_iSliceQp; } |
---|
1831 | Bool getDependentSliceSegmentFlag() const { return m_dependentSliceSegmentFlag; } |
---|
1832 | void setDependentSliceSegmentFlag(Bool val) { m_dependentSliceSegmentFlag = val; } |
---|
1833 | #if ADAPTIVE_QP_SELECTION |
---|
1834 | Int getSliceQpBase () { return m_iSliceQpBase; } |
---|
1835 | #endif |
---|
1836 | Int getSliceQpDelta () { return m_iSliceQpDelta; } |
---|
1837 | Int getSliceQpDeltaCb () { return m_iSliceQpDeltaCb; } |
---|
1838 | Int getSliceQpDeltaCr () { return m_iSliceQpDeltaCr; } |
---|
1839 | Bool getDeblockingFilterDisable() { return m_deblockingFilterDisable; } |
---|
1840 | Bool getDeblockingFilterOverrideFlag() { return m_deblockingFilterOverrideFlag; } |
---|
1841 | Int getDeblockingFilterBetaOffsetDiv2() { return m_deblockingFilterBetaOffsetDiv2; } |
---|
1842 | Int getDeblockingFilterTcOffsetDiv2() { return m_deblockingFilterTcOffsetDiv2; } |
---|
1843 | |
---|
1844 | Int getNumRefIdx ( RefPicList e ) { return m_aiNumRefIdx[e]; } |
---|
1845 | TComPic* getPic () { return m_pcPic; } |
---|
1846 | TComPic* getRefPic ( RefPicList e, Int iRefIdx) { return m_apcRefPicList[e][iRefIdx]; } |
---|
1847 | Int getRefPOC ( RefPicList e, Int iRefIdx) { return m_aiRefPOCList[e][iRefIdx]; } |
---|
1848 | Int getDepth () { return m_iDepth; } |
---|
1849 | UInt getColFromL0Flag () { return m_colFromL0Flag; } |
---|
1850 | UInt getColRefIdx () { return m_colRefIdx; } |
---|
1851 | Void checkColRefIdx (UInt curSliceIdx, TComPic* pic); |
---|
1852 | Bool getIsUsedAsLongTerm (Int i, Int j) { return m_bIsUsedAsLongTerm[i][j]; } |
---|
1853 | Void setIsUsedAsLongTerm (Int i, Int j, Bool value) { m_bIsUsedAsLongTerm[i][j] = value; } |
---|
1854 | Bool getCheckLDC () { return m_bCheckLDC; } |
---|
1855 | Bool getMvdL1ZeroFlag () { return m_bLMvdL1Zero; } |
---|
1856 | Int getNumRpsCurrTempList(); |
---|
1857 | Int getList1IdxToList0Idx ( Int list1Idx ) { return m_list1IdxToList0Idx[list1Idx]; } |
---|
1858 | Void setReferenced(Bool b) { m_bRefenced = b; } |
---|
1859 | Bool isReferenced() { return m_bRefenced; } |
---|
1860 | 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) ); } |
---|
1861 | 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;} } |
---|
1862 | Void setNalUnitType ( NalUnitType e ) { m_eNalUnitType = e; } |
---|
1863 | NalUnitType getNalUnitType () const { return m_eNalUnitType; } |
---|
1864 | Bool getRapPicFlag (); |
---|
1865 | Bool getIdrPicFlag () { return getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP; } |
---|
1866 | Bool isIRAP () const { return (getNalUnitType() >= 16) && (getNalUnitType() <= 23); } |
---|
1867 | Void checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, NalUnitType& associatedIRAPType, TComList<TComPic *>& rcListPic); |
---|
1868 | Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic); |
---|
1869 | Void setSliceType ( SliceType e ) { m_eSliceType = e; } |
---|
1870 | Void setSliceQp ( Int i ) { m_iSliceQp = i; } |
---|
1871 | #if ADAPTIVE_QP_SELECTION |
---|
1872 | Void setSliceQpBase ( Int i ) { m_iSliceQpBase = i; } |
---|
1873 | #endif |
---|
1874 | Void setSliceQpDelta ( Int i ) { m_iSliceQpDelta = i; } |
---|
1875 | Void setSliceQpDeltaCb ( Int i ) { m_iSliceQpDeltaCb = i; } |
---|
1876 | Void setSliceQpDeltaCr ( Int i ) { m_iSliceQpDeltaCr = i; } |
---|
1877 | Void setDeblockingFilterDisable( Bool b ) { m_deblockingFilterDisable= b; } |
---|
1878 | Void setDeblockingFilterOverrideFlag( Bool b ) { m_deblockingFilterOverrideFlag = b; } |
---|
1879 | Void setDeblockingFilterBetaOffsetDiv2( Int i ) { m_deblockingFilterBetaOffsetDiv2 = i; } |
---|
1880 | Void setDeblockingFilterTcOffsetDiv2( Int i ) { m_deblockingFilterTcOffsetDiv2 = i; } |
---|
1881 | |
---|
1882 | Void setRefPic ( TComPic* p, RefPicList e, Int iRefIdx ) { m_apcRefPicList[e][iRefIdx] = p; } |
---|
1883 | Void setRefPOC ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefPOCList[e][iRefIdx] = i; } |
---|
1884 | Void setNumRefIdx ( RefPicList e, Int i ) { m_aiNumRefIdx[e] = i; } |
---|
1885 | Void setPic ( TComPic* p ) { m_pcPic = p; } |
---|
1886 | Void setDepth ( Int iDepth ) { m_iDepth = iDepth; } |
---|
1887 | |
---|
1888 | #if FIX1071 |
---|
1889 | #if SVC_EXTENSION |
---|
1890 | Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false, TComPic** ilpPic = NULL ); |
---|
1891 | #else |
---|
1892 | Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false ); |
---|
1893 | #endif |
---|
1894 | #else |
---|
1895 | Void setRefPicList ( TComList<TComPic*>& rcListPic ); |
---|
1896 | #endif |
---|
1897 | Void setRefPOCList (); |
---|
1898 | Void setColFromL0Flag ( UInt colFromL0 ) { m_colFromL0Flag = colFromL0; } |
---|
1899 | Void setColRefIdx ( UInt refIdx) { m_colRefIdx = refIdx; } |
---|
1900 | Void setCheckLDC ( Bool b ) { m_bCheckLDC = b; } |
---|
1901 | Void setMvdL1ZeroFlag ( Bool b) { m_bLMvdL1Zero = b; } |
---|
1902 | |
---|
1903 | Bool isIntra () { return m_eSliceType == I_SLICE; } |
---|
1904 | Bool isInterB () { return m_eSliceType == B_SLICE; } |
---|
1905 | Bool isInterP () { return m_eSliceType == P_SLICE; } |
---|
1906 | |
---|
1907 | #if SAO_CHROMA_LAMBDA |
---|
1908 | Void setLambda( Double d, Double e ) { m_dLambdaLuma = d; m_dLambdaChroma = e;} |
---|
1909 | Double getLambdaLuma() { return m_dLambdaLuma; } |
---|
1910 | Double getLambdaChroma() { return m_dLambdaChroma; } |
---|
1911 | #else |
---|
1912 | Void setLambda( Double d ) { m_dLambda = d; } |
---|
1913 | Double getLambda() { return m_dLambda; } |
---|
1914 | #endif |
---|
1915 | |
---|
1916 | Void initEqualRef(); |
---|
1917 | Bool isEqualRef ( RefPicList e, Int iRefIdx1, Int iRefIdx2 ) |
---|
1918 | { |
---|
1919 | if (iRefIdx1 < 0 || iRefIdx2 < 0) return false; |
---|
1920 | return m_abEqualRef[e][iRefIdx1][iRefIdx2]; |
---|
1921 | } |
---|
1922 | |
---|
1923 | Void setEqualRef( RefPicList e, Int iRefIdx1, Int iRefIdx2, Bool b) |
---|
1924 | { |
---|
1925 | m_abEqualRef[e][iRefIdx1][iRefIdx2] = m_abEqualRef[e][iRefIdx2][iRefIdx1] = b; |
---|
1926 | } |
---|
1927 | |
---|
1928 | static Void sortPicList ( TComList<TComPic*>& rcListPic ); |
---|
1929 | Void setList1IdxToList0Idx(); |
---|
1930 | |
---|
1931 | UInt getTLayer () { return m_uiTLayer; } |
---|
1932 | Void setTLayer ( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } |
---|
1933 | |
---|
1934 | Void setTLayerInfo( UInt uiTLayer ); |
---|
1935 | Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum ); |
---|
1936 | Void checkLeadingPictureRestrictions( TComList<TComPic*>& rcListPic ); |
---|
1937 | Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList); |
---|
1938 | Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); |
---|
1939 | Bool isStepwiseTemporalLayerSwitchingPointCandidate( TComList<TComPic*>& rcListPic ); |
---|
1940 | Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0); |
---|
1941 | #if FIX1071 |
---|
1942 | Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP); |
---|
1943 | #else |
---|
1944 | Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet); |
---|
1945 | #endif |
---|
1946 | |
---|
1947 | Void setMaxNumMergeCand (UInt val ) { m_maxNumMergeCand = val; } |
---|
1948 | UInt getMaxNumMergeCand () { return m_maxNumMergeCand; } |
---|
1949 | |
---|
1950 | Void setSliceMode ( UInt uiMode ) { m_sliceMode = uiMode; } |
---|
1951 | UInt getSliceMode () { return m_sliceMode; } |
---|
1952 | Void setSliceArgument ( UInt uiArgument ) { m_sliceArgument = uiArgument; } |
---|
1953 | UInt getSliceArgument () { return m_sliceArgument; } |
---|
1954 | Void setSliceCurStartCUAddr ( UInt uiAddr ) { m_sliceCurStartCUAddr = uiAddr; } |
---|
1955 | UInt getSliceCurStartCUAddr () { return m_sliceCurStartCUAddr; } |
---|
1956 | Void setSliceCurEndCUAddr ( UInt uiAddr ) { m_sliceCurEndCUAddr = uiAddr; } |
---|
1957 | UInt getSliceCurEndCUAddr () { return m_sliceCurEndCUAddr; } |
---|
1958 | Void setSliceIdx ( UInt i) { m_sliceIdx = i; } |
---|
1959 | UInt getSliceIdx () { return m_sliceIdx; } |
---|
1960 | Void copySliceInfo (TComSlice *pcSliceSrc); |
---|
1961 | Void setSliceSegmentMode ( UInt uiMode ) { m_sliceSegmentMode = uiMode; } |
---|
1962 | UInt getSliceSegmentMode () { return m_sliceSegmentMode; } |
---|
1963 | Void setSliceSegmentArgument ( UInt uiArgument ) { m_sliceSegmentArgument = uiArgument; } |
---|
1964 | UInt getSliceSegmentArgument () { return m_sliceSegmentArgument; } |
---|
1965 | Void setSliceSegmentCurStartCUAddr ( UInt uiAddr ) { m_sliceSegmentCurStartCUAddr = uiAddr; } |
---|
1966 | UInt getSliceSegmentCurStartCUAddr () { return m_sliceSegmentCurStartCUAddr; } |
---|
1967 | Void setSliceSegmentCurEndCUAddr ( UInt uiAddr ) { m_sliceSegmentCurEndCUAddr = uiAddr; } |
---|
1968 | UInt getSliceSegmentCurEndCUAddr () { return m_sliceSegmentCurEndCUAddr; } |
---|
1969 | Void setNextSlice ( Bool b ) { m_nextSlice = b; } |
---|
1970 | Bool isNextSlice () { return m_nextSlice; } |
---|
1971 | Void setNextSliceSegment ( Bool b ) { m_nextSliceSegment = b; } |
---|
1972 | Bool isNextSliceSegment () { return m_nextSliceSegment; } |
---|
1973 | Void setSliceBits ( UInt uiVal ) { m_sliceBits = uiVal; } |
---|
1974 | UInt getSliceBits () { return m_sliceBits; } |
---|
1975 | Void setSliceSegmentBits ( UInt uiVal ) { m_sliceSegmentBits = uiVal; } |
---|
1976 | UInt getSliceSegmentBits () { return m_sliceSegmentBits; } |
---|
1977 | Void setFinalized ( Bool uiVal ) { m_bFinalized = uiVal; } |
---|
1978 | Bool getFinalized () { return m_bFinalized; } |
---|
1979 | Void setWpScaling ( wpScalingParam wp[2][MAX_NUM_REF][3] ) { memcpy(m_weightPredTable, wp, sizeof(wpScalingParam)*2*MAX_NUM_REF*3); } |
---|
1980 | Void getWpScaling ( RefPicList e, Int iRefIdx, wpScalingParam *&wp); |
---|
1981 | |
---|
1982 | Void resetWpScaling (); |
---|
1983 | Void initWpScaling (); |
---|
1984 | inline Bool applyWP () { return( (m_eSliceType==P_SLICE && m_pcPPS->getUseWP()) || (m_eSliceType==B_SLICE && m_pcPPS->getWPBiPred()) ); } |
---|
1985 | |
---|
1986 | Void setWpAcDcParam ( wpACDCParam wp[3] ) { memcpy(m_weightACDCParam, wp, sizeof(wpACDCParam)*3); } |
---|
1987 | Void getWpAcDcParam ( wpACDCParam *&wp ); |
---|
1988 | Void initWpAcDcParam (); |
---|
1989 | |
---|
1990 | Void setTileLocationCount ( UInt cnt ) { return m_tileByteLocation.resize(cnt); } |
---|
1991 | UInt getTileLocationCount () { return (UInt) m_tileByteLocation.size(); } |
---|
1992 | Void setTileLocation ( Int idx, UInt location ) { assert (idx<m_tileByteLocation.size()); |
---|
1993 | m_tileByteLocation[idx] = location; } |
---|
1994 | Void addTileLocation ( UInt location ) { m_tileByteLocation.push_back(location); } |
---|
1995 | UInt getTileLocation ( Int idx ) { return m_tileByteLocation[idx]; } |
---|
1996 | |
---|
1997 | Void setTileOffstForMultES (UInt uiOffset ) { m_uiTileOffstForMultES = uiOffset; } |
---|
1998 | UInt getTileOffstForMultES () { return m_uiTileOffstForMultES; } |
---|
1999 | Void allocSubstreamSizes ( UInt uiNumSubstreams ); |
---|
2000 | UInt* getSubstreamSizes () { return m_puiSubstreamSizes; } |
---|
2001 | Void setScalingList ( TComScalingList* scalingList ) { m_scalingList = scalingList; } |
---|
2002 | TComScalingList* getScalingList () { return m_scalingList; } |
---|
2003 | |
---|
2004 | #if IL_SL_SIGNALLING_N0371 |
---|
2005 | Void setDefaultScalingList ( UInt m_layerId ); |
---|
2006 | #else |
---|
2007 | Void setDefaultScalingList (); |
---|
2008 | #endif |
---|
2009 | |
---|
2010 | Bool checkDefaultScalingList (); |
---|
2011 | Void setCabacInitFlag ( Bool val ) { m_cabacInitFlag = val; } //!< set CABAC initial flag |
---|
2012 | Bool getCabacInitFlag () { return m_cabacInitFlag; } //!< get CABAC initial flag |
---|
2013 | Void setNumEntryPointOffsets(Int val) { m_numEntryPointOffsets = val; } |
---|
2014 | Int getNumEntryPointOffsets() { return m_numEntryPointOffsets; } |
---|
2015 | Bool getTemporalLayerNonReferenceFlag() { return m_temporalLayerNonReferenceFlag;} |
---|
2016 | Void setTemporalLayerNonReferenceFlag(Bool x) { m_temporalLayerNonReferenceFlag = x;} |
---|
2017 | Void setLFCrossSliceBoundaryFlag ( Bool val ) { m_LFCrossSliceBoundaryFlag = val; } |
---|
2018 | Bool getLFCrossSliceBoundaryFlag () { return m_LFCrossSliceBoundaryFlag;} |
---|
2019 | |
---|
2020 | Void setEnableTMVPFlag ( Bool b ) { m_enableTMVPFlag = b; } |
---|
2021 | Bool getEnableTMVPFlag () { return m_enableTMVPFlag;} |
---|
2022 | |
---|
2023 | #if SVC_EXTENSION |
---|
2024 | Void setBaseColPic ( TComList<TComPic*>& rcListPic , UInt refLayerIdc ); |
---|
2025 | Void setBaseColPic (UInt refLayerIdc, TComPic* p) { m_pcBaseColPic[refLayerIdc] = p; } |
---|
2026 | TComPic* getBaseColPic (UInt refLayerIdc) { return m_pcBaseColPic[refLayerIdc]; } |
---|
2027 | TComPic** getBaseColPic () { return &m_pcBaseColPic[0]; } |
---|
2028 | #if MFM_ENCCONSTRAINT |
---|
2029 | TComPic* getBaseColPic( TComList<TComPic*>& rcListPic ); |
---|
2030 | #endif |
---|
2031 | |
---|
2032 | Void setLayerId (UInt layerId) { m_layerId = layerId; } |
---|
2033 | UInt getLayerId () { return m_layerId; } |
---|
2034 | |
---|
2035 | Void setFullPelBaseRec (UInt refLayerIdc, TComPicYuv* p) { m_pcFullPelBaseRec[refLayerIdc] = p; } |
---|
2036 | TComPicYuv* getFullPelBaseRec (UInt refLayerIdc) { return m_pcFullPelBaseRec[refLayerIdc]; } |
---|
2037 | |
---|
2038 | #if AVC_SYNTAX |
---|
2039 | Void initBaseLayerRPL( TComSlice *pcSlice ); |
---|
2040 | #endif |
---|
2041 | |
---|
2042 | Void setRefPicListModificationSvc(); |
---|
2043 | Int getNumILRRefIdx ( ) { return m_pcVPS->getNumDirectRefLayers( m_layerId ); } |
---|
2044 | |
---|
2045 | #if REF_IDX_MFM |
---|
2046 | Void setRefPOCListILP(TComPic** ilpPic, TComPic** pcRefPicRL); |
---|
2047 | #endif |
---|
2048 | |
---|
2049 | #if JCTVC_M0458_INTERLAYER_RPS_SIG |
---|
2050 | Int getActiveNumILRRefIdx ( ) { return m_activeNumILRRefIdx; } |
---|
2051 | Void setActiveNumILRRefIdx ( Int i ) { m_activeNumILRRefIdx = i; } |
---|
2052 | |
---|
2053 | Int getInterLayerPredLayerIdc (UInt layerIdx) { return m_interLayerPredLayerIdc[layerIdx];} |
---|
2054 | Void setInterLayerPredLayerIdc (UInt refLayerIdc, UInt layerIdx) { m_interLayerPredLayerIdc[layerIdx] = refLayerIdc; } |
---|
2055 | |
---|
2056 | Void setInterLayerPredEnabledFlag ( Bool val ) { m_interLayerPredEnabledFlag = val; } |
---|
2057 | Bool getInterLayerPredEnabledFlag () { return m_interLayerPredEnabledFlag;} |
---|
2058 | #else |
---|
2059 | Void setNumILRRefIdx ( Int i ) { m_numILRRefIdx = i; } |
---|
2060 | #endif |
---|
2061 | |
---|
2062 | #if M0457_IL_SAMPLE_PRED_ONLY_FLAG |
---|
2063 | Int getNumSamplePredRefLayers ( ) { return m_numSamplePredRefLayers; } |
---|
2064 | Void setNumSamplePredRefLayers ( Int i ) { m_numSamplePredRefLayers = i; } |
---|
2065 | Bool getInterLayerSamplePredOnlyFlag( ) { return m_interLayerSamplePredOnlyFlag; } |
---|
2066 | Void setInterLayerSamplePredOnlyFlag( Bool val ) { m_interLayerSamplePredOnlyFlag = val; } |
---|
2067 | #endif |
---|
2068 | |
---|
2069 | #if M0457_COL_PICTURE_SIGNALING |
---|
2070 | Void setNumMotionPredRefLayers(int i) { m_numMotionPredRefLayers = i; } |
---|
2071 | Int getNumMotionPredRefLayers() { return m_numMotionPredRefLayers; } |
---|
2072 | #if REF_IDX_MFM |
---|
2073 | Void setMFMEnabledFlag(Bool flag) { m_bMFMEnabledFlag = flag; } |
---|
2074 | Bool getMFMEnabledFlag() { return m_bMFMEnabledFlag; } |
---|
2075 | #if !REMOVE_COL_PICTURE_SIGNALING |
---|
2076 | Void setColRefLayerIdx(Int i) { m_colRefLayerIdx = i; } |
---|
2077 | Int getColRefLayerIdx() { return m_colRefLayerIdx; } |
---|
2078 | Void setAltColIndicationFlag(Bool i) { m_altColIndicationFlag = i; } |
---|
2079 | Bool getAltColIndicationFlag() { return m_altColIndicationFlag; } |
---|
2080 | Void setMotionPredIlp(TComPic *ilpPic) { m_pcIlpPic = ilpPic; } |
---|
2081 | TComPic* getMotionPredIlp() { return m_pcIlpPic; } |
---|
2082 | #endif |
---|
2083 | #endif |
---|
2084 | #endif |
---|
2085 | |
---|
2086 | TComPic* getRefPic(TComList<TComPic*>& rcListPic, Int poc) { return xGetRefPic( rcListPic, poc ); } |
---|
2087 | |
---|
2088 | #if RESTR_CHK |
---|
2089 | Bool isRADL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_R); } |
---|
2090 | Bool isRASL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_R); } |
---|
2091 | #endif |
---|
2092 | |
---|
2093 | #if POC_RESET_FLAG |
---|
2094 | Bool getPocResetFlag () { return m_bPocResetFlag; } |
---|
2095 | Void setPocResetFlag (Bool b) { m_bPocResetFlag = b; } |
---|
2096 | Int getPocValueBeforeReset () { return m_pocValueBeforeReset; } |
---|
2097 | Void setPocValueBeforeReset (Int x) { m_pocValueBeforeReset = x ; } |
---|
2098 | #endif |
---|
2099 | Bool getDiscardableFlag () { return m_bDiscardableFlag; } |
---|
2100 | Void setDiscardableFlag (Bool b) { m_bDiscardableFlag = b; } |
---|
2101 | |
---|
2102 | #if RPL_INIT_N0316_N0082 |
---|
2103 | Int getNumNegativeRpsCurrTempList(); |
---|
2104 | #endif |
---|
2105 | |
---|
2106 | #if REPN_FORMAT_IN_VPS |
---|
2107 | UInt getPicWidthInLumaSamples(); |
---|
2108 | UInt getPicHeightInLumaSamples(); |
---|
2109 | #if AUXILIARY_PICTURES |
---|
2110 | ChromaFormat getChromaFormatIdc(); |
---|
2111 | #else |
---|
2112 | UInt getChromaFormatIdc(); |
---|
2113 | #endif |
---|
2114 | UInt getBitDepthY(); |
---|
2115 | UInt getBitDepthC(); |
---|
2116 | Int getQpBDOffsetY(); |
---|
2117 | Int getQpBDOffsetC(); |
---|
2118 | #endif |
---|
2119 | |
---|
2120 | Void setILRPic(TComPic **pcIlpPic); |
---|
2121 | |
---|
2122 | #endif //SVC_EXTENSION |
---|
2123 | protected: |
---|
2124 | TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, |
---|
2125 | Int poc); |
---|
2126 | TComPic* xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb); |
---|
2127 | };// END CLASS DEFINITION TComSlice |
---|
2128 | |
---|
2129 | |
---|
2130 | template <class T> class ParameterSetMap |
---|
2131 | { |
---|
2132 | public: |
---|
2133 | ParameterSetMap(Int maxId) |
---|
2134 | :m_maxId (maxId) |
---|
2135 | {} |
---|
2136 | |
---|
2137 | ~ParameterSetMap() |
---|
2138 | { |
---|
2139 | for (typename std::map<Int,T *>::iterator i = m_paramsetMap.begin(); i!= m_paramsetMap.end(); i++) |
---|
2140 | { |
---|
2141 | delete (*i).second; |
---|
2142 | } |
---|
2143 | } |
---|
2144 | |
---|
2145 | Void storePS(Int psId, T *ps) |
---|
2146 | { |
---|
2147 | assert ( psId < m_maxId ); |
---|
2148 | if ( m_paramsetMap.find(psId) != m_paramsetMap.end() ) |
---|
2149 | { |
---|
2150 | delete m_paramsetMap[psId]; |
---|
2151 | } |
---|
2152 | m_paramsetMap[psId] = ps; |
---|
2153 | } |
---|
2154 | |
---|
2155 | Void mergePSList(ParameterSetMap<T> &rPsList) |
---|
2156 | { |
---|
2157 | for (typename std::map<Int,T *>::iterator i = rPsList.m_paramsetMap.begin(); i!= rPsList.m_paramsetMap.end(); i++) |
---|
2158 | { |
---|
2159 | storePS(i->first, i->second); |
---|
2160 | } |
---|
2161 | rPsList.m_paramsetMap.clear(); |
---|
2162 | } |
---|
2163 | |
---|
2164 | |
---|
2165 | T* getPS(Int psId) |
---|
2166 | { |
---|
2167 | return ( m_paramsetMap.find(psId) == m_paramsetMap.end() ) ? NULL : m_paramsetMap[psId]; |
---|
2168 | } |
---|
2169 | |
---|
2170 | T* getFirstPS() |
---|
2171 | { |
---|
2172 | return (m_paramsetMap.begin() == m_paramsetMap.end() ) ? NULL : m_paramsetMap.begin()->second; |
---|
2173 | } |
---|
2174 | |
---|
2175 | private: |
---|
2176 | std::map<Int,T *> m_paramsetMap; |
---|
2177 | Int m_maxId; |
---|
2178 | }; |
---|
2179 | |
---|
2180 | class ParameterSetManager |
---|
2181 | { |
---|
2182 | public: |
---|
2183 | ParameterSetManager(); |
---|
2184 | virtual ~ParameterSetManager(); |
---|
2185 | |
---|
2186 | //! store sequence parameter set and take ownership of it |
---|
2187 | Void storeVPS(TComVPS *vps) { m_vpsMap.storePS( vps->getVPSId(), vps); }; |
---|
2188 | //! get pointer to existing video parameter set |
---|
2189 | TComVPS* getVPS(Int vpsId) { return m_vpsMap.getPS(vpsId); }; |
---|
2190 | TComVPS* getFirstVPS() { return m_vpsMap.getFirstPS(); }; |
---|
2191 | |
---|
2192 | //! store sequence parameter set and take ownership of it |
---|
2193 | Void storeSPS(TComSPS *sps) { m_spsMap.storePS( sps->getSPSId(), sps); }; |
---|
2194 | //! get pointer to existing sequence parameter set |
---|
2195 | TComSPS* getSPS(Int spsId) { return m_spsMap.getPS(spsId); }; |
---|
2196 | TComSPS* getFirstSPS() { return m_spsMap.getFirstPS(); }; |
---|
2197 | |
---|
2198 | //! store picture parameter set and take ownership of it |
---|
2199 | Void storePPS(TComPPS *pps) { m_ppsMap.storePS( pps->getPPSId(), pps); }; |
---|
2200 | //! get pointer to existing picture parameter set |
---|
2201 | TComPPS* getPPS(Int ppsId) { return m_ppsMap.getPS(ppsId); }; |
---|
2202 | TComPPS* getFirstPPS() { return m_ppsMap.getFirstPS(); }; |
---|
2203 | |
---|
2204 | //! activate a SPS from a active parameter sets SEI message |
---|
2205 | //! \returns true, if activation is successful |
---|
2206 | Bool activateSPSWithSEI(Int SPSId); |
---|
2207 | |
---|
2208 | //! activate a PPS and depending on isIDR parameter also SPS and VPS |
---|
2209 | //! \returns true, if activation is successful |
---|
2210 | Bool activatePPS(Int ppsId, Bool isIRAP); |
---|
2211 | |
---|
2212 | TComVPS* getActiveVPS(){ return m_vpsMap.getPS(m_activeVPSId); }; |
---|
2213 | TComSPS* getActiveSPS(){ return m_spsMap.getPS(m_activeSPSId); }; |
---|
2214 | TComPPS* getActivePPS(){ return m_ppsMap.getPS(m_activePPSId); }; |
---|
2215 | |
---|
2216 | protected: |
---|
2217 | |
---|
2218 | #if SVC_EXTENSION |
---|
2219 | static ParameterSetMap<TComVPS> m_vpsMap; |
---|
2220 | #else |
---|
2221 | ParameterSetMap<TComVPS> m_vpsMap; |
---|
2222 | #endif |
---|
2223 | ParameterSetMap<TComSPS> m_spsMap; |
---|
2224 | ParameterSetMap<TComPPS> m_ppsMap; |
---|
2225 | |
---|
2226 | #if SVC_EXTENSION |
---|
2227 | static Int m_activeVPSId; |
---|
2228 | #else |
---|
2229 | Int m_activeVPSId; |
---|
2230 | #endif |
---|
2231 | Int m_activeSPSId; |
---|
2232 | Int m_activePPSId; |
---|
2233 | }; |
---|
2234 | |
---|
2235 | //! \} |
---|
2236 | |
---|
2237 | #endif // __TCOMSLICE__ |
---|