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-2012, ITU/ISO/IEC |
---|
7 | * All rights reserved. |
---|
8 | * |
---|
9 | * Redistribution and use in source and binary forms, with or without |
---|
10 | * modification, are permitted provided that the following conditions are met: |
---|
11 | * |
---|
12 | * * Redistributions of source code must retain the above copyright notice, |
---|
13 | * this list of conditions and the following disclaimer. |
---|
14 | * * Redistributions in binary form must reproduce the above copyright notice, |
---|
15 | * this list of conditions and the following disclaimer in the documentation |
---|
16 | * and/or other materials provided with the distribution. |
---|
17 | * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may |
---|
18 | * be used to endorse or promote products derived from this software without |
---|
19 | * specific prior written permission. |
---|
20 | * |
---|
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
---|
22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS |
---|
25 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
---|
26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
---|
27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
---|
28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
---|
29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
---|
30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
---|
31 | * THE POSSIBILITY OF SUCH DAMAGE. |
---|
32 | */ |
---|
33 | |
---|
34 | /** \file TComSlice.h |
---|
35 | \brief slice header and SPS class (header) |
---|
36 | */ |
---|
37 | |
---|
38 | #ifndef __TCOMSLICE__ |
---|
39 | #define __TCOMSLICE__ |
---|
40 | |
---|
41 | #include <cstring> |
---|
42 | #include <map> |
---|
43 | #include <vector> |
---|
44 | #include "CommonDef.h" |
---|
45 | #include "TComRom.h" |
---|
46 | #include "TComList.h" |
---|
47 | |
---|
48 | //! \ingroup TLibCommon |
---|
49 | //! \{ |
---|
50 | |
---|
51 | class TComPic; |
---|
52 | class TComTrQuant; |
---|
53 | #if DEPTH_MAP_GENERATION |
---|
54 | class TComDepthMapGenerator; |
---|
55 | #endif |
---|
56 | #if HHI_INTER_VIEW_RESIDUAL_PRED |
---|
57 | class TComResidualGenerator; |
---|
58 | #endif |
---|
59 | // ==================================================================================================================== |
---|
60 | // Constants |
---|
61 | // ==================================================================================================================== |
---|
62 | |
---|
63 | /// max number of supported APS in software |
---|
64 | #define MAX_NUM_SUPPORTED_APS 1 |
---|
65 | |
---|
66 | // ==================================================================================================================== |
---|
67 | // Class definition |
---|
68 | // ==================================================================================================================== |
---|
69 | |
---|
70 | #if RPS_IN_SPS |
---|
71 | /// Reference Picture Set class |
---|
72 | class TComReferencePictureSet |
---|
73 | { |
---|
74 | private: |
---|
75 | Int m_numberOfPictures; |
---|
76 | Int m_numberOfNegativePictures; |
---|
77 | Int m_numberOfPositivePictures; |
---|
78 | Int m_numberOfLongtermPictures; |
---|
79 | Int m_deltaPOC[MAX_NUM_REF_PICS]; |
---|
80 | Int m_POC[MAX_NUM_REF_PICS]; |
---|
81 | Bool m_used[MAX_NUM_REF_PICS]; |
---|
82 | Bool m_interRPSPrediction; |
---|
83 | Int m_deltaRIdxMinus1; |
---|
84 | Int m_deltaRPS; |
---|
85 | Int m_numRefIdc; |
---|
86 | Int m_refIdc[MAX_NUM_REF_PICS+1]; |
---|
87 | |
---|
88 | public: |
---|
89 | TComReferencePictureSet(); |
---|
90 | virtual ~TComReferencePictureSet(); |
---|
91 | |
---|
92 | Void setNumberOfPictures(Int numberOfPictures); |
---|
93 | Int getNumberOfPictures(); |
---|
94 | Void setNumberOfNegativePictures(Int number) { m_numberOfNegativePictures = number; } |
---|
95 | Int getNumberOfNegativePictures() { return m_numberOfNegativePictures; } |
---|
96 | Void setNumberOfPositivePictures(Int number) { m_numberOfPositivePictures = number; } |
---|
97 | Int getNumberOfPositivePictures() { return m_numberOfPositivePictures; } |
---|
98 | Void setNumberOfLongtermPictures(Int number) { m_numberOfLongtermPictures = number; } |
---|
99 | Int getNumberOfLongtermPictures() { return m_numberOfLongtermPictures; } |
---|
100 | |
---|
101 | Void setDeltaPOC(Int bufferNum, Int deltaPOC); |
---|
102 | Int getDeltaPOC(Int bufferNum); |
---|
103 | Void setPOC(Int bufferNum, Int deltaPOC); |
---|
104 | Int getPOC(Int bufferNum); |
---|
105 | |
---|
106 | Void setUsed(Int bufferNum, Bool used); |
---|
107 | Int getUsed(Int bufferNum); |
---|
108 | |
---|
109 | Void setInterRPSPrediction(Bool flag) { m_interRPSPrediction = flag; } |
---|
110 | Bool getInterRPSPrediction() { return m_interRPSPrediction; } |
---|
111 | Void setDeltaRIdxMinus1(Int x) { m_deltaRIdxMinus1 = x; } |
---|
112 | Int getDeltaRIdxMinus1() { return m_deltaRIdxMinus1; } |
---|
113 | Void setDeltaRPS(Int x) { m_deltaRPS = x; } |
---|
114 | Int getDeltaRPS() { return m_deltaRPS; } |
---|
115 | Void setNumRefIdc(Int x) { m_numRefIdc = x; } |
---|
116 | Int getNumRefIdc() { return m_numRefIdc; } |
---|
117 | |
---|
118 | Void setRefIdc(Int bufferNum, Int refIdc); |
---|
119 | Int getRefIdc(Int bufferNum); |
---|
120 | |
---|
121 | Void sortDeltaPOC(); |
---|
122 | Void printDeltaPOC(); |
---|
123 | }; |
---|
124 | |
---|
125 | /// Reference Picture Set set class |
---|
126 | class TComRPSList |
---|
127 | { |
---|
128 | private: |
---|
129 | Int m_numberOfReferencePictureSets; |
---|
130 | TComReferencePictureSet* m_referencePictureSets; |
---|
131 | |
---|
132 | public: |
---|
133 | TComRPSList(); |
---|
134 | virtual ~TComRPSList(); |
---|
135 | |
---|
136 | Void create (Int numberOfEntries); |
---|
137 | Void destroy (); |
---|
138 | |
---|
139 | |
---|
140 | TComReferencePictureSet* getReferencePictureSet(Int referencePictureSetNum); |
---|
141 | Int getNumberOfReferencePictureSets(); |
---|
142 | Void setNumberOfReferencePictureSets(Int numberOfReferencePictureSets); |
---|
143 | }; |
---|
144 | #endif |
---|
145 | |
---|
146 | #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 |
---|
147 | /// VPS class |
---|
148 | |
---|
149 | class TComVPS |
---|
150 | { |
---|
151 | private: |
---|
152 | Int m_VPSId; |
---|
153 | UInt m_uiMaxTLayers; |
---|
154 | UInt m_uiMaxLayers; |
---|
155 | Bool m_bTemporalIdNestingFlag; |
---|
156 | |
---|
157 | UInt m_uiExtensionType; |
---|
158 | #if !QC_MVHEVC_B0046 |
---|
159 | Bool m_bDependentFlag[MAX_LAYER_NUM]; |
---|
160 | #else |
---|
161 | UInt m_uiNumHRDParameter; |
---|
162 | UInt m_numAddiLayerOperationPoints; |
---|
163 | UInt m_numAddiProLevelSets; |
---|
164 | UInt m_numDirectRefLayer[MAX_LAYER_NUM]; |
---|
165 | UInt m_numDirectRefID[MAX_LAYER_NUM][MAX_LAYER_NUM]; |
---|
166 | UInt m_numOpLayerIdMinus1[MAX_LAYER_NUM]; |
---|
167 | UInt m_numOpLayerId[MAX_LAYER_NUM][MAX_LAYER_NUM]; |
---|
168 | #endif |
---|
169 | UInt m_uiViewId[MAX_LAYER_NUM]; |
---|
170 | #if !QC_MVHEVC_B0046 |
---|
171 | Bool m_bDepthFlag[MAX_LAYER_NUM]; |
---|
172 | #endif |
---|
173 | Int m_iViewOrderIdx[MAX_LAYER_NUM]; |
---|
174 | #if !QC_MVHEVC_B0046 |
---|
175 | UInt m_uiDependentLayer[MAX_LAYER_NUM]; |
---|
176 | #endif |
---|
177 | |
---|
178 | UInt m_numReorderPics[MAX_TLAYER]; |
---|
179 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
180 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; |
---|
181 | |
---|
182 | public: |
---|
183 | TComVPS(); |
---|
184 | virtual ~TComVPS(); |
---|
185 | |
---|
186 | Int getVPSId () { return m_VPSId; } |
---|
187 | Void setVPSId (Int i) { m_VPSId = i; } |
---|
188 | |
---|
189 | UInt getMaxTLayers () { return m_uiMaxTLayers; } |
---|
190 | Void setMaxTLayers (UInt t) { m_uiMaxTLayers = t; } |
---|
191 | |
---|
192 | UInt getMaxLayers () { return m_uiMaxLayers; } |
---|
193 | Void setMaxLayers (UInt l) { m_uiMaxLayers = l; } |
---|
194 | |
---|
195 | Bool getTemporalNestingFlag () { return m_uiMaxLayers; } |
---|
196 | Void setTemporalNestingFlag (UInt t) { m_bTemporalIdNestingFlag = t; } |
---|
197 | #if !QC_MVHEVC_B0046 |
---|
198 | Void setExtensionType(UInt v) { m_uiExtensionType = v; } |
---|
199 | UInt getExtensionType() { return m_uiExtensionType; } |
---|
200 | |
---|
201 | Void setDependentFlag(Bool d, UInt layer) { m_bDependentFlag[layer] = d; } |
---|
202 | Bool getDependentFlag(UInt layer) { return m_bDependentFlag[layer]; } |
---|
203 | #endif |
---|
204 | Void setViewId(UInt v, UInt layer) { m_uiViewId[layer] = v; } |
---|
205 | UInt getViewId(UInt layer) { return m_uiViewId[layer]; } |
---|
206 | #if !QC_MVHEVC_B0046 |
---|
207 | Void setDepthFlag(Bool d, UInt layer) { m_bDepthFlag[layer] = d; } |
---|
208 | Bool getDepthFlag(UInt layer) { return m_bDepthFlag[layer]; } |
---|
209 | #endif |
---|
210 | Void setViewOrderIdx(Int v, UInt layer) { m_iViewOrderIdx[layer] = v; } |
---|
211 | Int getViewOrderIdx(UInt layer) { return m_iViewOrderIdx[layer]; } |
---|
212 | #if !QC_MVHEVC_B0046 |
---|
213 | Void setDependentLayer(UInt v, UInt layer) { m_uiDependentLayer[layer] = v; } |
---|
214 | UInt getDependentLayer(UInt layer) { return m_uiDependentLayer[layer]; } |
---|
215 | #endif |
---|
216 | Void setNumReorderPics(UInt v, UInt tLayer) { m_numReorderPics[tLayer] = v; } |
---|
217 | UInt getNumReorderPics(UInt tLayer) { return m_numReorderPics[tLayer]; } |
---|
218 | |
---|
219 | Void setMaxDecPicBuffering(UInt v, UInt tLayer) { m_uiMaxDecPicBuffering[tLayer] = v; } |
---|
220 | UInt getMaxDecPicBuffering(UInt tLayer) { return m_uiMaxDecPicBuffering[tLayer]; } |
---|
221 | |
---|
222 | Void setMaxLatencyIncrease(UInt v, UInt tLayer) { m_uiMaxLatencyIncrease[tLayer] = v; } |
---|
223 | UInt getMaxLatencyIncrease(UInt tLayer) { return m_uiMaxLatencyIncrease[tLayer]; } |
---|
224 | #if QC_MVHEVC_B0046 |
---|
225 | Void setNumHRDParameters(UInt n) { m_uiNumHRDParameter = n; } |
---|
226 | UInt getNumHRDParameters() { return m_uiNumHRDParameter; } |
---|
227 | Void setNumDirectRefLayer(UInt n, UInt layer) { m_numDirectRefLayer[layer] = n; }; |
---|
228 | UInt getNumDirectRefLayer(UInt layer) { return m_numDirectRefLayer[layer]; }; |
---|
229 | Void setDirectRefLayerId (UInt n, UInt layer, UInt refId) { m_numDirectRefID[layer][refId] = n; assert(refId < MAX_NUM_REF ); }; |
---|
230 | UInt getDirectRefLayerId ( UInt layer, UInt refId) { return m_numDirectRefID[layer][refId]; }; |
---|
231 | UInt getNumAddiLayerOperationPoints( ) { return m_numAddiLayerOperationPoints; }; |
---|
232 | Void setNumAddiLayerOperationPoints(UInt n) { m_numAddiLayerOperationPoints = n; }; |
---|
233 | Void setNumAddiProLevelSets (UInt n) { m_numAddiProLevelSets = n;} |
---|
234 | UInt getNumAddiProLevelSets ( ) { return m_numAddiProLevelSets;} |
---|
235 | |
---|
236 | Void setNumOpLayerIdMinus1 (UInt n, UInt layer) { m_numOpLayerIdMinus1[layer] = n;} |
---|
237 | UInt getNumOpLayerIdMinus1 (UInt layer ) { return m_numOpLayerIdMinus1[layer];} |
---|
238 | |
---|
239 | Void setNumOpLayerId (UInt n, UInt layer, UInt OpId) { m_numOpLayerId[layer][OpId] = n;} |
---|
240 | UInt getNumOpLayerId (UInt layer, UInt OpId ) { return m_numOpLayerId[layer][OpId];} |
---|
241 | |
---|
242 | #endif |
---|
243 | }; |
---|
244 | |
---|
245 | #endif |
---|
246 | |
---|
247 | /// SPS class |
---|
248 | class TComSPS |
---|
249 | { |
---|
250 | private: |
---|
251 | #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 |
---|
252 | Int m_VPSId; |
---|
253 | #endif |
---|
254 | Int m_SPSId; |
---|
255 | Int m_ProfileIdc; |
---|
256 | Int m_LevelIdc; |
---|
257 | Int m_chromaFormatIdc; |
---|
258 | |
---|
259 | UInt m_uiMaxTLayers; // maximum number of temporal layers |
---|
260 | |
---|
261 | UInt m_uiViewId; |
---|
262 | Int m_iViewOrderIdx; |
---|
263 | Bool m_bDepth; |
---|
264 | UInt m_uiCamParPrecision; |
---|
265 | Bool m_bCamParInSliceHeader; |
---|
266 | Int m_aaiCodedScale [2][MAX_VIEW_NUM]; |
---|
267 | Int m_aaiCodedOffset[2][MAX_VIEW_NUM]; |
---|
268 | |
---|
269 | // Structure |
---|
270 | UInt m_picWidthInLumaSamples; |
---|
271 | UInt m_picHeightInLumaSamples; |
---|
272 | #if PIC_CROPPING |
---|
273 | Bool m_picCroppingFlag; |
---|
274 | Int m_picCropLeftOffset; |
---|
275 | Int m_picCropRightOffset; |
---|
276 | Int m_picCropTopOffset; |
---|
277 | Int m_picCropBottomOffset; |
---|
278 | #else |
---|
279 | Int m_aiPad[2]; |
---|
280 | #endif |
---|
281 | UInt m_uiMaxCUWidth; |
---|
282 | UInt m_uiMaxCUHeight; |
---|
283 | UInt m_uiMaxCUDepth; |
---|
284 | UInt m_uiMinTrDepth; |
---|
285 | UInt m_uiMaxTrDepth; |
---|
286 | #if RPS_IN_SPS |
---|
287 | TComRPSList* m_RPSList; |
---|
288 | Bool m_bLongTermRefsPresent; |
---|
289 | #endif |
---|
290 | #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER |
---|
291 | Int m_numReorderPics[MAX_TLAYER]; |
---|
292 | #else |
---|
293 | Int m_maxNumberOfReferencePictures; |
---|
294 | Int m_numReorderFrames; |
---|
295 | #endif |
---|
296 | |
---|
297 | Int m_iNumberOfUsableInterViewRefs; |
---|
298 | Int m_aiUsableInterViewRefs[MAX_VIEW_NUM]; |
---|
299 | |
---|
300 | // Tool list |
---|
301 | UInt m_uiQuadtreeTULog2MaxSize; |
---|
302 | UInt m_uiQuadtreeTULog2MinSize; |
---|
303 | UInt m_uiQuadtreeTUMaxDepthInter; |
---|
304 | UInt m_uiQuadtreeTUMaxDepthIntra; |
---|
305 | Bool m_usePCM; |
---|
306 | UInt m_pcmLog2MaxSize; |
---|
307 | UInt m_uiPCMLog2MinSize; |
---|
308 | Bool m_bDisInter4x4; |
---|
309 | Bool m_useAMP; |
---|
310 | Bool m_bUseALF; |
---|
311 | #if LCU_SYNTAX_ALF |
---|
312 | Bool m_bALFCoefInSlice; |
---|
313 | #endif |
---|
314 | #if !PIC_CROPPING |
---|
315 | Bool m_bUsePAD; |
---|
316 | #endif |
---|
317 | Bool m_bUseLMChroma; // JL: |
---|
318 | |
---|
319 | Bool m_bUseLComb; |
---|
320 | Bool m_bLCMod; |
---|
321 | Bool m_useNSQT; |
---|
322 | |
---|
323 | #if H0412_REF_PIC_LIST_RESTRICTION |
---|
324 | Bool m_restrictedRefPicListsFlag; |
---|
325 | Bool m_listsModificationPresentFlag; |
---|
326 | #endif |
---|
327 | |
---|
328 | // Parameter |
---|
329 | AMVP_MODE m_aeAMVPMode[MAX_CU_DEPTH]; |
---|
330 | UInt m_uiBitDepth; |
---|
331 | UInt m_uiBitIncrement; |
---|
332 | #if H0736_AVC_STYLE_QP_RANGE |
---|
333 | Int m_qpBDOffsetY; |
---|
334 | Int m_qpBDOffsetC; |
---|
335 | #endif |
---|
336 | |
---|
337 | #if LOSSLESS_CODING |
---|
338 | Bool m_useLossless; |
---|
339 | #endif |
---|
340 | |
---|
341 | UInt m_uiPCMBitDepthLuma; |
---|
342 | UInt m_uiPCMBitDepthChroma; |
---|
343 | Bool m_bPCMFilterDisableFlag; |
---|
344 | |
---|
345 | UInt m_uiBitsForPOC; |
---|
346 | // Max physical transform size |
---|
347 | UInt m_uiMaxTrSize; |
---|
348 | |
---|
349 | Int m_iAMPAcc[MAX_CU_DEPTH]; |
---|
350 | |
---|
351 | Bool m_bLFCrossSliceBoundaryFlag; |
---|
352 | Bool m_bUseSAO; |
---|
353 | #if HHI_MPI |
---|
354 | Bool m_bUseMVI; |
---|
355 | #endif |
---|
356 | |
---|
357 | #if RWTH_SDC_DLT_B0036 |
---|
358 | Bool m_bUseDLT; |
---|
359 | |
---|
360 | UInt m_uiBitsPerDepthValue; |
---|
361 | UInt m_uiNumDepthmapValues; |
---|
362 | UInt* m_uiDepthValue2Idx; |
---|
363 | UInt* m_uiIdx2DepthValue; |
---|
364 | #endif |
---|
365 | |
---|
366 | Bool m_bLFCrossTileBoundaryFlag; |
---|
367 | Int m_iUniformSpacingIdr; |
---|
368 | Int m_iTileBoundaryIndependenceIdr; |
---|
369 | Int m_iNumColumnsMinus1; |
---|
370 | UInt* m_puiColumnWidth; |
---|
371 | Int m_iNumRowsMinus1; |
---|
372 | UInt* m_puiRowHeight; |
---|
373 | |
---|
374 | Bool m_bTemporalIdNestingFlag; // temporal_id_nesting_flag |
---|
375 | |
---|
376 | Bool m_scalingListEnabledFlag; |
---|
377 | #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER |
---|
378 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
379 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; |
---|
380 | #else |
---|
381 | UInt m_uiMaxDecFrameBuffering; |
---|
382 | UInt m_uiMaxLatencyIncrease; |
---|
383 | #endif |
---|
384 | |
---|
385 | Bool m_useDF; |
---|
386 | |
---|
387 | #if TILES_WPP_ENTRY_POINT_SIGNALLING |
---|
388 | UInt m_tilesOrEntropyCodingSyncIdc; |
---|
389 | Int m_numSubstreams; |
---|
390 | #endif |
---|
391 | |
---|
392 | #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX |
---|
393 | Bool m_bUseDMM; |
---|
394 | #endif |
---|
395 | |
---|
396 | #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723 |
---|
397 | Bool m_bUseDMM34; |
---|
398 | #endif |
---|
399 | |
---|
400 | #if OL_QTLIMIT_PREDCODING_B0068 |
---|
401 | Bool m_bUseQTLPC; |
---|
402 | #endif |
---|
403 | |
---|
404 | #if DEPTH_MAP_GENERATION |
---|
405 | UInt m_uiPredDepthMapGeneration; |
---|
406 | UInt m_uiPdmPrecision; |
---|
407 | Int m_aiPdmScaleNomDelta[MAX_VIEW_NUM]; |
---|
408 | Int m_aiPdmOffset [MAX_VIEW_NUM]; |
---|
409 | #endif |
---|
410 | |
---|
411 | #if HHI_INTER_VIEW_MOTION_PRED |
---|
412 | UInt m_uiMultiviewMvPredMode; |
---|
413 | #endif |
---|
414 | #if HHI_INTER_VIEW_RESIDUAL_PRED |
---|
415 | UInt m_uiMultiviewResPredMode; |
---|
416 | #endif |
---|
417 | |
---|
418 | #if DEPTH_MAP_GENERATION |
---|
419 | TComDepthMapGenerator* m_pcDepthMapGenerator; |
---|
420 | #endif |
---|
421 | #if HHI_INTER_VIEW_RESIDUAL_PRED |
---|
422 | TComResidualGenerator* m_pcResidualGenerator; |
---|
423 | #endif |
---|
424 | |
---|
425 | public: |
---|
426 | TComSPS(); |
---|
427 | virtual ~TComSPS(); |
---|
428 | #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 |
---|
429 | Int getVPSId () { return m_VPSId; } |
---|
430 | Void setVPSId (Int i) { m_VPSId = i; } |
---|
431 | #endif |
---|
432 | Int getSPSId () { return m_SPSId; } |
---|
433 | Void setSPSId (Int i) { m_SPSId = i; } |
---|
434 | Int getProfileIdc () { return m_ProfileIdc; } |
---|
435 | Void setProfileIdc (Int i) { m_ProfileIdc = i; } |
---|
436 | Int getLevelIdc () { return m_LevelIdc; } |
---|
437 | Void setLevelIdc (Int i) { m_LevelIdc = i; } |
---|
438 | |
---|
439 | Int getChromaFormatIdc () { return m_chromaFormatIdc; } |
---|
440 | Void setChromaFormatIdc (Int i) { m_chromaFormatIdc = i; } |
---|
441 | |
---|
442 | // structure |
---|
443 | Void setPicWidthInLumaSamples ( UInt u ) { m_picWidthInLumaSamples = u; } |
---|
444 | UInt getPicWidthInLumaSamples () { return m_picWidthInLumaSamples; } |
---|
445 | Void setPicHeightInLumaSamples ( UInt u ) { m_picHeightInLumaSamples = u; } |
---|
446 | UInt getPicHeightInLumaSamples () { return m_picHeightInLumaSamples; } |
---|
447 | |
---|
448 | #if PIC_CROPPING |
---|
449 | Bool getPicCroppingFlag() const { return m_picCroppingFlag; } |
---|
450 | Void setPicCroppingFlag(Bool val) { m_picCroppingFlag = val; } |
---|
451 | Int getPicCropLeftOffset() const { return m_picCropLeftOffset; } |
---|
452 | Void setPicCropLeftOffset(Int val) { m_picCropLeftOffset = val; } |
---|
453 | Int getPicCropRightOffset() const { return m_picCropRightOffset; } |
---|
454 | Void setPicCropRightOffset(Int val) { m_picCropRightOffset = val; } |
---|
455 | Int getPicCropTopOffset() const { return m_picCropTopOffset; } |
---|
456 | Void setPicCropTopOffset(Int val) { m_picCropTopOffset = val; } |
---|
457 | Int getPicCropBottomOffset() const { return m_picCropBottomOffset; } |
---|
458 | Void setPicCropBottomOffset(Int val) { m_picCropBottomOffset = val; } |
---|
459 | #endif |
---|
460 | |
---|
461 | Void setMaxCUWidth ( UInt u ) { m_uiMaxCUWidth = u; } |
---|
462 | UInt getMaxCUWidth () { return m_uiMaxCUWidth; } |
---|
463 | Void setMaxCUHeight ( UInt u ) { m_uiMaxCUHeight = u; } |
---|
464 | UInt getMaxCUHeight () { return m_uiMaxCUHeight; } |
---|
465 | Void setMaxCUDepth ( UInt u ) { m_uiMaxCUDepth = u; } |
---|
466 | UInt getMaxCUDepth () { return m_uiMaxCUDepth; } |
---|
467 | Void setUsePCM ( Bool b ) { m_usePCM = b; } |
---|
468 | Bool getUsePCM () { return m_usePCM; } |
---|
469 | Void setPCMLog2MaxSize ( UInt u ) { m_pcmLog2MaxSize = u; } |
---|
470 | UInt getPCMLog2MaxSize () { return m_pcmLog2MaxSize; } |
---|
471 | Void setPCMLog2MinSize ( UInt u ) { m_uiPCMLog2MinSize = u; } |
---|
472 | UInt getPCMLog2MinSize () { return m_uiPCMLog2MinSize; } |
---|
473 | Void setBitsForPOC ( UInt u ) { m_uiBitsForPOC = u; } |
---|
474 | UInt getBitsForPOC () { return m_uiBitsForPOC; } |
---|
475 | Bool getDisInter4x4() { return m_bDisInter4x4; } |
---|
476 | Void setDisInter4x4 ( Bool b ) { m_bDisInter4x4 = b; } |
---|
477 | Bool getUseAMP() { return m_useAMP; } |
---|
478 | Void setUseAMP( Bool b ) { m_useAMP = b; } |
---|
479 | Void setMinTrDepth ( UInt u ) { m_uiMinTrDepth = u; } |
---|
480 | UInt getMinTrDepth () { return m_uiMinTrDepth; } |
---|
481 | Void setMaxTrDepth ( UInt u ) { m_uiMaxTrDepth = u; } |
---|
482 | UInt getMaxTrDepth () { return m_uiMaxTrDepth; } |
---|
483 | Void setQuadtreeTULog2MaxSize( UInt u ) { m_uiQuadtreeTULog2MaxSize = u; } |
---|
484 | UInt getQuadtreeTULog2MaxSize() { return m_uiQuadtreeTULog2MaxSize; } |
---|
485 | Void setQuadtreeTULog2MinSize( UInt u ) { m_uiQuadtreeTULog2MinSize = u; } |
---|
486 | UInt getQuadtreeTULog2MinSize() { return m_uiQuadtreeTULog2MinSize; } |
---|
487 | Void setQuadtreeTUMaxDepthInter( UInt u ) { m_uiQuadtreeTUMaxDepthInter = u; } |
---|
488 | Void setQuadtreeTUMaxDepthIntra( UInt u ) { m_uiQuadtreeTUMaxDepthIntra = u; } |
---|
489 | UInt getQuadtreeTUMaxDepthInter() { return m_uiQuadtreeTUMaxDepthInter; } |
---|
490 | UInt getQuadtreeTUMaxDepthIntra() { return m_uiQuadtreeTUMaxDepthIntra; } |
---|
491 | #if !PIC_CROPPING |
---|
492 | Void setPad (Int iPad[2]) { m_aiPad[0] = iPad[0]; m_aiPad[1] = iPad[1]; } |
---|
493 | #endif |
---|
494 | #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER |
---|
495 | Void setNumReorderPics(Int i, UInt tlayer) { m_numReorderPics[tlayer] = i; } |
---|
496 | Int getNumReorderPics(UInt tlayer) { return m_numReorderPics[tlayer]; } |
---|
497 | #else |
---|
498 | Void setMaxNumberOfReferencePictures( Int u ) { m_maxNumberOfReferencePictures = u; } |
---|
499 | Int getMaxNumberOfReferencePictures() { return m_maxNumberOfReferencePictures; } |
---|
500 | Void setNumReorderFrames( Int i ) { m_numReorderFrames = i; } |
---|
501 | Int getNumReorderFrames() { return m_numReorderFrames; } |
---|
502 | #endif |
---|
503 | #if RPS_IN_SPS |
---|
504 | Void setRPSList( TComRPSList* RPSList ) { m_RPSList = RPSList; } |
---|
505 | TComRPSList* getRPSList() { return m_RPSList; } |
---|
506 | Bool getLongTermRefsPresent() { return m_bLongTermRefsPresent; } |
---|
507 | Void setLongTermRefsPresent(Bool b) { m_bLongTermRefsPresent=b; } |
---|
508 | #endif |
---|
509 | |
---|
510 | Void setNumberOfUsableInterViewRefs( Int number ) { m_iNumberOfUsableInterViewRefs = number; } |
---|
511 | Int getNumberOfUsableInterViewRefs() { return m_iNumberOfUsableInterViewRefs; } |
---|
512 | Void setUsableInterViewRef( Int pos, Int deltaViewId ) { m_aiUsableInterViewRefs[pos] = deltaViewId; } |
---|
513 | Int getUsableInterViewRef( Int pos ) { return m_aiUsableInterViewRefs[pos]; } |
---|
514 | |
---|
515 | #if !PIC_CROPPING |
---|
516 | Void setPadX ( Int u ) { m_aiPad[0] = u; } |
---|
517 | Void setPadY ( Int u ) { m_aiPad[1] = u; } |
---|
518 | Int getPad ( Int u ) { assert(u < 2); return m_aiPad[u];} |
---|
519 | Int* getPad ( ) { return m_aiPad; } |
---|
520 | #endif |
---|
521 | |
---|
522 | // physical transform |
---|
523 | Void setMaxTrSize ( UInt u ) { m_uiMaxTrSize = u; } |
---|
524 | UInt getMaxTrSize () { return m_uiMaxTrSize; } |
---|
525 | |
---|
526 | // Tool list |
---|
527 | Bool getUseALF () { return m_bUseALF; } |
---|
528 | #if LCU_SYNTAX_ALF |
---|
529 | Void setUseALFCoefInSlice(Bool b) {m_bALFCoefInSlice = b;} |
---|
530 | Bool getUseALFCoefInSlice() {return m_bALFCoefInSlice;} |
---|
531 | #endif |
---|
532 | |
---|
533 | #if !PIC_CROPPING |
---|
534 | Bool getUsePAD () { return m_bUsePAD; } |
---|
535 | Void setUsePAD ( Bool b ) { m_bUsePAD = b; } |
---|
536 | #endif |
---|
537 | Void setUseALF ( Bool b ) { m_bUseALF = b; } |
---|
538 | Void setUseLComb (Bool b) { m_bUseLComb = b; } |
---|
539 | Bool getUseLComb () { return m_bUseLComb; } |
---|
540 | Void setLCMod (Bool b) { m_bLCMod = b; } |
---|
541 | Bool getLCMod () { return m_bLCMod; } |
---|
542 | |
---|
543 | Bool getUseLMChroma () { return m_bUseLMChroma; } |
---|
544 | Void setUseLMChroma ( Bool b ) { m_bUseLMChroma = b; } |
---|
545 | |
---|
546 | #if LOSSLESS_CODING |
---|
547 | Bool getUseLossless () { return m_useLossless; } |
---|
548 | Void setUseLossless ( Bool b ) { m_useLossless = b; } |
---|
549 | #endif |
---|
550 | Bool getUseNSQT() { return m_useNSQT; } |
---|
551 | Void setUseNSQT( Bool b ) { m_useNSQT = b; } |
---|
552 | |
---|
553 | #if H0412_REF_PIC_LIST_RESTRICTION |
---|
554 | Bool getRestrictedRefPicListsFlag () { return m_restrictedRefPicListsFlag; } |
---|
555 | Void setRestrictedRefPicListsFlag ( Bool b ) { m_restrictedRefPicListsFlag = b; } |
---|
556 | Bool getListsModificationPresentFlag () { return m_listsModificationPresentFlag; } |
---|
557 | Void setListsModificationPresentFlag ( Bool b ) { m_listsModificationPresentFlag = b; } |
---|
558 | #endif |
---|
559 | |
---|
560 | // AMVP mode (for each depth) |
---|
561 | AMVP_MODE getAMVPMode ( UInt uiDepth ) { assert(uiDepth < g_uiMaxCUDepth); return m_aeAMVPMode[uiDepth]; } |
---|
562 | Void setAMVPMode ( UInt uiDepth, AMVP_MODE eMode) { assert(uiDepth < g_uiMaxCUDepth); m_aeAMVPMode[uiDepth] = eMode; } |
---|
563 | |
---|
564 | // AMP accuracy |
---|
565 | Int getAMPAcc ( UInt uiDepth ) { return m_iAMPAcc[uiDepth]; } |
---|
566 | Void setAMPAcc ( UInt uiDepth, Int iAccu ) { assert( uiDepth < g_uiMaxCUDepth); m_iAMPAcc[uiDepth] = iAccu; } |
---|
567 | |
---|
568 | // Bit-depth |
---|
569 | UInt getBitDepth () { return m_uiBitDepth; } |
---|
570 | Void setBitDepth ( UInt u ) { m_uiBitDepth = u; } |
---|
571 | UInt getBitIncrement () { return m_uiBitIncrement; } |
---|
572 | Void setBitIncrement ( UInt u ) { m_uiBitIncrement = u; } |
---|
573 | #if H0736_AVC_STYLE_QP_RANGE |
---|
574 | Int getQpBDOffsetY () { return m_qpBDOffsetY; } |
---|
575 | Void setQpBDOffsetY ( Int value ) { m_qpBDOffsetY = value; } |
---|
576 | Int getQpBDOffsetC () { return m_qpBDOffsetC; } |
---|
577 | Void setQpBDOffsetC ( Int value ) { m_qpBDOffsetC = value; } |
---|
578 | #endif |
---|
579 | |
---|
580 | Void setLFCrossSliceBoundaryFlag ( Bool bValue ) { m_bLFCrossSliceBoundaryFlag = bValue; } |
---|
581 | Bool getLFCrossSliceBoundaryFlag () { return m_bLFCrossSliceBoundaryFlag; } |
---|
582 | |
---|
583 | Void setUseDF ( Bool b ) { m_useDF = b; } |
---|
584 | Bool getUseDF () { return m_useDF; } |
---|
585 | |
---|
586 | Void setUseSAO (Bool bVal) {m_bUseSAO = bVal;} |
---|
587 | Bool getUseSAO () {return m_bUseSAO;} |
---|
588 | |
---|
589 | #if HHI_MPI |
---|
590 | Void setUseMVI (Bool bVal) {m_bUseMVI = bVal;} |
---|
591 | Bool getUseMVI () {return m_bUseMVI;} |
---|
592 | #endif |
---|
593 | |
---|
594 | #if RWTH_SDC_DLT_B0036 |
---|
595 | Bool getUseDLT () { return m_bUseDLT; } |
---|
596 | Void setUseDLT ( Bool b ) { m_bUseDLT = b; } |
---|
597 | |
---|
598 | UInt getBitsPerDepthValue() { return m_bUseDLT?m_uiBitsPerDepthValue:g_uiBitDepth; } |
---|
599 | UInt getNumDepthValues() { return m_bUseDLT?m_uiNumDepthmapValues:g_uiIBDI_MAX; } |
---|
600 | UInt depthValue2idx(Pel uiValue) { return m_bUseDLT?m_uiDepthValue2Idx[uiValue]:uiValue; } |
---|
601 | Pel idx2DepthValue(UInt uiIdx) { return m_bUseDLT?m_uiIdx2DepthValue[uiIdx]:uiIdx; } |
---|
602 | Void setDepthLUTs (UInt* uidx2DepthValue = NULL, UInt uiNumDepthValues = 0); |
---|
603 | #endif |
---|
604 | |
---|
605 | UInt getMaxTLayers() { return m_uiMaxTLayers; } |
---|
606 | Void setMaxTLayers( UInt uiMaxTLayers ) { assert( uiMaxTLayers <= MAX_TLAYER ); m_uiMaxTLayers = uiMaxTLayers; } |
---|
607 | |
---|
608 | Bool getTemporalIdNestingFlag() { return m_bTemporalIdNestingFlag; } |
---|
609 | Void setTemporalIdNestingFlag( Bool bValue ) { m_bTemporalIdNestingFlag = bValue; } |
---|
610 | UInt getPCMBitDepthLuma () { return m_uiPCMBitDepthLuma; } |
---|
611 | Void setPCMBitDepthLuma ( UInt u ) { m_uiPCMBitDepthLuma = u; } |
---|
612 | UInt getPCMBitDepthChroma () { return m_uiPCMBitDepthChroma; } |
---|
613 | Void setPCMBitDepthChroma ( UInt u ) { m_uiPCMBitDepthChroma = u; } |
---|
614 | Void setPCMFilterDisableFlag ( Bool bValue ) { m_bPCMFilterDisableFlag = bValue; } |
---|
615 | Bool getPCMFilterDisableFlag () { return m_bPCMFilterDisableFlag; } |
---|
616 | |
---|
617 | Void setLFCrossTileBoundaryFlag ( Bool bValue ) { m_bLFCrossTileBoundaryFlag = bValue; } |
---|
618 | Bool getLFCrossTileBoundaryFlag () { return m_bLFCrossTileBoundaryFlag; } |
---|
619 | Void setUniformSpacingIdr ( Int i ) { m_iUniformSpacingIdr = i; } |
---|
620 | Int getUniformSpacingIdr () { return m_iUniformSpacingIdr; } |
---|
621 | #if !REMOVE_TILE_DEPENDENCE |
---|
622 | Void setTileBoundaryIndependenceIdr ( Int i ) { m_iTileBoundaryIndependenceIdr = i; } |
---|
623 | Int getTileBoundaryIndependenceIdr () { return m_iTileBoundaryIndependenceIdr; } |
---|
624 | #endif |
---|
625 | Void setNumColumnsMinus1 ( Int i ) { m_iNumColumnsMinus1 = i; } |
---|
626 | Int getNumColumnsMinus1 () { return m_iNumColumnsMinus1; } |
---|
627 | Void setColumnWidth ( UInt* columnWidth ) |
---|
628 | { |
---|
629 | if( m_iUniformSpacingIdr == 0 && m_iNumColumnsMinus1 > 0 ) |
---|
630 | { |
---|
631 | m_puiColumnWidth = new UInt[ m_iNumColumnsMinus1 ]; |
---|
632 | |
---|
633 | for(Int i=0; i<m_iNumColumnsMinus1; i++) |
---|
634 | { |
---|
635 | m_puiColumnWidth[i] = columnWidth[i]; |
---|
636 | } |
---|
637 | } |
---|
638 | } |
---|
639 | UInt getColumnWidth (UInt columnIdx) { return *( m_puiColumnWidth + columnIdx ); } |
---|
640 | Void setNumRowsMinus1( Int i ) { m_iNumRowsMinus1 = i; } |
---|
641 | Int getNumRowsMinus1() { return m_iNumRowsMinus1; } |
---|
642 | Void setRowHeight ( UInt* rowHeight ) |
---|
643 | { |
---|
644 | if( m_iUniformSpacingIdr == 0 && m_iNumRowsMinus1 > 0 ) |
---|
645 | { |
---|
646 | m_puiRowHeight = new UInt[ m_iNumRowsMinus1 ]; |
---|
647 | |
---|
648 | for(Int i=0; i<m_iNumRowsMinus1; i++) |
---|
649 | { |
---|
650 | m_puiRowHeight[i] = rowHeight[i]; |
---|
651 | } |
---|
652 | } |
---|
653 | } |
---|
654 | UInt getRowHeight (UInt rowIdx) { return *( m_puiRowHeight + rowIdx ); } |
---|
655 | Bool getScalingListFlag () { return m_scalingListEnabledFlag; } |
---|
656 | Void setScalingListFlag ( Bool b ) { m_scalingListEnabledFlag = b; } |
---|
657 | #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER |
---|
658 | UInt getMaxDecPicBuffering (UInt tlayer) { return m_uiMaxDecPicBuffering[tlayer]; } |
---|
659 | Void setMaxDecPicBuffering ( UInt ui, UInt tlayer ) { m_uiMaxDecPicBuffering[tlayer] = ui; } |
---|
660 | UInt getMaxLatencyIncrease (UInt tlayer) { return m_uiMaxLatencyIncrease[tlayer]; } |
---|
661 | Void setMaxLatencyIncrease ( UInt ui , UInt tlayer) { m_uiMaxLatencyIncrease[tlayer] = ui; } |
---|
662 | #else |
---|
663 | UInt getMaxDecFrameBuffering () { return m_uiMaxDecFrameBuffering; } |
---|
664 | Void setMaxDecFrameBuffering ( UInt ui ) { m_uiMaxDecFrameBuffering = ui; } |
---|
665 | UInt getMaxLatencyIncrease () { return m_uiMaxLatencyIncrease; } |
---|
666 | Void setMaxLatencyIncrease ( UInt ui ) { m_uiMaxLatencyIncrease= ui; } |
---|
667 | #endif |
---|
668 | #if TILES_WPP_ENTRY_POINT_SIGNALLING |
---|
669 | UInt getTilesOrEntropyCodingSyncIdc () { return m_tilesOrEntropyCodingSyncIdc; } |
---|
670 | Void setTilesOrEntropyCodingSyncIdc ( UInt val ) { m_tilesOrEntropyCodingSyncIdc = val; } |
---|
671 | Int getNumSubstreams () { return m_numSubstreams; } |
---|
672 | Void setNumSubstreams ( Int numSubstreams ) { m_numSubstreams = numSubstreams; } |
---|
673 | #endif |
---|
674 | |
---|
675 | #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX |
---|
676 | Bool getUseDMM() { return m_bUseDMM; } |
---|
677 | Void setUseDMM( Bool b ) { m_bUseDMM = b; } |
---|
678 | #endif |
---|
679 | |
---|
680 | #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723 |
---|
681 | Bool getUseDMM34() { return m_bUseDMM34; } |
---|
682 | Void setUseDMM34( Bool b ) { m_bUseDMM34 = b; } |
---|
683 | #endif |
---|
684 | |
---|
685 | #if OL_QTLIMIT_PREDCODING_B0068 |
---|
686 | Void setUseQTLPC( Bool b ) { m_bUseQTLPC = b; } |
---|
687 | Bool getUseQTLPC() { return m_bUseQTLPC; } |
---|
688 | #endif |
---|
689 | |
---|
690 | Void initMultiviewSPS ( UInt uiViewId, Int iViewOrderIdx = 0, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); |
---|
691 | Void initMultiviewSPSDepth ( UInt uiViewId, Int iViewOrderIdx ); |
---|
692 | |
---|
693 | UInt getViewId () { return m_uiViewId; } |
---|
694 | Int getViewOrderIdx () { return m_iViewOrderIdx; } |
---|
695 | Bool isDepth () { return m_bDepth; } |
---|
696 | UInt getCamParPrecision () { return m_uiCamParPrecision; } |
---|
697 | Bool hasCamParInSliceHeader() { return m_bCamParInSliceHeader; } |
---|
698 | Int* getCodedScale () { return m_aaiCodedScale [0]; } |
---|
699 | Int* getCodedOffset () { return m_aaiCodedOffset[0]; } |
---|
700 | Int* getInvCodedScale () { return m_aaiCodedScale [1]; } |
---|
701 | Int* getInvCodedOffset () { return m_aaiCodedOffset[1]; } |
---|
702 | |
---|
703 | |
---|
704 | #if DEPTH_MAP_GENERATION |
---|
705 | Void setPredDepthMapGeneration( UInt uiViewId, Bool bIsDepth, UInt uiPdmGenMode = 0, UInt uiPdmMvPredMode = 0, UInt uiPdmPrec = 0, Int** aaiPdmScaleNomDelta = 0, Int** aaiPdmOffset = 0 ); |
---|
706 | #endif |
---|
707 | #if HHI_INTER_VIEW_RESIDUAL_PRED |
---|
708 | Void setMultiviewResPredMode ( UInt uiResPrdMode ) { m_uiMultiviewResPredMode = uiResPrdMode; } |
---|
709 | #endif |
---|
710 | |
---|
711 | #if DEPTH_MAP_GENERATION |
---|
712 | UInt getPredDepthMapGeneration() { return m_uiPredDepthMapGeneration; } |
---|
713 | UInt getPdmPrecision () { return m_uiPdmPrecision; } |
---|
714 | Int* getPdmScaleNomDelta () { return m_aiPdmScaleNomDelta; } |
---|
715 | Int* getPdmOffset () { return m_aiPdmOffset; } |
---|
716 | #endif |
---|
717 | |
---|
718 | #if HHI_INTER_VIEW_MOTION_PRED |
---|
719 | UInt getMultiviewMvPredMode () { return m_uiMultiviewMvPredMode; } |
---|
720 | #endif |
---|
721 | #if HHI_INTER_VIEW_RESIDUAL_PRED |
---|
722 | UInt getMultiviewResPredMode () { return m_uiMultiviewResPredMode; } |
---|
723 | #endif |
---|
724 | |
---|
725 | #if DEPTH_MAP_GENERATION |
---|
726 | Void setDepthMapGenerator( TComDepthMapGenerator* pcDepthMapGenerator ) { m_pcDepthMapGenerator = pcDepthMapGenerator; } |
---|
727 | TComDepthMapGenerator* getDepthMapGenerator() { return m_pcDepthMapGenerator; } |
---|
728 | #endif |
---|
729 | #if HHI_INTER_VIEW_RESIDUAL_PRED |
---|
730 | Void setResidualGenerator( TComResidualGenerator* pcResidualGenerator ) { m_pcResidualGenerator = pcResidualGenerator; } |
---|
731 | TComResidualGenerator* getResidualGenerator() { return m_pcResidualGenerator; } |
---|
732 | #endif |
---|
733 | }; |
---|
734 | |
---|
735 | #if !RPS_IN_SPS |
---|
736 | /// Reference Picture Set class |
---|
737 | class TComReferencePictureSet |
---|
738 | { |
---|
739 | private: |
---|
740 | Int m_numberOfPictures; |
---|
741 | Int m_numberOfNegativePictures; |
---|
742 | Int m_numberOfPositivePictures; |
---|
743 | Int m_numberOfLongtermPictures; |
---|
744 | Int m_deltaPOC[MAX_NUM_REF_PICS]; |
---|
745 | Int m_POC[MAX_NUM_REF_PICS]; |
---|
746 | Bool m_used[MAX_NUM_REF_PICS]; |
---|
747 | Bool m_interRPSPrediction; |
---|
748 | Int m_deltaRIdxMinus1; |
---|
749 | Int m_deltaRPS; |
---|
750 | Int m_numRefIdc; |
---|
751 | Int m_refIdc[MAX_NUM_REF_PICS+1]; |
---|
752 | |
---|
753 | public: |
---|
754 | TComReferencePictureSet(); |
---|
755 | virtual ~TComReferencePictureSet(); |
---|
756 | |
---|
757 | Void setUsed(Int bufferNum, Bool used); |
---|
758 | Void setDeltaPOC(Int bufferNum, Int deltaPOC); |
---|
759 | Void setPOC(Int bufferNum, Int deltaPOC); |
---|
760 | Void setNumberOfPictures(Int numberOfPictures); |
---|
761 | |
---|
762 | Int getUsed(Int bufferNum); |
---|
763 | Int getDeltaPOC(Int bufferNum); |
---|
764 | Int getPOC(Int bufferNum); |
---|
765 | Int getNumberOfPictures(); |
---|
766 | |
---|
767 | Void setNumberOfNegativePictures(Int number) { m_numberOfNegativePictures = number; } |
---|
768 | Int getNumberOfNegativePictures() { return m_numberOfNegativePictures; } |
---|
769 | Void setNumberOfPositivePictures(Int number) { m_numberOfPositivePictures = number; } |
---|
770 | Int getNumberOfPositivePictures() { return m_numberOfPositivePictures; } |
---|
771 | Void setNumberOfLongtermPictures(Int number) { m_numberOfLongtermPictures = number; } |
---|
772 | Int getNumberOfLongtermPictures() { return m_numberOfLongtermPictures; } |
---|
773 | |
---|
774 | Void setInterRPSPrediction(Bool flag) { m_interRPSPrediction = flag; } |
---|
775 | Bool getInterRPSPrediction() { return m_interRPSPrediction; } |
---|
776 | Void setDeltaRIdxMinus1(Int x) { m_deltaRIdxMinus1 = x; } |
---|
777 | Int getDeltaRIdxMinus1() { return m_deltaRIdxMinus1; } |
---|
778 | Void setDeltaRPS(Int x) { m_deltaRPS = x; } |
---|
779 | Int getDeltaRPS() { return m_deltaRPS; } |
---|
780 | Void setNumRefIdc(Int x) { m_numRefIdc = x; } |
---|
781 | Int getNumRefIdc() { return m_numRefIdc; } |
---|
782 | |
---|
783 | Void setRefIdc(Int bufferNum, Int refIdc); |
---|
784 | Int getRefIdc(Int bufferNum); |
---|
785 | |
---|
786 | Void sortDeltaPOC(); |
---|
787 | Void printDeltaPOC(); |
---|
788 | }; |
---|
789 | |
---|
790 | /// Reference Picture Set set class |
---|
791 | class TComRPSList |
---|
792 | { |
---|
793 | private: |
---|
794 | Int m_numberOfReferencePictureSets; |
---|
795 | TComReferencePictureSet* m_referencePictureSets; |
---|
796 | |
---|
797 | public: |
---|
798 | TComRPSList(); |
---|
799 | virtual ~TComRPSList(); |
---|
800 | |
---|
801 | Void create (Int numberOfEntries); |
---|
802 | Void destroy (); |
---|
803 | |
---|
804 | |
---|
805 | TComReferencePictureSet* getReferencePictureSet(Int referencePictureSetNum); |
---|
806 | Int getNumberOfReferencePictureSets(); |
---|
807 | Void setNumberOfReferencePictureSets(Int numberOfReferencePictureSets); |
---|
808 | }; |
---|
809 | #endif |
---|
810 | |
---|
811 | /// Reference Picture Lists class |
---|
812 | class TComRefPicListModification |
---|
813 | { |
---|
814 | private: |
---|
815 | UInt m_bRefPicListModificationFlagL0; |
---|
816 | UInt m_bRefPicListModificationFlagL1; |
---|
817 | #if !H0137_0138_LIST_MODIFICATION |
---|
818 | UInt m_uiNumberOfRefPicListModificationsL0; |
---|
819 | UInt m_uiNumberOfRefPicListModificationsL1; |
---|
820 | UInt m_ListIdcL0[32]; |
---|
821 | #endif |
---|
822 | UInt m_RefPicSetIdxL0[32]; |
---|
823 | #if !H0137_0138_LIST_MODIFICATION |
---|
824 | UInt m_ListIdcL1[32]; |
---|
825 | #endif |
---|
826 | UInt m_RefPicSetIdxL1[32]; |
---|
827 | |
---|
828 | public: |
---|
829 | TComRefPicListModification(); |
---|
830 | virtual ~TComRefPicListModification(); |
---|
831 | |
---|
832 | Void create (); |
---|
833 | Void destroy (); |
---|
834 | |
---|
835 | Bool getRefPicListModificationFlagL0() { return m_bRefPicListModificationFlagL0; } |
---|
836 | Void setRefPicListModificationFlagL0(Bool flag) { m_bRefPicListModificationFlagL0 = flag; } |
---|
837 | Bool getRefPicListModificationFlagL1() { return m_bRefPicListModificationFlagL1; } |
---|
838 | Void setRefPicListModificationFlagL1(Bool flag) { m_bRefPicListModificationFlagL1 = flag; } |
---|
839 | #if !H0137_0138_LIST_MODIFICATION |
---|
840 | UInt getNumberOfRefPicListModificationsL0() { return m_uiNumberOfRefPicListModificationsL0; } |
---|
841 | Void setNumberOfRefPicListModificationsL0(UInt nr) { m_uiNumberOfRefPicListModificationsL0 = nr; } |
---|
842 | UInt getNumberOfRefPicListModificationsL1() { return m_uiNumberOfRefPicListModificationsL1; } |
---|
843 | Void setNumberOfRefPicListModificationsL1(UInt nr) { m_uiNumberOfRefPicListModificationsL1 = nr; } |
---|
844 | Void setListIdcL0(UInt idx, UInt idc) { m_ListIdcL0[idx] = idc; } |
---|
845 | UInt getListIdcL0(UInt idx) { return m_ListIdcL0[idx]; } |
---|
846 | #endif |
---|
847 | Void setRefPicSetIdxL0(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL0[idx] = refPicSetIdx; } |
---|
848 | UInt getRefPicSetIdxL0(UInt idx) { return m_RefPicSetIdxL0[idx]; } |
---|
849 | #if !H0137_0138_LIST_MODIFICATION |
---|
850 | Void setListIdcL1(UInt idx, UInt idc) { m_ListIdcL1[idx] = idc; } |
---|
851 | UInt getListIdcL1(UInt idx) { return m_ListIdcL1[idx]; } |
---|
852 | #endif |
---|
853 | Void setRefPicSetIdxL1(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL1[idx] = refPicSetIdx; } |
---|
854 | UInt getRefPicSetIdxL1(UInt idx) { return m_RefPicSetIdxL1[idx]; } |
---|
855 | }; |
---|
856 | |
---|
857 | /// PPS class |
---|
858 | class TComPPS |
---|
859 | { |
---|
860 | private: |
---|
861 | Int m_PPSId; // pic_parameter_set_id |
---|
862 | Int m_SPSId; // seq_parameter_set_id |
---|
863 | Int m_picInitQPMinus26; |
---|
864 | Bool m_useDQP; |
---|
865 | Bool m_bConstrainedIntraPred; // constrained_intra_pred_flag |
---|
866 | |
---|
867 | // access channel |
---|
868 | TComSPS* m_pcSPS; |
---|
869 | #if !RPS_IN_SPS |
---|
870 | TComRPSList* m_RPSList; |
---|
871 | #endif |
---|
872 | UInt m_uiMaxCuDQPDepth; |
---|
873 | UInt m_uiMinCuDQPSize; |
---|
874 | |
---|
875 | Int m_iChromaQpOffset; |
---|
876 | Int m_iChromaQpOffset2nd; |
---|
877 | |
---|
878 | #if !RPS_IN_SPS |
---|
879 | Bool m_bLongTermRefsPresent; |
---|
880 | #endif |
---|
881 | |
---|
882 | #if !H0566_TLA |
---|
883 | UInt m_uiNumTlayerSwitchingFlags; // num_temporal_layer_switching_point_flags |
---|
884 | Bool m_abTLayerSwitchingFlag[ MAX_TLAYER ]; // temporal_layer_switching_point_flag |
---|
885 | #endif |
---|
886 | |
---|
887 | Int m_iSliceGranularity; |
---|
888 | |
---|
889 | Bool m_bUseWeightPred; // Use of Weighting Prediction (P_SLICE) |
---|
890 | UInt m_uiBiPredIdc; // Use of Weighting Bi-Prediction (B_SLICE) |
---|
891 | |
---|
892 | #if H0388 |
---|
893 | Bool m_OutputFlagPresentFlag; // Indicates the presence of output_flag in slice header |
---|
894 | #endif |
---|
895 | |
---|
896 | Int m_iTileBehaviorControlPresentFlag; |
---|
897 | Bool m_bLFCrossTileBoundaryFlag; |
---|
898 | Int m_iColumnRowInfoPresent; |
---|
899 | Int m_iUniformSpacingIdr; |
---|
900 | #if !REMOVE_TILE_DEPENDENCE |
---|
901 | Int m_iTileBoundaryIndependenceIdr; |
---|
902 | #endif |
---|
903 | Int m_iNumColumnsMinus1; |
---|
904 | UInt* m_puiColumnWidth; |
---|
905 | Int m_iNumRowsMinus1; |
---|
906 | UInt* m_puiRowHeight; |
---|
907 | |
---|
908 | Int m_iEntropyCodingMode; // !!! in PPS now, but also remains in slice header! |
---|
909 | #if !WPP_SIMPLIFICATION |
---|
910 | Int m_iEntropyCodingSynchro; |
---|
911 | Bool m_bCabacIstateReset; |
---|
912 | #endif |
---|
913 | Int m_iNumSubstreams; |
---|
914 | |
---|
915 | Bool m_enableTMVPFlag; |
---|
916 | |
---|
917 | #if MULTIBITS_DATA_HIDING |
---|
918 | Int m_signHideFlag; |
---|
919 | Int m_signHidingThreshold; |
---|
920 | #endif |
---|
921 | |
---|
922 | #if CABAC_INIT_FLAG |
---|
923 | Bool m_cabacInitPresentFlag; |
---|
924 | UInt m_encCABACTableIdx; // Used to transmit table selection across slices |
---|
925 | #if FIX_POZNAN_CABAC_INIT_FLAG |
---|
926 | UInt m_encPrevPOC; |
---|
927 | #endif |
---|
928 | #endif |
---|
929 | #if DBL_CONTROL |
---|
930 | Bool m_DeblockingFilterControlPresent; |
---|
931 | #endif |
---|
932 | #if PARALLEL_MERGE |
---|
933 | UInt m_log2ParallelMergeLevelMinus2; |
---|
934 | #endif |
---|
935 | public: |
---|
936 | TComPPS(); |
---|
937 | virtual ~TComPPS(); |
---|
938 | |
---|
939 | Int getPPSId () { return m_PPSId; } |
---|
940 | Void setPPSId (Int i) { m_PPSId = i; } |
---|
941 | Int getSPSId () { return m_SPSId; } |
---|
942 | Void setSPSId (Int i) { m_SPSId = i; } |
---|
943 | |
---|
944 | Int getSliceGranularity() { return m_iSliceGranularity; } |
---|
945 | Void setSliceGranularity( Int i ) { m_iSliceGranularity = i; } |
---|
946 | Int getPicInitQPMinus26 () { return m_picInitQPMinus26; } |
---|
947 | Void setPicInitQPMinus26 ( Int i ) { m_picInitQPMinus26 = i; } |
---|
948 | Bool getUseDQP () { return m_useDQP; } |
---|
949 | Void setUseDQP ( Bool b ) { m_useDQP = b; } |
---|
950 | Bool getConstrainedIntraPred () { return m_bConstrainedIntraPred; } |
---|
951 | Void setConstrainedIntraPred ( Bool b ) { m_bConstrainedIntraPred = b; } |
---|
952 | |
---|
953 | #if !H0566_TLA |
---|
954 | UInt getNumTLayerSwitchingFlags() { return m_uiNumTlayerSwitchingFlags; } |
---|
955 | Void setNumTLayerSwitchingFlags( UInt uiNumTlayerSwitchingFlags ) { assert( uiNumTlayerSwitchingFlags < MAX_TLAYER ); m_uiNumTlayerSwitchingFlags = uiNumTlayerSwitchingFlags; } |
---|
956 | |
---|
957 | Bool getTLayerSwitchingFlag( UInt uiTLayer ) { assert( uiTLayer < MAX_TLAYER ); return m_abTLayerSwitchingFlag[ uiTLayer ]; } |
---|
958 | Void setTLayerSwitchingFlag( UInt uiTLayer, Bool bValue ) { m_abTLayerSwitchingFlag[ uiTLayer ] = bValue; } |
---|
959 | #endif |
---|
960 | |
---|
961 | #if !RPS_IN_SPS |
---|
962 | Bool getLongTermRefsPresent() { return m_bLongTermRefsPresent; } |
---|
963 | Void setLongTermRefsPresent(Bool b) { m_bLongTermRefsPresent=b; } |
---|
964 | #endif |
---|
965 | Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
966 | TComSPS* getSPS () { return m_pcSPS; } |
---|
967 | #if !RPS_IN_SPS |
---|
968 | Void setRPSList ( TComRPSList* RPSList ) { m_RPSList = RPSList; } |
---|
969 | TComRPSList* getRPSList () { return m_RPSList; } |
---|
970 | #endif |
---|
971 | Void setMaxCuDQPDepth ( UInt u ) { m_uiMaxCuDQPDepth = u; } |
---|
972 | UInt getMaxCuDQPDepth () { return m_uiMaxCuDQPDepth;} |
---|
973 | Void setMinCuDQPSize ( UInt u ) { m_uiMinCuDQPSize = u; } |
---|
974 | UInt getMinCuDQPSize () { return m_uiMinCuDQPSize; } |
---|
975 | |
---|
976 | Void setChromaQpOffset ( Int i ) { m_iChromaQpOffset = i; } |
---|
977 | Int getChromaQpOffset () { return m_iChromaQpOffset;} |
---|
978 | Void setChromaQpOffset2nd( Int i ) { m_iChromaQpOffset2nd = i; } |
---|
979 | Int getChromaQpOffset2nd() { return m_iChromaQpOffset2nd;} |
---|
980 | |
---|
981 | Bool getUseWP () { return m_bUseWeightPred; } |
---|
982 | UInt getWPBiPredIdc () { return m_uiBiPredIdc; } |
---|
983 | |
---|
984 | Void setUseWP ( Bool b ) { m_bUseWeightPred = b; } |
---|
985 | Void setWPBiPredIdc ( UInt u ) { m_uiBiPredIdc = u; } |
---|
986 | |
---|
987 | #if H0388 |
---|
988 | Void setOutputFlagPresentFlag( Bool b ) { m_OutputFlagPresentFlag = b; } |
---|
989 | Bool getOutputFlagPresentFlag() { return m_OutputFlagPresentFlag; } |
---|
990 | #endif |
---|
991 | |
---|
992 | Void setTileBehaviorControlPresentFlag ( Int i ) { m_iTileBehaviorControlPresentFlag = i; } |
---|
993 | Int getTileBehaviorControlPresentFlag () { return m_iTileBehaviorControlPresentFlag; } |
---|
994 | Void setLFCrossTileBoundaryFlag ( Bool bValue ) { m_bLFCrossTileBoundaryFlag = bValue; } |
---|
995 | Bool getLFCrossTileBoundaryFlag () { return m_bLFCrossTileBoundaryFlag; } |
---|
996 | Void setColumnRowInfoPresent ( Int i ) { m_iColumnRowInfoPresent = i; } |
---|
997 | Int getColumnRowInfoPresent () { return m_iColumnRowInfoPresent; } |
---|
998 | Void setUniformSpacingIdr ( Int i ) { m_iUniformSpacingIdr = i; } |
---|
999 | Int getUniformSpacingIdr () { return m_iUniformSpacingIdr; } |
---|
1000 | #if !REMOVE_TILE_DEPENDENCE |
---|
1001 | Void setTileBoundaryIndependenceIdr ( Int i ) { m_iTileBoundaryIndependenceIdr = i; } |
---|
1002 | Int getTileBoundaryIndependenceIdr () { return m_iTileBoundaryIndependenceIdr; } |
---|
1003 | #endif |
---|
1004 | Void setNumColumnsMinus1 ( Int i ) { m_iNumColumnsMinus1 = i; } |
---|
1005 | Int getNumColumnsMinus1 () { return m_iNumColumnsMinus1; } |
---|
1006 | Void setColumnWidth ( UInt* columnWidth ) |
---|
1007 | { |
---|
1008 | if( m_iUniformSpacingIdr == 0 && m_iNumColumnsMinus1 > 0 ) |
---|
1009 | { |
---|
1010 | m_puiColumnWidth = new UInt[ m_iNumColumnsMinus1 ]; |
---|
1011 | |
---|
1012 | for(Int i=0; i<m_iNumColumnsMinus1; i++) |
---|
1013 | { |
---|
1014 | m_puiColumnWidth[i] = columnWidth[i]; |
---|
1015 | } |
---|
1016 | } |
---|
1017 | } |
---|
1018 | UInt getColumnWidth (UInt columnIdx) { return *( m_puiColumnWidth + columnIdx ); } |
---|
1019 | Void setNumRowsMinus1( Int i ) { m_iNumRowsMinus1 = i; } |
---|
1020 | Int getNumRowsMinus1() { return m_iNumRowsMinus1; } |
---|
1021 | Void setRowHeight ( UInt* rowHeight ) |
---|
1022 | { |
---|
1023 | if( m_iUniformSpacingIdr == 0 && m_iNumRowsMinus1 > 0 ) |
---|
1024 | { |
---|
1025 | m_puiRowHeight = new UInt[ m_iNumRowsMinus1 ]; |
---|
1026 | |
---|
1027 | for(Int i=0; i<m_iNumRowsMinus1; i++) |
---|
1028 | { |
---|
1029 | m_puiRowHeight[i] = rowHeight[i]; |
---|
1030 | } |
---|
1031 | } |
---|
1032 | } |
---|
1033 | UInt getRowHeight (UInt rowIdx) { return *( m_puiRowHeight + rowIdx ); } |
---|
1034 | Void setEntropyCodingMode(Int iEntropyCodingMode) { m_iEntropyCodingMode = iEntropyCodingMode; } |
---|
1035 | Int getEntropyCodingMode() { return m_iEntropyCodingMode; } |
---|
1036 | #if !WPP_SIMPLIFICATION |
---|
1037 | Void setEntropyCodingSynchro(Int iEntropyCodingSynchro) { m_iEntropyCodingSynchro = iEntropyCodingSynchro; } |
---|
1038 | Int getEntropyCodingSynchro() { return m_iEntropyCodingSynchro; } |
---|
1039 | Void setCabacIstateReset(Bool bCabacIstateReset) { m_bCabacIstateReset = bCabacIstateReset; } |
---|
1040 | Bool getCabacIstateReset() { return m_bCabacIstateReset; } |
---|
1041 | #endif |
---|
1042 | Void setNumSubstreams(Int iNumSubstreams) { m_iNumSubstreams = iNumSubstreams; } |
---|
1043 | Int getNumSubstreams() { return m_iNumSubstreams; } |
---|
1044 | |
---|
1045 | #if MULTIBITS_DATA_HIDING |
---|
1046 | Void setSignHideFlag( Int signHideFlag ) { m_signHideFlag = signHideFlag; } |
---|
1047 | Void setTSIG( Int tsig ) { m_signHidingThreshold = tsig; } |
---|
1048 | Int getSignHideFlag() { return m_signHideFlag; } |
---|
1049 | Int getTSIG() { return m_signHidingThreshold; } |
---|
1050 | #endif |
---|
1051 | |
---|
1052 | Void setEnableTMVPFlag( Bool b ) { m_enableTMVPFlag = b; } |
---|
1053 | Bool getEnableTMVPFlag() { return m_enableTMVPFlag; } |
---|
1054 | |
---|
1055 | #if CABAC_INIT_FLAG |
---|
1056 | Void setCabacInitPresentFlag( Bool flag ) { m_cabacInitPresentFlag = flag; } |
---|
1057 | Void setEncCABACTableIdx( Int idx ) { m_encCABACTableIdx = idx; } |
---|
1058 | Bool getCabacInitPresentFlag() { return m_cabacInitPresentFlag; } |
---|
1059 | UInt getEncCABACTableIdx() { return m_encCABACTableIdx; } |
---|
1060 | #if FIX_POZNAN_CABAC_INIT_FLAG |
---|
1061 | Void setEncPrevPOC(UInt uiPOC) { m_encPrevPOC = uiPOC; } |
---|
1062 | UInt getEncPrevPOC() { return m_encPrevPOC; } |
---|
1063 | #endif |
---|
1064 | #endif |
---|
1065 | #if DBL_CONTROL |
---|
1066 | Void setDeblockingFilterControlPresent ( Bool bValue ) { m_DeblockingFilterControlPresent = bValue; } |
---|
1067 | Bool getDeblockingFilterControlPresent () { return m_DeblockingFilterControlPresent; } |
---|
1068 | #endif |
---|
1069 | #if PARALLEL_MERGE |
---|
1070 | UInt getLog2ParallelMergeLevelMinus2 () { return m_log2ParallelMergeLevelMinus2; } |
---|
1071 | Void setLog2ParallelMergeLevelMinus2 (UInt mrgLevel) { m_log2ParallelMergeLevelMinus2 = mrgLevel; } |
---|
1072 | #endif |
---|
1073 | }; |
---|
1074 | |
---|
1075 | /// SCALING_LIST class |
---|
1076 | class TComScalingList |
---|
1077 | { |
---|
1078 | public: |
---|
1079 | TComScalingList(); |
---|
1080 | virtual ~TComScalingList(); |
---|
1081 | Void setScalingListPresentFlag (Bool b) { m_scalingListPresentFlag = b; } |
---|
1082 | Bool getScalingListPresentFlag () { return m_scalingListPresentFlag; } |
---|
1083 | Int* getScalingListAddress (UInt sizeId, UInt listId) { return m_scalingListCoef[sizeId][listId]; } //!< get matrix coefficient |
---|
1084 | Bool checkPredMode (UInt sizeId, UInt listId); |
---|
1085 | Void setRefMatrixId (UInt sizeId, UInt listId, UInt u) { m_refMatrixId[sizeId][listId] = u; } //!< set reference matrix ID |
---|
1086 | UInt getRefMatrixId (UInt sizeId, UInt listId) { return m_refMatrixId[sizeId][listId]; } //!< get reference matrix ID |
---|
1087 | Int* getScalingListDefaultAddress (UInt sizeId, UInt listId); //!< get default matrix coefficient |
---|
1088 | Void processDefaultMarix (UInt sizeId, UInt listId); |
---|
1089 | #if SCALING_LIST |
---|
1090 | Void setScalingListDC (UInt sizeId, UInt listId, UInt u) { m_scalingListDC[sizeId][listId] = u; } //!< set DC value |
---|
1091 | Int getScalingListDC (UInt sizeId, UInt listId) { return m_scalingListDC[sizeId][listId]; } //!< get DC value |
---|
1092 | Void checkDcOfMatrix (); |
---|
1093 | Void setUseDefaultScalingMatrixFlag (UInt sizeId, UInt listId, Bool b) { m_useDefaultScalingMatrixFlag[sizeId][listId] = b; } //!< set default matrix enabled/disabled in each matrix |
---|
1094 | Bool getUseDefaultScalingMatrixFlag (UInt sizeId, UInt listId) { return m_useDefaultScalingMatrixFlag[sizeId][listId]; } //!< get default matrix enabled/disabled in each matrix |
---|
1095 | #endif |
---|
1096 | Void processRefMatrix (UInt sizeId, UInt listId , UInt refListId ); |
---|
1097 | Bool xParseScalingList (char* pchFile); |
---|
1098 | |
---|
1099 | private: |
---|
1100 | Void init (); |
---|
1101 | Void destroy (); |
---|
1102 | #if SCALING_LIST |
---|
1103 | Int m_scalingListDC [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< the DC value of the matrix coefficient for 16x16 |
---|
1104 | Bool m_useDefaultScalingMatrixFlag [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< UseDefaultScalingMatrixFlag |
---|
1105 | #endif |
---|
1106 | UInt m_refMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< RefMatrixID |
---|
1107 | Bool m_scalingListPresentFlag; //!< flag for using default matrix |
---|
1108 | UInt m_predMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< reference list index |
---|
1109 | Int *m_scalingListCoef [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< quantization matrix |
---|
1110 | }; |
---|
1111 | |
---|
1112 | /// APS class |
---|
1113 | class TComAPS |
---|
1114 | { |
---|
1115 | public: |
---|
1116 | TComAPS(); |
---|
1117 | virtual ~TComAPS(); |
---|
1118 | |
---|
1119 | Void setAPSID (Int iID) {m_apsID = iID; } //!< set APS ID |
---|
1120 | Int getAPSID () {return m_apsID; } //!< get APS ID |
---|
1121 | Void setSaoEnabled (Bool bVal) {m_bSaoEnabled = bVal; } //!< set SAO enabled/disabled in APS |
---|
1122 | Bool getSaoEnabled () {return m_bSaoEnabled; } //!< get SAO enabled/disabled in APS |
---|
1123 | Void setAlfEnabled (Bool bVal) {m_bAlfEnabled = bVal; } //!< set ALF enabled/disabled in APS |
---|
1124 | Bool getAlfEnabled () {return m_bAlfEnabled; } //!< get ALF enabled/disabled in APS |
---|
1125 | |
---|
1126 | #if LCU_SYNTAX_ALF |
---|
1127 | AlfParamSet* getAlfParam () {return m_alfParamSet;} |
---|
1128 | #else |
---|
1129 | ALFParam* getAlfParam () {return m_pAlfParam; } //!< get ALF parameters in APS |
---|
1130 | #endif |
---|
1131 | SAOParam* getSaoParam () {return m_pSaoParam; } //!< get SAO parameters in APS |
---|
1132 | |
---|
1133 | Void createSaoParam(); //!< create SAO parameter object |
---|
1134 | Void destroySaoParam(); //!< destroy SAO parameter object |
---|
1135 | |
---|
1136 | Void createAlfParam(); //!< create ALF parameter object |
---|
1137 | Void destroyAlfParam(); //!< destroy ALF parameter object |
---|
1138 | |
---|
1139 | Void setLoopFilterOffsetInAPS(Bool val) {m_loopFilterOffsetInAPS = val; } //!< set offset for deblocking filter enabled/disabled in APS |
---|
1140 | Bool getLoopFilterOffsetInAPS() {return m_loopFilterOffsetInAPS; } //!< get offset for deblocking filter enabled/disabled in APS |
---|
1141 | Void setLoopFilterDisable(Bool val) {m_loopFilterDisable = val; } //!< set offset for deblocking filter disabled |
---|
1142 | Bool getLoopFilterDisable() {return m_loopFilterDisable; } //!< get offset for deblocking filter disabled |
---|
1143 | Void setLoopFilterBetaOffset(Int val) {m_loopFilterBetaOffsetDiv2 = val; } //!< set beta offset for deblocking filter |
---|
1144 | Int getLoopFilterBetaOffset() {return m_loopFilterBetaOffsetDiv2; } //!< get beta offset for deblocking filter |
---|
1145 | Void setLoopFilterTcOffset(Int val) {m_loopFilterTcOffsetDiv2 = val; } //!< set tc offset for deblocking filter |
---|
1146 | Int getLoopFilterTcOffset() {return m_loopFilterTcOffsetDiv2; } //!< get tc offset for deblocking filter |
---|
1147 | |
---|
1148 | Void createScalingList(); |
---|
1149 | Void destroyScalingList(); |
---|
1150 | Void setScalingListEnabled (Bool bVal) { m_scalingListEnabled = bVal; } //!< set ScalingList enabled/disabled in APS |
---|
1151 | Bool getScalingListEnabled () { return m_scalingListEnabled; } //!< get ScalingList enabled/disabled in APS |
---|
1152 | TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in APS |
---|
1153 | #if SAO_UNIT_INTERLEAVING |
---|
1154 | Bool getSaoInterleavingFlag() {return m_saoInterleavingFlag;} //!< get SAO interleaving flag in APS |
---|
1155 | Void setSaoInterleavingFlag(Bool bVal) {m_saoInterleavingFlag = bVal;} //!< set SAO interleaving flag in APS |
---|
1156 | #endif |
---|
1157 | |
---|
1158 | private: |
---|
1159 | Int m_apsID; //!< APS ID |
---|
1160 | Bool m_bSaoEnabled; //!< SAO enabled/disabled in APS (true for enabled) |
---|
1161 | Bool m_bAlfEnabled; //!< ALF enabled/disabled in APS (true for enabled) |
---|
1162 | SAOParam* m_pSaoParam; //!< SAO parameter object pointer |
---|
1163 | #if LCU_SYNTAX_ALF |
---|
1164 | AlfParamSet* m_alfParamSet; |
---|
1165 | #else |
---|
1166 | ALFParam* m_pAlfParam; //!< ALF parameter object pointer |
---|
1167 | #endif |
---|
1168 | Bool m_loopFilterOffsetInAPS; //< offset for deblocking filter in 0 = slice header, 1 = APS |
---|
1169 | Bool m_loopFilterDisable; //< Deblocking filter enabled/disabled in APS |
---|
1170 | Int m_loopFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
1171 | Int m_loopFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
1172 | Bool m_scalingListEnabled; //!< ScalingList enabled/disabled in APS (true for enabled) |
---|
1173 | TComScalingList* m_scalingList; //!< ScalingList class pointer |
---|
1174 | #if SAO_UNIT_INTERLEAVING |
---|
1175 | Bool m_saoInterleavingFlag; //!< SAO interleaving flag |
---|
1176 | #endif |
---|
1177 | |
---|
1178 | public: |
---|
1179 | TComAPS& operator= (const TComAPS& src); //!< "=" operator for APS object |
---|
1180 | }; |
---|
1181 | |
---|
1182 | typedef struct { |
---|
1183 | // Explicit weighted prediction parameters parsed in slice header, |
---|
1184 | // or Implicit weighted prediction parameters (8 bits depth values). |
---|
1185 | Bool bPresentFlag; |
---|
1186 | UInt uiLog2WeightDenom; |
---|
1187 | Int iWeight; |
---|
1188 | Int iOffset; |
---|
1189 | |
---|
1190 | // Weighted prediction scaling values built from above parameters (bitdepth scaled): |
---|
1191 | Int w, o, offset, shift, round; |
---|
1192 | } wpScalingParam; |
---|
1193 | |
---|
1194 | typedef struct { |
---|
1195 | Int64 iAC; |
---|
1196 | Int64 iDC; |
---|
1197 | } wpACDCParam; |
---|
1198 | |
---|
1199 | /// slice header class |
---|
1200 | class TComSlice |
---|
1201 | { |
---|
1202 | |
---|
1203 | private: |
---|
1204 | // Bitstream writing |
---|
1205 | Int m_iAPSId; //!< APS ID in slice header |
---|
1206 | bool m_alfEnabledFlag; |
---|
1207 | bool m_saoEnabledFlag; |
---|
1208 | #if SAO_UNIT_INTERLEAVING |
---|
1209 | bool m_saoInterleavingFlag; ///< SAO interleaving flag |
---|
1210 | bool m_saoEnabledFlagCb; ///< SAO Cb enabled flag |
---|
1211 | bool m_saoEnabledFlagCr; ///< SAO Cr enabled flag |
---|
1212 | #endif |
---|
1213 | Int m_iPPSId; ///< picture parameter set ID |
---|
1214 | #if H0388 |
---|
1215 | Bool m_PicOutputFlag; ///< pic_output_flag |
---|
1216 | #endif |
---|
1217 | Int m_iPOC; |
---|
1218 | Int m_iLastIDR; |
---|
1219 | static Int m_prevPOC; |
---|
1220 | TComReferencePictureSet *m_pcRPS; |
---|
1221 | TComReferencePictureSet m_LocalRPS; |
---|
1222 | Int m_iBDidx; |
---|
1223 | Int m_iCombinationBDidx; |
---|
1224 | Bool m_bCombineWithReferenceFlag; |
---|
1225 | TComRefPicListModification m_RefPicListModification; |
---|
1226 | NalUnitType m_eNalUnitType; ///< Nal unit type for the slice |
---|
1227 | NalUnitType m_eNalUnitTypeBaseViewMvc; ///< Nal unit type of the base view slice for multiview coding |
---|
1228 | SliceType m_eSliceType; |
---|
1229 | Int m_iSliceQp; |
---|
1230 | #if ADAPTIVE_QP_SELECTION |
---|
1231 | Int m_iSliceQpBase; |
---|
1232 | #endif |
---|
1233 | Bool m_bLoopFilterDisable; |
---|
1234 | Bool m_loopFilterOffsetInAPS; |
---|
1235 | Bool m_inheritDblParamFromAPS; //< offsets for deblocking filter inherit from APS |
---|
1236 | Int m_loopFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
1237 | Int m_loopFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
1238 | |
---|
1239 | Int m_aiNumRefIdx [3]; // for multiple reference of current slice |
---|
1240 | |
---|
1241 | Int m_iRefIdxOfLC[2][MAX_NUM_REF_LC]; |
---|
1242 | Int m_eListIdFromIdxOfLC[MAX_NUM_REF_LC]; |
---|
1243 | Int m_iRefIdxFromIdxOfLC[MAX_NUM_REF_LC]; |
---|
1244 | Int m_iRefIdxOfL1FromRefIdxOfL0[MAX_NUM_REF_LC]; |
---|
1245 | Int m_iRefIdxOfL0FromRefIdxOfL1[MAX_NUM_REF_LC]; |
---|
1246 | Bool m_bRefPicListModificationFlagLC; |
---|
1247 | Bool m_bRefPicListCombinationFlag; |
---|
1248 | |
---|
1249 | Bool m_bCheckLDC; |
---|
1250 | |
---|
1251 | // Data |
---|
1252 | Int m_iSliceQpDelta; |
---|
1253 | TComPic* m_apcRefPicList [2][MAX_NUM_REF+1]; |
---|
1254 | Int m_aiRefPOCList [2][MAX_NUM_REF+1]; |
---|
1255 | Int m_aiRefViewIdList[2][MAX_NUM_REF+1]; |
---|
1256 | TComPic* m_pcTexturePic; |
---|
1257 | Int m_iDepth; |
---|
1258 | |
---|
1259 | // referenced slice? |
---|
1260 | Bool m_bRefenced; |
---|
1261 | |
---|
1262 | // access channel |
---|
1263 | #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 |
---|
1264 | TComVPS* m_pcVPS; |
---|
1265 | #endif |
---|
1266 | #if QC_IV_AS_LT_B0046 |
---|
1267 | Bool m_bWasLongTerm[2][MAX_NUM_REF+1]; //was long-term picture |
---|
1268 | #endif |
---|
1269 | TComSPS* m_pcSPS; |
---|
1270 | TComPPS* m_pcPPS; |
---|
1271 | TComPic* m_pcPic; |
---|
1272 | #if ADAPTIVE_QP_SELECTION |
---|
1273 | TComTrQuant* m_pcTrQuant; |
---|
1274 | #endif |
---|
1275 | TComAPS* m_pcAPS; //!< pointer to APS parameter object |
---|
1276 | |
---|
1277 | UInt m_uiColDir; // direction to get colocated CUs |
---|
1278 | |
---|
1279 | #if COLLOCATED_REF_IDX |
---|
1280 | UInt m_colRefIdx; |
---|
1281 | #endif |
---|
1282 | |
---|
1283 | #if ALF_CHROMA_LAMBDA || SAO_CHROMA_LAMBDA |
---|
1284 | Double m_dLambdaLuma; |
---|
1285 | Double m_dLambdaChroma; |
---|
1286 | #else |
---|
1287 | Double m_dLambda; |
---|
1288 | #endif |
---|
1289 | |
---|
1290 | Bool m_abEqualRef [2][MAX_NUM_REF][MAX_NUM_REF]; |
---|
1291 | |
---|
1292 | Bool m_bNoBackPredFlag; |
---|
1293 | Bool m_bRefIdxCombineCoding; |
---|
1294 | |
---|
1295 | UInt m_uiTLayer; |
---|
1296 | Bool m_bTLayerSwitchingFlag; |
---|
1297 | |
---|
1298 | UInt m_uiSliceMode; |
---|
1299 | UInt m_uiSliceArgument; |
---|
1300 | UInt m_uiSliceCurStartCUAddr; |
---|
1301 | UInt m_uiSliceCurEndCUAddr; |
---|
1302 | UInt m_uiSliceIdx; |
---|
1303 | UInt m_uiEntropySliceMode; |
---|
1304 | UInt m_uiEntropySliceArgument; |
---|
1305 | UInt m_uiEntropySliceCurStartCUAddr; |
---|
1306 | UInt m_uiEntropySliceCurEndCUAddr; |
---|
1307 | Bool m_bNextSlice; |
---|
1308 | Bool m_bNextEntropySlice; |
---|
1309 | UInt m_uiSliceBits; |
---|
1310 | UInt m_uiEntropySliceCounter; |
---|
1311 | Bool m_bFinalized; |
---|
1312 | |
---|
1313 | wpScalingParam m_weightPredTable[2][MAX_NUM_REF][3]; // [REF_PIC_LIST_0 or REF_PIC_LIST_1][refIdx][0:Y, 1:U, 2:V] |
---|
1314 | wpACDCParam m_weightACDCParam[3]; // [0:Y, 1:U, 2:V] |
---|
1315 | wpScalingParam m_weightPredTableLC[2*MAX_NUM_REF][3]; // [refIdxLC][0:Y, 1:U, 2:V] |
---|
1316 | |
---|
1317 | UInt *m_uiTileByteLocation; |
---|
1318 | UInt m_uiTileCount; |
---|
1319 | Int m_iTileMarkerFlag; |
---|
1320 | UInt m_uiTileOffstForMultES; |
---|
1321 | |
---|
1322 | UInt* m_puiSubstreamSizes; |
---|
1323 | TComScalingList* m_scalingList; //!< pointer of quantization matrix |
---|
1324 | #if CABAC_INIT_FLAG |
---|
1325 | Bool m_cabacInitFlag; |
---|
1326 | #else |
---|
1327 | Int m_cabacInitIdc; |
---|
1328 | #endif |
---|
1329 | |
---|
1330 | #if H0111_MVD_L1_ZERO |
---|
1331 | Bool m_bLMvdL1Zero; |
---|
1332 | #endif |
---|
1333 | #if TILES_WPP_ENTRY_POINT_SIGNALLING |
---|
1334 | Int m_numEntryPointOffsets; |
---|
1335 | #endif |
---|
1336 | |
---|
1337 | Int m_viewId; |
---|
1338 | Bool m_isDepth; |
---|
1339 | Int m_aaiCodedScale [2][MAX_VIEW_NUM]; |
---|
1340 | Int m_aaiCodedOffset[2][MAX_VIEW_NUM]; |
---|
1341 | |
---|
1342 | #if SONY_COLPIC_AVAILABILITY|QC_MVHEVC_B0046 |
---|
1343 | Int m_iViewOrderIdx; |
---|
1344 | #endif |
---|
1345 | #if LGE_ILLUCOMP_B0045 |
---|
1346 | Bool m_bApplyIC; |
---|
1347 | #endif |
---|
1348 | |
---|
1349 | #if MERL_VSP_C0152 |
---|
1350 | TComPic* m_apcRefPicBaseTxt; |
---|
1351 | TComPic* m_apcRefPicBaseDepth; |
---|
1352 | Int* m_aiShiftLUT; |
---|
1353 | Int m_iShiftPrec; |
---|
1354 | #endif |
---|
1355 | |
---|
1356 | public: |
---|
1357 | TComSlice(); |
---|
1358 | virtual ~TComSlice(); |
---|
1359 | |
---|
1360 | Void initSlice (); |
---|
1361 | Void initTiles(); |
---|
1362 | |
---|
1363 | #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 |
---|
1364 | Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } |
---|
1365 | TComVPS* getVPS () { return m_pcVPS; } |
---|
1366 | #endif |
---|
1367 | #if QC_IV_AS_LT_B0046 |
---|
1368 | Void setWasLongTerm( Bool lt, RefPicList e, Int iRefIdx ) { m_bWasLongTerm[e][iRefIdx] = lt; } |
---|
1369 | Bool getWasLongTerm( RefPicList e, Int iRefIdx ) { return m_bWasLongTerm[e][iRefIdx] ; } |
---|
1370 | #endif |
---|
1371 | |
---|
1372 | Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
1373 | TComSPS* getSPS () { return m_pcSPS; } |
---|
1374 | |
---|
1375 | Void setPPS ( TComPPS* pcPPS ) { assert(pcPPS!=NULL); m_pcPPS = pcPPS; m_iPPSId = pcPPS->getPPSId(); } |
---|
1376 | TComPPS* getPPS () { return m_pcPPS; } |
---|
1377 | |
---|
1378 | #if ADAPTIVE_QP_SELECTION |
---|
1379 | Void setTrQuant ( TComTrQuant* pcTrQuant ) { m_pcTrQuant = pcTrQuant; } |
---|
1380 | TComTrQuant* getTrQuant () { return m_pcTrQuant; } |
---|
1381 | #endif |
---|
1382 | |
---|
1383 | Void setPPSId ( Int PPSId ) { m_iPPSId = PPSId; } |
---|
1384 | Int getPPSId () { return m_iPPSId; } |
---|
1385 | Void setAPS ( TComAPS* pcAPS ) { m_pcAPS = pcAPS; } //!< set APS pointer |
---|
1386 | TComAPS* getAPS () { return m_pcAPS; } //!< get APS pointer |
---|
1387 | Void setAPSId ( Int Id) { m_iAPSId =Id; } //!< set APS ID |
---|
1388 | Int getAPSId () { return m_iAPSId; } //!< get APS ID |
---|
1389 | #if H0388 |
---|
1390 | Void setPicOutputFlag( Bool b ) { m_PicOutputFlag = b; } |
---|
1391 | Bool getPicOutputFlag() { return m_PicOutputFlag; } |
---|
1392 | #endif |
---|
1393 | Void setAlfEnabledFlag(Bool s) {m_alfEnabledFlag =s; } |
---|
1394 | Bool getAlfEnabledFlag() { return m_alfEnabledFlag; } |
---|
1395 | Void setSaoEnabledFlag(Bool s) {m_saoEnabledFlag =s; } |
---|
1396 | Bool getSaoEnabledFlag() { return m_saoEnabledFlag; } |
---|
1397 | #if SAO_UNIT_INTERLEAVING |
---|
1398 | Void setSaoInterleavingFlag(Bool s) {m_saoInterleavingFlag =s; } //!< set SAO interleaving flag |
---|
1399 | Bool getSaoInterleavingFlag() { return m_saoInterleavingFlag; } //!< get SAO interleaving flag |
---|
1400 | Void setSaoEnabledFlagCb(Bool s) {m_saoEnabledFlagCb =s; } //!< set SAO Cb enabled flag |
---|
1401 | Bool getSaoEnabledFlagCb() { return m_saoEnabledFlagCb; } //!< get SAO Cb enabled flag |
---|
1402 | Void setSaoEnabledFlagCr(Bool s) {m_saoEnabledFlagCr =s; } //!< set SAO Cr enabled flag |
---|
1403 | Bool getSaoEnabledFlagCr() { return m_saoEnabledFlagCr; } //!< get SAO Cr enabled flag |
---|
1404 | #endif |
---|
1405 | Void setRPS ( TComReferencePictureSet *pcRPS ) { m_pcRPS = pcRPS; } |
---|
1406 | TComReferencePictureSet* getRPS () { return m_pcRPS; } |
---|
1407 | TComReferencePictureSet* getLocalRPS () { return &m_LocalRPS; } |
---|
1408 | |
---|
1409 | Void setRPSidx ( Int iBDidx ) { m_iBDidx = iBDidx; } |
---|
1410 | Int getRPSidx () { return m_iBDidx; } |
---|
1411 | Void setCombinationBDidx ( Int iCombinationBDidx ) { m_iCombinationBDidx = iCombinationBDidx; } |
---|
1412 | Int getCombinationBDidx () { return m_iCombinationBDidx; } |
---|
1413 | Void setCombineWithReferenceFlag ( Bool bCombineWithReferenceFlag ) { m_bCombineWithReferenceFlag = bCombineWithReferenceFlag; } |
---|
1414 | Bool getCombineWithReferenceFlag () { return m_bCombineWithReferenceFlag; } |
---|
1415 | Int getPrevPOC () { return m_prevPOC; } |
---|
1416 | |
---|
1417 | TComRefPicListModification* getRefPicListModification() { return &m_RefPicListModification; } |
---|
1418 | Void setLastIDR(Int iIDRPOC) { m_iLastIDR = iIDRPOC; } |
---|
1419 | Int getLastIDR() { return m_iLastIDR; } |
---|
1420 | SliceType getSliceType () { return m_eSliceType; } |
---|
1421 | Int getPOC () { return m_iPOC; } |
---|
1422 | Int getSliceQp () { return m_iSliceQp; } |
---|
1423 | #if ADAPTIVE_QP_SELECTION |
---|
1424 | Int getSliceQpBase () { return m_iSliceQpBase; } |
---|
1425 | #endif |
---|
1426 | Int getSliceQpDelta () { return m_iSliceQpDelta; } |
---|
1427 | Bool getLoopFilterDisable() { return m_bLoopFilterDisable; } |
---|
1428 | Bool getLoopFilterOffsetInAPS() { return m_loopFilterOffsetInAPS;} |
---|
1429 | Bool getInheritDblParamFromAPS() { return m_inheritDblParamFromAPS; } |
---|
1430 | Int getLoopFilterBetaOffset() { return m_loopFilterBetaOffsetDiv2; } |
---|
1431 | Int getLoopFilterTcOffset() { return m_loopFilterTcOffsetDiv2; } |
---|
1432 | |
---|
1433 | Int getNumRefIdx ( RefPicList e ) { return m_aiNumRefIdx[e]; } |
---|
1434 | TComPic* getPic () { return m_pcPic; } |
---|
1435 | TComPic* getRefPic ( RefPicList e, Int iRefIdx) { return m_apcRefPicList[e][iRefIdx]; } |
---|
1436 | Int getRefPOC ( RefPicList e, Int iRefIdx) { return m_aiRefPOCList[e][iRefIdx]; } |
---|
1437 | Int getRefViewId ( RefPicList e, Int iRefIdx) { return m_aiRefViewIdList[e][iRefIdx]; } |
---|
1438 | TComPic* getTexturePic () const { return m_pcTexturePic; } |
---|
1439 | #if SONY_COLPIC_AVAILABILITY |
---|
1440 | Int getViewOrderIdx () { return m_iViewOrderIdx; } |
---|
1441 | #endif |
---|
1442 | Int getDepth () { return m_iDepth; } |
---|
1443 | UInt getColDir () { return m_uiColDir; } |
---|
1444 | #if COLLOCATED_REF_IDX |
---|
1445 | Bool getColRefIdx () { return m_colRefIdx; } |
---|
1446 | Void checkColRefIdx (UInt curSliceIdx, TComPic* pic); |
---|
1447 | #endif |
---|
1448 | Bool getCheckLDC () { return m_bCheckLDC; } |
---|
1449 | #if H0111_MVD_L1_ZERO |
---|
1450 | Bool getMvdL1ZeroFlag () { return m_bLMvdL1Zero; } |
---|
1451 | #endif |
---|
1452 | Int getRefIdxOfLC (RefPicList e, Int iRefIdx) { return m_iRefIdxOfLC[e][iRefIdx]; } |
---|
1453 | Int getListIdFromIdxOfLC(Int iRefIdx) { return m_eListIdFromIdxOfLC[iRefIdx]; } |
---|
1454 | Int getRefIdxFromIdxOfLC(Int iRefIdx) { return m_iRefIdxFromIdxOfLC[iRefIdx]; } |
---|
1455 | Int getRefIdxOfL0FromRefIdxOfL1(Int iRefIdx) { return m_iRefIdxOfL0FromRefIdxOfL1[iRefIdx];} |
---|
1456 | Int getRefIdxOfL1FromRefIdxOfL0(Int iRefIdx) { return m_iRefIdxOfL1FromRefIdxOfL0[iRefIdx];} |
---|
1457 | Bool getRefPicListModificationFlagLC() {return m_bRefPicListModificationFlagLC;} |
---|
1458 | Void setRefPicListModificationFlagLC(Bool bflag) {m_bRefPicListModificationFlagLC=bflag;} |
---|
1459 | Bool getRefPicListCombinationFlag() {return m_bRefPicListCombinationFlag;} |
---|
1460 | Void setRefPicListCombinationFlag(Bool bflag) {m_bRefPicListCombinationFlag=bflag;} |
---|
1461 | Void setListIdFromIdxOfLC(Int iRefIdx, UInt uiVal) { m_eListIdFromIdxOfLC[iRefIdx]=uiVal; } |
---|
1462 | Void setRefIdxFromIdxOfLC(Int iRefIdx, UInt uiVal) { m_iRefIdxFromIdxOfLC[iRefIdx]=uiVal; } |
---|
1463 | Void setRefIdxOfLC (RefPicList e, Int iRefIdx, Int RefIdxLC) { m_iRefIdxOfLC[e][iRefIdx]=RefIdxLC;} |
---|
1464 | |
---|
1465 | Void setReferenced(Bool b) { m_bRefenced = b; } |
---|
1466 | Bool isReferenced() { return m_bRefenced; } |
---|
1467 | |
---|
1468 | Void setPOC ( Int i ) { m_iPOC = i; if(getTLayer()==0) m_prevPOC=i; } |
---|
1469 | Void setNalUnitType ( NalUnitType e ) { m_eNalUnitType = e; } |
---|
1470 | NalUnitType getNalUnitType () { return m_eNalUnitType; } |
---|
1471 | Void setNalUnitTypeBaseViewMvc ( NalUnitType e ) { m_eNalUnitTypeBaseViewMvc = e; } |
---|
1472 | NalUnitType getNalUnitTypeBaseViewMvc() { return m_eNalUnitTypeBaseViewMvc; } |
---|
1473 | Void checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, TComList<TComPic*>& rcListPic); |
---|
1474 | Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic); |
---|
1475 | Void setSliceType ( SliceType e ) { m_eSliceType = e; } |
---|
1476 | Void setSliceQp ( Int i ) { m_iSliceQp = i; } |
---|
1477 | #if ADAPTIVE_QP_SELECTION |
---|
1478 | Void setSliceQpBase ( Int i ) { m_iSliceQpBase = i; } |
---|
1479 | #endif |
---|
1480 | Void setSliceQpDelta ( Int i ) { m_iSliceQpDelta = i; } |
---|
1481 | Void setLoopFilterDisable( Bool b ) { m_bLoopFilterDisable= b; } |
---|
1482 | Void setLoopFilterOffsetInAPS( Bool b ) { m_loopFilterOffsetInAPS = b;} |
---|
1483 | Void setInheritDblParamFromAPS( Bool b ) { m_inheritDblParamFromAPS = b; } |
---|
1484 | Void setLoopFilterBetaOffset( Int i ) { m_loopFilterBetaOffsetDiv2 = i; } |
---|
1485 | Void setLoopFilterTcOffset( Int i ) { m_loopFilterTcOffsetDiv2 = i; } |
---|
1486 | |
---|
1487 | Void setRefPic ( TComPic* p, RefPicList e, Int iRefIdx ) { m_apcRefPicList[e][iRefIdx] = p; } |
---|
1488 | Void setRefPOC ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefPOCList[e][iRefIdx] = i; } |
---|
1489 | Void setRefViewId ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefViewIdList[e][iRefIdx] = i; } |
---|
1490 | Void setTexturePic ( TComPic *pcTexturePic ) { m_pcTexturePic = pcTexturePic; } |
---|
1491 | #if SONY_COLPIC_AVAILABILITY |
---|
1492 | Void setViewOrderIdx ( Int i ) { m_iViewOrderIdx = i; } |
---|
1493 | #endif |
---|
1494 | Void setNumRefIdx ( RefPicList e, Int i ) { m_aiNumRefIdx[e] = i; } |
---|
1495 | Void setPic ( TComPic* p ) { m_pcPic = p; } |
---|
1496 | Void setDepth ( Int iDepth ) { m_iDepth = iDepth; } |
---|
1497 | |
---|
1498 | Int getNumPocTotalCurr(); |
---|
1499 | Int getNumPocTotalCurrMvc(); |
---|
1500 | Void setRefPicListMvc ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& rapcInterViewRefPics ); |
---|
1501 | Void setRefPOCnViewListsMvc(); |
---|
1502 | |
---|
1503 | Void setColDir ( UInt uiDir ) { m_uiColDir = uiDir; } |
---|
1504 | #if COLLOCATED_REF_IDX |
---|
1505 | Void setColRefIdx ( UInt refIdx) { m_colRefIdx = refIdx; } |
---|
1506 | #endif |
---|
1507 | Void setCheckLDC ( Bool b ) { m_bCheckLDC = b; } |
---|
1508 | #if H0111_MVD_L1_ZERO |
---|
1509 | Void setMvdL1ZeroFlag ( Bool b) { m_bLMvdL1Zero = b; } |
---|
1510 | #endif |
---|
1511 | |
---|
1512 | Bool isIntra () { return m_eSliceType == I_SLICE; } |
---|
1513 | Bool isInterB () { return m_eSliceType == B_SLICE; } |
---|
1514 | Bool isInterP () { return m_eSliceType == P_SLICE; } |
---|
1515 | |
---|
1516 | #if ALF_CHROMA_LAMBDA || SAO_CHROMA_LAMBDA |
---|
1517 | Void setLambda( Double d, Double e ) { m_dLambdaLuma = d; m_dLambdaChroma = e;} |
---|
1518 | Double getLambdaLuma() { return m_dLambdaLuma; } |
---|
1519 | Double getLambdaChroma() { return m_dLambdaChroma; } |
---|
1520 | #else |
---|
1521 | Void setLambda( Double d ) { m_dLambda = d; } |
---|
1522 | Double getLambda() { return m_dLambda; } |
---|
1523 | #endif |
---|
1524 | |
---|
1525 | Void initEqualRef(); |
---|
1526 | Bool isEqualRef ( RefPicList e, Int iRefIdx1, Int iRefIdx2 ) |
---|
1527 | { |
---|
1528 | if (iRefIdx1 < 0 || iRefIdx2 < 0) return false; |
---|
1529 | return m_abEqualRef[e][iRefIdx1][iRefIdx2]; |
---|
1530 | } |
---|
1531 | |
---|
1532 | Void setEqualRef( RefPicList e, Int iRefIdx1, Int iRefIdx2, Bool b) |
---|
1533 | { |
---|
1534 | m_abEqualRef[e][iRefIdx1][iRefIdx2] = m_abEqualRef[e][iRefIdx2][iRefIdx1] = b; |
---|
1535 | } |
---|
1536 | |
---|
1537 | static Void sortPicList ( TComList<TComPic*>& rcListPic ); |
---|
1538 | |
---|
1539 | Bool getNoBackPredFlag() { return m_bNoBackPredFlag; } |
---|
1540 | Void setNoBackPredFlag( Bool b ) { m_bNoBackPredFlag = b; } |
---|
1541 | Bool getRefIdxCombineCoding() { return m_bRefIdxCombineCoding; } |
---|
1542 | Void setRefIdxCombineCoding( Bool b ) { m_bRefIdxCombineCoding = b; } |
---|
1543 | Void generateCombinedList (); |
---|
1544 | |
---|
1545 | UInt getTLayer () { return m_uiTLayer; } |
---|
1546 | Void setTLayer ( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } |
---|
1547 | |
---|
1548 | #if !H0566_TLA |
---|
1549 | Bool getTLayerSwitchingFlag() { return m_bTLayerSwitchingFlag; } |
---|
1550 | Void setTLayerSwitchingFlag( Bool bValue ) { m_bTLayerSwitchingFlag = bValue; } |
---|
1551 | #endif |
---|
1552 | |
---|
1553 | Void setTLayerInfo( UInt uiTLayer ); |
---|
1554 | Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum ); |
---|
1555 | Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList); |
---|
1556 | #if H0566_TLA && H0566_TLA_SET_FOR_SWITCHING_POINTS |
---|
1557 | Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList); |
---|
1558 | #endif |
---|
1559 | #if START_DECODING_AT_CRA |
---|
1560 | Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool outputFlag, Int pocRandomAccess = 0); |
---|
1561 | #else |
---|
1562 | Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool outputFlag); |
---|
1563 | #endif |
---|
1564 | Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet); |
---|
1565 | |
---|
1566 | Void decodingMarkingForNoTMVP( TComList<TComPic*>& rcListPic, Int currentPOC ); |
---|
1567 | |
---|
1568 | UInt m_uiMaxNumMergeCand; |
---|
1569 | Void setMaxNumMergeCand (UInt maxNumMergeCand ) { m_uiMaxNumMergeCand = maxNumMergeCand; } |
---|
1570 | UInt getMaxNumMergeCand () {return m_uiMaxNumMergeCand; } |
---|
1571 | |
---|
1572 | Void setSliceMode ( UInt uiMode ) { m_uiSliceMode = uiMode; } |
---|
1573 | UInt getSliceMode () { return m_uiSliceMode; } |
---|
1574 | Void setSliceArgument ( UInt uiArgument ) { m_uiSliceArgument = uiArgument; } |
---|
1575 | UInt getSliceArgument () { return m_uiSliceArgument; } |
---|
1576 | Void setSliceCurStartCUAddr ( UInt uiAddr ) { m_uiSliceCurStartCUAddr = uiAddr; } |
---|
1577 | UInt getSliceCurStartCUAddr () { return m_uiSliceCurStartCUAddr; } |
---|
1578 | Void setSliceCurEndCUAddr ( UInt uiAddr ) { m_uiSliceCurEndCUAddr = uiAddr; } |
---|
1579 | UInt getSliceCurEndCUAddr () { return m_uiSliceCurEndCUAddr; } |
---|
1580 | Void setSliceIdx ( UInt i) { m_uiSliceIdx = i; } |
---|
1581 | UInt getSliceIdx () { return m_uiSliceIdx; } |
---|
1582 | Void copySliceInfo (TComSlice *pcSliceSrc); |
---|
1583 | Void setEntropySliceMode ( UInt uiMode ) { m_uiEntropySliceMode = uiMode; } |
---|
1584 | UInt getEntropySliceMode () { return m_uiEntropySliceMode; } |
---|
1585 | Void setEntropySliceArgument ( UInt uiArgument ) { m_uiEntropySliceArgument = uiArgument; } |
---|
1586 | UInt getEntropySliceArgument () { return m_uiEntropySliceArgument; } |
---|
1587 | Void setEntropySliceCurStartCUAddr ( UInt uiAddr ) { m_uiEntropySliceCurStartCUAddr = uiAddr; } |
---|
1588 | UInt getEntropySliceCurStartCUAddr () { return m_uiEntropySliceCurStartCUAddr; } |
---|
1589 | Void setEntropySliceCurEndCUAddr ( UInt uiAddr ) { m_uiEntropySliceCurEndCUAddr = uiAddr; } |
---|
1590 | UInt getEntropySliceCurEndCUAddr () { return m_uiEntropySliceCurEndCUAddr; } |
---|
1591 | Void setNextSlice ( Bool b ) { m_bNextSlice = b; } |
---|
1592 | Bool isNextSlice () { return m_bNextSlice; } |
---|
1593 | Void setNextEntropySlice ( Bool b ) { m_bNextEntropySlice = b; } |
---|
1594 | Bool isNextEntropySlice () { return m_bNextEntropySlice; } |
---|
1595 | Void setSliceBits ( UInt uiVal ) { m_uiSliceBits = uiVal; } |
---|
1596 | UInt getSliceBits () { return m_uiSliceBits; } |
---|
1597 | Void setEntropySliceCounter ( UInt uiVal ) { m_uiEntropySliceCounter = uiVal; } |
---|
1598 | UInt getEntropySliceCounter () { return m_uiEntropySliceCounter; } |
---|
1599 | Void setFinalized ( Bool uiVal ) { m_bFinalized = uiVal; } |
---|
1600 | Bool getFinalized () { return m_bFinalized; } |
---|
1601 | Void setWpScaling ( wpScalingParam wp[2][MAX_NUM_REF][3] ) { memcpy(m_weightPredTable, wp, sizeof(wpScalingParam)*2*MAX_NUM_REF*3); } |
---|
1602 | Void getWpScaling ( RefPicList e, Int iRefIdx, wpScalingParam *&wp); |
---|
1603 | |
---|
1604 | Void resetWpScaling (wpScalingParam wp[2][MAX_NUM_REF][3]); |
---|
1605 | Void initWpScaling (wpScalingParam wp[2][MAX_NUM_REF][3]); |
---|
1606 | Void initWpScaling (); |
---|
1607 | inline Bool applyWP () { return( (m_eSliceType==P_SLICE && m_pcPPS->getUseWP()) || (m_eSliceType==B_SLICE && m_pcPPS->getWPBiPredIdc()) ); } |
---|
1608 | |
---|
1609 | Void setWpAcDcParam ( wpACDCParam wp[3] ) { memcpy(m_weightACDCParam, wp, sizeof(wpACDCParam)*3); } |
---|
1610 | Void getWpAcDcParam ( wpACDCParam *&wp ); |
---|
1611 | Void initWpAcDcParam (); |
---|
1612 | Void copyWPtable (wpScalingParam *&wp_src, wpScalingParam *&wp_dst); |
---|
1613 | Void getWpScalingLC ( Int iRefIdx, wpScalingParam *&wp); |
---|
1614 | Void resetWpScalingLC(wpScalingParam wp[2*MAX_NUM_REF][3]); |
---|
1615 | Void setWpParamforLC(); |
---|
1616 | Void setTileLocationCount ( UInt uiCount ) { m_uiTileCount = uiCount; } |
---|
1617 | UInt getTileLocationCount () { return m_uiTileCount; } |
---|
1618 | Void setTileLocation ( Int i, UInt uiLOC ) { m_uiTileByteLocation[i] = uiLOC; } |
---|
1619 | UInt getTileLocation ( Int i ) { return m_uiTileByteLocation[i]; } |
---|
1620 | Void setTileMarkerFlag ( Int iFlag ) { m_iTileMarkerFlag = iFlag; } |
---|
1621 | Int getTileMarkerFlag () { return m_iTileMarkerFlag; } |
---|
1622 | Void setTileOffstForMultES (UInt uiOffset ) { m_uiTileOffstForMultES = uiOffset; } |
---|
1623 | UInt getTileOffstForMultES () { return m_uiTileOffstForMultES; } |
---|
1624 | Void allocSubstreamSizes ( UInt uiNumSubstreams ); |
---|
1625 | UInt* getSubstreamSizes () { return m_puiSubstreamSizes; } |
---|
1626 | Void setScalingList ( TComScalingList* scalingList ) { m_scalingList = scalingList; } |
---|
1627 | TComScalingList* getScalingList () { return m_scalingList; } |
---|
1628 | Void setDefaultScalingList (); |
---|
1629 | Bool checkDefaultScalingList (); |
---|
1630 | #if CABAC_INIT_FLAG |
---|
1631 | Void setCabacInitFlag ( Bool val ) { m_cabacInitFlag = val; } //!< set CABAC initial flag |
---|
1632 | Bool getCabacInitFlag () { return m_cabacInitFlag; } //!< get CABAC initial flag |
---|
1633 | #else |
---|
1634 | Void setCABACinitIDC(Int iVal) {m_cabacInitIdc = iVal; } //!< set CABAC initial IDC number |
---|
1635 | Int getCABACinitIDC() {return m_cabacInitIdc; } //!< get CABAC initial IDC number |
---|
1636 | #endif |
---|
1637 | #if TILES_WPP_ENTRY_POINT_SIGNALLING |
---|
1638 | Void setNumEntryPointOffsets(Int val) { m_numEntryPointOffsets = val; } |
---|
1639 | Int getNumEntryPointOffsets() { return m_numEntryPointOffsets; } |
---|
1640 | #endif |
---|
1641 | |
---|
1642 | Void setViewId( Int viewId ) { m_viewId = viewId; } |
---|
1643 | Int getViewId() { return m_viewId; } |
---|
1644 | #if QC_MVHEVC_B0046 |
---|
1645 | Void setViewOrderIdx(Int v, UInt layer) { m_iViewOrderIdx = v; } |
---|
1646 | Int getViewOrderIdx() { return m_iViewOrderIdx; } |
---|
1647 | #endif |
---|
1648 | Void setIsDepth( Bool isDepth ) { m_isDepth = isDepth; } |
---|
1649 | Bool getIsDepth() { return m_isDepth; } |
---|
1650 | |
---|
1651 | Void initMultiviewSlice ( Int** aaiScale = 0, Int** aaiOffset = 0 ); |
---|
1652 | |
---|
1653 | Int* getCodedScale () { return m_aaiCodedScale [0]; } |
---|
1654 | Int* getCodedOffset () { return m_aaiCodedOffset[0]; } |
---|
1655 | Int* getInvCodedScale () { return m_aaiCodedScale [1]; } |
---|
1656 | Int* getInvCodedOffset () { return m_aaiCodedOffset[1]; } |
---|
1657 | |
---|
1658 | #if LGE_ILLUCOMP_B0045 |
---|
1659 | Void setApplyIC ( Bool b ) { m_bApplyIC = b; } |
---|
1660 | Bool getApplyIC () { return m_bApplyIC; } |
---|
1661 | Void xSetApplyIC (); |
---|
1662 | #endif |
---|
1663 | |
---|
1664 | #if MERL_VSP_C0152 |
---|
1665 | TComPic* getRefPicBaseTxt () { return m_apcRefPicBaseTxt; } |
---|
1666 | Void setRefPicBaseTxt ( TComPic* RefPic) { m_apcRefPicBaseTxt = RefPic; } |
---|
1667 | TComPic* getRefPicBaseDepth () { return m_apcRefPicBaseDepth; } |
---|
1668 | Void setRefPicBaseDepth ( TComPic* RefPic) { m_apcRefPicBaseDepth = RefPic; } |
---|
1669 | |
---|
1670 | Void setBWVSPLUTParam( Int *pShiftLUT, Int iLoG2LUTPrec) { m_aiShiftLUT = pShiftLUT; m_iShiftPrec = iLoG2LUTPrec; } |
---|
1671 | Void getBWVSPLUTParam( Int*&pShiftLUT, Int&iLoG2LUTPrec) { pShiftLUT = m_aiShiftLUT; iLoG2LUTPrec = m_iShiftPrec; } |
---|
1672 | #endif |
---|
1673 | |
---|
1674 | protected: |
---|
1675 | TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, UInt uiPOC); |
---|
1676 | TComPic* xGetLongTermRefPic(TComList<TComPic*>& rcListPic, UInt uiPOC); |
---|
1677 | TComPic* xGetInterViewRefPic( std::vector<TComPic*>& rcListIvPic, UInt uiViewId ); |
---|
1678 | };// END CLASS DEFINITION TComSlice |
---|
1679 | |
---|
1680 | |
---|
1681 | template <class T> class ParameterSetMap |
---|
1682 | { |
---|
1683 | public: |
---|
1684 | ParameterSetMap(Int maxId) |
---|
1685 | :m_maxId (maxId) |
---|
1686 | {} |
---|
1687 | |
---|
1688 | ~ParameterSetMap() |
---|
1689 | { |
---|
1690 | for (typename std::map<Int,T *>::iterator i = m_paramsetMap.begin(); i!= m_paramsetMap.end(); i++) |
---|
1691 | { |
---|
1692 | delete (*i).second; |
---|
1693 | } |
---|
1694 | } |
---|
1695 | |
---|
1696 | Void storePS(Int psId, T *ps) |
---|
1697 | { |
---|
1698 | assert ( psId < m_maxId ); |
---|
1699 | if ( m_paramsetMap.find(psId) != m_paramsetMap.end() ) |
---|
1700 | { |
---|
1701 | delete m_paramsetMap[psId]; |
---|
1702 | } |
---|
1703 | m_paramsetMap[psId] = ps; |
---|
1704 | } |
---|
1705 | |
---|
1706 | Void mergePSList(ParameterSetMap<T> &rPsList) |
---|
1707 | { |
---|
1708 | for (typename std::map<Int,T *>::iterator i = rPsList.m_paramsetMap.begin(); i!= rPsList.m_paramsetMap.end(); i++) |
---|
1709 | { |
---|
1710 | storePS(i->first, i->second); |
---|
1711 | } |
---|
1712 | rPsList.m_paramsetMap.clear(); |
---|
1713 | } |
---|
1714 | |
---|
1715 | |
---|
1716 | T* getPS(Int psId) |
---|
1717 | { |
---|
1718 | return ( m_paramsetMap.find(psId) == m_paramsetMap.end() ) ? NULL : m_paramsetMap[psId]; |
---|
1719 | } |
---|
1720 | |
---|
1721 | T* getFirstPS() |
---|
1722 | { |
---|
1723 | return (m_paramsetMap.begin() == m_paramsetMap.end() ) ? NULL : m_paramsetMap.begin()->second; |
---|
1724 | } |
---|
1725 | |
---|
1726 | #if QC_MVHEVC_B0046 |
---|
1727 | Void clearPSList() |
---|
1728 | { |
---|
1729 | m_paramsetMap.clear(); |
---|
1730 | } |
---|
1731 | #endif |
---|
1732 | private: |
---|
1733 | std::map<Int,T *> m_paramsetMap; |
---|
1734 | Int m_maxId; |
---|
1735 | }; |
---|
1736 | |
---|
1737 | class ParameterSetManager |
---|
1738 | { |
---|
1739 | public: |
---|
1740 | ParameterSetManager(); |
---|
1741 | virtual ~ParameterSetManager(); |
---|
1742 | #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 |
---|
1743 | //! store video parameter set and take ownership of it |
---|
1744 | Void storeVPS(TComVPS *vps) { m_vpsMap.storePS( vps->getVPSId(), vps); }; |
---|
1745 | //! get pointer to existing video parameter set |
---|
1746 | TComVPS* getVPS(Int vpsId) { return m_vpsMap.getPS(vpsId); }; |
---|
1747 | TComVPS* getFirstVPS() { return m_vpsMap.getFirstPS(); }; |
---|
1748 | #if QC_MVHEVC_B0046 |
---|
1749 | Void clearVPS() { m_vpsMap.clearPSList(); }; |
---|
1750 | Void clearSPS() { m_spsMap.clearPSList(); }; |
---|
1751 | Void clearPPS() { m_ppsMap.clearPSList(); }; |
---|
1752 | #endif |
---|
1753 | #endif |
---|
1754 | //! store sequence parameter set and take ownership of it |
---|
1755 | Void storeSPS(TComSPS *sps) { m_spsMap.storePS( sps->getSPSId(), sps); }; |
---|
1756 | //! get pointer to existing sequence parameter set |
---|
1757 | TComSPS* getSPS(Int spsId) { return m_spsMap.getPS(spsId); }; |
---|
1758 | TComSPS* getFirstSPS() { return m_spsMap.getFirstPS(); }; |
---|
1759 | |
---|
1760 | //! store picture parameter set and take ownership of it |
---|
1761 | Void storePPS(TComPPS *pps) { m_ppsMap.storePS( pps->getPPSId(), pps); }; |
---|
1762 | //! get pointer to existing picture parameter set |
---|
1763 | TComPPS* getPPS(Int ppsId) { return m_ppsMap.getPS(ppsId); }; |
---|
1764 | TComPPS* getFirstPPS() { return m_ppsMap.getFirstPS(); }; |
---|
1765 | |
---|
1766 | //! store adaptation parameter set and take ownership of it |
---|
1767 | Void storeAPS(TComAPS *aps) { m_apsMap.storePS( aps->getAPSID(), aps); }; |
---|
1768 | //! getPointer to existing adaptation parameter set |
---|
1769 | TComAPS* getAPS(Int apsId) { return m_apsMap.getPS(apsId); }; |
---|
1770 | |
---|
1771 | protected: |
---|
1772 | ParameterSetMap<TComSPS> m_spsMap; |
---|
1773 | ParameterSetMap<TComPPS> m_ppsMap; |
---|
1774 | ParameterSetMap<TComAPS> m_apsMap; |
---|
1775 | #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 |
---|
1776 | ParameterSetMap<TComVPS> m_vpsMap; |
---|
1777 | #endif |
---|
1778 | }; |
---|
1779 | |
---|
1780 | //! \} |
---|
1781 | |
---|
1782 | #endif // __TCOMSLICE__ |
---|