1 | /* The copyright in this software is being made available under the BSD |
---|
2 | * License, included below. This software may be subject to other third party |
---|
3 | * and contributor rights, including patent rights, and no such rights are |
---|
4 | * granted under this license. |
---|
5 | * |
---|
6 | * Copyright (c) 2010-2014, ITU/ISO/IEC |
---|
7 | * All rights reserved. |
---|
8 | * |
---|
9 | * Redistribution and use in source and binary forms, with or without |
---|
10 | * modification, are permitted provided that the following conditions are met: |
---|
11 | * |
---|
12 | * * Redistributions of source code must retain the above copyright notice, |
---|
13 | * this list of conditions and the following disclaimer. |
---|
14 | * * Redistributions in binary form must reproduce the above copyright notice, |
---|
15 | * this list of conditions and the following disclaimer in the documentation |
---|
16 | * and/or other materials provided with the distribution. |
---|
17 | * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may |
---|
18 | * be used to endorse or promote products derived from this software without |
---|
19 | * specific prior written permission. |
---|
20 | * |
---|
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
---|
22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS |
---|
25 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
---|
26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
---|
27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
---|
28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
---|
29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
---|
30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
---|
31 | * THE POSSIBILITY OF SUCH DAMAGE. |
---|
32 | */ |
---|
33 | |
---|
34 | /** \file TComSlice.h |
---|
35 | \brief slice header and SPS class (header) |
---|
36 | */ |
---|
37 | |
---|
38 | #ifndef __TCOMSLICE__ |
---|
39 | #define __TCOMSLICE__ |
---|
40 | |
---|
41 | #include <cstring> |
---|
42 | #include <map> |
---|
43 | #include <vector> |
---|
44 | #include "CommonDef.h" |
---|
45 | #include "TComRom.h" |
---|
46 | #include "TComList.h" |
---|
47 | #if H_MV |
---|
48 | #include <ios> |
---|
49 | #include <iostream> |
---|
50 | #include <iomanip> |
---|
51 | #endif |
---|
52 | //! \ingroup TLibCommon |
---|
53 | //! \{ |
---|
54 | |
---|
55 | class TComPic; |
---|
56 | class TComTrQuant; |
---|
57 | #if H_MV |
---|
58 | class TComPicLists; |
---|
59 | class TComVPS; |
---|
60 | class TComSPS; |
---|
61 | #endif |
---|
62 | // ==================================================================================================================== |
---|
63 | // Constants |
---|
64 | // ==================================================================================================================== |
---|
65 | |
---|
66 | // ==================================================================================================================== |
---|
67 | // Class definition |
---|
68 | // ==================================================================================================================== |
---|
69 | |
---|
70 | /// Reference Picture Set class |
---|
71 | class TComReferencePictureSet |
---|
72 | { |
---|
73 | private: |
---|
74 | Int m_numberOfPictures; |
---|
75 | Int m_numberOfNegativePictures; |
---|
76 | Int m_numberOfPositivePictures; |
---|
77 | Int m_numberOfLongtermPictures; |
---|
78 | Int m_deltaPOC[MAX_NUM_REF_PICS]; |
---|
79 | Int m_POC[MAX_NUM_REF_PICS]; |
---|
80 | Bool m_used[MAX_NUM_REF_PICS]; |
---|
81 | Bool m_interRPSPrediction; |
---|
82 | Int m_deltaRIdxMinus1; |
---|
83 | Int m_deltaRPS; |
---|
84 | Int m_numRefIdc; |
---|
85 | Int m_refIdc[MAX_NUM_REF_PICS+1]; |
---|
86 | Bool m_bCheckLTMSB[MAX_NUM_REF_PICS]; |
---|
87 | Int m_pocLSBLT[MAX_NUM_REF_PICS]; |
---|
88 | Int m_deltaPOCMSBCycleLT[MAX_NUM_REF_PICS]; |
---|
89 | Bool m_deltaPocMSBPresentFlag[MAX_NUM_REF_PICS]; |
---|
90 | |
---|
91 | public: |
---|
92 | TComReferencePictureSet(); |
---|
93 | virtual ~TComReferencePictureSet(); |
---|
94 | Int getPocLSBLT(Int i) { return m_pocLSBLT[i]; } |
---|
95 | Void setPocLSBLT(Int i, Int x) { m_pocLSBLT[i] = x; } |
---|
96 | Int getDeltaPocMSBCycleLT(Int i) { return m_deltaPOCMSBCycleLT[i]; } |
---|
97 | Void setDeltaPocMSBCycleLT(Int i, Int x) { m_deltaPOCMSBCycleLT[i] = x; } |
---|
98 | Bool getDeltaPocMSBPresentFlag(Int i) { return m_deltaPocMSBPresentFlag[i]; } |
---|
99 | Void setDeltaPocMSBPresentFlag(Int i, Bool x) { m_deltaPocMSBPresentFlag[i] = x; } |
---|
100 | Void setUsed(Int bufferNum, Bool used); |
---|
101 | Void setDeltaPOC(Int bufferNum, Int deltaPOC); |
---|
102 | Void setPOC(Int bufferNum, Int deltaPOC); |
---|
103 | Void setNumberOfPictures(Int numberOfPictures); |
---|
104 | Void setCheckLTMSBPresent(Int bufferNum, Bool b ); |
---|
105 | Bool getCheckLTMSBPresent(Int bufferNum); |
---|
106 | |
---|
107 | Int getUsed(Int bufferNum); |
---|
108 | Int getDeltaPOC(Int bufferNum); |
---|
109 | Int getPOC(Int bufferNum); |
---|
110 | Int getNumberOfPictures(); |
---|
111 | |
---|
112 | Void setNumberOfNegativePictures(Int number) { m_numberOfNegativePictures = number; } |
---|
113 | Int getNumberOfNegativePictures() { return m_numberOfNegativePictures; } |
---|
114 | Void setNumberOfPositivePictures(Int number) { m_numberOfPositivePictures = number; } |
---|
115 | Int getNumberOfPositivePictures() { return m_numberOfPositivePictures; } |
---|
116 | Void setNumberOfLongtermPictures(Int number) { m_numberOfLongtermPictures = number; } |
---|
117 | Int getNumberOfLongtermPictures() { return m_numberOfLongtermPictures; } |
---|
118 | |
---|
119 | Void setInterRPSPrediction(Bool flag) { m_interRPSPrediction = flag; } |
---|
120 | Bool getInterRPSPrediction() { return m_interRPSPrediction; } |
---|
121 | Void setDeltaRIdxMinus1(Int x) { m_deltaRIdxMinus1 = x; } |
---|
122 | Int getDeltaRIdxMinus1() { return m_deltaRIdxMinus1; } |
---|
123 | Void setDeltaRPS(Int x) { m_deltaRPS = x; } |
---|
124 | Int getDeltaRPS() { return m_deltaRPS; } |
---|
125 | Void setNumRefIdc(Int x) { m_numRefIdc = x; } |
---|
126 | Int getNumRefIdc() { return m_numRefIdc; } |
---|
127 | |
---|
128 | Void setRefIdc(Int bufferNum, Int refIdc); |
---|
129 | Int getRefIdc(Int bufferNum); |
---|
130 | |
---|
131 | Void sortDeltaPOC(); |
---|
132 | Void printDeltaPOC(); |
---|
133 | |
---|
134 | #if H_MV |
---|
135 | Void checkMaxNumPics( Bool vpsExtensionFlag, Int maxNumPics, Int nuhLayerId, Int spsMaxDecPicBufferingMinus1 ); |
---|
136 | #endif |
---|
137 | }; |
---|
138 | |
---|
139 | /// Reference Picture Set set class |
---|
140 | class TComRPSList |
---|
141 | { |
---|
142 | private: |
---|
143 | Int m_numberOfReferencePictureSets; |
---|
144 | TComReferencePictureSet* m_referencePictureSets; |
---|
145 | |
---|
146 | public: |
---|
147 | TComRPSList(); |
---|
148 | virtual ~TComRPSList(); |
---|
149 | |
---|
150 | Void create (Int numberOfEntries); |
---|
151 | Void destroy (); |
---|
152 | |
---|
153 | |
---|
154 | TComReferencePictureSet* getReferencePictureSet(Int referencePictureSetNum); |
---|
155 | Int getNumberOfReferencePictureSets(); |
---|
156 | Void setNumberOfReferencePictureSets(Int numberOfReferencePictureSets); |
---|
157 | }; |
---|
158 | |
---|
159 | /// SCALING_LIST class |
---|
160 | class TComScalingList |
---|
161 | { |
---|
162 | public: |
---|
163 | TComScalingList(); |
---|
164 | virtual ~TComScalingList(); |
---|
165 | Void setScalingListPresentFlag (Bool b) { m_scalingListPresentFlag = b; } |
---|
166 | Bool getScalingListPresentFlag () { return m_scalingListPresentFlag; } |
---|
167 | Int* getScalingListAddress (UInt sizeId, UInt listId) { return m_scalingListCoef[sizeId][listId]; } //!< get matrix coefficient |
---|
168 | Bool checkPredMode (UInt sizeId, UInt listId); |
---|
169 | Void setRefMatrixId (UInt sizeId, UInt listId, UInt u) { m_refMatrixId[sizeId][listId] = u; } //!< set reference matrix ID |
---|
170 | UInt getRefMatrixId (UInt sizeId, UInt listId) { return m_refMatrixId[sizeId][listId]; } //!< get reference matrix ID |
---|
171 | Int* getScalingListDefaultAddress (UInt sizeId, UInt listId); //!< get default matrix coefficient |
---|
172 | Void processDefaultMatrix (UInt sizeId, UInt listId); |
---|
173 | Void setScalingListDC (UInt sizeId, UInt listId, UInt u) { m_scalingListDC[sizeId][listId] = u; } //!< set DC value |
---|
174 | |
---|
175 | Int getScalingListDC (UInt sizeId, UInt listId) { return m_scalingListDC[sizeId][listId]; } //!< get DC value |
---|
176 | Void checkDcOfMatrix (); |
---|
177 | Void processRefMatrix (UInt sizeId, UInt listId , UInt refListId ); |
---|
178 | Bool xParseScalingList (Char* pchFile); |
---|
179 | #if H_MV |
---|
180 | Void inferFrom ( TComScalingList* srcScLi ); |
---|
181 | #endif |
---|
182 | |
---|
183 | private: |
---|
184 | Void init (); |
---|
185 | Void destroy (); |
---|
186 | Int m_scalingListDC [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< the DC value of the matrix coefficient for 16x16 |
---|
187 | Bool m_useDefaultScalingMatrixFlag [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< UseDefaultScalingMatrixFlag |
---|
188 | UInt m_refMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< RefMatrixID |
---|
189 | Bool m_scalingListPresentFlag; //!< flag for using default matrix |
---|
190 | UInt m_predMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< reference list index |
---|
191 | Int *m_scalingListCoef [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< quantization matrix |
---|
192 | }; |
---|
193 | |
---|
194 | class ProfileTierLevel |
---|
195 | { |
---|
196 | Int m_profileSpace; |
---|
197 | Bool m_tierFlag; |
---|
198 | Int m_profileIdc; |
---|
199 | Bool m_profileCompatibilityFlag[32]; |
---|
200 | Int m_levelIdc; |
---|
201 | |
---|
202 | Bool m_progressiveSourceFlag; |
---|
203 | Bool m_interlacedSourceFlag; |
---|
204 | Bool m_nonPackedConstraintFlag; |
---|
205 | Bool m_frameOnlyConstraintFlag; |
---|
206 | |
---|
207 | #if H_MV |
---|
208 | Bool m_max12bitConstraintFlag; |
---|
209 | Bool m_max10bitConstraintFlag; |
---|
210 | Bool m_max8bitConstraintFlag; |
---|
211 | Bool m_max422chromaConstraintFlag; |
---|
212 | Bool m_max420chromaConstraintFlag; |
---|
213 | Bool m_maxMonochromeConstraintFlag; |
---|
214 | Bool m_intraConstraintFlag; |
---|
215 | Bool m_onePictureOnlyConstraintFlag; |
---|
216 | Bool m_lowerBitRateConstraintFlag; |
---|
217 | Bool m_inbldFlag; |
---|
218 | #endif |
---|
219 | public: |
---|
220 | ProfileTierLevel(); |
---|
221 | |
---|
222 | Int getProfileSpace() const { return m_profileSpace; } |
---|
223 | Void setProfileSpace(Int x) { m_profileSpace = x; } |
---|
224 | |
---|
225 | Bool getTierFlag() const { return m_tierFlag; } |
---|
226 | Void setTierFlag(Bool x) { m_tierFlag = x; } |
---|
227 | |
---|
228 | Int getProfileIdc() const { return m_profileIdc; } |
---|
229 | Void setProfileIdc(Int x) { m_profileIdc = x; } |
---|
230 | |
---|
231 | Bool getProfileCompatibilityFlag(Int i) const { return m_profileCompatibilityFlag[i]; } |
---|
232 | Void setProfileCompatibilityFlag(Int i, Bool x) { m_profileCompatibilityFlag[i] = x; } |
---|
233 | |
---|
234 | Int getLevelIdc() const { return m_levelIdc; } |
---|
235 | Void setLevelIdc(Int x) { m_levelIdc = x; } |
---|
236 | |
---|
237 | Bool getProgressiveSourceFlag() const { return m_progressiveSourceFlag; } |
---|
238 | Void setProgressiveSourceFlag(Bool b) { m_progressiveSourceFlag = b; } |
---|
239 | |
---|
240 | Bool getInterlacedSourceFlag() const { return m_interlacedSourceFlag; } |
---|
241 | Void setInterlacedSourceFlag(Bool b) { m_interlacedSourceFlag = b; } |
---|
242 | |
---|
243 | Bool getNonPackedConstraintFlag() const { return m_nonPackedConstraintFlag; } |
---|
244 | Void setNonPackedConstraintFlag(Bool b) { m_nonPackedConstraintFlag = b; } |
---|
245 | |
---|
246 | Bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; } |
---|
247 | Void setFrameOnlyConstraintFlag(Bool b) { m_frameOnlyConstraintFlag = b; } |
---|
248 | |
---|
249 | #if H_MV |
---|
250 | Void setMax12bitConstraintFlag( Bool flag ) { m_max12bitConstraintFlag = flag; } |
---|
251 | Bool getMax12bitConstraintFlag( ) { return m_max12bitConstraintFlag; } |
---|
252 | |
---|
253 | Void setMax10bitConstraintFlag( Bool flag ) { m_max10bitConstraintFlag = flag; } |
---|
254 | Bool getMax10bitConstraintFlag( ) { return m_max10bitConstraintFlag; } |
---|
255 | |
---|
256 | Void setMax8bitConstraintFlag( Bool flag ) { m_max8bitConstraintFlag = flag; } |
---|
257 | Bool getMax8bitConstraintFlag( ) { return m_max8bitConstraintFlag; } |
---|
258 | |
---|
259 | Void setMax422chromaConstraintFlag( Bool flag ) { m_max422chromaConstraintFlag = flag; } |
---|
260 | Bool getMax422chromaConstraintFlag( ) { return m_max422chromaConstraintFlag; } |
---|
261 | |
---|
262 | Void setMax420chromaConstraintFlag( Bool flag ) { m_max420chromaConstraintFlag = flag; } |
---|
263 | Bool getMax420chromaConstraintFlag( ) { return m_max420chromaConstraintFlag; } |
---|
264 | |
---|
265 | Void setMaxMonochromeConstraintFlag( Bool flag ) { m_maxMonochromeConstraintFlag = flag; } |
---|
266 | Bool getMaxMonochromeConstraintFlag( ) { return m_maxMonochromeConstraintFlag; } |
---|
267 | Void setIntraConstraintFlag( Bool flag ) { m_intraConstraintFlag = flag; } |
---|
268 | Bool getIntraConstraintFlag( ) { return m_intraConstraintFlag; } |
---|
269 | |
---|
270 | Void setOnePictureOnlyConstraintFlag( Bool flag ) { m_onePictureOnlyConstraintFlag = flag; } |
---|
271 | Bool getOnePictureOnlyConstraintFlag( ) { return m_onePictureOnlyConstraintFlag; } |
---|
272 | |
---|
273 | Void setLowerBitRateConstraintFlag( Bool flag ) { m_lowerBitRateConstraintFlag = flag; } |
---|
274 | Bool getLowerBitRateConstraintFlag( ) { return m_lowerBitRateConstraintFlag; } |
---|
275 | |
---|
276 | Void setInbldFlag( Bool flag ) { m_inbldFlag = flag; } |
---|
277 | Bool getInbldFlag( ) { return m_inbldFlag; } |
---|
278 | Bool getV2ConstraintsPresentFlag(); |
---|
279 | Bool getInbldPresentFlag(); |
---|
280 | Void copyV2ConstraintFlags( ProfileTierLevel* ptlRef ); |
---|
281 | Void copyProfile( ProfileTierLevel* ptlRef ); |
---|
282 | #endif |
---|
283 | }; |
---|
284 | |
---|
285 | |
---|
286 | class TComPTL |
---|
287 | { |
---|
288 | ProfileTierLevel m_generalPTL; |
---|
289 | ProfileTierLevel m_subLayerPTL [MAX_TLAYER-1]; // max. value of max_sub_layers_minus1 is MAX_TLAYER-1 (= 6) |
---|
290 | Bool m_subLayerProfilePresentFlag [MAX_TLAYER-1]; |
---|
291 | Bool m_subLayerLevelPresentFlag [MAX_TLAYER-1]; |
---|
292 | |
---|
293 | public: |
---|
294 | TComPTL(); |
---|
295 | Bool getSubLayerProfilePresentFlag(Int i) const { return m_subLayerProfilePresentFlag[i]; } |
---|
296 | Void setSubLayerProfilePresentFlag(Int i, Bool x) { m_subLayerProfilePresentFlag[i] = x; } |
---|
297 | |
---|
298 | Bool getSubLayerLevelPresentFlag(Int i) const { return m_subLayerLevelPresentFlag[i]; } |
---|
299 | Void setSubLayerLevelPresentFlag(Int i, Bool x) { m_subLayerLevelPresentFlag[i] = x; } |
---|
300 | |
---|
301 | ProfileTierLevel* getGeneralPTL() { return &m_generalPTL; } |
---|
302 | ProfileTierLevel* getSubLayerPTL(Int i) { return &m_subLayerPTL[i]; } |
---|
303 | #if H_MV |
---|
304 | Void inferGeneralValues ( Bool profilePresentFlag , Int k, TComPTL* refPTL );; |
---|
305 | Void inferSubLayerValues( Int maxNumSubLayersMinus1, Int k, TComPTL* refPTL );; |
---|
306 | #endif |
---|
307 | }; |
---|
308 | /// VPS class |
---|
309 | |
---|
310 | struct HrdSubLayerInfo |
---|
311 | { |
---|
312 | Bool fixedPicRateFlag; |
---|
313 | Bool fixedPicRateWithinCvsFlag; |
---|
314 | UInt picDurationInTcMinus1; |
---|
315 | Bool lowDelayHrdFlag; |
---|
316 | UInt cpbCntMinus1; |
---|
317 | UInt bitRateValueMinus1[MAX_CPB_CNT][2]; |
---|
318 | UInt cpbSizeValue [MAX_CPB_CNT][2]; |
---|
319 | UInt ducpbSizeValue [MAX_CPB_CNT][2]; |
---|
320 | UInt cbrFlag [MAX_CPB_CNT][2]; |
---|
321 | UInt duBitRateValue [MAX_CPB_CNT][2]; |
---|
322 | }; |
---|
323 | |
---|
324 | class TComHRD |
---|
325 | { |
---|
326 | private: |
---|
327 | Bool m_nalHrdParametersPresentFlag; |
---|
328 | Bool m_vclHrdParametersPresentFlag; |
---|
329 | Bool m_subPicCpbParamsPresentFlag; |
---|
330 | UInt m_tickDivisorMinus2; |
---|
331 | UInt m_duCpbRemovalDelayLengthMinus1; |
---|
332 | Bool m_subPicCpbParamsInPicTimingSEIFlag; |
---|
333 | UInt m_dpbOutputDelayDuLengthMinus1; |
---|
334 | UInt m_bitRateScale; |
---|
335 | UInt m_cpbSizeScale; |
---|
336 | UInt m_ducpbSizeScale; |
---|
337 | UInt m_initialCpbRemovalDelayLengthMinus1; |
---|
338 | UInt m_cpbRemovalDelayLengthMinus1; |
---|
339 | UInt m_dpbOutputDelayLengthMinus1; |
---|
340 | UInt m_numDU; |
---|
341 | HrdSubLayerInfo m_HRD[MAX_TLAYER]; |
---|
342 | |
---|
343 | public: |
---|
344 | TComHRD() |
---|
345 | :m_nalHrdParametersPresentFlag(0) |
---|
346 | ,m_vclHrdParametersPresentFlag(0) |
---|
347 | ,m_subPicCpbParamsPresentFlag(false) |
---|
348 | ,m_tickDivisorMinus2(0) |
---|
349 | ,m_duCpbRemovalDelayLengthMinus1(0) |
---|
350 | ,m_subPicCpbParamsInPicTimingSEIFlag(false) |
---|
351 | ,m_dpbOutputDelayDuLengthMinus1(0) |
---|
352 | ,m_bitRateScale(0) |
---|
353 | ,m_cpbSizeScale(0) |
---|
354 | ,m_initialCpbRemovalDelayLengthMinus1(0) |
---|
355 | ,m_cpbRemovalDelayLengthMinus1(0) |
---|
356 | ,m_dpbOutputDelayLengthMinus1(0) |
---|
357 | {} |
---|
358 | |
---|
359 | virtual ~TComHRD() {} |
---|
360 | |
---|
361 | Void setNalHrdParametersPresentFlag ( Bool flag ) { m_nalHrdParametersPresentFlag = flag; } |
---|
362 | Bool getNalHrdParametersPresentFlag ( ) { return m_nalHrdParametersPresentFlag; } |
---|
363 | |
---|
364 | Void setVclHrdParametersPresentFlag ( Bool flag ) { m_vclHrdParametersPresentFlag = flag; } |
---|
365 | Bool getVclHrdParametersPresentFlag ( ) { return m_vclHrdParametersPresentFlag; } |
---|
366 | |
---|
367 | Void setSubPicCpbParamsPresentFlag ( Bool flag ) { m_subPicCpbParamsPresentFlag = flag; } |
---|
368 | Bool getSubPicCpbParamsPresentFlag ( ) { return m_subPicCpbParamsPresentFlag; } |
---|
369 | |
---|
370 | Void setTickDivisorMinus2 ( UInt value ) { m_tickDivisorMinus2 = value; } |
---|
371 | UInt getTickDivisorMinus2 ( ) { return m_tickDivisorMinus2; } |
---|
372 | |
---|
373 | Void setDuCpbRemovalDelayLengthMinus1 ( UInt value ) { m_duCpbRemovalDelayLengthMinus1 = value; } |
---|
374 | UInt getDuCpbRemovalDelayLengthMinus1 ( ) { return m_duCpbRemovalDelayLengthMinus1; } |
---|
375 | |
---|
376 | Void setSubPicCpbParamsInPicTimingSEIFlag ( Bool flag) { m_subPicCpbParamsInPicTimingSEIFlag = flag; } |
---|
377 | Bool getSubPicCpbParamsInPicTimingSEIFlag () { return m_subPicCpbParamsInPicTimingSEIFlag; } |
---|
378 | |
---|
379 | Void setDpbOutputDelayDuLengthMinus1 (UInt value ) { m_dpbOutputDelayDuLengthMinus1 = value; } |
---|
380 | UInt getDpbOutputDelayDuLengthMinus1 () { return m_dpbOutputDelayDuLengthMinus1; } |
---|
381 | |
---|
382 | Void setBitRateScale ( UInt value ) { m_bitRateScale = value; } |
---|
383 | UInt getBitRateScale ( ) { return m_bitRateScale; } |
---|
384 | |
---|
385 | Void setCpbSizeScale ( UInt value ) { m_cpbSizeScale = value; } |
---|
386 | UInt getCpbSizeScale ( ) { return m_cpbSizeScale; } |
---|
387 | Void setDuCpbSizeScale ( UInt value ) { m_ducpbSizeScale = value; } |
---|
388 | UInt getDuCpbSizeScale ( ) { return m_ducpbSizeScale; } |
---|
389 | |
---|
390 | Void setInitialCpbRemovalDelayLengthMinus1( UInt value ) { m_initialCpbRemovalDelayLengthMinus1 = value; } |
---|
391 | UInt getInitialCpbRemovalDelayLengthMinus1( ) { return m_initialCpbRemovalDelayLengthMinus1; } |
---|
392 | |
---|
393 | Void setCpbRemovalDelayLengthMinus1 ( UInt value ) { m_cpbRemovalDelayLengthMinus1 = value; } |
---|
394 | UInt getCpbRemovalDelayLengthMinus1 ( ) { return m_cpbRemovalDelayLengthMinus1; } |
---|
395 | |
---|
396 | Void setDpbOutputDelayLengthMinus1 ( UInt value ) { m_dpbOutputDelayLengthMinus1 = value; } |
---|
397 | UInt getDpbOutputDelayLengthMinus1 ( ) { return m_dpbOutputDelayLengthMinus1; } |
---|
398 | |
---|
399 | Void setFixedPicRateFlag ( Int layer, Bool flag ) { m_HRD[layer].fixedPicRateFlag = flag; } |
---|
400 | Bool getFixedPicRateFlag ( Int layer ) { return m_HRD[layer].fixedPicRateFlag; } |
---|
401 | |
---|
402 | Void setFixedPicRateWithinCvsFlag ( Int layer, Bool flag ) { m_HRD[layer].fixedPicRateWithinCvsFlag = flag; } |
---|
403 | Bool getFixedPicRateWithinCvsFlag ( Int layer ) { return m_HRD[layer].fixedPicRateWithinCvsFlag; } |
---|
404 | |
---|
405 | Void setPicDurationInTcMinus1 ( Int layer, UInt value ) { m_HRD[layer].picDurationInTcMinus1 = value; } |
---|
406 | UInt getPicDurationInTcMinus1 ( Int layer ) { return m_HRD[layer].picDurationInTcMinus1; } |
---|
407 | |
---|
408 | Void setLowDelayHrdFlag ( Int layer, Bool flag ) { m_HRD[layer].lowDelayHrdFlag = flag; } |
---|
409 | Bool getLowDelayHrdFlag ( Int layer ) { return m_HRD[layer].lowDelayHrdFlag; } |
---|
410 | |
---|
411 | Void setCpbCntMinus1 ( Int layer, UInt value ) { m_HRD[layer].cpbCntMinus1 = value; } |
---|
412 | UInt getCpbCntMinus1 ( Int layer ) { return m_HRD[layer].cpbCntMinus1; } |
---|
413 | |
---|
414 | Void setBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].bitRateValueMinus1[cpbcnt][nalOrVcl] = value; } |
---|
415 | UInt getBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].bitRateValueMinus1[cpbcnt][nalOrVcl]; } |
---|
416 | |
---|
417 | Void setCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].cpbSizeValue[cpbcnt][nalOrVcl] = value; } |
---|
418 | UInt getCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].cpbSizeValue[cpbcnt][nalOrVcl]; } |
---|
419 | Void setDuCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].ducpbSizeValue[cpbcnt][nalOrVcl] = value; } |
---|
420 | UInt getDuCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].ducpbSizeValue[cpbcnt][nalOrVcl]; } |
---|
421 | Void setDuBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].duBitRateValue[cpbcnt][nalOrVcl] = value; } |
---|
422 | UInt getDuBitRateValueMinus1 (Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].duBitRateValue[cpbcnt][nalOrVcl]; } |
---|
423 | Void setCbrFlag ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].cbrFlag[cpbcnt][nalOrVcl] = value; } |
---|
424 | Bool getCbrFlag ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].cbrFlag[cpbcnt][nalOrVcl]; } |
---|
425 | |
---|
426 | Void setNumDU ( UInt value ) { m_numDU = value; } |
---|
427 | UInt getNumDU ( ) { return m_numDU; } |
---|
428 | Bool getCpbDpbDelaysPresentFlag() { return getNalHrdParametersPresentFlag() || getVclHrdParametersPresentFlag(); } |
---|
429 | }; |
---|
430 | |
---|
431 | class TimingInfo |
---|
432 | { |
---|
433 | Bool m_timingInfoPresentFlag; |
---|
434 | UInt m_numUnitsInTick; |
---|
435 | UInt m_timeScale; |
---|
436 | Bool m_pocProportionalToTimingFlag; |
---|
437 | Int m_numTicksPocDiffOneMinus1; |
---|
438 | public: |
---|
439 | TimingInfo() |
---|
440 | : m_timingInfoPresentFlag(false) |
---|
441 | , m_numUnitsInTick(1001) |
---|
442 | , m_timeScale(60000) |
---|
443 | , m_pocProportionalToTimingFlag(false) |
---|
444 | , m_numTicksPocDiffOneMinus1(0) {} |
---|
445 | |
---|
446 | Void setTimingInfoPresentFlag ( Bool flag ) { m_timingInfoPresentFlag = flag; } |
---|
447 | Bool getTimingInfoPresentFlag ( ) { return m_timingInfoPresentFlag; } |
---|
448 | |
---|
449 | Void setNumUnitsInTick ( UInt value ) { m_numUnitsInTick = value; } |
---|
450 | UInt getNumUnitsInTick ( ) { return m_numUnitsInTick; } |
---|
451 | |
---|
452 | Void setTimeScale ( UInt value ) { m_timeScale = value; } |
---|
453 | UInt getTimeScale ( ) { return m_timeScale; } |
---|
454 | |
---|
455 | Bool getPocProportionalToTimingFlag ( ) { return m_pocProportionalToTimingFlag; } |
---|
456 | Void setPocProportionalToTimingFlag (Bool x ) { m_pocProportionalToTimingFlag = x; } |
---|
457 | |
---|
458 | Int getNumTicksPocDiffOneMinus1 ( ) { return m_numTicksPocDiffOneMinus1; } |
---|
459 | Void setNumTicksPocDiffOneMinus1 (Int x ) { m_numTicksPocDiffOneMinus1 = x; } |
---|
460 | }; |
---|
461 | |
---|
462 | #if H_MV |
---|
463 | |
---|
464 | class TComVideoSignalInfo |
---|
465 | { |
---|
466 | private: |
---|
467 | Int m_videoVpsFormat; |
---|
468 | Bool m_videoFullRangeVpsFlag; |
---|
469 | Int m_colourPrimariesVps; |
---|
470 | Int m_transferCharacteristicsVps; |
---|
471 | Int m_matrixCoeffsVps; |
---|
472 | public: |
---|
473 | Void setVideoVpsFormat( Int val ) { m_videoVpsFormat = val; } |
---|
474 | Int getVideoVpsFormat( ) { return m_videoVpsFormat; } |
---|
475 | |
---|
476 | Void setVideoFullRangeVpsFlag( Bool flag ) { m_videoFullRangeVpsFlag = flag; } |
---|
477 | Bool getVideoFullRangeVpsFlag( ) { return m_videoFullRangeVpsFlag; } |
---|
478 | |
---|
479 | Void setColourPrimariesVps( Int val ) { m_colourPrimariesVps = val; } |
---|
480 | Int getColourPrimariesVps( ) { return m_colourPrimariesVps; } |
---|
481 | |
---|
482 | Void setTransferCharacteristicsVps( Int val ) { m_transferCharacteristicsVps = val; } |
---|
483 | Int getTransferCharacteristicsVps( ) { return m_transferCharacteristicsVps; } |
---|
484 | |
---|
485 | Void setMatrixCoeffsVps( Int val ) { m_matrixCoeffsVps = val; } |
---|
486 | Int getMatrixCoeffsVps( ) { return m_matrixCoeffsVps; } |
---|
487 | }; |
---|
488 | |
---|
489 | class TComVpsVuiBspHrdParameters |
---|
490 | { |
---|
491 | |
---|
492 | /* Not yet tested */ |
---|
493 | private: |
---|
494 | |
---|
495 | Int m_vpsNumAddHrdParams; |
---|
496 | Bool* m_cprmsAddPresentFlag; |
---|
497 | TComHRD* m_hrdParameters; |
---|
498 | Int* m_numSubLayerHrdMinus1; |
---|
499 | Int* m_numSignalledPartitioningSchemes; |
---|
500 | Int** m_numPartitionsInSchemeMinus1; |
---|
501 | |
---|
502 | Bool**** m_layerIncludedInPartitionFlag; |
---|
503 | Int*** m_numBspSchedulesMinus1; |
---|
504 | Int***** m_bspHrdIdx; |
---|
505 | Int***** m_bspSchedIdx; |
---|
506 | |
---|
507 | // Array sizes |
---|
508 | Int m_offsetHrdParamIdx; |
---|
509 | Int m_numHrdParam; |
---|
510 | Int m_numOls; |
---|
511 | TComVPS* m_vps; |
---|
512 | public: |
---|
513 | |
---|
514 | ~TComVpsVuiBspHrdParameters(); |
---|
515 | |
---|
516 | Void createAfterVpsNumAddHrdParams( TComVPS* vps ); |
---|
517 | Void createAfterNumSignalledPartitioningSchemes(Int h ); |
---|
518 | Void createAfterNumPartitionsInSchemeMinus1(Int h, Int j); |
---|
519 | Void createAfterNumBspSchedulesMinus1( Int h, Int i, Int t); |
---|
520 | |
---|
521 | Void setVpsNumAddHrdParams( Int val ) { m_vpsNumAddHrdParams = val; } |
---|
522 | Int getVpsNumAddHrdParams( ) { return m_vpsNumAddHrdParams; } |
---|
523 | |
---|
524 | Void setCprmsAddPresentFlag( Int i, Bool flag ) { m_cprmsAddPresentFlag[i - m_offsetHrdParamIdx] = flag; } |
---|
525 | Bool getCprmsAddPresentFlag( Int i ) { return m_cprmsAddPresentFlag[i - m_offsetHrdParamIdx]; } |
---|
526 | |
---|
527 | Void setNumSubLayerHrdMinus1( Int i, Int val ) { m_numSubLayerHrdMinus1[i - m_offsetHrdParamIdx] = val; } |
---|
528 | Int getNumSubLayerHrdMinus1( Int i ) { return m_numSubLayerHrdMinus1[i - m_offsetHrdParamIdx]; } |
---|
529 | |
---|
530 | Void setNumSignalledPartitioningSchemes( Int h, Int val ) { m_numSignalledPartitioningSchemes[h] = val; } |
---|
531 | Int getNumSignalledPartitioningSchemes( Int h ) { return m_numSignalledPartitioningSchemes[h]; } |
---|
532 | |
---|
533 | Void setNumPartitionsInSchemeMinus1( Int h, Int j, Int val ) { m_numPartitionsInSchemeMinus1[h][j] = val; } |
---|
534 | Int getNumPartitionsInSchemeMinus1( Int h, Int j ) { return m_numPartitionsInSchemeMinus1[h][j]; } |
---|
535 | |
---|
536 | Void setLayerIncludedInPartitionFlag( Int h, Int j, Int k, Int r, Bool flag ) { m_layerIncludedInPartitionFlag[h][j][k][r] = flag; } |
---|
537 | Bool getLayerIncludedInPartitionFlag( Int h, Int j, Int k, Int r ) { return m_layerIncludedInPartitionFlag[h][j][k][r]; } |
---|
538 | |
---|
539 | Void setNumBspSchedulesMinus1( Int h, Int i, Int t, Int val ) { m_numBspSchedulesMinus1[h][i][t] = val; } |
---|
540 | Int getNumBspSchedulesMinus1( Int h, Int i, Int t ) { return m_numBspSchedulesMinus1[h][i][t]; } |
---|
541 | |
---|
542 | Void setBspHrdIdx( Int h, Int i, Int t, Int j, Int k, Int val ) { m_bspHrdIdx[h][i - m_offsetHrdParamIdx][t][j][k] = val; } |
---|
543 | Int getBspHrdIdx( Int h, Int i, Int t, Int j, Int k ) { return m_bspHrdIdx[h][i - m_offsetHrdParamIdx][t][j][k]; } |
---|
544 | |
---|
545 | Int getBspHrdIdxLen( TComVPS* vps ); |
---|
546 | |
---|
547 | Void setBspSchedIdx( Int h, Int i, Int t, Int j, Int k, Int val ) { m_bspSchedIdx[h][i - m_offsetHrdParamIdx][t][j][k] = val; } |
---|
548 | Int getBspSchedIdx( Int h, Int i, Int t, Int j, Int k ) { return m_bspSchedIdx[h][i - m_offsetHrdParamIdx][t][j][k]; } |
---|
549 | |
---|
550 | Void setHrdParametermeters( Int k, TComHRD* val ) { *(m_hrdParameters + k ) = *val; }; |
---|
551 | TComHRD* getHrdParametermeters( Int k ) { return m_hrdParameters + k; }; |
---|
552 | }; |
---|
553 | |
---|
554 | class TComVPSVUI |
---|
555 | { |
---|
556 | private: |
---|
557 | Bool m_crossLayerPicTypeAlignedFlag; |
---|
558 | Bool m_crossLayerIrapAlignedFlag; |
---|
559 | Bool m_allLayersIdrAlignedFlag; |
---|
560 | Bool m_bitRatePresentVpsFlag; |
---|
561 | Bool m_picRatePresentVpsFlag; |
---|
562 | Bool m_bitRatePresentFlag [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; |
---|
563 | Bool m_picRatePresentFlag [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; |
---|
564 | Int m_avgBitRate [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; |
---|
565 | Int m_maxBitRate [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; |
---|
566 | Int m_constantPicRateIdc [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; |
---|
567 | Int m_avgPicRate [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; |
---|
568 | Bool m_videoSignalInfoIdxPresentFlag; |
---|
569 | Int m_vpsNumVideoSignalInfoMinus1; |
---|
570 | TComVideoSignalInfo* m_videoSignalInfo[MAX_NUM_VIDEO_SIGNAL_INFO]; |
---|
571 | Int m_vpsVideoSignalInfoIdx [MAX_NUM_VIDEO_SIGNAL_INFO]; |
---|
572 | Bool m_tilesNotInUseFlag; |
---|
573 | Bool m_tilesInUseFlag [MAX_NUM_LAYERS]; |
---|
574 | Bool m_loopFilterNotAcrossTilesFlag[MAX_NUM_LAYERS]; |
---|
575 | Bool m_tileBoundariesAlignedFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
576 | Bool m_wppNotInUseFlag; |
---|
577 | Bool m_wppInUseFlag [MAX_NUM_LAYERS]; |
---|
578 | Bool m_singleLayerForNonIrapFlag; |
---|
579 | Bool m_higherLayerIrapSkipFlag; |
---|
580 | Bool m_ilpRestrictedRefLayersFlag; |
---|
581 | Int m_minSpatialSegmentOffsetPlus1[MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
582 | Bool m_ctuBasedOffsetEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
583 | Int m_minHorizontalCtuOffsetPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
584 | Bool m_vpsVuiBspHrdPresentFlag; |
---|
585 | TComVpsVuiBspHrdParameters* m_vpsVuiBspHrdParameters; |
---|
586 | Bool m_baseLayerParameterSetCompatibilityFlag[MAX_NUM_LAYERS]; |
---|
587 | |
---|
588 | public: |
---|
589 | TComVPSVUI(); |
---|
590 | ~TComVPSVUI(); |
---|
591 | Void setCrossLayerPicTypeAlignedFlag( Bool flag ) { m_crossLayerPicTypeAlignedFlag = flag; } |
---|
592 | Bool getCrossLayerPicTypeAlignedFlag( ) { return m_crossLayerPicTypeAlignedFlag; } |
---|
593 | |
---|
594 | Void setCrossLayerIrapAlignedFlag( Bool flag ) { m_crossLayerIrapAlignedFlag = flag; } |
---|
595 | Bool getCrossLayerIrapAlignedFlag( ) { return m_crossLayerIrapAlignedFlag; } |
---|
596 | |
---|
597 | Void setAllLayersIdrAlignedFlag( Bool flag ) { m_allLayersIdrAlignedFlag = flag; } |
---|
598 | Bool getAllLayersIdrAlignedFlag( ) { return m_allLayersIdrAlignedFlag; } |
---|
599 | |
---|
600 | Void setBitRatePresentVpsFlag( Bool flag ) { m_bitRatePresentVpsFlag = flag; } |
---|
601 | Bool getBitRatePresentVpsFlag( ) { return m_bitRatePresentVpsFlag; } |
---|
602 | |
---|
603 | Void setPicRatePresentVpsFlag( Bool flag ) { m_picRatePresentVpsFlag = flag; } |
---|
604 | Bool getPicRatePresentVpsFlag( ) { return m_picRatePresentVpsFlag; } |
---|
605 | |
---|
606 | Void setBitRatePresentFlag( Int i, Int j, Bool flag ) { m_bitRatePresentFlag[i][j] = flag; } |
---|
607 | Bool getBitRatePresentFlag( Int i, Int j ) { return m_bitRatePresentFlag[i][j]; } |
---|
608 | |
---|
609 | Void setPicRatePresentFlag( Int i, Int j, Bool flag ) { m_picRatePresentFlag[i][j] = flag; } |
---|
610 | Bool getPicRatePresentFlag( Int i, Int j ) { return m_picRatePresentFlag[i][j]; } |
---|
611 | |
---|
612 | Void setAvgBitRate( Int i, Int j, Int val ) { m_avgBitRate[i][j] = val; } |
---|
613 | Int getAvgBitRate( Int i, Int j ) { return m_avgBitRate[i][j]; } |
---|
614 | |
---|
615 | Void setMaxBitRate( Int i, Int j, Int val ) { m_maxBitRate[i][j] = val; } |
---|
616 | Int getMaxBitRate( Int i, Int j ) { return m_maxBitRate[i][j]; } |
---|
617 | |
---|
618 | Void setConstantPicRateIdc( Int i, Int j, Int val ) { m_constantPicRateIdc[i][j] = val; } |
---|
619 | Int getConstantPicRateIdc( Int i, Int j ) { return m_constantPicRateIdc[i][j]; } |
---|
620 | |
---|
621 | Void setAvgPicRate( Int i, Int j, Int val ) { m_avgPicRate[i][j] = val; } |
---|
622 | Int getAvgPicRate( Int i, Int j ) { return m_avgPicRate[i][j]; } |
---|
623 | |
---|
624 | Void setVideoSignalInfoIdxPresentFlag( Bool flag ) { m_videoSignalInfoIdxPresentFlag = flag; } |
---|
625 | Bool getVideoSignalInfoIdxPresentFlag( ) { return m_videoSignalInfoIdxPresentFlag; } |
---|
626 | |
---|
627 | Void setVideoSignalInfo( Int i, TComVideoSignalInfo* val ) { m_videoSignalInfo[i] = val; } |
---|
628 | TComVideoSignalInfo* getVideoSignalInfo( Int i ) { return m_videoSignalInfo[i]; } |
---|
629 | |
---|
630 | Void setVpsNumVideoSignalInfoMinus1( Int val ) { m_vpsNumVideoSignalInfoMinus1 = val; } |
---|
631 | Int getVpsNumVideoSignalInfoMinus1( ) { return m_vpsNumVideoSignalInfoMinus1; } |
---|
632 | |
---|
633 | Void setVpsVideoSignalInfoIdx( Int i, Int val ) { m_vpsVideoSignalInfoIdx[i] = val; } |
---|
634 | Int getVpsVideoSignalInfoIdx( Int i ) { return m_vpsVideoSignalInfoIdx[i]; } |
---|
635 | |
---|
636 | Void setTilesNotInUseFlag( Bool flag ) { m_tilesNotInUseFlag = flag; } |
---|
637 | Bool getTilesNotInUseFlag( ) { return m_tilesNotInUseFlag; } |
---|
638 | |
---|
639 | Void setTilesInUseFlag( Int i, Bool flag ) { m_tilesInUseFlag[i] = flag; } |
---|
640 | Bool getTilesInUseFlag( Int i ) { return m_tilesInUseFlag[i]; } |
---|
641 | |
---|
642 | Void setLoopFilterNotAcrossTilesFlag( Int i, Int val ) { m_loopFilterNotAcrossTilesFlag[i] = val; } |
---|
643 | Bool getLoopFilterNotAcrossTilesFlag( Int i ) { return m_loopFilterNotAcrossTilesFlag[i]; } |
---|
644 | |
---|
645 | Void setTileBoundariesAlignedFlag( Int i, Int j, Bool flag ) { m_tileBoundariesAlignedFlag[i][j] = flag; } |
---|
646 | Bool getTileBoundariesAlignedFlag( Int i, Int j ) { return m_tileBoundariesAlignedFlag[i][j]; } |
---|
647 | |
---|
648 | Void setWppNotInUseFlag( Bool flag ) { m_wppNotInUseFlag = flag; } |
---|
649 | Bool getWppNotInUseFlag( ) { return m_wppNotInUseFlag; } |
---|
650 | |
---|
651 | Void setWppInUseFlag( Int i, Bool flag ) { m_wppInUseFlag[i] = flag; } |
---|
652 | Bool getWppInUseFlag( Int i ) { return m_wppInUseFlag[i]; } |
---|
653 | |
---|
654 | Void setSingleLayerForNonIrapFlag( Bool flag ) { m_singleLayerForNonIrapFlag = flag; } |
---|
655 | Bool getSingleLayerForNonIrapFlag( ) { return m_singleLayerForNonIrapFlag; } |
---|
656 | |
---|
657 | Void setHigherLayerIrapSkipFlag( Bool flag ) { m_higherLayerIrapSkipFlag = flag; } |
---|
658 | Bool getHigherLayerIrapSkipFlag( ) { return m_higherLayerIrapSkipFlag; } |
---|
659 | |
---|
660 | Void setIlpRestrictedRefLayersFlag( Bool flag ) { m_ilpRestrictedRefLayersFlag = flag; } |
---|
661 | Bool getIlpRestrictedRefLayersFlag( ) { return m_ilpRestrictedRefLayersFlag; } |
---|
662 | |
---|
663 | Void setMinSpatialSegmentOffsetPlus1( Int i, Int j, Int val ) { m_minSpatialSegmentOffsetPlus1[i][j] = val; } |
---|
664 | Int getMinSpatialSegmentOffsetPlus1( Int i, Int j ) { return m_minSpatialSegmentOffsetPlus1[i][j]; } |
---|
665 | |
---|
666 | Void setCtuBasedOffsetEnabledFlag( Int i, Int j, Bool flag ) { m_ctuBasedOffsetEnabledFlag[i][j] = flag; } |
---|
667 | Bool getCtuBasedOffsetEnabledFlag( Int i, Int j ) { return m_ctuBasedOffsetEnabledFlag[i][j]; } |
---|
668 | |
---|
669 | Void setMinHorizontalCtuOffsetPlus1( Int i, Int j, Int val ) { m_minHorizontalCtuOffsetPlus1[i][j] = val; } |
---|
670 | Int getMinHorizontalCtuOffsetPlus1( Int i, Int j ) { return m_minHorizontalCtuOffsetPlus1[i][j]; } |
---|
671 | |
---|
672 | Void setVpsVuiBspHrdPresentFlag( Bool flag ) { m_vpsVuiBspHrdPresentFlag = flag; } |
---|
673 | Bool getVpsVuiBspHrdPresentFlag( ) { return m_vpsVuiBspHrdPresentFlag; } |
---|
674 | |
---|
675 | Void setVpsVuiBspHrdParameters( TComVpsVuiBspHrdParameters* val) { m_vpsVuiBspHrdParameters = val; } |
---|
676 | TComVpsVuiBspHrdParameters* getVpsVuiBspHrdParameters( ) { return m_vpsVuiBspHrdParameters; } |
---|
677 | |
---|
678 | Void setBaseLayerParameterSetCompatibilityFlag( Int i, Bool flag ) { m_baseLayerParameterSetCompatibilityFlag[i] = flag; } |
---|
679 | Bool getBaseLayerParameterSetCompatibilityFlag( Int i ) { return m_baseLayerParameterSetCompatibilityFlag[i]; } |
---|
680 | |
---|
681 | Void inferVpsVui( Bool encoderFlag ); |
---|
682 | }; |
---|
683 | |
---|
684 | class TComRepFormat |
---|
685 | { |
---|
686 | private: |
---|
687 | Bool m_chromaAndBitDepthVpsPresentFlag; |
---|
688 | Int m_chromaFormatVpsIdc; |
---|
689 | Bool m_separateColourPlaneVpsFlag; |
---|
690 | Int m_picWidthVpsInLumaSamples; |
---|
691 | Int m_picHeightVpsInLumaSamples; |
---|
692 | Int m_bitDepthVpsLumaMinus8; |
---|
693 | Int m_bitDepthVpsChromaMinus8; |
---|
694 | Bool m_conformanceWindowVpsFlag; |
---|
695 | Int m_confWinVpsLeftOffset; |
---|
696 | Int m_confWinVpsRightOffset; |
---|
697 | Int m_confWinVpsTopOffset; |
---|
698 | Int m_confWinVpsBottomOffset; |
---|
699 | |
---|
700 | public: |
---|
701 | |
---|
702 | TComRepFormat() |
---|
703 | { |
---|
704 | m_conformanceWindowVpsFlag = 0; |
---|
705 | m_confWinVpsLeftOffset = 0; |
---|
706 | m_confWinVpsRightOffset = 0; |
---|
707 | m_confWinVpsTopOffset = 0; |
---|
708 | m_confWinVpsBottomOffset = 0; |
---|
709 | }; |
---|
710 | |
---|
711 | Void setChromaAndBitDepthVpsPresentFlag( Bool flag ) { m_chromaAndBitDepthVpsPresentFlag = flag; } |
---|
712 | Bool getChromaAndBitDepthVpsPresentFlag( ) { return m_chromaAndBitDepthVpsPresentFlag; } |
---|
713 | Void checkChromaAndBitDepthVpsPresentFlag( Int i ) { assert( i != 0 || m_chromaAndBitDepthVpsPresentFlag ); } // The value of chroma_and_bit_depth_vps_present_flag of the first rep_format( ) syntax structure in the VPS shall be equal to 1. |
---|
714 | Void inferChromaAndBitDepth( TComRepFormat* prevRepFormat, Bool encoderFlag ); |
---|
715 | |
---|
716 | Void setChromaFormatVpsIdc( Int val ) { m_chromaFormatVpsIdc = val; } |
---|
717 | Int getChromaFormatVpsIdc( ) { return m_chromaFormatVpsIdc; } |
---|
718 | |
---|
719 | Void setSeparateColourPlaneVpsFlag( Bool flag ) { m_separateColourPlaneVpsFlag = flag; } |
---|
720 | Bool getSeparateColourPlaneVpsFlag( ) { return m_separateColourPlaneVpsFlag; } |
---|
721 | |
---|
722 | Void setPicWidthVpsInLumaSamples( Int val ) { m_picWidthVpsInLumaSamples = val; } |
---|
723 | Int getPicWidthVpsInLumaSamples( ) { return m_picWidthVpsInLumaSamples; } |
---|
724 | |
---|
725 | Void setPicHeightVpsInLumaSamples( Int val ) { m_picHeightVpsInLumaSamples = val; } |
---|
726 | Int getPicHeightVpsInLumaSamples( ) { return m_picHeightVpsInLumaSamples; } |
---|
727 | |
---|
728 | Void setBitDepthVpsLumaMinus8( Int val ) { m_bitDepthVpsLumaMinus8 = val; } |
---|
729 | Int getBitDepthVpsLumaMinus8( ) { return m_bitDepthVpsLumaMinus8; } |
---|
730 | |
---|
731 | Void setBitDepthVpsChromaMinus8( Int val ) { m_bitDepthVpsChromaMinus8 = val; } |
---|
732 | Int getBitDepthVpsChromaMinus8( ) { return m_bitDepthVpsChromaMinus8; } |
---|
733 | |
---|
734 | Void setConformanceWindowVpsFlag( Bool flag ) { m_conformanceWindowVpsFlag = flag; } |
---|
735 | Bool getConformanceWindowVpsFlag( ) { return m_conformanceWindowVpsFlag; } |
---|
736 | |
---|
737 | Void setConfWinVpsLeftOffset( Int val ) { m_confWinVpsLeftOffset = val; } |
---|
738 | Int getConfWinVpsLeftOffset( ) { return m_confWinVpsLeftOffset; } |
---|
739 | |
---|
740 | Void setConfWinVpsRightOffset( Int val ) { m_confWinVpsRightOffset = val; } |
---|
741 | Int getConfWinVpsRightOffset( ) { return m_confWinVpsRightOffset; } |
---|
742 | |
---|
743 | Void setConfWinVpsTopOffset( Int val ) { m_confWinVpsTopOffset = val; } |
---|
744 | Int getConfWinVpsTopOffset( ) { return m_confWinVpsTopOffset; } |
---|
745 | |
---|
746 | Void setConfWinVpsBottomOffset( Int val ) { m_confWinVpsBottomOffset = val; } |
---|
747 | Int getConfWinVpsBottomOffset( ) { return m_confWinVpsBottomOffset; } |
---|
748 | }; |
---|
749 | |
---|
750 | |
---|
751 | class TComDpbSize |
---|
752 | { |
---|
753 | private: |
---|
754 | Bool m_subLayerFlagInfoPresentFlag[MAX_VPS_OUTPUTLAYER_SETS]; |
---|
755 | Bool m_subLayerDpbInfoPresentFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_TLAYER]; |
---|
756 | Int m_maxVpsDecPicBufferingMinus1[MAX_VPS_OUTPUTLAYER_SETS][MAX_NUM_LAYER_IDS][MAX_TLAYER];; |
---|
757 | Int m_maxVpsNumReorderPics [MAX_VPS_OUTPUTLAYER_SETS][MAX_TLAYER]; |
---|
758 | Int m_maxVpsLatencyIncreasePlus1 [MAX_VPS_OUTPUTLAYER_SETS][MAX_TLAYER]; |
---|
759 | |
---|
760 | public: |
---|
761 | TComDpbSize( ); |
---|
762 | |
---|
763 | Void setSubLayerFlagInfoPresentFlag( Int i, Bool flag ) { m_subLayerFlagInfoPresentFlag[i] = flag; } |
---|
764 | Bool getSubLayerFlagInfoPresentFlag( Int i ) { return m_subLayerFlagInfoPresentFlag[i]; } |
---|
765 | |
---|
766 | Void setSubLayerDpbInfoPresentFlag( Int i, Int j, Bool flag ) { m_subLayerDpbInfoPresentFlag[i][j] = flag; } |
---|
767 | Bool getSubLayerDpbInfoPresentFlag( Int i, Int j ) { return m_subLayerDpbInfoPresentFlag[i][j]; } |
---|
768 | |
---|
769 | Void setMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j, Int val ) { m_maxVpsDecPicBufferingMinus1[i][k][j] = val; } |
---|
770 | Int getMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j ) { assert( m_maxVpsDecPicBufferingMinus1[i][k][j] >= 0 ); return m_maxVpsDecPicBufferingMinus1[i][k][j]; } |
---|
771 | |
---|
772 | Void setMaxVpsNumReorderPics( Int i, Int j, Int val ) { m_maxVpsNumReorderPics[i][j] = val; } |
---|
773 | Int getMaxVpsNumReorderPics( Int i, Int j ) { return m_maxVpsNumReorderPics[i][j]; } |
---|
774 | |
---|
775 | Void setMaxVpsLatencyIncreasePlus1( Int i, Int j, Int val ) { m_maxVpsLatencyIncreasePlus1[i][j] = val; } |
---|
776 | Int getMaxVpsLatencyIncreasePlus1( Int i, Int j ) { return m_maxVpsLatencyIncreasePlus1[i][j]; } |
---|
777 | }; |
---|
778 | #endif |
---|
779 | class TComVPS |
---|
780 | { |
---|
781 | private: |
---|
782 | Int m_VPSId; |
---|
783 | #if H_MV |
---|
784 | Bool m_vpsBaseLayerInternalFlag; |
---|
785 | Bool m_vpsBaseLayerAvailableFlag; |
---|
786 | #endif |
---|
787 | |
---|
788 | UInt m_uiMaxTLayers; |
---|
789 | |
---|
790 | #if H_MV |
---|
791 | UInt m_uiMaxLayersMinus1; |
---|
792 | #else |
---|
793 | UInt m_uiMaxLayers; |
---|
794 | #endif |
---|
795 | Bool m_bTemporalIdNestingFlag; |
---|
796 | |
---|
797 | UInt m_numReorderPics[MAX_TLAYER]; |
---|
798 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
799 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) |
---|
800 | |
---|
801 | UInt m_numHrdParameters; |
---|
802 | #if H_MV |
---|
803 | UInt m_maxLayerId; |
---|
804 | #else |
---|
805 | UInt m_maxNuhReservedZeroLayerId; |
---|
806 | #endif |
---|
807 | TComHRD* m_hrdParameters; |
---|
808 | UInt* m_hrdOpSetIdx; |
---|
809 | Bool* m_cprmsPresentFlag; |
---|
810 | #if H_MV |
---|
811 | UInt m_vpsNumLayerSetsMinus1; |
---|
812 | Bool m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_LAYER_ID_PLUS1]; |
---|
813 | #else |
---|
814 | UInt m_numOpSets; |
---|
815 | Bool m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1]; |
---|
816 | #endif |
---|
817 | |
---|
818 | #if H_MV |
---|
819 | TComPTL m_pcPTL[MAX_VPS_OP_SETS_PLUS1]; |
---|
820 | #else |
---|
821 | TComPTL m_pcPTL; |
---|
822 | #endif |
---|
823 | TimingInfo m_timingInfo; |
---|
824 | #if H_MV |
---|
825 | Bool m_vpsExtensionFlag; |
---|
826 | |
---|
827 | /// VPS EXTENSION SYNTAX ELEMENTS |
---|
828 | Int m_vpsNonVuiExtensionLength; |
---|
829 | Bool m_splittingFlag; |
---|
830 | Bool m_scalabilityMaskFlag [MAX_NUM_SCALABILITY_TYPES]; |
---|
831 | Int m_dimensionIdLen [MAX_NUM_SCALABILITY_TYPES]; |
---|
832 | Bool m_vpsNuhLayerIdPresentFlag; |
---|
833 | Int m_layerIdInNuh [MAX_NUM_LAYER_IDS]; |
---|
834 | Int m_dimensionId [MAX_NUM_LAYER_IDS][MAX_NUM_SCALABILITY_TYPES]; |
---|
835 | |
---|
836 | Int m_viewIdLen; |
---|
837 | Int m_viewIdVal [MAX_NUM_LAYERS]; |
---|
838 | Bool m_directDependencyFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; |
---|
839 | Bool m_vpsSubLayersMaxMinus1PresentFlag; |
---|
840 | Int m_subLayersVpsMaxMinus1 [MAX_NUM_LAYERS]; |
---|
841 | Bool m_maxTidRefPresentFlag; |
---|
842 | Int m_maxTidIlRefPicsPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
843 | Bool m_allRefLayersActiveFlag; |
---|
844 | Int m_vpsNumProfileTierLevelMinus1; |
---|
845 | Bool m_vpsProfilePresentFlag [MAX_VPS_OP_SETS_PLUS1]; |
---|
846 | |
---|
847 | Int m_numAddLayerSets; |
---|
848 | Int m_highestLayerIdxPlus1 [MAX_VPS_ADD_OUTPUT_LAYER_SETS][MAX_NUM_LAYERS]; |
---|
849 | Int m_numAddOlss; |
---|
850 | |
---|
851 | Int m_defaultOutputLayerIdc; |
---|
852 | |
---|
853 | Int m_layerSetIdxForOlsMinus1 [MAX_VPS_OUTPUTLAYER_SETS]; |
---|
854 | Bool m_outputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1]; |
---|
855 | Int m_profileTierLevelIdx [MAX_VPS_OUTPUTLAYER_SETS ][MAX_NUM_LAYERS]; |
---|
856 | Bool m_altOutputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS]; |
---|
857 | Bool m_repFormatIdxPresentFlag; |
---|
858 | |
---|
859 | Int m_vpsNumRepFormatsMinus1; |
---|
860 | Int m_vpsRepFormatIdx [MAX_NUM_LAYERS]; |
---|
861 | TComRepFormat* m_repFormat [MAX_NUM_LAYERS]; |
---|
862 | Bool m_maxOneActiveRefLayerFlag; |
---|
863 | #if H_MV_HLS7_GEN || H_MV_HLS_FIX |
---|
864 | Bool m_vpsPocLsbAlignedFlag; |
---|
865 | #endif |
---|
866 | Bool m_pocLsbNotPresentFlag [MAX_NUM_LAYERS]; |
---|
867 | |
---|
868 | TComDpbSize* m_dpbSize; |
---|
869 | Int m_directDepTypeLenMinus2; |
---|
870 | Bool m_defaultDirectDependencyFlag; |
---|
871 | Int m_defaultDirectDependencyType; |
---|
872 | |
---|
873 | #if H_MV_HLS7_GEN |
---|
874 | Int m_directDependencyType [MAX_NUM_LAYERS] [MAX_NUM_LAYERS]; |
---|
875 | #endif |
---|
876 | Bool m_vpsVuiPresentFlag; |
---|
877 | TComVPSVUI* m_vpsVUI; |
---|
878 | #if !H_MV_HLS7_GEN |
---|
879 | Int m_directDependencyType [MAX_NUM_LAYERS] [MAX_NUM_LAYERS]; |
---|
880 | #endif |
---|
881 | |
---|
882 | // VPS EXTENSION SEMANTICS VARIABLES |
---|
883 | Int m_layerIdInVps [MAX_NUM_LAYERS ]; |
---|
884 | Int m_dependencyFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
885 | |
---|
886 | #if H_MV_FIX_NUM_VIEWS |
---|
887 | Int m_numViews; |
---|
888 | #endif |
---|
889 | Int m_numDirectRefLayers [MAX_NUM_LAYERS]; |
---|
890 | Int m_idDirectRefLayer [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
891 | #if HHI_DEPENDENCY_SIGNALLING_I1_J0107 |
---|
892 | #if H_3D |
---|
893 | Int m_numRefListLayers [MAX_NUM_LAYERS]; |
---|
894 | Int m_idRefListLayer [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
895 | #endif |
---|
896 | #endif |
---|
897 | |
---|
898 | |
---|
899 | Int m_numRefLayers [MAX_NUM_LAYER_IDS]; |
---|
900 | Int m_idRefLayer [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
901 | |
---|
902 | |
---|
903 | Int m_numPredictedLayers [MAX_NUM_LAYERS ]; |
---|
904 | Int m_idPredictedLayer [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS]; |
---|
905 | Int m_numIndependentLayers; |
---|
906 | Int m_numLayersInTreePartition [MAX_NUM_LAYER_IDS]; |
---|
907 | Int m_treePartitionLayerIdList [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS]; |
---|
908 | Bool m_recursiveRefLayerFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; |
---|
909 | Int m_viewIndex [MAX_NUM_LAYERS ]; |
---|
910 | |
---|
911 | std::vector< std::vector< Int> > m_targetDecLayerIdLists; //[TargetOptLayerSetIdx][i] |
---|
912 | std::vector< std::vector< Int> > m_targetOptLayerIdLists; |
---|
913 | std::vector< std::vector< Int> > m_layerSetLayerIdList; |
---|
914 | |
---|
915 | Int m_numNecessaryLayers [MAX_VPS_OUTPUTLAYER_SETS]; |
---|
916 | Bool m_necessaryLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_NUM_LAYERS]; |
---|
917 | |
---|
918 | Int xGetDimBitOffset( Int j ); |
---|
919 | Void xSetRefLayerFlags( Int currLayerId ); |
---|
920 | // VPS EXTENSION 2 SYNTAX ELEMENTS |
---|
921 | #if !HHI_TOOL_PARAMETERS_I2_J0107 |
---|
922 | #if H_3D_ARP |
---|
923 | UInt m_uiUseAdvResPred [MAX_NUM_LAYERS ]; |
---|
924 | UInt m_uiARPStepNum [MAX_NUM_LAYERS ]; |
---|
925 | #endif |
---|
926 | #if H_3D_IV_MERGE |
---|
927 | Bool m_ivMvPredFlag [ MAX_NUM_LAYERS ]; |
---|
928 | Bool m_ivMvScalingFlag [ MAX_NUM_LAYERS ]; |
---|
929 | #if H_3D_SPIVMP |
---|
930 | Int m_iSubPULog2Size [MAX_NUM_LAYERS ]; |
---|
931 | Int m_iSubPUMPILog2Size [MAX_NUM_LAYERS ]; |
---|
932 | #endif |
---|
933 | #endif |
---|
934 | #if H_3D_QTLPC |
---|
935 | Bool m_bLimQtPredFlag [ MAX_NUM_LAYERS ]; |
---|
936 | #endif |
---|
937 | #if H_3D_VSP |
---|
938 | Bool m_viewSynthesisPredFlag [ MAX_NUM_LAYERS ]; |
---|
939 | #endif |
---|
940 | #if H_3D_NBDV_REF |
---|
941 | Bool m_depthRefinementFlag [ MAX_NUM_LAYERS ]; |
---|
942 | #endif |
---|
943 | Bool m_vpsDepthModesFlag [MAX_NUM_LAYERS ]; |
---|
944 | #if H_3D |
---|
945 | Bool m_bIVPFlag [MAX_NUM_LAYERS ]; |
---|
946 | #endif |
---|
947 | #endif |
---|
948 | #if H_3D |
---|
949 | UInt m_uiCamParPrecision; |
---|
950 | Bool* m_bCamParInSliceHeader; |
---|
951 | Bool* m_bCamParPresent; |
---|
952 | Int ***m_aaaiCodedScale ; |
---|
953 | Int ***m_aaaiCodedOffset; |
---|
954 | |
---|
955 | #if H_MV_FIX_NUM_VIEWS |
---|
956 | #if HHI_VIEW_ID_LIST_I5_J0107 |
---|
957 | std::vector<Int> m_viewOIdxList; |
---|
958 | #endif |
---|
959 | #endif |
---|
960 | |
---|
961 | #endif |
---|
962 | #if !HHI_TOOL_PARAMETERS_I2_J0107 |
---|
963 | #if H_3D_INTER_SDC |
---|
964 | Bool m_bInterSDCFlag[MAX_NUM_LAYERS ]; |
---|
965 | #endif |
---|
966 | #if H_3D_DBBP |
---|
967 | Bool m_dbbpFlag[MAX_NUM_LAYERS]; |
---|
968 | #endif |
---|
969 | #if H_3D_IV_MERGE |
---|
970 | Bool m_bMPIFlag[MAX_NUM_LAYERS ]; |
---|
971 | #endif |
---|
972 | #if MTK_SINGLE_DEPTH_VPS_FLAG_J0060 |
---|
973 | Bool m_singleDepthModeFlag [ MAX_NUM_LAYERS ]; |
---|
974 | #endif |
---|
975 | #endif |
---|
976 | |
---|
977 | #endif |
---|
978 | public: |
---|
979 | TComVPS(); |
---|
980 | virtual ~TComVPS(); |
---|
981 | |
---|
982 | Void createHrdParamBuffer() |
---|
983 | { |
---|
984 | m_hrdParameters = new TComHRD[ getNumHrdParameters() ]; |
---|
985 | m_hrdOpSetIdx = new UInt [ getNumHrdParameters() ]; |
---|
986 | m_cprmsPresentFlag = new Bool [ getNumHrdParameters() ]; |
---|
987 | } |
---|
988 | |
---|
989 | TComHRD* getHrdParameters ( UInt i ) { return &m_hrdParameters[ i ]; } |
---|
990 | UInt getHrdOpSetIdx ( UInt i ) { return m_hrdOpSetIdx[ i ]; } |
---|
991 | Void setHrdOpSetIdx ( UInt val, UInt i ) { m_hrdOpSetIdx[ i ] = val; } |
---|
992 | Bool getCprmsPresentFlag ( UInt i ) { return m_cprmsPresentFlag[ i ]; } |
---|
993 | Void setCprmsPresentFlag ( Bool val, UInt i ) { m_cprmsPresentFlag[ i ] = val; } |
---|
994 | |
---|
995 | Int getVPSId () { return m_VPSId; } |
---|
996 | Void setVPSId (Int i) { m_VPSId = i; } |
---|
997 | |
---|
998 | #if H_MV |
---|
999 | Void setVpsBaseLayerInternalFlag( Bool flag ) { m_vpsBaseLayerInternalFlag = flag; } |
---|
1000 | Bool getVpsBaseLayerInternalFlag( ) { return m_vpsBaseLayerInternalFlag; } |
---|
1001 | Void setVpsBaseLayerAvailableFlag( Bool flag ) { m_vpsBaseLayerAvailableFlag = flag; } |
---|
1002 | Bool getVpsBaseLayerAvailableFlag( ) { return m_vpsBaseLayerAvailableFlag; } |
---|
1003 | #endif |
---|
1004 | |
---|
1005 | UInt getMaxTLayers () { return m_uiMaxTLayers; } |
---|
1006 | Void setMaxTLayers (UInt t) { m_uiMaxTLayers = t; } |
---|
1007 | |
---|
1008 | #if H_MV |
---|
1009 | UInt getMaxSubLayersMinus1() { return m_uiMaxTLayers - 1; } // For consistency with draft spec |
---|
1010 | Void setMaxSubLayersMinus1(UInt val) { m_uiMaxTLayers = (val + 1); }; |
---|
1011 | UInt getMaxLayersMinus1() { return m_uiMaxLayersMinus1; }; |
---|
1012 | Void setMaxLayersMinus1(UInt l) { m_uiMaxLayersMinus1 = l; } |
---|
1013 | #else |
---|
1014 | UInt getMaxLayers () { return m_uiMaxLayers; } |
---|
1015 | Void setMaxLayers (UInt l) { m_uiMaxLayers = l; } |
---|
1016 | #endif |
---|
1017 | |
---|
1018 | Bool getTemporalNestingFlag () { return m_bTemporalIdNestingFlag; } |
---|
1019 | Void setTemporalNestingFlag (Bool t) { m_bTemporalIdNestingFlag = t; } |
---|
1020 | |
---|
1021 | Void setNumReorderPics(UInt v, UInt tLayer) { m_numReorderPics[tLayer] = v; } |
---|
1022 | UInt getNumReorderPics(UInt tLayer) { return m_numReorderPics[tLayer]; } |
---|
1023 | |
---|
1024 | Void setMaxDecPicBuffering(UInt v, UInt tLayer) { assert(tLayer < MAX_TLAYER); m_uiMaxDecPicBuffering[tLayer] = v; } |
---|
1025 | UInt getMaxDecPicBuffering(UInt tLayer) { return m_uiMaxDecPicBuffering[tLayer]; } |
---|
1026 | |
---|
1027 | Void setMaxLatencyIncrease(UInt v, UInt tLayer) { m_uiMaxLatencyIncrease[tLayer] = v; } |
---|
1028 | UInt getMaxLatencyIncrease(UInt tLayer) { return m_uiMaxLatencyIncrease[tLayer]; } |
---|
1029 | |
---|
1030 | UInt getNumHrdParameters() { return m_numHrdParameters; } |
---|
1031 | Void setNumHrdParameters(UInt v) { m_numHrdParameters = v; } |
---|
1032 | |
---|
1033 | #if H_MV |
---|
1034 | UInt getVpsMaxLayerId() { return m_maxLayerId; } |
---|
1035 | Void setVpsMaxLayerId(UInt v) { m_maxLayerId = v; } |
---|
1036 | |
---|
1037 | UInt getVpsNumLayerSetsMinus1() { return m_vpsNumLayerSetsMinus1; } |
---|
1038 | Void setVpsNumLayerSetsMinus1(UInt v) { m_vpsNumLayerSetsMinus1 = v; } |
---|
1039 | #else |
---|
1040 | UInt getMaxNuhReservedZeroLayerId() { return m_maxNuhReservedZeroLayerId; } |
---|
1041 | Void setMaxNuhReservedZeroLayerId(UInt v) { m_maxNuhReservedZeroLayerId = v; } |
---|
1042 | |
---|
1043 | UInt getMaxOpSets() { return m_numOpSets; } |
---|
1044 | Void setMaxOpSets(UInt v) { m_numOpSets = v; } |
---|
1045 | #endif |
---|
1046 | Bool getLayerIdIncludedFlag(UInt opsIdx, UInt id) { return m_layerIdIncludedFlag[opsIdx][id]; } |
---|
1047 | Void setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id) { m_layerIdIncludedFlag[opsIdx][id] = v; } |
---|
1048 | |
---|
1049 | #if H_MV |
---|
1050 | TComPTL* getPTL( Int idx = 0 ) { return &m_pcPTL[idx]; } |
---|
1051 | #else |
---|
1052 | TComPTL* getPTL() { return &m_pcPTL; } |
---|
1053 | #endif |
---|
1054 | TimingInfo* getTimingInfo() { return &m_timingInfo; } |
---|
1055 | #if H_MV |
---|
1056 | Void setVpsExtensionFlag( Bool flag ) { m_vpsExtensionFlag = flag; } |
---|
1057 | Bool getVpsExtensionFlag( ) { return m_vpsExtensionFlag; } |
---|
1058 | |
---|
1059 | Void setVpsNonVuiExtensionLength( Int val ) { m_vpsNonVuiExtensionLength = val; } |
---|
1060 | Int getVpsNonVuiExtensionLength( ) { return m_vpsNonVuiExtensionLength; } |
---|
1061 | |
---|
1062 | Void setSplittingFlag( Bool val ) { m_splittingFlag = val; } |
---|
1063 | Bool getSplittingFlag() { return m_splittingFlag; } |
---|
1064 | |
---|
1065 | Void setScalabilityMaskFlag( UInt val ); |
---|
1066 | Void setScalabilityMaskFlag( Int scalType, Bool val ) { m_scalabilityMaskFlag[scalType] = val; } |
---|
1067 | Bool getScalabilityMaskFlag( Int scalType ) { return m_scalabilityMaskFlag[scalType]; } |
---|
1068 | |
---|
1069 | Int getNumScalabilityTypes( ); |
---|
1070 | |
---|
1071 | Void setDimensionIdLen( Int sIdx, Int val ) { m_dimensionIdLen[sIdx] = val; } |
---|
1072 | Int getDimensionIdLen( Int sIdx ) { assert( m_dimensionIdLen[sIdx] > 0) ; return m_dimensionIdLen[sIdx]; } |
---|
1073 | |
---|
1074 | Void setVpsNuhLayerIdPresentFlag( Bool val ) { m_vpsNuhLayerIdPresentFlag = val; } |
---|
1075 | Bool getVpsNuhLayerIdPresentFlag() { return m_vpsNuhLayerIdPresentFlag; } |
---|
1076 | |
---|
1077 | Void setLayerIdInNuh( Int layerIdInVps, Int val ) { m_layerIdInNuh[layerIdInVps] = val; } |
---|
1078 | Int getLayerIdInNuh( Int layerIdInVps ) { assert( m_layerIdInNuh[layerIdInVps] >= 0 ); return m_layerIdInNuh[layerIdInVps]; } |
---|
1079 | |
---|
1080 | Bool nuhLayerIdIncluded( Int layerIdinNuh ) { return ( m_layerIdInVps[ layerIdinNuh ] > 0 ); } |
---|
1081 | |
---|
1082 | Void setDimensionId( Int layerIdInVps, Int scalIdx, Int val ) { m_dimensionId[layerIdInVps][scalIdx] = val; } |
---|
1083 | Int getDimensionId( Int layerIdInVps, Int scalIdx ) { return m_dimensionId[layerIdInVps][scalIdx]; } |
---|
1084 | |
---|
1085 | Void setViewIdLen( Int val ) { m_viewIdLen = val; } |
---|
1086 | Int getViewIdLen( ) { return m_viewIdLen; } |
---|
1087 | |
---|
1088 | Void setViewIdVal( Int viewOrderIndex, Int val ) { m_viewIdVal[viewOrderIndex] = val; } |
---|
1089 | Int getViewIdVal( Int viewOrderIndex ) { return m_viewIdVal[viewOrderIndex]; } |
---|
1090 | |
---|
1091 | Void setDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Bool val ) { m_directDependencyFlag[depLayeridInVps][refLayeridInVps] = val; } |
---|
1092 | Bool getDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps ) { return m_directDependencyFlag[depLayeridInVps][refLayeridInVps]; } |
---|
1093 | |
---|
1094 | Void setVpsSubLayersMaxMinus1PresentFlag( Bool flag ) { m_vpsSubLayersMaxMinus1PresentFlag = flag; } |
---|
1095 | Bool getVpsSubLayersMaxMinus1PresentFlag( ) { return m_vpsSubLayersMaxMinus1PresentFlag; } |
---|
1096 | |
---|
1097 | Void setSubLayersVpsMaxMinus1( Int i, Int val ) { m_subLayersVpsMaxMinus1[i] = val; } |
---|
1098 | Int getSubLayersVpsMaxMinus1( Int i ) { return m_subLayersVpsMaxMinus1[i]; } |
---|
1099 | Void checkSubLayersVpsMaxMinus1( Int i ) { assert( m_subLayersVpsMaxMinus1[i] >= 0 && m_subLayersVpsMaxMinus1[i] <= m_uiMaxTLayers - 1 ); } |
---|
1100 | |
---|
1101 | Void setMaxTidRefPresentFlag( Bool flag ) { m_maxTidRefPresentFlag = flag; } |
---|
1102 | Bool getMaxTidRefPresentFlag( ) { return m_maxTidRefPresentFlag; } |
---|
1103 | |
---|
1104 | Void setMaxTidIlRefPicsPlus1( Int i, Int j, Int val ) { m_maxTidIlRefPicsPlus1[i][j] = val; } |
---|
1105 | Int getMaxTidIlRefPicsPlus1( Int i, Int j ) { return m_maxTidIlRefPicsPlus1[i][j]; } |
---|
1106 | |
---|
1107 | Void setAllRefLayersActiveFlag( Bool flag ) { m_allRefLayersActiveFlag = flag; } |
---|
1108 | Bool getAllRefLayersActiveFlag( ) { return m_allRefLayersActiveFlag; } |
---|
1109 | |
---|
1110 | Void setVpsNumProfileTierLevelMinus1( Int val ) { m_vpsNumProfileTierLevelMinus1 = val; } |
---|
1111 | Int getVpsNumProfileTierLevelMinus1( ) { return m_vpsNumProfileTierLevelMinus1; } |
---|
1112 | |
---|
1113 | Void setVpsProfilePresentFlag( Int idx, Bool val ) { m_vpsProfilePresentFlag[idx] = val; } |
---|
1114 | Bool getVpsProfilePresentFlag( Int idx ) { return m_vpsProfilePresentFlag[idx]; } |
---|
1115 | |
---|
1116 | Void setNumAddLayerSets( Int val ) { m_numAddLayerSets = val; } |
---|
1117 | Int getNumAddLayerSets( ) { return m_numAddLayerSets; } |
---|
1118 | |
---|
1119 | Void setHighestLayerIdxPlus1( Int i, Int j, Int val ) { m_highestLayerIdxPlus1[i][j] = val; } |
---|
1120 | Int getHighestLayerIdxPlus1( Int i, Int j ) { return m_highestLayerIdxPlus1[i][j]; } |
---|
1121 | |
---|
1122 | Void setNumAddOlss( Int val ) { m_numAddOlss = val; } |
---|
1123 | Int getNumAddOlss( ) { return m_numAddOlss; } |
---|
1124 | |
---|
1125 | Void setDefaultOutputLayerIdc( Int val ) { m_defaultOutputLayerIdc = val; } |
---|
1126 | Int getDefaultOutputLayerIdc( ) { return m_defaultOutputLayerIdc; } |
---|
1127 | |
---|
1128 | Void setLayerSetIdxForOlsMinus1( Int outLayerSetIdx, Int val ) { m_layerSetIdxForOlsMinus1[ outLayerSetIdx ] = val; } |
---|
1129 | Int getLayerSetIdxForOlsMinus1( Int outLayerSetIdx ) { return m_layerSetIdxForOlsMinus1[ outLayerSetIdx ]; } |
---|
1130 | Int getLayerSetIdxForOlsMinus1Len( Int outLayerSetIdx ) { return gCeilLog2( getNumLayerSets() ); } |
---|
1131 | |
---|
1132 | Void setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag ) { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; } |
---|
1133 | Bool getOutputLayerFlag( Int outLayerSetIdx, Int i ) { return m_outputLayerFlag[ outLayerSetIdx ][ i ]; } |
---|
1134 | |
---|
1135 | Bool inferOutputLayerFlag( Int i, Int j ); |
---|
1136 | |
---|
1137 | Void setProfileTierLevelIdx( Int i, Int j, Int val ) { m_profileTierLevelIdx[ i ][ j ] = val; } |
---|
1138 | Int getProfileTierLevelIdx( Int i, Int j ) { return m_profileTierLevelIdx[ i ][ j ]; } |
---|
1139 | Int inferProfileTierLevelIdx( Int i, Int j ); |
---|
1140 | |
---|
1141 | Void setAltOutputLayerFlag( Int i, Bool flag ) { m_altOutputLayerFlag[i] = flag; } |
---|
1142 | Bool getAltOutputLayerFlag( Int i ) { return m_altOutputLayerFlag[i]; } |
---|
1143 | |
---|
1144 | Void setRepFormatIdxPresentFlag( Bool flag ) { m_repFormatIdxPresentFlag = flag; } |
---|
1145 | Bool getRepFormatIdxPresentFlag( ) { return m_repFormatIdxPresentFlag; } |
---|
1146 | |
---|
1147 | Void setVpsNumRepFormatsMinus1( Int val ) { m_vpsNumRepFormatsMinus1 = val; } |
---|
1148 | Int getVpsNumRepFormatsMinus1( ) { return m_vpsNumRepFormatsMinus1; } |
---|
1149 | |
---|
1150 | Void setVpsRepFormatIdx( Int i, Int val ) { m_vpsRepFormatIdx[i] = val; } |
---|
1151 | Int getVpsRepFormatIdx( Int i ) { return m_vpsRepFormatIdx[i]; } |
---|
1152 | |
---|
1153 | Int inferVpsRepFormatIdx( Int i ) { return std::min( i, getVpsNumRepFormatsMinus1() ); } |
---|
1154 | |
---|
1155 | Void setRepFormat( Int i, TComRepFormat* val ) { m_repFormat[i] = val; } |
---|
1156 | TComRepFormat* getRepFormat( Int i ) { return m_repFormat[i]; } |
---|
1157 | |
---|
1158 | Void setMaxOneActiveRefLayerFlag( Bool flag) { m_maxOneActiveRefLayerFlag = flag; } |
---|
1159 | Bool getMaxOneActiveRefLayerFlag( ) { return m_maxOneActiveRefLayerFlag; } |
---|
1160 | |
---|
1161 | #if H_MV_HLS7_GEN || H_MV_HLS_FIX |
---|
1162 | Void setVpsPocLsbAlignedFlag( Bool flag ) { m_vpsPocLsbAlignedFlag = flag; } |
---|
1163 | Bool getVpsPocLsbAlignedFlag( ) { return m_vpsPocLsbAlignedFlag; } |
---|
1164 | #endif |
---|
1165 | |
---|
1166 | Void setDpbSize( TComDpbSize* val ) { assert( m_dpbSize != 0 ); m_dpbSize = val; } |
---|
1167 | TComDpbSize* getDpbSize( ) { return m_dpbSize;} |
---|
1168 | |
---|
1169 | |
---|
1170 | Void setPocLsbNotPresentFlag( Int i, Bool flag ) { m_pocLsbNotPresentFlag[i] = flag; } |
---|
1171 | Bool getPocLsbNotPresentFlag( Int i ) { return m_pocLsbNotPresentFlag[i]; } |
---|
1172 | |
---|
1173 | Void setDirectDepTypeLenMinus2( Int val) { m_directDepTypeLenMinus2 = val; } |
---|
1174 | Int getDirectDepTypeLenMinus2( ) { return m_directDepTypeLenMinus2; } |
---|
1175 | |
---|
1176 | Void setDefaultDirectDependencyFlag( Bool flag ) { m_defaultDirectDependencyFlag = flag; } |
---|
1177 | Bool getDefaultDirectDependencyFlag( ) { return m_defaultDirectDependencyFlag; } |
---|
1178 | |
---|
1179 | Void setDefaultDirectDependencyType( Int val ) { m_defaultDirectDependencyType = val; } |
---|
1180 | Int getDefaultDirectDependencyType( ) { return m_defaultDirectDependencyType; } |
---|
1181 | |
---|
1182 | Void setDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps, Int val) { m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ] = val; } |
---|
1183 | Int getDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps) { return m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ]; } |
---|
1184 | |
---|
1185 | Void setVpsVuiPresentFlag( Bool flag ) { m_vpsVuiPresentFlag = flag; } |
---|
1186 | Bool getVpsVuiPresentFlag( ) { return m_vpsVuiPresentFlag; } |
---|
1187 | |
---|
1188 | TComVPSVUI* getVPSVUI( ) { return m_vpsVUI; } |
---|
1189 | |
---|
1190 | // VPS EXTENSION SEMANTICS VARIABLES |
---|
1191 | Void setLayerIdInVps( Int layerIdInNuh, Int val ) { m_layerIdInVps[layerIdInNuh] = val; } |
---|
1192 | Int getLayerIdInVps( Int layerIdInNuh ) { assert( m_layerIdInVps[layerIdInNuh] >= 0 ); return m_layerIdInVps[layerIdInNuh]; } |
---|
1193 | |
---|
1194 | Int getScalabilityId ( Int layerIdInVps, ScalabilityType scalType ); |
---|
1195 | Int getViewId ( Int layerIdInNuh ) { return m_viewIdVal[ getViewIndex( layerIdInNuh )]; } |
---|
1196 | Void setRefLayers(); |
---|
1197 | |
---|
1198 | #if H_MV_FIX_NUM_VIEWS |
---|
1199 | // To be aligned with spec naming, getViewIndex will be removed in future versions |
---|
1200 | Int getViewOrderIdx ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX ); } |
---|
1201 | Int getViewIndex ( Int layerIdInNuh ) { return getViewOrderIdx( layerIdInNuh ); } |
---|
1202 | #else |
---|
1203 | Int getViewIndex ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX ); } |
---|
1204 | #endif |
---|
1205 | Int getAuxId ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), AUX_ID ); } |
---|
1206 | Int getDependencyId ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), DEPENDENCY_ID ); } |
---|
1207 | #if H_MV_FIX_NUM_VIEWS |
---|
1208 | Int getNumViews() { return m_numViews; } |
---|
1209 | Void initNumViews(); |
---|
1210 | #if HHI_VIEW_ID_LIST_I5_J0107 |
---|
1211 | Int getViewOIdxList( Int i ) { return m_viewOIdxList[i]; } |
---|
1212 | #endif |
---|
1213 | #else |
---|
1214 | Int getNumViews(); |
---|
1215 | #endif |
---|
1216 | |
---|
1217 | Bool getDependencyFlag( Int i, Int j ) { return m_dependencyFlag[i][j]; } |
---|
1218 | Int getNumDirectRefLayers( Int layerIdInNuh ) { return m_numDirectRefLayers[ layerIdInNuh ]; }; |
---|
1219 | #if HHI_DEPENDENCY_SIGNALLING_I1_J0107 |
---|
1220 | #if H_3D |
---|
1221 | Int getNumRefListLayers( Int layerIdInNuh ) { return m_numRefListLayers[ layerIdInNuh ]; }; |
---|
1222 | #endif |
---|
1223 | #endif |
---|
1224 | |
---|
1225 | Int getNumRefLayers ( Int i ) { return m_numRefLayers[i]; } |
---|
1226 | Int getNumPredictedLayers ( Int i ) { return m_numPredictedLayers[i]; } |
---|
1227 | |
---|
1228 | |
---|
1229 | Int getIdRefLayer ( Int i, Int j ) { assert( j >= 0 && j < getNumRefLayers ( i )); return m_idRefLayer [i][j]; } |
---|
1230 | Int getIdPredictedLayer ( Int i, Int j ) { assert( j >= 0 && j < getNumPredictedLayers( i )); return m_idPredictedLayer[i][j]; } |
---|
1231 | Int getIdDirectRefLayer ( Int i, Int j ) { assert( j >= 0 && j < getNumDirectRefLayers( i )); return m_idDirectRefLayer[i][j]; } |
---|
1232 | #if HHI_DEPENDENCY_SIGNALLING_I1_J0107 |
---|
1233 | #if H_3D |
---|
1234 | Int getIdRefListLayer ( Int i, Int j ) { assert( j >= 0 && j < getNumRefListLayers ( i )); return m_idRefListLayer[i][j]; } |
---|
1235 | #endif |
---|
1236 | #endif |
---|
1237 | Int getNumIndependentLayers ( ) { return m_numIndependentLayers; } |
---|
1238 | Int getNumLayersInTreePartition( Int i ) { return m_numLayersInTreePartition[i]; } |
---|
1239 | Int getTreePartitionLayerIdList( Int i, Int j ) { return m_treePartitionLayerIdList[i][j]; } |
---|
1240 | Bool getRecursiveRefLayerFlag ( Int i, Int j ) { return m_recursiveRefLayerFlag[i][j]; } |
---|
1241 | Int getNumLayerSets( ) { return getVpsNumLayerSetsMinus1() + 1 + getNumAddLayerSets(); }; |
---|
1242 | |
---|
1243 | Int getFirstAddLayerSetIdx() { return getVpsNumLayerSetsMinus1() + 1; } |
---|
1244 | Int getLastAddLayerSetIdx() { return getFirstAddLayerSetIdx() + getNumAddLayerSets() - 1; } |
---|
1245 | Bool checkVPSExtensionSyntax(); |
---|
1246 | Int scalTypeToScalIdx ( ScalabilityType scalType ); |
---|
1247 | |
---|
1248 | Int getProfileTierLevelIdxLen() { return gCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); }; |
---|
1249 | Int getVpsRepFormatIdxLen() { return gCeilLog2( getVpsNumRepFormatsMinus1() + 1 ); }; |
---|
1250 | |
---|
1251 | Int getNumLayersInIdList ( Int lsIdx ); |
---|
1252 | Int getLayerSetLayerIdList(Int lsIdx, Int j ) { return m_layerSetLayerIdList[ lsIdx ][ j ]; }; |
---|
1253 | |
---|
1254 | Int getNumOutputLayerSets() ; |
---|
1255 | |
---|
1256 | Bool isOutputLayer( Int outLayerSetIdx, Int layerIdInNuh ); |
---|
1257 | Void deriveLayerSetLayerIdList(); |
---|
1258 | |
---|
1259 | Int olsIdxToLsIdx( Int i ) { return ( i < getNumLayerSets() ) ? i : getLayerSetIdxForOlsMinus1( i ) + 1 ; }; |
---|
1260 | Void initTargetLayerIdLists ( ); |
---|
1261 | Void deriveTargetLayerIdList ( Int i ); |
---|
1262 | std::vector<Int> getTargetDecLayerIdList( Int targetDecLayerSetIdx ) { return m_targetDecLayerIdLists[targetDecLayerSetIdx]; }; |
---|
1263 | std::vector<Int> getTargetOptLayerIdList( Int targetOptLayerSetIdx ) { return m_targetOptLayerIdLists[targetOptLayerSetIdx]; }; |
---|
1264 | |
---|
1265 | Int getNumOutputLayersInOutputLayerSet( Int i ) { return (Int) getTargetOptLayerIdList( i ).size(); }; |
---|
1266 | Int getOlsHighestOutputLayerId( Int i ) { return getTargetOptLayerIdList( i ).back(); }; |
---|
1267 | |
---|
1268 | Void deriveAddLayerSetLayerIdList( Int i ); |
---|
1269 | Void deriveNecessaryLayerFlags( Int olsIdx );; |
---|
1270 | Int getNecessaryLayerFlag( Int i, Int j ) { AOF( i >= 0 && i < getNumOutputLayerSets() ); AOF( j >= 0 && j < getNumLayersInIdList( olsIdxToLsIdx( i ) ) ); return m_necessaryLayerFlag[i][j]; }; |
---|
1271 | |
---|
1272 | Int getMaxSubLayersInLayerSetMinus1( Int i ); |
---|
1273 | Int getHighestLayerIdxPlus1Len( Int j ) { return gCeilLog2( getNumLayersInTreePartition( j ) + 1 ); }; |
---|
1274 | Bool getAltOutputLayerFlagVar( Int i );; |
---|
1275 | |
---|
1276 | // inference |
---|
1277 | Int inferDimensionId ( Int i, Int j ); |
---|
1278 | Int inferLastDimsionIdLenMinus1(); |
---|
1279 | |
---|
1280 | // helpers |
---|
1281 | Void printPTL(); |
---|
1282 | Void printLayerDependencies(); |
---|
1283 | Void printScalabilityId();; |
---|
1284 | Void printLayerSets();; |
---|
1285 | |
---|
1286 | |
---|
1287 | |
---|
1288 | template <typename T, typename S, typename U> Void xPrintArray( const Char* name, Int numElemDim1, U idx, S numElemDim2, T vec, Bool printNumber, Bool printIdx = true ) |
---|
1289 | { |
---|
1290 | std::cout << std::endl; |
---|
1291 | for (Int j = 0; j < numElemDim1; j++ ) |
---|
1292 | { |
---|
1293 | std::cout << std::right << std::setw(27) << name; |
---|
1294 | if (printIdx) |
---|
1295 | { |
---|
1296 | std::cout << "[" << std::right << std::setw(3) << idx[ j ] << "]" ; |
---|
1297 | } |
---|
1298 | else |
---|
1299 | { |
---|
1300 | std::cout << std::right << std::setw(5) << " "; |
---|
1301 | } |
---|
1302 | |
---|
1303 | if ( printNumber ) |
---|
1304 | { |
---|
1305 | std::cout << " (" << std::right << std::setw(3) << numElemDim2[j] << ")"; |
---|
1306 | } |
---|
1307 | else |
---|
1308 | { |
---|
1309 | std::cout << std::right << std::setw(6) << " "; |
---|
1310 | } |
---|
1311 | |
---|
1312 | std::cout << ":"; |
---|
1313 | for (Int i = 0; i < numElemDim2[j]; i++) |
---|
1314 | { |
---|
1315 | std::cout << std::right << std::setw(3) << vec[j][i]; |
---|
1316 | } |
---|
1317 | std::cout << std::endl; |
---|
1318 | } |
---|
1319 | } |
---|
1320 | |
---|
1321 | template <typename T> Void xPrintArray( const char* name, Int numElem, T vec, Bool printNumber ) |
---|
1322 | { |
---|
1323 | std::vector<Int> numElemDim2(1, numElem); |
---|
1324 | std::vector<T> vec2 (1, vec ); |
---|
1325 | std::vector<Int> idx2 (0); |
---|
1326 | xPrintArray( name, 1, idx2, numElemDim2, vec2, printNumber, false ); |
---|
1327 | } |
---|
1328 | |
---|
1329 | |
---|
1330 | /// VPS EXTENSION 2 SYNTAX ELEMENTS |
---|
1331 | |
---|
1332 | |
---|
1333 | #if H_3D |
---|
1334 | Int getDepthId ( Int layerIdInNuh) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), DEPTH_ID ); } |
---|
1335 | #if HHI_TOOL_PARAMETERS_I2_J0107 |
---|
1336 | Bool getVpsDepthFlag( Int layerIdInNuh) { return (getDepthId( layerIdInNuh ) > 0); } |
---|
1337 | #endif |
---|
1338 | Int getLayerIdInNuh( Int viewIndex, Bool depthFlag ); |
---|
1339 | |
---|
1340 | #if !HHI_TOOL_PARAMETERS_I2_J0107 |
---|
1341 | #if H_3D_ARP |
---|
1342 | UInt getUseAdvRP ( Int layerIdInVps ) { return m_uiUseAdvResPred[layerIdInVps]; } |
---|
1343 | UInt getARPStepNum( Int layerIdInVps ) { return m_uiARPStepNum[layerIdInVps]; } |
---|
1344 | Void setUseAdvRP ( Int layerIdInVps, UInt val ) { m_uiUseAdvResPred[layerIdInVps] = val; } |
---|
1345 | Void setARPStepNum( Int layerIdInVps, UInt val ) { m_uiARPStepNum[layerIdInVps] = val; } |
---|
1346 | #endif |
---|
1347 | #endif |
---|
1348 | |
---|
1349 | Void createCamPars(Int iNumViews); |
---|
1350 | Void deleteCamPars(); |
---|
1351 | Void initCamParaVPS ( UInt uiViewIndex, Bool bCamParPresent = false, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); |
---|
1352 | UInt getCamParPrecision () { return m_uiCamParPrecision; } |
---|
1353 | Bool getCamParPresent ( Int viewIndex ) { return m_bCamParPresent[viewIndex]; } |
---|
1354 | Void setCamParPresent ( Int viewIndex, Bool val ) { m_bCamParPresent[viewIndex] = val; } |
---|
1355 | Bool hasCamParInSliceHeader( Int viewIndex ) { return m_bCamParInSliceHeader[viewIndex]; } |
---|
1356 | Void setHasCamParInSliceHeader( Int viewIndex, Bool b ) { m_bCamParInSliceHeader[viewIndex] = b; } |
---|
1357 | Int* getCodedScale ( Int viewIndex ) { return m_aaaiCodedScale [viewIndex][0]; } |
---|
1358 | Int* getCodedOffset ( Int viewIndex ) { return m_aaaiCodedOffset[viewIndex][0]; } |
---|
1359 | Int* getInvCodedScale ( Int viewIndex ) { return m_aaaiCodedScale [viewIndex][1]; } |
---|
1360 | Int* getInvCodedOffset ( Int viewIndex ) { return m_aaaiCodedOffset[viewIndex][1]; } |
---|
1361 | |
---|
1362 | #if !HHI_TOOL_PARAMETERS_I2_J0107 |
---|
1363 | #if H_3D_IV_MERGE |
---|
1364 | Void setIvMvPredFlag ( Int layerIdInVps, Bool val ) { m_ivMvPredFlag[ layerIdInVps ] = val; } |
---|
1365 | Bool getIvMvPredFlag ( Int layerIdInVps ) { return m_ivMvPredFlag[ layerIdInVps ]; }; |
---|
1366 | #if H_3D_SPIVMP |
---|
1367 | Int getSubPULog2Size(Int layerIdInVps) { return m_iSubPULog2Size[layerIdInVps]; } |
---|
1368 | Void setSubPULog2Size(Int layerIdInVps, Int u) { m_iSubPULog2Size[layerIdInVps] = u;} |
---|
1369 | Int getSubPUMPILog2Size(Int layerIdInVps) { return m_iSubPUMPILog2Size[layerIdInVps]; } |
---|
1370 | Void setSubPUMPILog2Size(Int layerIdInVps, Int u) { m_iSubPUMPILog2Size[layerIdInVps] = u;} |
---|
1371 | #endif |
---|
1372 | #endif |
---|
1373 | #if H_3D_QTLPC |
---|
1374 | Void setLimQtPredFlag ( Int layerIdInVps, Bool val ) { m_bLimQtPredFlag[ layerIdInVps ] = val; } |
---|
1375 | Bool getLimQtPredFlag ( Int layerIdInVps ) { return m_bLimQtPredFlag[layerIdInVps];} |
---|
1376 | #endif |
---|
1377 | #if H_3D_VSP |
---|
1378 | Void setViewSynthesisPredFlag ( Int layerIdInVps, Bool val ) { m_viewSynthesisPredFlag[ layerIdInVps ] = val; } |
---|
1379 | Bool getViewSynthesisPredFlag ( Int layerIdInVps ) { return m_viewSynthesisPredFlag[ layerIdInVps ]; }; |
---|
1380 | #endif |
---|
1381 | #if H_3D_NBDV_REF |
---|
1382 | Void setDepthRefinementFlag ( Int layerIdInVps, Bool val ) { m_depthRefinementFlag[ layerIdInVps ] = val; } |
---|
1383 | Bool getDepthRefinementFlag ( Int layerIdInVps ) { return m_depthRefinementFlag[ layerIdInVps ]; }; |
---|
1384 | #endif |
---|
1385 | Void setVpsDepthModesFlag( Int layerIdInVps, Bool val ) { m_vpsDepthModesFlag[ layerIdInVps ] = val; } |
---|
1386 | Bool getVpsDepthModesFlag( Int layerIdInVps ) { return m_vpsDepthModesFlag[ layerIdInVps ]; } |
---|
1387 | |
---|
1388 | Void setIVPFlag( Int layerIdInVps, Bool val ) { m_bIVPFlag[ layerIdInVps ] = val; } |
---|
1389 | Bool getIVPFlag( Int layerIdInVps ) { return m_bIVPFlag[ layerIdInVps ]; } |
---|
1390 | |
---|
1391 | Bool getIvMvScalingFlag ( Int layerIdInVps ) { return m_ivMvScalingFlag[ layerIdInVps ]; } |
---|
1392 | Void setIvMvScalingFlag (Int layerIdInVps, Bool b ) { m_ivMvScalingFlag[ layerIdInVps ] = b; } |
---|
1393 | |
---|
1394 | #if H_3D_INTER_SDC |
---|
1395 | Bool getInterSDCFlag ( Int layerIdInVps ) { return m_bInterSDCFlag[layerIdInVps]; } |
---|
1396 | Void setInterSDCFlag ( Int layerIdInVps, Bool bval ){ m_bInterSDCFlag[layerIdInVps] = bval; } |
---|
1397 | #endif |
---|
1398 | #if H_3D_DBBP |
---|
1399 | Bool getUseDBBP ( Int layerIdInVps ) { return m_dbbpFlag[layerIdInVps]; } |
---|
1400 | Void setUseDBBP ( Int layerIdInVps, Bool bval ){ m_dbbpFlag[layerIdInVps] = bval; } |
---|
1401 | #endif |
---|
1402 | #if H_3D_IV_MERGE |
---|
1403 | Bool getMPIFlag ( Int layerIdInVps ) { return m_bMPIFlag[layerIdInVps]; } |
---|
1404 | Void setMPIFlag ( Int layerIdInVps, Bool bval ){ m_bMPIFlag[layerIdInVps] = bval; } |
---|
1405 | #endif |
---|
1406 | #if MTK_SINGLE_DEPTH_VPS_FLAG_J0060 |
---|
1407 | Void setSingleDepthModeFlag ( Int layerIdInVps, Bool val ) { m_singleDepthModeFlag[ layerIdInVps ] = val; } |
---|
1408 | Bool getSingleDepthModeFlag ( Int layerIdInVps ) { return m_singleDepthModeFlag[ layerIdInVps ]; }; |
---|
1409 | #endif |
---|
1410 | #endif |
---|
1411 | #endif |
---|
1412 | #endif |
---|
1413 | }; |
---|
1414 | |
---|
1415 | #if H_3D |
---|
1416 | class TComDLT |
---|
1417 | { |
---|
1418 | private: |
---|
1419 | Bool m_bDltPresentFlag; |
---|
1420 | Bool m_bUseDLTFlag [ MAX_NUM_LAYERS ]; |
---|
1421 | Bool m_bInterViewDltPredEnableFlag[ MAX_NUM_LAYERS ]; |
---|
1422 | |
---|
1423 | Int m_iNumDepthmapValues [ MAX_NUM_LAYERS ]; |
---|
1424 | Int* m_iDepthValue2Idx [ MAX_NUM_LAYERS ]; |
---|
1425 | Int* m_iIdx2DepthValue [ MAX_NUM_LAYERS ]; |
---|
1426 | |
---|
1427 | Int m_iNumDepthViews; |
---|
1428 | UInt m_uiDepthViewBitDepth; |
---|
1429 | |
---|
1430 | public: |
---|
1431 | TComDLT(); |
---|
1432 | ~TComDLT(); |
---|
1433 | |
---|
1434 | Bool getDltPresentFlag () { return m_bDltPresentFlag; } |
---|
1435 | Void setDltPresentFlag ( Bool b ) { m_bDltPresentFlag = b; } |
---|
1436 | |
---|
1437 | Bool getUseDLTFlag ( Int layerIdInVps ) { return m_bUseDLTFlag[ layerIdInVps ]; } |
---|
1438 | Void setUseDLTFlag ( Int layerIdInVps, Bool b ) { m_bUseDLTFlag[ layerIdInVps ] = b; } |
---|
1439 | |
---|
1440 | Bool getInterViewDltPredEnableFlag( Int layerIdInVps ) { return m_bInterViewDltPredEnableFlag[ layerIdInVps ]; } |
---|
1441 | Void setInterViewDltPredEnableFlag( Int layerIdInVps, Bool b ) { m_bInterViewDltPredEnableFlag[ layerIdInVps ] = b; } |
---|
1442 | |
---|
1443 | Void setNumDepthViews ( Int n ) { m_iNumDepthViews = n; } |
---|
1444 | Int getNumDepthViews () { return m_iNumDepthViews; } |
---|
1445 | |
---|
1446 | Void setDepthViewBitDepth( UInt n ) { m_uiDepthViewBitDepth = n; } |
---|
1447 | UInt getDepthViewBitDepth() { return m_uiDepthViewBitDepth; } |
---|
1448 | |
---|
1449 | Int getNumDepthValues( Int layerIdInVps ) { return getUseDLTFlag(layerIdInVps)?m_iNumDepthmapValues[layerIdInVps]:((1 << g_bitDepthY)-1); } |
---|
1450 | Int depthValue2idx( Int layerIdInVps, Pel value ) { return getUseDLTFlag(layerIdInVps)?m_iDepthValue2Idx[layerIdInVps][value]:value; } |
---|
1451 | Pel idx2DepthValue( Int layerIdInVps, UInt uiIdx ) { return getUseDLTFlag(layerIdInVps)?m_iIdx2DepthValue[layerIdInVps][ClipY(uiIdx)]:uiIdx; } |
---|
1452 | Void setDepthLUTs( Int layerIdInVps, Int* idx2DepthValue = NULL, Int iNumDepthValues = 0 ); |
---|
1453 | Int* idx2DepthValue( Int layerIdInVps ) { return m_iIdx2DepthValue[layerIdInVps]; } |
---|
1454 | Void getDeltaDLT( Int layerIdInVps, Int* piDLTInRef, UInt uiDLTInRefNum, Int* piDeltaDLTOut, UInt *puiDeltaDLTOutNum ); |
---|
1455 | Void setDeltaDLT( Int layerIdInVps, Int* piDLTInRef, UInt uiDLTInRefNum, Int* piDeltaDLTIn, UInt uiDeltaDLTInNum ); |
---|
1456 | }; |
---|
1457 | #endif |
---|
1458 | |
---|
1459 | class Window |
---|
1460 | { |
---|
1461 | private: |
---|
1462 | Bool m_enabledFlag; |
---|
1463 | Int m_winLeftOffset; |
---|
1464 | Int m_winRightOffset; |
---|
1465 | Int m_winTopOffset; |
---|
1466 | Int m_winBottomOffset; |
---|
1467 | #if H_MV |
---|
1468 | Bool m_scaledFlag; |
---|
1469 | #endif |
---|
1470 | public: |
---|
1471 | Window() |
---|
1472 | : m_enabledFlag (false) |
---|
1473 | , m_winLeftOffset (0) |
---|
1474 | , m_winRightOffset (0) |
---|
1475 | , m_winTopOffset (0) |
---|
1476 | , m_winBottomOffset (0) |
---|
1477 | #if H_MV |
---|
1478 | , m_scaledFlag(true) |
---|
1479 | #endif |
---|
1480 | { } |
---|
1481 | |
---|
1482 | Bool getWindowEnabledFlag() const { return m_enabledFlag; } |
---|
1483 | Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0; } |
---|
1484 | Int getWindowLeftOffset() const { return m_enabledFlag ? m_winLeftOffset : 0; } |
---|
1485 | Void setWindowLeftOffset(Int val) { m_winLeftOffset = val; m_enabledFlag = true; } |
---|
1486 | Int getWindowRightOffset() const { return m_enabledFlag ? m_winRightOffset : 0; } |
---|
1487 | Void setWindowRightOffset(Int val) { m_winRightOffset = val; m_enabledFlag = true; } |
---|
1488 | Int getWindowTopOffset() const { return m_enabledFlag ? m_winTopOffset : 0; } |
---|
1489 | Void setWindowTopOffset(Int val) { m_winTopOffset = val; m_enabledFlag = true; } |
---|
1490 | Int getWindowBottomOffset() const { return m_enabledFlag ? m_winBottomOffset: 0; } |
---|
1491 | Void setWindowBottomOffset(Int val) { m_winBottomOffset = val; m_enabledFlag = true; } |
---|
1492 | |
---|
1493 | #if H_MV |
---|
1494 | Void setScaledFlag(Bool flag) { m_scaledFlag = flag; } |
---|
1495 | Bool getScaledFlag() const { return m_scaledFlag; } |
---|
1496 | Void scaleOffsets( Int scal ); |
---|
1497 | #endif |
---|
1498 | Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom) |
---|
1499 | { |
---|
1500 | m_enabledFlag = true; |
---|
1501 | m_winLeftOffset = offsetLeft; |
---|
1502 | m_winRightOffset = offsetLRight; |
---|
1503 | m_winTopOffset = offsetLTop; |
---|
1504 | m_winBottomOffset = offsetLBottom; |
---|
1505 | } |
---|
1506 | }; |
---|
1507 | |
---|
1508 | |
---|
1509 | class TComVUI |
---|
1510 | { |
---|
1511 | private: |
---|
1512 | Bool m_aspectRatioInfoPresentFlag; |
---|
1513 | Int m_aspectRatioIdc; |
---|
1514 | Int m_sarWidth; |
---|
1515 | Int m_sarHeight; |
---|
1516 | Bool m_overscanInfoPresentFlag; |
---|
1517 | Bool m_overscanAppropriateFlag; |
---|
1518 | Bool m_videoSignalTypePresentFlag; |
---|
1519 | Int m_videoFormat; |
---|
1520 | Bool m_videoFullRangeFlag; |
---|
1521 | Bool m_colourDescriptionPresentFlag; |
---|
1522 | Int m_colourPrimaries; |
---|
1523 | Int m_transferCharacteristics; |
---|
1524 | Int m_matrixCoefficients; |
---|
1525 | Bool m_chromaLocInfoPresentFlag; |
---|
1526 | Int m_chromaSampleLocTypeTopField; |
---|
1527 | Int m_chromaSampleLocTypeBottomField; |
---|
1528 | Bool m_neutralChromaIndicationFlag; |
---|
1529 | Bool m_fieldSeqFlag; |
---|
1530 | |
---|
1531 | Window m_defaultDisplayWindow; |
---|
1532 | Bool m_frameFieldInfoPresentFlag; |
---|
1533 | Bool m_hrdParametersPresentFlag; |
---|
1534 | Bool m_bitstreamRestrictionFlag; |
---|
1535 | Bool m_tilesFixedStructureFlag; |
---|
1536 | Bool m_motionVectorsOverPicBoundariesFlag; |
---|
1537 | Bool m_restrictedRefPicListsFlag; |
---|
1538 | Int m_minSpatialSegmentationIdc; |
---|
1539 | Int m_maxBytesPerPicDenom; |
---|
1540 | Int m_maxBitsPerMinCuDenom; |
---|
1541 | Int m_log2MaxMvLengthHorizontal; |
---|
1542 | Int m_log2MaxMvLengthVertical; |
---|
1543 | TComHRD m_hrdParameters; |
---|
1544 | TimingInfo m_timingInfo; |
---|
1545 | |
---|
1546 | public: |
---|
1547 | TComVUI() |
---|
1548 | :m_aspectRatioInfoPresentFlag(false) |
---|
1549 | ,m_aspectRatioIdc(0) |
---|
1550 | ,m_sarWidth(0) |
---|
1551 | ,m_sarHeight(0) |
---|
1552 | ,m_overscanInfoPresentFlag(false) |
---|
1553 | ,m_overscanAppropriateFlag(false) |
---|
1554 | ,m_videoSignalTypePresentFlag(false) |
---|
1555 | ,m_videoFormat(5) |
---|
1556 | ,m_videoFullRangeFlag(false) |
---|
1557 | ,m_colourDescriptionPresentFlag(false) |
---|
1558 | ,m_colourPrimaries(2) |
---|
1559 | ,m_transferCharacteristics(2) |
---|
1560 | ,m_matrixCoefficients(2) |
---|
1561 | ,m_chromaLocInfoPresentFlag(false) |
---|
1562 | ,m_chromaSampleLocTypeTopField(0) |
---|
1563 | ,m_chromaSampleLocTypeBottomField(0) |
---|
1564 | ,m_neutralChromaIndicationFlag(false) |
---|
1565 | ,m_fieldSeqFlag(false) |
---|
1566 | ,m_frameFieldInfoPresentFlag(false) |
---|
1567 | ,m_hrdParametersPresentFlag(false) |
---|
1568 | ,m_bitstreamRestrictionFlag(false) |
---|
1569 | ,m_tilesFixedStructureFlag(false) |
---|
1570 | ,m_motionVectorsOverPicBoundariesFlag(true) |
---|
1571 | ,m_restrictedRefPicListsFlag(1) |
---|
1572 | ,m_minSpatialSegmentationIdc(0) |
---|
1573 | ,m_maxBytesPerPicDenom(2) |
---|
1574 | ,m_maxBitsPerMinCuDenom(1) |
---|
1575 | ,m_log2MaxMvLengthHorizontal(15) |
---|
1576 | ,m_log2MaxMvLengthVertical(15) |
---|
1577 | {} |
---|
1578 | |
---|
1579 | virtual ~TComVUI() {} |
---|
1580 | |
---|
1581 | Bool getAspectRatioInfoPresentFlag() { return m_aspectRatioInfoPresentFlag; } |
---|
1582 | Void setAspectRatioInfoPresentFlag(Bool i) { m_aspectRatioInfoPresentFlag = i; } |
---|
1583 | |
---|
1584 | Int getAspectRatioIdc() { return m_aspectRatioIdc; } |
---|
1585 | Void setAspectRatioIdc(Int i) { m_aspectRatioIdc = i; } |
---|
1586 | |
---|
1587 | Int getSarWidth() { return m_sarWidth; } |
---|
1588 | Void setSarWidth(Int i) { m_sarWidth = i; } |
---|
1589 | |
---|
1590 | Int getSarHeight() { return m_sarHeight; } |
---|
1591 | Void setSarHeight(Int i) { m_sarHeight = i; } |
---|
1592 | |
---|
1593 | Bool getOverscanInfoPresentFlag() { return m_overscanInfoPresentFlag; } |
---|
1594 | Void setOverscanInfoPresentFlag(Bool i) { m_overscanInfoPresentFlag = i; } |
---|
1595 | |
---|
1596 | Bool getOverscanAppropriateFlag() { return m_overscanAppropriateFlag; } |
---|
1597 | Void setOverscanAppropriateFlag(Bool i) { m_overscanAppropriateFlag = i; } |
---|
1598 | |
---|
1599 | Bool getVideoSignalTypePresentFlag() { return m_videoSignalTypePresentFlag; } |
---|
1600 | Void setVideoSignalTypePresentFlag(Bool i) { m_videoSignalTypePresentFlag = i; } |
---|
1601 | |
---|
1602 | Int getVideoFormat() { return m_videoFormat; } |
---|
1603 | Void setVideoFormat(Int i) { m_videoFormat = i; } |
---|
1604 | |
---|
1605 | Bool getVideoFullRangeFlag() { return m_videoFullRangeFlag; } |
---|
1606 | Void setVideoFullRangeFlag(Bool i) { m_videoFullRangeFlag = i; } |
---|
1607 | |
---|
1608 | Bool getColourDescriptionPresentFlag() { return m_colourDescriptionPresentFlag; } |
---|
1609 | Void setColourDescriptionPresentFlag(Bool i) { m_colourDescriptionPresentFlag = i; } |
---|
1610 | |
---|
1611 | Int getColourPrimaries() { return m_colourPrimaries; } |
---|
1612 | Void setColourPrimaries(Int i) { m_colourPrimaries = i; } |
---|
1613 | |
---|
1614 | Int getTransferCharacteristics() { return m_transferCharacteristics; } |
---|
1615 | Void setTransferCharacteristics(Int i) { m_transferCharacteristics = i; } |
---|
1616 | |
---|
1617 | Int getMatrixCoefficients() { return m_matrixCoefficients; } |
---|
1618 | Void setMatrixCoefficients(Int i) { m_matrixCoefficients = i; } |
---|
1619 | |
---|
1620 | Bool getChromaLocInfoPresentFlag() { return m_chromaLocInfoPresentFlag; } |
---|
1621 | Void setChromaLocInfoPresentFlag(Bool i) { m_chromaLocInfoPresentFlag = i; } |
---|
1622 | |
---|
1623 | Int getChromaSampleLocTypeTopField() { return m_chromaSampleLocTypeTopField; } |
---|
1624 | Void setChromaSampleLocTypeTopField(Int i) { m_chromaSampleLocTypeTopField = i; } |
---|
1625 | |
---|
1626 | Int getChromaSampleLocTypeBottomField() { return m_chromaSampleLocTypeBottomField; } |
---|
1627 | Void setChromaSampleLocTypeBottomField(Int i) { m_chromaSampleLocTypeBottomField = i; } |
---|
1628 | |
---|
1629 | Bool getNeutralChromaIndicationFlag() { return m_neutralChromaIndicationFlag; } |
---|
1630 | Void setNeutralChromaIndicationFlag(Bool i) { m_neutralChromaIndicationFlag = i; } |
---|
1631 | |
---|
1632 | Bool getFieldSeqFlag() { return m_fieldSeqFlag; } |
---|
1633 | Void setFieldSeqFlag(Bool i) { m_fieldSeqFlag = i; } |
---|
1634 | |
---|
1635 | Bool getFrameFieldInfoPresentFlag() { return m_frameFieldInfoPresentFlag; } |
---|
1636 | Void setFrameFieldInfoPresentFlag(Bool i) { m_frameFieldInfoPresentFlag = i; } |
---|
1637 | |
---|
1638 | Window& getDefaultDisplayWindow() { return m_defaultDisplayWindow; } |
---|
1639 | Void setDefaultDisplayWindow(Window& defaultDisplayWindow ) { m_defaultDisplayWindow = defaultDisplayWindow; } |
---|
1640 | |
---|
1641 | Bool getHrdParametersPresentFlag() { return m_hrdParametersPresentFlag; } |
---|
1642 | Void setHrdParametersPresentFlag(Bool i) { m_hrdParametersPresentFlag = i; } |
---|
1643 | |
---|
1644 | Bool getBitstreamRestrictionFlag() { return m_bitstreamRestrictionFlag; } |
---|
1645 | Void setBitstreamRestrictionFlag(Bool i) { m_bitstreamRestrictionFlag = i; } |
---|
1646 | |
---|
1647 | Bool getTilesFixedStructureFlag() { return m_tilesFixedStructureFlag; } |
---|
1648 | Void setTilesFixedStructureFlag(Bool i) { m_tilesFixedStructureFlag = i; } |
---|
1649 | |
---|
1650 | Bool getMotionVectorsOverPicBoundariesFlag() { return m_motionVectorsOverPicBoundariesFlag; } |
---|
1651 | Void setMotionVectorsOverPicBoundariesFlag(Bool i) { m_motionVectorsOverPicBoundariesFlag = i; } |
---|
1652 | |
---|
1653 | Bool getRestrictedRefPicListsFlag() { return m_restrictedRefPicListsFlag; } |
---|
1654 | Void setRestrictedRefPicListsFlag(Bool b) { m_restrictedRefPicListsFlag = b; } |
---|
1655 | |
---|
1656 | Int getMinSpatialSegmentationIdc() { return m_minSpatialSegmentationIdc; } |
---|
1657 | Void setMinSpatialSegmentationIdc(Int i) { m_minSpatialSegmentationIdc = i; } |
---|
1658 | Int getMaxBytesPerPicDenom() { return m_maxBytesPerPicDenom; } |
---|
1659 | Void setMaxBytesPerPicDenom(Int i) { m_maxBytesPerPicDenom = i; } |
---|
1660 | |
---|
1661 | Int getMaxBitsPerMinCuDenom() { return m_maxBitsPerMinCuDenom; } |
---|
1662 | Void setMaxBitsPerMinCuDenom(Int i) { m_maxBitsPerMinCuDenom = i; } |
---|
1663 | |
---|
1664 | Int getLog2MaxMvLengthHorizontal() { return m_log2MaxMvLengthHorizontal; } |
---|
1665 | Void setLog2MaxMvLengthHorizontal(Int i) { m_log2MaxMvLengthHorizontal = i; } |
---|
1666 | |
---|
1667 | Int getLog2MaxMvLengthVertical() { return m_log2MaxMvLengthVertical; } |
---|
1668 | Void setLog2MaxMvLengthVertical(Int i) { m_log2MaxMvLengthVertical = i; } |
---|
1669 | |
---|
1670 | TComHRD* getHrdParameters () { return &m_hrdParameters; } |
---|
1671 | TimingInfo* getTimingInfo() { return &m_timingInfo; } |
---|
1672 | #if H_MV |
---|
1673 | Void inferVideoSignalInfo( TComVPS* vps, Int layerIdCurr ); |
---|
1674 | #endif |
---|
1675 | }; |
---|
1676 | |
---|
1677 | #if HHI_TOOL_PARAMETERS_I2_J0107 |
---|
1678 | #if H_3D |
---|
1679 | class TComSps3dExtension |
---|
1680 | { |
---|
1681 | public: |
---|
1682 | TComSps3dExtension() |
---|
1683 | { |
---|
1684 | for (Int d = 0; d < 2; d++) |
---|
1685 | { |
---|
1686 | m_ivMvPredFlag [d] = false; |
---|
1687 | m_ivMvScalingFlag [d] = false; |
---|
1688 | m_log2SubPbSizeMinus3 [d] = 3; |
---|
1689 | m_ivResPredFlag [d] = false; |
---|
1690 | m_depthRefinementFlag [d] = false; |
---|
1691 | m_viewSynthesisPredFlag [d] = false; |
---|
1692 | m_depthBasedBlkPartFlag [d] = false; |
---|
1693 | m_mpiFlag [d] = false; |
---|
1694 | m_log2MpiSubPbSizeMinus3[d] = 3; |
---|
1695 | m_intraContourFlag [d] = false; |
---|
1696 | m_intraSdcWedgeFlag [d] = false; |
---|
1697 | m_qtPredFlag [d] = false; |
---|
1698 | m_interSdcFlag [d] = false; |
---|
1699 | m_intraSingleFlag [d] = false; |
---|
1700 | } |
---|
1701 | } |
---|
1702 | |
---|
1703 | Void setIvMvPredFlag( Int d, Bool flag ) { m_ivMvPredFlag[d] = flag; } |
---|
1704 | Bool getIvMvPredFlag( Int d ) { return m_ivMvPredFlag[d]; } |
---|
1705 | |
---|
1706 | Void setIvMvScalingFlag( Int d, Bool flag ) { m_ivMvScalingFlag[d] = flag; } |
---|
1707 | Bool getIvMvScalingFlag( Int d ) { return m_ivMvScalingFlag[d]; } |
---|
1708 | |
---|
1709 | Void setLog2SubPbSizeMinus3( Int d, Int val ) { m_log2SubPbSizeMinus3[d] = val; } |
---|
1710 | Int getLog2SubPbSizeMinus3( Int d ) { return m_log2SubPbSizeMinus3[d]; } |
---|
1711 | |
---|
1712 | Void setIvResPredFlag( Int d, Bool flag ) { m_ivResPredFlag[d] = flag; } |
---|
1713 | Bool getIvResPredFlag( Int d ) { return m_ivResPredFlag[d]; } |
---|
1714 | |
---|
1715 | Void setDepthRefinementFlag( Int d, Bool flag ) { m_depthRefinementFlag[d] = flag; } |
---|
1716 | Bool getDepthRefinementFlag( Int d ) { return m_depthRefinementFlag[d]; } |
---|
1717 | |
---|
1718 | Void setViewSynthesisPredFlag( Int d, Bool flag ) { m_viewSynthesisPredFlag[d] = flag; } |
---|
1719 | Bool getViewSynthesisPredFlag( Int d ) { return m_viewSynthesisPredFlag[d]; } |
---|
1720 | |
---|
1721 | Void setDepthBasedBlkPartFlag( Int d, Bool flag ) { m_depthBasedBlkPartFlag[d] = flag; } |
---|
1722 | Bool getDepthBasedBlkPartFlag( Int d ) { return m_depthBasedBlkPartFlag[d]; } |
---|
1723 | |
---|
1724 | Void setMpiFlag( Int d, Bool flag ) { m_mpiFlag[d] = flag; } |
---|
1725 | Bool getMpiFlag( Int d ) { return m_mpiFlag[d]; } |
---|
1726 | |
---|
1727 | Void setLog2MpiSubPbSizeMinus3( Int d, Int val ) { m_log2MpiSubPbSizeMinus3[d] = val; } |
---|
1728 | Int getLog2MpiSubPbSizeMinus3( Int d ) { return m_log2MpiSubPbSizeMinus3[d]; } |
---|
1729 | |
---|
1730 | Void setIntraContourFlag( Int d, Bool flag ) { m_intraContourFlag[d] = flag; } |
---|
1731 | Bool getIntraContourFlag( Int d ) { return m_intraContourFlag[d]; } |
---|
1732 | |
---|
1733 | Void setIntraSdcWedgeFlag( Int d, Bool flag ) { m_intraSdcWedgeFlag[d] = flag; } |
---|
1734 | Bool getIntraSdcWedgeFlag( Int d ) { return m_intraSdcWedgeFlag[d]; } |
---|
1735 | |
---|
1736 | Void setQtPredFlag( Int d, Bool flag ) { m_qtPredFlag[d] = flag; } |
---|
1737 | Bool getQtPredFlag( Int d ) { return m_qtPredFlag[d]; } |
---|
1738 | |
---|
1739 | Void setInterSdcFlag( Int d, Bool flag ) { m_interSdcFlag[d] = flag; } |
---|
1740 | Bool getInterSdcFlag( Int d ) { return m_interSdcFlag[d]; } |
---|
1741 | |
---|
1742 | Void setIntraSingleFlag( Int d, Bool flag ) { m_intraSingleFlag[d] = flag; } |
---|
1743 | Bool getIntraSingleFlag( Int d ) { return m_intraSingleFlag[d]; } |
---|
1744 | |
---|
1745 | private: |
---|
1746 | |
---|
1747 | Bool m_ivMvPredFlag [2]; |
---|
1748 | Bool m_ivMvScalingFlag [2]; |
---|
1749 | Int m_log2SubPbSizeMinus3 [2]; |
---|
1750 | Bool m_ivResPredFlag [2]; |
---|
1751 | Bool m_depthRefinementFlag [2]; |
---|
1752 | Bool m_viewSynthesisPredFlag [2]; |
---|
1753 | Bool m_depthBasedBlkPartFlag [2]; |
---|
1754 | Bool m_mpiFlag [2]; |
---|
1755 | Int m_log2MpiSubPbSizeMinus3[2]; |
---|
1756 | Bool m_intraContourFlag [2]; |
---|
1757 | Bool m_intraSdcWedgeFlag [2]; |
---|
1758 | Bool m_qtPredFlag [2]; |
---|
1759 | Bool m_interSdcFlag [2]; |
---|
1760 | Bool m_intraSingleFlag [2]; |
---|
1761 | }; |
---|
1762 | |
---|
1763 | #endif |
---|
1764 | #endif |
---|
1765 | |
---|
1766 | /// SPS class |
---|
1767 | class TComSPS |
---|
1768 | { |
---|
1769 | private: |
---|
1770 | Int m_SPSId; |
---|
1771 | Int m_VPSId; |
---|
1772 | Int m_chromaFormatIdc; |
---|
1773 | |
---|
1774 | UInt m_uiMaxTLayers; // maximum number of temporal layers |
---|
1775 | |
---|
1776 | // Structure |
---|
1777 | UInt m_picWidthInLumaSamples; |
---|
1778 | UInt m_picHeightInLumaSamples; |
---|
1779 | |
---|
1780 | Int m_log2MinCodingBlockSize; |
---|
1781 | Int m_log2DiffMaxMinCodingBlockSize; |
---|
1782 | UInt m_uiMaxCUWidth; |
---|
1783 | UInt m_uiMaxCUHeight; |
---|
1784 | UInt m_uiMaxCUDepth; |
---|
1785 | |
---|
1786 | Window m_conformanceWindow; |
---|
1787 | |
---|
1788 | TComRPSList m_RPSList; |
---|
1789 | Bool m_bLongTermRefsPresent; |
---|
1790 | Bool m_TMVPFlagsPresent; |
---|
1791 | Int m_numReorderPics[MAX_TLAYER]; |
---|
1792 | |
---|
1793 | // Tool list |
---|
1794 | UInt m_uiQuadtreeTULog2MaxSize; |
---|
1795 | UInt m_uiQuadtreeTULog2MinSize; |
---|
1796 | UInt m_uiQuadtreeTUMaxDepthInter; |
---|
1797 | UInt m_uiQuadtreeTUMaxDepthIntra; |
---|
1798 | Bool m_usePCM; |
---|
1799 | UInt m_pcmLog2MaxSize; |
---|
1800 | UInt m_uiPCMLog2MinSize; |
---|
1801 | Bool m_useAMP; |
---|
1802 | |
---|
1803 | // Parameter |
---|
1804 | Int m_bitDepthY; |
---|
1805 | Int m_bitDepthC; |
---|
1806 | Int m_qpBDOffsetY; |
---|
1807 | Int m_qpBDOffsetC; |
---|
1808 | |
---|
1809 | UInt m_uiPCMBitDepthLuma; |
---|
1810 | UInt m_uiPCMBitDepthChroma; |
---|
1811 | Bool m_bPCMFilterDisableFlag; |
---|
1812 | |
---|
1813 | UInt m_uiBitsForPOC; |
---|
1814 | |
---|
1815 | UInt m_numLongTermRefPicSPS; |
---|
1816 | UInt m_ltRefPicPocLsbSps[33]; |
---|
1817 | Bool m_usedByCurrPicLtSPSFlag[33]; |
---|
1818 | // Max physical transform size |
---|
1819 | UInt m_uiMaxTrSize; |
---|
1820 | |
---|
1821 | Int m_iAMPAcc[MAX_CU_DEPTH]; |
---|
1822 | Bool m_bUseSAO; |
---|
1823 | |
---|
1824 | Bool m_bTemporalIdNestingFlag; // temporal_id_nesting_flag |
---|
1825 | |
---|
1826 | Bool m_scalingListEnabledFlag; |
---|
1827 | Bool m_scalingListPresentFlag; |
---|
1828 | TComScalingList* m_scalingList; //!< ScalingList class pointer |
---|
1829 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
1830 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) |
---|
1831 | |
---|
1832 | Bool m_useDF; |
---|
1833 | Bool m_useStrongIntraSmoothing; |
---|
1834 | |
---|
1835 | Bool m_vuiParametersPresentFlag; |
---|
1836 | TComVUI m_vuiParameters; |
---|
1837 | |
---|
1838 | static const Int m_winUnitX[MAX_CHROMA_FORMAT_IDC+1]; |
---|
1839 | static const Int m_winUnitY[MAX_CHROMA_FORMAT_IDC+1]; |
---|
1840 | TComPTL m_pcPTL; |
---|
1841 | #if H_MV |
---|
1842 | TComVPS* m_pcVPS; |
---|
1843 | // SPS |
---|
1844 | Int m_spsMaxSubLayersMinus1; |
---|
1845 | Int m_spsExtOrMaxSubLayersMinus1; |
---|
1846 | Bool m_spsExtensionPresentFlag; |
---|
1847 | |
---|
1848 | Bool m_spsRangeExtensionsFlag; |
---|
1849 | Bool m_spsMultilayerExtensionFlag; |
---|
1850 | #if H_3D |
---|
1851 | Bool m_sps3dExtensionFlag; |
---|
1852 | Int m_spsExtension5bits; |
---|
1853 | #else |
---|
1854 | Int m_spsExtension6bits; |
---|
1855 | #endif |
---|
1856 | |
---|
1857 | Bool m_spsInferScalingListFlag; |
---|
1858 | Int m_spsScalingListRefLayerId; |
---|
1859 | Bool m_updateRepFormatFlag; |
---|
1860 | Int m_spsRepFormatIdx; |
---|
1861 | // SPS Extension |
---|
1862 | Bool m_interViewMvVertConstraintFlag; |
---|
1863 | #endif |
---|
1864 | #if H_3D |
---|
1865 | #if HHI_TOOL_PARAMETERS_I2_J0107 |
---|
1866 | TComSps3dExtension m_sps3dExtension; |
---|
1867 | #endif |
---|
1868 | UInt m_uiCamParPrecision; |
---|
1869 | Bool m_bCamParInSliceHeader; |
---|
1870 | Int m_aaiCodedScale [2][MAX_NUM_LAYERS]; |
---|
1871 | Int m_aaiCodedOffset[2][MAX_NUM_LAYERS]; |
---|
1872 | #endif |
---|
1873 | #if H_MV |
---|
1874 | Int m_layerId; |
---|
1875 | #endif |
---|
1876 | public: |
---|
1877 | TComSPS(); |
---|
1878 | virtual ~TComSPS(); |
---|
1879 | |
---|
1880 | Int getVPSId () { return m_VPSId; } |
---|
1881 | Void setVPSId (Int i) { m_VPSId = i; } |
---|
1882 | Int getSPSId () { return m_SPSId; } |
---|
1883 | Void setSPSId (Int i) { m_SPSId = i; } |
---|
1884 | Int getChromaFormatIdc () { return m_chromaFormatIdc; } |
---|
1885 | Void setChromaFormatIdc (Int i) { m_chromaFormatIdc = i; } |
---|
1886 | |
---|
1887 | static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitX[chromaFormatIdc]; } |
---|
1888 | static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc]; } |
---|
1889 | |
---|
1890 | // structure |
---|
1891 | Void setPicWidthInLumaSamples ( UInt u ) { m_picWidthInLumaSamples = u; } |
---|
1892 | UInt getPicWidthInLumaSamples () { return m_picWidthInLumaSamples; } |
---|
1893 | Void setPicHeightInLumaSamples ( UInt u ) { m_picHeightInLumaSamples = u; } |
---|
1894 | UInt getPicHeightInLumaSamples () { return m_picHeightInLumaSamples; } |
---|
1895 | |
---|
1896 | Window& getConformanceWindow() { return m_conformanceWindow; } |
---|
1897 | Void setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; } |
---|
1898 | |
---|
1899 | UInt getNumLongTermRefPicSPS() { return m_numLongTermRefPicSPS; } |
---|
1900 | Void setNumLongTermRefPicSPS(UInt val) { m_numLongTermRefPicSPS = val; } |
---|
1901 | |
---|
1902 | UInt getLtRefPicPocLsbSps(UInt index) { return m_ltRefPicPocLsbSps[index]; } |
---|
1903 | Void setLtRefPicPocLsbSps(UInt index, UInt val) { m_ltRefPicPocLsbSps[index] = val; } |
---|
1904 | |
---|
1905 | Bool getUsedByCurrPicLtSPSFlag(Int i) {return m_usedByCurrPicLtSPSFlag[i];} |
---|
1906 | Void setUsedByCurrPicLtSPSFlag(Int i, Bool x) { m_usedByCurrPicLtSPSFlag[i] = x;} |
---|
1907 | |
---|
1908 | Int getLog2MinCodingBlockSize() const { return m_log2MinCodingBlockSize; } |
---|
1909 | Void setLog2MinCodingBlockSize(Int val) { m_log2MinCodingBlockSize = val; } |
---|
1910 | Int getLog2DiffMaxMinCodingBlockSize() const { return m_log2DiffMaxMinCodingBlockSize; } |
---|
1911 | Void setLog2DiffMaxMinCodingBlockSize(Int val) { m_log2DiffMaxMinCodingBlockSize = val; } |
---|
1912 | |
---|
1913 | Void setMaxCUWidth ( UInt u ) { m_uiMaxCUWidth = u; } |
---|
1914 | UInt getMaxCUWidth () { return m_uiMaxCUWidth; } |
---|
1915 | Void setMaxCUHeight ( UInt u ) { m_uiMaxCUHeight = u; } |
---|
1916 | UInt getMaxCUHeight () { return m_uiMaxCUHeight; } |
---|
1917 | Void setMaxCUDepth ( UInt u ) { m_uiMaxCUDepth = u; } |
---|
1918 | UInt getMaxCUDepth () { return m_uiMaxCUDepth; } |
---|
1919 | Void setUsePCM ( Bool b ) { m_usePCM = b; } |
---|
1920 | Bool getUsePCM () { return m_usePCM; } |
---|
1921 | Void setPCMLog2MaxSize ( UInt u ) { m_pcmLog2MaxSize = u; } |
---|
1922 | UInt getPCMLog2MaxSize () { return m_pcmLog2MaxSize; } |
---|
1923 | Void setPCMLog2MinSize ( UInt u ) { m_uiPCMLog2MinSize = u; } |
---|
1924 | UInt getPCMLog2MinSize () { return m_uiPCMLog2MinSize; } |
---|
1925 | Void setBitsForPOC ( UInt u ) { m_uiBitsForPOC = u; } |
---|
1926 | UInt getBitsForPOC () { return m_uiBitsForPOC; } |
---|
1927 | Bool getUseAMP() { return m_useAMP; } |
---|
1928 | Void setUseAMP( Bool b ) { m_useAMP = b; } |
---|
1929 | Void setQuadtreeTULog2MaxSize( UInt u ) { m_uiQuadtreeTULog2MaxSize = u; } |
---|
1930 | UInt getQuadtreeTULog2MaxSize() { return m_uiQuadtreeTULog2MaxSize; } |
---|
1931 | Void setQuadtreeTULog2MinSize( UInt u ) { m_uiQuadtreeTULog2MinSize = u; } |
---|
1932 | UInt getQuadtreeTULog2MinSize() { return m_uiQuadtreeTULog2MinSize; } |
---|
1933 | Void setQuadtreeTUMaxDepthInter( UInt u ) { m_uiQuadtreeTUMaxDepthInter = u; } |
---|
1934 | Void setQuadtreeTUMaxDepthIntra( UInt u ) { m_uiQuadtreeTUMaxDepthIntra = u; } |
---|
1935 | UInt getQuadtreeTUMaxDepthInter() { return m_uiQuadtreeTUMaxDepthInter; } |
---|
1936 | UInt getQuadtreeTUMaxDepthIntra() { return m_uiQuadtreeTUMaxDepthIntra; } |
---|
1937 | Void setNumReorderPics(Int i, UInt tlayer) { m_numReorderPics[tlayer] = i; } |
---|
1938 | Int getNumReorderPics(UInt tlayer) { return m_numReorderPics[tlayer]; } |
---|
1939 | Void createRPSList( Int numRPS ); |
---|
1940 | TComRPSList* getRPSList() { return &m_RPSList; } |
---|
1941 | Bool getLongTermRefsPresent() { return m_bLongTermRefsPresent; } |
---|
1942 | Void setLongTermRefsPresent(Bool b) { m_bLongTermRefsPresent=b; } |
---|
1943 | Bool getTMVPFlagsPresent() { return m_TMVPFlagsPresent; } |
---|
1944 | Void setTMVPFlagsPresent(Bool b) { m_TMVPFlagsPresent=b; } |
---|
1945 | // physical transform |
---|
1946 | Void setMaxTrSize ( UInt u ) { m_uiMaxTrSize = u; } |
---|
1947 | UInt getMaxTrSize () { return m_uiMaxTrSize; } |
---|
1948 | |
---|
1949 | // AMP accuracy |
---|
1950 | Int getAMPAcc ( UInt uiDepth ) { return m_iAMPAcc[uiDepth]; } |
---|
1951 | Void setAMPAcc ( UInt uiDepth, Int iAccu ) { assert( uiDepth < g_uiMaxCUDepth); m_iAMPAcc[uiDepth] = iAccu; } |
---|
1952 | |
---|
1953 | // Bit-depth |
---|
1954 | Int getBitDepthY() { return m_bitDepthY; } |
---|
1955 | Void setBitDepthY(Int u) { m_bitDepthY = u; } |
---|
1956 | Int getBitDepthC() { return m_bitDepthC; } |
---|
1957 | Void setBitDepthC(Int u) { m_bitDepthC = u; } |
---|
1958 | Int getQpBDOffsetY () { return m_qpBDOffsetY; } |
---|
1959 | Void setQpBDOffsetY ( Int value ) { m_qpBDOffsetY = value; } |
---|
1960 | Int getQpBDOffsetC () { return m_qpBDOffsetC; } |
---|
1961 | Void setQpBDOffsetC ( Int value ) { m_qpBDOffsetC = value; } |
---|
1962 | Void setUseSAO (Bool bVal) {m_bUseSAO = bVal;} |
---|
1963 | Bool getUseSAO () {return m_bUseSAO;} |
---|
1964 | |
---|
1965 | UInt getMaxTLayers() { return m_uiMaxTLayers; } |
---|
1966 | Void setMaxTLayers( UInt uiMaxTLayers ) { assert( uiMaxTLayers <= MAX_TLAYER ); m_uiMaxTLayers = uiMaxTLayers; } |
---|
1967 | #if H_MV |
---|
1968 | UInt getSpsMaxSubLayersMinus1() { return ( m_uiMaxTLayers - 1); } |
---|
1969 | Void setSpsMaxSubLayersMinus1( UInt val ) { setMaxTLayers( val + 1 ); } |
---|
1970 | #endif |
---|
1971 | |
---|
1972 | Bool getTemporalIdNestingFlag() { return m_bTemporalIdNestingFlag; } |
---|
1973 | Void setTemporalIdNestingFlag( Bool bValue ) { m_bTemporalIdNestingFlag = bValue; } |
---|
1974 | UInt getPCMBitDepthLuma () { return m_uiPCMBitDepthLuma; } |
---|
1975 | Void setPCMBitDepthLuma ( UInt u ) { m_uiPCMBitDepthLuma = u; } |
---|
1976 | UInt getPCMBitDepthChroma () { return m_uiPCMBitDepthChroma; } |
---|
1977 | Void setPCMBitDepthChroma ( UInt u ) { m_uiPCMBitDepthChroma = u; } |
---|
1978 | Void setPCMFilterDisableFlag ( Bool bValue ) { m_bPCMFilterDisableFlag = bValue; } |
---|
1979 | Bool getPCMFilterDisableFlag () { return m_bPCMFilterDisableFlag; } |
---|
1980 | |
---|
1981 | Bool getScalingListFlag () { return m_scalingListEnabledFlag; } |
---|
1982 | Void setScalingListFlag ( Bool b ) { m_scalingListEnabledFlag = b; } |
---|
1983 | Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } |
---|
1984 | Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } |
---|
1985 | Void setScalingList ( TComScalingList *scalingList); |
---|
1986 | TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in SPS |
---|
1987 | UInt getMaxDecPicBuffering (UInt tlayer) { return m_uiMaxDecPicBuffering[tlayer]; } |
---|
1988 | Void setMaxDecPicBuffering ( UInt ui, UInt tlayer ) { assert(tlayer < MAX_TLAYER); m_uiMaxDecPicBuffering[tlayer] = ui; } |
---|
1989 | UInt getMaxLatencyIncrease (UInt tlayer) { return m_uiMaxLatencyIncrease[tlayer]; } |
---|
1990 | Void setMaxLatencyIncrease ( UInt ui , UInt tlayer) { m_uiMaxLatencyIncrease[tlayer] = ui; } |
---|
1991 | |
---|
1992 | Void setUseStrongIntraSmoothing (Bool bVal) {m_useStrongIntraSmoothing = bVal;} |
---|
1993 | Bool getUseStrongIntraSmoothing () {return m_useStrongIntraSmoothing;} |
---|
1994 | |
---|
1995 | Bool getVuiParametersPresentFlag() { return m_vuiParametersPresentFlag; } |
---|
1996 | Void setVuiParametersPresentFlag(Bool b) { m_vuiParametersPresentFlag = b; } |
---|
1997 | TComVUI* getVuiParameters() { return &m_vuiParameters; } |
---|
1998 | Void setHrdParameters( UInt frameRate, UInt numDU, UInt bitRate, Bool randomAccess ); |
---|
1999 | |
---|
2000 | TComPTL* getPTL() { return &m_pcPTL; } |
---|
2001 | #if H_MV |
---|
2002 | Void setSpsExtOrMaxSubLayersMinus1( Int val ) { m_spsExtOrMaxSubLayersMinus1 = val; } |
---|
2003 | Int getSpsExtOrMaxSubLayersMinus1( ) { return m_spsExtOrMaxSubLayersMinus1; } |
---|
2004 | Void inferSpsMaxSubLayersMinus1( Bool atPsActivation, TComVPS* vps ); |
---|
2005 | |
---|
2006 | Bool getMultiLayerExtSpsFlag() { return ( getLayerId() != 0 && getSpsExtOrMaxSubLayersMinus1() == 7 ); } |
---|
2007 | Void inferSpsMaxDecPicBufferingMinus1( TComVPS* vps, Int targetOptLayerSetIdx, Int currLayerId, Bool encoder ); |
---|
2008 | |
---|
2009 | Void setSpsExtensionPresentFlag( Bool flag ) { m_spsExtensionPresentFlag = flag; } |
---|
2010 | Bool getSpsExtensionPresentFlag( ) { return m_spsExtensionPresentFlag; } |
---|
2011 | |
---|
2012 | Void setSpsRangeExtensionsFlag( Bool flag ) { m_spsRangeExtensionsFlag = flag; } |
---|
2013 | Bool getSpsRangeExtensionsFlag( ) { return m_spsRangeExtensionsFlag; } |
---|
2014 | |
---|
2015 | Void setSpsMultilayerExtensionFlag( Bool flag ) { m_spsMultilayerExtensionFlag = flag; } |
---|
2016 | Bool getSpsMultilayerExtensionFlag( ) { return m_spsMultilayerExtensionFlag; } |
---|
2017 | #if H_3D |
---|
2018 | Void setSps3dExtensionFlag( Bool flag ) { m_sps3dExtensionFlag = flag; } |
---|
2019 | Bool getSps3dExtensionFlag( ) { return m_sps3dExtensionFlag; } |
---|
2020 | |
---|
2021 | Void setSpsExtension5bits( Int val ) { m_spsExtension5bits = val; } |
---|
2022 | Int getSpsExtension5bits( ) { return m_spsExtension5bits; } |
---|
2023 | #else |
---|
2024 | Void setSpsExtension6bits( Int val ) { m_spsExtension6bits = val; } |
---|
2025 | Int getSpsExtension6bits( ) { return m_spsExtension6bits; } |
---|
2026 | #endif |
---|
2027 | |
---|
2028 | Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } |
---|
2029 | TComVPS* getVPS () { return m_pcVPS; } |
---|
2030 | |
---|
2031 | Void setSpsInferScalingListFlag( Bool flag ) { m_spsInferScalingListFlag = flag; } |
---|
2032 | Bool getSpsInferScalingListFlag( ) { return m_spsInferScalingListFlag; } |
---|
2033 | |
---|
2034 | Void setSpsScalingListRefLayerId( Int val ) { m_spsScalingListRefLayerId = val; } |
---|
2035 | Int getSpsScalingListRefLayerId( ) { return m_spsScalingListRefLayerId; } |
---|
2036 | |
---|
2037 | Void setUpdateRepFormatFlag( Bool flag ) { m_updateRepFormatFlag = flag; } |
---|
2038 | Bool getUpdateRepFormatFlag( ) { return m_updateRepFormatFlag; } |
---|
2039 | Void setSpsRepFormatIdx( Int val ) { m_spsRepFormatIdx = val; } |
---|
2040 | Int getSpsRepFormatIdx( ) { return m_spsRepFormatIdx; } |
---|
2041 | |
---|
2042 | // SPS Extension |
---|
2043 | Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; } |
---|
2044 | Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;} |
---|
2045 | |
---|
2046 | #if HHI_TOOL_PARAMETERS_I2_J0107 |
---|
2047 | #if H_3D |
---|
2048 | Void setSps3dExtension ( TComSps3dExtension& sps3dExtension ) { m_sps3dExtension = sps3dExtension; } |
---|
2049 | TComSps3dExtension* getSps3dExtension ( ) { return &m_sps3dExtension; } |
---|
2050 | #endif |
---|
2051 | #endif |
---|
2052 | |
---|
2053 | // Inference |
---|
2054 | |
---|
2055 | Void inferRepFormat( TComVPS* vps, Int layerIdCurr ); |
---|
2056 | Void inferScalingList( TComSPS* spsSrc ); |
---|
2057 | |
---|
2058 | // others |
---|
2059 | Void checkRpsMaxNumPics( TComVPS* vps, Int currLayerId ); |
---|
2060 | |
---|
2061 | #endif |
---|
2062 | #if H_MV |
---|
2063 | Int getLayerId () { return m_layerId; } |
---|
2064 | Void setLayerId ( Int val ) { m_layerId = val; } |
---|
2065 | #endif |
---|
2066 | |
---|
2067 | }; |
---|
2068 | |
---|
2069 | /// Reference Picture Lists class |
---|
2070 | class TComRefPicListModification |
---|
2071 | { |
---|
2072 | private: |
---|
2073 | UInt m_bRefPicListModificationFlagL0; |
---|
2074 | UInt m_bRefPicListModificationFlagL1; |
---|
2075 | UInt m_RefPicSetIdxL0[32]; |
---|
2076 | UInt m_RefPicSetIdxL1[32]; |
---|
2077 | |
---|
2078 | public: |
---|
2079 | TComRefPicListModification(); |
---|
2080 | virtual ~TComRefPicListModification(); |
---|
2081 | |
---|
2082 | Void create (); |
---|
2083 | Void destroy (); |
---|
2084 | |
---|
2085 | Bool getRefPicListModificationFlagL0() { return m_bRefPicListModificationFlagL0; } |
---|
2086 | Void setRefPicListModificationFlagL0(Bool flag) { m_bRefPicListModificationFlagL0 = flag; } |
---|
2087 | Bool getRefPicListModificationFlagL1() { return m_bRefPicListModificationFlagL1; } |
---|
2088 | Void setRefPicListModificationFlagL1(Bool flag) { m_bRefPicListModificationFlagL1 = flag; } |
---|
2089 | Void setRefPicSetIdxL0(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL0[idx] = refPicSetIdx; } |
---|
2090 | UInt getRefPicSetIdxL0(UInt idx) { return m_RefPicSetIdxL0[idx]; } |
---|
2091 | Void setRefPicSetIdxL1(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL1[idx] = refPicSetIdx; } |
---|
2092 | UInt getRefPicSetIdxL1(UInt idx) { return m_RefPicSetIdxL1[idx]; } |
---|
2093 | #if H_MV |
---|
2094 | // Why not an listIdx for all members, would avoid code duplication?? |
---|
2095 | Void setRefPicSetIdxL(UInt li, UInt idx, UInt refPicSetIdx) {( li==0 ? m_RefPicSetIdxL0[idx] : m_RefPicSetIdxL1[idx] ) = refPicSetIdx; } |
---|
2096 | UInt getRefPicSetIdxL(UInt li, UInt idx ) { return ( li == 0 ) ? m_RefPicSetIdxL0[idx] : m_RefPicSetIdxL1[idx] ; } |
---|
2097 | Void setRefPicListModificationFlagL(UInt li, Bool flag) { ( li==0 ? m_bRefPicListModificationFlagL0 : m_bRefPicListModificationFlagL1 ) = flag; } |
---|
2098 | Bool getRefPicListModificationFlagL(UInt li ) { return ( li== 0) ? m_bRefPicListModificationFlagL0 : m_bRefPicListModificationFlagL1; } |
---|
2099 | #endif |
---|
2100 | }; |
---|
2101 | |
---|
2102 | /// PPS class |
---|
2103 | class TComPPS |
---|
2104 | { |
---|
2105 | private: |
---|
2106 | Int m_PPSId; // pic_parameter_set_id |
---|
2107 | Int m_SPSId; // seq_parameter_set_id |
---|
2108 | Int m_picInitQPMinus26; |
---|
2109 | Bool m_useDQP; |
---|
2110 | Bool m_bConstrainedIntraPred; // constrained_intra_pred_flag |
---|
2111 | Bool m_bSliceChromaQpFlag; // slicelevel_chroma_qp_flag |
---|
2112 | |
---|
2113 | // access channel |
---|
2114 | TComSPS* m_pcSPS; |
---|
2115 | UInt m_uiMaxCuDQPDepth; |
---|
2116 | UInt m_uiMinCuDQPSize; |
---|
2117 | |
---|
2118 | Int m_chromaCbQpOffset; |
---|
2119 | Int m_chromaCrQpOffset; |
---|
2120 | |
---|
2121 | UInt m_numRefIdxL0DefaultActive; |
---|
2122 | UInt m_numRefIdxL1DefaultActive; |
---|
2123 | |
---|
2124 | Bool m_bUseWeightPred; // Use of Weighting Prediction (P_SLICE) |
---|
2125 | Bool m_useWeightedBiPred; // Use of Weighting Bi-Prediction (B_SLICE) |
---|
2126 | Bool m_OutputFlagPresentFlag; // Indicates the presence of output_flag in slice header |
---|
2127 | |
---|
2128 | Bool m_TransquantBypassEnableFlag; // Indicates presence of cu_transquant_bypass_flag in CUs. |
---|
2129 | Bool m_useTransformSkip; |
---|
2130 | Bool m_dependentSliceSegmentsEnabledFlag; //!< Indicates the presence of dependent slices |
---|
2131 | Bool m_tilesEnabledFlag; //!< Indicates the presence of tiles |
---|
2132 | Bool m_entropyCodingSyncEnabledFlag; //!< Indicates the presence of wavefronts |
---|
2133 | |
---|
2134 | Bool m_loopFilterAcrossTilesEnabledFlag; |
---|
2135 | Bool m_uniformSpacingFlag; |
---|
2136 | Int m_numTileColumnsMinus1; |
---|
2137 | Int m_numTileRowsMinus1; |
---|
2138 | std::vector<Int> m_tileColumnWidth; |
---|
2139 | std::vector<Int> m_tileRowHeight; |
---|
2140 | |
---|
2141 | Int m_numSubstreams; |
---|
2142 | |
---|
2143 | Int m_signHideFlag; |
---|
2144 | |
---|
2145 | Bool m_cabacInitPresentFlag; |
---|
2146 | UInt m_encCABACTableIdx; // Used to transmit table selection across slices |
---|
2147 | |
---|
2148 | Bool m_sliceHeaderExtensionPresentFlag; |
---|
2149 | Bool m_loopFilterAcrossSlicesEnabledFlag; |
---|
2150 | Bool m_deblockingFilterControlPresentFlag; |
---|
2151 | Bool m_deblockingFilterOverrideEnabledFlag; |
---|
2152 | Bool m_picDisableDeblockingFilterFlag; |
---|
2153 | Int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
2154 | Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
2155 | Bool m_scalingListPresentFlag; |
---|
2156 | TComScalingList* m_scalingList; //!< ScalingList class pointer |
---|
2157 | Bool m_listsModificationPresentFlag; |
---|
2158 | UInt m_log2ParallelMergeLevelMinus2; |
---|
2159 | Int m_numExtraSliceHeaderBits; |
---|
2160 | |
---|
2161 | #if H_MV |
---|
2162 | Int m_layerId; |
---|
2163 | Bool m_ppsInferScalingListFlag; |
---|
2164 | Int m_ppsScalingListRefLayerId; |
---|
2165 | |
---|
2166 | Bool m_ppsRangeExtensionsFlag; |
---|
2167 | Bool m_ppsMultilayerExtensionFlag; |
---|
2168 | #if !H_3D |
---|
2169 | Int m_ppsExtension6bits; |
---|
2170 | #else |
---|
2171 | Bool m_pps3dExtensionFlag; |
---|
2172 | Int m_ppsExtension5bits; |
---|
2173 | #endif |
---|
2174 | |
---|
2175 | Bool m_pocResetInfoPresentFlag; |
---|
2176 | #endif |
---|
2177 | |
---|
2178 | #if H_3D |
---|
2179 | TComDLT* m_pcDLT; |
---|
2180 | #endif |
---|
2181 | |
---|
2182 | public: |
---|
2183 | TComPPS(); |
---|
2184 | virtual ~TComPPS(); |
---|
2185 | |
---|
2186 | Int getPPSId () { return m_PPSId; } |
---|
2187 | Void setPPSId (Int i) { m_PPSId = i; } |
---|
2188 | Int getSPSId () { return m_SPSId; } |
---|
2189 | Void setSPSId (Int i) { m_SPSId = i; } |
---|
2190 | |
---|
2191 | Int getPicInitQPMinus26 () { return m_picInitQPMinus26; } |
---|
2192 | Void setPicInitQPMinus26 ( Int i ) { m_picInitQPMinus26 = i; } |
---|
2193 | Bool getUseDQP () { return m_useDQP; } |
---|
2194 | Void setUseDQP ( Bool b ) { m_useDQP = b; } |
---|
2195 | Bool getConstrainedIntraPred () { return m_bConstrainedIntraPred; } |
---|
2196 | Void setConstrainedIntraPred ( Bool b ) { m_bConstrainedIntraPred = b; } |
---|
2197 | Bool getSliceChromaQpFlag () { return m_bSliceChromaQpFlag; } |
---|
2198 | Void setSliceChromaQpFlag ( Bool b ) { m_bSliceChromaQpFlag = b; } |
---|
2199 | |
---|
2200 | Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
2201 | TComSPS* getSPS () { return m_pcSPS; } |
---|
2202 | Void setMaxCuDQPDepth ( UInt u ) { m_uiMaxCuDQPDepth = u; } |
---|
2203 | UInt getMaxCuDQPDepth () { return m_uiMaxCuDQPDepth;} |
---|
2204 | Void setMinCuDQPSize ( UInt u ) { m_uiMinCuDQPSize = u; } |
---|
2205 | UInt getMinCuDQPSize () { return m_uiMinCuDQPSize; } |
---|
2206 | |
---|
2207 | #if H_3D |
---|
2208 | Void setDLT ( TComDLT* pcDLT ) { m_pcDLT = pcDLT; } |
---|
2209 | TComDLT* getDLT () { return m_pcDLT; } |
---|
2210 | #endif |
---|
2211 | |
---|
2212 | Void setChromaCbQpOffset( Int i ) { m_chromaCbQpOffset = i; } |
---|
2213 | Int getChromaCbQpOffset() { return m_chromaCbQpOffset; } |
---|
2214 | Void setChromaCrQpOffset( Int i ) { m_chromaCrQpOffset = i; } |
---|
2215 | Int getChromaCrQpOffset() { return m_chromaCrQpOffset; } |
---|
2216 | |
---|
2217 | Void setNumRefIdxL0DefaultActive(UInt ui) { m_numRefIdxL0DefaultActive=ui; } |
---|
2218 | UInt getNumRefIdxL0DefaultActive() { return m_numRefIdxL0DefaultActive; } |
---|
2219 | Void setNumRefIdxL1DefaultActive(UInt ui) { m_numRefIdxL1DefaultActive=ui; } |
---|
2220 | UInt getNumRefIdxL1DefaultActive() { return m_numRefIdxL1DefaultActive; } |
---|
2221 | |
---|
2222 | Bool getUseWP () { return m_bUseWeightPred; } |
---|
2223 | Bool getWPBiPred () { return m_useWeightedBiPred; } |
---|
2224 | Void setUseWP ( Bool b ) { m_bUseWeightPred = b; } |
---|
2225 | Void setWPBiPred ( Bool b ) { m_useWeightedBiPred = b; } |
---|
2226 | Void setOutputFlagPresentFlag( Bool b ) { m_OutputFlagPresentFlag = b; } |
---|
2227 | Bool getOutputFlagPresentFlag() { return m_OutputFlagPresentFlag; } |
---|
2228 | Void setTransquantBypassEnableFlag( Bool b ) { m_TransquantBypassEnableFlag = b; } |
---|
2229 | Bool getTransquantBypassEnableFlag() { return m_TransquantBypassEnableFlag; } |
---|
2230 | |
---|
2231 | Bool getUseTransformSkip () { return m_useTransformSkip; } |
---|
2232 | Void setUseTransformSkip ( Bool b ) { m_useTransformSkip = b; } |
---|
2233 | |
---|
2234 | Void setLoopFilterAcrossTilesEnabledFlag (Bool b) { m_loopFilterAcrossTilesEnabledFlag = b; } |
---|
2235 | Bool getLoopFilterAcrossTilesEnabledFlag () { return m_loopFilterAcrossTilesEnabledFlag; } |
---|
2236 | Bool getDependentSliceSegmentsEnabledFlag() const { return m_dependentSliceSegmentsEnabledFlag; } |
---|
2237 | Void setDependentSliceSegmentsEnabledFlag(Bool val) { m_dependentSliceSegmentsEnabledFlag = val; } |
---|
2238 | Bool getEntropyCodingSyncEnabledFlag() const { return m_entropyCodingSyncEnabledFlag; } |
---|
2239 | Void setEntropyCodingSyncEnabledFlag(Bool val) { m_entropyCodingSyncEnabledFlag = val; } |
---|
2240 | |
---|
2241 | Void setTilesEnabledFlag (Bool val) { m_tilesEnabledFlag = val; } |
---|
2242 | Bool getTilesEnabledFlag () const { return m_tilesEnabledFlag; } |
---|
2243 | Void setTileUniformSpacingFlag (Bool b) { m_uniformSpacingFlag = b; } |
---|
2244 | Bool getTileUniformSpacingFlag () const { return m_uniformSpacingFlag; } |
---|
2245 | Void setNumTileColumnsMinus1 (Int i) { m_numTileColumnsMinus1 = i; } |
---|
2246 | Int getNumTileColumnsMinus1 () const { return m_numTileColumnsMinus1; } |
---|
2247 | Void setTileColumnWidth (const std::vector<Int>& columnWidth ) { m_tileColumnWidth = columnWidth; } |
---|
2248 | UInt getTileColumnWidth (UInt columnIdx) const { return m_tileColumnWidth[columnIdx]; } |
---|
2249 | Void setNumTileRowsMinus1 (Int i) { m_numTileRowsMinus1 = i; } |
---|
2250 | Int getTileNumRowsMinus1 () const { return m_numTileRowsMinus1; } |
---|
2251 | Void setTileRowHeight (const std::vector<Int>& rowHeight) { m_tileRowHeight = rowHeight; } |
---|
2252 | UInt getTileRowHeight (UInt rowIdx) const { return m_tileRowHeight[rowIdx]; } |
---|
2253 | |
---|
2254 | Void setNumSubstreams (Int numSubstreams) { m_numSubstreams = numSubstreams; } |
---|
2255 | Int getNumSubstreams () { return m_numSubstreams; } |
---|
2256 | |
---|
2257 | Void setSignHideFlag( Int signHideFlag ) { m_signHideFlag = signHideFlag; } |
---|
2258 | Int getSignHideFlag() { return m_signHideFlag; } |
---|
2259 | |
---|
2260 | Void setCabacInitPresentFlag( Bool flag ) { m_cabacInitPresentFlag = flag; } |
---|
2261 | Void setEncCABACTableIdx( Int idx ) { m_encCABACTableIdx = idx; } |
---|
2262 | Bool getCabacInitPresentFlag() { return m_cabacInitPresentFlag; } |
---|
2263 | UInt getEncCABACTableIdx() { return m_encCABACTableIdx; } |
---|
2264 | Void setDeblockingFilterControlPresentFlag( Bool val ) { m_deblockingFilterControlPresentFlag = val; } |
---|
2265 | Bool getDeblockingFilterControlPresentFlag() { return m_deblockingFilterControlPresentFlag; } |
---|
2266 | Void setDeblockingFilterOverrideEnabledFlag( Bool val ) { m_deblockingFilterOverrideEnabledFlag = val; } |
---|
2267 | Bool getDeblockingFilterOverrideEnabledFlag() { return m_deblockingFilterOverrideEnabledFlag; } |
---|
2268 | Void setPicDisableDeblockingFilterFlag(Bool val) { m_picDisableDeblockingFilterFlag = val; } //!< set offset for deblocking filter disabled |
---|
2269 | Bool getPicDisableDeblockingFilterFlag() { return m_picDisableDeblockingFilterFlag; } //!< get offset for deblocking filter disabled |
---|
2270 | Void setDeblockingFilterBetaOffsetDiv2(Int val) { m_deblockingFilterBetaOffsetDiv2 = val; } //!< set beta offset for deblocking filter |
---|
2271 | Int getDeblockingFilterBetaOffsetDiv2() { return m_deblockingFilterBetaOffsetDiv2; } //!< get beta offset for deblocking filter |
---|
2272 | Void setDeblockingFilterTcOffsetDiv2(Int val) { m_deblockingFilterTcOffsetDiv2 = val; } //!< set tc offset for deblocking filter |
---|
2273 | Int getDeblockingFilterTcOffsetDiv2() { return m_deblockingFilterTcOffsetDiv2; } //!< get tc offset for deblocking filter |
---|
2274 | Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } |
---|
2275 | Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } |
---|
2276 | Void setScalingList ( TComScalingList *scalingList); |
---|
2277 | TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in PPS |
---|
2278 | Bool getListsModificationPresentFlag () { return m_listsModificationPresentFlag; } |
---|
2279 | Void setListsModificationPresentFlag ( Bool b ) { m_listsModificationPresentFlag = b; } |
---|
2280 | UInt getLog2ParallelMergeLevelMinus2 () { return m_log2ParallelMergeLevelMinus2; } |
---|
2281 | Void setLog2ParallelMergeLevelMinus2 (UInt mrgLevel) { m_log2ParallelMergeLevelMinus2 = mrgLevel; } |
---|
2282 | Int getNumExtraSliceHeaderBits() { return m_numExtraSliceHeaderBits; } |
---|
2283 | Void setNumExtraSliceHeaderBits(Int i) { m_numExtraSliceHeaderBits = i; } |
---|
2284 | Void setLoopFilterAcrossSlicesEnabledFlag ( Bool bValue ) { m_loopFilterAcrossSlicesEnabledFlag = bValue; } |
---|
2285 | Bool getLoopFilterAcrossSlicesEnabledFlag () { return m_loopFilterAcrossSlicesEnabledFlag; } |
---|
2286 | Bool getSliceHeaderExtensionPresentFlag () { return m_sliceHeaderExtensionPresentFlag; } |
---|
2287 | Void setSliceHeaderExtensionPresentFlag (Bool val) { m_sliceHeaderExtensionPresentFlag = val; } |
---|
2288 | #if H_MV |
---|
2289 | Void setLayerId( Int val ) { m_layerId = val; } |
---|
2290 | Int getLayerId( ) { return m_layerId; } |
---|
2291 | |
---|
2292 | Void setPpsInferScalingListFlag( Bool flag ) { m_ppsInferScalingListFlag = flag; } |
---|
2293 | Bool getPpsInferScalingListFlag( ) { return m_ppsInferScalingListFlag; } |
---|
2294 | |
---|
2295 | Void setPpsScalingListRefLayerId( Int val ) { m_ppsScalingListRefLayerId = val; } |
---|
2296 | Int getPpsScalingListRefLayerId( ) { return m_ppsScalingListRefLayerId; } |
---|
2297 | |
---|
2298 | Void setPpsRangeExtensionsFlag( Bool flag ) { m_ppsRangeExtensionsFlag = flag; } |
---|
2299 | Bool getPpsRangeExtensionsFlag( ) { return m_ppsRangeExtensionsFlag; } |
---|
2300 | |
---|
2301 | Void setPpsMultilayerExtensionFlag( Bool flag ) { m_ppsMultilayerExtensionFlag = flag; } |
---|
2302 | Bool getPpsMultilayerExtensionFlag( ) { return m_ppsMultilayerExtensionFlag; } |
---|
2303 | |
---|
2304 | #if !H_3D |
---|
2305 | Void setPpsExtension6bits( Int val ) { m_ppsExtension6bits = val; } |
---|
2306 | Int getPpsExtension6bits( ) { return m_ppsExtension6bits; } |
---|
2307 | #else |
---|
2308 | Void setPps3dExtensionFlag( Bool flag ) { m_pps3dExtensionFlag = flag; } |
---|
2309 | Bool getPps3dExtensionFlag( ) { return m_pps3dExtensionFlag; } |
---|
2310 | |
---|
2311 | Void setPpsExtension5bits( Int val ) { m_ppsExtension5bits = val; } |
---|
2312 | Int getPpsExtension5bits( ) { return m_ppsExtension5bits; } |
---|
2313 | #endif |
---|
2314 | |
---|
2315 | Void setPocResetInfoPresentFlag( Bool flag ) { m_pocResetInfoPresentFlag = flag; } |
---|
2316 | Bool getPocResetInfoPresentFlag( ) { return m_pocResetInfoPresentFlag; } |
---|
2317 | #endif |
---|
2318 | }; |
---|
2319 | |
---|
2320 | typedef struct |
---|
2321 | { |
---|
2322 | // Explicit weighted prediction parameters parsed in slice header, |
---|
2323 | // or Implicit weighted prediction parameters (8 bits depth values). |
---|
2324 | Bool bPresentFlag; |
---|
2325 | UInt uiLog2WeightDenom; |
---|
2326 | Int iWeight; |
---|
2327 | Int iOffset; |
---|
2328 | |
---|
2329 | // Weighted prediction scaling values built from above parameters (bitdepth scaled): |
---|
2330 | Int w, o, offset, shift, round; |
---|
2331 | } wpScalingParam; |
---|
2332 | |
---|
2333 | typedef struct |
---|
2334 | { |
---|
2335 | Int64 iAC; |
---|
2336 | Int64 iDC; |
---|
2337 | } wpACDCParam; |
---|
2338 | |
---|
2339 | /// slice header class |
---|
2340 | class TComSlice |
---|
2341 | { |
---|
2342 | |
---|
2343 | private: |
---|
2344 | // Bitstream writing |
---|
2345 | Bool m_saoEnabledFlag; |
---|
2346 | Bool m_saoEnabledFlagChroma; ///< SAO Cb&Cr enabled flag |
---|
2347 | Int m_iPPSId; ///< picture parameter set ID |
---|
2348 | Bool m_PicOutputFlag; ///< pic_output_flag |
---|
2349 | #if H_MV |
---|
2350 | Int m_slicePicOrderCntLsb; |
---|
2351 | #endif |
---|
2352 | Int m_iPOC; |
---|
2353 | #if H_MV |
---|
2354 | Int m_iPOCBeforeReset; |
---|
2355 | #endif |
---|
2356 | Int m_iLastIDR; |
---|
2357 | Int m_iAssociatedIRAP; |
---|
2358 | NalUnitType m_iAssociatedIRAPType; |
---|
2359 | static Int m_prevTid0POC; |
---|
2360 | TComReferencePictureSet *m_pcRPS; |
---|
2361 | TComReferencePictureSet m_LocalRPS; |
---|
2362 | Int m_iBDidx; |
---|
2363 | TComRefPicListModification m_RefPicListModification; |
---|
2364 | NalUnitType m_eNalUnitType; ///< Nal unit type for the slice |
---|
2365 | SliceType m_eSliceType; |
---|
2366 | Int m_iSliceQp; |
---|
2367 | Bool m_dependentSliceSegmentFlag; |
---|
2368 | #if ADAPTIVE_QP_SELECTION |
---|
2369 | Int m_iSliceQpBase; |
---|
2370 | #endif |
---|
2371 | Bool m_deblockingFilterDisable; |
---|
2372 | Bool m_deblockingFilterOverrideFlag; //< offsets for deblocking filter inherit from PPS |
---|
2373 | Int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
2374 | Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
2375 | Int m_list1IdxToList0Idx[MAX_NUM_REF]; |
---|
2376 | Int m_aiNumRefIdx [2]; // for multiple reference of current slice |
---|
2377 | |
---|
2378 | Bool m_bCheckLDC; |
---|
2379 | |
---|
2380 | // Data |
---|
2381 | Int m_iSliceQpDelta; |
---|
2382 | Int m_iSliceQpDeltaCb; |
---|
2383 | Int m_iSliceQpDeltaCr; |
---|
2384 | TComPic* m_apcRefPicList [2][MAX_NUM_REF+1]; |
---|
2385 | Int m_aiRefPOCList [2][MAX_NUM_REF+1]; |
---|
2386 | #if H_MV |
---|
2387 | Int m_aiRefLayerIdList[2][MAX_NUM_REF+1]; |
---|
2388 | #endif |
---|
2389 | Bool m_bIsUsedAsLongTerm[2][MAX_NUM_REF+1]; |
---|
2390 | Int m_iDepth; |
---|
2391 | |
---|
2392 | // referenced slice? |
---|
2393 | Bool m_bRefenced; |
---|
2394 | |
---|
2395 | // access channel |
---|
2396 | TComVPS* m_pcVPS; |
---|
2397 | TComSPS* m_pcSPS; |
---|
2398 | TComPPS* m_pcPPS; |
---|
2399 | TComPic* m_pcPic; |
---|
2400 | #if ADAPTIVE_QP_SELECTION |
---|
2401 | TComTrQuant* m_pcTrQuant; |
---|
2402 | #endif |
---|
2403 | UInt m_colFromL0Flag; // collocated picture from List0 flag |
---|
2404 | |
---|
2405 | #if SETTING_NO_OUT_PIC_PRIOR |
---|
2406 | Bool m_noOutputPriorPicsFlag; |
---|
2407 | Bool m_noRaslOutputFlag; |
---|
2408 | Bool m_handleCraAsBlaFlag; |
---|
2409 | #endif |
---|
2410 | |
---|
2411 | UInt m_colRefIdx; |
---|
2412 | UInt m_maxNumMergeCand; |
---|
2413 | |
---|
2414 | Double m_lambdas[3]; |
---|
2415 | |
---|
2416 | Bool m_abEqualRef [2][MAX_NUM_REF][MAX_NUM_REF]; |
---|
2417 | UInt m_uiTLayer; |
---|
2418 | Bool m_bTLayerSwitchingFlag; |
---|
2419 | |
---|
2420 | UInt m_sliceMode; |
---|
2421 | UInt m_sliceArgument; |
---|
2422 | UInt m_sliceCurStartCUAddr; |
---|
2423 | UInt m_sliceCurEndCUAddr; |
---|
2424 | UInt m_sliceIdx; |
---|
2425 | UInt m_sliceSegmentMode; |
---|
2426 | UInt m_sliceSegmentArgument; |
---|
2427 | UInt m_sliceSegmentCurStartCUAddr; |
---|
2428 | UInt m_sliceSegmentCurEndCUAddr; |
---|
2429 | Bool m_nextSlice; |
---|
2430 | Bool m_nextSliceSegment; |
---|
2431 | UInt m_sliceBits; |
---|
2432 | UInt m_sliceSegmentBits; |
---|
2433 | Bool m_bFinalized; |
---|
2434 | |
---|
2435 | wpScalingParam m_weightPredTable[2][MAX_NUM_REF][3]; // [REF_PIC_LIST_0 or REF_PIC_LIST_1][refIdx][0:Y, 1:U, 2:V] |
---|
2436 | wpACDCParam m_weightACDCParam[3]; // [0:Y, 1:U, 2:V] |
---|
2437 | |
---|
2438 | std::vector<UInt> m_tileByteLocation; |
---|
2439 | UInt m_uiTileOffstForMultES; |
---|
2440 | |
---|
2441 | UInt* m_puiSubstreamSizes; |
---|
2442 | TComScalingList* m_scalingList; //!< pointer of quantization matrix |
---|
2443 | Bool m_cabacInitFlag; |
---|
2444 | |
---|
2445 | Bool m_bLMvdL1Zero; |
---|
2446 | Int m_numEntryPointOffsets; |
---|
2447 | Bool m_temporalLayerNonReferenceFlag; |
---|
2448 | Bool m_LFCrossSliceBoundaryFlag; |
---|
2449 | |
---|
2450 | Bool m_enableTMVPFlag; |
---|
2451 | #if H_MV |
---|
2452 | Bool m_availableForTMVPRefFlag; |
---|
2453 | #endif |
---|
2454 | |
---|
2455 | #if H_MV |
---|
2456 | std::vector<TComPic*>* m_refPicSetInterLayer0; |
---|
2457 | std::vector<TComPic*>* m_refPicSetInterLayer1; |
---|
2458 | Int m_layerId; |
---|
2459 | Int m_viewId; |
---|
2460 | Int m_viewIndex; |
---|
2461 | #if H_3D |
---|
2462 | Bool m_isDepth; |
---|
2463 | #endif |
---|
2464 | |
---|
2465 | // Additional slice header syntax elements |
---|
2466 | #if !H_MV_HLS7_GEN |
---|
2467 | Bool m_pocResetFlag; |
---|
2468 | #endif |
---|
2469 | Bool m_crossLayerBlaFlag; |
---|
2470 | Bool m_discardableFlag; |
---|
2471 | Bool m_interLayerPredEnabledFlag; |
---|
2472 | Int m_numInterLayerRefPicsMinus1; |
---|
2473 | Int m_interLayerPredLayerIdc [MAX_NUM_LAYERS]; |
---|
2474 | |
---|
2475 | Int m_sliceSegmentHeaderExtensionLength; |
---|
2476 | Int m_pocResetIdc; |
---|
2477 | Int m_pocResetPeriodId; |
---|
2478 | Bool m_fullPocResetFlag; |
---|
2479 | Int m_pocLsbVal; |
---|
2480 | Bool m_pocMsbValPresentFlag; |
---|
2481 | Int m_pocMsbVal; |
---|
2482 | Bool m_pocMsbValRequiredFlag; |
---|
2483 | |
---|
2484 | #if H_3D |
---|
2485 | Int m_aaiCodedScale [2][MAX_NUM_LAYERS]; |
---|
2486 | Int m_aaiCodedOffset[2][MAX_NUM_LAYERS]; |
---|
2487 | #endif |
---|
2488 | #if H_3D_TMVP |
---|
2489 | Int m_aiAlterRefIdx [2]; |
---|
2490 | #endif |
---|
2491 | #if H_3D_ARP |
---|
2492 | Bool m_arpRefPicAvailable[2][MAX_NUM_LAYERS]; |
---|
2493 | TComList<TComPic*> * m_pBaseViewRefPicList[MAX_NUM_LAYERS]; |
---|
2494 | UInt m_nARPStepNum; |
---|
2495 | Int m_aiFirstTRefIdx [2]; |
---|
2496 | #endif |
---|
2497 | #if H_3D_IC |
---|
2498 | Bool m_bApplyIC; |
---|
2499 | Bool m_icSkipParseFlag; |
---|
2500 | #endif |
---|
2501 | #if H_3D |
---|
2502 | TComPic* m_ivPicsCurrPoc [2][MAX_NUM_LAYERS]; |
---|
2503 | Int** m_depthToDisparityB; |
---|
2504 | Int** m_depthToDisparityF; |
---|
2505 | #endif |
---|
2506 | #endif |
---|
2507 | #if !LGE_DDD_REMOVAL_J0042_J0030 |
---|
2508 | #if H_3D_DDD |
---|
2509 | Int m_aiDDDInvScale [MAX_NUM_LAYERS]; |
---|
2510 | Int m_aiDDDInvOffset[MAX_NUM_LAYERS]; |
---|
2511 | UInt m_aiDDDShift [MAX_NUM_LAYERS]; |
---|
2512 | #endif |
---|
2513 | #endif |
---|
2514 | #if H_3D_SINGLE_DEPTH |
---|
2515 | Bool m_bApplySingleDepthMode; |
---|
2516 | #endif |
---|
2517 | #if H_3D_IC |
---|
2518 | Int *m_aICEnableCandidate; |
---|
2519 | Int *m_aICEnableNum; |
---|
2520 | #endif |
---|
2521 | #if LGE_DEFAULT_DV_J0046 |
---|
2522 | Int m_iDefaultRefViewIdx; |
---|
2523 | Bool m_bDefaultRefViewIdxAvailableFlag; |
---|
2524 | #endif |
---|
2525 | |
---|
2526 | #if HHI_TOOL_PARAMETERS_I2_J0107 |
---|
2527 | Bool m_ivMvPredFlag ; |
---|
2528 | Bool m_ivMvScalingFlag ; |
---|
2529 | Bool m_ivResPredFlag ; |
---|
2530 | Bool m_depthRefinementFlag ; |
---|
2531 | Bool m_viewSynthesisPredFlag; |
---|
2532 | Bool m_depthBasedBlkPartFlag; |
---|
2533 | Bool m_mpiFlag ; |
---|
2534 | Bool m_intraContourFlag ; |
---|
2535 | Bool m_intraSdcWedgeFlag ; |
---|
2536 | Bool m_qtPredFlag ; |
---|
2537 | Bool m_interSdcFlag ; |
---|
2538 | Bool m_intraSingleFlag ; |
---|
2539 | |
---|
2540 | Int m_mpiSubPbSize ; |
---|
2541 | Int m_subPbSize ; |
---|
2542 | #endif |
---|
2543 | public: |
---|
2544 | TComSlice(); |
---|
2545 | virtual ~TComSlice(); |
---|
2546 | Void initSlice (); |
---|
2547 | |
---|
2548 | Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } |
---|
2549 | TComVPS* getVPS () { return m_pcVPS; } |
---|
2550 | Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
2551 | TComSPS* getSPS () { return m_pcSPS; } |
---|
2552 | |
---|
2553 | Void setPPS ( TComPPS* pcPPS ) { assert(pcPPS!=NULL); m_pcPPS = pcPPS; m_iPPSId = pcPPS->getPPSId(); } |
---|
2554 | TComPPS* getPPS () { return m_pcPPS; } |
---|
2555 | |
---|
2556 | #if ADAPTIVE_QP_SELECTION |
---|
2557 | Void setTrQuant ( TComTrQuant* pcTrQuant ) { m_pcTrQuant = pcTrQuant; } |
---|
2558 | TComTrQuant* getTrQuant () { return m_pcTrQuant; } |
---|
2559 | #endif |
---|
2560 | |
---|
2561 | Void setPPSId ( Int PPSId ) { m_iPPSId = PPSId; } |
---|
2562 | Int getPPSId () { return m_iPPSId; } |
---|
2563 | Void setPicOutputFlag( Bool b ) { m_PicOutputFlag = b; } |
---|
2564 | Bool getPicOutputFlag() { return m_PicOutputFlag; } |
---|
2565 | #if H_MV |
---|
2566 | Void setSlicePicOrderCntLsb( Int i ) { m_slicePicOrderCntLsb = i; }; |
---|
2567 | Int getSlicePicOrderCntLsb( ) { return m_slicePicOrderCntLsb; }; |
---|
2568 | #endif |
---|
2569 | Void setSaoEnabledFlag(Bool s) {m_saoEnabledFlag =s; } |
---|
2570 | Bool getSaoEnabledFlag() { return m_saoEnabledFlag; } |
---|
2571 | Void setSaoEnabledFlagChroma(Bool s) {m_saoEnabledFlagChroma =s; } //!< set SAO Cb&Cr enabled flag |
---|
2572 | Bool getSaoEnabledFlagChroma() { return m_saoEnabledFlagChroma; } //!< get SAO Cb&Cr enabled flag |
---|
2573 | Void setRPS ( TComReferencePictureSet *pcRPS ) { m_pcRPS = pcRPS; } |
---|
2574 | TComReferencePictureSet* getRPS () { return m_pcRPS; } |
---|
2575 | TComReferencePictureSet* getLocalRPS () { return &m_LocalRPS; } |
---|
2576 | |
---|
2577 | Void setRPSidx ( Int iBDidx ) { m_iBDidx = iBDidx; } |
---|
2578 | Int getRPSidx () { return m_iBDidx; } |
---|
2579 | Int getPrevTid0POC () { return m_prevTid0POC; } |
---|
2580 | TComRefPicListModification* getRefPicListModification() { return &m_RefPicListModification; } |
---|
2581 | Void setLastIDR(Int iIDRPOC) { m_iLastIDR = iIDRPOC; } |
---|
2582 | Int getLastIDR() { return m_iLastIDR; } |
---|
2583 | Void setAssociatedIRAPPOC(Int iAssociatedIRAPPOC) { m_iAssociatedIRAP = iAssociatedIRAPPOC; } |
---|
2584 | Int getAssociatedIRAPPOC() { return m_iAssociatedIRAP; } |
---|
2585 | Void setAssociatedIRAPType(NalUnitType associatedIRAPType) { m_iAssociatedIRAPType = associatedIRAPType; } |
---|
2586 | NalUnitType getAssociatedIRAPType() { return m_iAssociatedIRAPType; } |
---|
2587 | SliceType getSliceType () { return m_eSliceType; } |
---|
2588 | Int getPOC () { return m_iPOC; } |
---|
2589 | Int getSliceQp () { return m_iSliceQp; } |
---|
2590 | Bool getDependentSliceSegmentFlag() const { return m_dependentSliceSegmentFlag; } |
---|
2591 | void setDependentSliceSegmentFlag(Bool val) { m_dependentSliceSegmentFlag = val; } |
---|
2592 | #if ADAPTIVE_QP_SELECTION |
---|
2593 | Int getSliceQpBase () { return m_iSliceQpBase; } |
---|
2594 | #endif |
---|
2595 | Int getSliceQpDelta () { return m_iSliceQpDelta; } |
---|
2596 | Int getSliceQpDeltaCb () { return m_iSliceQpDeltaCb; } |
---|
2597 | Int getSliceQpDeltaCr () { return m_iSliceQpDeltaCr; } |
---|
2598 | Bool getDeblockingFilterDisable() { return m_deblockingFilterDisable; } |
---|
2599 | Bool getDeblockingFilterOverrideFlag() { return m_deblockingFilterOverrideFlag; } |
---|
2600 | Int getDeblockingFilterBetaOffsetDiv2() { return m_deblockingFilterBetaOffsetDiv2; } |
---|
2601 | Int getDeblockingFilterTcOffsetDiv2() { return m_deblockingFilterTcOffsetDiv2; } |
---|
2602 | |
---|
2603 | Int getNumRefIdx ( RefPicList e ) { return m_aiNumRefIdx[e]; } |
---|
2604 | TComPic* getPic () { return m_pcPic; } |
---|
2605 | TComPic* getRefPic ( RefPicList e, Int iRefIdx) { return m_apcRefPicList[e][iRefIdx]; } |
---|
2606 | Int getRefPOC ( RefPicList e, Int iRefIdx) { return m_aiRefPOCList[e][iRefIdx]; } |
---|
2607 | #if H_3D |
---|
2608 | TComPic* getIvPic ( Bool depthFlag, Int viewIndex){ return m_ivPicsCurrPoc[ depthFlag ? 1 : 0 ][ viewIndex ]; } |
---|
2609 | #endif |
---|
2610 | #if H_3D |
---|
2611 | TComPic* getTexturePic () { return m_ivPicsCurrPoc[0][ m_viewIndex ]; } |
---|
2612 | #endif |
---|
2613 | #if !MTK_SINGLE_DEPTH_VPS_FLAG_J0060 |
---|
2614 | #if H_3D_SINGLE_DEPTH |
---|
2615 | Void setApplySingleDepthMode( Bool b ) { m_bApplySingleDepthMode = b; } |
---|
2616 | Bool getApplySingleDepthMode() { return m_bApplySingleDepthMode; } |
---|
2617 | #endif |
---|
2618 | #endif |
---|
2619 | #if H_3D_IC |
---|
2620 | Void setApplyIC( Bool b ) { m_bApplyIC = b; } |
---|
2621 | Bool getApplyIC() { return m_bApplyIC; } |
---|
2622 | Void xSetApplyIC(); |
---|
2623 | Void xSetApplyIC(Bool bUseLowLatencyICEnc); |
---|
2624 | Void setIcSkipParseFlag( Bool b ) { m_icSkipParseFlag = b; } |
---|
2625 | Bool getIcSkipParseFlag() { return m_icSkipParseFlag; } |
---|
2626 | #endif |
---|
2627 | #if H_3D_ARP |
---|
2628 | Void setBaseViewRefPicList( TComList<TComPic*> *pListPic, Int iViewIdx ) { m_pBaseViewRefPicList[iViewIdx] = pListPic; } |
---|
2629 | Void setARPStepNum( TComPicLists*ivPicLists ); |
---|
2630 | TComPic* getBaseViewRefPic ( UInt uiPOC , Int iViewIdx ) { return xGetRefPic( *m_pBaseViewRefPicList[iViewIdx], uiPOC ); } |
---|
2631 | UInt getARPStepNum( ) { return m_nARPStepNum; } |
---|
2632 | #endif |
---|
2633 | Int getDepth () { return m_iDepth; } |
---|
2634 | UInt getColFromL0Flag () { return m_colFromL0Flag; } |
---|
2635 | UInt getColRefIdx () { return m_colRefIdx; } |
---|
2636 | Void checkColRefIdx (UInt curSliceIdx, TComPic* pic); |
---|
2637 | Bool getIsUsedAsLongTerm (Int i, Int j) { return m_bIsUsedAsLongTerm[i][j]; } |
---|
2638 | Void setIsUsedAsLongTerm (Int i, Int j, Bool value) { m_bIsUsedAsLongTerm[i][j] = value; } |
---|
2639 | Bool getCheckLDC () { return m_bCheckLDC; } |
---|
2640 | Bool getMvdL1ZeroFlag () { return m_bLMvdL1Zero; } |
---|
2641 | Int getNumRpsCurrTempList(); |
---|
2642 | Int getList1IdxToList0Idx ( Int list1Idx ) { return m_list1IdxToList0Idx[list1Idx]; } |
---|
2643 | Void setReferenced(Bool b) { m_bRefenced = b; } |
---|
2644 | Bool isReferenced() { return m_bRefenced; } |
---|
2645 | 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) ); } |
---|
2646 | 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;} } |
---|
2647 | Void setNalUnitType ( NalUnitType e ) { m_eNalUnitType = e; } |
---|
2648 | NalUnitType getNalUnitType () const { return m_eNalUnitType; } |
---|
2649 | Bool getRapPicFlag (); |
---|
2650 | Bool getIdrPicFlag () { return getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP; } |
---|
2651 | Bool isIRAP () const { return (getNalUnitType() >= 16) && (getNalUnitType() <= 23); } |
---|
2652 | Void checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, NalUnitType& associatedIRAPType, TComList<TComPic *>& rcListPic); |
---|
2653 | Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic); |
---|
2654 | Void setSliceType ( SliceType e ) { m_eSliceType = e; } |
---|
2655 | Void setSliceQp ( Int i ) { m_iSliceQp = i; } |
---|
2656 | #if ADAPTIVE_QP_SELECTION |
---|
2657 | Void setSliceQpBase ( Int i ) { m_iSliceQpBase = i; } |
---|
2658 | #endif |
---|
2659 | Void setSliceQpDelta ( Int i ) { m_iSliceQpDelta = i; } |
---|
2660 | Void setSliceQpDeltaCb ( Int i ) { m_iSliceQpDeltaCb = i; } |
---|
2661 | Void setSliceQpDeltaCr ( Int i ) { m_iSliceQpDeltaCr = i; } |
---|
2662 | Void setDeblockingFilterDisable( Bool b ) { m_deblockingFilterDisable= b; } |
---|
2663 | Void setDeblockingFilterOverrideFlag( Bool b ) { m_deblockingFilterOverrideFlag = b; } |
---|
2664 | Void setDeblockingFilterBetaOffsetDiv2( Int i ) { m_deblockingFilterBetaOffsetDiv2 = i; } |
---|
2665 | Void setDeblockingFilterTcOffsetDiv2( Int i ) { m_deblockingFilterTcOffsetDiv2 = i; } |
---|
2666 | |
---|
2667 | Void setRefPic ( TComPic* p, RefPicList e, Int iRefIdx ) { m_apcRefPicList[e][iRefIdx] = p; } |
---|
2668 | Void setRefPOC ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefPOCList[e][iRefIdx] = i; } |
---|
2669 | Void setNumRefIdx ( RefPicList e, Int i ) { m_aiNumRefIdx[e] = i; } |
---|
2670 | Void setPic ( TComPic* p ) { m_pcPic = p; } |
---|
2671 | Void setDepth ( Int iDepth ) { m_iDepth = iDepth; } |
---|
2672 | |
---|
2673 | #if H_MV |
---|
2674 | Void setPocBeforeReset ( Int i ) { m_iPOCBeforeReset = i; } |
---|
2675 | Int getPocBeforeReset ( ) { return m_iPOCBeforeReset; } |
---|
2676 | Int getRefLayerId ( RefPicList e, Int iRefIdx) { return m_aiRefLayerIdList[e][iRefIdx]; } |
---|
2677 | Void setRefLayerId ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefLayerIdList[e][iRefIdx] = i; } |
---|
2678 | Void getTempRefPicLists ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1, |
---|
2679 | std::vector<TComPic*> rpsCurrList[2], std::vector<Bool> usedAsLongTerm[2], Int& numPocTotalCurr, Bool checkNumPocTotalCurr = false ); |
---|
2680 | |
---|
2681 | Void setRefPicList ( std::vector<TComPic*> rpsCurrList[2], std::vector<Bool> usedAsLongTerm[2], Int numPocTotalCurr, Bool checkNumPocTotalCurr = false ); |
---|
2682 | #else |
---|
2683 | Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false ); |
---|
2684 | #endif |
---|
2685 | Void setRefPOCList (); |
---|
2686 | Void setColFromL0Flag ( UInt colFromL0 ) { m_colFromL0Flag = colFromL0; } |
---|
2687 | Void setColRefIdx ( UInt refIdx) { m_colRefIdx = refIdx; } |
---|
2688 | Void setCheckLDC ( Bool b ) { m_bCheckLDC = b; } |
---|
2689 | Void setMvdL1ZeroFlag ( Bool b) { m_bLMvdL1Zero = b; } |
---|
2690 | |
---|
2691 | Bool isIntra () { return m_eSliceType == I_SLICE; } |
---|
2692 | Bool isInterB () { return m_eSliceType == B_SLICE; } |
---|
2693 | Bool isInterP () { return m_eSliceType == P_SLICE; } |
---|
2694 | |
---|
2695 | Void setLambdas ( const Double lambdas[3] ) { for (Int component = 0; component < 3; component++) m_lambdas[component] = lambdas[component]; } |
---|
2696 | const Double* getLambdas() const { return m_lambdas; } |
---|
2697 | |
---|
2698 | Void initEqualRef(); |
---|
2699 | Bool isEqualRef ( RefPicList e, Int iRefIdx1, Int iRefIdx2 ) |
---|
2700 | { |
---|
2701 | if (iRefIdx1 < 0 || iRefIdx2 < 0) return false; |
---|
2702 | return m_abEqualRef[e][iRefIdx1][iRefIdx2]; |
---|
2703 | } |
---|
2704 | |
---|
2705 | Void setEqualRef( RefPicList e, Int iRefIdx1, Int iRefIdx2, Bool b) |
---|
2706 | { |
---|
2707 | m_abEqualRef[e][iRefIdx1][iRefIdx2] = m_abEqualRef[e][iRefIdx2][iRefIdx1] = b; |
---|
2708 | } |
---|
2709 | |
---|
2710 | static Void sortPicList ( TComList<TComPic*>& rcListPic ); |
---|
2711 | Void setList1IdxToList0Idx(); |
---|
2712 | |
---|
2713 | UInt getTLayer () { return m_uiTLayer; } |
---|
2714 | Void setTLayer ( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } |
---|
2715 | |
---|
2716 | Void setTLayerInfo( UInt uiTLayer ); |
---|
2717 | Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum ); |
---|
2718 | Void checkLeadingPictureRestrictions( TComList<TComPic*>& rcListPic ); |
---|
2719 | Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList); |
---|
2720 | #if H_MV |
---|
2721 | Void createInterLayerReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1 ); |
---|
2722 | static Void markIvRefPicsAsShortTerm ( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 ); |
---|
2723 | static Void markCurrPic ( TComPic* currPic ); |
---|
2724 | Void printRefPicList(); |
---|
2725 | #endif |
---|
2726 | Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); |
---|
2727 | Bool isStepwiseTemporalLayerSwitchingPointCandidate( TComList<TComPic*>& rcListPic ); |
---|
2728 | #if ALLOW_RECOVERY_POINT_AS_RAP |
---|
2729 | Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0, Bool bUseRecoveryPoint = false); |
---|
2730 | Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess = 0, Bool bUseRecoveryPoint = false); |
---|
2731 | #else |
---|
2732 | Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0); |
---|
2733 | Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP); |
---|
2734 | #endif |
---|
2735 | |
---|
2736 | Void setMaxNumMergeCand (UInt val ) { m_maxNumMergeCand = val; } |
---|
2737 | UInt getMaxNumMergeCand () { return m_maxNumMergeCand; } |
---|
2738 | |
---|
2739 | #if SETTING_NO_OUT_PIC_PRIOR |
---|
2740 | Void setNoOutputPriorPicsFlag ( Bool val ) { m_noOutputPriorPicsFlag = val; } |
---|
2741 | Bool getNoOutputPriorPicsFlag () { return m_noOutputPriorPicsFlag; } |
---|
2742 | |
---|
2743 | Void setNoRaslOutputFlag ( Bool val ) { m_noRaslOutputFlag = val; } |
---|
2744 | Bool getNoRaslOutputFlag () { return m_noRaslOutputFlag; } |
---|
2745 | |
---|
2746 | Void setHandleCraAsBlaFlag ( Bool val ) { m_handleCraAsBlaFlag = val; } |
---|
2747 | Bool getHandleCraAsBlaFlag () { return m_handleCraAsBlaFlag; } |
---|
2748 | #endif |
---|
2749 | |
---|
2750 | Void setSliceMode ( UInt uiMode ) { m_sliceMode = uiMode; } |
---|
2751 | UInt getSliceMode () { return m_sliceMode; } |
---|
2752 | Void setSliceArgument ( UInt uiArgument ) { m_sliceArgument = uiArgument; } |
---|
2753 | UInt getSliceArgument () { return m_sliceArgument; } |
---|
2754 | Void setSliceCurStartCUAddr ( UInt uiAddr ) { m_sliceCurStartCUAddr = uiAddr; } |
---|
2755 | UInt getSliceCurStartCUAddr () { return m_sliceCurStartCUAddr; } |
---|
2756 | Void setSliceCurEndCUAddr ( UInt uiAddr ) { m_sliceCurEndCUAddr = uiAddr; } |
---|
2757 | UInt getSliceCurEndCUAddr () { return m_sliceCurEndCUAddr; } |
---|
2758 | Void setSliceIdx ( UInt i) { m_sliceIdx = i; } |
---|
2759 | UInt getSliceIdx () { return m_sliceIdx; } |
---|
2760 | Void copySliceInfo (TComSlice *pcSliceSrc); |
---|
2761 | Void setSliceSegmentMode ( UInt uiMode ) { m_sliceSegmentMode = uiMode; } |
---|
2762 | UInt getSliceSegmentMode () { return m_sliceSegmentMode; } |
---|
2763 | Void setSliceSegmentArgument ( UInt uiArgument ) { m_sliceSegmentArgument = uiArgument; } |
---|
2764 | UInt getSliceSegmentArgument () { return m_sliceSegmentArgument; } |
---|
2765 | Void setSliceSegmentCurStartCUAddr ( UInt uiAddr ) { m_sliceSegmentCurStartCUAddr = uiAddr; } |
---|
2766 | UInt getSliceSegmentCurStartCUAddr () { return m_sliceSegmentCurStartCUAddr; } |
---|
2767 | Void setSliceSegmentCurEndCUAddr ( UInt uiAddr ) { m_sliceSegmentCurEndCUAddr = uiAddr; } |
---|
2768 | UInt getSliceSegmentCurEndCUAddr () { return m_sliceSegmentCurEndCUAddr; } |
---|
2769 | Void setNextSlice ( Bool b ) { m_nextSlice = b; } |
---|
2770 | Bool isNextSlice () { return m_nextSlice; } |
---|
2771 | Void setNextSliceSegment ( Bool b ) { m_nextSliceSegment = b; } |
---|
2772 | Bool isNextSliceSegment () { return m_nextSliceSegment; } |
---|
2773 | Void setSliceBits ( UInt uiVal ) { m_sliceBits = uiVal; } |
---|
2774 | UInt getSliceBits () { return m_sliceBits; } |
---|
2775 | Void setSliceSegmentBits ( UInt uiVal ) { m_sliceSegmentBits = uiVal; } |
---|
2776 | UInt getSliceSegmentBits () { return m_sliceSegmentBits; } |
---|
2777 | Void setFinalized ( Bool uiVal ) { m_bFinalized = uiVal; } |
---|
2778 | Bool getFinalized () { return m_bFinalized; } |
---|
2779 | Void setWpScaling ( wpScalingParam wp[2][MAX_NUM_REF][3] ) { memcpy(m_weightPredTable, wp, sizeof(wpScalingParam)*2*MAX_NUM_REF*3); } |
---|
2780 | Void getWpScaling ( RefPicList e, Int iRefIdx, wpScalingParam *&wp); |
---|
2781 | |
---|
2782 | Void resetWpScaling (); |
---|
2783 | Void initWpScaling (); |
---|
2784 | inline Bool applyWP () { return( (m_eSliceType==P_SLICE && m_pcPPS->getUseWP()) || (m_eSliceType==B_SLICE && m_pcPPS->getWPBiPred()) ); } |
---|
2785 | |
---|
2786 | Void setWpAcDcParam ( wpACDCParam wp[3] ) { memcpy(m_weightACDCParam, wp, sizeof(wpACDCParam)*3); } |
---|
2787 | Void getWpAcDcParam ( wpACDCParam *&wp ); |
---|
2788 | Void initWpAcDcParam (); |
---|
2789 | |
---|
2790 | Void setTileLocationCount ( UInt cnt ) { return m_tileByteLocation.resize(cnt); } |
---|
2791 | UInt getTileLocationCount () { return (UInt) m_tileByteLocation.size(); } |
---|
2792 | Void setTileLocation ( Int idx, UInt location ) { assert (idx<m_tileByteLocation.size()); |
---|
2793 | m_tileByteLocation[idx] = location; } |
---|
2794 | Void addTileLocation ( UInt location ) { m_tileByteLocation.push_back(location); } |
---|
2795 | UInt getTileLocation ( Int idx ) { return m_tileByteLocation[idx]; } |
---|
2796 | |
---|
2797 | Void setTileOffstForMultES (UInt uiOffset ) { m_uiTileOffstForMultES = uiOffset; } |
---|
2798 | UInt getTileOffstForMultES () { return m_uiTileOffstForMultES; } |
---|
2799 | Void allocSubstreamSizes ( UInt uiNumSubstreams ); |
---|
2800 | UInt* getSubstreamSizes () { return m_puiSubstreamSizes; } |
---|
2801 | Void setScalingList ( TComScalingList* scalingList ) { m_scalingList = scalingList; } |
---|
2802 | TComScalingList* getScalingList () { return m_scalingList; } |
---|
2803 | Void setDefaultScalingList (); |
---|
2804 | Bool checkDefaultScalingList (); |
---|
2805 | Void setCabacInitFlag ( Bool val ) { m_cabacInitFlag = val; } //!< set CABAC initial flag |
---|
2806 | Bool getCabacInitFlag () { return m_cabacInitFlag; } //!< get CABAC initial flag |
---|
2807 | Void setNumEntryPointOffsets(Int val) { m_numEntryPointOffsets = val; } |
---|
2808 | Int getNumEntryPointOffsets() { return m_numEntryPointOffsets; } |
---|
2809 | Bool getTemporalLayerNonReferenceFlag() { return m_temporalLayerNonReferenceFlag;} |
---|
2810 | Void setTemporalLayerNonReferenceFlag(Bool x) { m_temporalLayerNonReferenceFlag = x;} |
---|
2811 | Void setLFCrossSliceBoundaryFlag ( Bool val ) { m_LFCrossSliceBoundaryFlag = val; } |
---|
2812 | Bool getLFCrossSliceBoundaryFlag () { return m_LFCrossSliceBoundaryFlag;} |
---|
2813 | |
---|
2814 | Void setEnableTMVPFlag ( Bool b ) { m_enableTMVPFlag = b; } |
---|
2815 | Bool getEnableTMVPFlag () { return m_enableTMVPFlag;} |
---|
2816 | #if H_MV |
---|
2817 | Void setAvailableForTMVPRefFlag ( Bool b ) { m_availableForTMVPRefFlag = b; } |
---|
2818 | Bool getAvailableForTMVPRefFlag () { return m_availableForTMVPRefFlag;} |
---|
2819 | #endif |
---|
2820 | |
---|
2821 | #if H_MV |
---|
2822 | Void setLayerId ( Int layerId ) { m_layerId = layerId; } |
---|
2823 | Int getLayerId () { return m_layerId; } |
---|
2824 | Int getLayerIdInVps () { return getVPS()->getLayerIdInVps( m_layerId ); }; |
---|
2825 | Void setViewId ( Int viewId ) { m_viewId = viewId; } |
---|
2826 | Int getViewId () { return m_viewId; } |
---|
2827 | Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } |
---|
2828 | Int getViewIndex () { return m_viewIndex; } |
---|
2829 | #if H_3D |
---|
2830 | #if H_3D_TMVP |
---|
2831 | Void generateAlterRefforTMVP (); |
---|
2832 | Void setAlterRefIdx ( RefPicList e, Int i ) { m_aiAlterRefIdx[e] = i; } |
---|
2833 | Int getAlterRefIdx ( RefPicList e ) { return m_aiAlterRefIdx[e]; } |
---|
2834 | #endif |
---|
2835 | #if H_3D_ARP |
---|
2836 | Int getFirstTRefIdx ( RefPicList e ) { return m_aiFirstTRefIdx[e]; } |
---|
2837 | Void setFirstTRefIdx ( RefPicList e, Int i ) { m_aiFirstTRefIdx[e] = i; } |
---|
2838 | Bool getArpRefPicAvailable( RefPicList e, Int viewIdx) {return m_arpRefPicAvailable[e][getVPS()->getLayerIdInNuh(viewIdx, 0)]; } |
---|
2839 | #endif |
---|
2840 | Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } |
---|
2841 | Bool getIsDepth () { return m_isDepth; } |
---|
2842 | Void setCamparaSlice ( Int** aaiScale = 0, Int** aaiOffset = 0 ); |
---|
2843 | Int* getCodedScale () { return m_aaiCodedScale [0]; } |
---|
2844 | Int* getCodedOffset () { return m_aaiCodedOffset[0]; } |
---|
2845 | Int* getInvCodedScale () { return m_aaiCodedScale [1]; } |
---|
2846 | Int* getInvCodedOffset () { return m_aaiCodedOffset[1]; } |
---|
2847 | #endif |
---|
2848 | #endif |
---|
2849 | #if H_3D |
---|
2850 | Void setIvPicLists( TComPicLists* m_ivPicLists ); |
---|
2851 | Void setDepthToDisparityLUTs(); |
---|
2852 | |
---|
2853 | Int* getDepthToDisparityB( Int refViewIdx ) { return m_depthToDisparityB[ refViewIdx ]; }; |
---|
2854 | Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ refViewIdx ]; }; |
---|
2855 | #if !HHI_TOOL_PARAMETERS_I2_J0107 |
---|
2856 | Bool getVpsDepthModesFlag () { return getVPS()->getVpsDepthModesFlag( getVPS()->getLayerIdInVps( m_layerId ) ); } |
---|
2857 | Bool getIVPFlag () { return getVPS()->getIVPFlag( getVPS()->getLayerIdInVps( m_layerId ) ); } |
---|
2858 | #endif |
---|
2859 | #endif |
---|
2860 | #if H_3D_IC |
---|
2861 | Void setICEnableCandidate( Int* ICEnableCandidate) { m_aICEnableCandidate = ICEnableCandidate; }; |
---|
2862 | Void setICEnableNum( Int* ICEnableNum) { m_aICEnableNum = ICEnableNum; }; |
---|
2863 | Void setICEnableCandidate( UInt layer, Int value) { m_aICEnableCandidate[ layer ] = value; }; |
---|
2864 | Void setICEnableNum( UInt layer, Int value) { m_aICEnableNum[ layer ] = value; }; |
---|
2865 | |
---|
2866 | Int getICEnableCandidate( Int layer){ return m_aICEnableCandidate[ layer ]; }; |
---|
2867 | Int getICEnableNum( Int layer){ return m_aICEnableNum[ layer ]; }; |
---|
2868 | #endif |
---|
2869 | #if H_MV |
---|
2870 | // Additional slice header syntax elements |
---|
2871 | |
---|
2872 | Void setCrossLayerBlaFlag( Bool flag ) { m_crossLayerBlaFlag = flag; } |
---|
2873 | Bool getCrossLayerBlaFlag( ) { return m_crossLayerBlaFlag; } |
---|
2874 | Void checkCrossLayerBlaFlag ( ); |
---|
2875 | |
---|
2876 | #if !H_MV_HLS7_GEN |
---|
2877 | Void setPocResetFlag( Bool flag ) { m_pocResetFlag = flag; } |
---|
2878 | Bool getPocResetFlag( ) { return m_pocResetFlag; } |
---|
2879 | #endif |
---|
2880 | |
---|
2881 | Void setDiscardableFlag( Bool flag ) { m_discardableFlag = flag; } |
---|
2882 | Bool getDiscardableFlag( ) { return m_discardableFlag; } |
---|
2883 | |
---|
2884 | Void setInterLayerPredEnabledFlag( Bool flag ) { m_interLayerPredEnabledFlag = flag; } |
---|
2885 | Bool getInterLayerPredEnabledFlag( ) { return m_interLayerPredEnabledFlag; } |
---|
2886 | |
---|
2887 | Void setNumInterLayerRefPicsMinus1( Int val ) { m_numInterLayerRefPicsMinus1 = val; } |
---|
2888 | Int getNumInterLayerRefPicsMinus1( ) { return m_numInterLayerRefPicsMinus1; } |
---|
2889 | |
---|
2890 | Void setInterLayerPredLayerIdc( Int i, Int val ) { m_interLayerPredLayerIdc[i] = val; } |
---|
2891 | Int getInterLayerPredLayerIdc( Int i ) { return m_interLayerPredLayerIdc[i]; } |
---|
2892 | |
---|
2893 | Void setSliceSegmentHeaderExtensionLength( Int val ) { m_sliceSegmentHeaderExtensionLength = val; } |
---|
2894 | Int getSliceSegmentHeaderExtensionLength( ) { return m_sliceSegmentHeaderExtensionLength; } |
---|
2895 | |
---|
2896 | Void setPocResetIdc( Int val ) { m_pocResetIdc = val; } |
---|
2897 | Int getPocResetIdc( ) { return m_pocResetIdc; } |
---|
2898 | Void checkPocResetIdc( ) { assert( !(getVPS()->getPocLsbNotPresentFlag( getLayerIdInVps() ) ) || !(getSlicePicOrderCntLsb() > 0 ) || !( getPocResetIdc() == 2) ); } |
---|
2899 | |
---|
2900 | Void setPocResetPeriodId( Int val ) { m_pocResetPeriodId = val; } |
---|
2901 | Int getPocResetPeriodId( ) { return m_pocResetPeriodId; } |
---|
2902 | |
---|
2903 | Void setFullPocResetFlag( Bool flag ) { m_fullPocResetFlag = flag; } |
---|
2904 | Bool getFullPocResetFlag( ) { return m_fullPocResetFlag; } |
---|
2905 | |
---|
2906 | Void setPocLsbVal( Int val ) { m_pocLsbVal = val; } |
---|
2907 | Int getPocLsbVal( ) { return m_pocLsbVal; } |
---|
2908 | Void checkPocLsbVal( ) { assert( !(getVPS()->getPocLsbNotPresentFlag( getLayerIdInVps() ) ) || !getFullPocResetFlag() || ( getPocLsbVal() == 0 ) ); } |
---|
2909 | |
---|
2910 | Void setPocMsbValPresentFlag( Bool flag ) { m_pocMsbValPresentFlag = flag; } |
---|
2911 | Bool getPocMsbValPresentFlag( ) { return m_pocMsbValPresentFlag; } |
---|
2912 | |
---|
2913 | Void setPocMsbVal( Int val ) { m_pocMsbVal = val; } |
---|
2914 | Int getPocMsbVal( ) { return m_pocMsbVal; } |
---|
2915 | |
---|
2916 | #if H_MV_HLS_FIX |
---|
2917 | Bool getCraOrBlaPicFlag() { return ( getCraPicFlag() || getBlaPicFlag() ); } |
---|
2918 | Bool getPocMsbValRequiredFlag() { return ( getCraOrBlaPicFlag() && ( getVPS()->getVpsPocLsbAlignedFlag() || getVPS()->getNumDirectRefLayers( getLayerIdInVps() ) == 0 ) ); } |
---|
2919 | #else |
---|
2920 | Bool getPocMsbValRequiredFlag() { return m_pocMsbValRequiredFlag; } |
---|
2921 | Void setPocMsbValRequiredFlag(Bool x) { m_pocMsbValRequiredFlag = x; } |
---|
2922 | #endif |
---|
2923 | |
---|
2924 | |
---|
2925 | UInt getPocLsbValLen() { return getSPS()->getBitsForPOC(); }; //log2_max_pic_order_cnt_lsb_minus4 + 4 |
---|
2926 | |
---|
2927 | Bool getBlaPicFlag () |
---|
2928 | { |
---|
2929 | return getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP |
---|
2930 | || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL |
---|
2931 | || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP; |
---|
2932 | } |
---|
2933 | Bool getCraPicFlag () |
---|
2934 | { |
---|
2935 | return getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA; |
---|
2936 | } |
---|
2937 | |
---|
2938 | // Additional variables derived in slice header semantics |
---|
2939 | |
---|
2940 | #if HHI_DEPENDENCY_SIGNALLING_I1_J0107 |
---|
2941 | #if H_3D |
---|
2942 | Int getNumInterLayerRefPicsMinus1Len( ) { return gCeilLog2( getVPS()->getNumRefListLayers( getLayerId() )); } |
---|
2943 | Int getInterLayerPredLayerIdcLen ( ) { return gCeilLog2( getVPS()->getNumRefListLayers( getLayerId() )); } |
---|
2944 | #else |
---|
2945 | Int getNumInterLayerRefPicsMinus1Len( ) { return gCeilLog2( getVPS()->getNumDirectRefLayers( getLayerId() )); } |
---|
2946 | Int getInterLayerPredLayerIdcLen ( ) { return gCeilLog2( getVPS()->getNumDirectRefLayers( getLayerId() )); } |
---|
2947 | #endif |
---|
2948 | |
---|
2949 | #else |
---|
2950 | Int getNumInterLayerRefPicsMinus1Len( ) { return gCeilLog2( getVPS()->getNumDirectRefLayers( getLayerId() )); } |
---|
2951 | Int getInterLayerPredLayerIdcLen ( ) { return gCeilLog2( getVPS()->getNumDirectRefLayers( getLayerId() )); } |
---|
2952 | #endif |
---|
2953 | |
---|
2954 | Int getRefLayerPicFlag( Int i ); |
---|
2955 | Int getRefLayerPicIdc ( Int j ); |
---|
2956 | Int getNumRefLayerPics( ); |
---|
2957 | |
---|
2958 | Int getNumActiveRefLayerPics( ); |
---|
2959 | |
---|
2960 | Int getNumActiveRefLayerPics0( ) { return (Int) m_refPicSetInterLayer0->size(); }; |
---|
2961 | Int getNumActiveRefLayerPics1( ) { return (Int) m_refPicSetInterLayer1->size(); }; |
---|
2962 | |
---|
2963 | Int getRefPicLayerId ( Int i ); |
---|
2964 | |
---|
2965 | Void setRefPicSetInterLayer ( std::vector<TComPic*>* refPicSetInterLayer0, std::vector<TComPic*>* refPicSetInterLayer1); |
---|
2966 | TComPic* getPicFromRefPicSetInterLayer( Int setIdc, Int layerId ); |
---|
2967 | |
---|
2968 | |
---|
2969 | #if HHI_TOOL_PARAMETERS_I2_J0107 |
---|
2970 | #if H_3D |
---|
2971 | // 3D-HEVC tool parameters |
---|
2972 | Void init3dToolParameters(); |
---|
2973 | Bool getIvMvPredFlag ( ) { return m_ivMvPredFlag ; }; |
---|
2974 | Bool getIvMvScalingFlag ( ) { return m_ivMvScalingFlag ; }; |
---|
2975 | Bool getIvResPredFlag ( ) { return m_ivResPredFlag ; }; |
---|
2976 | Bool getDepthRefinementFlag ( ) { return m_depthRefinementFlag ; }; |
---|
2977 | Bool getViewSynthesisPredFlag ( ) { return m_viewSynthesisPredFlag ; }; |
---|
2978 | Bool getDepthBasedBlkPartFlag ( ) { return m_depthBasedBlkPartFlag ; }; |
---|
2979 | Bool getMpiFlag ( ) { return m_mpiFlag ; }; |
---|
2980 | Bool getIntraContourFlag ( ) { return m_intraContourFlag ; }; |
---|
2981 | Bool getIntraSdcWedgeFlag ( ) { return m_intraSdcWedgeFlag ; }; |
---|
2982 | Bool getQtPredFlag ( ) { return m_qtPredFlag ; }; |
---|
2983 | Bool getInterSdcFlag ( ) { return m_interSdcFlag ; }; |
---|
2984 | Bool getIntraSingleFlag ( ) { return m_intraSingleFlag ; }; |
---|
2985 | |
---|
2986 | Int getMpiSubPbSize ( ) { return m_mpiSubPbSize ; }; |
---|
2987 | Int getSubPbSize ( ) { return m_subPbSize ; }; |
---|
2988 | #endif |
---|
2989 | #endif |
---|
2990 | |
---|
2991 | |
---|
2992 | // Inference |
---|
2993 | Bool inferPocMsbValPresentFlag(); |
---|
2994 | #endif |
---|
2995 | #if !LGE_DDD_REMOVAL_J0042_J0030 |
---|
2996 | #if H_3D_DDD |
---|
2997 | Void initializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx ); |
---|
2998 | Int getDepthFromDV( Int iDV, Int iBaseViewIdx ); |
---|
2999 | #endif |
---|
3000 | #endif |
---|
3001 | #if LGE_DEFAULT_DV_J0046 |
---|
3002 | Int getDefaultRefViewIdx() { return m_iDefaultRefViewIdx; } |
---|
3003 | Void setDefaultRefViewIdx(Int iViewIdx) { m_iDefaultRefViewIdx = iViewIdx; } |
---|
3004 | |
---|
3005 | Bool getDefaultRefViewIdxAvailableFlag() { return m_bDefaultRefViewIdxAvailableFlag; } |
---|
3006 | Void setDefaultRefViewIdxAvailableFlag(Bool bViewIdx) { m_bDefaultRefViewIdxAvailableFlag = bViewIdx; } |
---|
3007 | #endif |
---|
3008 | #if SEC_ARP_VIEW_REF_CHECK_J0037 || SEC_DBBP_VIEW_REF_CHECK_J0037 |
---|
3009 | Void setDefaultRefView( ); |
---|
3010 | #endif |
---|
3011 | |
---|
3012 | protected: |
---|
3013 | TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, |
---|
3014 | Int poc); |
---|
3015 | TComPic* xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb); |
---|
3016 | #if H_MV |
---|
3017 | TComPic* xGetInterLayerRefPic( std::vector<TComPic*>& rcListIlPic, Int layerId ); |
---|
3018 | #endif |
---|
3019 | };// END CLASS DEFINITION TComSlice |
---|
3020 | |
---|
3021 | |
---|
3022 | template <class T> class ParameterSetMap |
---|
3023 | { |
---|
3024 | public: |
---|
3025 | ParameterSetMap(Int maxId) |
---|
3026 | :m_maxId (maxId) |
---|
3027 | {} |
---|
3028 | |
---|
3029 | ~ParameterSetMap() |
---|
3030 | { |
---|
3031 | for (typename std::map<Int,T *>::iterator i = m_paramsetMap.begin(); i!= m_paramsetMap.end(); i++) |
---|
3032 | { |
---|
3033 | delete (*i).second; |
---|
3034 | } |
---|
3035 | } |
---|
3036 | |
---|
3037 | Void storePS(Int psId, T *ps) |
---|
3038 | { |
---|
3039 | assert ( psId < m_maxId ); |
---|
3040 | if ( m_paramsetMap.find(psId) != m_paramsetMap.end() ) |
---|
3041 | { |
---|
3042 | delete m_paramsetMap[psId]; |
---|
3043 | } |
---|
3044 | m_paramsetMap[psId] = ps; |
---|
3045 | } |
---|
3046 | |
---|
3047 | Void mergePSList(ParameterSetMap<T> &rPsList) |
---|
3048 | { |
---|
3049 | for (typename std::map<Int,T *>::iterator i = rPsList.m_paramsetMap.begin(); i!= rPsList.m_paramsetMap.end(); i++) |
---|
3050 | { |
---|
3051 | storePS(i->first, i->second); |
---|
3052 | } |
---|
3053 | rPsList.m_paramsetMap.clear(); |
---|
3054 | } |
---|
3055 | |
---|
3056 | |
---|
3057 | T* getPS(Int psId) |
---|
3058 | { |
---|
3059 | return ( m_paramsetMap.find(psId) == m_paramsetMap.end() ) ? NULL : m_paramsetMap[psId]; |
---|
3060 | } |
---|
3061 | |
---|
3062 | T* getFirstPS() |
---|
3063 | { |
---|
3064 | return (m_paramsetMap.begin() == m_paramsetMap.end() ) ? NULL : m_paramsetMap.begin()->second; |
---|
3065 | } |
---|
3066 | |
---|
3067 | private: |
---|
3068 | std::map<Int,T *> m_paramsetMap; |
---|
3069 | Int m_maxId; |
---|
3070 | }; |
---|
3071 | |
---|
3072 | class ParameterSetManager |
---|
3073 | { |
---|
3074 | public: |
---|
3075 | ParameterSetManager(); |
---|
3076 | virtual ~ParameterSetManager(); |
---|
3077 | |
---|
3078 | //! store sequence parameter set and take ownership of it |
---|
3079 | Void storeVPS(TComVPS *vps) { m_vpsMap.storePS( vps->getVPSId(), vps); }; |
---|
3080 | //! get pointer to existing video parameter set |
---|
3081 | TComVPS* getVPS(Int vpsId) { return m_vpsMap.getPS(vpsId); }; |
---|
3082 | TComVPS* getFirstVPS() { return m_vpsMap.getFirstPS(); }; |
---|
3083 | |
---|
3084 | //! store sequence parameter set and take ownership of it |
---|
3085 | Void storeSPS(TComSPS *sps) { m_spsMap.storePS( sps->getSPSId(), sps); }; |
---|
3086 | //! get pointer to existing sequence parameter set |
---|
3087 | TComSPS* getSPS(Int spsId) { return m_spsMap.getPS(spsId); }; |
---|
3088 | TComSPS* getFirstSPS() { return m_spsMap.getFirstPS(); }; |
---|
3089 | |
---|
3090 | //! store picture parameter set and take ownership of it |
---|
3091 | Void storePPS(TComPPS *pps) { m_ppsMap.storePS( pps->getPPSId(), pps); }; |
---|
3092 | //! get pointer to existing picture parameter set |
---|
3093 | TComPPS* getPPS(Int ppsId) { return m_ppsMap.getPS(ppsId); }; |
---|
3094 | TComPPS* getFirstPPS() { return m_ppsMap.getFirstPS(); }; |
---|
3095 | |
---|
3096 | //! activate a SPS from a active parameter sets SEI message |
---|
3097 | //! \returns true, if activation is successful |
---|
3098 | #if H_MV |
---|
3099 | Bool activateSPSWithSEI(Int SPSId, Int layerId ); |
---|
3100 | #else |
---|
3101 | Bool activateSPSWithSEI(Int SPSId); |
---|
3102 | #endif |
---|
3103 | |
---|
3104 | //! activate a PPS and depending on isIDR parameter also SPS and VPS |
---|
3105 | //! \returns true, if activation is successful |
---|
3106 | #if H_MV |
---|
3107 | Bool activatePPS(Int ppsId, Bool isIRAP, Int layerId ); |
---|
3108 | #else |
---|
3109 | Bool activatePPS(Int ppsId, Bool isIRAP); |
---|
3110 | #endif |
---|
3111 | |
---|
3112 | TComVPS* getActiveVPS(){ return m_vpsMap.getPS(m_activeVPSId); }; |
---|
3113 | #if H_MV |
---|
3114 | TComSPS* getActiveSPS( Int layerId ){ return m_spsMap.getPS( m_activeSPSId[ layerId ] ); }; |
---|
3115 | TComPPS* getActivePPS( Int layerId ){ return m_ppsMap.getPS( m_activePPSId[ layerId ] ); }; |
---|
3116 | #else |
---|
3117 | TComSPS* getActiveSPS(){ return m_spsMap.getPS(m_activeSPSId); }; |
---|
3118 | TComPPS* getActivePPS(){ return m_ppsMap.getPS(m_activePPSId); }; |
---|
3119 | #endif |
---|
3120 | protected: |
---|
3121 | |
---|
3122 | ParameterSetMap<TComVPS> m_vpsMap; |
---|
3123 | ParameterSetMap<TComSPS> m_spsMap; |
---|
3124 | ParameterSetMap<TComPPS> m_ppsMap; |
---|
3125 | |
---|
3126 | Int m_activeVPSId; |
---|
3127 | #if H_MV |
---|
3128 | Int m_activeSPSId[ MAX_NUM_LAYERS ]; |
---|
3129 | Int m_activePPSId[ MAX_NUM_LAYERS ]; |
---|
3130 | #else |
---|
3131 | Int m_activeSPSId; |
---|
3132 | Int m_activePPSId; |
---|
3133 | #endif |
---|
3134 | |
---|
3135 | }; |
---|
3136 | |
---|
3137 | //! \} |
---|
3138 | |
---|
3139 | #endif // __TCOMSLICE__ |
---|