[313] | 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 |
---|
| 4 | * granted under this license. |
---|
| 5 | * |
---|
[595] | 6 | * Copyright (c) 2010-2014, ITU/ISO/IEC |
---|
[313] | 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. |
---|
| 17 | * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may |
---|
| 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 | */ |
---|
| 33 | |
---|
| 34 | /** \file TComSlice.h |
---|
| 35 | \brief slice header and SPS class (header) |
---|
| 36 | */ |
---|
| 37 | |
---|
| 38 | #ifndef __TCOMSLICE__ |
---|
| 39 | #define __TCOMSLICE__ |
---|
| 40 | |
---|
| 41 | #include <cstring> |
---|
| 42 | #include <map> |
---|
| 43 | #include <vector> |
---|
| 44 | #include "CommonDef.h" |
---|
| 45 | #include "TComRom.h" |
---|
| 46 | #include "TComList.h" |
---|
| 47 | |
---|
| 48 | //! \ingroup TLibCommon |
---|
| 49 | //! \{ |
---|
| 50 | |
---|
| 51 | class TComPic; |
---|
| 52 | class TComTrQuant; |
---|
| 53 | |
---|
| 54 | #if SVC_EXTENSION |
---|
| 55 | class TComPicYuv; |
---|
| 56 | #endif |
---|
| 57 | // ==================================================================================================================== |
---|
| 58 | // Constants |
---|
| 59 | // ==================================================================================================================== |
---|
| 60 | |
---|
| 61 | // ==================================================================================================================== |
---|
| 62 | // Class definition |
---|
| 63 | // ==================================================================================================================== |
---|
| 64 | |
---|
| 65 | /// Reference Picture Set class |
---|
| 66 | class TComReferencePictureSet |
---|
| 67 | { |
---|
| 68 | private: |
---|
| 69 | Int m_numberOfPictures; |
---|
| 70 | Int m_numberOfNegativePictures; |
---|
| 71 | Int m_numberOfPositivePictures; |
---|
| 72 | Int m_numberOfLongtermPictures; |
---|
| 73 | Int m_deltaPOC[MAX_NUM_REF_PICS]; |
---|
| 74 | Int m_POC[MAX_NUM_REF_PICS]; |
---|
| 75 | Bool m_used[MAX_NUM_REF_PICS]; |
---|
| 76 | Bool m_interRPSPrediction; |
---|
| 77 | Int m_deltaRIdxMinus1; |
---|
| 78 | Int m_deltaRPS; |
---|
| 79 | Int m_numRefIdc; |
---|
| 80 | Int m_refIdc[MAX_NUM_REF_PICS+1]; |
---|
| 81 | Bool m_bCheckLTMSB[MAX_NUM_REF_PICS]; |
---|
| 82 | Int m_pocLSBLT[MAX_NUM_REF_PICS]; |
---|
| 83 | Int m_deltaPOCMSBCycleLT[MAX_NUM_REF_PICS]; |
---|
| 84 | Bool m_deltaPocMSBPresentFlag[MAX_NUM_REF_PICS]; |
---|
| 85 | |
---|
| 86 | public: |
---|
| 87 | TComReferencePictureSet(); |
---|
| 88 | virtual ~TComReferencePictureSet(); |
---|
| 89 | Int getPocLSBLT(Int i) { return m_pocLSBLT[i]; } |
---|
| 90 | Void setPocLSBLT(Int i, Int x) { m_pocLSBLT[i] = x; } |
---|
| 91 | Int getDeltaPocMSBCycleLT(Int i) { return m_deltaPOCMSBCycleLT[i]; } |
---|
| 92 | Void setDeltaPocMSBCycleLT(Int i, Int x) { m_deltaPOCMSBCycleLT[i] = x; } |
---|
| 93 | Bool getDeltaPocMSBPresentFlag(Int i) { return m_deltaPocMSBPresentFlag[i]; } |
---|
| 94 | Void setDeltaPocMSBPresentFlag(Int i, Bool x) { m_deltaPocMSBPresentFlag[i] = x; } |
---|
| 95 | Void setUsed(Int bufferNum, Bool used); |
---|
| 96 | Void setDeltaPOC(Int bufferNum, Int deltaPOC); |
---|
| 97 | Void setPOC(Int bufferNum, Int deltaPOC); |
---|
| 98 | Void setNumberOfPictures(Int numberOfPictures); |
---|
| 99 | Void setCheckLTMSBPresent(Int bufferNum, Bool b ); |
---|
| 100 | Bool getCheckLTMSBPresent(Int bufferNum); |
---|
| 101 | |
---|
| 102 | Int getUsed(Int bufferNum); |
---|
| 103 | Int getDeltaPOC(Int bufferNum); |
---|
| 104 | Int getPOC(Int bufferNum); |
---|
| 105 | Int getNumberOfPictures(); |
---|
| 106 | |
---|
| 107 | Void setNumberOfNegativePictures(Int number) { m_numberOfNegativePictures = number; } |
---|
| 108 | Int getNumberOfNegativePictures() { return m_numberOfNegativePictures; } |
---|
| 109 | Void setNumberOfPositivePictures(Int number) { m_numberOfPositivePictures = number; } |
---|
| 110 | Int getNumberOfPositivePictures() { return m_numberOfPositivePictures; } |
---|
| 111 | Void setNumberOfLongtermPictures(Int number) { m_numberOfLongtermPictures = number; } |
---|
| 112 | Int getNumberOfLongtermPictures() { return m_numberOfLongtermPictures; } |
---|
| 113 | |
---|
| 114 | Void setInterRPSPrediction(Bool flag) { m_interRPSPrediction = flag; } |
---|
| 115 | Bool getInterRPSPrediction() { return m_interRPSPrediction; } |
---|
| 116 | Void setDeltaRIdxMinus1(Int x) { m_deltaRIdxMinus1 = x; } |
---|
| 117 | Int getDeltaRIdxMinus1() { return m_deltaRIdxMinus1; } |
---|
| 118 | Void setDeltaRPS(Int x) { m_deltaRPS = x; } |
---|
| 119 | Int getDeltaRPS() { return m_deltaRPS; } |
---|
| 120 | Void setNumRefIdc(Int x) { m_numRefIdc = x; } |
---|
| 121 | Int getNumRefIdc() { return m_numRefIdc; } |
---|
| 122 | |
---|
| 123 | Void setRefIdc(Int bufferNum, Int refIdc); |
---|
| 124 | Int getRefIdc(Int bufferNum); |
---|
| 125 | |
---|
| 126 | Void sortDeltaPOC(); |
---|
| 127 | Void printDeltaPOC(); |
---|
| 128 | }; |
---|
| 129 | |
---|
| 130 | /// Reference Picture Set set class |
---|
| 131 | class TComRPSList |
---|
| 132 | { |
---|
| 133 | private: |
---|
| 134 | Int m_numberOfReferencePictureSets; |
---|
| 135 | TComReferencePictureSet* m_referencePictureSets; |
---|
| 136 | |
---|
| 137 | public: |
---|
| 138 | TComRPSList(); |
---|
| 139 | virtual ~TComRPSList(); |
---|
| 140 | |
---|
| 141 | Void create (Int numberOfEntries); |
---|
| 142 | Void destroy (); |
---|
| 143 | |
---|
| 144 | |
---|
| 145 | TComReferencePictureSet* getReferencePictureSet(Int referencePictureSetNum); |
---|
| 146 | Int getNumberOfReferencePictureSets(); |
---|
| 147 | Void setNumberOfReferencePictureSets(Int numberOfReferencePictureSets); |
---|
| 148 | }; |
---|
| 149 | |
---|
| 150 | /// SCALING_LIST class |
---|
| 151 | class TComScalingList |
---|
| 152 | { |
---|
| 153 | public: |
---|
| 154 | TComScalingList(); |
---|
| 155 | virtual ~TComScalingList(); |
---|
| 156 | Void setScalingListPresentFlag (Bool b) { m_scalingListPresentFlag = b; } |
---|
| 157 | Bool getScalingListPresentFlag () { return m_scalingListPresentFlag; } |
---|
| 158 | Int* getScalingListAddress (UInt sizeId, UInt listId) { return m_scalingListCoef[sizeId][listId]; } //!< get matrix coefficient |
---|
| 159 | Bool checkPredMode (UInt sizeId, UInt listId); |
---|
| 160 | Void setRefMatrixId (UInt sizeId, UInt listId, UInt u) { m_refMatrixId[sizeId][listId] = u; } //!< set reference matrix ID |
---|
| 161 | UInt getRefMatrixId (UInt sizeId, UInt listId) { return m_refMatrixId[sizeId][listId]; } //!< get reference matrix ID |
---|
| 162 | Int* getScalingListDefaultAddress (UInt sizeId, UInt listId); //!< get default matrix coefficient |
---|
[540] | 163 | Void processDefaultMatrix (UInt sizeId, UInt listId); |
---|
[313] | 164 | Void setScalingListDC (UInt sizeId, UInt listId, UInt u) { m_scalingListDC[sizeId][listId] = u; } //!< set DC value |
---|
| 165 | |
---|
| 166 | Int getScalingListDC (UInt sizeId, UInt listId) { return m_scalingListDC[sizeId][listId]; } //!< get DC value |
---|
| 167 | Void checkDcOfMatrix (); |
---|
| 168 | Void processRefMatrix (UInt sizeId, UInt listId , UInt refListId ); |
---|
| 169 | Bool xParseScalingList (Char* pchFile); |
---|
| 170 | |
---|
| 171 | private: |
---|
| 172 | Void init (); |
---|
| 173 | Void destroy (); |
---|
| 174 | Int m_scalingListDC [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< the DC value of the matrix coefficient for 16x16 |
---|
| 175 | Bool m_useDefaultScalingMatrixFlag [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< UseDefaultScalingMatrixFlag |
---|
| 176 | UInt m_refMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< RefMatrixID |
---|
| 177 | Bool m_scalingListPresentFlag; //!< flag for using default matrix |
---|
| 178 | UInt m_predMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< reference list index |
---|
[442] | 179 | Int *m_scalingListCoef [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< quantization matrix |
---|
[313] | 180 | }; |
---|
| 181 | |
---|
| 182 | class ProfileTierLevel |
---|
| 183 | { |
---|
| 184 | Int m_profileSpace; |
---|
| 185 | Bool m_tierFlag; |
---|
| 186 | Int m_profileIdc; |
---|
| 187 | Bool m_profileCompatibilityFlag[32]; |
---|
| 188 | Int m_levelIdc; |
---|
| 189 | |
---|
| 190 | Bool m_progressiveSourceFlag; |
---|
| 191 | Bool m_interlacedSourceFlag; |
---|
| 192 | Bool m_nonPackedConstraintFlag; |
---|
| 193 | Bool m_frameOnlyConstraintFlag; |
---|
| 194 | |
---|
| 195 | public: |
---|
| 196 | ProfileTierLevel(); |
---|
| 197 | |
---|
| 198 | Int getProfileSpace() const { return m_profileSpace; } |
---|
| 199 | Void setProfileSpace(Int x) { m_profileSpace = x; } |
---|
| 200 | |
---|
| 201 | Bool getTierFlag() const { return m_tierFlag; } |
---|
| 202 | Void setTierFlag(Bool x) { m_tierFlag = x; } |
---|
| 203 | |
---|
| 204 | Int getProfileIdc() const { return m_profileIdc; } |
---|
| 205 | Void setProfileIdc(Int x) { m_profileIdc = x; } |
---|
| 206 | |
---|
| 207 | Bool getProfileCompatibilityFlag(Int i) const { return m_profileCompatibilityFlag[i]; } |
---|
| 208 | Void setProfileCompatibilityFlag(Int i, Bool x) { m_profileCompatibilityFlag[i] = x; } |
---|
| 209 | |
---|
| 210 | Int getLevelIdc() const { return m_levelIdc; } |
---|
| 211 | Void setLevelIdc(Int x) { m_levelIdc = x; } |
---|
| 212 | |
---|
| 213 | Bool getProgressiveSourceFlag() const { return m_progressiveSourceFlag; } |
---|
| 214 | Void setProgressiveSourceFlag(Bool b) { m_progressiveSourceFlag = b; } |
---|
| 215 | |
---|
| 216 | Bool getInterlacedSourceFlag() const { return m_interlacedSourceFlag; } |
---|
| 217 | Void setInterlacedSourceFlag(Bool b) { m_interlacedSourceFlag = b; } |
---|
| 218 | |
---|
| 219 | Bool getNonPackedConstraintFlag() const { return m_nonPackedConstraintFlag; } |
---|
| 220 | Void setNonPackedConstraintFlag(Bool b) { m_nonPackedConstraintFlag = b; } |
---|
| 221 | |
---|
| 222 | Bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; } |
---|
| 223 | Void setFrameOnlyConstraintFlag(Bool b) { m_frameOnlyConstraintFlag = b; } |
---|
| 224 | #if VPS_EXTN_PROFILE_INFO |
---|
| 225 | Void copyProfileInfo(ProfileTierLevel *ptl); |
---|
| 226 | #endif |
---|
| 227 | }; |
---|
| 228 | |
---|
| 229 | |
---|
| 230 | class TComPTL |
---|
| 231 | { |
---|
| 232 | ProfileTierLevel m_generalPTL; |
---|
[644] | 233 | ProfileTierLevel m_subLayerPTL [MAX_TLAYER-1]; // max. value of max_sub_layers_minus1 is MAX_TLAYER-1 ( = 6 ) |
---|
| 234 | Bool m_subLayerProfilePresentFlag [MAX_TLAYER-1]; |
---|
| 235 | Bool m_subLayerLevelPresentFlag [MAX_TLAYER-1]; |
---|
[313] | 236 | |
---|
| 237 | public: |
---|
| 238 | TComPTL(); |
---|
| 239 | Bool getSubLayerProfilePresentFlag(Int i) const { return m_subLayerProfilePresentFlag[i]; } |
---|
| 240 | Void setSubLayerProfilePresentFlag(Int i, Bool x) { m_subLayerProfilePresentFlag[i] = x; } |
---|
| 241 | |
---|
| 242 | Bool getSubLayerLevelPresentFlag(Int i) const { return m_subLayerLevelPresentFlag[i]; } |
---|
| 243 | Void setSubLayerLevelPresentFlag(Int i, Bool x) { m_subLayerLevelPresentFlag[i] = x; } |
---|
| 244 | |
---|
| 245 | ProfileTierLevel* getGeneralPTL() { return &m_generalPTL; } |
---|
| 246 | ProfileTierLevel* getSubLayerPTL(Int i) { return &m_subLayerPTL[i]; } |
---|
| 247 | #if VPS_EXTN_PROFILE_INFO |
---|
| 248 | Void copyProfileInfo(TComPTL *ptl); |
---|
| 249 | #endif |
---|
| 250 | }; |
---|
| 251 | /// VPS class |
---|
| 252 | |
---|
| 253 | struct HrdSubLayerInfo |
---|
| 254 | { |
---|
| 255 | Bool fixedPicRateFlag; |
---|
| 256 | Bool fixedPicRateWithinCvsFlag; |
---|
| 257 | UInt picDurationInTcMinus1; |
---|
| 258 | Bool lowDelayHrdFlag; |
---|
| 259 | UInt cpbCntMinus1; |
---|
| 260 | UInt bitRateValueMinus1[MAX_CPB_CNT][2]; |
---|
| 261 | UInt cpbSizeValue [MAX_CPB_CNT][2]; |
---|
| 262 | UInt ducpbSizeValue [MAX_CPB_CNT][2]; |
---|
| 263 | UInt cbrFlag [MAX_CPB_CNT][2]; |
---|
| 264 | UInt duBitRateValue [MAX_CPB_CNT][2]; |
---|
| 265 | }; |
---|
| 266 | |
---|
| 267 | class TComHRD |
---|
| 268 | { |
---|
| 269 | private: |
---|
| 270 | Bool m_nalHrdParametersPresentFlag; |
---|
| 271 | Bool m_vclHrdParametersPresentFlag; |
---|
| 272 | Bool m_subPicCpbParamsPresentFlag; |
---|
| 273 | UInt m_tickDivisorMinus2; |
---|
| 274 | UInt m_duCpbRemovalDelayLengthMinus1; |
---|
| 275 | Bool m_subPicCpbParamsInPicTimingSEIFlag; |
---|
| 276 | UInt m_dpbOutputDelayDuLengthMinus1; |
---|
| 277 | UInt m_bitRateScale; |
---|
| 278 | UInt m_cpbSizeScale; |
---|
| 279 | UInt m_ducpbSizeScale; |
---|
| 280 | UInt m_initialCpbRemovalDelayLengthMinus1; |
---|
| 281 | UInt m_cpbRemovalDelayLengthMinus1; |
---|
| 282 | UInt m_dpbOutputDelayLengthMinus1; |
---|
| 283 | UInt m_numDU; |
---|
| 284 | HrdSubLayerInfo m_HRD[MAX_TLAYER]; |
---|
| 285 | |
---|
| 286 | public: |
---|
| 287 | TComHRD() |
---|
| 288 | :m_nalHrdParametersPresentFlag(0) |
---|
| 289 | ,m_vclHrdParametersPresentFlag(0) |
---|
| 290 | ,m_subPicCpbParamsPresentFlag(false) |
---|
| 291 | ,m_tickDivisorMinus2(0) |
---|
| 292 | ,m_duCpbRemovalDelayLengthMinus1(0) |
---|
| 293 | ,m_subPicCpbParamsInPicTimingSEIFlag(false) |
---|
| 294 | ,m_dpbOutputDelayDuLengthMinus1(0) |
---|
| 295 | ,m_bitRateScale(0) |
---|
| 296 | ,m_cpbSizeScale(0) |
---|
| 297 | ,m_initialCpbRemovalDelayLengthMinus1(0) |
---|
| 298 | ,m_cpbRemovalDelayLengthMinus1(0) |
---|
| 299 | ,m_dpbOutputDelayLengthMinus1(0) |
---|
| 300 | {} |
---|
| 301 | |
---|
| 302 | virtual ~TComHRD() {} |
---|
| 303 | |
---|
| 304 | Void setNalHrdParametersPresentFlag ( Bool flag ) { m_nalHrdParametersPresentFlag = flag; } |
---|
| 305 | Bool getNalHrdParametersPresentFlag ( ) { return m_nalHrdParametersPresentFlag; } |
---|
| 306 | |
---|
| 307 | Void setVclHrdParametersPresentFlag ( Bool flag ) { m_vclHrdParametersPresentFlag = flag; } |
---|
| 308 | Bool getVclHrdParametersPresentFlag ( ) { return m_vclHrdParametersPresentFlag; } |
---|
| 309 | |
---|
| 310 | Void setSubPicCpbParamsPresentFlag ( Bool flag ) { m_subPicCpbParamsPresentFlag = flag; } |
---|
| 311 | Bool getSubPicCpbParamsPresentFlag ( ) { return m_subPicCpbParamsPresentFlag; } |
---|
| 312 | |
---|
| 313 | Void setTickDivisorMinus2 ( UInt value ) { m_tickDivisorMinus2 = value; } |
---|
| 314 | UInt getTickDivisorMinus2 ( ) { return m_tickDivisorMinus2; } |
---|
| 315 | |
---|
| 316 | Void setDuCpbRemovalDelayLengthMinus1 ( UInt value ) { m_duCpbRemovalDelayLengthMinus1 = value; } |
---|
| 317 | UInt getDuCpbRemovalDelayLengthMinus1 ( ) { return m_duCpbRemovalDelayLengthMinus1; } |
---|
| 318 | |
---|
| 319 | Void setSubPicCpbParamsInPicTimingSEIFlag ( Bool flag) { m_subPicCpbParamsInPicTimingSEIFlag = flag; } |
---|
| 320 | Bool getSubPicCpbParamsInPicTimingSEIFlag () { return m_subPicCpbParamsInPicTimingSEIFlag; } |
---|
| 321 | |
---|
| 322 | Void setDpbOutputDelayDuLengthMinus1 (UInt value ) { m_dpbOutputDelayDuLengthMinus1 = value; } |
---|
| 323 | UInt getDpbOutputDelayDuLengthMinus1 () { return m_dpbOutputDelayDuLengthMinus1; } |
---|
| 324 | |
---|
| 325 | Void setBitRateScale ( UInt value ) { m_bitRateScale = value; } |
---|
| 326 | UInt getBitRateScale ( ) { return m_bitRateScale; } |
---|
| 327 | |
---|
| 328 | Void setCpbSizeScale ( UInt value ) { m_cpbSizeScale = value; } |
---|
| 329 | UInt getCpbSizeScale ( ) { return m_cpbSizeScale; } |
---|
| 330 | Void setDuCpbSizeScale ( UInt value ) { m_ducpbSizeScale = value; } |
---|
| 331 | UInt getDuCpbSizeScale ( ) { return m_ducpbSizeScale; } |
---|
| 332 | |
---|
| 333 | Void setInitialCpbRemovalDelayLengthMinus1( UInt value ) { m_initialCpbRemovalDelayLengthMinus1 = value; } |
---|
| 334 | UInt getInitialCpbRemovalDelayLengthMinus1( ) { return m_initialCpbRemovalDelayLengthMinus1; } |
---|
| 335 | |
---|
| 336 | Void setCpbRemovalDelayLengthMinus1 ( UInt value ) { m_cpbRemovalDelayLengthMinus1 = value; } |
---|
| 337 | UInt getCpbRemovalDelayLengthMinus1 ( ) { return m_cpbRemovalDelayLengthMinus1; } |
---|
| 338 | |
---|
| 339 | Void setDpbOutputDelayLengthMinus1 ( UInt value ) { m_dpbOutputDelayLengthMinus1 = value; } |
---|
| 340 | UInt getDpbOutputDelayLengthMinus1 ( ) { return m_dpbOutputDelayLengthMinus1; } |
---|
| 341 | |
---|
| 342 | Void setFixedPicRateFlag ( Int layer, Bool flag ) { m_HRD[layer].fixedPicRateFlag = flag; } |
---|
| 343 | Bool getFixedPicRateFlag ( Int layer ) { return m_HRD[layer].fixedPicRateFlag; } |
---|
| 344 | |
---|
| 345 | Void setFixedPicRateWithinCvsFlag ( Int layer, Bool flag ) { m_HRD[layer].fixedPicRateWithinCvsFlag = flag; } |
---|
| 346 | Bool getFixedPicRateWithinCvsFlag ( Int layer ) { return m_HRD[layer].fixedPicRateWithinCvsFlag; } |
---|
| 347 | |
---|
| 348 | Void setPicDurationInTcMinus1 ( Int layer, UInt value ) { m_HRD[layer].picDurationInTcMinus1 = value; } |
---|
| 349 | UInt getPicDurationInTcMinus1 ( Int layer ) { return m_HRD[layer].picDurationInTcMinus1; } |
---|
| 350 | |
---|
| 351 | Void setLowDelayHrdFlag ( Int layer, Bool flag ) { m_HRD[layer].lowDelayHrdFlag = flag; } |
---|
| 352 | Bool getLowDelayHrdFlag ( Int layer ) { return m_HRD[layer].lowDelayHrdFlag; } |
---|
| 353 | |
---|
| 354 | Void setCpbCntMinus1 ( Int layer, UInt value ) { m_HRD[layer].cpbCntMinus1 = value; } |
---|
| 355 | UInt getCpbCntMinus1 ( Int layer ) { return m_HRD[layer].cpbCntMinus1; } |
---|
| 356 | |
---|
| 357 | Void setBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].bitRateValueMinus1[cpbcnt][nalOrVcl] = value; } |
---|
| 358 | UInt getBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].bitRateValueMinus1[cpbcnt][nalOrVcl]; } |
---|
| 359 | |
---|
| 360 | Void setCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].cpbSizeValue[cpbcnt][nalOrVcl] = value; } |
---|
| 361 | UInt getCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].cpbSizeValue[cpbcnt][nalOrVcl]; } |
---|
| 362 | Void setDuCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].ducpbSizeValue[cpbcnt][nalOrVcl] = value; } |
---|
| 363 | UInt getDuCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].ducpbSizeValue[cpbcnt][nalOrVcl]; } |
---|
| 364 | Void setDuBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].duBitRateValue[cpbcnt][nalOrVcl] = value; } |
---|
| 365 | UInt getDuBitRateValueMinus1 (Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].duBitRateValue[cpbcnt][nalOrVcl]; } |
---|
| 366 | Void setCbrFlag ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].cbrFlag[cpbcnt][nalOrVcl] = value; } |
---|
| 367 | Bool getCbrFlag ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].cbrFlag[cpbcnt][nalOrVcl]; } |
---|
| 368 | |
---|
| 369 | Void setNumDU ( UInt value ) { m_numDU = value; } |
---|
| 370 | UInt getNumDU ( ) { return m_numDU; } |
---|
| 371 | Bool getCpbDpbDelaysPresentFlag() { return getNalHrdParametersPresentFlag() || getVclHrdParametersPresentFlag(); } |
---|
| 372 | }; |
---|
| 373 | |
---|
| 374 | class TimingInfo |
---|
| 375 | { |
---|
| 376 | Bool m_timingInfoPresentFlag; |
---|
| 377 | UInt m_numUnitsInTick; |
---|
| 378 | UInt m_timeScale; |
---|
| 379 | Bool m_pocProportionalToTimingFlag; |
---|
| 380 | Int m_numTicksPocDiffOneMinus1; |
---|
| 381 | public: |
---|
| 382 | TimingInfo() |
---|
| 383 | : m_timingInfoPresentFlag(false) |
---|
| 384 | , m_numUnitsInTick(1001) |
---|
| 385 | , m_timeScale(60000) |
---|
| 386 | , m_pocProportionalToTimingFlag(false) |
---|
| 387 | , m_numTicksPocDiffOneMinus1(0) {} |
---|
| 388 | |
---|
| 389 | Void setTimingInfoPresentFlag ( Bool flag ) { m_timingInfoPresentFlag = flag; } |
---|
| 390 | Bool getTimingInfoPresentFlag ( ) { return m_timingInfoPresentFlag; } |
---|
| 391 | |
---|
| 392 | Void setNumUnitsInTick ( UInt value ) { m_numUnitsInTick = value; } |
---|
| 393 | UInt getNumUnitsInTick ( ) { return m_numUnitsInTick; } |
---|
| 394 | |
---|
| 395 | Void setTimeScale ( UInt value ) { m_timeScale = value; } |
---|
| 396 | UInt getTimeScale ( ) { return m_timeScale; } |
---|
| 397 | |
---|
| 398 | Bool getPocProportionalToTimingFlag ( ) { return m_pocProportionalToTimingFlag; } |
---|
| 399 | Void setPocProportionalToTimingFlag (Bool x ) { m_pocProportionalToTimingFlag = x; } |
---|
| 400 | |
---|
| 401 | Int getNumTicksPocDiffOneMinus1 ( ) { return m_numTicksPocDiffOneMinus1; } |
---|
| 402 | Void setNumTicksPocDiffOneMinus1 (Int x ) { m_numTicksPocDiffOneMinus1 = x; } |
---|
| 403 | }; |
---|
| 404 | |
---|
[442] | 405 | #if REPN_FORMAT_IN_VPS |
---|
| 406 | class RepFormat |
---|
| 407 | { |
---|
[540] | 408 | #if REPN_FORMAT_CONTROL_FLAG |
---|
| 409 | Bool m_chromaAndBitDepthVpsPresentFlag; |
---|
| 410 | #endif |
---|
[494] | 411 | #if AUXILIARY_PICTURES |
---|
| 412 | ChromaFormat m_chromaFormatVpsIdc; |
---|
| 413 | #else |
---|
[442] | 414 | Int m_chromaFormatVpsIdc; |
---|
[494] | 415 | #endif |
---|
[442] | 416 | Bool m_separateColourPlaneVpsFlag; |
---|
| 417 | Int m_picWidthVpsInLumaSamples; |
---|
| 418 | Int m_picHeightVpsInLumaSamples; |
---|
| 419 | Int m_bitDepthVpsLuma; // coded as minus8 |
---|
| 420 | Int m_bitDepthVpsChroma; // coded as minus8 |
---|
| 421 | |
---|
| 422 | public: |
---|
| 423 | RepFormat(); |
---|
[588] | 424 | #if RESOLUTION_BASED_DPB |
---|
| 425 | Void init(); |
---|
| 426 | RepFormat& operator= (const RepFormat &); |
---|
| 427 | static Bool checkSameSubDpb(const RepFormat &x, const RepFormat &y); |
---|
| 428 | #endif |
---|
[540] | 429 | #if REPN_FORMAT_CONTROL_FLAG |
---|
| 430 | Bool getChromaAndBitDepthVpsPresentFlag() { return m_chromaAndBitDepthVpsPresentFlag; } |
---|
| 431 | void setChromaAndBitDepthVpsPresentFlag(Bool x) { m_chromaAndBitDepthVpsPresentFlag = x; } |
---|
| 432 | #endif |
---|
| 433 | |
---|
[494] | 434 | #if AUXILIARY_PICTURES |
---|
| 435 | ChromaFormat getChromaFormatVpsIdc() { return m_chromaFormatVpsIdc; } |
---|
| 436 | Void setChromaFormatVpsIdc(ChromaFormat x) { m_chromaFormatVpsIdc = x; } |
---|
| 437 | #else |
---|
[442] | 438 | Int getChromaFormatVpsIdc() { return m_chromaFormatVpsIdc; } |
---|
| 439 | Void setChromaFormatVpsIdc(Int x) { m_chromaFormatVpsIdc = x; } |
---|
[494] | 440 | #endif |
---|
[442] | 441 | |
---|
| 442 | Bool getSeparateColourPlaneVpsFlag() { return m_separateColourPlaneVpsFlag; } |
---|
| 443 | Void setSeparateColourPlaneVpsFlag(Bool x) { m_separateColourPlaneVpsFlag = x; } |
---|
| 444 | |
---|
| 445 | Int getPicWidthVpsInLumaSamples() { return m_picWidthVpsInLumaSamples; } |
---|
| 446 | Void setPicWidthVpsInLumaSamples(Int x) { m_picWidthVpsInLumaSamples = x; } |
---|
| 447 | |
---|
| 448 | Int getPicHeightVpsInLumaSamples() { return m_picHeightVpsInLumaSamples; } |
---|
| 449 | Void setPicHeightVpsInLumaSamples(Int x) { m_picHeightVpsInLumaSamples = x; } |
---|
| 450 | |
---|
| 451 | Int getBitDepthVpsLuma() { return m_bitDepthVpsLuma; } |
---|
| 452 | Void setBitDepthVpsLuma(Int x) { m_bitDepthVpsLuma = x; } |
---|
| 453 | |
---|
| 454 | Int getBitDepthVpsChroma() { return m_bitDepthVpsChroma; } |
---|
| 455 | Void setBitDepthVpsChroma(Int x) { m_bitDepthVpsChroma = x; } |
---|
| 456 | }; |
---|
| 457 | #endif |
---|
[313] | 458 | class TComVPS |
---|
| 459 | { |
---|
| 460 | private: |
---|
| 461 | Int m_VPSId; |
---|
| 462 | UInt m_uiMaxTLayers; |
---|
| 463 | UInt m_uiMaxLayers; |
---|
| 464 | Bool m_bTemporalIdNestingFlag; |
---|
| 465 | |
---|
| 466 | UInt m_numReorderPics[MAX_TLAYER]; |
---|
| 467 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
| 468 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) |
---|
| 469 | |
---|
| 470 | UInt m_numHrdParameters; |
---|
| 471 | #if !VPS_RENAME |
---|
| 472 | UInt m_maxNuhReservedZeroLayerId; |
---|
| 473 | #endif |
---|
| 474 | TComHRD* m_hrdParameters; |
---|
| 475 | UInt* m_hrdOpSetIdx; |
---|
| 476 | Bool* m_cprmsPresentFlag; |
---|
[494] | 477 | #if !SVC_EXTENSION |
---|
[313] | 478 | UInt m_numOpSets; |
---|
| 479 | Bool m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1]; |
---|
| 480 | #endif |
---|
[494] | 481 | TComPTL m_pcPTL; |
---|
| 482 | TimingInfo m_timingInfo; |
---|
| 483 | |
---|
| 484 | #if SVC_EXTENSION |
---|
[313] | 485 | #if DERIVE_LAYER_ID_LIST_VARIABLES |
---|
| 486 | Int m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 487 | Int m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
| 488 | #endif |
---|
[588] | 489 | #if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED |
---|
[442] | 490 | #if VPS_EXTN_OFFSET |
---|
| 491 | UInt m_extensionOffset; |
---|
| 492 | #endif |
---|
[588] | 493 | #endif |
---|
[494] | 494 | #if VPS_RENAME |
---|
| 495 | UInt m_maxLayerId; |
---|
| 496 | UInt m_numLayerSets; |
---|
| 497 | Bool m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 498 | #endif |
---|
[313] | 499 | |
---|
| 500 | // ------------------------------------------ |
---|
| 501 | // Variables related to VPS extensions |
---|
| 502 | // ------------------------------------------ |
---|
| 503 | #if VPS_EXTN_MASK_AND_DIM_INFO |
---|
| 504 | Bool m_avcBaseLayerFlag; // For now, always set to true. |
---|
| 505 | Bool m_splittingFlag; |
---|
| 506 | Bool m_scalabilityMask[MAX_VPS_NUM_SCALABILITY_TYPES]; |
---|
| 507 | UInt m_dimensionIdLen[MAX_VPS_NUM_SCALABILITY_TYPES]; |
---|
| 508 | Bool m_nuhLayerIdPresentFlag; |
---|
| 509 | UInt m_layerIdInNuh[MAX_VPS_LAYER_ID_PLUS1]; // Maps layer ID in the VPS with layer_id_in_nuh |
---|
| 510 | UInt m_dimensionId[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_NUM_SCALABILITY_TYPES]; |
---|
| 511 | |
---|
| 512 | // Below are derived variables |
---|
| 513 | UInt m_numScalabilityTypes; |
---|
| 514 | UInt m_layerIdInVps[MAX_VPS_LAYER_ID_PLUS1]; // Maps layer_id_in_nuh with the layer ID in the VPS |
---|
| 515 | #endif |
---|
[345] | 516 | #if ILP_SSH_SIG |
---|
| 517 | Bool m_ilpSshSignalingEnabledFlag; |
---|
| 518 | #endif |
---|
[313] | 519 | #if VPS_EXTN_PROFILE_INFO |
---|
| 520 | // Profile-tier-level signalling related |
---|
| 521 | Bool m_profilePresentFlag[MAX_VPS_LAYER_SETS_PLUS1]; // The value with index 0 will not be used. |
---|
[588] | 522 | #if !P0048_REMOVE_PROFILE_REF |
---|
[313] | 523 | UInt m_profileLayerSetRef[MAX_VPS_LAYER_SETS_PLUS1]; // The value with index 0 will not be used. |
---|
[588] | 524 | #endif |
---|
[313] | 525 | std::vector<TComPTL> m_pcPTLForExtn; |
---|
| 526 | #endif |
---|
| 527 | #if VPS_EXTN_OP_LAYER_SETS |
---|
| 528 | // .. More declarations here |
---|
| 529 | // Target output layer signalling related |
---|
| 530 | UInt m_numOutputLayerSets; |
---|
| 531 | UInt m_outputLayerSetIdx[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
| 532 | Bool m_outputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 533 | #endif |
---|
| 534 | #if VPS_EXTN_DIRECT_REF_LAYERS |
---|
| 535 | Bool m_directDependencyFlag[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 536 | UInt m_numDirectRefLayers[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 537 | UInt m_refLayerId[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 538 | UInt m_directDepTypeLen; |
---|
[540] | 539 | #if O0096_DEFAULT_DEPENDENCY_TYPE |
---|
| 540 | Bool m_defaultDirectDependencyTypeFlag; |
---|
| 541 | UInt m_defaultDirectDependencyType; |
---|
| 542 | #endif |
---|
[313] | 543 | UInt m_directDependencyType[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 544 | #endif |
---|
| 545 | UInt m_numProfileTierLevel; |
---|
[588] | 546 | #if !VPS_EXTN_UEV_CODING |
---|
[313] | 547 | Bool m_moreOutputLayerSetsThanDefaultFlag; |
---|
[588] | 548 | #endif |
---|
[313] | 549 | Int m_numAddOutputLayerSets; |
---|
[588] | 550 | #if P0295_DEFAULT_OUT_LAYER_IDC |
---|
| 551 | UInt m_defaultTargetOutputLayerIdc; |
---|
| 552 | #else |
---|
[547] | 553 | #if O0109_DEFAULT_ONE_OUT_LAYER_IDC |
---|
| 554 | UInt m_defaultOneTargetOutputLayerIdc; |
---|
| 555 | #else |
---|
[313] | 556 | Bool m_defaultOneTargetOutputLayerFlag; |
---|
[547] | 557 | #endif |
---|
[588] | 558 | #endif |
---|
[313] | 559 | Int m_profileLevelTierIdx[64]; |
---|
| 560 | Bool m_maxOneActiveRefLayerFlag; |
---|
[494] | 561 | #if O0062_POC_LSB_NOT_PRESENT_FLAG |
---|
| 562 | Bool m_pocLsbNotPresentFlag[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 563 | #endif |
---|
[540] | 564 | #if O0223_PICTURE_TYPES_ALIGN_FLAG |
---|
| 565 | Bool m_crossLayerPictureTypeAlignFlag; |
---|
| 566 | #endif |
---|
[442] | 567 | #if N0147_IRAP_ALIGN_FLAG |
---|
| 568 | Bool m_crossLayerIrapAlignFlag; |
---|
| 569 | #endif |
---|
[644] | 570 | #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG |
---|
| 571 | Bool m_crossLayerAlignedIdrOnlyFlag; |
---|
| 572 | #endif |
---|
[494] | 573 | #if O0225_MAX_TID_FOR_REF_LAYERS |
---|
| 574 | UInt m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 575 | #else |
---|
[442] | 576 | UInt m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1]; |
---|
[313] | 577 | #endif |
---|
[345] | 578 | #if N0120_MAX_TID_REF_PRESENT_FLAG |
---|
[442] | 579 | Bool m_maxTidRefPresentFlag; |
---|
[345] | 580 | #endif |
---|
[540] | 581 | #if VPS_TSLAYERS |
---|
| 582 | Bool m_maxTSLayersPresentFlag; |
---|
| 583 | UInt m_maxTSLayerMinus1[MAX_VPS_LAYER_ID_PLUS1 - 1]; |
---|
| 584 | #endif |
---|
[313] | 585 | #if M0040_ADAPTIVE_RESOLUTION_CHANGE |
---|
| 586 | Bool m_singleLayerForNonIrapFlag; |
---|
| 587 | #endif |
---|
[540] | 588 | #if HIGHER_LAYER_IRAP_SKIP_FLAG |
---|
| 589 | Bool m_higherLayerIrapSkipFlag; |
---|
| 590 | #endif |
---|
| 591 | #if VPS_VUI_TILES_NOT_IN_USE__FLAG |
---|
| 592 | Bool m_tilesNotInUseFlag; |
---|
| 593 | Bool m_tilesInUseFlag[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 594 | Bool m_loopFilterNotAcrossTilesFlag[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 595 | #endif |
---|
[442] | 596 | #if TILE_BOUNDARY_ALIGNED_FLAG |
---|
| 597 | Bool m_tileBoundariesAlignedFlag[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 598 | #endif |
---|
[540] | 599 | #if VPS_VUI_WPP_NOT_IN_USE__FLAG |
---|
| 600 | Bool m_wppNotInUseFlag; |
---|
| 601 | Bool m_wppInUseFlag[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 602 | #endif |
---|
[442] | 603 | #if N0160_VUI_EXT_ILP_REF |
---|
[644] | 604 | Bool m_ilpRestrictedRefLayersFlag; |
---|
| 605 | Int m_minSpatialSegmentOffsetPlus1[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 606 | Bool m_ctuBasedOffsetEnabledFlag [MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 607 | Int m_minHorizontalCtuOffsetPlus1 [MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
[442] | 608 | #endif |
---|
[540] | 609 | #if VPS_VUI_VIDEO_SIGNAL |
---|
[644] | 610 | Bool m_vidSigPresentVpsFlag; |
---|
| 611 | Int m_vpsVidSigInfo; |
---|
| 612 | Int m_vpsVidSigIdx[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 613 | Int m_vpsVidFormat[16]; |
---|
| 614 | Bool m_vpsFullRangeFlag[16]; |
---|
| 615 | Int m_vpsColorPrimaries[16]; |
---|
| 616 | Int m_vpsTransChar[16]; |
---|
| 617 | Int m_vpsMatCoeff[16]; |
---|
[540] | 618 | #endif |
---|
[442] | 619 | #if VPS_VUI_BITRATE_PICRATE |
---|
[644] | 620 | Bool m_bitRatePresentVpsFlag; |
---|
| 621 | Bool m_picRatePresentVpsFlag; |
---|
| 622 | Bool m_bitRatePresentFlag [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
| 623 | Bool m_picRatePresentFlag [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
| 624 | Int m_avgBitRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
| 625 | Int m_maxBitRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
| 626 | Int m_constPicRateIdc [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
| 627 | Int m_avgPicRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
[442] | 628 | #endif |
---|
[644] | 629 | |
---|
| 630 | #if P0312_VERT_PHASE_ADJ |
---|
| 631 | Bool m_vpsVuiVertPhaseInUseFlag; |
---|
| 632 | #endif |
---|
| 633 | |
---|
| 634 | #if P0300_ALT_OUTPUT_LAYER_FLAG |
---|
| 635 | Bool m_altOutputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
| 636 | #else |
---|
[540] | 637 | #if O0153_ALT_OUTPUT_LAYER_FLAG |
---|
| 638 | Bool m_altOutputLayerFlag; |
---|
| 639 | #endif |
---|
[644] | 640 | #endif |
---|
[442] | 641 | #if REPN_FORMAT_IN_VPS |
---|
| 642 | Bool m_repFormatIdxPresentFlag; |
---|
| 643 | Int m_vpsNumRepFormats; // coded as minus1 |
---|
| 644 | RepFormat m_vpsRepFormat[16]; |
---|
| 645 | Int m_vpsRepFormatIdx[16]; |
---|
| 646 | #endif |
---|
| 647 | #if VIEW_ID_RELATED_SIGNALING |
---|
[547] | 648 | #if O0109_VIEW_ID_LEN |
---|
[644] | 649 | Int m_viewIdLen; |
---|
[547] | 650 | #else |
---|
[644] | 651 | Int m_viewIdLenMinus1; |
---|
[547] | 652 | #endif |
---|
[644] | 653 | Int m_viewIdVal [MAX_LAYERS]; |
---|
[442] | 654 | #endif |
---|
[494] | 655 | |
---|
| 656 | #if O0215_PHASE_ALIGNMENT |
---|
| 657 | Bool m_phaseAlignFlag; |
---|
| 658 | #endif |
---|
[540] | 659 | |
---|
| 660 | #if O0092_0094_DEPENDENCY_CONSTRAINT |
---|
| 661 | Int m_numberRefLayers[MAX_NUM_LAYER_IDS]; // number of direct and indirect reference layers of a coding layer |
---|
| 662 | Bool m_recursiveRefLayerFlag[MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; // flag to indicate if j-th layer is a direct or indirect reference layer of i-th layer |
---|
| 663 | #endif |
---|
[644] | 664 | #if SPS_DPB_PARAMS |
---|
| 665 | Int m_TolsIdx; |
---|
| 666 | #endif |
---|
[540] | 667 | #if VPS_DPB_SIZE_TABLE |
---|
[644] | 668 | Bool m_subLayerFlagInfoPresentFlag [MAX_VPS_OP_LAYER_SETS_PLUS1]; |
---|
| 669 | Bool m_subLayerDpbInfoPresentFlag [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; |
---|
| 670 | Int m_maxVpsDecPicBufferingMinus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS][MAX_TLAYER]; |
---|
[588] | 671 | #if RESOLUTION_BASED_DPB |
---|
[644] | 672 | Int m_maxVpsLayerDecPicBuffMinus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS][MAX_TLAYER]; |
---|
[588] | 673 | #endif |
---|
[644] | 674 | Int m_maxVpsNumReorderPics [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; |
---|
| 675 | Int m_maxVpsLatencyIncreasePlus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; |
---|
[588] | 676 | #if CHANGE_NUMSUBDPB_IDX |
---|
[644] | 677 | Int m_numSubDpbs [MAX_VPS_LAYER_SETS_PLUS1]; |
---|
[588] | 678 | #else |
---|
[644] | 679 | Int m_numSubDpbs [MAX_VPS_OP_LAYER_SETS_PLUS1]; |
---|
[540] | 680 | #endif |
---|
[588] | 681 | #endif |
---|
[547] | 682 | |
---|
| 683 | #if O0109_MOVE_VPS_VUI_FLAG |
---|
| 684 | Bool m_vpsVuiPresentFlag; |
---|
| 685 | #endif |
---|
| 686 | |
---|
[644] | 687 | #if O0164_MULTI_LAYER_HRD |
---|
| 688 | Bool m_vpsVuiBspHrdPresentFlag; |
---|
| 689 | UInt m_vpsNumBspHrdParametersMinus1; |
---|
| 690 | Bool m_bspCprmsPresentFlag[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
| 691 | TComHRD *m_bspHrd; |
---|
| 692 | UInt m_numBitstreamPartitions[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
| 693 | Bool m_layerInBspFlag[MAX_VPS_LAYER_SETS_PLUS1][8][MAX_LAYERS]; |
---|
| 694 | UInt m_numBspSchedCombinations[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
| 695 | UInt m_bspCombHrdIdx[MAX_VPS_LAYER_SETS_PLUS1][16][16]; |
---|
| 696 | UInt m_bspCombSchedIdx[MAX_VPS_LAYER_SETS_PLUS1][16][16]; |
---|
| 697 | #endif |
---|
| 698 | |
---|
| 699 | #if P0182_VPS_VUI_PS_FLAG |
---|
| 700 | UInt m_SPSId[MAX_LAYERS]; |
---|
| 701 | UInt m_PPSId[MAX_LAYERS]; |
---|
| 702 | UInt m_baseLayerPSCompatibilityFlag[MAX_LAYERS]; |
---|
| 703 | #endif |
---|
| 704 | |
---|
[588] | 705 | #if !P0307_REMOVE_VPS_VUI_OFFSET |
---|
[547] | 706 | #if VPS_VUI_OFFSET |
---|
[644] | 707 | Int m_vpsVuiOffset; |
---|
[547] | 708 | #endif |
---|
[588] | 709 | #endif |
---|
| 710 | #if P0307_VPS_NON_VUI_EXTENSION |
---|
[644] | 711 | Int m_vpsNonVuiExtLength; |
---|
[588] | 712 | #endif |
---|
| 713 | #if RESOLUTION_BASED_DPB |
---|
[644] | 714 | Int m_subDpbAssigned [MAX_VPS_LAYER_SETS_PLUS1][MAX_LAYERS]; |
---|
[588] | 715 | #endif |
---|
| 716 | #endif //SVC_EXTENSION |
---|
[313] | 717 | public: |
---|
| 718 | TComVPS(); |
---|
| 719 | virtual ~TComVPS(); |
---|
| 720 | |
---|
| 721 | Void createHrdParamBuffer() |
---|
| 722 | { |
---|
| 723 | m_hrdParameters = new TComHRD[ getNumHrdParameters() ]; |
---|
| 724 | m_hrdOpSetIdx = new UInt [ getNumHrdParameters() ]; |
---|
| 725 | m_cprmsPresentFlag = new Bool [ getNumHrdParameters() ]; |
---|
| 726 | } |
---|
| 727 | |
---|
[644] | 728 | #if O0164_MULTI_LAYER_HRD |
---|
| 729 | Void createBspHrdParamBuffer(UInt numHrds) |
---|
| 730 | { |
---|
| 731 | m_bspHrd = new TComHRD[ numHrds ]; |
---|
| 732 | // m_hrdOpSetIdx = new UInt [ getNumHrdParameters() ]; |
---|
| 733 | // m_cprmsPresentFlag = new Bool [ getNumHrdParameters() ]; |
---|
| 734 | } |
---|
| 735 | #endif |
---|
| 736 | |
---|
[313] | 737 | TComHRD* getHrdParameters ( UInt i ) { return &m_hrdParameters[ i ]; } |
---|
| 738 | UInt getHrdOpSetIdx ( UInt i ) { return m_hrdOpSetIdx[ i ]; } |
---|
| 739 | Void setHrdOpSetIdx ( UInt val, UInt i ) { m_hrdOpSetIdx[ i ] = val; } |
---|
| 740 | Bool getCprmsPresentFlag ( UInt i ) { return m_cprmsPresentFlag[ i ]; } |
---|
| 741 | Void setCprmsPresentFlag ( Bool val, UInt i ) { m_cprmsPresentFlag[ i ] = val; } |
---|
| 742 | |
---|
| 743 | Int getVPSId () { return m_VPSId; } |
---|
| 744 | Void setVPSId (Int i) { m_VPSId = i; } |
---|
| 745 | |
---|
| 746 | UInt getMaxTLayers () { return m_uiMaxTLayers; } |
---|
| 747 | Void setMaxTLayers (UInt t) { m_uiMaxTLayers = t; } |
---|
| 748 | |
---|
| 749 | UInt getMaxLayers () { return m_uiMaxLayers; } |
---|
| 750 | Void setMaxLayers (UInt l) { m_uiMaxLayers = l; } |
---|
| 751 | |
---|
| 752 | Bool getTemporalNestingFlag () { return m_bTemporalIdNestingFlag; } |
---|
| 753 | Void setTemporalNestingFlag (Bool t) { m_bTemporalIdNestingFlag = t; } |
---|
| 754 | |
---|
| 755 | Void setNumReorderPics(UInt v, UInt tLayer) { m_numReorderPics[tLayer] = v; } |
---|
| 756 | UInt getNumReorderPics(UInt tLayer) { return m_numReorderPics[tLayer]; } |
---|
| 757 | |
---|
[595] | 758 | Void setMaxDecPicBuffering(UInt v, UInt tLayer) { assert(tLayer < MAX_TLAYER); m_uiMaxDecPicBuffering[tLayer] = v; } |
---|
[313] | 759 | UInt getMaxDecPicBuffering(UInt tLayer) { return m_uiMaxDecPicBuffering[tLayer]; } |
---|
| 760 | |
---|
| 761 | Void setMaxLatencyIncrease(UInt v, UInt tLayer) { m_uiMaxLatencyIncrease[tLayer] = v; } |
---|
| 762 | UInt getMaxLatencyIncrease(UInt tLayer) { return m_uiMaxLatencyIncrease[tLayer]; } |
---|
| 763 | |
---|
| 764 | UInt getNumHrdParameters() { return m_numHrdParameters; } |
---|
| 765 | Void setNumHrdParameters(UInt v) { m_numHrdParameters = v; } |
---|
[494] | 766 | |
---|
| 767 | #if !SVC_EXTENSION |
---|
[313] | 768 | UInt getMaxNuhReservedZeroLayerId() { return m_maxNuhReservedZeroLayerId; } |
---|
| 769 | Void setMaxNuhReservedZeroLayerId(UInt v) { m_maxNuhReservedZeroLayerId = v; } |
---|
| 770 | |
---|
| 771 | UInt getMaxOpSets() { return m_numOpSets; } |
---|
| 772 | Void setMaxOpSets(UInt v) { m_numOpSets = v; } |
---|
| 773 | #endif |
---|
| 774 | Bool getLayerIdIncludedFlag(UInt opsIdx, UInt id) { return m_layerIdIncludedFlag[opsIdx][id]; } |
---|
| 775 | Void setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id) { m_layerIdIncludedFlag[opsIdx][id] = v; } |
---|
[494] | 776 | |
---|
| 777 | TComPTL* getPTL() { return &m_pcPTL; } |
---|
| 778 | TimingInfo* getTimingInfo() { return &m_timingInfo; } |
---|
| 779 | |
---|
| 780 | #if SVC_EXTENSION |
---|
[313] | 781 | #if DERIVE_LAYER_ID_LIST_VARIABLES |
---|
| 782 | Int getLayerSetLayerIdList(Int set, Int layerId) { return m_layerSetLayerIdList[set][layerId]; } |
---|
| 783 | Void setLayerSetLayerIdList(Int set, Int layerId, Int x) { m_layerSetLayerIdList[set][layerId] = x ; } |
---|
| 784 | |
---|
| 785 | Int getNumLayersInIdList(Int set) { return m_numLayerInIdList[set]; } |
---|
| 786 | Void setNumLayersInIdList(Int set, Int x) { m_numLayerInIdList[set] = x ; } |
---|
| 787 | |
---|
| 788 | Void deriveLayerIdListVariables(); |
---|
| 789 | #endif |
---|
[540] | 790 | #if VPS_DPB_SIZE_TABLE |
---|
| 791 | Void deriveNumberOfSubDpbs(); |
---|
| 792 | #endif |
---|
[442] | 793 | |
---|
[540] | 794 | #if O0092_0094_DEPENDENCY_CONSTRAINT |
---|
| 795 | Void setRefLayersFlags(Int currLayerId); |
---|
| 796 | Bool getRecursiveRefLayerFlag(Int currLayerId, Int refLayerId) { return m_recursiveRefLayerFlag[currLayerId][refLayerId];} |
---|
| 797 | Void setRecursiveRefLayerFlag(Int currLayerId, Int refLayerId, Bool x) { m_recursiveRefLayerFlag[currLayerId][refLayerId] = x; } |
---|
| 798 | Int getNumRefLayers(Int currLayerId) { return m_numberRefLayers[currLayerId]; } |
---|
| 799 | Void setNumRefLayers(Int currLayerId); |
---|
[442] | 800 | #endif |
---|
[494] | 801 | #if VPS_RENAME |
---|
| 802 | UInt getMaxLayerId() { return m_maxLayerId; } |
---|
| 803 | Void setMaxLayerId(UInt v) { m_maxLayerId = v; } |
---|
| 804 | |
---|
| 805 | UInt getNumLayerSets() { return m_numLayerSets; } |
---|
| 806 | Void setNumLayerSets(UInt v) { m_numLayerSets = v; } |
---|
| 807 | #endif |
---|
[313] | 808 | #if VPS_EXTN_MASK_AND_DIM_INFO |
---|
| 809 | Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } |
---|
| 810 | Void setAvcBaseLayerFlag(Bool x) { m_avcBaseLayerFlag = x; } |
---|
| 811 | |
---|
| 812 | Bool getSplittingFlag() { return m_splittingFlag; } |
---|
| 813 | Void setSplittingFlag(Bool x) { m_splittingFlag = x; } |
---|
| 814 | |
---|
| 815 | Bool getScalabilityMask(Int id) { return m_scalabilityMask[id]; } |
---|
| 816 | Void setScalabilityMask(Int id, Bool x) { m_scalabilityMask[id] = x; } |
---|
| 817 | |
---|
| 818 | UInt getDimensionIdLen(Int id) { return m_dimensionIdLen[id]; } |
---|
| 819 | Void setDimensionIdLen(Int id, UInt x) { m_dimensionIdLen[id] = x; } |
---|
| 820 | |
---|
| 821 | Bool getNuhLayerIdPresentFlag() { return m_nuhLayerIdPresentFlag; } |
---|
| 822 | Void setNuhLayerIdPresentFlag(Bool x) { m_nuhLayerIdPresentFlag = x; } |
---|
| 823 | |
---|
| 824 | UInt getLayerIdInNuh(Int id) { return m_layerIdInNuh[id]; } |
---|
| 825 | Void setLayerIdInNuh(Int id, UInt x) { m_layerIdInNuh[id] = x; } |
---|
| 826 | |
---|
| 827 | UInt getDimensionId(Int lyrId, Int id) { return m_dimensionId[lyrId][id]; } |
---|
| 828 | Void setDimensionId(Int lyrId, Int id, UInt x) { m_dimensionId[lyrId][id] = x; } |
---|
| 829 | |
---|
| 830 | UInt getNumScalabilityTypes() { return m_numScalabilityTypes; } |
---|
| 831 | Void setNumScalabilityTypes(UInt x) { m_numScalabilityTypes = x; } |
---|
| 832 | |
---|
| 833 | UInt getLayerIdInVps(Int id) { return m_layerIdInVps[id]; } |
---|
| 834 | Void setLayerIdInVps(Int id, UInt x) { m_layerIdInVps[id] = x; } |
---|
| 835 | #endif |
---|
[345] | 836 | #if ILP_SSH_SIG |
---|
| 837 | Bool getIlpSshSignalingEnabledFlag() { return m_ilpSshSignalingEnabledFlag;} |
---|
| 838 | Void setIlpSshSignalingEnabledFlag(Bool x) { m_ilpSshSignalingEnabledFlag = x;} |
---|
| 839 | #endif |
---|
[313] | 840 | #if VPS_EXTN_PROFILE_INFO |
---|
| 841 | Bool getProfilePresentFlag(Int id) { return m_profilePresentFlag[id]; } |
---|
| 842 | Void setProfilePresentFlag(Int id, Bool x) { m_profilePresentFlag[id] = x; } |
---|
| 843 | |
---|
[588] | 844 | #if !P0048_REMOVE_PROFILE_REF |
---|
[313] | 845 | UInt getProfileLayerSetRef(Int id) { return m_profileLayerSetRef[id]; } |
---|
| 846 | Void setProfileLayerSetRef(Int id, Bool x) { m_profileLayerSetRef[id] = x; } |
---|
[588] | 847 | #endif |
---|
[313] | 848 | |
---|
| 849 | std::vector<TComPTL>* getPTLForExtnPtr() { return &m_pcPTLForExtn; } |
---|
| 850 | TComPTL* getPTLForExtn(Int id) { return &m_pcPTLForExtn[id]; } |
---|
| 851 | #endif |
---|
| 852 | #if VPS_EXTN_OP_LAYER_SETS |
---|
| 853 | // Target output layer signalling related |
---|
| 854 | UInt getNumOutputLayerSets() { return m_numOutputLayerSets; } |
---|
| 855 | Void setNumOutputLayerSets(Int x) { m_numOutputLayerSets = x; } |
---|
| 856 | |
---|
| 857 | UInt getOutputLayerSetIdx(Int idx) { return m_outputLayerSetIdx[idx]; } |
---|
| 858 | Void setOutputLayerSetIdx(Int idx, UInt x) { m_outputLayerSetIdx[idx] = x; } |
---|
| 859 | |
---|
| 860 | Bool getOutputLayerFlag(Int layerSet, Int layerId) { return m_outputLayerFlag[layerSet][layerId]; } |
---|
| 861 | Void setOutputLayerFlag(Int layerSet, Int layerId, Bool x) { m_outputLayerFlag[layerSet][layerId] = x; } |
---|
| 862 | #endif |
---|
| 863 | #if VPS_EXTN_DIRECT_REF_LAYERS |
---|
| 864 | // Direct dependency of layers |
---|
| 865 | Bool getDirectDependencyFlag(Int currLayerId, Int refLayerId) { return m_directDependencyFlag[currLayerId][refLayerId]; } |
---|
| 866 | Void setDirectDependencyFlag(Int currLayerId, Int refLayerId, Bool x) { m_directDependencyFlag[currLayerId][refLayerId] = x; } |
---|
| 867 | |
---|
| 868 | UInt getNumDirectRefLayers(Int layerId) { return m_numDirectRefLayers[layerId]; } |
---|
| 869 | Void setNumDirectRefLayers(Int layerId, UInt refLayerNum) { m_numDirectRefLayers[layerId] = refLayerNum; } |
---|
| 870 | |
---|
| 871 | UInt getRefLayerId(Int layerId, Int refLayerIdx) { return m_refLayerId[layerId][refLayerIdx]; } |
---|
| 872 | Void setRefLayerId(Int layerId, Int refLayerIdx, UInt refLayerId) { m_refLayerId[layerId][refLayerIdx] = refLayerId; } |
---|
| 873 | |
---|
| 874 | UInt getDirectDepTypeLen() { return m_directDepTypeLen; } |
---|
| 875 | Void setDirectDepTypeLen(UInt x) { m_directDepTypeLen = x; } |
---|
[540] | 876 | #if O0096_DEFAULT_DEPENDENCY_TYPE |
---|
| 877 | Bool getDefaultDirectDependencyTypeFlag() { return m_defaultDirectDependencyTypeFlag; } |
---|
| 878 | Void setDefaultDirectDependecyTypeFlag(Bool x) { m_defaultDirectDependencyTypeFlag = x; } |
---|
| 879 | UInt getDefaultDirectDependencyType() { return m_defaultDirectDependencyType; } |
---|
| 880 | Void setDefaultDirectDependecyType(UInt x) { m_defaultDirectDependencyType = x; } |
---|
| 881 | #endif |
---|
[313] | 882 | UInt getDirectDependencyType(Int currLayerId, Int refLayerId) { return m_directDependencyType[currLayerId][refLayerId]; } |
---|
| 883 | Void setDirectDependencyType(Int currLayerId, Int refLayerId, UInt x) { m_directDependencyType[currLayerId][refLayerId] = x; } |
---|
| 884 | #endif |
---|
| 885 | UInt getNumProfileTierLevel() { return m_numProfileTierLevel; } |
---|
| 886 | Void setNumProfileTierLevel(Int x) { m_numProfileTierLevel = x; } |
---|
| 887 | |
---|
[588] | 888 | #if !VPS_EXTN_UEV_CODING |
---|
[313] | 889 | Bool getMoreOutputLayerSetsThanDefaultFlag() { return m_moreOutputLayerSetsThanDefaultFlag;} |
---|
| 890 | Void setMoreOutputLayerSetsThanDefaultFlag(Bool x) { m_moreOutputLayerSetsThanDefaultFlag = x ;} |
---|
[588] | 891 | #endif |
---|
[313] | 892 | |
---|
| 893 | Int getNumAddOutputLayerSets() { return m_numAddOutputLayerSets; } |
---|
| 894 | Void setNumAddOutputLayerSets(Int x) { m_numAddOutputLayerSets = x ; } |
---|
| 895 | |
---|
[588] | 896 | #if P0295_DEFAULT_OUT_LAYER_IDC |
---|
| 897 | UInt getDefaultTargetOutputLayerIdc() { return m_defaultTargetOutputLayerIdc;} |
---|
| 898 | Void setDefaultTargetOutputLayerIdc(UInt x) { m_defaultTargetOutputLayerIdc = x ;} |
---|
| 899 | #else |
---|
[547] | 900 | #if O0109_DEFAULT_ONE_OUT_LAYER_IDC |
---|
| 901 | UInt getDefaultOneTargetOutputLayerIdc() { return m_defaultOneTargetOutputLayerIdc;} |
---|
| 902 | Void setDefaultOneTargetOutputLayerIdc(UInt x) { m_defaultOneTargetOutputLayerIdc= x ;} |
---|
| 903 | #else |
---|
[313] | 904 | Bool getDefaultOneTargetOutputLayerFlag() { return m_defaultOneTargetOutputLayerFlag;} |
---|
| 905 | Void setDefaultOneTargetOutputLayerFlag(Bool x) { m_defaultOneTargetOutputLayerFlag= x ;} |
---|
[547] | 906 | #endif |
---|
[588] | 907 | #endif |
---|
[313] | 908 | Int getProfileLevelTierIdx(Int i) { return m_profileLevelTierIdx[i]; } |
---|
| 909 | Void setProfileLevelTierIdx(Int i, Int x) { m_profileLevelTierIdx[i] = x ; } |
---|
| 910 | Bool getMaxOneActiveRefLayerFlag() { return m_maxOneActiveRefLayerFlag; } |
---|
| 911 | Void setMaxOneActiveRefLayerFlag(Bool x) { m_maxOneActiveRefLayerFlag = x; } |
---|
[494] | 912 | #if O0062_POC_LSB_NOT_PRESENT_FLAG |
---|
| 913 | UInt getPocLsbNotPresentFlag(Int i) { return m_pocLsbNotPresentFlag[i]; } |
---|
| 914 | Void setPocLsbNotPresentFlag(Int i, Bool x) { m_pocLsbNotPresentFlag[i] = x; } |
---|
| 915 | #endif |
---|
[540] | 916 | #if O0223_PICTURE_TYPES_ALIGN_FLAG |
---|
| 917 | Bool getCrossLayerPictureTypeAlignFlag() { return m_crossLayerPictureTypeAlignFlag; } |
---|
| 918 | Void setCrossLayerPictureTypeAlignFlag(Bool x) { m_crossLayerPictureTypeAlignFlag = x; } |
---|
| 919 | #endif |
---|
[644] | 920 | #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG |
---|
| 921 | Bool getCrossLayerAlignedIdrOnlyFlag() { return m_crossLayerAlignedIdrOnlyFlag; } |
---|
| 922 | Void setCrossLayerAlignedIdrOnlyFlag(Bool x) { m_crossLayerAlignedIdrOnlyFlag = x; } |
---|
| 923 | #endif |
---|
[442] | 924 | #if N0147_IRAP_ALIGN_FLAG |
---|
| 925 | Bool getCrossLayerIrapAlignFlag() { return m_crossLayerIrapAlignFlag; } |
---|
| 926 | Void setCrossLayerIrapAlignFlag(Bool x) { m_crossLayerIrapAlignFlag = x; } |
---|
| 927 | #endif |
---|
[494] | 928 | #if O0225_MAX_TID_FOR_REF_LAYERS |
---|
| 929 | UInt getMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId) { return m_maxTidIlRefPicsPlus1[layerId][refLayerId]; } |
---|
| 930 | Void setMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId, UInt maxSublayer) { m_maxTidIlRefPicsPlus1[layerId][refLayerId] = maxSublayer; } |
---|
| 931 | #else |
---|
[442] | 932 | UInt getMaxTidIlRefPicsPlus1(Int layerId) { return m_maxTidIlRefPicsPlus1[layerId]; } |
---|
| 933 | Void setMaxTidIlRefPicsPlus1(Int layerId, UInt maxSublayer) { m_maxTidIlRefPicsPlus1[layerId] = maxSublayer; } |
---|
[313] | 934 | #endif |
---|
[345] | 935 | #if N0120_MAX_TID_REF_PRESENT_FLAG |
---|
[442] | 936 | Bool getMaxTidRefPresentFlag() { return m_maxTidRefPresentFlag ;} |
---|
| 937 | Void setMaxTidRefPresentFlag(Bool x) { m_maxTidRefPresentFlag = x;} |
---|
[345] | 938 | #endif |
---|
[540] | 939 | #if VPS_TSLAYERS |
---|
[644] | 940 | Bool getMaxTSLayersPresentFlag() { return m_maxTSLayersPresentFlag ;} |
---|
| 941 | Void setMaxTSLayersPresentFlag(Bool x) { m_maxTSLayersPresentFlag = x;} |
---|
| 942 | UInt getMaxTSLayersMinus1(Int layerId) { return m_maxTSLayerMinus1[layerId];} |
---|
| 943 | Void setMaxTSLayersMinus1(Int layerId, UInt maxTSublayer) { m_maxTSLayerMinus1[layerId] = maxTSublayer;} |
---|
[540] | 944 | #endif |
---|
[313] | 945 | #if M0040_ADAPTIVE_RESOLUTION_CHANGE |
---|
| 946 | Bool getSingleLayerForNonIrapFlag() { return m_singleLayerForNonIrapFlag; } |
---|
| 947 | Void setSingleLayerForNonIrapFlag(Bool x) { m_singleLayerForNonIrapFlag = x; } |
---|
| 948 | #endif |
---|
[540] | 949 | #if HIGHER_LAYER_IRAP_SKIP_FLAG |
---|
| 950 | Bool getHigherLayerIrapSkipFlag() { return m_higherLayerIrapSkipFlag; } |
---|
| 951 | Void setHigherLayerIrapSkipFlag(Bool x) { m_higherLayerIrapSkipFlag = x; } |
---|
| 952 | #endif |
---|
| 953 | #if VPS_VUI_TILES_NOT_IN_USE__FLAG |
---|
| 954 | Bool getTilesNotInUseFlag() { return m_tilesNotInUseFlag; } |
---|
| 955 | Void setTilesNotInUseFlag(Bool x); |
---|
| 956 | Bool getTilesInUseFlag(Int currLayerId) { return m_tilesInUseFlag[currLayerId]; } |
---|
| 957 | Void setTilesInUseFlag(Int currLayerId, Bool x) { m_tilesInUseFlag[currLayerId] = x; } |
---|
| 958 | Bool getLoopFilterNotAcrossTilesFlag(Int currLayerId) { return m_loopFilterNotAcrossTilesFlag[currLayerId]; } |
---|
| 959 | Void setLoopFilterNotAcrossTilesFlag(Int currLayerId, Bool x) { m_loopFilterNotAcrossTilesFlag[currLayerId] = x; } |
---|
| 960 | #endif |
---|
[442] | 961 | #if TILE_BOUNDARY_ALIGNED_FLAG |
---|
| 962 | Bool getTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId) { return m_tileBoundariesAlignedFlag[currLayerId][refLayerId]; } |
---|
| 963 | Void setTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId, Bool x) { m_tileBoundariesAlignedFlag[currLayerId][refLayerId] = x; } |
---|
| 964 | #endif |
---|
[540] | 965 | #if VPS_VUI_WPP_NOT_IN_USE__FLAG |
---|
| 966 | Bool getWppNotInUseFlag() { return m_wppNotInUseFlag; } |
---|
| 967 | Void setWppNotInUseFlag(Bool x); |
---|
| 968 | Bool getWppInUseFlag(Int currLayerId) { return m_wppInUseFlag[currLayerId]; } |
---|
| 969 | Void setWppInUseFlag(Int currLayerId, Bool x) { m_wppInUseFlag[currLayerId] = x; } |
---|
| 970 | #endif |
---|
[442] | 971 | #if N0160_VUI_EXT_ILP_REF |
---|
[644] | 972 | Bool getIlpRestrictedRefLayersFlag ( ) { return m_ilpRestrictedRefLayersFlag ;} |
---|
| 973 | Void setIlpRestrictedRefLayersFlag ( Int val ) { m_ilpRestrictedRefLayersFlag = val;} |
---|
[442] | 974 | |
---|
[644] | 975 | Int getMinSpatialSegmentOffsetPlus1( Int currLayerId, Int refLayerId ) { return m_minSpatialSegmentOffsetPlus1[currLayerId][refLayerId];} |
---|
| 976 | Void setMinSpatialSegmentOffsetPlus1( Int currLayerId, Int refLayerId, Int val ) { m_minSpatialSegmentOffsetPlus1[currLayerId][refLayerId] = val;} |
---|
[442] | 977 | |
---|
[644] | 978 | Bool getCtuBasedOffsetEnabledFlag ( Int currLayerId, Int refLayerId ) { return m_ctuBasedOffsetEnabledFlag[currLayerId][refLayerId];} |
---|
| 979 | Void setCtuBasedOffsetEnabledFlag ( Int currLayerId, Int refLayerId, Bool flag ) { m_ctuBasedOffsetEnabledFlag[currLayerId][refLayerId] = flag;} |
---|
[442] | 980 | |
---|
[644] | 981 | Int getMinHorizontalCtuOffsetPlus1 ( Int currLayerId, Int refLayerId ) { return m_minHorizontalCtuOffsetPlus1[currLayerId][refLayerId];} |
---|
| 982 | Void setMinHorizontalCtuOffsetPlus1 ( Int currLayerId, Int refLayerId, Int val ) { m_minHorizontalCtuOffsetPlus1[currLayerId][refLayerId] = val;} |
---|
[442] | 983 | #endif |
---|
[540] | 984 | #if VPS_VUI_VIDEO_SIGNAL |
---|
[644] | 985 | Bool getVideoSigPresentVpsFlag() { return m_vidSigPresentVpsFlag; } |
---|
| 986 | Void setVideoSigPresentVpsFlag(Bool x) { m_vidSigPresentVpsFlag = x; } |
---|
| 987 | Int getNumVideoSignalInfo() { return m_vpsVidSigInfo; } |
---|
| 988 | Void setNumVideoSignalInfo(Int x) { m_vpsVidSigInfo = x; } |
---|
| 989 | Int getVideoSignalInfoIdx(Int idx) { return m_vpsVidSigIdx[idx]; } |
---|
| 990 | Void setVideoSignalInfoIdx(Int idx, Int x) { m_vpsVidSigIdx[idx] = x; } |
---|
| 991 | Int getVideoVPSFormat(Int idx) { return m_vpsVidFormat[idx]; } |
---|
| 992 | Void setVideoVPSFormat(Int idx, Int x) { m_vpsVidFormat[idx] = x; } |
---|
| 993 | Bool getVideoFullRangeVpsFlag(Int idx) { return m_vpsFullRangeFlag[idx];} |
---|
| 994 | Void setVideoFullRangeVpsFlag(Int idx, Bool x) { m_vpsFullRangeFlag[idx] = x; } |
---|
| 995 | Int getColorPrimaries(Int idx) { return m_vpsColorPrimaries[idx]; } |
---|
| 996 | Void setColorPrimaries(Int idx, Int x) { m_vpsColorPrimaries[idx] = x; } |
---|
| 997 | Int getTransCharacter(Int idx) { return m_vpsTransChar[idx]; } |
---|
| 998 | Void setTransCharacter(Int idx, Int x) { m_vpsTransChar[idx] = x; } |
---|
| 999 | Int getMaxtrixCoeff(Int idx) { return m_vpsMatCoeff[idx]; } |
---|
| 1000 | Void setMaxtrixCoeff(Int idx, Int x) { m_vpsMatCoeff[idx] = x; } |
---|
[540] | 1001 | #endif |
---|
[442] | 1002 | #if VPS_VUI_BITRATE_PICRATE |
---|
[644] | 1003 | Bool getBitRatePresentVpsFlag() { return m_bitRatePresentVpsFlag; } |
---|
| 1004 | Void setBitRatePresentVpsFlag(Bool x) { m_bitRatePresentVpsFlag = x; } |
---|
| 1005 | Bool getPicRatePresentVpsFlag() { return m_picRatePresentVpsFlag; } |
---|
| 1006 | Void setPicRatePresentVpsFlag(Bool x) { m_picRatePresentVpsFlag = x; } |
---|
| 1007 | |
---|
| 1008 | Bool getBitRatePresentFlag(Int i, Int j) { return m_bitRatePresentFlag[i][j]; } |
---|
| 1009 | Void setBitRatePresentFlag(Int i, Int j, Bool x) { m_bitRatePresentFlag[i][j] = x; } |
---|
| 1010 | Bool getPicRatePresentFlag(Int i, Int j) { return m_picRatePresentFlag[i][j]; } |
---|
| 1011 | Void setPicRatePresentFlag(Int i, Int j, Bool x) { m_picRatePresentFlag[i][j] = x; } |
---|
| 1012 | |
---|
| 1013 | Int getAvgBitRate(Int i, Int j) { return m_avgBitRate[i][j]; } |
---|
| 1014 | Void setAvgBitRate(Int i, Int j, Int x) { m_avgBitRate[i][j] = x; } |
---|
| 1015 | Int getMaxBitRate(Int i, Int j) { return m_maxBitRate[i][j]; } |
---|
| 1016 | Void setMaxBitRate(Int i, Int j, Int x) { m_maxBitRate[i][j] = x; } |
---|
| 1017 | |
---|
| 1018 | Int getConstPicRateIdc(Int i, Int j) { return m_constPicRateIdc[i][j]; } |
---|
| 1019 | Void setConstPicRateIdc(Int i, Int j, Int x) { m_constPicRateIdc[i][j] = x; } |
---|
| 1020 | Int getAvgPicRate(Int i, Int j) { return m_avgPicRate[i][j]; } |
---|
| 1021 | Void setAvgPicRate(Int i, Int j, Int x) { m_avgPicRate[i][j] = x; } |
---|
| 1022 | #endif |
---|
| 1023 | #if O0164_MULTI_LAYER_HRD |
---|
| 1024 | Bool getVpsVuiBspHrdPresentFlag() { return m_vpsVuiBspHrdPresentFlag; } |
---|
| 1025 | Void setVpsVuiBspHrdPresentFlag(Bool x) { m_vpsVuiBspHrdPresentFlag = x; } |
---|
| 1026 | UInt getVpsNumBspHrdParametersMinus1() { return m_vpsNumBspHrdParametersMinus1; } |
---|
| 1027 | Void setVpsNumBspHrdParametersMinus1(UInt i) { m_vpsNumBspHrdParametersMinus1 = i; } |
---|
| 1028 | Bool getBspCprmsPresentFlag(UInt i) { return m_bspCprmsPresentFlag[i]; } |
---|
| 1029 | Void setBspCprmsPresentFlag(UInt i, Bool val) { m_bspCprmsPresentFlag[i] = val; } |
---|
| 1030 | TComHRD* getBspHrd(UInt i) { return &m_bspHrd[i]; } |
---|
| 1031 | UInt getNumBitstreamPartitions(UInt i) { return m_numBitstreamPartitions[i]; } |
---|
| 1032 | Void setNumBitstreamPartitions(UInt i, UInt val) { m_numBitstreamPartitions[i] = val; } |
---|
| 1033 | UInt getLayerInBspFlag(UInt h, UInt i, UInt j) { return m_layerInBspFlag[h][i][j]; } |
---|
| 1034 | Void setLayerInBspFlag(UInt h, UInt i, UInt j, UInt val) { m_layerInBspFlag[h][i][j] = val; } |
---|
| 1035 | UInt getNumBspSchedCombinations(UInt i) { return m_numBspSchedCombinations[i]; } |
---|
| 1036 | Void setNumBspSchedCombinations(UInt i, UInt val) { m_numBspSchedCombinations[i] = val; } |
---|
| 1037 | UInt getBspCombHrdIdx(UInt h, UInt i, UInt j) { return m_bspCombHrdIdx[h][i][j]; } |
---|
| 1038 | Void setBspCombHrdIdx(UInt h, UInt i, UInt j, UInt val) { m_bspCombHrdIdx[h][i][j] = val; } |
---|
| 1039 | UInt getBspCombSchedIdx(UInt h, UInt i, UInt j) { return m_bspCombSchedIdx[h][i][j]; } |
---|
| 1040 | Void setBspCombSchedIdx(UInt h, UInt i, UInt j, UInt val) { m_bspCombSchedIdx[h][i][j] = val; } |
---|
| 1041 | #endif |
---|
| 1042 | #if P0182_VPS_VUI_PS_FLAG |
---|
| 1043 | Int getSPSId (Int layer) { return m_SPSId[layer]; } |
---|
| 1044 | Void setSPSId (Int layer, Int val) { m_SPSId[layer] = val; } |
---|
| 1045 | Int getPPSId (Int layer) { return m_PPSId[layer]; } |
---|
| 1046 | Void setPPSId (Int layer, Int val) { m_PPSId[layer] = val; } |
---|
| 1047 | Void setBaseLayerPSCompatibilityFlag (Int layer, int val) { m_baseLayerPSCompatibilityFlag[layer] = val; } |
---|
| 1048 | Int getBaseLayerPSCompatibilityFlag (Int layer) { return m_baseLayerPSCompatibilityFlag[layer];} |
---|
| 1049 | #endif |
---|
[442] | 1050 | |
---|
[644] | 1051 | #if P0312_VERT_PHASE_ADJ |
---|
| 1052 | Bool getVpsVuiVertPhaseInUseFlag() { return m_vpsVuiVertPhaseInUseFlag; } |
---|
| 1053 | Void setVpsVuiVertPhaseInUseFlag(Bool x) { m_vpsVuiVertPhaseInUseFlag = x; } |
---|
[442] | 1054 | #endif |
---|
[644] | 1055 | |
---|
| 1056 | #if P0300_ALT_OUTPUT_LAYER_FLAG |
---|
| 1057 | Bool getAltOuputLayerFlag(Int idx) { return m_altOutputLayerFlag[idx]; } |
---|
| 1058 | Void setAltOuputLayerFlag(Int idx, Bool x) { m_altOutputLayerFlag[idx] = x; } |
---|
| 1059 | #else |
---|
[540] | 1060 | #if O0153_ALT_OUTPUT_LAYER_FLAG |
---|
| 1061 | Bool getAltOuputLayerFlag() { return m_altOutputLayerFlag; } |
---|
| 1062 | Void setAltOuputLayerFlag(Bool x) { m_altOutputLayerFlag = x; } |
---|
| 1063 | #endif |
---|
[644] | 1064 | #endif |
---|
[442] | 1065 | #if REPN_FORMAT_IN_VPS |
---|
| 1066 | Bool getRepFormatIdxPresentFlag() { return m_repFormatIdxPresentFlag; } |
---|
| 1067 | Void setRepFormatIdxPresentFlag(Bool x) { m_repFormatIdxPresentFlag = x; } |
---|
| 1068 | |
---|
| 1069 | Int getVpsNumRepFormats() { return m_vpsNumRepFormats; } |
---|
| 1070 | Void setVpsNumRepFormats(Int x) { m_vpsNumRepFormats = x; } |
---|
| 1071 | |
---|
| 1072 | RepFormat* getVpsRepFormat(Int idx) { return &m_vpsRepFormat[idx]; } |
---|
| 1073 | |
---|
[644] | 1074 | Int getVpsRepFormatIdx(Int idx) { return m_vpsRepFormatIdx[idx]; } |
---|
| 1075 | Void setVpsRepFormatIdx(Int idx, Int x) { m_vpsRepFormatIdx[idx] = x; } |
---|
[442] | 1076 | #endif |
---|
| 1077 | #if VIEW_ID_RELATED_SIGNALING |
---|
[547] | 1078 | #if O0109_VIEW_ID_LEN |
---|
[644] | 1079 | Void setViewIdLen( Int val ) { m_viewIdLen = val; } |
---|
| 1080 | Int getViewIdLen( ) { return m_viewIdLen; } |
---|
[547] | 1081 | #else |
---|
[644] | 1082 | Void setViewIdLenMinus1( Int val ) { m_viewIdLenMinus1 = val; } |
---|
| 1083 | Int getViewIdLenMinus1( ) { return m_viewIdLenMinus1; } |
---|
[547] | 1084 | #endif |
---|
[442] | 1085 | |
---|
[644] | 1086 | Void setViewIdVal( Int viewOrderIndex, Int val ) { m_viewIdVal[viewOrderIndex] = val; } |
---|
| 1087 | Int getViewIdVal( Int viewOrderIndex ) { return m_viewIdVal[viewOrderIndex]; } |
---|
| 1088 | Int getScalabilityId(Int, ScalabilityType scalType ); |
---|
[442] | 1089 | |
---|
[644] | 1090 | Int getViewIndex ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX ); } |
---|
[442] | 1091 | |
---|
[644] | 1092 | Int getNumViews(); |
---|
| 1093 | Int scalTypeToScalIdx( ScalabilityType scalType ); |
---|
[442] | 1094 | #endif |
---|
[588] | 1095 | #if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED |
---|
[442] | 1096 | #if VPS_EXTN_OFFSET |
---|
[644] | 1097 | Int getExtensionOffset() { return m_extensionOffset; } |
---|
| 1098 | Void setExtensionOffset( UInt offset ) { m_extensionOffset = offset; } |
---|
[442] | 1099 | #endif |
---|
[588] | 1100 | #endif |
---|
[494] | 1101 | #if O0215_PHASE_ALIGNMENT |
---|
| 1102 | Bool getPhaseAlignFlag() { return m_phaseAlignFlag; } |
---|
| 1103 | Void setPhaseAlignFlag(Bool x) { m_phaseAlignFlag = x; } |
---|
| 1104 | #endif |
---|
[540] | 1105 | #if VPS_DPB_SIZE_TABLE |
---|
[644] | 1106 | Bool getSubLayerFlagInfoPresentFlag(Int i) {return m_subLayerFlagInfoPresentFlag[i]; } |
---|
| 1107 | Void setSubLayerFlagInfoPresentFlag(Int i, Bool x) {m_subLayerFlagInfoPresentFlag[i] = x; } |
---|
[540] | 1108 | |
---|
[644] | 1109 | Bool getSubLayerDpbInfoPresentFlag(Int i, Int j) {return m_subLayerDpbInfoPresentFlag[i][j]; } |
---|
| 1110 | Void setSubLayerDpbInfoPresentFlag(Int i, Int j, Bool x) {m_subLayerDpbInfoPresentFlag[i][j] = x; } |
---|
[540] | 1111 | |
---|
| 1112 | // For the 0-th output layer set, use the date from the active SPS for base layer. |
---|
[644] | 1113 | Int getMaxVpsDecPicBufferingMinus1(Int i, Int k, Int j) { assert(i != 0); return m_maxVpsDecPicBufferingMinus1[i][k][j]; } |
---|
| 1114 | Void setMaxVpsDecPicBufferingMinus1(Int i, Int k, Int j, Int x) { m_maxVpsDecPicBufferingMinus1[i][k][j] = x; } |
---|
[540] | 1115 | |
---|
[588] | 1116 | #if RESOLUTION_BASED_DPB |
---|
[644] | 1117 | Int getMaxVpsLayerDecPicBuffMinus1(Int i, Int k, Int j) { assert(i != 0); return m_maxVpsLayerDecPicBuffMinus1[i][k][j]; } |
---|
| 1118 | Void setMaxVpsLayerDecPicBuffMinus1(Int i, Int k, Int j, Int x) { m_maxVpsLayerDecPicBuffMinus1[i][k][j] = x; } |
---|
[588] | 1119 | #endif |
---|
| 1120 | |
---|
[644] | 1121 | Int getMaxVpsNumReorderPics(Int i, Int j) { assert(i != 0); return m_maxVpsNumReorderPics[i][j]; } |
---|
| 1122 | Void setMaxVpsNumReorderPics(Int i, Int j, Int x) { m_maxVpsNumReorderPics[i][j] = x; } |
---|
[540] | 1123 | |
---|
[644] | 1124 | Int getMaxVpsLatencyIncreasePlus1(Int i, Int j) { assert(i != 0); return m_maxVpsLatencyIncreasePlus1[i][j]; } |
---|
| 1125 | Void setMaxVpsLatencyIncreasePlus1(Int i, Int j, Int x) { m_maxVpsLatencyIncreasePlus1[i][j] = x; } |
---|
[540] | 1126 | |
---|
[644] | 1127 | Int getNumSubDpbs(Int i) { return m_numSubDpbs[i]; } |
---|
| 1128 | Void setNumSubDpbs(Int i, Int x) { m_numSubDpbs[i] = x; } |
---|
| 1129 | Void determineSubDpbInfoFlags(); |
---|
[540] | 1130 | #endif |
---|
[547] | 1131 | |
---|
| 1132 | #if O0109_MOVE_VPS_VUI_FLAG |
---|
| 1133 | Bool getVpsVuiPresentFlag() { return m_vpsVuiPresentFlag; } |
---|
| 1134 | Void setVpsVuiPresentFlag(Bool x) { m_vpsVuiPresentFlag = x; } |
---|
| 1135 | #endif |
---|
| 1136 | |
---|
[588] | 1137 | #if !P0307_REMOVE_VPS_VUI_OFFSET |
---|
[547] | 1138 | #if VPS_VUI_OFFSET |
---|
[644] | 1139 | Int getVpsVuiOffset() { return m_vpsVuiOffset; } |
---|
| 1140 | Void setVpsVuiOffset(Int x) { m_vpsVuiOffset = x; } |
---|
[547] | 1141 | #endif |
---|
[588] | 1142 | #endif |
---|
| 1143 | #if P0307_VPS_NON_VUI_EXTENSION |
---|
[644] | 1144 | Int getVpsNonVuiExtLength() { return m_vpsNonVuiExtLength; } |
---|
| 1145 | Void setVpsNonVuiExtLength(Int x) { m_vpsNonVuiExtLength = x; } |
---|
[588] | 1146 | #endif |
---|
| 1147 | #if RESOLUTION_BASED_DPB |
---|
[644] | 1148 | Void assignSubDpbIndices(); |
---|
| 1149 | Int getSubDpbAssigned (Int lsIdx, Int layerIdx) { return m_subDpbAssigned[lsIdx][layerIdx]; } |
---|
| 1150 | Int findLayerIdxInLayerSet ( Int lsIdx, Int nuhLayerId ); |
---|
[588] | 1151 | #endif |
---|
[644] | 1152 | #if O0164_MULTI_LAYER_HRD |
---|
| 1153 | Void setBspHrdParameters( UInt hrdIdx, UInt frameRate, UInt numDU, UInt bitRate, Bool randomAccess ); |
---|
| 1154 | #endif |
---|
[494] | 1155 | #endif //SVC_EXTENSION |
---|
[313] | 1156 | }; |
---|
| 1157 | |
---|
| 1158 | class Window |
---|
| 1159 | { |
---|
| 1160 | private: |
---|
| 1161 | Bool m_enabledFlag; |
---|
| 1162 | Int m_winLeftOffset; |
---|
| 1163 | Int m_winRightOffset; |
---|
| 1164 | Int m_winTopOffset; |
---|
| 1165 | Int m_winBottomOffset; |
---|
[644] | 1166 | #if P0312_VERT_PHASE_ADJ |
---|
| 1167 | Bool m_vertPhasePositionEnableFlag; |
---|
| 1168 | #endif |
---|
[313] | 1169 | public: |
---|
| 1170 | Window() |
---|
| 1171 | : m_enabledFlag (false) |
---|
| 1172 | , m_winLeftOffset (0) |
---|
| 1173 | , m_winRightOffset (0) |
---|
| 1174 | , m_winTopOffset (0) |
---|
| 1175 | , m_winBottomOffset (0) |
---|
[644] | 1176 | #if P0312_VERT_PHASE_ADJ |
---|
| 1177 | , m_vertPhasePositionEnableFlag(false) |
---|
| 1178 | #endif |
---|
[313] | 1179 | { } |
---|
| 1180 | |
---|
| 1181 | Bool getWindowEnabledFlag() const { return m_enabledFlag; } |
---|
[644] | 1182 | #if P0312_VERT_PHASE_ADJ |
---|
| 1183 | Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0; m_vertPhasePositionEnableFlag = false; } |
---|
| 1184 | #else |
---|
| 1185 | Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0;} |
---|
| 1186 | #endif |
---|
[313] | 1187 | Int getWindowLeftOffset() const { return m_enabledFlag ? m_winLeftOffset : 0; } |
---|
| 1188 | Void setWindowLeftOffset(Int val) { m_winLeftOffset = val; m_enabledFlag = true; } |
---|
| 1189 | Int getWindowRightOffset() const { return m_enabledFlag ? m_winRightOffset : 0; } |
---|
| 1190 | Void setWindowRightOffset(Int val) { m_winRightOffset = val; m_enabledFlag = true; } |
---|
| 1191 | Int getWindowTopOffset() const { return m_enabledFlag ? m_winTopOffset : 0; } |
---|
| 1192 | Void setWindowTopOffset(Int val) { m_winTopOffset = val; m_enabledFlag = true; } |
---|
| 1193 | Int getWindowBottomOffset() const { return m_enabledFlag ? m_winBottomOffset: 0; } |
---|
| 1194 | Void setWindowBottomOffset(Int val) { m_winBottomOffset = val; m_enabledFlag = true; } |
---|
| 1195 | |
---|
[644] | 1196 | #if P0312_VERT_PHASE_ADJ |
---|
| 1197 | Bool getVertPhasePositionEnableFlag() const { return m_vertPhasePositionEnableFlag; } |
---|
| 1198 | Void setVertPhasePositionEnableFlag(Bool val) { m_vertPhasePositionEnableFlag = val; } |
---|
| 1199 | Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom, Bool vertPhasePositionEnableFlag = 0) |
---|
| 1200 | #else |
---|
[313] | 1201 | Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom) |
---|
[644] | 1202 | #endif |
---|
[313] | 1203 | { |
---|
| 1204 | m_enabledFlag = true; |
---|
| 1205 | m_winLeftOffset = offsetLeft; |
---|
| 1206 | m_winRightOffset = offsetLRight; |
---|
| 1207 | m_winTopOffset = offsetLTop; |
---|
| 1208 | m_winBottomOffset = offsetLBottom; |
---|
[644] | 1209 | #if P0312_VERT_PHASE_ADJ |
---|
| 1210 | m_vertPhasePositionEnableFlag = vertPhasePositionEnableFlag; |
---|
| 1211 | #endif |
---|
[313] | 1212 | } |
---|
| 1213 | }; |
---|
| 1214 | |
---|
| 1215 | |
---|
| 1216 | class TComVUI |
---|
| 1217 | { |
---|
| 1218 | private: |
---|
| 1219 | Bool m_aspectRatioInfoPresentFlag; |
---|
| 1220 | Int m_aspectRatioIdc; |
---|
| 1221 | Int m_sarWidth; |
---|
| 1222 | Int m_sarHeight; |
---|
| 1223 | Bool m_overscanInfoPresentFlag; |
---|
| 1224 | Bool m_overscanAppropriateFlag; |
---|
| 1225 | Bool m_videoSignalTypePresentFlag; |
---|
| 1226 | Int m_videoFormat; |
---|
| 1227 | Bool m_videoFullRangeFlag; |
---|
| 1228 | Bool m_colourDescriptionPresentFlag; |
---|
| 1229 | Int m_colourPrimaries; |
---|
| 1230 | Int m_transferCharacteristics; |
---|
| 1231 | Int m_matrixCoefficients; |
---|
| 1232 | Bool m_chromaLocInfoPresentFlag; |
---|
| 1233 | Int m_chromaSampleLocTypeTopField; |
---|
| 1234 | Int m_chromaSampleLocTypeBottomField; |
---|
| 1235 | Bool m_neutralChromaIndicationFlag; |
---|
| 1236 | Bool m_fieldSeqFlag; |
---|
| 1237 | |
---|
| 1238 | Window m_defaultDisplayWindow; |
---|
| 1239 | Bool m_frameFieldInfoPresentFlag; |
---|
| 1240 | Bool m_hrdParametersPresentFlag; |
---|
| 1241 | Bool m_bitstreamRestrictionFlag; |
---|
| 1242 | Bool m_tilesFixedStructureFlag; |
---|
| 1243 | Bool m_motionVectorsOverPicBoundariesFlag; |
---|
| 1244 | Bool m_restrictedRefPicListsFlag; |
---|
| 1245 | Int m_minSpatialSegmentationIdc; |
---|
| 1246 | Int m_maxBytesPerPicDenom; |
---|
| 1247 | Int m_maxBitsPerMinCuDenom; |
---|
| 1248 | Int m_log2MaxMvLengthHorizontal; |
---|
| 1249 | Int m_log2MaxMvLengthVertical; |
---|
| 1250 | TComHRD m_hrdParameters; |
---|
| 1251 | TimingInfo m_timingInfo; |
---|
| 1252 | |
---|
| 1253 | public: |
---|
| 1254 | TComVUI() |
---|
| 1255 | :m_aspectRatioInfoPresentFlag(false) |
---|
| 1256 | ,m_aspectRatioIdc(0) |
---|
| 1257 | ,m_sarWidth(0) |
---|
| 1258 | ,m_sarHeight(0) |
---|
| 1259 | ,m_overscanInfoPresentFlag(false) |
---|
| 1260 | ,m_overscanAppropriateFlag(false) |
---|
| 1261 | ,m_videoSignalTypePresentFlag(false) |
---|
| 1262 | ,m_videoFormat(5) |
---|
| 1263 | ,m_videoFullRangeFlag(false) |
---|
| 1264 | ,m_colourDescriptionPresentFlag(false) |
---|
| 1265 | ,m_colourPrimaries(2) |
---|
| 1266 | ,m_transferCharacteristics(2) |
---|
| 1267 | ,m_matrixCoefficients(2) |
---|
| 1268 | ,m_chromaLocInfoPresentFlag(false) |
---|
| 1269 | ,m_chromaSampleLocTypeTopField(0) |
---|
| 1270 | ,m_chromaSampleLocTypeBottomField(0) |
---|
| 1271 | ,m_neutralChromaIndicationFlag(false) |
---|
| 1272 | ,m_fieldSeqFlag(false) |
---|
| 1273 | ,m_frameFieldInfoPresentFlag(false) |
---|
| 1274 | ,m_hrdParametersPresentFlag(false) |
---|
| 1275 | ,m_bitstreamRestrictionFlag(false) |
---|
| 1276 | ,m_tilesFixedStructureFlag(false) |
---|
| 1277 | ,m_motionVectorsOverPicBoundariesFlag(true) |
---|
| 1278 | ,m_restrictedRefPicListsFlag(1) |
---|
| 1279 | ,m_minSpatialSegmentationIdc(0) |
---|
| 1280 | ,m_maxBytesPerPicDenom(2) |
---|
| 1281 | ,m_maxBitsPerMinCuDenom(1) |
---|
| 1282 | ,m_log2MaxMvLengthHorizontal(15) |
---|
| 1283 | ,m_log2MaxMvLengthVertical(15) |
---|
| 1284 | {} |
---|
| 1285 | |
---|
| 1286 | virtual ~TComVUI() {} |
---|
| 1287 | |
---|
| 1288 | Bool getAspectRatioInfoPresentFlag() { return m_aspectRatioInfoPresentFlag; } |
---|
| 1289 | Void setAspectRatioInfoPresentFlag(Bool i) { m_aspectRatioInfoPresentFlag = i; } |
---|
| 1290 | |
---|
| 1291 | Int getAspectRatioIdc() { return m_aspectRatioIdc; } |
---|
| 1292 | Void setAspectRatioIdc(Int i) { m_aspectRatioIdc = i; } |
---|
| 1293 | |
---|
| 1294 | Int getSarWidth() { return m_sarWidth; } |
---|
| 1295 | Void setSarWidth(Int i) { m_sarWidth = i; } |
---|
| 1296 | |
---|
| 1297 | Int getSarHeight() { return m_sarHeight; } |
---|
| 1298 | Void setSarHeight(Int i) { m_sarHeight = i; } |
---|
| 1299 | |
---|
| 1300 | Bool getOverscanInfoPresentFlag() { return m_overscanInfoPresentFlag; } |
---|
| 1301 | Void setOverscanInfoPresentFlag(Bool i) { m_overscanInfoPresentFlag = i; } |
---|
| 1302 | |
---|
| 1303 | Bool getOverscanAppropriateFlag() { return m_overscanAppropriateFlag; } |
---|
| 1304 | Void setOverscanAppropriateFlag(Bool i) { m_overscanAppropriateFlag = i; } |
---|
| 1305 | |
---|
| 1306 | Bool getVideoSignalTypePresentFlag() { return m_videoSignalTypePresentFlag; } |
---|
| 1307 | Void setVideoSignalTypePresentFlag(Bool i) { m_videoSignalTypePresentFlag = i; } |
---|
| 1308 | |
---|
| 1309 | Int getVideoFormat() { return m_videoFormat; } |
---|
| 1310 | Void setVideoFormat(Int i) { m_videoFormat = i; } |
---|
| 1311 | |
---|
| 1312 | Bool getVideoFullRangeFlag() { return m_videoFullRangeFlag; } |
---|
| 1313 | Void setVideoFullRangeFlag(Bool i) { m_videoFullRangeFlag = i; } |
---|
| 1314 | |
---|
| 1315 | Bool getColourDescriptionPresentFlag() { return m_colourDescriptionPresentFlag; } |
---|
| 1316 | Void setColourDescriptionPresentFlag(Bool i) { m_colourDescriptionPresentFlag = i; } |
---|
| 1317 | |
---|
| 1318 | Int getColourPrimaries() { return m_colourPrimaries; } |
---|
| 1319 | Void setColourPrimaries(Int i) { m_colourPrimaries = i; } |
---|
| 1320 | |
---|
| 1321 | Int getTransferCharacteristics() { return m_transferCharacteristics; } |
---|
| 1322 | Void setTransferCharacteristics(Int i) { m_transferCharacteristics = i; } |
---|
| 1323 | |
---|
| 1324 | Int getMatrixCoefficients() { return m_matrixCoefficients; } |
---|
| 1325 | Void setMatrixCoefficients(Int i) { m_matrixCoefficients = i; } |
---|
| 1326 | |
---|
| 1327 | Bool getChromaLocInfoPresentFlag() { return m_chromaLocInfoPresentFlag; } |
---|
| 1328 | Void setChromaLocInfoPresentFlag(Bool i) { m_chromaLocInfoPresentFlag = i; } |
---|
| 1329 | |
---|
| 1330 | Int getChromaSampleLocTypeTopField() { return m_chromaSampleLocTypeTopField; } |
---|
| 1331 | Void setChromaSampleLocTypeTopField(Int i) { m_chromaSampleLocTypeTopField = i; } |
---|
| 1332 | |
---|
| 1333 | Int getChromaSampleLocTypeBottomField() { return m_chromaSampleLocTypeBottomField; } |
---|
| 1334 | Void setChromaSampleLocTypeBottomField(Int i) { m_chromaSampleLocTypeBottomField = i; } |
---|
| 1335 | |
---|
| 1336 | Bool getNeutralChromaIndicationFlag() { return m_neutralChromaIndicationFlag; } |
---|
| 1337 | Void setNeutralChromaIndicationFlag(Bool i) { m_neutralChromaIndicationFlag = i; } |
---|
| 1338 | |
---|
| 1339 | Bool getFieldSeqFlag() { return m_fieldSeqFlag; } |
---|
| 1340 | Void setFieldSeqFlag(Bool i) { m_fieldSeqFlag = i; } |
---|
| 1341 | |
---|
| 1342 | Bool getFrameFieldInfoPresentFlag() { return m_frameFieldInfoPresentFlag; } |
---|
| 1343 | Void setFrameFieldInfoPresentFlag(Bool i) { m_frameFieldInfoPresentFlag = i; } |
---|
| 1344 | |
---|
| 1345 | Window& getDefaultDisplayWindow() { return m_defaultDisplayWindow; } |
---|
| 1346 | Void setDefaultDisplayWindow(Window& defaultDisplayWindow ) { m_defaultDisplayWindow = defaultDisplayWindow; } |
---|
| 1347 | |
---|
| 1348 | Bool getHrdParametersPresentFlag() { return m_hrdParametersPresentFlag; } |
---|
| 1349 | Void setHrdParametersPresentFlag(Bool i) { m_hrdParametersPresentFlag = i; } |
---|
| 1350 | |
---|
| 1351 | Bool getBitstreamRestrictionFlag() { return m_bitstreamRestrictionFlag; } |
---|
| 1352 | Void setBitstreamRestrictionFlag(Bool i) { m_bitstreamRestrictionFlag = i; } |
---|
| 1353 | |
---|
| 1354 | Bool getTilesFixedStructureFlag() { return m_tilesFixedStructureFlag; } |
---|
| 1355 | Void setTilesFixedStructureFlag(Bool i) { m_tilesFixedStructureFlag = i; } |
---|
| 1356 | |
---|
| 1357 | Bool getMotionVectorsOverPicBoundariesFlag() { return m_motionVectorsOverPicBoundariesFlag; } |
---|
| 1358 | Void setMotionVectorsOverPicBoundariesFlag(Bool i) { m_motionVectorsOverPicBoundariesFlag = i; } |
---|
| 1359 | |
---|
| 1360 | Bool getRestrictedRefPicListsFlag() { return m_restrictedRefPicListsFlag; } |
---|
| 1361 | Void setRestrictedRefPicListsFlag(Bool b) { m_restrictedRefPicListsFlag = b; } |
---|
| 1362 | |
---|
| 1363 | Int getMinSpatialSegmentationIdc() { return m_minSpatialSegmentationIdc; } |
---|
| 1364 | Void setMinSpatialSegmentationIdc(Int i) { m_minSpatialSegmentationIdc = i; } |
---|
| 1365 | Int getMaxBytesPerPicDenom() { return m_maxBytesPerPicDenom; } |
---|
| 1366 | Void setMaxBytesPerPicDenom(Int i) { m_maxBytesPerPicDenom = i; } |
---|
| 1367 | |
---|
| 1368 | Int getMaxBitsPerMinCuDenom() { return m_maxBitsPerMinCuDenom; } |
---|
| 1369 | Void setMaxBitsPerMinCuDenom(Int i) { m_maxBitsPerMinCuDenom = i; } |
---|
| 1370 | |
---|
| 1371 | Int getLog2MaxMvLengthHorizontal() { return m_log2MaxMvLengthHorizontal; } |
---|
| 1372 | Void setLog2MaxMvLengthHorizontal(Int i) { m_log2MaxMvLengthHorizontal = i; } |
---|
| 1373 | |
---|
| 1374 | Int getLog2MaxMvLengthVertical() { return m_log2MaxMvLengthVertical; } |
---|
| 1375 | Void setLog2MaxMvLengthVertical(Int i) { m_log2MaxMvLengthVertical = i; } |
---|
| 1376 | |
---|
| 1377 | TComHRD* getHrdParameters () { return &m_hrdParameters; } |
---|
| 1378 | TimingInfo* getTimingInfo() { return &m_timingInfo; } |
---|
| 1379 | }; |
---|
| 1380 | |
---|
| 1381 | /// SPS class |
---|
| 1382 | class TComSPS |
---|
| 1383 | { |
---|
| 1384 | private: |
---|
| 1385 | Int m_SPSId; |
---|
| 1386 | Int m_VPSId; |
---|
[494] | 1387 | #if AUXILIARY_PICTURES |
---|
| 1388 | ChromaFormat m_chromaFormatIdc; |
---|
| 1389 | #else |
---|
[313] | 1390 | Int m_chromaFormatIdc; |
---|
[494] | 1391 | #endif |
---|
[313] | 1392 | |
---|
| 1393 | UInt m_uiMaxTLayers; // maximum number of temporal layers |
---|
| 1394 | |
---|
| 1395 | // Structure |
---|
| 1396 | UInt m_picWidthInLumaSamples; |
---|
| 1397 | UInt m_picHeightInLumaSamples; |
---|
| 1398 | |
---|
| 1399 | Int m_log2MinCodingBlockSize; |
---|
| 1400 | Int m_log2DiffMaxMinCodingBlockSize; |
---|
| 1401 | UInt m_uiMaxCUWidth; |
---|
| 1402 | UInt m_uiMaxCUHeight; |
---|
| 1403 | UInt m_uiMaxCUDepth; |
---|
| 1404 | |
---|
| 1405 | Window m_conformanceWindow; |
---|
| 1406 | |
---|
| 1407 | TComRPSList m_RPSList; |
---|
| 1408 | Bool m_bLongTermRefsPresent; |
---|
| 1409 | Bool m_TMVPFlagsPresent; |
---|
| 1410 | Int m_numReorderPics[MAX_TLAYER]; |
---|
| 1411 | |
---|
| 1412 | // Tool list |
---|
| 1413 | UInt m_uiQuadtreeTULog2MaxSize; |
---|
| 1414 | UInt m_uiQuadtreeTULog2MinSize; |
---|
| 1415 | UInt m_uiQuadtreeTUMaxDepthInter; |
---|
| 1416 | UInt m_uiQuadtreeTUMaxDepthIntra; |
---|
| 1417 | Bool m_usePCM; |
---|
| 1418 | UInt m_pcmLog2MaxSize; |
---|
| 1419 | UInt m_uiPCMLog2MinSize; |
---|
| 1420 | Bool m_useAMP; |
---|
| 1421 | |
---|
| 1422 | // Parameter |
---|
| 1423 | Int m_bitDepthY; |
---|
| 1424 | Int m_bitDepthC; |
---|
| 1425 | Int m_qpBDOffsetY; |
---|
| 1426 | Int m_qpBDOffsetC; |
---|
| 1427 | |
---|
| 1428 | UInt m_uiPCMBitDepthLuma; |
---|
| 1429 | UInt m_uiPCMBitDepthChroma; |
---|
| 1430 | Bool m_bPCMFilterDisableFlag; |
---|
| 1431 | |
---|
| 1432 | UInt m_uiBitsForPOC; |
---|
| 1433 | UInt m_numLongTermRefPicSPS; |
---|
| 1434 | UInt m_ltRefPicPocLsbSps[33]; |
---|
| 1435 | Bool m_usedByCurrPicLtSPSFlag[33]; |
---|
| 1436 | // Max physical transform size |
---|
| 1437 | UInt m_uiMaxTrSize; |
---|
| 1438 | |
---|
| 1439 | Int m_iAMPAcc[MAX_CU_DEPTH]; |
---|
| 1440 | Bool m_bUseSAO; |
---|
| 1441 | |
---|
| 1442 | Bool m_bTemporalIdNestingFlag; // temporal_id_nesting_flag |
---|
| 1443 | |
---|
| 1444 | Bool m_scalingListEnabledFlag; |
---|
| 1445 | Bool m_scalingListPresentFlag; |
---|
| 1446 | TComScalingList* m_scalingList; //!< ScalingList class pointer |
---|
| 1447 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
| 1448 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) |
---|
| 1449 | |
---|
| 1450 | Bool m_useDF; |
---|
| 1451 | Bool m_useStrongIntraSmoothing; |
---|
| 1452 | |
---|
| 1453 | Bool m_vuiParametersPresentFlag; |
---|
| 1454 | TComVUI m_vuiParameters; |
---|
| 1455 | |
---|
| 1456 | static const Int m_winUnitX[MAX_CHROMA_FORMAT_IDC+1]; |
---|
| 1457 | static const Int m_winUnitY[MAX_CHROMA_FORMAT_IDC+1]; |
---|
| 1458 | TComPTL m_pcPTL; |
---|
| 1459 | |
---|
[494] | 1460 | #if SVC_EXTENSION |
---|
[644] | 1461 | UInt m_layerId; |
---|
[313] | 1462 | UInt m_numScaledRefLayerOffsets; |
---|
[644] | 1463 | #if P0312_VERT_PHASE_ADJ |
---|
| 1464 | Bool m_vertPhasePositionEnableFlag[MAX_LAYERS]; |
---|
| 1465 | #endif |
---|
[540] | 1466 | #if O0098_SCALED_REF_LAYER_ID |
---|
| 1467 | UInt m_scaledRefLayerId[MAX_LAYERS]; |
---|
| 1468 | #endif |
---|
[313] | 1469 | Window m_scaledRefLayerWindow[MAX_LAYERS]; |
---|
[442] | 1470 | #if REPN_FORMAT_IN_VPS |
---|
[644] | 1471 | Bool m_updateRepFormatFlag; |
---|
[540] | 1472 | #if O0096_REP_FORMAT_INDEX |
---|
[644] | 1473 | UInt m_updateRepFormatIndex; |
---|
[442] | 1474 | #endif |
---|
[540] | 1475 | #endif |
---|
| 1476 | #if SCALINGLIST_INFERRING |
---|
[644] | 1477 | Bool m_inferScalingListFlag; |
---|
| 1478 | UInt m_scalingListRefLayerId; |
---|
[540] | 1479 | #endif |
---|
[494] | 1480 | #endif //SVC_EXTENSION |
---|
[313] | 1481 | public: |
---|
| 1482 | TComSPS(); |
---|
| 1483 | virtual ~TComSPS(); |
---|
| 1484 | |
---|
| 1485 | Int getVPSId () { return m_VPSId; } |
---|
| 1486 | Void setVPSId (Int i) { m_VPSId = i; } |
---|
| 1487 | Int getSPSId () { return m_SPSId; } |
---|
| 1488 | Void setSPSId (Int i) { m_SPSId = i; } |
---|
[494] | 1489 | |
---|
| 1490 | #if AUXILIARY_PICTURES |
---|
| 1491 | ChromaFormat getChromaFormatIdc () { return m_chromaFormatIdc; } |
---|
| 1492 | Void setChromaFormatIdc (ChromaFormat i) { m_chromaFormatIdc = i; } |
---|
| 1493 | |
---|
| 1494 | static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitX[chromaFormatIdc]; } |
---|
| 1495 | static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc]; } |
---|
| 1496 | #else |
---|
[313] | 1497 | Int getChromaFormatIdc () { return m_chromaFormatIdc; } |
---|
| 1498 | Void setChromaFormatIdc (Int i) { m_chromaFormatIdc = i; } |
---|
| 1499 | |
---|
| 1500 | static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitX[chromaFormatIdc]; } |
---|
| 1501 | static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc]; } |
---|
[494] | 1502 | #endif |
---|
[313] | 1503 | |
---|
| 1504 | // structure |
---|
| 1505 | Void setPicWidthInLumaSamples ( UInt u ) { m_picWidthInLumaSamples = u; } |
---|
| 1506 | UInt getPicWidthInLumaSamples () { return m_picWidthInLumaSamples; } |
---|
| 1507 | Void setPicHeightInLumaSamples ( UInt u ) { m_picHeightInLumaSamples = u; } |
---|
| 1508 | UInt getPicHeightInLumaSamples () { return m_picHeightInLumaSamples; } |
---|
| 1509 | |
---|
| 1510 | Window& getConformanceWindow() { return m_conformanceWindow; } |
---|
| 1511 | Void setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; } |
---|
| 1512 | |
---|
| 1513 | UInt getNumLongTermRefPicSPS() { return m_numLongTermRefPicSPS; } |
---|
| 1514 | Void setNumLongTermRefPicSPS(UInt val) { m_numLongTermRefPicSPS = val; } |
---|
| 1515 | |
---|
| 1516 | UInt getLtRefPicPocLsbSps(UInt index) { return m_ltRefPicPocLsbSps[index]; } |
---|
| 1517 | Void setLtRefPicPocLsbSps(UInt index, UInt val) { m_ltRefPicPocLsbSps[index] = val; } |
---|
| 1518 | |
---|
| 1519 | Bool getUsedByCurrPicLtSPSFlag(Int i) {return m_usedByCurrPicLtSPSFlag[i];} |
---|
| 1520 | Void setUsedByCurrPicLtSPSFlag(Int i, Bool x) { m_usedByCurrPicLtSPSFlag[i] = x;} |
---|
| 1521 | |
---|
| 1522 | Int getLog2MinCodingBlockSize() const { return m_log2MinCodingBlockSize; } |
---|
| 1523 | Void setLog2MinCodingBlockSize(Int val) { m_log2MinCodingBlockSize = val; } |
---|
| 1524 | Int getLog2DiffMaxMinCodingBlockSize() const { return m_log2DiffMaxMinCodingBlockSize; } |
---|
| 1525 | Void setLog2DiffMaxMinCodingBlockSize(Int val) { m_log2DiffMaxMinCodingBlockSize = val; } |
---|
| 1526 | |
---|
| 1527 | Void setMaxCUWidth ( UInt u ) { m_uiMaxCUWidth = u; } |
---|
| 1528 | UInt getMaxCUWidth () { return m_uiMaxCUWidth; } |
---|
| 1529 | Void setMaxCUHeight ( UInt u ) { m_uiMaxCUHeight = u; } |
---|
| 1530 | UInt getMaxCUHeight () { return m_uiMaxCUHeight; } |
---|
| 1531 | Void setMaxCUDepth ( UInt u ) { m_uiMaxCUDepth = u; } |
---|
| 1532 | UInt getMaxCUDepth () { return m_uiMaxCUDepth; } |
---|
| 1533 | Void setUsePCM ( Bool b ) { m_usePCM = b; } |
---|
| 1534 | Bool getUsePCM () { return m_usePCM; } |
---|
| 1535 | Void setPCMLog2MaxSize ( UInt u ) { m_pcmLog2MaxSize = u; } |
---|
| 1536 | UInt getPCMLog2MaxSize () { return m_pcmLog2MaxSize; } |
---|
| 1537 | Void setPCMLog2MinSize ( UInt u ) { m_uiPCMLog2MinSize = u; } |
---|
| 1538 | UInt getPCMLog2MinSize () { return m_uiPCMLog2MinSize; } |
---|
| 1539 | Void setBitsForPOC ( UInt u ) { m_uiBitsForPOC = u; } |
---|
| 1540 | UInt getBitsForPOC () { return m_uiBitsForPOC; } |
---|
| 1541 | Bool getUseAMP() { return m_useAMP; } |
---|
| 1542 | Void setUseAMP( Bool b ) { m_useAMP = b; } |
---|
| 1543 | Void setQuadtreeTULog2MaxSize( UInt u ) { m_uiQuadtreeTULog2MaxSize = u; } |
---|
| 1544 | UInt getQuadtreeTULog2MaxSize() { return m_uiQuadtreeTULog2MaxSize; } |
---|
| 1545 | Void setQuadtreeTULog2MinSize( UInt u ) { m_uiQuadtreeTULog2MinSize = u; } |
---|
| 1546 | UInt getQuadtreeTULog2MinSize() { return m_uiQuadtreeTULog2MinSize; } |
---|
| 1547 | Void setQuadtreeTUMaxDepthInter( UInt u ) { m_uiQuadtreeTUMaxDepthInter = u; } |
---|
| 1548 | Void setQuadtreeTUMaxDepthIntra( UInt u ) { m_uiQuadtreeTUMaxDepthIntra = u; } |
---|
| 1549 | UInt getQuadtreeTUMaxDepthInter() { return m_uiQuadtreeTUMaxDepthInter; } |
---|
| 1550 | UInt getQuadtreeTUMaxDepthIntra() { return m_uiQuadtreeTUMaxDepthIntra; } |
---|
| 1551 | Void setNumReorderPics(Int i, UInt tlayer) { m_numReorderPics[tlayer] = i; } |
---|
| 1552 | Int getNumReorderPics(UInt tlayer) { return m_numReorderPics[tlayer]; } |
---|
| 1553 | Void createRPSList( Int numRPS ); |
---|
| 1554 | TComRPSList* getRPSList() { return &m_RPSList; } |
---|
| 1555 | Bool getLongTermRefsPresent() { return m_bLongTermRefsPresent; } |
---|
| 1556 | Void setLongTermRefsPresent(Bool b) { m_bLongTermRefsPresent=b; } |
---|
| 1557 | Bool getTMVPFlagsPresent() { return m_TMVPFlagsPresent; } |
---|
| 1558 | Void setTMVPFlagsPresent(Bool b) { m_TMVPFlagsPresent=b; } |
---|
| 1559 | // physical transform |
---|
| 1560 | Void setMaxTrSize ( UInt u ) { m_uiMaxTrSize = u; } |
---|
| 1561 | UInt getMaxTrSize () { return m_uiMaxTrSize; } |
---|
| 1562 | |
---|
| 1563 | // AMP accuracy |
---|
| 1564 | Int getAMPAcc ( UInt uiDepth ) { return m_iAMPAcc[uiDepth]; } |
---|
| 1565 | Void setAMPAcc ( UInt uiDepth, Int iAccu ) { assert( uiDepth < g_uiMaxCUDepth); m_iAMPAcc[uiDepth] = iAccu; } |
---|
| 1566 | |
---|
| 1567 | // Bit-depth |
---|
| 1568 | Int getBitDepthY() { return m_bitDepthY; } |
---|
| 1569 | Void setBitDepthY(Int u) { m_bitDepthY = u; } |
---|
| 1570 | Int getBitDepthC() { return m_bitDepthC; } |
---|
| 1571 | Void setBitDepthC(Int u) { m_bitDepthC = u; } |
---|
| 1572 | Int getQpBDOffsetY () { return m_qpBDOffsetY; } |
---|
| 1573 | Void setQpBDOffsetY ( Int value ) { m_qpBDOffsetY = value; } |
---|
| 1574 | Int getQpBDOffsetC () { return m_qpBDOffsetC; } |
---|
| 1575 | Void setQpBDOffsetC ( Int value ) { m_qpBDOffsetC = value; } |
---|
| 1576 | Void setUseSAO (Bool bVal) {m_bUseSAO = bVal;} |
---|
| 1577 | Bool getUseSAO () {return m_bUseSAO;} |
---|
| 1578 | |
---|
| 1579 | UInt getMaxTLayers() { return m_uiMaxTLayers; } |
---|
| 1580 | Void setMaxTLayers( UInt uiMaxTLayers ) { assert( uiMaxTLayers <= MAX_TLAYER ); m_uiMaxTLayers = uiMaxTLayers; } |
---|
| 1581 | |
---|
| 1582 | Bool getTemporalIdNestingFlag() { return m_bTemporalIdNestingFlag; } |
---|
| 1583 | Void setTemporalIdNestingFlag( Bool bValue ) { m_bTemporalIdNestingFlag = bValue; } |
---|
| 1584 | UInt getPCMBitDepthLuma () { return m_uiPCMBitDepthLuma; } |
---|
| 1585 | Void setPCMBitDepthLuma ( UInt u ) { m_uiPCMBitDepthLuma = u; } |
---|
| 1586 | UInt getPCMBitDepthChroma () { return m_uiPCMBitDepthChroma; } |
---|
| 1587 | Void setPCMBitDepthChroma ( UInt u ) { m_uiPCMBitDepthChroma = u; } |
---|
| 1588 | Void setPCMFilterDisableFlag ( Bool bValue ) { m_bPCMFilterDisableFlag = bValue; } |
---|
| 1589 | Bool getPCMFilterDisableFlag () { return m_bPCMFilterDisableFlag; } |
---|
| 1590 | |
---|
| 1591 | Bool getScalingListFlag () { return m_scalingListEnabledFlag; } |
---|
| 1592 | Void setScalingListFlag ( Bool b ) { m_scalingListEnabledFlag = b; } |
---|
| 1593 | Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } |
---|
| 1594 | Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } |
---|
[442] | 1595 | |
---|
[540] | 1596 | #if SCALINGLIST_INFERRING |
---|
| 1597 | Void setScalingList( TComScalingList *scalingList ) { m_scalingList = scalingList; } |
---|
| 1598 | #else |
---|
| 1599 | Void setScalingList ( TComScalingList *scalingList); |
---|
[442] | 1600 | #endif |
---|
[313] | 1601 | TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in SPS |
---|
| 1602 | UInt getMaxDecPicBuffering (UInt tlayer) { return m_uiMaxDecPicBuffering[tlayer]; } |
---|
[595] | 1603 | Void setMaxDecPicBuffering ( UInt ui, UInt tlayer ) { assert(tlayer < MAX_TLAYER); m_uiMaxDecPicBuffering[tlayer] = ui; } |
---|
[313] | 1604 | UInt getMaxLatencyIncrease (UInt tlayer) { return m_uiMaxLatencyIncrease[tlayer]; } |
---|
| 1605 | Void setMaxLatencyIncrease ( UInt ui , UInt tlayer) { m_uiMaxLatencyIncrease[tlayer] = ui; } |
---|
| 1606 | |
---|
| 1607 | Void setUseStrongIntraSmoothing (Bool bVal) {m_useStrongIntraSmoothing = bVal;} |
---|
| 1608 | Bool getUseStrongIntraSmoothing () {return m_useStrongIntraSmoothing;} |
---|
| 1609 | |
---|
| 1610 | Bool getVuiParametersPresentFlag() { return m_vuiParametersPresentFlag; } |
---|
| 1611 | Void setVuiParametersPresentFlag(Bool b) { m_vuiParametersPresentFlag = b; } |
---|
| 1612 | TComVUI* getVuiParameters() { return &m_vuiParameters; } |
---|
| 1613 | Void setHrdParameters( UInt frameRate, UInt numDU, UInt bitRate, Bool randomAccess ); |
---|
| 1614 | |
---|
| 1615 | TComPTL* getPTL() { return &m_pcPTL; } |
---|
| 1616 | |
---|
| 1617 | #if SVC_EXTENSION |
---|
[644] | 1618 | Void setLayerId(UInt layerId) { m_layerId = layerId; } |
---|
| 1619 | UInt getLayerId() { return m_layerId; } |
---|
| 1620 | UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } |
---|
| 1621 | Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } |
---|
| 1622 | #if P0312_VERT_PHASE_ADJ |
---|
| 1623 | Bool getVertPhasePositionEnableFlag(Int x) { return m_vertPhasePositionEnableFlag[x]; } |
---|
| 1624 | Void setVertPhasePositionEnableFlag(Int x, Bool b) { m_vertPhasePositionEnableFlag[x] = b; } |
---|
| 1625 | #endif |
---|
[540] | 1626 | #if O0098_SCALED_REF_LAYER_ID |
---|
| 1627 | UInt getScaledRefLayerId(Int x) { return m_scaledRefLayerId[x]; } |
---|
[644] | 1628 | Void setScaledRefLayerId(Int x, UInt id) { m_scaledRefLayerId[x] = id; } |
---|
[540] | 1629 | Window& getScaledRefLayerWindowForLayer( Int layerId ); |
---|
| 1630 | #endif |
---|
[313] | 1631 | Window& getScaledRefLayerWindow( Int x ) { return m_scaledRefLayerWindow[x]; } |
---|
[442] | 1632 | #if REPN_FORMAT_IN_VPS |
---|
| 1633 | Bool getUpdateRepFormatFlag() { return m_updateRepFormatFlag; } |
---|
| 1634 | Void setUpdateRepFormatFlag(Bool x) { m_updateRepFormatFlag = x; } |
---|
[540] | 1635 | #if O0096_REP_FORMAT_INDEX |
---|
| 1636 | Int getUpdateRepFormatIndex() { return m_updateRepFormatIndex; } |
---|
| 1637 | Void setUpdateRepFormatIndex(UInt index) { m_updateRepFormatIndex = index; } |
---|
[442] | 1638 | #endif |
---|
[540] | 1639 | #endif |
---|
| 1640 | #if SCALINGLIST_INFERRING |
---|
| 1641 | Bool getInferScalingListFlag() { return m_inferScalingListFlag; } |
---|
| 1642 | UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; } |
---|
| 1643 | Void setInferScalingListFlag( Bool flag ) { m_inferScalingListFlag = flag; } |
---|
| 1644 | Void setScalingListRefLayerId( UInt layerId ) { m_scalingListRefLayerId = layerId; } |
---|
| 1645 | #endif |
---|
[494] | 1646 | #endif //SVC_EXTENSION |
---|
[313] | 1647 | }; |
---|
| 1648 | |
---|
| 1649 | /// Reference Picture Lists class |
---|
| 1650 | class TComRefPicListModification |
---|
| 1651 | { |
---|
| 1652 | private: |
---|
| 1653 | UInt m_bRefPicListModificationFlagL0; |
---|
| 1654 | UInt m_bRefPicListModificationFlagL1; |
---|
| 1655 | UInt m_RefPicSetIdxL0[32]; |
---|
| 1656 | UInt m_RefPicSetIdxL1[32]; |
---|
| 1657 | |
---|
| 1658 | public: |
---|
| 1659 | TComRefPicListModification(); |
---|
| 1660 | virtual ~TComRefPicListModification(); |
---|
| 1661 | |
---|
| 1662 | Void create (); |
---|
| 1663 | Void destroy (); |
---|
| 1664 | |
---|
| 1665 | Bool getRefPicListModificationFlagL0() { return m_bRefPicListModificationFlagL0; } |
---|
| 1666 | Void setRefPicListModificationFlagL0(Bool flag) { m_bRefPicListModificationFlagL0 = flag; } |
---|
| 1667 | Bool getRefPicListModificationFlagL1() { return m_bRefPicListModificationFlagL1; } |
---|
| 1668 | Void setRefPicListModificationFlagL1(Bool flag) { m_bRefPicListModificationFlagL1 = flag; } |
---|
| 1669 | Void setRefPicSetIdxL0(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL0[idx] = refPicSetIdx; } |
---|
| 1670 | UInt getRefPicSetIdxL0(UInt idx) { return m_RefPicSetIdxL0[idx]; } |
---|
| 1671 | Void setRefPicSetIdxL1(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL1[idx] = refPicSetIdx; } |
---|
| 1672 | UInt getRefPicSetIdxL1(UInt idx) { return m_RefPicSetIdxL1[idx]; } |
---|
| 1673 | }; |
---|
| 1674 | |
---|
| 1675 | /// PPS class |
---|
| 1676 | class TComPPS |
---|
| 1677 | { |
---|
| 1678 | private: |
---|
| 1679 | Int m_PPSId; // pic_parameter_set_id |
---|
| 1680 | Int m_SPSId; // seq_parameter_set_id |
---|
| 1681 | Int m_picInitQPMinus26; |
---|
| 1682 | Bool m_useDQP; |
---|
| 1683 | Bool m_bConstrainedIntraPred; // constrained_intra_pred_flag |
---|
| 1684 | Bool m_bSliceChromaQpFlag; // slicelevel_chroma_qp_flag |
---|
| 1685 | |
---|
| 1686 | // access channel |
---|
| 1687 | TComSPS* m_pcSPS; |
---|
| 1688 | UInt m_uiMaxCuDQPDepth; |
---|
| 1689 | UInt m_uiMinCuDQPSize; |
---|
| 1690 | |
---|
| 1691 | Int m_chromaCbQpOffset; |
---|
| 1692 | Int m_chromaCrQpOffset; |
---|
| 1693 | |
---|
| 1694 | UInt m_numRefIdxL0DefaultActive; |
---|
| 1695 | UInt m_numRefIdxL1DefaultActive; |
---|
| 1696 | |
---|
| 1697 | Bool m_bUseWeightPred; // Use of Weighting Prediction (P_SLICE) |
---|
| 1698 | Bool m_useWeightedBiPred; // Use of Weighting Bi-Prediction (B_SLICE) |
---|
| 1699 | Bool m_OutputFlagPresentFlag; // Indicates the presence of output_flag in slice header |
---|
| 1700 | |
---|
| 1701 | Bool m_TransquantBypassEnableFlag; // Indicates presence of cu_transquant_bypass_flag in CUs. |
---|
| 1702 | Bool m_useTransformSkip; |
---|
| 1703 | Bool m_dependentSliceSegmentsEnabledFlag; //!< Indicates the presence of dependent slices |
---|
| 1704 | Bool m_tilesEnabledFlag; //!< Indicates the presence of tiles |
---|
| 1705 | Bool m_entropyCodingSyncEnabledFlag; //!< Indicates the presence of wavefronts |
---|
| 1706 | |
---|
| 1707 | Bool m_loopFilterAcrossTilesEnabledFlag; |
---|
| 1708 | Int m_uniformSpacingFlag; |
---|
| 1709 | Int m_iNumColumnsMinus1; |
---|
| 1710 | UInt* m_puiColumnWidth; |
---|
| 1711 | Int m_iNumRowsMinus1; |
---|
| 1712 | UInt* m_puiRowHeight; |
---|
| 1713 | |
---|
| 1714 | Int m_iNumSubstreams; |
---|
| 1715 | |
---|
| 1716 | Int m_signHideFlag; |
---|
| 1717 | |
---|
| 1718 | Bool m_cabacInitPresentFlag; |
---|
| 1719 | UInt m_encCABACTableIdx; // Used to transmit table selection across slices |
---|
| 1720 | |
---|
| 1721 | Bool m_sliceHeaderExtensionPresentFlag; |
---|
| 1722 | Bool m_loopFilterAcrossSlicesEnabledFlag; |
---|
| 1723 | Bool m_deblockingFilterControlPresentFlag; |
---|
| 1724 | Bool m_deblockingFilterOverrideEnabledFlag; |
---|
| 1725 | Bool m_picDisableDeblockingFilterFlag; |
---|
| 1726 | Int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
| 1727 | Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
| 1728 | Bool m_scalingListPresentFlag; |
---|
[540] | 1729 | TComScalingList* m_scalingList; //!< ScalingList class pointer |
---|
| 1730 | Bool m_listsModificationPresentFlag; |
---|
| 1731 | UInt m_log2ParallelMergeLevelMinus2; |
---|
| 1732 | Int m_numExtraSliceHeaderBits; |
---|
[442] | 1733 | |
---|
| 1734 | #if SVC_EXTENSION |
---|
[540] | 1735 | #if SCALINGLIST_INFERRING |
---|
| 1736 | UInt m_layerId; |
---|
| 1737 | Bool m_inferScalingListFlag; |
---|
[442] | 1738 | UInt m_scalingListRefLayerId; |
---|
| 1739 | #endif |
---|
[644] | 1740 | #if POC_RESET_IDC |
---|
| 1741 | Bool m_pocResetInfoPresentFlag; |
---|
[442] | 1742 | #endif |
---|
[644] | 1743 | #endif |
---|
[442] | 1744 | |
---|
[313] | 1745 | public: |
---|
| 1746 | TComPPS(); |
---|
| 1747 | virtual ~TComPPS(); |
---|
| 1748 | |
---|
| 1749 | Int getPPSId () { return m_PPSId; } |
---|
| 1750 | Void setPPSId (Int i) { m_PPSId = i; } |
---|
| 1751 | Int getSPSId () { return m_SPSId; } |
---|
| 1752 | Void setSPSId (Int i) { m_SPSId = i; } |
---|
| 1753 | |
---|
| 1754 | Int getPicInitQPMinus26 () { return m_picInitQPMinus26; } |
---|
| 1755 | Void setPicInitQPMinus26 ( Int i ) { m_picInitQPMinus26 = i; } |
---|
| 1756 | Bool getUseDQP () { return m_useDQP; } |
---|
| 1757 | Void setUseDQP ( Bool b ) { m_useDQP = b; } |
---|
| 1758 | Bool getConstrainedIntraPred () { return m_bConstrainedIntraPred; } |
---|
| 1759 | Void setConstrainedIntraPred ( Bool b ) { m_bConstrainedIntraPred = b; } |
---|
| 1760 | Bool getSliceChromaQpFlag () { return m_bSliceChromaQpFlag; } |
---|
| 1761 | Void setSliceChromaQpFlag ( Bool b ) { m_bSliceChromaQpFlag = b; } |
---|
| 1762 | |
---|
| 1763 | Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
| 1764 | TComSPS* getSPS () { return m_pcSPS; } |
---|
| 1765 | Void setMaxCuDQPDepth ( UInt u ) { m_uiMaxCuDQPDepth = u; } |
---|
| 1766 | UInt getMaxCuDQPDepth () { return m_uiMaxCuDQPDepth;} |
---|
| 1767 | Void setMinCuDQPSize ( UInt u ) { m_uiMinCuDQPSize = u; } |
---|
| 1768 | UInt getMinCuDQPSize () { return m_uiMinCuDQPSize; } |
---|
| 1769 | |
---|
| 1770 | Void setChromaCbQpOffset( Int i ) { m_chromaCbQpOffset = i; } |
---|
| 1771 | Int getChromaCbQpOffset() { return m_chromaCbQpOffset; } |
---|
| 1772 | Void setChromaCrQpOffset( Int i ) { m_chromaCrQpOffset = i; } |
---|
| 1773 | Int getChromaCrQpOffset() { return m_chromaCrQpOffset; } |
---|
| 1774 | |
---|
| 1775 | Void setNumRefIdxL0DefaultActive(UInt ui) { m_numRefIdxL0DefaultActive=ui; } |
---|
| 1776 | UInt getNumRefIdxL0DefaultActive() { return m_numRefIdxL0DefaultActive; } |
---|
| 1777 | Void setNumRefIdxL1DefaultActive(UInt ui) { m_numRefIdxL1DefaultActive=ui; } |
---|
| 1778 | UInt getNumRefIdxL1DefaultActive() { return m_numRefIdxL1DefaultActive; } |
---|
| 1779 | |
---|
| 1780 | Bool getUseWP () { return m_bUseWeightPred; } |
---|
| 1781 | Bool getWPBiPred () { return m_useWeightedBiPred; } |
---|
| 1782 | Void setUseWP ( Bool b ) { m_bUseWeightPred = b; } |
---|
| 1783 | Void setWPBiPred ( Bool b ) { m_useWeightedBiPred = b; } |
---|
| 1784 | Void setOutputFlagPresentFlag( Bool b ) { m_OutputFlagPresentFlag = b; } |
---|
| 1785 | Bool getOutputFlagPresentFlag() { return m_OutputFlagPresentFlag; } |
---|
| 1786 | Void setTransquantBypassEnableFlag( Bool b ) { m_TransquantBypassEnableFlag = b; } |
---|
| 1787 | Bool getTransquantBypassEnableFlag() { return m_TransquantBypassEnableFlag; } |
---|
| 1788 | |
---|
| 1789 | Bool getUseTransformSkip () { return m_useTransformSkip; } |
---|
| 1790 | Void setUseTransformSkip ( Bool b ) { m_useTransformSkip = b; } |
---|
| 1791 | |
---|
| 1792 | Void setLoopFilterAcrossTilesEnabledFlag (Bool b) { m_loopFilterAcrossTilesEnabledFlag = b; } |
---|
| 1793 | Bool getLoopFilterAcrossTilesEnabledFlag () { return m_loopFilterAcrossTilesEnabledFlag; } |
---|
| 1794 | Bool getDependentSliceSegmentsEnabledFlag() const { return m_dependentSliceSegmentsEnabledFlag; } |
---|
| 1795 | Void setDependentSliceSegmentsEnabledFlag(Bool val) { m_dependentSliceSegmentsEnabledFlag = val; } |
---|
| 1796 | Bool getTilesEnabledFlag() const { return m_tilesEnabledFlag; } |
---|
| 1797 | Void setTilesEnabledFlag(Bool val) { m_tilesEnabledFlag = val; } |
---|
| 1798 | Bool getEntropyCodingSyncEnabledFlag() const { return m_entropyCodingSyncEnabledFlag; } |
---|
| 1799 | Void setEntropyCodingSyncEnabledFlag(Bool val) { m_entropyCodingSyncEnabledFlag = val; } |
---|
| 1800 | Void setUniformSpacingFlag ( Bool b ) { m_uniformSpacingFlag = b; } |
---|
| 1801 | Bool getUniformSpacingFlag () { return m_uniformSpacingFlag; } |
---|
| 1802 | Void setNumColumnsMinus1 ( Int i ) { m_iNumColumnsMinus1 = i; } |
---|
| 1803 | Int getNumColumnsMinus1 () { return m_iNumColumnsMinus1; } |
---|
| 1804 | Void setColumnWidth ( UInt* columnWidth ) |
---|
| 1805 | { |
---|
| 1806 | if( m_uniformSpacingFlag == 0 && m_iNumColumnsMinus1 > 0 ) |
---|
| 1807 | { |
---|
| 1808 | m_puiColumnWidth = new UInt[ m_iNumColumnsMinus1 ]; |
---|
| 1809 | |
---|
| 1810 | for(Int i=0; i<m_iNumColumnsMinus1; i++) |
---|
| 1811 | { |
---|
| 1812 | m_puiColumnWidth[i] = columnWidth[i]; |
---|
| 1813 | } |
---|
| 1814 | } |
---|
| 1815 | } |
---|
| 1816 | UInt getColumnWidth (UInt columnIdx) { return *( m_puiColumnWidth + columnIdx ); } |
---|
| 1817 | Void setNumRowsMinus1( Int i ) { m_iNumRowsMinus1 = i; } |
---|
| 1818 | Int getNumRowsMinus1() { return m_iNumRowsMinus1; } |
---|
| 1819 | Void setRowHeight ( UInt* rowHeight ) |
---|
| 1820 | { |
---|
| 1821 | if( m_uniformSpacingFlag == 0 && m_iNumRowsMinus1 > 0 ) |
---|
| 1822 | { |
---|
| 1823 | m_puiRowHeight = new UInt[ m_iNumRowsMinus1 ]; |
---|
| 1824 | |
---|
| 1825 | for(Int i=0; i<m_iNumRowsMinus1; i++) |
---|
| 1826 | { |
---|
| 1827 | m_puiRowHeight[i] = rowHeight[i]; |
---|
| 1828 | } |
---|
| 1829 | } |
---|
| 1830 | } |
---|
| 1831 | UInt getRowHeight (UInt rowIdx) { return *( m_puiRowHeight + rowIdx ); } |
---|
| 1832 | Void setNumSubstreams(Int iNumSubstreams) { m_iNumSubstreams = iNumSubstreams; } |
---|
| 1833 | Int getNumSubstreams() { return m_iNumSubstreams; } |
---|
| 1834 | |
---|
| 1835 | Void setSignHideFlag( Int signHideFlag ) { m_signHideFlag = signHideFlag; } |
---|
| 1836 | Int getSignHideFlag() { return m_signHideFlag; } |
---|
| 1837 | |
---|
| 1838 | Void setCabacInitPresentFlag( Bool flag ) { m_cabacInitPresentFlag = flag; } |
---|
| 1839 | Void setEncCABACTableIdx( Int idx ) { m_encCABACTableIdx = idx; } |
---|
| 1840 | Bool getCabacInitPresentFlag() { return m_cabacInitPresentFlag; } |
---|
| 1841 | UInt getEncCABACTableIdx() { return m_encCABACTableIdx; } |
---|
| 1842 | Void setDeblockingFilterControlPresentFlag( Bool val ) { m_deblockingFilterControlPresentFlag = val; } |
---|
| 1843 | Bool getDeblockingFilterControlPresentFlag() { return m_deblockingFilterControlPresentFlag; } |
---|
| 1844 | Void setDeblockingFilterOverrideEnabledFlag( Bool val ) { m_deblockingFilterOverrideEnabledFlag = val; } |
---|
| 1845 | Bool getDeblockingFilterOverrideEnabledFlag() { return m_deblockingFilterOverrideEnabledFlag; } |
---|
| 1846 | Void setPicDisableDeblockingFilterFlag(Bool val) { m_picDisableDeblockingFilterFlag = val; } //!< set offset for deblocking filter disabled |
---|
| 1847 | Bool getPicDisableDeblockingFilterFlag() { return m_picDisableDeblockingFilterFlag; } //!< get offset for deblocking filter disabled |
---|
| 1848 | Void setDeblockingFilterBetaOffsetDiv2(Int val) { m_deblockingFilterBetaOffsetDiv2 = val; } //!< set beta offset for deblocking filter |
---|
| 1849 | Int getDeblockingFilterBetaOffsetDiv2() { return m_deblockingFilterBetaOffsetDiv2; } //!< get beta offset for deblocking filter |
---|
| 1850 | Void setDeblockingFilterTcOffsetDiv2(Int val) { m_deblockingFilterTcOffsetDiv2 = val; } //!< set tc offset for deblocking filter |
---|
| 1851 | Int getDeblockingFilterTcOffsetDiv2() { return m_deblockingFilterTcOffsetDiv2; } //!< get tc offset for deblocking filter |
---|
| 1852 | Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } |
---|
| 1853 | Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } |
---|
[442] | 1854 | |
---|
[540] | 1855 | #if SCALINGLIST_INFERRING |
---|
[442] | 1856 | UInt getLayerId() { return m_layerId; } |
---|
[540] | 1857 | Void setLayerId( UInt layerId ) { m_layerId = layerId; } |
---|
| 1858 | Bool getInferScalingListFlag() { return m_inferScalingListFlag; } |
---|
| 1859 | UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; } |
---|
| 1860 | Void setInferScalingListFlag( Bool flag ) { m_inferScalingListFlag = flag; } |
---|
| 1861 | Void setScalingListRefLayerId( UInt layerId ) { m_scalingListRefLayerId = layerId; } |
---|
[442] | 1862 | #endif |
---|
| 1863 | |
---|
[540] | 1864 | #if SCALINGLIST_INFERRING |
---|
| 1865 | Void setScalingList( TComScalingList *scalingList ) { m_scalingList = scalingList; } |
---|
| 1866 | #else |
---|
[313] | 1867 | Void setScalingList ( TComScalingList *scalingList); |
---|
[540] | 1868 | #endif |
---|
[313] | 1869 | TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in PPS |
---|
| 1870 | Bool getListsModificationPresentFlag () { return m_listsModificationPresentFlag; } |
---|
| 1871 | Void setListsModificationPresentFlag ( Bool b ) { m_listsModificationPresentFlag = b; } |
---|
| 1872 | UInt getLog2ParallelMergeLevelMinus2 () { return m_log2ParallelMergeLevelMinus2; } |
---|
| 1873 | Void setLog2ParallelMergeLevelMinus2 (UInt mrgLevel) { m_log2ParallelMergeLevelMinus2 = mrgLevel; } |
---|
| 1874 | Int getNumExtraSliceHeaderBits() { return m_numExtraSliceHeaderBits; } |
---|
| 1875 | Void setNumExtraSliceHeaderBits(Int i) { m_numExtraSliceHeaderBits = i; } |
---|
| 1876 | Void setLoopFilterAcrossSlicesEnabledFlag ( Bool bValue ) { m_loopFilterAcrossSlicesEnabledFlag = bValue; } |
---|
| 1877 | Bool getLoopFilterAcrossSlicesEnabledFlag () { return m_loopFilterAcrossSlicesEnabledFlag; } |
---|
| 1878 | Bool getSliceHeaderExtensionPresentFlag () { return m_sliceHeaderExtensionPresentFlag; } |
---|
| 1879 | Void setSliceHeaderExtensionPresentFlag (Bool val) { m_sliceHeaderExtensionPresentFlag = val; } |
---|
[644] | 1880 | #if POC_RESET_IDC |
---|
| 1881 | Bool getPocResetInfoPresentFlag () { return m_pocResetInfoPresentFlag; } |
---|
| 1882 | Void setPocResetInfoPresentFlag (const Bool val) { m_pocResetInfoPresentFlag = val; } |
---|
| 1883 | #endif |
---|
[313] | 1884 | }; |
---|
| 1885 | |
---|
| 1886 | typedef struct |
---|
| 1887 | { |
---|
| 1888 | // Explicit weighted prediction parameters parsed in slice header, |
---|
| 1889 | // or Implicit weighted prediction parameters (8 bits depth values). |
---|
| 1890 | Bool bPresentFlag; |
---|
| 1891 | UInt uiLog2WeightDenom; |
---|
| 1892 | Int iWeight; |
---|
| 1893 | Int iOffset; |
---|
| 1894 | |
---|
| 1895 | // Weighted prediction scaling values built from above parameters (bitdepth scaled): |
---|
| 1896 | Int w, o, offset, shift, round; |
---|
| 1897 | } wpScalingParam; |
---|
| 1898 | |
---|
| 1899 | typedef struct |
---|
| 1900 | { |
---|
| 1901 | Int64 iAC; |
---|
| 1902 | Int64 iDC; |
---|
[494] | 1903 | #if O0194_WEIGHTED_PREDICTION_CGS |
---|
| 1904 | Int iSamples; |
---|
| 1905 | #endif |
---|
[313] | 1906 | } wpACDCParam; |
---|
| 1907 | |
---|
| 1908 | /// slice header class |
---|
| 1909 | class TComSlice |
---|
| 1910 | { |
---|
| 1911 | |
---|
| 1912 | private: |
---|
| 1913 | // Bitstream writing |
---|
| 1914 | Bool m_saoEnabledFlag; |
---|
| 1915 | Bool m_saoEnabledFlagChroma; ///< SAO Cb&Cr enabled flag |
---|
| 1916 | Int m_iPPSId; ///< picture parameter set ID |
---|
| 1917 | Bool m_PicOutputFlag; ///< pic_output_flag |
---|
| 1918 | Int m_iPOC; |
---|
| 1919 | Int m_iLastIDR; |
---|
[442] | 1920 | Int m_iAssociatedIRAP; |
---|
| 1921 | NalUnitType m_iAssociatedIRAPType; |
---|
| 1922 | static Int m_prevTid0POC; |
---|
[313] | 1923 | TComReferencePictureSet *m_pcRPS; |
---|
| 1924 | TComReferencePictureSet m_LocalRPS; |
---|
| 1925 | Int m_iBDidx; |
---|
| 1926 | TComRefPicListModification m_RefPicListModification; |
---|
| 1927 | NalUnitType m_eNalUnitType; ///< Nal unit type for the slice |
---|
| 1928 | SliceType m_eSliceType; |
---|
| 1929 | Int m_iSliceQp; |
---|
| 1930 | Bool m_dependentSliceSegmentFlag; |
---|
| 1931 | #if ADAPTIVE_QP_SELECTION |
---|
| 1932 | Int m_iSliceQpBase; |
---|
| 1933 | #endif |
---|
| 1934 | Bool m_deblockingFilterDisable; |
---|
| 1935 | Bool m_deblockingFilterOverrideFlag; //< offsets for deblocking filter inherit from PPS |
---|
| 1936 | Int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
| 1937 | Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
| 1938 | Int m_list1IdxToList0Idx[MAX_NUM_REF]; |
---|
| 1939 | Int m_aiNumRefIdx [2]; // for multiple reference of current slice |
---|
| 1940 | |
---|
| 1941 | Bool m_bCheckLDC; |
---|
| 1942 | |
---|
| 1943 | // Data |
---|
| 1944 | Int m_iSliceQpDelta; |
---|
| 1945 | Int m_iSliceQpDeltaCb; |
---|
| 1946 | Int m_iSliceQpDeltaCr; |
---|
| 1947 | TComPic* m_apcRefPicList [2][MAX_NUM_REF+1]; |
---|
| 1948 | Int m_aiRefPOCList [2][MAX_NUM_REF+1]; |
---|
| 1949 | Bool m_bIsUsedAsLongTerm[2][MAX_NUM_REF+1]; |
---|
| 1950 | Int m_iDepth; |
---|
| 1951 | |
---|
| 1952 | // referenced slice? |
---|
| 1953 | Bool m_bRefenced; |
---|
[494] | 1954 | |
---|
[313] | 1955 | // access channel |
---|
| 1956 | TComVPS* m_pcVPS; |
---|
| 1957 | TComSPS* m_pcSPS; |
---|
| 1958 | TComPPS* m_pcPPS; |
---|
| 1959 | TComPic* m_pcPic; |
---|
| 1960 | #if ADAPTIVE_QP_SELECTION |
---|
| 1961 | TComTrQuant* m_pcTrQuant; |
---|
| 1962 | #endif |
---|
| 1963 | UInt m_colFromL0Flag; // collocated picture from List0 flag |
---|
| 1964 | |
---|
| 1965 | UInt m_colRefIdx; |
---|
| 1966 | UInt m_maxNumMergeCand; |
---|
| 1967 | |
---|
[540] | 1968 | Double m_lambdas[3]; |
---|
[313] | 1969 | |
---|
| 1970 | Bool m_abEqualRef [2][MAX_NUM_REF][MAX_NUM_REF]; |
---|
| 1971 | UInt m_uiTLayer; |
---|
| 1972 | Bool m_bTLayerSwitchingFlag; |
---|
| 1973 | |
---|
| 1974 | UInt m_sliceMode; |
---|
| 1975 | UInt m_sliceArgument; |
---|
| 1976 | UInt m_sliceCurStartCUAddr; |
---|
| 1977 | UInt m_sliceCurEndCUAddr; |
---|
| 1978 | UInt m_sliceIdx; |
---|
| 1979 | UInt m_sliceSegmentMode; |
---|
| 1980 | UInt m_sliceSegmentArgument; |
---|
| 1981 | UInt m_sliceSegmentCurStartCUAddr; |
---|
| 1982 | UInt m_sliceSegmentCurEndCUAddr; |
---|
| 1983 | Bool m_nextSlice; |
---|
| 1984 | Bool m_nextSliceSegment; |
---|
| 1985 | UInt m_sliceBits; |
---|
| 1986 | UInt m_sliceSegmentBits; |
---|
| 1987 | Bool m_bFinalized; |
---|
| 1988 | |
---|
| 1989 | wpScalingParam m_weightPredTable[2][MAX_NUM_REF][3]; // [REF_PIC_LIST_0 or REF_PIC_LIST_1][refIdx][0:Y, 1:U, 2:V] |
---|
| 1990 | wpACDCParam m_weightACDCParam[3]; // [0:Y, 1:U, 2:V] |
---|
| 1991 | |
---|
| 1992 | std::vector<UInt> m_tileByteLocation; |
---|
| 1993 | UInt m_uiTileOffstForMultES; |
---|
| 1994 | |
---|
| 1995 | UInt* m_puiSubstreamSizes; |
---|
| 1996 | TComScalingList* m_scalingList; //!< pointer of quantization matrix |
---|
| 1997 | Bool m_cabacInitFlag; |
---|
| 1998 | |
---|
| 1999 | Bool m_bLMvdL1Zero; |
---|
| 2000 | Int m_numEntryPointOffsets; |
---|
| 2001 | Bool m_temporalLayerNonReferenceFlag; |
---|
| 2002 | Bool m_LFCrossSliceBoundaryFlag; |
---|
| 2003 | |
---|
| 2004 | Bool m_enableTMVPFlag; |
---|
[494] | 2005 | |
---|
| 2006 | #if SVC_EXTENSION |
---|
| 2007 | UInt m_layerId; |
---|
| 2008 | TComPic* m_pcBaseColPic[MAX_LAYERS]; |
---|
| 2009 | TComPicYuv* m_pcFullPelBaseRec[MAX_LAYERS]; |
---|
| 2010 | Int m_numMotionPredRefLayers; |
---|
| 2011 | #if REF_IDX_MFM |
---|
| 2012 | Bool m_bMFMEnabledFlag; |
---|
| 2013 | Int m_colRefLayerIdx; |
---|
| 2014 | Bool m_altColIndicationFlag; |
---|
| 2015 | TComPic* m_pcIlpPic; |
---|
| 2016 | #endif |
---|
| 2017 | |
---|
| 2018 | Bool m_interLayerPredEnabledFlag; |
---|
| 2019 | Int m_activeNumILRRefIdx; //< Active inter-layer reference pictures |
---|
| 2020 | Int m_interLayerPredLayerIdc [MAX_VPS_LAYER_ID_PLUS1]; |
---|
[644] | 2021 | #if P0312_VERT_PHASE_ADJ |
---|
| 2022 | Bool m_vertPhasePositionFlag[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 2023 | #endif |
---|
[494] | 2024 | #if POC_RESET_FLAG |
---|
| 2025 | Bool m_bPocResetFlag; |
---|
| 2026 | Int m_pocValueBeforeReset; |
---|
| 2027 | #endif |
---|
| 2028 | Bool m_bDiscardableFlag; |
---|
[540] | 2029 | #if O0149_CROSS_LAYER_BLA_FLAG |
---|
| 2030 | Bool m_bCrossLayerBLAFlag; |
---|
| 2031 | #endif |
---|
[644] | 2032 | #if NO_OUTPUT_OF_PRIOR_PICS |
---|
| 2033 | Bool m_noOutputOfPriorPicsFlag; |
---|
| 2034 | Bool m_noRaslOutputFlag; |
---|
| 2035 | Bool m_handleCraAsBlaFlag; |
---|
| 2036 | #endif |
---|
| 2037 | #if POC_RESET_IDC_SIGNALLING |
---|
| 2038 | Int m_pocResetIdc; |
---|
| 2039 | Int m_pocResetPeriodId; |
---|
| 2040 | Bool m_fullPocResetFlag; |
---|
| 2041 | Int m_pocLsbVal; |
---|
| 2042 | Int m_pocMsbVal; |
---|
| 2043 | Bool m_pocMsbValRequiredFlag; |
---|
| 2044 | Bool m_pocMsbValPresentFlag; |
---|
| 2045 | #endif |
---|
[494] | 2046 | #endif //SVC_EXTENSION |
---|
| 2047 | |
---|
[313] | 2048 | public: |
---|
| 2049 | TComSlice(); |
---|
| 2050 | virtual ~TComSlice(); |
---|
| 2051 | #if SVC_EXTENSION |
---|
| 2052 | Void initSlice ( UInt layerId ); |
---|
| 2053 | #else |
---|
| 2054 | Void initSlice (); |
---|
| 2055 | #endif |
---|
| 2056 | |
---|
| 2057 | Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } |
---|
| 2058 | TComVPS* getVPS () { return m_pcVPS; } |
---|
| 2059 | Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
| 2060 | TComSPS* getSPS () { return m_pcSPS; } |
---|
| 2061 | |
---|
| 2062 | Void setPPS ( TComPPS* pcPPS ) { assert(pcPPS!=NULL); m_pcPPS = pcPPS; m_iPPSId = pcPPS->getPPSId(); } |
---|
| 2063 | TComPPS* getPPS () { return m_pcPPS; } |
---|
| 2064 | |
---|
| 2065 | #if ADAPTIVE_QP_SELECTION |
---|
| 2066 | Void setTrQuant ( TComTrQuant* pcTrQuant ) { m_pcTrQuant = pcTrQuant; } |
---|
| 2067 | TComTrQuant* getTrQuant () { return m_pcTrQuant; } |
---|
| 2068 | #endif |
---|
| 2069 | |
---|
| 2070 | Void setPPSId ( Int PPSId ) { m_iPPSId = PPSId; } |
---|
| 2071 | Int getPPSId () { return m_iPPSId; } |
---|
| 2072 | Void setPicOutputFlag( Bool b ) { m_PicOutputFlag = b; } |
---|
| 2073 | Bool getPicOutputFlag() { return m_PicOutputFlag; } |
---|
| 2074 | Void setSaoEnabledFlag(Bool s) {m_saoEnabledFlag =s; } |
---|
| 2075 | Bool getSaoEnabledFlag() { return m_saoEnabledFlag; } |
---|
| 2076 | Void setSaoEnabledFlagChroma(Bool s) {m_saoEnabledFlagChroma =s; } //!< set SAO Cb&Cr enabled flag |
---|
| 2077 | Bool getSaoEnabledFlagChroma() { return m_saoEnabledFlagChroma; } //!< get SAO Cb&Cr enabled flag |
---|
| 2078 | Void setRPS ( TComReferencePictureSet *pcRPS ) { m_pcRPS = pcRPS; } |
---|
| 2079 | TComReferencePictureSet* getRPS () { return m_pcRPS; } |
---|
| 2080 | TComReferencePictureSet* getLocalRPS () { return &m_LocalRPS; } |
---|
| 2081 | |
---|
| 2082 | Void setRPSidx ( Int iBDidx ) { m_iBDidx = iBDidx; } |
---|
| 2083 | Int getRPSidx () { return m_iBDidx; } |
---|
[442] | 2084 | Int getPrevTid0POC () { return m_prevTid0POC; } |
---|
[540] | 2085 | #if PREVTID0_POC_RESET |
---|
| 2086 | Void adjustPrevTid0POC (Int adj) { m_prevTid0POC=m_prevTid0POC-adj; } |
---|
| 2087 | #endif |
---|
[313] | 2088 | TComRefPicListModification* getRefPicListModification() { return &m_RefPicListModification; } |
---|
| 2089 | Void setLastIDR(Int iIDRPOC) { m_iLastIDR = iIDRPOC; } |
---|
| 2090 | Int getLastIDR() { return m_iLastIDR; } |
---|
[442] | 2091 | Void setAssociatedIRAPPOC(Int iAssociatedIRAPPOC) { m_iAssociatedIRAP = iAssociatedIRAPPOC; } |
---|
| 2092 | Int getAssociatedIRAPPOC() { return m_iAssociatedIRAP; } |
---|
| 2093 | Void setAssociatedIRAPType(NalUnitType associatedIRAPType) { m_iAssociatedIRAPType = associatedIRAPType; } |
---|
| 2094 | NalUnitType getAssociatedIRAPType() { return m_iAssociatedIRAPType; } |
---|
[313] | 2095 | SliceType getSliceType () { return m_eSliceType; } |
---|
| 2096 | Int getPOC () { return m_iPOC; } |
---|
| 2097 | Int getSliceQp () { return m_iSliceQp; } |
---|
| 2098 | Bool getDependentSliceSegmentFlag() const { return m_dependentSliceSegmentFlag; } |
---|
| 2099 | void setDependentSliceSegmentFlag(Bool val) { m_dependentSliceSegmentFlag = val; } |
---|
| 2100 | #if ADAPTIVE_QP_SELECTION |
---|
| 2101 | Int getSliceQpBase () { return m_iSliceQpBase; } |
---|
| 2102 | #endif |
---|
| 2103 | Int getSliceQpDelta () { return m_iSliceQpDelta; } |
---|
| 2104 | Int getSliceQpDeltaCb () { return m_iSliceQpDeltaCb; } |
---|
| 2105 | Int getSliceQpDeltaCr () { return m_iSliceQpDeltaCr; } |
---|
| 2106 | Bool getDeblockingFilterDisable() { return m_deblockingFilterDisable; } |
---|
| 2107 | Bool getDeblockingFilterOverrideFlag() { return m_deblockingFilterOverrideFlag; } |
---|
| 2108 | Int getDeblockingFilterBetaOffsetDiv2() { return m_deblockingFilterBetaOffsetDiv2; } |
---|
| 2109 | Int getDeblockingFilterTcOffsetDiv2() { return m_deblockingFilterTcOffsetDiv2; } |
---|
| 2110 | |
---|
| 2111 | Int getNumRefIdx ( RefPicList e ) { return m_aiNumRefIdx[e]; } |
---|
| 2112 | TComPic* getPic () { return m_pcPic; } |
---|
| 2113 | TComPic* getRefPic ( RefPicList e, Int iRefIdx) { return m_apcRefPicList[e][iRefIdx]; } |
---|
| 2114 | Int getRefPOC ( RefPicList e, Int iRefIdx) { return m_aiRefPOCList[e][iRefIdx]; } |
---|
| 2115 | Int getDepth () { return m_iDepth; } |
---|
| 2116 | UInt getColFromL0Flag () { return m_colFromL0Flag; } |
---|
| 2117 | UInt getColRefIdx () { return m_colRefIdx; } |
---|
| 2118 | Void checkColRefIdx (UInt curSliceIdx, TComPic* pic); |
---|
| 2119 | Bool getIsUsedAsLongTerm (Int i, Int j) { return m_bIsUsedAsLongTerm[i][j]; } |
---|
[442] | 2120 | Void setIsUsedAsLongTerm (Int i, Int j, Bool value) { m_bIsUsedAsLongTerm[i][j] = value; } |
---|
[313] | 2121 | Bool getCheckLDC () { return m_bCheckLDC; } |
---|
| 2122 | Bool getMvdL1ZeroFlag () { return m_bLMvdL1Zero; } |
---|
| 2123 | Int getNumRpsCurrTempList(); |
---|
| 2124 | Int getList1IdxToList0Idx ( Int list1Idx ) { return m_list1IdxToList0Idx[list1Idx]; } |
---|
| 2125 | Void setReferenced(Bool b) { m_bRefenced = b; } |
---|
| 2126 | Bool isReferenced() { return m_bRefenced; } |
---|
[442] | 2127 | Bool isReferenceNalu() { return ((getNalUnitType() <= NAL_UNIT_RESERVED_VCL_R15) && (getNalUnitType()%2 != 0)) || ((getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP) && (getNalUnitType() <= NAL_UNIT_RESERVED_IRAP_VCL23) ); } |
---|
| 2128 | Void setPOC ( Int i ) { m_iPOC = i; if ((getTLayer()==0) && (isReferenceNalu() && (getNalUnitType()!=NAL_UNIT_CODED_SLICE_RASL_R)&& (getNalUnitType()!=NAL_UNIT_CODED_SLICE_RADL_R))) {m_prevTid0POC=i;} } |
---|
[313] | 2129 | Void setNalUnitType ( NalUnitType e ) { m_eNalUnitType = e; } |
---|
| 2130 | NalUnitType getNalUnitType () const { return m_eNalUnitType; } |
---|
| 2131 | Bool getRapPicFlag (); |
---|
[644] | 2132 | #if NO_OUTPUT_OF_PRIOR_PICS |
---|
| 2133 | Bool getBlaPicFlag (); |
---|
| 2134 | Bool getCraPicFlag (); |
---|
| 2135 | #endif |
---|
[313] | 2136 | Bool getIdrPicFlag () { return getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP; } |
---|
| 2137 | Bool isIRAP () const { return (getNalUnitType() >= 16) && (getNalUnitType() <= 23); } |
---|
[442] | 2138 | Void checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, NalUnitType& associatedIRAPType, TComList<TComPic *>& rcListPic); |
---|
[540] | 2139 | #if NO_CLRAS_OUTPUT_FLAG |
---|
| 2140 | Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag); |
---|
| 2141 | #else |
---|
[313] | 2142 | Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic); |
---|
[540] | 2143 | #endif |
---|
[313] | 2144 | Void setSliceType ( SliceType e ) { m_eSliceType = e; } |
---|
| 2145 | Void setSliceQp ( Int i ) { m_iSliceQp = i; } |
---|
| 2146 | #if ADAPTIVE_QP_SELECTION |
---|
| 2147 | Void setSliceQpBase ( Int i ) { m_iSliceQpBase = i; } |
---|
| 2148 | #endif |
---|
| 2149 | Void setSliceQpDelta ( Int i ) { m_iSliceQpDelta = i; } |
---|
| 2150 | Void setSliceQpDeltaCb ( Int i ) { m_iSliceQpDeltaCb = i; } |
---|
| 2151 | Void setSliceQpDeltaCr ( Int i ) { m_iSliceQpDeltaCr = i; } |
---|
| 2152 | Void setDeblockingFilterDisable( Bool b ) { m_deblockingFilterDisable= b; } |
---|
| 2153 | Void setDeblockingFilterOverrideFlag( Bool b ) { m_deblockingFilterOverrideFlag = b; } |
---|
| 2154 | Void setDeblockingFilterBetaOffsetDiv2( Int i ) { m_deblockingFilterBetaOffsetDiv2 = i; } |
---|
| 2155 | Void setDeblockingFilterTcOffsetDiv2( Int i ) { m_deblockingFilterTcOffsetDiv2 = i; } |
---|
| 2156 | |
---|
| 2157 | Void setRefPic ( TComPic* p, RefPicList e, Int iRefIdx ) { m_apcRefPicList[e][iRefIdx] = p; } |
---|
| 2158 | Void setRefPOC ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefPOCList[e][iRefIdx] = i; } |
---|
| 2159 | Void setNumRefIdx ( RefPicList e, Int i ) { m_aiNumRefIdx[e] = i; } |
---|
| 2160 | Void setPic ( TComPic* p ) { m_pcPic = p; } |
---|
| 2161 | Void setDepth ( Int iDepth ) { m_iDepth = iDepth; } |
---|
| 2162 | |
---|
| 2163 | #if SVC_EXTENSION |
---|
| 2164 | Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false, TComPic** ilpPic = NULL ); |
---|
| 2165 | #else |
---|
| 2166 | Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false ); |
---|
| 2167 | #endif |
---|
| 2168 | Void setRefPOCList (); |
---|
| 2169 | Void setColFromL0Flag ( UInt colFromL0 ) { m_colFromL0Flag = colFromL0; } |
---|
| 2170 | Void setColRefIdx ( UInt refIdx) { m_colRefIdx = refIdx; } |
---|
| 2171 | Void setCheckLDC ( Bool b ) { m_bCheckLDC = b; } |
---|
| 2172 | Void setMvdL1ZeroFlag ( Bool b) { m_bLMvdL1Zero = b; } |
---|
| 2173 | |
---|
| 2174 | Bool isIntra () { return m_eSliceType == I_SLICE; } |
---|
| 2175 | Bool isInterB () { return m_eSliceType == B_SLICE; } |
---|
| 2176 | Bool isInterP () { return m_eSliceType == P_SLICE; } |
---|
| 2177 | |
---|
[540] | 2178 | Void setLambdas ( const Double lambdas[3] ) { for (Int component = 0; component < 3; component++) m_lambdas[component] = lambdas[component]; } |
---|
| 2179 | const Double* getLambdas() const { return m_lambdas; } |
---|
[313] | 2180 | |
---|
| 2181 | Void initEqualRef(); |
---|
| 2182 | Bool isEqualRef ( RefPicList e, Int iRefIdx1, Int iRefIdx2 ) |
---|
| 2183 | { |
---|
| 2184 | if (iRefIdx1 < 0 || iRefIdx2 < 0) return false; |
---|
| 2185 | return m_abEqualRef[e][iRefIdx1][iRefIdx2]; |
---|
| 2186 | } |
---|
| 2187 | |
---|
| 2188 | Void setEqualRef( RefPicList e, Int iRefIdx1, Int iRefIdx2, Bool b) |
---|
| 2189 | { |
---|
| 2190 | m_abEqualRef[e][iRefIdx1][iRefIdx2] = m_abEqualRef[e][iRefIdx2][iRefIdx1] = b; |
---|
| 2191 | } |
---|
| 2192 | |
---|
| 2193 | static Void sortPicList ( TComList<TComPic*>& rcListPic ); |
---|
| 2194 | Void setList1IdxToList0Idx(); |
---|
| 2195 | |
---|
| 2196 | UInt getTLayer () { return m_uiTLayer; } |
---|
| 2197 | Void setTLayer ( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } |
---|
| 2198 | |
---|
| 2199 | Void setTLayerInfo( UInt uiTLayer ); |
---|
| 2200 | Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum ); |
---|
[442] | 2201 | Void checkLeadingPictureRestrictions( TComList<TComPic*>& rcListPic ); |
---|
[313] | 2202 | Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList); |
---|
| 2203 | Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); |
---|
| 2204 | Bool isStepwiseTemporalLayerSwitchingPointCandidate( TComList<TComPic*>& rcListPic ); |
---|
| 2205 | Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0); |
---|
| 2206 | Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP); |
---|
| 2207 | |
---|
| 2208 | Void setMaxNumMergeCand (UInt val ) { m_maxNumMergeCand = val; } |
---|
| 2209 | UInt getMaxNumMergeCand () { return m_maxNumMergeCand; } |
---|
| 2210 | |
---|
| 2211 | Void setSliceMode ( UInt uiMode ) { m_sliceMode = uiMode; } |
---|
| 2212 | UInt getSliceMode () { return m_sliceMode; } |
---|
| 2213 | Void setSliceArgument ( UInt uiArgument ) { m_sliceArgument = uiArgument; } |
---|
| 2214 | UInt getSliceArgument () { return m_sliceArgument; } |
---|
| 2215 | Void setSliceCurStartCUAddr ( UInt uiAddr ) { m_sliceCurStartCUAddr = uiAddr; } |
---|
| 2216 | UInt getSliceCurStartCUAddr () { return m_sliceCurStartCUAddr; } |
---|
| 2217 | Void setSliceCurEndCUAddr ( UInt uiAddr ) { m_sliceCurEndCUAddr = uiAddr; } |
---|
| 2218 | UInt getSliceCurEndCUAddr () { return m_sliceCurEndCUAddr; } |
---|
| 2219 | Void setSliceIdx ( UInt i) { m_sliceIdx = i; } |
---|
| 2220 | UInt getSliceIdx () { return m_sliceIdx; } |
---|
| 2221 | Void copySliceInfo (TComSlice *pcSliceSrc); |
---|
| 2222 | Void setSliceSegmentMode ( UInt uiMode ) { m_sliceSegmentMode = uiMode; } |
---|
| 2223 | UInt getSliceSegmentMode () { return m_sliceSegmentMode; } |
---|
| 2224 | Void setSliceSegmentArgument ( UInt uiArgument ) { m_sliceSegmentArgument = uiArgument; } |
---|
| 2225 | UInt getSliceSegmentArgument () { return m_sliceSegmentArgument; } |
---|
| 2226 | Void setSliceSegmentCurStartCUAddr ( UInt uiAddr ) { m_sliceSegmentCurStartCUAddr = uiAddr; } |
---|
| 2227 | UInt getSliceSegmentCurStartCUAddr () { return m_sliceSegmentCurStartCUAddr; } |
---|
| 2228 | Void setSliceSegmentCurEndCUAddr ( UInt uiAddr ) { m_sliceSegmentCurEndCUAddr = uiAddr; } |
---|
| 2229 | UInt getSliceSegmentCurEndCUAddr () { return m_sliceSegmentCurEndCUAddr; } |
---|
| 2230 | Void setNextSlice ( Bool b ) { m_nextSlice = b; } |
---|
| 2231 | Bool isNextSlice () { return m_nextSlice; } |
---|
| 2232 | Void setNextSliceSegment ( Bool b ) { m_nextSliceSegment = b; } |
---|
| 2233 | Bool isNextSliceSegment () { return m_nextSliceSegment; } |
---|
| 2234 | Void setSliceBits ( UInt uiVal ) { m_sliceBits = uiVal; } |
---|
| 2235 | UInt getSliceBits () { return m_sliceBits; } |
---|
| 2236 | Void setSliceSegmentBits ( UInt uiVal ) { m_sliceSegmentBits = uiVal; } |
---|
| 2237 | UInt getSliceSegmentBits () { return m_sliceSegmentBits; } |
---|
| 2238 | Void setFinalized ( Bool uiVal ) { m_bFinalized = uiVal; } |
---|
| 2239 | Bool getFinalized () { return m_bFinalized; } |
---|
| 2240 | Void setWpScaling ( wpScalingParam wp[2][MAX_NUM_REF][3] ) { memcpy(m_weightPredTable, wp, sizeof(wpScalingParam)*2*MAX_NUM_REF*3); } |
---|
| 2241 | Void getWpScaling ( RefPicList e, Int iRefIdx, wpScalingParam *&wp); |
---|
| 2242 | |
---|
| 2243 | Void resetWpScaling (); |
---|
| 2244 | Void initWpScaling (); |
---|
| 2245 | inline Bool applyWP () { return( (m_eSliceType==P_SLICE && m_pcPPS->getUseWP()) || (m_eSliceType==B_SLICE && m_pcPPS->getWPBiPred()) ); } |
---|
| 2246 | |
---|
| 2247 | Void setWpAcDcParam ( wpACDCParam wp[3] ) { memcpy(m_weightACDCParam, wp, sizeof(wpACDCParam)*3); } |
---|
| 2248 | Void getWpAcDcParam ( wpACDCParam *&wp ); |
---|
| 2249 | Void initWpAcDcParam (); |
---|
| 2250 | |
---|
| 2251 | Void setTileLocationCount ( UInt cnt ) { return m_tileByteLocation.resize(cnt); } |
---|
| 2252 | UInt getTileLocationCount () { return (UInt) m_tileByteLocation.size(); } |
---|
| 2253 | Void setTileLocation ( Int idx, UInt location ) { assert (idx<m_tileByteLocation.size()); |
---|
| 2254 | m_tileByteLocation[idx] = location; } |
---|
| 2255 | Void addTileLocation ( UInt location ) { m_tileByteLocation.push_back(location); } |
---|
| 2256 | UInt getTileLocation ( Int idx ) { return m_tileByteLocation[idx]; } |
---|
| 2257 | |
---|
| 2258 | Void setTileOffstForMultES (UInt uiOffset ) { m_uiTileOffstForMultES = uiOffset; } |
---|
| 2259 | UInt getTileOffstForMultES () { return m_uiTileOffstForMultES; } |
---|
| 2260 | Void allocSubstreamSizes ( UInt uiNumSubstreams ); |
---|
| 2261 | UInt* getSubstreamSizes () { return m_puiSubstreamSizes; } |
---|
| 2262 | Void setScalingList ( TComScalingList* scalingList ) { m_scalingList = scalingList; } |
---|
| 2263 | TComScalingList* getScalingList () { return m_scalingList; } |
---|
| 2264 | Void setDefaultScalingList (); |
---|
| 2265 | Bool checkDefaultScalingList (); |
---|
| 2266 | Void setCabacInitFlag ( Bool val ) { m_cabacInitFlag = val; } //!< set CABAC initial flag |
---|
| 2267 | Bool getCabacInitFlag () { return m_cabacInitFlag; } //!< get CABAC initial flag |
---|
| 2268 | Void setNumEntryPointOffsets(Int val) { m_numEntryPointOffsets = val; } |
---|
| 2269 | Int getNumEntryPointOffsets() { return m_numEntryPointOffsets; } |
---|
| 2270 | Bool getTemporalLayerNonReferenceFlag() { return m_temporalLayerNonReferenceFlag;} |
---|
| 2271 | Void setTemporalLayerNonReferenceFlag(Bool x) { m_temporalLayerNonReferenceFlag = x;} |
---|
| 2272 | Void setLFCrossSliceBoundaryFlag ( Bool val ) { m_LFCrossSliceBoundaryFlag = val; } |
---|
| 2273 | Bool getLFCrossSliceBoundaryFlag () { return m_LFCrossSliceBoundaryFlag;} |
---|
| 2274 | |
---|
| 2275 | Void setEnableTMVPFlag ( Bool b ) { m_enableTMVPFlag = b; } |
---|
| 2276 | Bool getEnableTMVPFlag () { return m_enableTMVPFlag;} |
---|
| 2277 | |
---|
| 2278 | #if SVC_EXTENSION |
---|
[540] | 2279 | Bool setBaseColPic ( TComList<TComPic*>& rcListPic , UInt refLayerIdc ); |
---|
[313] | 2280 | Void setBaseColPic (UInt refLayerIdc, TComPic* p) { m_pcBaseColPic[refLayerIdc] = p; } |
---|
| 2281 | TComPic* getBaseColPic (UInt refLayerIdc) { return m_pcBaseColPic[refLayerIdc]; } |
---|
| 2282 | TComPic** getBaseColPic () { return &m_pcBaseColPic[0]; } |
---|
[494] | 2283 | #if MFM_ENCCONSTRAINT |
---|
| 2284 | TComPic* getBaseColPic( TComList<TComPic*>& rcListPic ); |
---|
| 2285 | #endif |
---|
[313] | 2286 | |
---|
| 2287 | Void setLayerId (UInt layerId) { m_layerId = layerId; } |
---|
| 2288 | UInt getLayerId () { return m_layerId; } |
---|
| 2289 | |
---|
| 2290 | Void setFullPelBaseRec (UInt refLayerIdc, TComPicYuv* p) { m_pcFullPelBaseRec[refLayerIdc] = p; } |
---|
| 2291 | TComPicYuv* getFullPelBaseRec (UInt refLayerIdc) { return m_pcFullPelBaseRec[refLayerIdc]; } |
---|
| 2292 | |
---|
| 2293 | #if AVC_SYNTAX |
---|
| 2294 | Void initBaseLayerRPL( TComSlice *pcSlice ); |
---|
| 2295 | #endif |
---|
| 2296 | |
---|
| 2297 | Void setRefPicListModificationSvc(); |
---|
| 2298 | Int getNumILRRefIdx ( ) { return m_pcVPS->getNumDirectRefLayers( m_layerId ); } |
---|
| 2299 | |
---|
| 2300 | #if REF_IDX_MFM |
---|
| 2301 | Void setRefPOCListILP(TComPic** ilpPic, TComPic** pcRefPicRL); |
---|
| 2302 | #endif |
---|
| 2303 | |
---|
| 2304 | Int getActiveNumILRRefIdx ( ) { return m_activeNumILRRefIdx; } |
---|
| 2305 | Void setActiveNumILRRefIdx ( Int i ) { m_activeNumILRRefIdx = i; } |
---|
| 2306 | |
---|
| 2307 | Int getInterLayerPredLayerIdc (UInt layerIdx) { return m_interLayerPredLayerIdc[layerIdx];} |
---|
| 2308 | Void setInterLayerPredLayerIdc (UInt refLayerIdc, UInt layerIdx) { m_interLayerPredLayerIdc[layerIdx] = refLayerIdc; } |
---|
| 2309 | |
---|
| 2310 | Void setInterLayerPredEnabledFlag ( Bool val ) { m_interLayerPredEnabledFlag = val; } |
---|
| 2311 | Bool getInterLayerPredEnabledFlag () { return m_interLayerPredEnabledFlag;} |
---|
| 2312 | |
---|
[644] | 2313 | #if P0312_VERT_PHASE_ADJ |
---|
| 2314 | Int getVertPhasePositionFlag (UInt layerIdx) { return m_vertPhasePositionFlag[layerIdx];} |
---|
| 2315 | Void setVertPhasePositionFlag (Bool b, UInt layerIdx) { m_vertPhasePositionFlag[layerIdx] = b; } |
---|
| 2316 | #endif |
---|
| 2317 | |
---|
[313] | 2318 | Void setNumMotionPredRefLayers(int i) { m_numMotionPredRefLayers = i; } |
---|
| 2319 | Int getNumMotionPredRefLayers() { return m_numMotionPredRefLayers; } |
---|
| 2320 | #if REF_IDX_MFM |
---|
| 2321 | Void setMFMEnabledFlag(Bool flag) { m_bMFMEnabledFlag = flag; } |
---|
| 2322 | Bool getMFMEnabledFlag() { return m_bMFMEnabledFlag; } |
---|
| 2323 | #endif |
---|
| 2324 | |
---|
[494] | 2325 | TComPic* getRefPic(TComList<TComPic*>& rcListPic, Int poc) { return xGetRefPic( rcListPic, poc ); } |
---|
[313] | 2326 | |
---|
[588] | 2327 | Bool isRADL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_R); } |
---|
| 2328 | Bool isRASL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_R); } |
---|
[313] | 2329 | |
---|
[494] | 2330 | #if POC_RESET_FLAG |
---|
| 2331 | Bool getPocResetFlag () { return m_bPocResetFlag; } |
---|
| 2332 | Void setPocResetFlag (Bool b) { m_bPocResetFlag = b; } |
---|
| 2333 | Int getPocValueBeforeReset () { return m_pocValueBeforeReset; } |
---|
| 2334 | Void setPocValueBeforeReset (Int x) { m_pocValueBeforeReset = x ; } |
---|
| 2335 | #endif |
---|
| 2336 | Bool getDiscardableFlag () { return m_bDiscardableFlag; } |
---|
| 2337 | Void setDiscardableFlag (Bool b) { m_bDiscardableFlag = b; } |
---|
[540] | 2338 | #if O0149_CROSS_LAYER_BLA_FLAG |
---|
| 2339 | Bool getCrossLayerBLAFlag () { return m_bCrossLayerBLAFlag; } |
---|
| 2340 | Void setCrossLayerBLAFlag (Bool b) { m_bCrossLayerBLAFlag = b; } |
---|
| 2341 | #endif |
---|
[494] | 2342 | |
---|
| 2343 | #if RPL_INIT_N0316_N0082 |
---|
| 2344 | Int getNumNegativeRpsCurrTempList(); |
---|
| 2345 | #endif |
---|
| 2346 | |
---|
[442] | 2347 | #if REPN_FORMAT_IN_VPS |
---|
| 2348 | UInt getPicWidthInLumaSamples(); |
---|
| 2349 | UInt getPicHeightInLumaSamples(); |
---|
[494] | 2350 | #if AUXILIARY_PICTURES |
---|
| 2351 | ChromaFormat getChromaFormatIdc(); |
---|
| 2352 | #else |
---|
[442] | 2353 | UInt getChromaFormatIdc(); |
---|
[494] | 2354 | #endif |
---|
[442] | 2355 | UInt getBitDepthY(); |
---|
| 2356 | UInt getBitDepthC(); |
---|
[494] | 2357 | Int getQpBDOffsetY(); |
---|
| 2358 | Int getQpBDOffsetC(); |
---|
[442] | 2359 | #endif |
---|
[494] | 2360 | |
---|
| 2361 | Void setILRPic(TComPic **pcIlpPic); |
---|
[644] | 2362 | #if NO_OUTPUT_OF_PRIOR_PICS |
---|
| 2363 | Void setNoOutputOfPriorPicsFlag(const Bool x) { m_noOutputOfPriorPicsFlag = x; } |
---|
| 2364 | Bool getNoOutputOfPriorPicsFlag() { return m_noOutputOfPriorPicsFlag; } |
---|
[494] | 2365 | |
---|
[644] | 2366 | Void setNoRaslOutputFlag ( const Bool val ) { m_noRaslOutputFlag = val; } |
---|
| 2367 | Bool getNoRaslOutputFlag () { return m_noRaslOutputFlag; } |
---|
| 2368 | |
---|
| 2369 | Void setHandleCraAsBlaFlag ( const Bool val ) { m_handleCraAsBlaFlag = val; } |
---|
| 2370 | Bool getHandleCraAsBlaFlag () { return m_handleCraAsBlaFlag; } |
---|
| 2371 | |
---|
| 2372 | #endif |
---|
| 2373 | #if POC_RESET_IDC_SIGNALLING |
---|
| 2374 | Int getPocResetIdc () { return m_pocResetIdc; } |
---|
| 2375 | Void setPocResetIdc (Int b) { m_pocResetIdc = b; } |
---|
| 2376 | Int getPocResetPeriodId () { return m_pocResetPeriodId; } |
---|
| 2377 | Void setPocResetPeriodId (Int b) { m_pocResetPeriodId = b; } |
---|
| 2378 | Bool getFullPocResetFlag () { return m_fullPocResetFlag; } |
---|
| 2379 | Void setFullPocResetFlag (Bool b) { m_fullPocResetFlag = b; } |
---|
| 2380 | Int getPocLsbVal () { return m_pocLsbVal; } |
---|
| 2381 | Void setPocLsbVal (Int b) { m_pocLsbVal = b; } |
---|
| 2382 | Int getPocMsbVal () { return m_pocMsbVal; } |
---|
| 2383 | Void setPocMsbVal (Int b) { m_pocMsbVal = b; } |
---|
| 2384 | Bool getPocMsbValPresentFlag () { return m_pocMsbValPresentFlag; } |
---|
| 2385 | Void setPocMsbValPresentFlag (Bool x) { m_pocMsbValPresentFlag = x; } |
---|
| 2386 | Bool getPocMsbValRequiredFlag () { return m_pocMsbValRequiredFlag; } |
---|
| 2387 | Void setPocMsbValRequiredFlag (Bool x) { m_pocMsbValRequiredFlag = x; } |
---|
| 2388 | #endif |
---|
| 2389 | |
---|
[494] | 2390 | #endif //SVC_EXTENSION |
---|
[313] | 2391 | protected: |
---|
| 2392 | TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, |
---|
| 2393 | Int poc); |
---|
| 2394 | TComPic* xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb); |
---|
| 2395 | };// END CLASS DEFINITION TComSlice |
---|
| 2396 | |
---|
| 2397 | |
---|
| 2398 | template <class T> class ParameterSetMap |
---|
| 2399 | { |
---|
| 2400 | public: |
---|
| 2401 | ParameterSetMap(Int maxId) |
---|
| 2402 | :m_maxId (maxId) |
---|
| 2403 | {} |
---|
| 2404 | |
---|
| 2405 | ~ParameterSetMap() |
---|
| 2406 | { |
---|
| 2407 | for (typename std::map<Int,T *>::iterator i = m_paramsetMap.begin(); i!= m_paramsetMap.end(); i++) |
---|
| 2408 | { |
---|
| 2409 | delete (*i).second; |
---|
| 2410 | } |
---|
| 2411 | } |
---|
| 2412 | |
---|
| 2413 | Void storePS(Int psId, T *ps) |
---|
| 2414 | { |
---|
| 2415 | assert ( psId < m_maxId ); |
---|
| 2416 | if ( m_paramsetMap.find(psId) != m_paramsetMap.end() ) |
---|
| 2417 | { |
---|
| 2418 | delete m_paramsetMap[psId]; |
---|
| 2419 | } |
---|
| 2420 | m_paramsetMap[psId] = ps; |
---|
| 2421 | } |
---|
| 2422 | |
---|
| 2423 | Void mergePSList(ParameterSetMap<T> &rPsList) |
---|
| 2424 | { |
---|
| 2425 | for (typename std::map<Int,T *>::iterator i = rPsList.m_paramsetMap.begin(); i!= rPsList.m_paramsetMap.end(); i++) |
---|
| 2426 | { |
---|
| 2427 | storePS(i->first, i->second); |
---|
| 2428 | } |
---|
| 2429 | rPsList.m_paramsetMap.clear(); |
---|
| 2430 | } |
---|
| 2431 | |
---|
| 2432 | |
---|
| 2433 | T* getPS(Int psId) |
---|
| 2434 | { |
---|
| 2435 | return ( m_paramsetMap.find(psId) == m_paramsetMap.end() ) ? NULL : m_paramsetMap[psId]; |
---|
| 2436 | } |
---|
| 2437 | |
---|
| 2438 | T* getFirstPS() |
---|
| 2439 | { |
---|
| 2440 | return (m_paramsetMap.begin() == m_paramsetMap.end() ) ? NULL : m_paramsetMap.begin()->second; |
---|
| 2441 | } |
---|
| 2442 | |
---|
| 2443 | private: |
---|
| 2444 | std::map<Int,T *> m_paramsetMap; |
---|
| 2445 | Int m_maxId; |
---|
| 2446 | }; |
---|
| 2447 | |
---|
| 2448 | class ParameterSetManager |
---|
| 2449 | { |
---|
| 2450 | public: |
---|
| 2451 | ParameterSetManager(); |
---|
| 2452 | virtual ~ParameterSetManager(); |
---|
| 2453 | |
---|
| 2454 | //! store sequence parameter set and take ownership of it |
---|
| 2455 | Void storeVPS(TComVPS *vps) { m_vpsMap.storePS( vps->getVPSId(), vps); }; |
---|
| 2456 | //! get pointer to existing video parameter set |
---|
| 2457 | TComVPS* getVPS(Int vpsId) { return m_vpsMap.getPS(vpsId); }; |
---|
| 2458 | TComVPS* getFirstVPS() { return m_vpsMap.getFirstPS(); }; |
---|
| 2459 | |
---|
| 2460 | //! store sequence parameter set and take ownership of it |
---|
| 2461 | Void storeSPS(TComSPS *sps) { m_spsMap.storePS( sps->getSPSId(), sps); }; |
---|
| 2462 | //! get pointer to existing sequence parameter set |
---|
| 2463 | TComSPS* getSPS(Int spsId) { return m_spsMap.getPS(spsId); }; |
---|
| 2464 | TComSPS* getFirstSPS() { return m_spsMap.getFirstPS(); }; |
---|
| 2465 | |
---|
| 2466 | //! store picture parameter set and take ownership of it |
---|
| 2467 | Void storePPS(TComPPS *pps) { m_ppsMap.storePS( pps->getPPSId(), pps); }; |
---|
| 2468 | //! get pointer to existing picture parameter set |
---|
| 2469 | TComPPS* getPPS(Int ppsId) { return m_ppsMap.getPS(ppsId); }; |
---|
| 2470 | TComPPS* getFirstPPS() { return m_ppsMap.getFirstPS(); }; |
---|
| 2471 | |
---|
| 2472 | //! activate a SPS from a active parameter sets SEI message |
---|
| 2473 | //! \returns true, if activation is successful |
---|
| 2474 | Bool activateSPSWithSEI(Int SPSId); |
---|
| 2475 | |
---|
| 2476 | //! activate a PPS and depending on isIDR parameter also SPS and VPS |
---|
| 2477 | //! \returns true, if activation is successful |
---|
| 2478 | Bool activatePPS(Int ppsId, Bool isIRAP); |
---|
| 2479 | |
---|
| 2480 | TComVPS* getActiveVPS(){ return m_vpsMap.getPS(m_activeVPSId); }; |
---|
| 2481 | TComSPS* getActiveSPS(){ return m_spsMap.getPS(m_activeSPSId); }; |
---|
| 2482 | TComPPS* getActivePPS(){ return m_ppsMap.getPS(m_activePPSId); }; |
---|
| 2483 | |
---|
| 2484 | protected: |
---|
| 2485 | |
---|
| 2486 | #if SVC_EXTENSION |
---|
| 2487 | static ParameterSetMap<TComVPS> m_vpsMap; |
---|
| 2488 | #else |
---|
| 2489 | ParameterSetMap<TComVPS> m_vpsMap; |
---|
| 2490 | #endif |
---|
| 2491 | ParameterSetMap<TComSPS> m_spsMap; |
---|
| 2492 | ParameterSetMap<TComPPS> m_ppsMap; |
---|
| 2493 | |
---|
| 2494 | #if SVC_EXTENSION |
---|
| 2495 | static Int m_activeVPSId; |
---|
| 2496 | #else |
---|
| 2497 | Int m_activeVPSId; |
---|
| 2498 | #endif |
---|
| 2499 | Int m_activeSPSId; |
---|
| 2500 | Int m_activePPSId; |
---|
| 2501 | }; |
---|
| 2502 | |
---|
| 2503 | //! \} |
---|
| 2504 | |
---|
| 2505 | #endif // __TCOMSLICE__ |
---|