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