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