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