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