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