[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); |
---|
[815] | 142 | Void destroy(); |
---|
[313] | 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; |
---|
[713] | 233 | ProfileTierLevel m_subLayerPTL [MAX_TLAYER-1]; // max. value of max_sub_layers_minus1 is MAX_TLAYER-1 (= 6) |
---|
[644] | 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(); } |
---|
[906] | 372 | |
---|
| 373 | #if VPS_VUI_BSP_HRD_PARAMS |
---|
| 374 | Void copyCommonInformation( TComHRD *refHrd ) |
---|
| 375 | { |
---|
| 376 | m_nalHrdParametersPresentFlag = refHrd->getNalHrdParametersPresentFlag(); |
---|
| 377 | m_vclHrdParametersPresentFlag = refHrd->getVclHrdParametersPresentFlag(); |
---|
| 378 | m_subPicCpbParamsPresentFlag = refHrd->getSubPicCpbParamsPresentFlag(); |
---|
| 379 | m_tickDivisorMinus2 = refHrd->getTickDivisorMinus2(); |
---|
| 380 | m_duCpbRemovalDelayLengthMinus1 = refHrd->getDuCpbRemovalDelayLengthMinus1(); |
---|
| 381 | m_subPicCpbParamsInPicTimingSEIFlag = refHrd->getSubPicCpbParamsInPicTimingSEIFlag(); |
---|
| 382 | m_dpbOutputDelayDuLengthMinus1 = refHrd->getDpbOutputDelayDuLengthMinus1(); |
---|
| 383 | m_bitRateScale = refHrd->getBitRateScale(); |
---|
| 384 | m_cpbSizeScale = refHrd->getCpbSizeScale(); |
---|
| 385 | m_ducpbSizeScale = refHrd->getDuCpbSizeScale(); |
---|
| 386 | m_initialCpbRemovalDelayLengthMinus1 = refHrd->getInitialCpbRemovalDelayLengthMinus1(); |
---|
| 387 | m_cpbRemovalDelayLengthMinus1 = refHrd->getCpbRemovalDelayLengthMinus1(); |
---|
| 388 | m_dpbOutputDelayLengthMinus1 = refHrd->getDpbOutputDelayLengthMinus1(); |
---|
| 389 | } |
---|
| 390 | #endif |
---|
[313] | 391 | }; |
---|
| 392 | |
---|
| 393 | class TimingInfo |
---|
| 394 | { |
---|
| 395 | Bool m_timingInfoPresentFlag; |
---|
| 396 | UInt m_numUnitsInTick; |
---|
| 397 | UInt m_timeScale; |
---|
| 398 | Bool m_pocProportionalToTimingFlag; |
---|
| 399 | Int m_numTicksPocDiffOneMinus1; |
---|
| 400 | public: |
---|
| 401 | TimingInfo() |
---|
| 402 | : m_timingInfoPresentFlag(false) |
---|
| 403 | , m_numUnitsInTick(1001) |
---|
| 404 | , m_timeScale(60000) |
---|
| 405 | , m_pocProportionalToTimingFlag(false) |
---|
| 406 | , m_numTicksPocDiffOneMinus1(0) {} |
---|
| 407 | |
---|
| 408 | Void setTimingInfoPresentFlag ( Bool flag ) { m_timingInfoPresentFlag = flag; } |
---|
| 409 | Bool getTimingInfoPresentFlag ( ) { return m_timingInfoPresentFlag; } |
---|
| 410 | |
---|
| 411 | Void setNumUnitsInTick ( UInt value ) { m_numUnitsInTick = value; } |
---|
| 412 | UInt getNumUnitsInTick ( ) { return m_numUnitsInTick; } |
---|
| 413 | |
---|
| 414 | Void setTimeScale ( UInt value ) { m_timeScale = value; } |
---|
| 415 | UInt getTimeScale ( ) { return m_timeScale; } |
---|
| 416 | |
---|
| 417 | Bool getPocProportionalToTimingFlag ( ) { return m_pocProportionalToTimingFlag; } |
---|
| 418 | Void setPocProportionalToTimingFlag (Bool x ) { m_pocProportionalToTimingFlag = x; } |
---|
| 419 | |
---|
| 420 | Int getNumTicksPocDiffOneMinus1 ( ) { return m_numTicksPocDiffOneMinus1; } |
---|
| 421 | Void setNumTicksPocDiffOneMinus1 (Int x ) { m_numTicksPocDiffOneMinus1 = x; } |
---|
| 422 | }; |
---|
| 423 | |
---|
[906] | 424 | class Window |
---|
| 425 | { |
---|
| 426 | private: |
---|
| 427 | Bool m_enabledFlag; |
---|
| 428 | Int m_winLeftOffset; |
---|
| 429 | Int m_winRightOffset; |
---|
| 430 | Int m_winTopOffset; |
---|
| 431 | Int m_winBottomOffset; |
---|
| 432 | #if P0312_VERT_PHASE_ADJ |
---|
| 433 | Bool m_vertPhasePositionEnableFlag; |
---|
| 434 | #endif |
---|
| 435 | public: |
---|
| 436 | Window() |
---|
| 437 | : m_enabledFlag (false) |
---|
| 438 | , m_winLeftOffset (0) |
---|
| 439 | , m_winRightOffset (0) |
---|
| 440 | , m_winTopOffset (0) |
---|
| 441 | , m_winBottomOffset (0) |
---|
| 442 | #if P0312_VERT_PHASE_ADJ |
---|
| 443 | , m_vertPhasePositionEnableFlag(false) |
---|
| 444 | #endif |
---|
| 445 | { } |
---|
| 446 | |
---|
| 447 | Bool getWindowEnabledFlag() const { return m_enabledFlag; } |
---|
| 448 | #if P0312_VERT_PHASE_ADJ |
---|
| 449 | Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0; m_vertPhasePositionEnableFlag = false; } |
---|
| 450 | #else |
---|
| 451 | Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0;} |
---|
| 452 | #endif |
---|
| 453 | Int getWindowLeftOffset() const { return m_enabledFlag ? m_winLeftOffset : 0; } |
---|
| 454 | Void setWindowLeftOffset(Int val) { if(val) {m_winLeftOffset = val; m_enabledFlag = true;} } |
---|
| 455 | Int getWindowRightOffset() const { return m_enabledFlag ? m_winRightOffset : 0; } |
---|
| 456 | Void setWindowRightOffset(Int val) { if(val) {m_winRightOffset = val; m_enabledFlag = true;} } |
---|
| 457 | Int getWindowTopOffset() const { return m_enabledFlag ? m_winTopOffset : 0; } |
---|
| 458 | Void setWindowTopOffset(Int val) { if(val) {m_winTopOffset = val; m_enabledFlag = true;} } |
---|
| 459 | Int getWindowBottomOffset() const { return m_enabledFlag ? m_winBottomOffset: 0; } |
---|
| 460 | Void setWindowBottomOffset(Int val) { if(val) {m_winBottomOffset = val; m_enabledFlag = true;} } |
---|
| 461 | #if P0312_VERT_PHASE_ADJ |
---|
| 462 | Bool getVertPhasePositionEnableFlag() const { return m_vertPhasePositionEnableFlag; } |
---|
| 463 | Void setVertPhasePositionEnableFlag(Bool val) { m_vertPhasePositionEnableFlag = val; } |
---|
| 464 | #endif |
---|
| 465 | #if REF_REGION_OFFSET && RESAMPLING_FIX |
---|
| 466 | Bool hasEqualOffset(const Window& ref) const |
---|
| 467 | { |
---|
| 468 | return ( this->getWindowLeftOffset() == ref.getWindowLeftOffset() |
---|
| 469 | && this->getWindowTopOffset() == ref.getWindowTopOffset() |
---|
| 470 | && this->getWindowRightOffset() == ref.getWindowRightOffset() |
---|
| 471 | && this->getWindowBottomOffset() == ref.getWindowBottomOffset() ); |
---|
| 472 | } |
---|
| 473 | #endif |
---|
| 474 | |
---|
| 475 | #if P0312_VERT_PHASE_ADJ |
---|
| 476 | Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom, Bool vertPhasePositionEnableFlag = 0) |
---|
| 477 | #else |
---|
| 478 | Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom) |
---|
| 479 | #endif |
---|
| 480 | { |
---|
| 481 | if(offsetLeft || offsetLRight || offsetLTop || offsetLBottom) |
---|
| 482 | { |
---|
| 483 | m_enabledFlag = true; |
---|
| 484 | m_winLeftOffset = offsetLeft; |
---|
| 485 | m_winRightOffset = offsetLRight; |
---|
| 486 | m_winTopOffset = offsetLTop; |
---|
| 487 | m_winBottomOffset = offsetLBottom; |
---|
| 488 | } |
---|
| 489 | #if P0312_VERT_PHASE_ADJ |
---|
| 490 | m_vertPhasePositionEnableFlag = vertPhasePositionEnableFlag; |
---|
| 491 | #endif |
---|
| 492 | } |
---|
| 493 | }; |
---|
| 494 | |
---|
[442] | 495 | #if REPN_FORMAT_IN_VPS |
---|
| 496 | class RepFormat |
---|
| 497 | { |
---|
[540] | 498 | #if REPN_FORMAT_CONTROL_FLAG |
---|
| 499 | Bool m_chromaAndBitDepthVpsPresentFlag; |
---|
| 500 | #endif |
---|
[494] | 501 | #if AUXILIARY_PICTURES |
---|
| 502 | ChromaFormat m_chromaFormatVpsIdc; |
---|
| 503 | #else |
---|
[442] | 504 | Int m_chromaFormatVpsIdc; |
---|
[494] | 505 | #endif |
---|
[442] | 506 | Bool m_separateColourPlaneVpsFlag; |
---|
| 507 | Int m_picWidthVpsInLumaSamples; |
---|
| 508 | Int m_picHeightVpsInLumaSamples; |
---|
| 509 | Int m_bitDepthVpsLuma; // coded as minus8 |
---|
| 510 | Int m_bitDepthVpsChroma; // coded as minus8 |
---|
| 511 | |
---|
[906] | 512 | #if R0156_CONF_WINDOW_IN_REP_FORMAT |
---|
| 513 | Window m_conformanceWindowVps; |
---|
| 514 | #endif |
---|
| 515 | |
---|
[442] | 516 | public: |
---|
| 517 | RepFormat(); |
---|
[588] | 518 | #if RESOLUTION_BASED_DPB |
---|
| 519 | Void init(); |
---|
| 520 | RepFormat& operator= (const RepFormat &); |
---|
| 521 | static Bool checkSameSubDpb(const RepFormat &x, const RepFormat &y); |
---|
| 522 | #endif |
---|
[540] | 523 | #if REPN_FORMAT_CONTROL_FLAG |
---|
| 524 | Bool getChromaAndBitDepthVpsPresentFlag() { return m_chromaAndBitDepthVpsPresentFlag; } |
---|
| 525 | void setChromaAndBitDepthVpsPresentFlag(Bool x) { m_chromaAndBitDepthVpsPresentFlag = x; } |
---|
| 526 | #endif |
---|
| 527 | |
---|
[494] | 528 | #if AUXILIARY_PICTURES |
---|
| 529 | ChromaFormat getChromaFormatVpsIdc() { return m_chromaFormatVpsIdc; } |
---|
| 530 | Void setChromaFormatVpsIdc(ChromaFormat x) { m_chromaFormatVpsIdc = x; } |
---|
| 531 | #else |
---|
[442] | 532 | Int getChromaFormatVpsIdc() { return m_chromaFormatVpsIdc; } |
---|
| 533 | Void setChromaFormatVpsIdc(Int x) { m_chromaFormatVpsIdc = x; } |
---|
[494] | 534 | #endif |
---|
[442] | 535 | |
---|
| 536 | Bool getSeparateColourPlaneVpsFlag() { return m_separateColourPlaneVpsFlag; } |
---|
| 537 | Void setSeparateColourPlaneVpsFlag(Bool x) { m_separateColourPlaneVpsFlag = x; } |
---|
| 538 | |
---|
| 539 | Int getPicWidthVpsInLumaSamples() { return m_picWidthVpsInLumaSamples; } |
---|
| 540 | Void setPicWidthVpsInLumaSamples(Int x) { m_picWidthVpsInLumaSamples = x; } |
---|
| 541 | |
---|
| 542 | Int getPicHeightVpsInLumaSamples() { return m_picHeightVpsInLumaSamples; } |
---|
| 543 | Void setPicHeightVpsInLumaSamples(Int x) { m_picHeightVpsInLumaSamples = x; } |
---|
| 544 | |
---|
| 545 | Int getBitDepthVpsLuma() { return m_bitDepthVpsLuma; } |
---|
| 546 | Void setBitDepthVpsLuma(Int x) { m_bitDepthVpsLuma = x; } |
---|
| 547 | |
---|
| 548 | Int getBitDepthVpsChroma() { return m_bitDepthVpsChroma; } |
---|
| 549 | Void setBitDepthVpsChroma(Int x) { m_bitDepthVpsChroma = x; } |
---|
[906] | 550 | |
---|
| 551 | #if R0156_CONF_WINDOW_IN_REP_FORMAT |
---|
| 552 | Window& getConformanceWindowVps() { return m_conformanceWindowVps; } |
---|
| 553 | Void setConformanceWindowVps(Window& conformanceWindow ) { m_conformanceWindowVps = conformanceWindow; } |
---|
| 554 | #endif |
---|
[442] | 555 | }; |
---|
| 556 | #endif |
---|
[313] | 557 | class TComVPS |
---|
| 558 | { |
---|
| 559 | private: |
---|
| 560 | Int m_VPSId; |
---|
[906] | 561 | #if VPS_RESERVED_FLAGS |
---|
| 562 | Bool m_baseLayerInternalFlag; |
---|
| 563 | Bool m_baseLayerAvailableFlag; |
---|
| 564 | #endif |
---|
[313] | 565 | UInt m_uiMaxTLayers; |
---|
| 566 | UInt m_uiMaxLayers; |
---|
| 567 | Bool m_bTemporalIdNestingFlag; |
---|
| 568 | |
---|
| 569 | UInt m_numReorderPics[MAX_TLAYER]; |
---|
| 570 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
| 571 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) |
---|
| 572 | |
---|
| 573 | UInt m_numHrdParameters; |
---|
[815] | 574 | #if !SVC_EXTENSION |
---|
[313] | 575 | UInt m_maxNuhReservedZeroLayerId; |
---|
| 576 | #endif |
---|
| 577 | TComHRD* m_hrdParameters; |
---|
| 578 | UInt* m_hrdOpSetIdx; |
---|
| 579 | Bool* m_cprmsPresentFlag; |
---|
[494] | 580 | #if !SVC_EXTENSION |
---|
[313] | 581 | UInt m_numOpSets; |
---|
| 582 | Bool m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1]; |
---|
| 583 | #endif |
---|
[494] | 584 | TComPTL m_pcPTL; |
---|
| 585 | TimingInfo m_timingInfo; |
---|
| 586 | |
---|
| 587 | #if SVC_EXTENSION |
---|
[313] | 588 | #if DERIVE_LAYER_ID_LIST_VARIABLES |
---|
[815] | 589 | #if Q0078_ADD_LAYER_SETS |
---|
[906] | 590 | #if NECESSARY_LAYER_FLAG |
---|
| 591 | std::vector< std::vector<Int> > m_layerSetLayerIdList; |
---|
| 592 | std::vector<Int> m_numLayerInIdList;; |
---|
| 593 | #else |
---|
[815] | 594 | Int m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 595 | Int m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS]; |
---|
[906] | 596 | #endif |
---|
[815] | 597 | #else |
---|
[313] | 598 | Int m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 599 | Int m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
| 600 | #endif |
---|
[815] | 601 | #endif |
---|
[588] | 602 | #if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED |
---|
[442] | 603 | #if VPS_EXTN_OFFSET |
---|
| 604 | UInt m_extensionOffset; |
---|
| 605 | #endif |
---|
[588] | 606 | #endif |
---|
[494] | 607 | UInt m_maxLayerId; |
---|
| 608 | UInt m_numLayerSets; |
---|
[815] | 609 | #if Q0078_ADD_LAYER_SETS |
---|
| 610 | UInt m_vpsNumLayerSetsMinus1; |
---|
| 611 | Bool m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 612 | #else |
---|
[494] | 613 | Bool m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 614 | #endif |
---|
[313] | 615 | |
---|
| 616 | // ------------------------------------------ |
---|
| 617 | // Variables related to VPS extensions |
---|
| 618 | // ------------------------------------------ |
---|
| 619 | #if VPS_EXTN_MASK_AND_DIM_INFO |
---|
[906] | 620 | #if VPS_AVC_BL_FLAG_REMOVAL |
---|
| 621 | Bool m_nonHEVCBaseLayerFlag; |
---|
| 622 | #else |
---|
[313] | 623 | Bool m_avcBaseLayerFlag; // For now, always set to true. |
---|
[906] | 624 | #endif |
---|
[313] | 625 | Bool m_splittingFlag; |
---|
| 626 | Bool m_scalabilityMask[MAX_VPS_NUM_SCALABILITY_TYPES]; |
---|
| 627 | UInt m_dimensionIdLen[MAX_VPS_NUM_SCALABILITY_TYPES]; |
---|
| 628 | Bool m_nuhLayerIdPresentFlag; |
---|
| 629 | UInt m_layerIdInNuh[MAX_VPS_LAYER_ID_PLUS1]; // Maps layer ID in the VPS with layer_id_in_nuh |
---|
| 630 | UInt m_dimensionId[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_NUM_SCALABILITY_TYPES]; |
---|
| 631 | |
---|
| 632 | // Below are derived variables |
---|
| 633 | UInt m_numScalabilityTypes; |
---|
| 634 | UInt m_layerIdInVps[MAX_VPS_LAYER_ID_PLUS1]; // Maps layer_id_in_nuh with the layer ID in the VPS |
---|
| 635 | #endif |
---|
[815] | 636 | #if BITRATE_PICRATE_SIGNALLING |
---|
| 637 | #if Q0078_ADD_LAYER_SETS |
---|
| 638 | UInt m_maxSLInLayerSetMinus1[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS]; |
---|
| 639 | #else |
---|
| 640 | UInt m_maxSLInLayerSetMinus1[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
| 641 | #endif |
---|
| 642 | #endif |
---|
| 643 | |
---|
[345] | 644 | Bool m_ilpSshSignalingEnabledFlag; |
---|
[313] | 645 | #if VPS_EXTN_PROFILE_INFO |
---|
| 646 | // Profile-tier-level signalling related |
---|
| 647 | Bool m_profilePresentFlag[MAX_VPS_LAYER_SETS_PLUS1]; // The value with index 0 will not be used. |
---|
[588] | 648 | #if !P0048_REMOVE_PROFILE_REF |
---|
[313] | 649 | UInt m_profileLayerSetRef[MAX_VPS_LAYER_SETS_PLUS1]; // The value with index 0 will not be used. |
---|
[588] | 650 | #endif |
---|
[313] | 651 | std::vector<TComPTL> m_pcPTLForExtn; |
---|
| 652 | #endif |
---|
| 653 | #if VPS_EXTN_OP_LAYER_SETS |
---|
| 654 | // .. More declarations here |
---|
| 655 | // Target output layer signalling related |
---|
| 656 | UInt m_numOutputLayerSets; |
---|
[815] | 657 | #if Q0078_ADD_LAYER_SETS |
---|
| 658 | UInt m_outputLayerSetIdx[MAX_VPS_LAYER_SETS_PLUS1 + 2*MAX_NUM_ADD_LAYER_SETS]; |
---|
| 659 | Bool m_outputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1 + 2*MAX_NUM_ADD_LAYER_SETS][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 660 | #else |
---|
[313] | 661 | UInt m_outputLayerSetIdx[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
| 662 | Bool m_outputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 663 | #endif |
---|
[815] | 664 | #endif |
---|
[313] | 665 | #if VPS_EXTN_DIRECT_REF_LAYERS |
---|
| 666 | Bool m_directDependencyFlag[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 667 | UInt m_numDirectRefLayers[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 668 | UInt m_refLayerId[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 669 | UInt m_directDepTypeLen; |
---|
[540] | 670 | #if O0096_DEFAULT_DEPENDENCY_TYPE |
---|
| 671 | Bool m_defaultDirectDependencyTypeFlag; |
---|
| 672 | UInt m_defaultDirectDependencyType; |
---|
| 673 | #endif |
---|
[313] | 674 | UInt m_directDependencyType[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 675 | #endif |
---|
| 676 | UInt m_numProfileTierLevel; |
---|
[588] | 677 | #if !VPS_EXTN_UEV_CODING |
---|
[313] | 678 | Bool m_moreOutputLayerSetsThanDefaultFlag; |
---|
[588] | 679 | #endif |
---|
[313] | 680 | Int m_numAddOutputLayerSets; |
---|
[588] | 681 | #if P0295_DEFAULT_OUT_LAYER_IDC |
---|
| 682 | UInt m_defaultTargetOutputLayerIdc; |
---|
| 683 | #else |
---|
[547] | 684 | #if O0109_DEFAULT_ONE_OUT_LAYER_IDC |
---|
| 685 | UInt m_defaultOneTargetOutputLayerIdc; |
---|
| 686 | #else |
---|
[313] | 687 | Bool m_defaultOneTargetOutputLayerFlag; |
---|
[547] | 688 | #endif |
---|
[588] | 689 | #endif |
---|
[906] | 690 | #if PER_LAYER_PTL |
---|
| 691 | std::vector< std::vector<Int> > m_profileLevelTierIdx; |
---|
| 692 | #else |
---|
[313] | 693 | Int m_profileLevelTierIdx[64]; |
---|
[906] | 694 | #endif |
---|
[313] | 695 | Bool m_maxOneActiveRefLayerFlag; |
---|
[494] | 696 | #if O0062_POC_LSB_NOT_PRESENT_FLAG |
---|
| 697 | Bool m_pocLsbNotPresentFlag[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 698 | #endif |
---|
[540] | 699 | #if O0223_PICTURE_TYPES_ALIGN_FLAG |
---|
| 700 | Bool m_crossLayerPictureTypeAlignFlag; |
---|
| 701 | #endif |
---|
[442] | 702 | Bool m_crossLayerIrapAlignFlag; |
---|
[644] | 703 | #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG |
---|
| 704 | Bool m_crossLayerAlignedIdrOnlyFlag; |
---|
| 705 | #endif |
---|
[494] | 706 | #if O0225_MAX_TID_FOR_REF_LAYERS |
---|
| 707 | UInt m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 708 | #else |
---|
[442] | 709 | UInt m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1]; |
---|
[313] | 710 | #endif |
---|
[442] | 711 | Bool m_maxTidRefPresentFlag; |
---|
[540] | 712 | #if VPS_TSLAYERS |
---|
| 713 | Bool m_maxTSLayersPresentFlag; |
---|
[713] | 714 | UInt m_maxTSLayerMinus1[MAX_LAYERS]; |
---|
[540] | 715 | #endif |
---|
[313] | 716 | #if M0040_ADAPTIVE_RESOLUTION_CHANGE |
---|
| 717 | Bool m_singleLayerForNonIrapFlag; |
---|
| 718 | #endif |
---|
[540] | 719 | #if HIGHER_LAYER_IRAP_SKIP_FLAG |
---|
| 720 | Bool m_higherLayerIrapSkipFlag; |
---|
| 721 | #endif |
---|
| 722 | #if VPS_VUI_TILES_NOT_IN_USE__FLAG |
---|
| 723 | Bool m_tilesNotInUseFlag; |
---|
| 724 | Bool m_tilesInUseFlag[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 725 | Bool m_loopFilterNotAcrossTilesFlag[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 726 | #endif |
---|
[442] | 727 | Bool m_tileBoundariesAlignedFlag[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
[540] | 728 | #if VPS_VUI_WPP_NOT_IN_USE__FLAG |
---|
| 729 | Bool m_wppNotInUseFlag; |
---|
| 730 | Bool m_wppInUseFlag[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 731 | #endif |
---|
[442] | 732 | #if N0160_VUI_EXT_ILP_REF |
---|
[644] | 733 | Bool m_ilpRestrictedRefLayersFlag; |
---|
| 734 | Int m_minSpatialSegmentOffsetPlus1[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 735 | Bool m_ctuBasedOffsetEnabledFlag [MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 736 | Int m_minHorizontalCtuOffsetPlus1 [MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
[442] | 737 | #endif |
---|
[540] | 738 | #if VPS_VUI_VIDEO_SIGNAL |
---|
[644] | 739 | Bool m_vidSigPresentVpsFlag; |
---|
| 740 | Int m_vpsVidSigInfo; |
---|
| 741 | Int m_vpsVidSigIdx[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 742 | Int m_vpsVidFormat[16]; |
---|
| 743 | Bool m_vpsFullRangeFlag[16]; |
---|
| 744 | Int m_vpsColorPrimaries[16]; |
---|
| 745 | Int m_vpsTransChar[16]; |
---|
| 746 | Int m_vpsMatCoeff[16]; |
---|
[815] | 747 | #endif |
---|
| 748 | |
---|
[644] | 749 | Bool m_bitRatePresentVpsFlag; |
---|
| 750 | Bool m_picRatePresentVpsFlag; |
---|
| 751 | Bool m_bitRatePresentFlag [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
| 752 | Bool m_picRatePresentFlag [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
| 753 | Int m_avgBitRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
| 754 | Int m_maxBitRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
| 755 | Int m_constPicRateIdc [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
| 756 | Int m_avgPicRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; |
---|
| 757 | |
---|
| 758 | #if P0312_VERT_PHASE_ADJ |
---|
| 759 | Bool m_vpsVuiVertPhaseInUseFlag; |
---|
| 760 | #endif |
---|
| 761 | |
---|
| 762 | #if P0300_ALT_OUTPUT_LAYER_FLAG |
---|
[815] | 763 | #if Q0078_ADD_LAYER_SETS |
---|
| 764 | Bool m_altOutputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1 + 2*MAX_NUM_ADD_LAYER_SETS]; |
---|
| 765 | #else |
---|
[644] | 766 | Bool m_altOutputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
[815] | 767 | #endif |
---|
[644] | 768 | #else |
---|
[540] | 769 | #if O0153_ALT_OUTPUT_LAYER_FLAG |
---|
| 770 | Bool m_altOutputLayerFlag; |
---|
| 771 | #endif |
---|
[644] | 772 | #endif |
---|
[442] | 773 | #if REPN_FORMAT_IN_VPS |
---|
| 774 | Bool m_repFormatIdxPresentFlag; |
---|
| 775 | Int m_vpsNumRepFormats; // coded as minus1 |
---|
| 776 | RepFormat m_vpsRepFormat[16]; |
---|
| 777 | Int m_vpsRepFormatIdx[16]; |
---|
| 778 | #endif |
---|
| 779 | #if VIEW_ID_RELATED_SIGNALING |
---|
[547] | 780 | #if O0109_VIEW_ID_LEN |
---|
[644] | 781 | Int m_viewIdLen; |
---|
[547] | 782 | #else |
---|
[644] | 783 | Int m_viewIdLenMinus1; |
---|
[547] | 784 | #endif |
---|
[644] | 785 | Int m_viewIdVal [MAX_LAYERS]; |
---|
[442] | 786 | #endif |
---|
[494] | 787 | |
---|
| 788 | #if O0215_PHASE_ALIGNMENT |
---|
| 789 | Bool m_phaseAlignFlag; |
---|
| 790 | #endif |
---|
[540] | 791 | |
---|
| 792 | #if O0092_0094_DEPENDENCY_CONSTRAINT |
---|
| 793 | Int m_numberRefLayers[MAX_NUM_LAYER_IDS]; // number of direct and indirect reference layers of a coding layer |
---|
| 794 | 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 |
---|
| 795 | #endif |
---|
[815] | 796 | #if Q0078_ADD_LAYER_SETS |
---|
| 797 | Int m_numAddLayerSets; |
---|
| 798 | UInt m_highestLayerIdxPlus1[MAX_NUM_ADD_LAYER_SETS][MAX_NUM_LAYER_IDS]; |
---|
| 799 | UInt m_predictedLayerId[MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; |
---|
| 800 | UInt m_numPredictedLayers[MAX_NUM_LAYER_IDS]; |
---|
| 801 | Int m_numIndependentLayers; |
---|
| 802 | Int m_numLayersInTreePartition[MAX_NUM_LAYER_IDS]; |
---|
| 803 | UInt m_treePartitionLayerIdList[MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; |
---|
| 804 | #endif |
---|
[644] | 805 | #if SPS_DPB_PARAMS |
---|
| 806 | Int m_TolsIdx; |
---|
| 807 | #endif |
---|
[540] | 808 | #if VPS_DPB_SIZE_TABLE |
---|
[644] | 809 | Bool m_subLayerFlagInfoPresentFlag [MAX_VPS_OP_LAYER_SETS_PLUS1]; |
---|
| 810 | Bool m_subLayerDpbInfoPresentFlag [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; |
---|
| 811 | Int m_maxVpsDecPicBufferingMinus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS][MAX_TLAYER]; |
---|
[588] | 812 | #if RESOLUTION_BASED_DPB |
---|
[644] | 813 | Int m_maxVpsLayerDecPicBuffMinus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS][MAX_TLAYER]; |
---|
[588] | 814 | #endif |
---|
[644] | 815 | Int m_maxVpsNumReorderPics [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; |
---|
| 816 | Int m_maxVpsLatencyIncreasePlus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; |
---|
[588] | 817 | #if CHANGE_NUMSUBDPB_IDX |
---|
[815] | 818 | #if Q0078_ADD_LAYER_SETS |
---|
| 819 | Int m_numSubDpbs [MAX_VPS_LAYER_SETS_PLUS1 + 2*MAX_NUM_ADD_LAYER_SETS]; |
---|
| 820 | #else |
---|
[644] | 821 | Int m_numSubDpbs [MAX_VPS_LAYER_SETS_PLUS1]; |
---|
[815] | 822 | #endif |
---|
[588] | 823 | #else |
---|
[644] | 824 | Int m_numSubDpbs [MAX_VPS_OP_LAYER_SETS_PLUS1]; |
---|
[540] | 825 | #endif |
---|
[588] | 826 | #endif |
---|
[547] | 827 | |
---|
| 828 | #if O0109_MOVE_VPS_VUI_FLAG |
---|
| 829 | Bool m_vpsVuiPresentFlag; |
---|
| 830 | #endif |
---|
[713] | 831 | Bool m_vpsExtensionFlag; |
---|
[547] | 832 | |
---|
[644] | 833 | #if O0164_MULTI_LAYER_HRD |
---|
| 834 | Bool m_vpsVuiBspHrdPresentFlag; |
---|
[906] | 835 | #if VPS_VUI_BSP_HRD_PARAMS |
---|
| 836 | Int m_vpsNumAddHrdParams; |
---|
| 837 | std::vector<Bool> m_cprmsAddPresentFlag; |
---|
| 838 | std::vector<Int> m_numSubLayerHrdMinus1; |
---|
| 839 | std::vector<TComHRD> m_bspHrd; |
---|
| 840 | Int m_numSignalledPartitioningSchemes[MAX_VPS_OUTPUT_LAYER_SETS_PLUS1]; |
---|
| 841 | Int m_numPartitionsInSchemeMinus1 [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16]; |
---|
| 842 | Int m_layerIncludedInPartitionFlag [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16][MAX_LAYERS][MAX_LAYERS]; |
---|
| 843 | Int m_numBspSchedulesMinus1 [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16][MAX_TLAYER]; |
---|
| 844 | Int m_bspHrdIdx [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16][MAX_TLAYER][31][MAX_LAYERS]; |
---|
| 845 | Int m_bspSchedIdx [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16][MAX_TLAYER][31][MAX_LAYERS]; |
---|
| 846 | #else |
---|
[644] | 847 | UInt m_vpsNumBspHrdParametersMinus1; |
---|
| 848 | Bool m_bspCprmsPresentFlag[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
| 849 | TComHRD *m_bspHrd; |
---|
| 850 | UInt m_numBitstreamPartitions[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
| 851 | Bool m_layerInBspFlag[MAX_VPS_LAYER_SETS_PLUS1][8][MAX_LAYERS]; |
---|
| 852 | UInt m_numBspSchedCombinations[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
| 853 | UInt m_bspCombHrdIdx[MAX_VPS_LAYER_SETS_PLUS1][16][16]; |
---|
| 854 | UInt m_bspCombSchedIdx[MAX_VPS_LAYER_SETS_PLUS1][16][16]; |
---|
| 855 | #endif |
---|
[906] | 856 | #endif |
---|
[644] | 857 | |
---|
| 858 | #if P0182_VPS_VUI_PS_FLAG |
---|
| 859 | UInt m_SPSId[MAX_LAYERS]; |
---|
| 860 | UInt m_PPSId[MAX_LAYERS]; |
---|
| 861 | UInt m_baseLayerPSCompatibilityFlag[MAX_LAYERS]; |
---|
| 862 | #endif |
---|
| 863 | |
---|
[588] | 864 | #if !P0307_REMOVE_VPS_VUI_OFFSET |
---|
[547] | 865 | #if VPS_VUI_OFFSET |
---|
[644] | 866 | Int m_vpsVuiOffset; |
---|
[547] | 867 | #endif |
---|
[588] | 868 | #endif |
---|
| 869 | #if P0307_VPS_NON_VUI_EXTENSION |
---|
[644] | 870 | Int m_vpsNonVuiExtLength; |
---|
[588] | 871 | #endif |
---|
[906] | 872 | #if P0297_VPS_POC_LSB_ALIGNED_FLAG |
---|
| 873 | Bool m_vpsPocLsbAlignedFlag; |
---|
| 874 | #endif |
---|
[588] | 875 | #if RESOLUTION_BASED_DPB |
---|
[644] | 876 | Int m_subDpbAssigned [MAX_VPS_LAYER_SETS_PLUS1][MAX_LAYERS]; |
---|
[588] | 877 | #endif |
---|
[906] | 878 | #if NECESSARY_LAYER_FLAG |
---|
| 879 | std::vector< std::vector<Bool> > m_necessaryLayerFlag; |
---|
| 880 | std::vector<Int> m_numNecessaryLayers; |
---|
| 881 | #endif |
---|
[588] | 882 | #endif //SVC_EXTENSION |
---|
[313] | 883 | public: |
---|
| 884 | TComVPS(); |
---|
| 885 | virtual ~TComVPS(); |
---|
| 886 | |
---|
[906] | 887 | #if VPS_RESERVED_FLAGS |
---|
| 888 | Void setBaseLayerInternalFlag(Bool x) { m_baseLayerInternalFlag = x; } |
---|
| 889 | Bool getBaseLayerInternalFlag() { return m_baseLayerInternalFlag; } |
---|
| 890 | Void setBaseLayerAvailableFlag(Bool x) { m_baseLayerAvailableFlag = x; } |
---|
| 891 | Bool getBaseLayerAvailableFlag() { return m_baseLayerAvailableFlag; } |
---|
| 892 | #endif |
---|
| 893 | |
---|
[313] | 894 | Void createHrdParamBuffer() |
---|
| 895 | { |
---|
| 896 | m_hrdParameters = new TComHRD[ getNumHrdParameters() ]; |
---|
| 897 | m_hrdOpSetIdx = new UInt [ getNumHrdParameters() ]; |
---|
| 898 | m_cprmsPresentFlag = new Bool [ getNumHrdParameters() ]; |
---|
| 899 | } |
---|
| 900 | |
---|
[644] | 901 | #if O0164_MULTI_LAYER_HRD |
---|
| 902 | Void createBspHrdParamBuffer(UInt numHrds) |
---|
| 903 | { |
---|
[906] | 904 | #if VPS_VUI_BSP_HRD_PARAMS |
---|
| 905 | m_bspHrd.resize( numHrds ); |
---|
| 906 | m_cprmsAddPresentFlag.resize( numHrds ); |
---|
| 907 | m_numSubLayerHrdMinus1.resize( numHrds ); |
---|
| 908 | #else |
---|
[644] | 909 | m_bspHrd = new TComHRD[ numHrds ]; |
---|
[906] | 910 | #endif |
---|
[644] | 911 | // m_hrdOpSetIdx = new UInt [ getNumHrdParameters() ]; |
---|
| 912 | // m_cprmsPresentFlag = new Bool [ getNumHrdParameters() ]; |
---|
| 913 | } |
---|
| 914 | #endif |
---|
[815] | 915 | #if HRD_BPB |
---|
| 916 | Int getBspHrdParamBufferCpbCntMinus1(UInt i, UInt sl) |
---|
| 917 | { |
---|
[906] | 918 | #if VPS_VUI_BSP_HRD_PARAMS |
---|
| 919 | return m_bspHrd[i].getCpbCntMinus1(sl); |
---|
| 920 | #else |
---|
[815] | 921 | return m_bspHrd->getCpbCntMinus1(sl); |
---|
[906] | 922 | #endif |
---|
[815] | 923 | } |
---|
| 924 | #endif |
---|
[644] | 925 | |
---|
[313] | 926 | TComHRD* getHrdParameters ( UInt i ) { return &m_hrdParameters[ i ]; } |
---|
| 927 | UInt getHrdOpSetIdx ( UInt i ) { return m_hrdOpSetIdx[ i ]; } |
---|
| 928 | Void setHrdOpSetIdx ( UInt val, UInt i ) { m_hrdOpSetIdx[ i ] = val; } |
---|
| 929 | Bool getCprmsPresentFlag ( UInt i ) { return m_cprmsPresentFlag[ i ]; } |
---|
| 930 | Void setCprmsPresentFlag ( Bool val, UInt i ) { m_cprmsPresentFlag[ i ] = val; } |
---|
| 931 | |
---|
| 932 | Int getVPSId () { return m_VPSId; } |
---|
| 933 | Void setVPSId (Int i) { m_VPSId = i; } |
---|
| 934 | |
---|
| 935 | UInt getMaxTLayers () { return m_uiMaxTLayers; } |
---|
| 936 | Void setMaxTLayers (UInt t) { m_uiMaxTLayers = t; } |
---|
| 937 | |
---|
| 938 | UInt getMaxLayers () { return m_uiMaxLayers; } |
---|
| 939 | Void setMaxLayers (UInt l) { m_uiMaxLayers = l; } |
---|
| 940 | |
---|
| 941 | Bool getTemporalNestingFlag () { return m_bTemporalIdNestingFlag; } |
---|
| 942 | Void setTemporalNestingFlag (Bool t) { m_bTemporalIdNestingFlag = t; } |
---|
| 943 | |
---|
| 944 | Void setNumReorderPics(UInt v, UInt tLayer) { m_numReorderPics[tLayer] = v; } |
---|
| 945 | UInt getNumReorderPics(UInt tLayer) { return m_numReorderPics[tLayer]; } |
---|
| 946 | |
---|
[595] | 947 | Void setMaxDecPicBuffering(UInt v, UInt tLayer) { assert(tLayer < MAX_TLAYER); m_uiMaxDecPicBuffering[tLayer] = v; } |
---|
[313] | 948 | UInt getMaxDecPicBuffering(UInt tLayer) { return m_uiMaxDecPicBuffering[tLayer]; } |
---|
| 949 | |
---|
| 950 | Void setMaxLatencyIncrease(UInt v, UInt tLayer) { m_uiMaxLatencyIncrease[tLayer] = v; } |
---|
| 951 | UInt getMaxLatencyIncrease(UInt tLayer) { return m_uiMaxLatencyIncrease[tLayer]; } |
---|
| 952 | |
---|
| 953 | UInt getNumHrdParameters() { return m_numHrdParameters; } |
---|
| 954 | Void setNumHrdParameters(UInt v) { m_numHrdParameters = v; } |
---|
[494] | 955 | |
---|
| 956 | #if !SVC_EXTENSION |
---|
[313] | 957 | UInt getMaxNuhReservedZeroLayerId() { return m_maxNuhReservedZeroLayerId; } |
---|
| 958 | Void setMaxNuhReservedZeroLayerId(UInt v) { m_maxNuhReservedZeroLayerId = v; } |
---|
| 959 | |
---|
| 960 | UInt getMaxOpSets() { return m_numOpSets; } |
---|
| 961 | Void setMaxOpSets(UInt v) { m_numOpSets = v; } |
---|
| 962 | #endif |
---|
| 963 | Bool getLayerIdIncludedFlag(UInt opsIdx, UInt id) { return m_layerIdIncludedFlag[opsIdx][id]; } |
---|
| 964 | Void setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id) { m_layerIdIncludedFlag[opsIdx][id] = v; } |
---|
[494] | 965 | |
---|
| 966 | TComPTL* getPTL() { return &m_pcPTL; } |
---|
| 967 | TimingInfo* getTimingInfo() { return &m_timingInfo; } |
---|
| 968 | |
---|
| 969 | #if SVC_EXTENSION |
---|
[313] | 970 | #if DERIVE_LAYER_ID_LIST_VARIABLES |
---|
| 971 | Int getLayerSetLayerIdList(Int set, Int layerId) { return m_layerSetLayerIdList[set][layerId]; } |
---|
[906] | 972 | Void setLayerSetLayerIdList(Int set, Int layerId, Int x) { m_layerSetLayerIdList[set][layerId] = x; } |
---|
[313] | 973 | |
---|
| 974 | Int getNumLayersInIdList(Int set) { return m_numLayerInIdList[set]; } |
---|
[906] | 975 | Void setNumLayersInIdList(Int set, Int x) { m_numLayerInIdList[set] = x; } |
---|
[313] | 976 | |
---|
| 977 | Void deriveLayerIdListVariables(); |
---|
| 978 | #endif |
---|
[540] | 979 | #if VPS_DPB_SIZE_TABLE |
---|
| 980 | Void deriveNumberOfSubDpbs(); |
---|
| 981 | #endif |
---|
[442] | 982 | |
---|
[540] | 983 | #if O0092_0094_DEPENDENCY_CONSTRAINT |
---|
| 984 | Void setRefLayersFlags(Int currLayerId); |
---|
| 985 | Bool getRecursiveRefLayerFlag(Int currLayerId, Int refLayerId) { return m_recursiveRefLayerFlag[currLayerId][refLayerId];} |
---|
| 986 | Void setRecursiveRefLayerFlag(Int currLayerId, Int refLayerId, Bool x) { m_recursiveRefLayerFlag[currLayerId][refLayerId] = x; } |
---|
| 987 | Int getNumRefLayers(Int currLayerId) { return m_numberRefLayers[currLayerId]; } |
---|
[815] | 988 | Void setNumRefLayers(); |
---|
[442] | 989 | #endif |
---|
[815] | 990 | #if Q0078_ADD_LAYER_SETS |
---|
| 991 | void setLayerIdIncludedFlagsForAddLayerSets(); |
---|
| 992 | UInt getVpsNumLayerSetsMinus1() { return m_vpsNumLayerSetsMinus1; } |
---|
| 993 | Void setVpsNumLayerSetsMinus1(UInt x) { m_vpsNumLayerSetsMinus1 = x; } |
---|
| 994 | UInt getNumAddLayerSets() { return m_numAddLayerSets; } |
---|
| 995 | Void setNumAddLayerSets(UInt x) { m_numAddLayerSets = x; } |
---|
| 996 | UInt getHighestLayerIdxPlus1(UInt set, UInt idx) { return m_highestLayerIdxPlus1[set][idx]; } |
---|
| 997 | Void setHighestLayerIdxPlus1(UInt set, UInt idx, UInt layerIdx) { m_highestLayerIdxPlus1[set][idx] = layerIdx; } |
---|
| 998 | Void setPredictedLayerIds(); |
---|
| 999 | UInt getPredictedLayerId(UInt layerIdx, UInt predIdx) { return m_predictedLayerId[layerIdx][predIdx]; } |
---|
| 1000 | Void setPredictedLayerId(UInt layerIdx, UInt predIdx, UInt x) { m_predictedLayerId[layerIdx][predIdx] = x; } |
---|
| 1001 | UInt getNumPredictedLayers(UInt layerId) { return m_numPredictedLayers[layerId]; } |
---|
| 1002 | Void setNumPredictedLayers(UInt layerId, UInt x) { m_numPredictedLayers[layerId] = x; } |
---|
| 1003 | Void setTreePartitionLayerIdList(); |
---|
| 1004 | Int getNumIndependentLayers() { return m_numIndependentLayers; } |
---|
| 1005 | Void setNumIndependentLayers(Int x) { m_numIndependentLayers = x; } |
---|
| 1006 | Int getNumLayersInTreePartition(Int idx) { return m_numLayersInTreePartition[idx]; } |
---|
| 1007 | Void setNumLayersInTreePartition(Int idx, Int x) { m_numLayersInTreePartition[idx] = x; } |
---|
| 1008 | UInt getTreePartitionLayerId(Int idx, Int layerIdx) { return m_treePartitionLayerIdList[idx][layerIdx]; } |
---|
| 1009 | Void setTreePartitionLayerId(Int idx, Int layerIdx, UInt layerId) { m_treePartitionLayerIdList[idx][layerIdx] = layerId; } |
---|
| 1010 | #endif |
---|
| 1011 | UInt getMaxLayerId() { return m_maxLayerId; } |
---|
| 1012 | Void setMaxLayerId(UInt v) { m_maxLayerId = v; } |
---|
[494] | 1013 | UInt getNumLayerSets() { return m_numLayerSets; } |
---|
| 1014 | Void setNumLayerSets(UInt v) { m_numLayerSets = v; } |
---|
[313] | 1015 | #if VPS_EXTN_MASK_AND_DIM_INFO |
---|
[906] | 1016 | #if VPS_AVC_BL_FLAG_REMOVAL |
---|
| 1017 | Bool getNonHEVCBaseLayerFlag() { return m_nonHEVCBaseLayerFlag; } |
---|
| 1018 | Void setNonHEVCBaseLayerFlag(Bool x) { m_nonHEVCBaseLayerFlag = x; } |
---|
| 1019 | #else |
---|
[313] | 1020 | Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } |
---|
| 1021 | Void setAvcBaseLayerFlag(Bool x) { m_avcBaseLayerFlag = x; } |
---|
[906] | 1022 | #endif |
---|
[313] | 1023 | |
---|
| 1024 | Bool getSplittingFlag() { return m_splittingFlag; } |
---|
| 1025 | Void setSplittingFlag(Bool x) { m_splittingFlag = x; } |
---|
| 1026 | |
---|
| 1027 | Bool getScalabilityMask(Int id) { return m_scalabilityMask[id]; } |
---|
| 1028 | Void setScalabilityMask(Int id, Bool x) { m_scalabilityMask[id] = x; } |
---|
| 1029 | |
---|
| 1030 | UInt getDimensionIdLen(Int id) { return m_dimensionIdLen[id]; } |
---|
| 1031 | Void setDimensionIdLen(Int id, UInt x) { m_dimensionIdLen[id] = x; } |
---|
| 1032 | |
---|
| 1033 | Bool getNuhLayerIdPresentFlag() { return m_nuhLayerIdPresentFlag; } |
---|
| 1034 | Void setNuhLayerIdPresentFlag(Bool x) { m_nuhLayerIdPresentFlag = x; } |
---|
| 1035 | |
---|
| 1036 | UInt getLayerIdInNuh(Int id) { return m_layerIdInNuh[id]; } |
---|
| 1037 | Void setLayerIdInNuh(Int id, UInt x) { m_layerIdInNuh[id] = x; } |
---|
| 1038 | |
---|
| 1039 | UInt getDimensionId(Int lyrId, Int id) { return m_dimensionId[lyrId][id]; } |
---|
| 1040 | Void setDimensionId(Int lyrId, Int id, UInt x) { m_dimensionId[lyrId][id] = x; } |
---|
| 1041 | |
---|
| 1042 | UInt getNumScalabilityTypes() { return m_numScalabilityTypes; } |
---|
| 1043 | Void setNumScalabilityTypes(UInt x) { m_numScalabilityTypes = x; } |
---|
| 1044 | |
---|
| 1045 | UInt getLayerIdInVps(Int id) { return m_layerIdInVps[id]; } |
---|
| 1046 | Void setLayerIdInVps(Int id, UInt x) { m_layerIdInVps[id] = x; } |
---|
| 1047 | #endif |
---|
[815] | 1048 | #if BITRATE_PICRATE_SIGNALLING |
---|
| 1049 | UInt getMaxSLayersInLayerSetMinus1(Int ls) { return m_maxSLInLayerSetMinus1[ls]; } |
---|
| 1050 | Void setMaxSLayersInLayerSetMinus1(Int ls, Int x) { m_maxSLInLayerSetMinus1[ls] = x; } |
---|
[345] | 1051 | #endif |
---|
[815] | 1052 | Bool getIlpSshSignalingEnabledFlag() { return m_ilpSshSignalingEnabledFlag;} |
---|
| 1053 | Void setIlpSshSignalingEnabledFlag(Bool x) { m_ilpSshSignalingEnabledFlag = x;} |
---|
[313] | 1054 | #if VPS_EXTN_PROFILE_INFO |
---|
| 1055 | Bool getProfilePresentFlag(Int id) { return m_profilePresentFlag[id]; } |
---|
| 1056 | Void setProfilePresentFlag(Int id, Bool x) { m_profilePresentFlag[id] = x; } |
---|
| 1057 | |
---|
[588] | 1058 | #if !P0048_REMOVE_PROFILE_REF |
---|
[313] | 1059 | UInt getProfileLayerSetRef(Int id) { return m_profileLayerSetRef[id]; } |
---|
| 1060 | Void setProfileLayerSetRef(Int id, Bool x) { m_profileLayerSetRef[id] = x; } |
---|
[588] | 1061 | #endif |
---|
[313] | 1062 | |
---|
| 1063 | std::vector<TComPTL>* getPTLForExtnPtr() { return &m_pcPTLForExtn; } |
---|
| 1064 | TComPTL* getPTLForExtn(Int id) { return &m_pcPTLForExtn[id]; } |
---|
| 1065 | #endif |
---|
| 1066 | #if VPS_EXTN_OP_LAYER_SETS |
---|
| 1067 | // Target output layer signalling related |
---|
| 1068 | UInt getNumOutputLayerSets() { return m_numOutputLayerSets; } |
---|
| 1069 | Void setNumOutputLayerSets(Int x) { m_numOutputLayerSets = x; } |
---|
| 1070 | |
---|
| 1071 | UInt getOutputLayerSetIdx(Int idx) { return m_outputLayerSetIdx[idx]; } |
---|
| 1072 | Void setOutputLayerSetIdx(Int idx, UInt x) { m_outputLayerSetIdx[idx] = x; } |
---|
| 1073 | |
---|
| 1074 | Bool getOutputLayerFlag(Int layerSet, Int layerId) { return m_outputLayerFlag[layerSet][layerId]; } |
---|
| 1075 | Void setOutputLayerFlag(Int layerSet, Int layerId, Bool x) { m_outputLayerFlag[layerSet][layerId] = x; } |
---|
| 1076 | #endif |
---|
| 1077 | #if VPS_EXTN_DIRECT_REF_LAYERS |
---|
| 1078 | // Direct dependency of layers |
---|
| 1079 | Bool getDirectDependencyFlag(Int currLayerId, Int refLayerId) { return m_directDependencyFlag[currLayerId][refLayerId]; } |
---|
| 1080 | Void setDirectDependencyFlag(Int currLayerId, Int refLayerId, Bool x) { m_directDependencyFlag[currLayerId][refLayerId] = x; } |
---|
| 1081 | |
---|
| 1082 | UInt getNumDirectRefLayers(Int layerId) { return m_numDirectRefLayers[layerId]; } |
---|
| 1083 | Void setNumDirectRefLayers(Int layerId, UInt refLayerNum) { m_numDirectRefLayers[layerId] = refLayerNum; } |
---|
| 1084 | |
---|
| 1085 | UInt getRefLayerId(Int layerId, Int refLayerIdx) { return m_refLayerId[layerId][refLayerIdx]; } |
---|
| 1086 | Void setRefLayerId(Int layerId, Int refLayerIdx, UInt refLayerId) { m_refLayerId[layerId][refLayerIdx] = refLayerId; } |
---|
| 1087 | |
---|
| 1088 | UInt getDirectDepTypeLen() { return m_directDepTypeLen; } |
---|
| 1089 | Void setDirectDepTypeLen(UInt x) { m_directDepTypeLen = x; } |
---|
[540] | 1090 | #if O0096_DEFAULT_DEPENDENCY_TYPE |
---|
| 1091 | Bool getDefaultDirectDependencyTypeFlag() { return m_defaultDirectDependencyTypeFlag; } |
---|
| 1092 | Void setDefaultDirectDependecyTypeFlag(Bool x) { m_defaultDirectDependencyTypeFlag = x; } |
---|
| 1093 | UInt getDefaultDirectDependencyType() { return m_defaultDirectDependencyType; } |
---|
| 1094 | Void setDefaultDirectDependecyType(UInt x) { m_defaultDirectDependencyType = x; } |
---|
| 1095 | #endif |
---|
[313] | 1096 | UInt getDirectDependencyType(Int currLayerId, Int refLayerId) { return m_directDependencyType[currLayerId][refLayerId]; } |
---|
| 1097 | Void setDirectDependencyType(Int currLayerId, Int refLayerId, UInt x) { m_directDependencyType[currLayerId][refLayerId] = x; } |
---|
[815] | 1098 | Bool isSamplePredictionType(Int currLayerId, Int refLayerId) { assert(currLayerId != refLayerId); return ( ( m_directDependencyType[currLayerId][refLayerId] + 1 ) & 1 ) ? true : false; } |
---|
| 1099 | Bool isMotionPredictionType(Int currLayerId, Int refLayerId) { assert(currLayerId != refLayerId); return ( ( ( m_directDependencyType[currLayerId][refLayerId] + 1 ) & 2 ) >> 1 ) ? true : false; } |
---|
[313] | 1100 | #endif |
---|
| 1101 | UInt getNumProfileTierLevel() { return m_numProfileTierLevel; } |
---|
| 1102 | Void setNumProfileTierLevel(Int x) { m_numProfileTierLevel = x; } |
---|
| 1103 | |
---|
[588] | 1104 | #if !VPS_EXTN_UEV_CODING |
---|
[313] | 1105 | Bool getMoreOutputLayerSetsThanDefaultFlag() { return m_moreOutputLayerSetsThanDefaultFlag;} |
---|
| 1106 | Void setMoreOutputLayerSetsThanDefaultFlag(Bool x) { m_moreOutputLayerSetsThanDefaultFlag = x ;} |
---|
[588] | 1107 | #endif |
---|
[313] | 1108 | |
---|
| 1109 | Int getNumAddOutputLayerSets() { return m_numAddOutputLayerSets; } |
---|
| 1110 | Void setNumAddOutputLayerSets(Int x) { m_numAddOutputLayerSets = x ; } |
---|
| 1111 | |
---|
[588] | 1112 | #if P0295_DEFAULT_OUT_LAYER_IDC |
---|
| 1113 | UInt getDefaultTargetOutputLayerIdc() { return m_defaultTargetOutputLayerIdc;} |
---|
| 1114 | Void setDefaultTargetOutputLayerIdc(UInt x) { m_defaultTargetOutputLayerIdc = x ;} |
---|
| 1115 | #else |
---|
[547] | 1116 | #if O0109_DEFAULT_ONE_OUT_LAYER_IDC |
---|
| 1117 | UInt getDefaultOneTargetOutputLayerIdc() { return m_defaultOneTargetOutputLayerIdc;} |
---|
| 1118 | Void setDefaultOneTargetOutputLayerIdc(UInt x) { m_defaultOneTargetOutputLayerIdc= x ;} |
---|
| 1119 | #else |
---|
[313] | 1120 | Bool getDefaultOneTargetOutputLayerFlag() { return m_defaultOneTargetOutputLayerFlag;} |
---|
| 1121 | Void setDefaultOneTargetOutputLayerFlag(Bool x) { m_defaultOneTargetOutputLayerFlag= x ;} |
---|
[547] | 1122 | #endif |
---|
[588] | 1123 | #endif |
---|
[906] | 1124 | #if PER_LAYER_PTL |
---|
| 1125 | Bool getNecessaryLayerFlag(Int const i, Int const j) { return m_necessaryLayerFlag[i][j]; } |
---|
| 1126 | std::vector< std::vector<Int> >* getProfileLevelTierIdx() { return &m_profileLevelTierIdx; } |
---|
| 1127 | std::vector<Int>* getProfileLevelTierIdx(Int const olsIdx) { return &m_profileLevelTierIdx[olsIdx]; } |
---|
| 1128 | Int getProfileLevelTierIdx(Int const olsIdx, Int const layerIdx) { return m_profileLevelTierIdx[olsIdx][layerIdx]; } |
---|
| 1129 | Void setProfileLevelTierIdx(Int const olsIdx, Int const layerIdx, Int const ptlIdx) { m_profileLevelTierIdx[olsIdx][layerIdx] = ptlIdx; } |
---|
| 1130 | Int calculateLenOfSyntaxElement( Int const numVal ); |
---|
| 1131 | #else |
---|
[313] | 1132 | Int getProfileLevelTierIdx(Int i) { return m_profileLevelTierIdx[i]; } |
---|
| 1133 | Void setProfileLevelTierIdx(Int i, Int x) { m_profileLevelTierIdx[i] = x ; } |
---|
[906] | 1134 | #endif |
---|
[313] | 1135 | Bool getMaxOneActiveRefLayerFlag() { return m_maxOneActiveRefLayerFlag; } |
---|
| 1136 | Void setMaxOneActiveRefLayerFlag(Bool x) { m_maxOneActiveRefLayerFlag = x; } |
---|
[494] | 1137 | #if O0062_POC_LSB_NOT_PRESENT_FLAG |
---|
| 1138 | UInt getPocLsbNotPresentFlag(Int i) { return m_pocLsbNotPresentFlag[i]; } |
---|
| 1139 | Void setPocLsbNotPresentFlag(Int i, Bool x) { m_pocLsbNotPresentFlag[i] = x; } |
---|
| 1140 | #endif |
---|
[906] | 1141 | #if P0297_VPS_POC_LSB_ALIGNED_FLAG |
---|
| 1142 | Bool getVpsPocLsbAlignedFlag() { return m_vpsPocLsbAlignedFlag; } |
---|
| 1143 | Void setVpsPocLsbAlignedFlag(Bool x) { m_vpsPocLsbAlignedFlag = x; } |
---|
| 1144 | #endif |
---|
[540] | 1145 | #if O0223_PICTURE_TYPES_ALIGN_FLAG |
---|
| 1146 | Bool getCrossLayerPictureTypeAlignFlag() { return m_crossLayerPictureTypeAlignFlag; } |
---|
| 1147 | Void setCrossLayerPictureTypeAlignFlag(Bool x) { m_crossLayerPictureTypeAlignFlag = x; } |
---|
| 1148 | #endif |
---|
[644] | 1149 | #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG |
---|
| 1150 | Bool getCrossLayerAlignedIdrOnlyFlag() { return m_crossLayerAlignedIdrOnlyFlag; } |
---|
| 1151 | Void setCrossLayerAlignedIdrOnlyFlag(Bool x) { m_crossLayerAlignedIdrOnlyFlag = x; } |
---|
| 1152 | #endif |
---|
[442] | 1153 | Bool getCrossLayerIrapAlignFlag() { return m_crossLayerIrapAlignFlag; } |
---|
| 1154 | Void setCrossLayerIrapAlignFlag(Bool x) { m_crossLayerIrapAlignFlag = x; } |
---|
[494] | 1155 | #if O0225_MAX_TID_FOR_REF_LAYERS |
---|
| 1156 | UInt getMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId) { return m_maxTidIlRefPicsPlus1[layerId][refLayerId]; } |
---|
| 1157 | Void setMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId, UInt maxSublayer) { m_maxTidIlRefPicsPlus1[layerId][refLayerId] = maxSublayer; } |
---|
| 1158 | #else |
---|
[442] | 1159 | UInt getMaxTidIlRefPicsPlus1(Int layerId) { return m_maxTidIlRefPicsPlus1[layerId]; } |
---|
| 1160 | Void setMaxTidIlRefPicsPlus1(Int layerId, UInt maxSublayer) { m_maxTidIlRefPicsPlus1[layerId] = maxSublayer; } |
---|
[313] | 1161 | #endif |
---|
[442] | 1162 | Bool getMaxTidRefPresentFlag() { return m_maxTidRefPresentFlag ;} |
---|
| 1163 | Void setMaxTidRefPresentFlag(Bool x) { m_maxTidRefPresentFlag = x;} |
---|
[540] | 1164 | #if VPS_TSLAYERS |
---|
[644] | 1165 | Bool getMaxTSLayersPresentFlag() { return m_maxTSLayersPresentFlag ;} |
---|
| 1166 | Void setMaxTSLayersPresentFlag(Bool x) { m_maxTSLayersPresentFlag = x;} |
---|
| 1167 | UInt getMaxTSLayersMinus1(Int layerId) { return m_maxTSLayerMinus1[layerId];} |
---|
| 1168 | Void setMaxTSLayersMinus1(Int layerId, UInt maxTSublayer) { m_maxTSLayerMinus1[layerId] = maxTSublayer;} |
---|
[540] | 1169 | #endif |
---|
[313] | 1170 | #if M0040_ADAPTIVE_RESOLUTION_CHANGE |
---|
| 1171 | Bool getSingleLayerForNonIrapFlag() { return m_singleLayerForNonIrapFlag; } |
---|
| 1172 | Void setSingleLayerForNonIrapFlag(Bool x) { m_singleLayerForNonIrapFlag = x; } |
---|
| 1173 | #endif |
---|
[540] | 1174 | #if HIGHER_LAYER_IRAP_SKIP_FLAG |
---|
| 1175 | Bool getHigherLayerIrapSkipFlag() { return m_higherLayerIrapSkipFlag; } |
---|
| 1176 | Void setHigherLayerIrapSkipFlag(Bool x) { m_higherLayerIrapSkipFlag = x; } |
---|
| 1177 | #endif |
---|
| 1178 | #if VPS_VUI_TILES_NOT_IN_USE__FLAG |
---|
| 1179 | Bool getTilesNotInUseFlag() { return m_tilesNotInUseFlag; } |
---|
| 1180 | Void setTilesNotInUseFlag(Bool x); |
---|
| 1181 | Bool getTilesInUseFlag(Int currLayerId) { return m_tilesInUseFlag[currLayerId]; } |
---|
| 1182 | Void setTilesInUseFlag(Int currLayerId, Bool x) { m_tilesInUseFlag[currLayerId] = x; } |
---|
| 1183 | Bool getLoopFilterNotAcrossTilesFlag(Int currLayerId) { return m_loopFilterNotAcrossTilesFlag[currLayerId]; } |
---|
| 1184 | Void setLoopFilterNotAcrossTilesFlag(Int currLayerId, Bool x) { m_loopFilterNotAcrossTilesFlag[currLayerId] = x; } |
---|
| 1185 | #endif |
---|
[442] | 1186 | Bool getTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId) { return m_tileBoundariesAlignedFlag[currLayerId][refLayerId]; } |
---|
| 1187 | Void setTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId, Bool x) { m_tileBoundariesAlignedFlag[currLayerId][refLayerId] = x; } |
---|
[540] | 1188 | #if VPS_VUI_WPP_NOT_IN_USE__FLAG |
---|
| 1189 | Bool getWppNotInUseFlag() { return m_wppNotInUseFlag; } |
---|
| 1190 | Void setWppNotInUseFlag(Bool x); |
---|
| 1191 | Bool getWppInUseFlag(Int currLayerId) { return m_wppInUseFlag[currLayerId]; } |
---|
| 1192 | Void setWppInUseFlag(Int currLayerId, Bool x) { m_wppInUseFlag[currLayerId] = x; } |
---|
| 1193 | #endif |
---|
[442] | 1194 | #if N0160_VUI_EXT_ILP_REF |
---|
[644] | 1195 | Bool getIlpRestrictedRefLayersFlag ( ) { return m_ilpRestrictedRefLayersFlag ;} |
---|
| 1196 | Void setIlpRestrictedRefLayersFlag ( Int val ) { m_ilpRestrictedRefLayersFlag = val;} |
---|
[442] | 1197 | |
---|
[644] | 1198 | Int getMinSpatialSegmentOffsetPlus1( Int currLayerId, Int refLayerId ) { return m_minSpatialSegmentOffsetPlus1[currLayerId][refLayerId];} |
---|
| 1199 | Void setMinSpatialSegmentOffsetPlus1( Int currLayerId, Int refLayerId, Int val ) { m_minSpatialSegmentOffsetPlus1[currLayerId][refLayerId] = val;} |
---|
[442] | 1200 | |
---|
[644] | 1201 | Bool getCtuBasedOffsetEnabledFlag ( Int currLayerId, Int refLayerId ) { return m_ctuBasedOffsetEnabledFlag[currLayerId][refLayerId];} |
---|
| 1202 | Void setCtuBasedOffsetEnabledFlag ( Int currLayerId, Int refLayerId, Bool flag ) { m_ctuBasedOffsetEnabledFlag[currLayerId][refLayerId] = flag;} |
---|
[442] | 1203 | |
---|
[644] | 1204 | Int getMinHorizontalCtuOffsetPlus1 ( Int currLayerId, Int refLayerId ) { return m_minHorizontalCtuOffsetPlus1[currLayerId][refLayerId];} |
---|
| 1205 | Void setMinHorizontalCtuOffsetPlus1 ( Int currLayerId, Int refLayerId, Int val ) { m_minHorizontalCtuOffsetPlus1[currLayerId][refLayerId] = val;} |
---|
[442] | 1206 | #endif |
---|
[540] | 1207 | #if VPS_VUI_VIDEO_SIGNAL |
---|
[644] | 1208 | Bool getVideoSigPresentVpsFlag() { return m_vidSigPresentVpsFlag; } |
---|
| 1209 | Void setVideoSigPresentVpsFlag(Bool x) { m_vidSigPresentVpsFlag = x; } |
---|
| 1210 | Int getNumVideoSignalInfo() { return m_vpsVidSigInfo; } |
---|
| 1211 | Void setNumVideoSignalInfo(Int x) { m_vpsVidSigInfo = x; } |
---|
| 1212 | Int getVideoSignalInfoIdx(Int idx) { return m_vpsVidSigIdx[idx]; } |
---|
| 1213 | Void setVideoSignalInfoIdx(Int idx, Int x) { m_vpsVidSigIdx[idx] = x; } |
---|
| 1214 | Int getVideoVPSFormat(Int idx) { return m_vpsVidFormat[idx]; } |
---|
| 1215 | Void setVideoVPSFormat(Int idx, Int x) { m_vpsVidFormat[idx] = x; } |
---|
| 1216 | Bool getVideoFullRangeVpsFlag(Int idx) { return m_vpsFullRangeFlag[idx];} |
---|
| 1217 | Void setVideoFullRangeVpsFlag(Int idx, Bool x) { m_vpsFullRangeFlag[idx] = x; } |
---|
| 1218 | Int getColorPrimaries(Int idx) { return m_vpsColorPrimaries[idx]; } |
---|
| 1219 | Void setColorPrimaries(Int idx, Int x) { m_vpsColorPrimaries[idx] = x; } |
---|
| 1220 | Int getTransCharacter(Int idx) { return m_vpsTransChar[idx]; } |
---|
| 1221 | Void setTransCharacter(Int idx, Int x) { m_vpsTransChar[idx] = x; } |
---|
| 1222 | Int getMaxtrixCoeff(Int idx) { return m_vpsMatCoeff[idx]; } |
---|
| 1223 | Void setMaxtrixCoeff(Int idx, Int x) { m_vpsMatCoeff[idx] = x; } |
---|
[540] | 1224 | #endif |
---|
[644] | 1225 | Bool getBitRatePresentVpsFlag() { return m_bitRatePresentVpsFlag; } |
---|
| 1226 | Void setBitRatePresentVpsFlag(Bool x) { m_bitRatePresentVpsFlag = x; } |
---|
| 1227 | Bool getPicRatePresentVpsFlag() { return m_picRatePresentVpsFlag; } |
---|
| 1228 | Void setPicRatePresentVpsFlag(Bool x) { m_picRatePresentVpsFlag = x; } |
---|
| 1229 | |
---|
| 1230 | Bool getBitRatePresentFlag(Int i, Int j) { return m_bitRatePresentFlag[i][j]; } |
---|
| 1231 | Void setBitRatePresentFlag(Int i, Int j, Bool x) { m_bitRatePresentFlag[i][j] = x; } |
---|
| 1232 | Bool getPicRatePresentFlag(Int i, Int j) { return m_picRatePresentFlag[i][j]; } |
---|
| 1233 | Void setPicRatePresentFlag(Int i, Int j, Bool x) { m_picRatePresentFlag[i][j] = x; } |
---|
| 1234 | |
---|
| 1235 | Int getAvgBitRate(Int i, Int j) { return m_avgBitRate[i][j]; } |
---|
| 1236 | Void setAvgBitRate(Int i, Int j, Int x) { m_avgBitRate[i][j] = x; } |
---|
| 1237 | Int getMaxBitRate(Int i, Int j) { return m_maxBitRate[i][j]; } |
---|
| 1238 | Void setMaxBitRate(Int i, Int j, Int x) { m_maxBitRate[i][j] = x; } |
---|
| 1239 | |
---|
| 1240 | Int getConstPicRateIdc(Int i, Int j) { return m_constPicRateIdc[i][j]; } |
---|
| 1241 | Void setConstPicRateIdc(Int i, Int j, Int x) { m_constPicRateIdc[i][j] = x; } |
---|
| 1242 | Int getAvgPicRate(Int i, Int j) { return m_avgPicRate[i][j]; } |
---|
| 1243 | Void setAvgPicRate(Int i, Int j, Int x) { m_avgPicRate[i][j] = x; } |
---|
| 1244 | #if O0164_MULTI_LAYER_HRD |
---|
| 1245 | Bool getVpsVuiBspHrdPresentFlag() { return m_vpsVuiBspHrdPresentFlag; } |
---|
| 1246 | Void setVpsVuiBspHrdPresentFlag(Bool x) { m_vpsVuiBspHrdPresentFlag = x; } |
---|
[906] | 1247 | #if VPS_VUI_BSP_HRD_PARAMS |
---|
| 1248 | Int getVpsNumAddHrdParams() { return m_vpsNumAddHrdParams; } |
---|
| 1249 | Void setVpsNumAddHrdParams(Int i) { m_vpsNumAddHrdParams = i; } |
---|
| 1250 | |
---|
| 1251 | Bool getCprmsAddPresentFlag(Int i) { return m_cprmsAddPresentFlag[i]; } |
---|
| 1252 | Void setCprmsAddPresentFlag(Int i, Bool val) { m_cprmsAddPresentFlag[i] = val; } |
---|
| 1253 | |
---|
| 1254 | Int getNumSubLayerHrdMinus1(Int i) { return m_numSubLayerHrdMinus1[i]; } |
---|
| 1255 | Void setNumSubLayerHrdMinus1(Int i, Int val) { m_numSubLayerHrdMinus1[i] = val; } |
---|
| 1256 | |
---|
| 1257 | TComHRD* getBspHrd(Int i) {return &m_bspHrd[i];} |
---|
| 1258 | |
---|
| 1259 | Int getNumSignalledPartitioningSchemes(Int i) { return m_numSignalledPartitioningSchemes[i]; } |
---|
| 1260 | Void setNumSignalledPartitioningSchemes(Int i, Int val) { m_numSignalledPartitioningSchemes[i] = val; } |
---|
| 1261 | |
---|
| 1262 | Int getNumPartitionsInSchemeMinus1(Int i, Int j) { return m_numPartitionsInSchemeMinus1[i][j];} |
---|
| 1263 | Void setNumPartitionsInSchemeMinus1(Int i, Int j, Int val) { m_numPartitionsInSchemeMinus1[i][j] = val; } |
---|
| 1264 | |
---|
| 1265 | Int getLayerIncludedInPartitionFlag(Int i, Int j, Int k, Int l) { return m_layerIncludedInPartitionFlag[i][j][k][l];} |
---|
| 1266 | Void setLayerIncludedInPartitionFlag(Int i, Int j, Int k, Int l, Int val) { m_layerIncludedInPartitionFlag[i][j][k][l] = val; } |
---|
| 1267 | |
---|
| 1268 | Int getNumBspSchedulesMinus1(Int i, Int j, Int k) { return m_numBspSchedulesMinus1[i][j][k];} |
---|
| 1269 | Void setNumBspSchedulesMinus1(Int i, Int j, Int k, Int val) { m_numBspSchedulesMinus1[i][j][k] = val; } |
---|
| 1270 | |
---|
| 1271 | Int getBspSchedIdx(Int i, Int j, Int k, Int l, Int m) { return m_bspSchedIdx[i][j][k][l][m];} |
---|
| 1272 | Void setBspSchedIdx(Int i, Int j, Int k, Int l, Int m, Int val) { m_bspSchedIdx[i][j][k][l][m] = val; } |
---|
| 1273 | |
---|
| 1274 | Int getBspHrdIdx(Int i, Int j, Int k, Int l, Int m) { return m_bspHrdIdx[i][j][k][l][m];} |
---|
| 1275 | Void setBspHrdIdx(Int i, Int j, Int k, Int l, Int m, Int val) { m_bspHrdIdx[i][j][k][l][m] = val; } |
---|
| 1276 | #else |
---|
[644] | 1277 | UInt getVpsNumBspHrdParametersMinus1() { return m_vpsNumBspHrdParametersMinus1; } |
---|
| 1278 | Void setVpsNumBspHrdParametersMinus1(UInt i) { m_vpsNumBspHrdParametersMinus1 = i; } |
---|
| 1279 | Bool getBspCprmsPresentFlag(UInt i) { return m_bspCprmsPresentFlag[i]; } |
---|
| 1280 | Void setBspCprmsPresentFlag(UInt i, Bool val) { m_bspCprmsPresentFlag[i] = val; } |
---|
| 1281 | TComHRD* getBspHrd(UInt i) { return &m_bspHrd[i]; } |
---|
| 1282 | UInt getNumBitstreamPartitions(UInt i) { return m_numBitstreamPartitions[i]; } |
---|
| 1283 | Void setNumBitstreamPartitions(UInt i, UInt val) { m_numBitstreamPartitions[i] = val; } |
---|
| 1284 | UInt getLayerInBspFlag(UInt h, UInt i, UInt j) { return m_layerInBspFlag[h][i][j]; } |
---|
| 1285 | Void setLayerInBspFlag(UInt h, UInt i, UInt j, UInt val) { m_layerInBspFlag[h][i][j] = val; } |
---|
| 1286 | UInt getNumBspSchedCombinations(UInt i) { return m_numBspSchedCombinations[i]; } |
---|
| 1287 | Void setNumBspSchedCombinations(UInt i, UInt val) { m_numBspSchedCombinations[i] = val; } |
---|
| 1288 | UInt getBspCombHrdIdx(UInt h, UInt i, UInt j) { return m_bspCombHrdIdx[h][i][j]; } |
---|
| 1289 | Void setBspCombHrdIdx(UInt h, UInt i, UInt j, UInt val) { m_bspCombHrdIdx[h][i][j] = val; } |
---|
| 1290 | UInt getBspCombSchedIdx(UInt h, UInt i, UInt j) { return m_bspCombSchedIdx[h][i][j]; } |
---|
| 1291 | Void setBspCombSchedIdx(UInt h, UInt i, UInt j, UInt val) { m_bspCombSchedIdx[h][i][j] = val; } |
---|
| 1292 | #endif |
---|
[906] | 1293 | #endif |
---|
[644] | 1294 | #if P0182_VPS_VUI_PS_FLAG |
---|
| 1295 | Int getSPSId (Int layer) { return m_SPSId[layer]; } |
---|
| 1296 | Void setSPSId (Int layer, Int val) { m_SPSId[layer] = val; } |
---|
| 1297 | Int getPPSId (Int layer) { return m_PPSId[layer]; } |
---|
| 1298 | Void setPPSId (Int layer, Int val) { m_PPSId[layer] = val; } |
---|
| 1299 | Void setBaseLayerPSCompatibilityFlag (Int layer, int val) { m_baseLayerPSCompatibilityFlag[layer] = val; } |
---|
| 1300 | Int getBaseLayerPSCompatibilityFlag (Int layer) { return m_baseLayerPSCompatibilityFlag[layer];} |
---|
| 1301 | #endif |
---|
[442] | 1302 | |
---|
[644] | 1303 | #if P0312_VERT_PHASE_ADJ |
---|
| 1304 | Bool getVpsVuiVertPhaseInUseFlag() { return m_vpsVuiVertPhaseInUseFlag; } |
---|
| 1305 | Void setVpsVuiVertPhaseInUseFlag(Bool x) { m_vpsVuiVertPhaseInUseFlag = x; } |
---|
[442] | 1306 | #endif |
---|
[644] | 1307 | |
---|
| 1308 | #if P0300_ALT_OUTPUT_LAYER_FLAG |
---|
| 1309 | Bool getAltOuputLayerFlag(Int idx) { return m_altOutputLayerFlag[idx]; } |
---|
| 1310 | Void setAltOuputLayerFlag(Int idx, Bool x) { m_altOutputLayerFlag[idx] = x; } |
---|
| 1311 | #else |
---|
[540] | 1312 | #if O0153_ALT_OUTPUT_LAYER_FLAG |
---|
| 1313 | Bool getAltOuputLayerFlag() { return m_altOutputLayerFlag; } |
---|
| 1314 | Void setAltOuputLayerFlag(Bool x) { m_altOutputLayerFlag = x; } |
---|
| 1315 | #endif |
---|
[644] | 1316 | #endif |
---|
[442] | 1317 | #if REPN_FORMAT_IN_VPS |
---|
| 1318 | Bool getRepFormatIdxPresentFlag() { return m_repFormatIdxPresentFlag; } |
---|
| 1319 | Void setRepFormatIdxPresentFlag(Bool x) { m_repFormatIdxPresentFlag = x; } |
---|
| 1320 | |
---|
| 1321 | Int getVpsNumRepFormats() { return m_vpsNumRepFormats; } |
---|
| 1322 | Void setVpsNumRepFormats(Int x) { m_vpsNumRepFormats = x; } |
---|
| 1323 | |
---|
| 1324 | RepFormat* getVpsRepFormat(Int idx) { return &m_vpsRepFormat[idx]; } |
---|
| 1325 | |
---|
[644] | 1326 | Int getVpsRepFormatIdx(Int idx) { return m_vpsRepFormatIdx[idx]; } |
---|
| 1327 | Void setVpsRepFormatIdx(Int idx, Int x) { m_vpsRepFormatIdx[idx] = x; } |
---|
[442] | 1328 | #endif |
---|
| 1329 | #if VIEW_ID_RELATED_SIGNALING |
---|
[547] | 1330 | #if O0109_VIEW_ID_LEN |
---|
[644] | 1331 | Void setViewIdLen( Int val ) { m_viewIdLen = val; } |
---|
| 1332 | Int getViewIdLen( ) { return m_viewIdLen; } |
---|
[547] | 1333 | #else |
---|
[644] | 1334 | Void setViewIdLenMinus1( Int val ) { m_viewIdLenMinus1 = val; } |
---|
| 1335 | Int getViewIdLenMinus1( ) { return m_viewIdLenMinus1; } |
---|
[547] | 1336 | #endif |
---|
[442] | 1337 | |
---|
[644] | 1338 | Void setViewIdVal( Int viewOrderIndex, Int val ) { m_viewIdVal[viewOrderIndex] = val; } |
---|
| 1339 | Int getViewIdVal( Int viewOrderIndex ) { return m_viewIdVal[viewOrderIndex]; } |
---|
| 1340 | Int getScalabilityId(Int, ScalabilityType scalType ); |
---|
[442] | 1341 | |
---|
[644] | 1342 | Int getViewIndex ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX ); } |
---|
[442] | 1343 | |
---|
[644] | 1344 | Int getNumViews(); |
---|
| 1345 | Int scalTypeToScalIdx( ScalabilityType scalType ); |
---|
[442] | 1346 | #endif |
---|
[588] | 1347 | #if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED |
---|
[442] | 1348 | #if VPS_EXTN_OFFSET |
---|
[644] | 1349 | Int getExtensionOffset() { return m_extensionOffset; } |
---|
| 1350 | Void setExtensionOffset( UInt offset ) { m_extensionOffset = offset; } |
---|
[442] | 1351 | #endif |
---|
[588] | 1352 | #endif |
---|
[494] | 1353 | #if O0215_PHASE_ALIGNMENT |
---|
| 1354 | Bool getPhaseAlignFlag() { return m_phaseAlignFlag; } |
---|
| 1355 | Void setPhaseAlignFlag(Bool x) { m_phaseAlignFlag = x; } |
---|
| 1356 | #endif |
---|
[540] | 1357 | #if VPS_DPB_SIZE_TABLE |
---|
[644] | 1358 | Bool getSubLayerFlagInfoPresentFlag(Int i) {return m_subLayerFlagInfoPresentFlag[i]; } |
---|
| 1359 | Void setSubLayerFlagInfoPresentFlag(Int i, Bool x) {m_subLayerFlagInfoPresentFlag[i] = x; } |
---|
[540] | 1360 | |
---|
[644] | 1361 | Bool getSubLayerDpbInfoPresentFlag(Int i, Int j) {return m_subLayerDpbInfoPresentFlag[i][j]; } |
---|
| 1362 | Void setSubLayerDpbInfoPresentFlag(Int i, Int j, Bool x) {m_subLayerDpbInfoPresentFlag[i][j] = x; } |
---|
[540] | 1363 | |
---|
| 1364 | // For the 0-th output layer set, use the date from the active SPS for base layer. |
---|
[644] | 1365 | Int getMaxVpsDecPicBufferingMinus1(Int i, Int k, Int j) { assert(i != 0); return m_maxVpsDecPicBufferingMinus1[i][k][j]; } |
---|
| 1366 | Void setMaxVpsDecPicBufferingMinus1(Int i, Int k, Int j, Int x) { m_maxVpsDecPicBufferingMinus1[i][k][j] = x; } |
---|
[540] | 1367 | |
---|
[588] | 1368 | #if RESOLUTION_BASED_DPB |
---|
[644] | 1369 | Int getMaxVpsLayerDecPicBuffMinus1(Int i, Int k, Int j) { assert(i != 0); return m_maxVpsLayerDecPicBuffMinus1[i][k][j]; } |
---|
| 1370 | Void setMaxVpsLayerDecPicBuffMinus1(Int i, Int k, Int j, Int x) { m_maxVpsLayerDecPicBuffMinus1[i][k][j] = x; } |
---|
[588] | 1371 | #endif |
---|
| 1372 | |
---|
[644] | 1373 | Int getMaxVpsNumReorderPics(Int i, Int j) { assert(i != 0); return m_maxVpsNumReorderPics[i][j]; } |
---|
| 1374 | Void setMaxVpsNumReorderPics(Int i, Int j, Int x) { m_maxVpsNumReorderPics[i][j] = x; } |
---|
[540] | 1375 | |
---|
[644] | 1376 | Int getMaxVpsLatencyIncreasePlus1(Int i, Int j) { assert(i != 0); return m_maxVpsLatencyIncreasePlus1[i][j]; } |
---|
| 1377 | Void setMaxVpsLatencyIncreasePlus1(Int i, Int j, Int x) { m_maxVpsLatencyIncreasePlus1[i][j] = x; } |
---|
[540] | 1378 | |
---|
[644] | 1379 | Int getNumSubDpbs(Int i) { return m_numSubDpbs[i]; } |
---|
| 1380 | Void setNumSubDpbs(Int i, Int x) { m_numSubDpbs[i] = x; } |
---|
| 1381 | Void determineSubDpbInfoFlags(); |
---|
[540] | 1382 | #endif |
---|
[547] | 1383 | |
---|
| 1384 | #if O0109_MOVE_VPS_VUI_FLAG |
---|
[713] | 1385 | Bool getVpsVuiPresentFlag() { return m_vpsVuiPresentFlag; } |
---|
| 1386 | Void setVpsVuiPresentFlag(Bool x) { m_vpsVuiPresentFlag = x; } |
---|
[547] | 1387 | #endif |
---|
[713] | 1388 | Bool getVpsExtensionFlag() { return m_vpsExtensionFlag; } |
---|
| 1389 | Void setVpsExtensionFlag(Bool x) { m_vpsExtensionFlag = x; } |
---|
[547] | 1390 | |
---|
[588] | 1391 | #if !P0307_REMOVE_VPS_VUI_OFFSET |
---|
[547] | 1392 | #if VPS_VUI_OFFSET |
---|
[644] | 1393 | Int getVpsVuiOffset() { return m_vpsVuiOffset; } |
---|
| 1394 | Void setVpsVuiOffset(Int x) { m_vpsVuiOffset = x; } |
---|
[547] | 1395 | #endif |
---|
[588] | 1396 | #endif |
---|
| 1397 | #if P0307_VPS_NON_VUI_EXTENSION |
---|
[644] | 1398 | Int getVpsNonVuiExtLength() { return m_vpsNonVuiExtLength; } |
---|
| 1399 | Void setVpsNonVuiExtLength(Int x) { m_vpsNonVuiExtLength = x; } |
---|
[588] | 1400 | #endif |
---|
| 1401 | #if RESOLUTION_BASED_DPB |
---|
[644] | 1402 | Void assignSubDpbIndices(); |
---|
| 1403 | Int getSubDpbAssigned (Int lsIdx, Int layerIdx) { return m_subDpbAssigned[lsIdx][layerIdx]; } |
---|
| 1404 | Int findLayerIdxInLayerSet ( Int lsIdx, Int nuhLayerId ); |
---|
[588] | 1405 | #endif |
---|
[644] | 1406 | #if O0164_MULTI_LAYER_HRD |
---|
| 1407 | Void setBspHrdParameters( UInt hrdIdx, UInt frameRate, UInt numDU, UInt bitRate, Bool randomAccess ); |
---|
| 1408 | #endif |
---|
[906] | 1409 | #if NECESSARY_LAYER_FLAG |
---|
| 1410 | Void deriveNecessaryLayerFlag(); |
---|
| 1411 | Void deriveNecessaryLayerFlag(Int const olsIdx); |
---|
| 1412 | Void checkNecessaryLayerFlagCondition(); |
---|
[644] | 1413 | #endif |
---|
[906] | 1414 | #if SUB_LAYERS_IN_LAYER_SET |
---|
| 1415 | Void calculateMaxSLInLayerSets(); |
---|
[644] | 1416 | #endif |
---|
[906] | 1417 | #endif //SVC_EXTENSION |
---|
[313] | 1418 | }; |
---|
| 1419 | |
---|
| 1420 | class TComVUI |
---|
| 1421 | { |
---|
| 1422 | private: |
---|
| 1423 | Bool m_aspectRatioInfoPresentFlag; |
---|
| 1424 | Int m_aspectRatioIdc; |
---|
| 1425 | Int m_sarWidth; |
---|
| 1426 | Int m_sarHeight; |
---|
| 1427 | Bool m_overscanInfoPresentFlag; |
---|
| 1428 | Bool m_overscanAppropriateFlag; |
---|
| 1429 | Bool m_videoSignalTypePresentFlag; |
---|
| 1430 | Int m_videoFormat; |
---|
| 1431 | Bool m_videoFullRangeFlag; |
---|
| 1432 | Bool m_colourDescriptionPresentFlag; |
---|
| 1433 | Int m_colourPrimaries; |
---|
| 1434 | Int m_transferCharacteristics; |
---|
| 1435 | Int m_matrixCoefficients; |
---|
| 1436 | Bool m_chromaLocInfoPresentFlag; |
---|
| 1437 | Int m_chromaSampleLocTypeTopField; |
---|
| 1438 | Int m_chromaSampleLocTypeBottomField; |
---|
| 1439 | Bool m_neutralChromaIndicationFlag; |
---|
| 1440 | Bool m_fieldSeqFlag; |
---|
| 1441 | |
---|
| 1442 | Window m_defaultDisplayWindow; |
---|
| 1443 | Bool m_frameFieldInfoPresentFlag; |
---|
| 1444 | Bool m_hrdParametersPresentFlag; |
---|
| 1445 | Bool m_bitstreamRestrictionFlag; |
---|
| 1446 | Bool m_tilesFixedStructureFlag; |
---|
| 1447 | Bool m_motionVectorsOverPicBoundariesFlag; |
---|
| 1448 | Bool m_restrictedRefPicListsFlag; |
---|
| 1449 | Int m_minSpatialSegmentationIdc; |
---|
| 1450 | Int m_maxBytesPerPicDenom; |
---|
| 1451 | Int m_maxBitsPerMinCuDenom; |
---|
| 1452 | Int m_log2MaxMvLengthHorizontal; |
---|
| 1453 | Int m_log2MaxMvLengthVertical; |
---|
| 1454 | TComHRD m_hrdParameters; |
---|
| 1455 | TimingInfo m_timingInfo; |
---|
| 1456 | |
---|
| 1457 | public: |
---|
| 1458 | TComVUI() |
---|
| 1459 | :m_aspectRatioInfoPresentFlag(false) |
---|
| 1460 | ,m_aspectRatioIdc(0) |
---|
| 1461 | ,m_sarWidth(0) |
---|
| 1462 | ,m_sarHeight(0) |
---|
| 1463 | ,m_overscanInfoPresentFlag(false) |
---|
| 1464 | ,m_overscanAppropriateFlag(false) |
---|
| 1465 | ,m_videoSignalTypePresentFlag(false) |
---|
| 1466 | ,m_videoFormat(5) |
---|
| 1467 | ,m_videoFullRangeFlag(false) |
---|
| 1468 | ,m_colourDescriptionPresentFlag(false) |
---|
| 1469 | ,m_colourPrimaries(2) |
---|
| 1470 | ,m_transferCharacteristics(2) |
---|
| 1471 | ,m_matrixCoefficients(2) |
---|
| 1472 | ,m_chromaLocInfoPresentFlag(false) |
---|
| 1473 | ,m_chromaSampleLocTypeTopField(0) |
---|
| 1474 | ,m_chromaSampleLocTypeBottomField(0) |
---|
| 1475 | ,m_neutralChromaIndicationFlag(false) |
---|
| 1476 | ,m_fieldSeqFlag(false) |
---|
| 1477 | ,m_frameFieldInfoPresentFlag(false) |
---|
| 1478 | ,m_hrdParametersPresentFlag(false) |
---|
| 1479 | ,m_bitstreamRestrictionFlag(false) |
---|
| 1480 | ,m_tilesFixedStructureFlag(false) |
---|
| 1481 | ,m_motionVectorsOverPicBoundariesFlag(true) |
---|
| 1482 | ,m_restrictedRefPicListsFlag(1) |
---|
| 1483 | ,m_minSpatialSegmentationIdc(0) |
---|
| 1484 | ,m_maxBytesPerPicDenom(2) |
---|
| 1485 | ,m_maxBitsPerMinCuDenom(1) |
---|
| 1486 | ,m_log2MaxMvLengthHorizontal(15) |
---|
| 1487 | ,m_log2MaxMvLengthVertical(15) |
---|
| 1488 | {} |
---|
| 1489 | |
---|
| 1490 | virtual ~TComVUI() {} |
---|
| 1491 | |
---|
| 1492 | Bool getAspectRatioInfoPresentFlag() { return m_aspectRatioInfoPresentFlag; } |
---|
| 1493 | Void setAspectRatioInfoPresentFlag(Bool i) { m_aspectRatioInfoPresentFlag = i; } |
---|
| 1494 | |
---|
| 1495 | Int getAspectRatioIdc() { return m_aspectRatioIdc; } |
---|
| 1496 | Void setAspectRatioIdc(Int i) { m_aspectRatioIdc = i; } |
---|
| 1497 | |
---|
| 1498 | Int getSarWidth() { return m_sarWidth; } |
---|
| 1499 | Void setSarWidth(Int i) { m_sarWidth = i; } |
---|
| 1500 | |
---|
| 1501 | Int getSarHeight() { return m_sarHeight; } |
---|
| 1502 | Void setSarHeight(Int i) { m_sarHeight = i; } |
---|
| 1503 | |
---|
| 1504 | Bool getOverscanInfoPresentFlag() { return m_overscanInfoPresentFlag; } |
---|
| 1505 | Void setOverscanInfoPresentFlag(Bool i) { m_overscanInfoPresentFlag = i; } |
---|
| 1506 | |
---|
| 1507 | Bool getOverscanAppropriateFlag() { return m_overscanAppropriateFlag; } |
---|
| 1508 | Void setOverscanAppropriateFlag(Bool i) { m_overscanAppropriateFlag = i; } |
---|
| 1509 | |
---|
| 1510 | Bool getVideoSignalTypePresentFlag() { return m_videoSignalTypePresentFlag; } |
---|
| 1511 | Void setVideoSignalTypePresentFlag(Bool i) { m_videoSignalTypePresentFlag = i; } |
---|
| 1512 | |
---|
| 1513 | Int getVideoFormat() { return m_videoFormat; } |
---|
| 1514 | Void setVideoFormat(Int i) { m_videoFormat = i; } |
---|
| 1515 | |
---|
| 1516 | Bool getVideoFullRangeFlag() { return m_videoFullRangeFlag; } |
---|
| 1517 | Void setVideoFullRangeFlag(Bool i) { m_videoFullRangeFlag = i; } |
---|
| 1518 | |
---|
| 1519 | Bool getColourDescriptionPresentFlag() { return m_colourDescriptionPresentFlag; } |
---|
| 1520 | Void setColourDescriptionPresentFlag(Bool i) { m_colourDescriptionPresentFlag = i; } |
---|
| 1521 | |
---|
| 1522 | Int getColourPrimaries() { return m_colourPrimaries; } |
---|
| 1523 | Void setColourPrimaries(Int i) { m_colourPrimaries = i; } |
---|
| 1524 | |
---|
| 1525 | Int getTransferCharacteristics() { return m_transferCharacteristics; } |
---|
| 1526 | Void setTransferCharacteristics(Int i) { m_transferCharacteristics = i; } |
---|
| 1527 | |
---|
| 1528 | Int getMatrixCoefficients() { return m_matrixCoefficients; } |
---|
| 1529 | Void setMatrixCoefficients(Int i) { m_matrixCoefficients = i; } |
---|
| 1530 | |
---|
| 1531 | Bool getChromaLocInfoPresentFlag() { return m_chromaLocInfoPresentFlag; } |
---|
| 1532 | Void setChromaLocInfoPresentFlag(Bool i) { m_chromaLocInfoPresentFlag = i; } |
---|
| 1533 | |
---|
| 1534 | Int getChromaSampleLocTypeTopField() { return m_chromaSampleLocTypeTopField; } |
---|
| 1535 | Void setChromaSampleLocTypeTopField(Int i) { m_chromaSampleLocTypeTopField = i; } |
---|
| 1536 | |
---|
| 1537 | Int getChromaSampleLocTypeBottomField() { return m_chromaSampleLocTypeBottomField; } |
---|
| 1538 | Void setChromaSampleLocTypeBottomField(Int i) { m_chromaSampleLocTypeBottomField = i; } |
---|
| 1539 | |
---|
| 1540 | Bool getNeutralChromaIndicationFlag() { return m_neutralChromaIndicationFlag; } |
---|
| 1541 | Void setNeutralChromaIndicationFlag(Bool i) { m_neutralChromaIndicationFlag = i; } |
---|
| 1542 | |
---|
| 1543 | Bool getFieldSeqFlag() { return m_fieldSeqFlag; } |
---|
| 1544 | Void setFieldSeqFlag(Bool i) { m_fieldSeqFlag = i; } |
---|
| 1545 | |
---|
| 1546 | Bool getFrameFieldInfoPresentFlag() { return m_frameFieldInfoPresentFlag; } |
---|
| 1547 | Void setFrameFieldInfoPresentFlag(Bool i) { m_frameFieldInfoPresentFlag = i; } |
---|
| 1548 | |
---|
| 1549 | Window& getDefaultDisplayWindow() { return m_defaultDisplayWindow; } |
---|
| 1550 | Void setDefaultDisplayWindow(Window& defaultDisplayWindow ) { m_defaultDisplayWindow = defaultDisplayWindow; } |
---|
| 1551 | |
---|
| 1552 | Bool getHrdParametersPresentFlag() { return m_hrdParametersPresentFlag; } |
---|
| 1553 | Void setHrdParametersPresentFlag(Bool i) { m_hrdParametersPresentFlag = i; } |
---|
| 1554 | |
---|
| 1555 | Bool getBitstreamRestrictionFlag() { return m_bitstreamRestrictionFlag; } |
---|
| 1556 | Void setBitstreamRestrictionFlag(Bool i) { m_bitstreamRestrictionFlag = i; } |
---|
| 1557 | |
---|
| 1558 | Bool getTilesFixedStructureFlag() { return m_tilesFixedStructureFlag; } |
---|
| 1559 | Void setTilesFixedStructureFlag(Bool i) { m_tilesFixedStructureFlag = i; } |
---|
| 1560 | |
---|
| 1561 | Bool getMotionVectorsOverPicBoundariesFlag() { return m_motionVectorsOverPicBoundariesFlag; } |
---|
| 1562 | Void setMotionVectorsOverPicBoundariesFlag(Bool i) { m_motionVectorsOverPicBoundariesFlag = i; } |
---|
| 1563 | |
---|
| 1564 | Bool getRestrictedRefPicListsFlag() { return m_restrictedRefPicListsFlag; } |
---|
| 1565 | Void setRestrictedRefPicListsFlag(Bool b) { m_restrictedRefPicListsFlag = b; } |
---|
| 1566 | |
---|
| 1567 | Int getMinSpatialSegmentationIdc() { return m_minSpatialSegmentationIdc; } |
---|
| 1568 | Void setMinSpatialSegmentationIdc(Int i) { m_minSpatialSegmentationIdc = i; } |
---|
| 1569 | Int getMaxBytesPerPicDenom() { return m_maxBytesPerPicDenom; } |
---|
| 1570 | Void setMaxBytesPerPicDenom(Int i) { m_maxBytesPerPicDenom = i; } |
---|
| 1571 | |
---|
| 1572 | Int getMaxBitsPerMinCuDenom() { return m_maxBitsPerMinCuDenom; } |
---|
| 1573 | Void setMaxBitsPerMinCuDenom(Int i) { m_maxBitsPerMinCuDenom = i; } |
---|
| 1574 | |
---|
| 1575 | Int getLog2MaxMvLengthHorizontal() { return m_log2MaxMvLengthHorizontal; } |
---|
| 1576 | Void setLog2MaxMvLengthHorizontal(Int i) { m_log2MaxMvLengthHorizontal = i; } |
---|
| 1577 | |
---|
| 1578 | Int getLog2MaxMvLengthVertical() { return m_log2MaxMvLengthVertical; } |
---|
| 1579 | Void setLog2MaxMvLengthVertical(Int i) { m_log2MaxMvLengthVertical = i; } |
---|
| 1580 | |
---|
| 1581 | TComHRD* getHrdParameters () { return &m_hrdParameters; } |
---|
| 1582 | TimingInfo* getTimingInfo() { return &m_timingInfo; } |
---|
| 1583 | }; |
---|
| 1584 | |
---|
| 1585 | /// SPS class |
---|
| 1586 | class TComSPS |
---|
| 1587 | { |
---|
| 1588 | private: |
---|
| 1589 | Int m_SPSId; |
---|
| 1590 | Int m_VPSId; |
---|
[494] | 1591 | #if AUXILIARY_PICTURES |
---|
| 1592 | ChromaFormat m_chromaFormatIdc; |
---|
| 1593 | #else |
---|
[313] | 1594 | Int m_chromaFormatIdc; |
---|
[494] | 1595 | #endif |
---|
[313] | 1596 | |
---|
| 1597 | UInt m_uiMaxTLayers; // maximum number of temporal layers |
---|
| 1598 | |
---|
[906] | 1599 | #if R0279_REP_FORMAT_INBL |
---|
| 1600 | Bool m_bV1CompatibleSPSFlag; |
---|
| 1601 | #endif |
---|
| 1602 | |
---|
[313] | 1603 | // Structure |
---|
| 1604 | UInt m_picWidthInLumaSamples; |
---|
| 1605 | UInt m_picHeightInLumaSamples; |
---|
| 1606 | |
---|
| 1607 | Int m_log2MinCodingBlockSize; |
---|
| 1608 | Int m_log2DiffMaxMinCodingBlockSize; |
---|
| 1609 | UInt m_uiMaxCUWidth; |
---|
| 1610 | UInt m_uiMaxCUHeight; |
---|
| 1611 | UInt m_uiMaxCUDepth; |
---|
| 1612 | |
---|
| 1613 | Window m_conformanceWindow; |
---|
| 1614 | |
---|
| 1615 | TComRPSList m_RPSList; |
---|
| 1616 | Bool m_bLongTermRefsPresent; |
---|
| 1617 | Bool m_TMVPFlagsPresent; |
---|
| 1618 | Int m_numReorderPics[MAX_TLAYER]; |
---|
| 1619 | |
---|
| 1620 | // Tool list |
---|
| 1621 | UInt m_uiQuadtreeTULog2MaxSize; |
---|
| 1622 | UInt m_uiQuadtreeTULog2MinSize; |
---|
| 1623 | UInt m_uiQuadtreeTUMaxDepthInter; |
---|
| 1624 | UInt m_uiQuadtreeTUMaxDepthIntra; |
---|
| 1625 | Bool m_usePCM; |
---|
| 1626 | UInt m_pcmLog2MaxSize; |
---|
| 1627 | UInt m_uiPCMLog2MinSize; |
---|
| 1628 | Bool m_useAMP; |
---|
| 1629 | |
---|
| 1630 | // Parameter |
---|
| 1631 | Int m_bitDepthY; |
---|
| 1632 | Int m_bitDepthC; |
---|
| 1633 | Int m_qpBDOffsetY; |
---|
| 1634 | Int m_qpBDOffsetC; |
---|
| 1635 | |
---|
| 1636 | UInt m_uiPCMBitDepthLuma; |
---|
| 1637 | UInt m_uiPCMBitDepthChroma; |
---|
| 1638 | Bool m_bPCMFilterDisableFlag; |
---|
| 1639 | |
---|
| 1640 | UInt m_uiBitsForPOC; |
---|
| 1641 | UInt m_numLongTermRefPicSPS; |
---|
| 1642 | UInt m_ltRefPicPocLsbSps[33]; |
---|
| 1643 | Bool m_usedByCurrPicLtSPSFlag[33]; |
---|
| 1644 | // Max physical transform size |
---|
| 1645 | UInt m_uiMaxTrSize; |
---|
| 1646 | |
---|
| 1647 | Int m_iAMPAcc[MAX_CU_DEPTH]; |
---|
| 1648 | Bool m_bUseSAO; |
---|
| 1649 | |
---|
| 1650 | Bool m_bTemporalIdNestingFlag; // temporal_id_nesting_flag |
---|
| 1651 | |
---|
| 1652 | Bool m_scalingListEnabledFlag; |
---|
| 1653 | Bool m_scalingListPresentFlag; |
---|
| 1654 | TComScalingList* m_scalingList; //!< ScalingList class pointer |
---|
| 1655 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
| 1656 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) |
---|
| 1657 | |
---|
| 1658 | Bool m_useDF; |
---|
| 1659 | Bool m_useStrongIntraSmoothing; |
---|
| 1660 | |
---|
| 1661 | Bool m_vuiParametersPresentFlag; |
---|
| 1662 | TComVUI m_vuiParameters; |
---|
| 1663 | |
---|
| 1664 | static const Int m_winUnitX[MAX_CHROMA_FORMAT_IDC+1]; |
---|
| 1665 | static const Int m_winUnitY[MAX_CHROMA_FORMAT_IDC+1]; |
---|
| 1666 | TComPTL m_pcPTL; |
---|
| 1667 | |
---|
[494] | 1668 | #if SVC_EXTENSION |
---|
[644] | 1669 | UInt m_layerId; |
---|
[815] | 1670 | Bool m_extensionFlag; |
---|
[313] | 1671 | UInt m_numScaledRefLayerOffsets; |
---|
[906] | 1672 | #if R0042_PROFILE_INDICATION |
---|
| 1673 | Int m_NumDirectRefLayers; |
---|
| 1674 | #endif |
---|
[644] | 1675 | #if P0312_VERT_PHASE_ADJ |
---|
| 1676 | Bool m_vertPhasePositionEnableFlag[MAX_LAYERS]; |
---|
| 1677 | #endif |
---|
[906] | 1678 | #if !MOVE_SCALED_OFFSET_TO_PPS |
---|
[540] | 1679 | #if O0098_SCALED_REF_LAYER_ID |
---|
| 1680 | UInt m_scaledRefLayerId[MAX_LAYERS]; |
---|
| 1681 | #endif |
---|
[313] | 1682 | Window m_scaledRefLayerWindow[MAX_LAYERS]; |
---|
[906] | 1683 | #endif |
---|
[442] | 1684 | #if REPN_FORMAT_IN_VPS |
---|
[906] | 1685 | Bool m_updateRepFormatFlag; |
---|
[540] | 1686 | #if O0096_REP_FORMAT_INDEX |
---|
[644] | 1687 | UInt m_updateRepFormatIndex; |
---|
[442] | 1688 | #endif |
---|
[540] | 1689 | #endif |
---|
| 1690 | #if SCALINGLIST_INFERRING |
---|
[644] | 1691 | Bool m_inferScalingListFlag; |
---|
| 1692 | UInt m_scalingListRefLayerId; |
---|
[540] | 1693 | #endif |
---|
[494] | 1694 | #endif //SVC_EXTENSION |
---|
[906] | 1695 | |
---|
[313] | 1696 | public: |
---|
| 1697 | TComSPS(); |
---|
| 1698 | virtual ~TComSPS(); |
---|
| 1699 | |
---|
| 1700 | Int getVPSId () { return m_VPSId; } |
---|
| 1701 | Void setVPSId (Int i) { m_VPSId = i; } |
---|
| 1702 | Int getSPSId () { return m_SPSId; } |
---|
| 1703 | Void setSPSId (Int i) { m_SPSId = i; } |
---|
[494] | 1704 | |
---|
| 1705 | #if AUXILIARY_PICTURES |
---|
| 1706 | ChromaFormat getChromaFormatIdc () { return m_chromaFormatIdc; } |
---|
| 1707 | Void setChromaFormatIdc (ChromaFormat i) { m_chromaFormatIdc = i; } |
---|
| 1708 | |
---|
| 1709 | static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitX[chromaFormatIdc]; } |
---|
| 1710 | static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc]; } |
---|
| 1711 | #else |
---|
[313] | 1712 | Int getChromaFormatIdc () { return m_chromaFormatIdc; } |
---|
| 1713 | Void setChromaFormatIdc (Int i) { m_chromaFormatIdc = i; } |
---|
| 1714 | |
---|
| 1715 | static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitX[chromaFormatIdc]; } |
---|
| 1716 | static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc]; } |
---|
[494] | 1717 | #endif |
---|
[906] | 1718 | |
---|
| 1719 | #if R0279_REP_FORMAT_INBL //These two functions shall be used / called when the syntax element sps_ext_or_max_sub_layers_minus1 and V1CompatibleSPSFlag are implemented |
---|
| 1720 | Bool getV1CompatibleSPSFlag() {return m_bV1CompatibleSPSFlag;} |
---|
| 1721 | Void setV1CompatibleSPSFlag(Bool x) { m_bV1CompatibleSPSFlag = x;} |
---|
| 1722 | #endif |
---|
| 1723 | |
---|
[313] | 1724 | // structure |
---|
| 1725 | Void setPicWidthInLumaSamples ( UInt u ) { m_picWidthInLumaSamples = u; } |
---|
| 1726 | UInt getPicWidthInLumaSamples () { return m_picWidthInLumaSamples; } |
---|
| 1727 | Void setPicHeightInLumaSamples ( UInt u ) { m_picHeightInLumaSamples = u; } |
---|
| 1728 | UInt getPicHeightInLumaSamples () { return m_picHeightInLumaSamples; } |
---|
| 1729 | |
---|
| 1730 | Window& getConformanceWindow() { return m_conformanceWindow; } |
---|
| 1731 | Void setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; } |
---|
| 1732 | |
---|
| 1733 | UInt getNumLongTermRefPicSPS() { return m_numLongTermRefPicSPS; } |
---|
| 1734 | Void setNumLongTermRefPicSPS(UInt val) { m_numLongTermRefPicSPS = val; } |
---|
| 1735 | |
---|
| 1736 | UInt getLtRefPicPocLsbSps(UInt index) { return m_ltRefPicPocLsbSps[index]; } |
---|
| 1737 | Void setLtRefPicPocLsbSps(UInt index, UInt val) { m_ltRefPicPocLsbSps[index] = val; } |
---|
| 1738 | |
---|
| 1739 | Bool getUsedByCurrPicLtSPSFlag(Int i) {return m_usedByCurrPicLtSPSFlag[i];} |
---|
| 1740 | Void setUsedByCurrPicLtSPSFlag(Int i, Bool x) { m_usedByCurrPicLtSPSFlag[i] = x;} |
---|
| 1741 | |
---|
| 1742 | Int getLog2MinCodingBlockSize() const { return m_log2MinCodingBlockSize; } |
---|
| 1743 | Void setLog2MinCodingBlockSize(Int val) { m_log2MinCodingBlockSize = val; } |
---|
| 1744 | Int getLog2DiffMaxMinCodingBlockSize() const { return m_log2DiffMaxMinCodingBlockSize; } |
---|
| 1745 | Void setLog2DiffMaxMinCodingBlockSize(Int val) { m_log2DiffMaxMinCodingBlockSize = val; } |
---|
| 1746 | |
---|
| 1747 | Void setMaxCUWidth ( UInt u ) { m_uiMaxCUWidth = u; } |
---|
| 1748 | UInt getMaxCUWidth () { return m_uiMaxCUWidth; } |
---|
| 1749 | Void setMaxCUHeight ( UInt u ) { m_uiMaxCUHeight = u; } |
---|
| 1750 | UInt getMaxCUHeight () { return m_uiMaxCUHeight; } |
---|
| 1751 | Void setMaxCUDepth ( UInt u ) { m_uiMaxCUDepth = u; } |
---|
| 1752 | UInt getMaxCUDepth () { return m_uiMaxCUDepth; } |
---|
| 1753 | Void setUsePCM ( Bool b ) { m_usePCM = b; } |
---|
| 1754 | Bool getUsePCM () { return m_usePCM; } |
---|
| 1755 | Void setPCMLog2MaxSize ( UInt u ) { m_pcmLog2MaxSize = u; } |
---|
| 1756 | UInt getPCMLog2MaxSize () { return m_pcmLog2MaxSize; } |
---|
| 1757 | Void setPCMLog2MinSize ( UInt u ) { m_uiPCMLog2MinSize = u; } |
---|
| 1758 | UInt getPCMLog2MinSize () { return m_uiPCMLog2MinSize; } |
---|
| 1759 | Void setBitsForPOC ( UInt u ) { m_uiBitsForPOC = u; } |
---|
| 1760 | UInt getBitsForPOC () { return m_uiBitsForPOC; } |
---|
| 1761 | Bool getUseAMP() { return m_useAMP; } |
---|
| 1762 | Void setUseAMP( Bool b ) { m_useAMP = b; } |
---|
| 1763 | Void setQuadtreeTULog2MaxSize( UInt u ) { m_uiQuadtreeTULog2MaxSize = u; } |
---|
| 1764 | UInt getQuadtreeTULog2MaxSize() { return m_uiQuadtreeTULog2MaxSize; } |
---|
| 1765 | Void setQuadtreeTULog2MinSize( UInt u ) { m_uiQuadtreeTULog2MinSize = u; } |
---|
| 1766 | UInt getQuadtreeTULog2MinSize() { return m_uiQuadtreeTULog2MinSize; } |
---|
| 1767 | Void setQuadtreeTUMaxDepthInter( UInt u ) { m_uiQuadtreeTUMaxDepthInter = u; } |
---|
| 1768 | Void setQuadtreeTUMaxDepthIntra( UInt u ) { m_uiQuadtreeTUMaxDepthIntra = u; } |
---|
| 1769 | UInt getQuadtreeTUMaxDepthInter() { return m_uiQuadtreeTUMaxDepthInter; } |
---|
| 1770 | UInt getQuadtreeTUMaxDepthIntra() { return m_uiQuadtreeTUMaxDepthIntra; } |
---|
| 1771 | Void setNumReorderPics(Int i, UInt tlayer) { m_numReorderPics[tlayer] = i; } |
---|
| 1772 | Int getNumReorderPics(UInt tlayer) { return m_numReorderPics[tlayer]; } |
---|
| 1773 | Void createRPSList( Int numRPS ); |
---|
| 1774 | TComRPSList* getRPSList() { return &m_RPSList; } |
---|
| 1775 | Bool getLongTermRefsPresent() { return m_bLongTermRefsPresent; } |
---|
| 1776 | Void setLongTermRefsPresent(Bool b) { m_bLongTermRefsPresent=b; } |
---|
| 1777 | Bool getTMVPFlagsPresent() { return m_TMVPFlagsPresent; } |
---|
| 1778 | Void setTMVPFlagsPresent(Bool b) { m_TMVPFlagsPresent=b; } |
---|
| 1779 | // physical transform |
---|
| 1780 | Void setMaxTrSize ( UInt u ) { m_uiMaxTrSize = u; } |
---|
| 1781 | UInt getMaxTrSize () { return m_uiMaxTrSize; } |
---|
| 1782 | |
---|
| 1783 | // AMP accuracy |
---|
| 1784 | Int getAMPAcc ( UInt uiDepth ) { return m_iAMPAcc[uiDepth]; } |
---|
| 1785 | Void setAMPAcc ( UInt uiDepth, Int iAccu ) { assert( uiDepth < g_uiMaxCUDepth); m_iAMPAcc[uiDepth] = iAccu; } |
---|
| 1786 | |
---|
| 1787 | // Bit-depth |
---|
| 1788 | Int getBitDepthY() { return m_bitDepthY; } |
---|
| 1789 | Void setBitDepthY(Int u) { m_bitDepthY = u; } |
---|
| 1790 | Int getBitDepthC() { return m_bitDepthC; } |
---|
| 1791 | Void setBitDepthC(Int u) { m_bitDepthC = u; } |
---|
| 1792 | Int getQpBDOffsetY () { return m_qpBDOffsetY; } |
---|
| 1793 | Void setQpBDOffsetY ( Int value ) { m_qpBDOffsetY = value; } |
---|
| 1794 | Int getQpBDOffsetC () { return m_qpBDOffsetC; } |
---|
| 1795 | Void setQpBDOffsetC ( Int value ) { m_qpBDOffsetC = value; } |
---|
| 1796 | Void setUseSAO (Bool bVal) {m_bUseSAO = bVal;} |
---|
| 1797 | Bool getUseSAO () {return m_bUseSAO;} |
---|
| 1798 | |
---|
| 1799 | UInt getMaxTLayers() { return m_uiMaxTLayers; } |
---|
| 1800 | Void setMaxTLayers( UInt uiMaxTLayers ) { assert( uiMaxTLayers <= MAX_TLAYER ); m_uiMaxTLayers = uiMaxTLayers; } |
---|
| 1801 | |
---|
| 1802 | Bool getTemporalIdNestingFlag() { return m_bTemporalIdNestingFlag; } |
---|
| 1803 | Void setTemporalIdNestingFlag( Bool bValue ) { m_bTemporalIdNestingFlag = bValue; } |
---|
| 1804 | UInt getPCMBitDepthLuma () { return m_uiPCMBitDepthLuma; } |
---|
| 1805 | Void setPCMBitDepthLuma ( UInt u ) { m_uiPCMBitDepthLuma = u; } |
---|
| 1806 | UInt getPCMBitDepthChroma () { return m_uiPCMBitDepthChroma; } |
---|
| 1807 | Void setPCMBitDepthChroma ( UInt u ) { m_uiPCMBitDepthChroma = u; } |
---|
| 1808 | Void setPCMFilterDisableFlag ( Bool bValue ) { m_bPCMFilterDisableFlag = bValue; } |
---|
| 1809 | Bool getPCMFilterDisableFlag () { return m_bPCMFilterDisableFlag; } |
---|
| 1810 | |
---|
| 1811 | Bool getScalingListFlag () { return m_scalingListEnabledFlag; } |
---|
| 1812 | Void setScalingListFlag ( Bool b ) { m_scalingListEnabledFlag = b; } |
---|
| 1813 | Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } |
---|
| 1814 | Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } |
---|
[442] | 1815 | |
---|
[540] | 1816 | #if SCALINGLIST_INFERRING |
---|
| 1817 | Void setScalingList( TComScalingList *scalingList ) { m_scalingList = scalingList; } |
---|
| 1818 | #else |
---|
| 1819 | Void setScalingList ( TComScalingList *scalingList); |
---|
[442] | 1820 | #endif |
---|
[313] | 1821 | TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in SPS |
---|
| 1822 | UInt getMaxDecPicBuffering (UInt tlayer) { return m_uiMaxDecPicBuffering[tlayer]; } |
---|
[595] | 1823 | Void setMaxDecPicBuffering ( UInt ui, UInt tlayer ) { assert(tlayer < MAX_TLAYER); m_uiMaxDecPicBuffering[tlayer] = ui; } |
---|
[313] | 1824 | UInt getMaxLatencyIncrease (UInt tlayer) { return m_uiMaxLatencyIncrease[tlayer]; } |
---|
| 1825 | Void setMaxLatencyIncrease ( UInt ui , UInt tlayer) { m_uiMaxLatencyIncrease[tlayer] = ui; } |
---|
| 1826 | |
---|
| 1827 | Void setUseStrongIntraSmoothing (Bool bVal) {m_useStrongIntraSmoothing = bVal;} |
---|
| 1828 | Bool getUseStrongIntraSmoothing () {return m_useStrongIntraSmoothing;} |
---|
| 1829 | |
---|
| 1830 | Bool getVuiParametersPresentFlag() { return m_vuiParametersPresentFlag; } |
---|
| 1831 | Void setVuiParametersPresentFlag(Bool b) { m_vuiParametersPresentFlag = b; } |
---|
| 1832 | TComVUI* getVuiParameters() { return &m_vuiParameters; } |
---|
| 1833 | Void setHrdParameters( UInt frameRate, UInt numDU, UInt bitRate, Bool randomAccess ); |
---|
| 1834 | |
---|
| 1835 | TComPTL* getPTL() { return &m_pcPTL; } |
---|
| 1836 | |
---|
| 1837 | #if SVC_EXTENSION |
---|
[644] | 1838 | Void setLayerId(UInt layerId) { m_layerId = layerId; } |
---|
| 1839 | UInt getLayerId() { return m_layerId; } |
---|
[815] | 1840 | Int getExtensionFlag() { return m_extensionFlag; } |
---|
| 1841 | Void setExtensionFlag(Int n) { m_extensionFlag = n; } |
---|
[906] | 1842 | #if R0042_PROFILE_INDICATION |
---|
| 1843 | Int getNumDirectRefLayers() { return m_NumDirectRefLayers; } |
---|
| 1844 | Void setNumDirectRefLayers(Int n) { m_NumDirectRefLayers = n; } |
---|
| 1845 | #endif |
---|
| 1846 | #if !MOVE_SCALED_OFFSET_TO_PPS |
---|
[644] | 1847 | UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } |
---|
| 1848 | Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } |
---|
| 1849 | #if P0312_VERT_PHASE_ADJ |
---|
| 1850 | Bool getVertPhasePositionEnableFlag(Int x) { return m_vertPhasePositionEnableFlag[x]; } |
---|
| 1851 | Void setVertPhasePositionEnableFlag(Int x, Bool b) { m_vertPhasePositionEnableFlag[x] = b; } |
---|
| 1852 | #endif |
---|
[540] | 1853 | #if O0098_SCALED_REF_LAYER_ID |
---|
| 1854 | UInt getScaledRefLayerId(Int x) { return m_scaledRefLayerId[x]; } |
---|
[644] | 1855 | Void setScaledRefLayerId(Int x, UInt id) { m_scaledRefLayerId[x] = id; } |
---|
[540] | 1856 | Window& getScaledRefLayerWindowForLayer( Int layerId ); |
---|
| 1857 | #endif |
---|
[313] | 1858 | Window& getScaledRefLayerWindow( Int x ) { return m_scaledRefLayerWindow[x]; } |
---|
[906] | 1859 | #endif |
---|
[442] | 1860 | #if REPN_FORMAT_IN_VPS |
---|
| 1861 | Bool getUpdateRepFormatFlag() { return m_updateRepFormatFlag; } |
---|
| 1862 | Void setUpdateRepFormatFlag(Bool x) { m_updateRepFormatFlag = x; } |
---|
[540] | 1863 | #if O0096_REP_FORMAT_INDEX |
---|
| 1864 | Int getUpdateRepFormatIndex() { return m_updateRepFormatIndex; } |
---|
| 1865 | Void setUpdateRepFormatIndex(UInt index) { m_updateRepFormatIndex = index; } |
---|
[442] | 1866 | #endif |
---|
[540] | 1867 | #endif |
---|
| 1868 | #if SCALINGLIST_INFERRING |
---|
| 1869 | Bool getInferScalingListFlag() { return m_inferScalingListFlag; } |
---|
| 1870 | UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; } |
---|
| 1871 | Void setInferScalingListFlag( Bool flag ) { m_inferScalingListFlag = flag; } |
---|
| 1872 | Void setScalingListRefLayerId( UInt layerId ) { m_scalingListRefLayerId = layerId; } |
---|
| 1873 | #endif |
---|
[494] | 1874 | #endif //SVC_EXTENSION |
---|
[313] | 1875 | }; |
---|
| 1876 | |
---|
| 1877 | /// Reference Picture Lists class |
---|
| 1878 | class TComRefPicListModification |
---|
| 1879 | { |
---|
| 1880 | private: |
---|
| 1881 | UInt m_bRefPicListModificationFlagL0; |
---|
| 1882 | UInt m_bRefPicListModificationFlagL1; |
---|
| 1883 | UInt m_RefPicSetIdxL0[32]; |
---|
| 1884 | UInt m_RefPicSetIdxL1[32]; |
---|
| 1885 | |
---|
| 1886 | public: |
---|
| 1887 | TComRefPicListModification(); |
---|
| 1888 | virtual ~TComRefPicListModification(); |
---|
| 1889 | |
---|
| 1890 | Void create (); |
---|
| 1891 | Void destroy (); |
---|
| 1892 | |
---|
| 1893 | Bool getRefPicListModificationFlagL0() { return m_bRefPicListModificationFlagL0; } |
---|
| 1894 | Void setRefPicListModificationFlagL0(Bool flag) { m_bRefPicListModificationFlagL0 = flag; } |
---|
| 1895 | Bool getRefPicListModificationFlagL1() { return m_bRefPicListModificationFlagL1; } |
---|
| 1896 | Void setRefPicListModificationFlagL1(Bool flag) { m_bRefPicListModificationFlagL1 = flag; } |
---|
| 1897 | Void setRefPicSetIdxL0(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL0[idx] = refPicSetIdx; } |
---|
| 1898 | UInt getRefPicSetIdxL0(UInt idx) { return m_RefPicSetIdxL0[idx]; } |
---|
| 1899 | Void setRefPicSetIdxL1(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL1[idx] = refPicSetIdx; } |
---|
| 1900 | UInt getRefPicSetIdxL1(UInt idx) { return m_RefPicSetIdxL1[idx]; } |
---|
| 1901 | }; |
---|
| 1902 | |
---|
| 1903 | /// PPS class |
---|
| 1904 | class TComPPS |
---|
| 1905 | { |
---|
| 1906 | private: |
---|
| 1907 | Int m_PPSId; // pic_parameter_set_id |
---|
| 1908 | Int m_SPSId; // seq_parameter_set_id |
---|
| 1909 | Int m_picInitQPMinus26; |
---|
| 1910 | Bool m_useDQP; |
---|
| 1911 | Bool m_bConstrainedIntraPred; // constrained_intra_pred_flag |
---|
| 1912 | Bool m_bSliceChromaQpFlag; // slicelevel_chroma_qp_flag |
---|
| 1913 | |
---|
| 1914 | // access channel |
---|
| 1915 | TComSPS* m_pcSPS; |
---|
| 1916 | UInt m_uiMaxCuDQPDepth; |
---|
| 1917 | UInt m_uiMinCuDQPSize; |
---|
| 1918 | |
---|
| 1919 | Int m_chromaCbQpOffset; |
---|
| 1920 | Int m_chromaCrQpOffset; |
---|
| 1921 | |
---|
| 1922 | UInt m_numRefIdxL0DefaultActive; |
---|
| 1923 | UInt m_numRefIdxL1DefaultActive; |
---|
| 1924 | |
---|
| 1925 | Bool m_bUseWeightPred; // Use of Weighting Prediction (P_SLICE) |
---|
| 1926 | Bool m_useWeightedBiPred; // Use of Weighting Bi-Prediction (B_SLICE) |
---|
| 1927 | Bool m_OutputFlagPresentFlag; // Indicates the presence of output_flag in slice header |
---|
| 1928 | |
---|
| 1929 | Bool m_TransquantBypassEnableFlag; // Indicates presence of cu_transquant_bypass_flag in CUs. |
---|
| 1930 | Bool m_useTransformSkip; |
---|
| 1931 | Bool m_dependentSliceSegmentsEnabledFlag; //!< Indicates the presence of dependent slices |
---|
| 1932 | Bool m_tilesEnabledFlag; //!< Indicates the presence of tiles |
---|
| 1933 | Bool m_entropyCodingSyncEnabledFlag; //!< Indicates the presence of wavefronts |
---|
| 1934 | |
---|
| 1935 | Bool m_loopFilterAcrossTilesEnabledFlag; |
---|
[906] | 1936 | Bool m_uniformSpacingFlag; |
---|
| 1937 | Int m_numTileColumnsMinus1; |
---|
| 1938 | Int m_numTileRowsMinus1; |
---|
| 1939 | std::vector<Int> m_tileColumnWidth; |
---|
| 1940 | std::vector<Int> m_tileRowHeight; |
---|
[313] | 1941 | |
---|
[906] | 1942 | Int m_numSubstreams; |
---|
[313] | 1943 | |
---|
| 1944 | Int m_signHideFlag; |
---|
| 1945 | |
---|
| 1946 | Bool m_cabacInitPresentFlag; |
---|
| 1947 | UInt m_encCABACTableIdx; // Used to transmit table selection across slices |
---|
| 1948 | |
---|
| 1949 | Bool m_sliceHeaderExtensionPresentFlag; |
---|
| 1950 | Bool m_loopFilterAcrossSlicesEnabledFlag; |
---|
| 1951 | Bool m_deblockingFilterControlPresentFlag; |
---|
| 1952 | Bool m_deblockingFilterOverrideEnabledFlag; |
---|
| 1953 | Bool m_picDisableDeblockingFilterFlag; |
---|
| 1954 | Int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
| 1955 | Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
| 1956 | Bool m_scalingListPresentFlag; |
---|
[540] | 1957 | TComScalingList* m_scalingList; //!< ScalingList class pointer |
---|
| 1958 | Bool m_listsModificationPresentFlag; |
---|
| 1959 | UInt m_log2ParallelMergeLevelMinus2; |
---|
| 1960 | Int m_numExtraSliceHeaderBits; |
---|
[442] | 1961 | |
---|
| 1962 | #if SVC_EXTENSION |
---|
[815] | 1963 | Bool m_extensionFlag; |
---|
[540] | 1964 | #if SCALINGLIST_INFERRING |
---|
| 1965 | UInt m_layerId; |
---|
| 1966 | Bool m_inferScalingListFlag; |
---|
[442] | 1967 | UInt m_scalingListRefLayerId; |
---|
| 1968 | #endif |
---|
[644] | 1969 | #if POC_RESET_IDC |
---|
| 1970 | Bool m_pocResetInfoPresentFlag; |
---|
[442] | 1971 | #endif |
---|
[906] | 1972 | #if MOVE_SCALED_OFFSET_TO_PPS |
---|
| 1973 | UInt m_numScaledRefLayerOffsets; |
---|
| 1974 | #if O0098_SCALED_REF_LAYER_ID |
---|
| 1975 | UInt m_scaledRefLayerId[MAX_LAYERS]; |
---|
| 1976 | #endif |
---|
| 1977 | Window m_scaledRefLayerWindow[MAX_LAYERS]; |
---|
| 1978 | #if REF_REGION_OFFSET |
---|
| 1979 | Window m_refLayerWindow[MAX_LAYERS]; |
---|
| 1980 | Bool m_scaledRefLayerOffsetPresentFlag[MAX_LAYERS]; |
---|
| 1981 | Bool m_refRegionOffsetPresentFlag[MAX_LAYERS]; |
---|
| 1982 | #endif |
---|
| 1983 | #if R0209_GENERIC_PHASE |
---|
| 1984 | Int m_phaseHorLuma[MAX_LAYERS]; |
---|
| 1985 | Int m_phaseVerLuma[MAX_LAYERS]; |
---|
| 1986 | Int m_phaseHorChroma[MAX_LAYERS]; |
---|
| 1987 | Int m_phaseVerChroma[MAX_LAYERS]; |
---|
| 1988 | Bool m_resamplePhaseSetPresentFlag[MAX_LAYERS]; |
---|
| 1989 | #endif |
---|
| 1990 | #endif |
---|
[713] | 1991 | #if Q0048_CGS_3D_ASYMLUT |
---|
| 1992 | Int m_nCGSFlag; |
---|
| 1993 | Int m_nCGSOutputBitDepthY; // not for syntax |
---|
| 1994 | Int m_nCGSOutputBitDepthC; // not for syntax |
---|
[644] | 1995 | #endif |
---|
[713] | 1996 | #endif |
---|
[442] | 1997 | |
---|
[313] | 1998 | public: |
---|
| 1999 | TComPPS(); |
---|
| 2000 | virtual ~TComPPS(); |
---|
| 2001 | |
---|
| 2002 | Int getPPSId () { return m_PPSId; } |
---|
| 2003 | Void setPPSId (Int i) { m_PPSId = i; } |
---|
| 2004 | Int getSPSId () { return m_SPSId; } |
---|
| 2005 | Void setSPSId (Int i) { m_SPSId = i; } |
---|
| 2006 | |
---|
| 2007 | Int getPicInitQPMinus26 () { return m_picInitQPMinus26; } |
---|
| 2008 | Void setPicInitQPMinus26 ( Int i ) { m_picInitQPMinus26 = i; } |
---|
| 2009 | Bool getUseDQP () { return m_useDQP; } |
---|
| 2010 | Void setUseDQP ( Bool b ) { m_useDQP = b; } |
---|
| 2011 | Bool getConstrainedIntraPred () { return m_bConstrainedIntraPred; } |
---|
| 2012 | Void setConstrainedIntraPred ( Bool b ) { m_bConstrainedIntraPred = b; } |
---|
| 2013 | Bool getSliceChromaQpFlag () { return m_bSliceChromaQpFlag; } |
---|
| 2014 | Void setSliceChromaQpFlag ( Bool b ) { m_bSliceChromaQpFlag = b; } |
---|
| 2015 | |
---|
| 2016 | Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
| 2017 | TComSPS* getSPS () { return m_pcSPS; } |
---|
| 2018 | Void setMaxCuDQPDepth ( UInt u ) { m_uiMaxCuDQPDepth = u; } |
---|
| 2019 | UInt getMaxCuDQPDepth () { return m_uiMaxCuDQPDepth;} |
---|
| 2020 | Void setMinCuDQPSize ( UInt u ) { m_uiMinCuDQPSize = u; } |
---|
| 2021 | UInt getMinCuDQPSize () { return m_uiMinCuDQPSize; } |
---|
| 2022 | |
---|
| 2023 | Void setChromaCbQpOffset( Int i ) { m_chromaCbQpOffset = i; } |
---|
| 2024 | Int getChromaCbQpOffset() { return m_chromaCbQpOffset; } |
---|
| 2025 | Void setChromaCrQpOffset( Int i ) { m_chromaCrQpOffset = i; } |
---|
| 2026 | Int getChromaCrQpOffset() { return m_chromaCrQpOffset; } |
---|
| 2027 | |
---|
| 2028 | Void setNumRefIdxL0DefaultActive(UInt ui) { m_numRefIdxL0DefaultActive=ui; } |
---|
| 2029 | UInt getNumRefIdxL0DefaultActive() { return m_numRefIdxL0DefaultActive; } |
---|
| 2030 | Void setNumRefIdxL1DefaultActive(UInt ui) { m_numRefIdxL1DefaultActive=ui; } |
---|
| 2031 | UInt getNumRefIdxL1DefaultActive() { return m_numRefIdxL1DefaultActive; } |
---|
| 2032 | |
---|
| 2033 | Bool getUseWP () { return m_bUseWeightPred; } |
---|
| 2034 | Bool getWPBiPred () { return m_useWeightedBiPred; } |
---|
| 2035 | Void setUseWP ( Bool b ) { m_bUseWeightPred = b; } |
---|
| 2036 | Void setWPBiPred ( Bool b ) { m_useWeightedBiPred = b; } |
---|
| 2037 | Void setOutputFlagPresentFlag( Bool b ) { m_OutputFlagPresentFlag = b; } |
---|
| 2038 | Bool getOutputFlagPresentFlag() { return m_OutputFlagPresentFlag; } |
---|
| 2039 | Void setTransquantBypassEnableFlag( Bool b ) { m_TransquantBypassEnableFlag = b; } |
---|
| 2040 | Bool getTransquantBypassEnableFlag() { return m_TransquantBypassEnableFlag; } |
---|
| 2041 | |
---|
| 2042 | Bool getUseTransformSkip () { return m_useTransformSkip; } |
---|
| 2043 | Void setUseTransformSkip ( Bool b ) { m_useTransformSkip = b; } |
---|
| 2044 | |
---|
| 2045 | Void setLoopFilterAcrossTilesEnabledFlag (Bool b) { m_loopFilterAcrossTilesEnabledFlag = b; } |
---|
| 2046 | Bool getLoopFilterAcrossTilesEnabledFlag () { return m_loopFilterAcrossTilesEnabledFlag; } |
---|
| 2047 | Bool getDependentSliceSegmentsEnabledFlag() const { return m_dependentSliceSegmentsEnabledFlag; } |
---|
| 2048 | Void setDependentSliceSegmentsEnabledFlag(Bool val) { m_dependentSliceSegmentsEnabledFlag = val; } |
---|
| 2049 | Bool getEntropyCodingSyncEnabledFlag() const { return m_entropyCodingSyncEnabledFlag; } |
---|
| 2050 | Void setEntropyCodingSyncEnabledFlag(Bool val) { m_entropyCodingSyncEnabledFlag = val; } |
---|
| 2051 | |
---|
[906] | 2052 | Void setTilesEnabledFlag (Bool val) { m_tilesEnabledFlag = val; } |
---|
| 2053 | Bool getTilesEnabledFlag () const { return m_tilesEnabledFlag; } |
---|
| 2054 | Void setTileUniformSpacingFlag (Bool b) { m_uniformSpacingFlag = b; } |
---|
| 2055 | Bool getTileUniformSpacingFlag () const { return m_uniformSpacingFlag; } |
---|
| 2056 | Void setNumTileColumnsMinus1 (Int i) { m_numTileColumnsMinus1 = i; } |
---|
| 2057 | Int getNumTileColumnsMinus1 () const { return m_numTileColumnsMinus1; } |
---|
| 2058 | Void setTileColumnWidth (const std::vector<Int>& columnWidth ) { m_tileColumnWidth = columnWidth; } |
---|
| 2059 | UInt getTileColumnWidth (UInt columnIdx) const { return m_tileColumnWidth[columnIdx]; } |
---|
| 2060 | Void setNumTileRowsMinus1 (Int i) { m_numTileRowsMinus1 = i; } |
---|
| 2061 | Int getTileNumRowsMinus1 () const { return m_numTileRowsMinus1; } |
---|
| 2062 | Void setTileRowHeight (const std::vector<Int>& rowHeight) { m_tileRowHeight = rowHeight; } |
---|
| 2063 | UInt getTileRowHeight (UInt rowIdx) const { return m_tileRowHeight[rowIdx]; } |
---|
[313] | 2064 | |
---|
[906] | 2065 | Void setNumSubstreams (Int numSubstreams) { m_numSubstreams = numSubstreams; } |
---|
| 2066 | Int getNumSubstreams () { return m_numSubstreams; } |
---|
[313] | 2067 | |
---|
| 2068 | Void setSignHideFlag( Int signHideFlag ) { m_signHideFlag = signHideFlag; } |
---|
| 2069 | Int getSignHideFlag() { return m_signHideFlag; } |
---|
| 2070 | |
---|
| 2071 | Void setCabacInitPresentFlag( Bool flag ) { m_cabacInitPresentFlag = flag; } |
---|
| 2072 | Void setEncCABACTableIdx( Int idx ) { m_encCABACTableIdx = idx; } |
---|
| 2073 | Bool getCabacInitPresentFlag() { return m_cabacInitPresentFlag; } |
---|
| 2074 | UInt getEncCABACTableIdx() { return m_encCABACTableIdx; } |
---|
| 2075 | Void setDeblockingFilterControlPresentFlag( Bool val ) { m_deblockingFilterControlPresentFlag = val; } |
---|
| 2076 | Bool getDeblockingFilterControlPresentFlag() { return m_deblockingFilterControlPresentFlag; } |
---|
| 2077 | Void setDeblockingFilterOverrideEnabledFlag( Bool val ) { m_deblockingFilterOverrideEnabledFlag = val; } |
---|
| 2078 | Bool getDeblockingFilterOverrideEnabledFlag() { return m_deblockingFilterOverrideEnabledFlag; } |
---|
| 2079 | Void setPicDisableDeblockingFilterFlag(Bool val) { m_picDisableDeblockingFilterFlag = val; } //!< set offset for deblocking filter disabled |
---|
| 2080 | Bool getPicDisableDeblockingFilterFlag() { return m_picDisableDeblockingFilterFlag; } //!< get offset for deblocking filter disabled |
---|
| 2081 | Void setDeblockingFilterBetaOffsetDiv2(Int val) { m_deblockingFilterBetaOffsetDiv2 = val; } //!< set beta offset for deblocking filter |
---|
| 2082 | Int getDeblockingFilterBetaOffsetDiv2() { return m_deblockingFilterBetaOffsetDiv2; } //!< get beta offset for deblocking filter |
---|
| 2083 | Void setDeblockingFilterTcOffsetDiv2(Int val) { m_deblockingFilterTcOffsetDiv2 = val; } //!< set tc offset for deblocking filter |
---|
| 2084 | Int getDeblockingFilterTcOffsetDiv2() { return m_deblockingFilterTcOffsetDiv2; } //!< get tc offset for deblocking filter |
---|
| 2085 | Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } |
---|
| 2086 | Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } |
---|
[442] | 2087 | |
---|
[540] | 2088 | #if SCALINGLIST_INFERRING |
---|
| 2089 | Void setScalingList( TComScalingList *scalingList ) { m_scalingList = scalingList; } |
---|
| 2090 | #else |
---|
[313] | 2091 | Void setScalingList ( TComScalingList *scalingList); |
---|
[540] | 2092 | #endif |
---|
[313] | 2093 | TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in PPS |
---|
| 2094 | Bool getListsModificationPresentFlag () { return m_listsModificationPresentFlag; } |
---|
| 2095 | Void setListsModificationPresentFlag ( Bool b ) { m_listsModificationPresentFlag = b; } |
---|
| 2096 | UInt getLog2ParallelMergeLevelMinus2 () { return m_log2ParallelMergeLevelMinus2; } |
---|
| 2097 | Void setLog2ParallelMergeLevelMinus2 (UInt mrgLevel) { m_log2ParallelMergeLevelMinus2 = mrgLevel; } |
---|
| 2098 | Int getNumExtraSliceHeaderBits() { return m_numExtraSliceHeaderBits; } |
---|
| 2099 | Void setNumExtraSliceHeaderBits(Int i) { m_numExtraSliceHeaderBits = i; } |
---|
| 2100 | Void setLoopFilterAcrossSlicesEnabledFlag ( Bool bValue ) { m_loopFilterAcrossSlicesEnabledFlag = bValue; } |
---|
| 2101 | Bool getLoopFilterAcrossSlicesEnabledFlag () { return m_loopFilterAcrossSlicesEnabledFlag; } |
---|
| 2102 | Bool getSliceHeaderExtensionPresentFlag () { return m_sliceHeaderExtensionPresentFlag; } |
---|
| 2103 | Void setSliceHeaderExtensionPresentFlag (Bool val) { m_sliceHeaderExtensionPresentFlag = val; } |
---|
[815] | 2104 | #if SVC_EXTENSION |
---|
| 2105 | Int getExtensionFlag() { return m_extensionFlag; } |
---|
| 2106 | Void setExtensionFlag(Int n) { m_extensionFlag = n; } |
---|
| 2107 | #if SCALINGLIST_INFERRING |
---|
| 2108 | UInt getLayerId() { return m_layerId; } |
---|
| 2109 | Void setLayerId( UInt layerId ) { m_layerId = layerId; } |
---|
| 2110 | Bool getInferScalingListFlag() { return m_inferScalingListFlag; } |
---|
| 2111 | UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; } |
---|
| 2112 | Void setInferScalingListFlag( Bool flag ) { m_inferScalingListFlag = flag; } |
---|
| 2113 | Void setScalingListRefLayerId( UInt layerId ) { m_scalingListRefLayerId = layerId; } |
---|
| 2114 | #endif |
---|
[644] | 2115 | #if POC_RESET_IDC |
---|
| 2116 | Bool getPocResetInfoPresentFlag () { return m_pocResetInfoPresentFlag; } |
---|
| 2117 | Void setPocResetInfoPresentFlag (const Bool val) { m_pocResetInfoPresentFlag = val; } |
---|
| 2118 | #endif |
---|
[906] | 2119 | #if MOVE_SCALED_OFFSET_TO_PPS |
---|
| 2120 | UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } |
---|
| 2121 | Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } |
---|
| 2122 | #if O0098_SCALED_REF_LAYER_ID |
---|
| 2123 | UInt getScaledRefLayerId(Int x) { return m_scaledRefLayerId[x]; } |
---|
| 2124 | Void setScaledRefLayerId(Int x, UInt id) { m_scaledRefLayerId[x] = id; } |
---|
| 2125 | Window& getScaledRefLayerWindowForLayer( Int layerId ); |
---|
| 2126 | #endif |
---|
| 2127 | Window& getScaledRefLayerWindow( Int x ) { return m_scaledRefLayerWindow[x]; } |
---|
| 2128 | #if REF_REGION_OFFSET |
---|
| 2129 | Window& getRefLayerWindowForLayer( Int layerId ); |
---|
| 2130 | Window& getRefLayerWindow( Int x ) { return m_refLayerWindow[x]; } |
---|
| 2131 | Bool getScaledRefLayerOffsetPresentFlag(Int x) { return m_scaledRefLayerOffsetPresentFlag[x]; } |
---|
| 2132 | Void setScaledRefLayerOffsetPresentFlag(Int x, Bool b) { m_scaledRefLayerOffsetPresentFlag[x] = b; } |
---|
| 2133 | Bool getRefRegionOffsetPresentFlag(Int x) { return m_refRegionOffsetPresentFlag[x]; } |
---|
| 2134 | Void setRefRegionOffsetPresentFlag(Int x, Bool b) { m_refRegionOffsetPresentFlag[x] = b; } |
---|
| 2135 | #endif |
---|
| 2136 | #if R0209_GENERIC_PHASE |
---|
| 2137 | Int getPhaseHorLuma(Int x) { return m_phaseHorLuma[x]; } |
---|
| 2138 | Int getPhaseVerLuma(Int x) { return m_phaseVerLuma[x]; } |
---|
| 2139 | Int getPhaseHorChroma(Int x) { return m_phaseHorChroma[x]; } |
---|
| 2140 | Int getPhaseVerChroma(Int x) { return m_phaseVerChroma[x]; } |
---|
| 2141 | Void setPhaseHorLuma(Int x, Int val) { m_phaseHorLuma[x] = val; } |
---|
| 2142 | Void setPhaseVerLuma(Int x, Int val) { m_phaseVerLuma[x] = val; } |
---|
| 2143 | Void setPhaseHorChroma(Int x, Int val) { m_phaseHorChroma[x] = val; } |
---|
| 2144 | Void setPhaseVerChroma(Int x, Int val) { m_phaseVerChroma[x] = val; } |
---|
| 2145 | Bool getResamplePhaseSetPresentFlag(Int x) { return m_resamplePhaseSetPresentFlag[x]; } |
---|
| 2146 | Void setResamplePhaseSetPresentFlag(Int x, Bool b) { m_resamplePhaseSetPresentFlag[x] = b; } |
---|
| 2147 | #if RESAMPLING_FIX |
---|
| 2148 | Bool hasZeroResamplingPhase(Int layerId); |
---|
| 2149 | #endif |
---|
| 2150 | #endif |
---|
| 2151 | #endif |
---|
[713] | 2152 | #if Q0048_CGS_3D_ASYMLUT |
---|
| 2153 | Int getCGSFlag() { return m_nCGSFlag; } |
---|
| 2154 | Void setCGSFlag(Int n) { m_nCGSFlag = n; } |
---|
| 2155 | Int getCGSOutputBitDepthY() { return m_nCGSOutputBitDepthY; } |
---|
| 2156 | Void setCGSOutputBitDepthY(Int n){ m_nCGSOutputBitDepthY = n; } |
---|
| 2157 | Int getCGSOutputBitDepthC() { return m_nCGSOutputBitDepthC; } |
---|
| 2158 | Void setCGSOutputBitDepthC(Int n){ m_nCGSOutputBitDepthC = n; } |
---|
| 2159 | #endif |
---|
[815] | 2160 | #endif //SVC_EXTENSION |
---|
[313] | 2161 | }; |
---|
| 2162 | |
---|
| 2163 | typedef struct |
---|
| 2164 | { |
---|
| 2165 | // Explicit weighted prediction parameters parsed in slice header, |
---|
| 2166 | // or Implicit weighted prediction parameters (8 bits depth values). |
---|
| 2167 | Bool bPresentFlag; |
---|
| 2168 | UInt uiLog2WeightDenom; |
---|
| 2169 | Int iWeight; |
---|
| 2170 | Int iOffset; |
---|
| 2171 | |
---|
| 2172 | // Weighted prediction scaling values built from above parameters (bitdepth scaled): |
---|
| 2173 | Int w, o, offset, shift, round; |
---|
| 2174 | } wpScalingParam; |
---|
| 2175 | |
---|
| 2176 | typedef struct |
---|
| 2177 | { |
---|
| 2178 | Int64 iAC; |
---|
| 2179 | Int64 iDC; |
---|
[494] | 2180 | #if O0194_WEIGHTED_PREDICTION_CGS |
---|
| 2181 | Int iSamples; |
---|
| 2182 | #endif |
---|
[313] | 2183 | } wpACDCParam; |
---|
| 2184 | |
---|
| 2185 | /// slice header class |
---|
| 2186 | class TComSlice |
---|
| 2187 | { |
---|
| 2188 | |
---|
| 2189 | private: |
---|
| 2190 | // Bitstream writing |
---|
| 2191 | Bool m_saoEnabledFlag; |
---|
| 2192 | Bool m_saoEnabledFlagChroma; ///< SAO Cb&Cr enabled flag |
---|
| 2193 | Int m_iPPSId; ///< picture parameter set ID |
---|
| 2194 | Bool m_PicOutputFlag; ///< pic_output_flag |
---|
| 2195 | Int m_iPOC; |
---|
| 2196 | Int m_iLastIDR; |
---|
[442] | 2197 | Int m_iAssociatedIRAP; |
---|
[815] | 2198 | #if POC_RESET_IDC_ENCODER |
---|
| 2199 | Int m_associatedIrapPocBeforeReset; |
---|
| 2200 | #endif |
---|
[442] | 2201 | NalUnitType m_iAssociatedIRAPType; |
---|
| 2202 | static Int m_prevTid0POC; |
---|
[313] | 2203 | TComReferencePictureSet *m_pcRPS; |
---|
| 2204 | TComReferencePictureSet m_LocalRPS; |
---|
| 2205 | Int m_iBDidx; |
---|
| 2206 | TComRefPicListModification m_RefPicListModification; |
---|
| 2207 | NalUnitType m_eNalUnitType; ///< Nal unit type for the slice |
---|
| 2208 | SliceType m_eSliceType; |
---|
| 2209 | Int m_iSliceQp; |
---|
| 2210 | Bool m_dependentSliceSegmentFlag; |
---|
| 2211 | #if ADAPTIVE_QP_SELECTION |
---|
| 2212 | Int m_iSliceQpBase; |
---|
| 2213 | #endif |
---|
| 2214 | Bool m_deblockingFilterDisable; |
---|
| 2215 | Bool m_deblockingFilterOverrideFlag; //< offsets for deblocking filter inherit from PPS |
---|
| 2216 | Int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
| 2217 | Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
| 2218 | Int m_list1IdxToList0Idx[MAX_NUM_REF]; |
---|
| 2219 | Int m_aiNumRefIdx [2]; // for multiple reference of current slice |
---|
| 2220 | |
---|
| 2221 | Bool m_bCheckLDC; |
---|
| 2222 | |
---|
| 2223 | // Data |
---|
| 2224 | Int m_iSliceQpDelta; |
---|
| 2225 | Int m_iSliceQpDeltaCb; |
---|
| 2226 | Int m_iSliceQpDeltaCr; |
---|
| 2227 | TComPic* m_apcRefPicList [2][MAX_NUM_REF+1]; |
---|
| 2228 | Int m_aiRefPOCList [2][MAX_NUM_REF+1]; |
---|
| 2229 | Bool m_bIsUsedAsLongTerm[2][MAX_NUM_REF+1]; |
---|
| 2230 | Int m_iDepth; |
---|
| 2231 | |
---|
| 2232 | // referenced slice? |
---|
| 2233 | Bool m_bRefenced; |
---|
[494] | 2234 | |
---|
[313] | 2235 | // access channel |
---|
| 2236 | TComVPS* m_pcVPS; |
---|
| 2237 | TComSPS* m_pcSPS; |
---|
| 2238 | TComPPS* m_pcPPS; |
---|
| 2239 | TComPic* m_pcPic; |
---|
| 2240 | #if ADAPTIVE_QP_SELECTION |
---|
| 2241 | TComTrQuant* m_pcTrQuant; |
---|
| 2242 | #endif |
---|
| 2243 | UInt m_colFromL0Flag; // collocated picture from List0 flag |
---|
| 2244 | |
---|
[713] | 2245 | #if SETTING_NO_OUT_PIC_PRIOR |
---|
| 2246 | Bool m_noOutputPriorPicsFlag; |
---|
| 2247 | Bool m_noRaslOutputFlag; |
---|
| 2248 | Bool m_handleCraAsBlaFlag; |
---|
| 2249 | #endif |
---|
| 2250 | |
---|
[313] | 2251 | UInt m_colRefIdx; |
---|
| 2252 | UInt m_maxNumMergeCand; |
---|
| 2253 | |
---|
[540] | 2254 | Double m_lambdas[3]; |
---|
[313] | 2255 | |
---|
| 2256 | Bool m_abEqualRef [2][MAX_NUM_REF][MAX_NUM_REF]; |
---|
| 2257 | UInt m_uiTLayer; |
---|
| 2258 | Bool m_bTLayerSwitchingFlag; |
---|
| 2259 | |
---|
| 2260 | UInt m_sliceMode; |
---|
| 2261 | UInt m_sliceArgument; |
---|
| 2262 | UInt m_sliceCurStartCUAddr; |
---|
| 2263 | UInt m_sliceCurEndCUAddr; |
---|
| 2264 | UInt m_sliceIdx; |
---|
| 2265 | UInt m_sliceSegmentMode; |
---|
| 2266 | UInt m_sliceSegmentArgument; |
---|
| 2267 | UInt m_sliceSegmentCurStartCUAddr; |
---|
| 2268 | UInt m_sliceSegmentCurEndCUAddr; |
---|
| 2269 | Bool m_nextSlice; |
---|
| 2270 | Bool m_nextSliceSegment; |
---|
| 2271 | UInt m_sliceBits; |
---|
| 2272 | UInt m_sliceSegmentBits; |
---|
| 2273 | Bool m_bFinalized; |
---|
| 2274 | |
---|
| 2275 | wpScalingParam m_weightPredTable[2][MAX_NUM_REF][3]; // [REF_PIC_LIST_0 or REF_PIC_LIST_1][refIdx][0:Y, 1:U, 2:V] |
---|
| 2276 | wpACDCParam m_weightACDCParam[3]; // [0:Y, 1:U, 2:V] |
---|
| 2277 | |
---|
| 2278 | std::vector<UInt> m_tileByteLocation; |
---|
| 2279 | UInt m_uiTileOffstForMultES; |
---|
| 2280 | |
---|
| 2281 | UInt* m_puiSubstreamSizes; |
---|
| 2282 | TComScalingList* m_scalingList; //!< pointer of quantization matrix |
---|
| 2283 | Bool m_cabacInitFlag; |
---|
| 2284 | |
---|
| 2285 | Bool m_bLMvdL1Zero; |
---|
| 2286 | Int m_numEntryPointOffsets; |
---|
| 2287 | Bool m_temporalLayerNonReferenceFlag; |
---|
| 2288 | Bool m_LFCrossSliceBoundaryFlag; |
---|
| 2289 | |
---|
| 2290 | Bool m_enableTMVPFlag; |
---|
[906] | 2291 | #if R0226_SLICE_TMVP |
---|
| 2292 | Bool m_availableForTMVPRefFlag; |
---|
| 2293 | #endif |
---|
[494] | 2294 | |
---|
| 2295 | #if SVC_EXTENSION |
---|
| 2296 | UInt m_layerId; |
---|
| 2297 | TComPic* m_pcBaseColPic[MAX_LAYERS]; |
---|
| 2298 | TComPicYuv* m_pcFullPelBaseRec[MAX_LAYERS]; |
---|
| 2299 | Int m_numMotionPredRefLayers; |
---|
| 2300 | #if REF_IDX_MFM |
---|
| 2301 | Bool m_bMFMEnabledFlag; |
---|
| 2302 | Int m_colRefLayerIdx; |
---|
| 2303 | Bool m_altColIndicationFlag; |
---|
| 2304 | TComPic* m_pcIlpPic; |
---|
| 2305 | #endif |
---|
| 2306 | |
---|
| 2307 | Bool m_interLayerPredEnabledFlag; |
---|
| 2308 | Int m_activeNumILRRefIdx; //< Active inter-layer reference pictures |
---|
| 2309 | Int m_interLayerPredLayerIdc [MAX_VPS_LAYER_ID_PLUS1]; |
---|
[644] | 2310 | #if P0312_VERT_PHASE_ADJ |
---|
| 2311 | Bool m_vertPhasePositionFlag[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 2312 | #endif |
---|
[494] | 2313 | #if POC_RESET_FLAG |
---|
| 2314 | Bool m_bPocResetFlag; |
---|
| 2315 | Int m_pocValueBeforeReset; |
---|
| 2316 | #endif |
---|
| 2317 | Bool m_bDiscardableFlag; |
---|
[540] | 2318 | #if O0149_CROSS_LAYER_BLA_FLAG |
---|
| 2319 | Bool m_bCrossLayerBLAFlag; |
---|
| 2320 | #endif |
---|
[644] | 2321 | #if POC_RESET_IDC_SIGNALLING |
---|
| 2322 | Int m_pocResetIdc; |
---|
| 2323 | Int m_pocResetPeriodId; |
---|
| 2324 | Bool m_fullPocResetFlag; |
---|
| 2325 | Int m_pocLsbVal; |
---|
| 2326 | Int m_pocMsbVal; |
---|
| 2327 | Bool m_pocMsbValRequiredFlag; |
---|
| 2328 | Bool m_pocMsbValPresentFlag; |
---|
[906] | 2329 | #if P0297_VPS_POC_LSB_ALIGNED_FLAG |
---|
| 2330 | Bool m_pocMsbValNeeded; |
---|
| 2331 | Int m_pocResetDeltaPoc; |
---|
[644] | 2332 | #endif |
---|
[906] | 2333 | #endif |
---|
[815] | 2334 | #if POC_RESET_IDC_ENCODER |
---|
| 2335 | Int m_pocValueBeforeReset; |
---|
| 2336 | #endif |
---|
| 2337 | #if POC_RESET_IDC_DECODER || POC_RESET_IDC_ENCODER |
---|
| 2338 | Int m_picOrderCntLsb; |
---|
| 2339 | #endif |
---|
[713] | 2340 | #if Q0048_CGS_3D_ASYMLUT |
---|
| 2341 | Int m_nCGSOverWritePPS; // for optimization, not output to bitstream |
---|
| 2342 | #endif |
---|
[494] | 2343 | #endif //SVC_EXTENSION |
---|
| 2344 | |
---|
[313] | 2345 | public: |
---|
| 2346 | TComSlice(); |
---|
| 2347 | virtual ~TComSlice(); |
---|
| 2348 | #if SVC_EXTENSION |
---|
| 2349 | Void initSlice ( UInt layerId ); |
---|
| 2350 | #else |
---|
| 2351 | Void initSlice (); |
---|
| 2352 | #endif |
---|
| 2353 | |
---|
| 2354 | Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } |
---|
| 2355 | TComVPS* getVPS () { return m_pcVPS; } |
---|
| 2356 | Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
| 2357 | TComSPS* getSPS () { return m_pcSPS; } |
---|
| 2358 | |
---|
| 2359 | Void setPPS ( TComPPS* pcPPS ) { assert(pcPPS!=NULL); m_pcPPS = pcPPS; m_iPPSId = pcPPS->getPPSId(); } |
---|
| 2360 | TComPPS* getPPS () { return m_pcPPS; } |
---|
| 2361 | |
---|
| 2362 | #if ADAPTIVE_QP_SELECTION |
---|
| 2363 | Void setTrQuant ( TComTrQuant* pcTrQuant ) { m_pcTrQuant = pcTrQuant; } |
---|
| 2364 | TComTrQuant* getTrQuant () { return m_pcTrQuant; } |
---|
| 2365 | #endif |
---|
| 2366 | |
---|
| 2367 | Void setPPSId ( Int PPSId ) { m_iPPSId = PPSId; } |
---|
| 2368 | Int getPPSId () { return m_iPPSId; } |
---|
| 2369 | Void setPicOutputFlag( Bool b ) { m_PicOutputFlag = b; } |
---|
| 2370 | Bool getPicOutputFlag() { return m_PicOutputFlag; } |
---|
| 2371 | Void setSaoEnabledFlag(Bool s) {m_saoEnabledFlag =s; } |
---|
| 2372 | Bool getSaoEnabledFlag() { return m_saoEnabledFlag; } |
---|
| 2373 | Void setSaoEnabledFlagChroma(Bool s) {m_saoEnabledFlagChroma =s; } //!< set SAO Cb&Cr enabled flag |
---|
| 2374 | Bool getSaoEnabledFlagChroma() { return m_saoEnabledFlagChroma; } //!< get SAO Cb&Cr enabled flag |
---|
| 2375 | Void setRPS ( TComReferencePictureSet *pcRPS ) { m_pcRPS = pcRPS; } |
---|
| 2376 | TComReferencePictureSet* getRPS () { return m_pcRPS; } |
---|
| 2377 | TComReferencePictureSet* getLocalRPS () { return &m_LocalRPS; } |
---|
| 2378 | |
---|
| 2379 | Void setRPSidx ( Int iBDidx ) { m_iBDidx = iBDidx; } |
---|
| 2380 | Int getRPSidx () { return m_iBDidx; } |
---|
[442] | 2381 | Int getPrevTid0POC () { return m_prevTid0POC; } |
---|
[540] | 2382 | #if PREVTID0_POC_RESET |
---|
| 2383 | Void adjustPrevTid0POC (Int adj) { m_prevTid0POC=m_prevTid0POC-adj; } |
---|
| 2384 | #endif |
---|
[815] | 2385 | #if POC_RESET_IDC_DECODER |
---|
| 2386 | Void setPrevTid0POC( Int x ) { m_prevTid0POC = x; } |
---|
| 2387 | #endif |
---|
| 2388 | |
---|
[313] | 2389 | TComRefPicListModification* getRefPicListModification() { return &m_RefPicListModification; } |
---|
| 2390 | Void setLastIDR(Int iIDRPOC) { m_iLastIDR = iIDRPOC; } |
---|
| 2391 | Int getLastIDR() { return m_iLastIDR; } |
---|
[442] | 2392 | Void setAssociatedIRAPPOC(Int iAssociatedIRAPPOC) { m_iAssociatedIRAP = iAssociatedIRAPPOC; } |
---|
| 2393 | Int getAssociatedIRAPPOC() { return m_iAssociatedIRAP; } |
---|
[815] | 2394 | #if POC_RESET_IDC_ENCODER |
---|
| 2395 | Void setAssociatedIrapPocBeforeReset(Int x) { m_associatedIrapPocBeforeReset = x; } |
---|
| 2396 | Int getAssociatedIrapPocBeforeReset( ) { return m_associatedIrapPocBeforeReset; } |
---|
| 2397 | #endif |
---|
| 2398 | |
---|
[442] | 2399 | Void setAssociatedIRAPType(NalUnitType associatedIRAPType) { m_iAssociatedIRAPType = associatedIRAPType; } |
---|
| 2400 | NalUnitType getAssociatedIRAPType() { return m_iAssociatedIRAPType; } |
---|
[313] | 2401 | SliceType getSliceType () { return m_eSliceType; } |
---|
| 2402 | Int getPOC () { return m_iPOC; } |
---|
| 2403 | Int getSliceQp () { return m_iSliceQp; } |
---|
| 2404 | Bool getDependentSliceSegmentFlag() const { return m_dependentSliceSegmentFlag; } |
---|
| 2405 | void setDependentSliceSegmentFlag(Bool val) { m_dependentSliceSegmentFlag = val; } |
---|
| 2406 | #if ADAPTIVE_QP_SELECTION |
---|
| 2407 | Int getSliceQpBase () { return m_iSliceQpBase; } |
---|
| 2408 | #endif |
---|
| 2409 | Int getSliceQpDelta () { return m_iSliceQpDelta; } |
---|
| 2410 | Int getSliceQpDeltaCb () { return m_iSliceQpDeltaCb; } |
---|
| 2411 | Int getSliceQpDeltaCr () { return m_iSliceQpDeltaCr; } |
---|
| 2412 | Bool getDeblockingFilterDisable() { return m_deblockingFilterDisable; } |
---|
| 2413 | Bool getDeblockingFilterOverrideFlag() { return m_deblockingFilterOverrideFlag; } |
---|
| 2414 | Int getDeblockingFilterBetaOffsetDiv2() { return m_deblockingFilterBetaOffsetDiv2; } |
---|
| 2415 | Int getDeblockingFilterTcOffsetDiv2() { return m_deblockingFilterTcOffsetDiv2; } |
---|
| 2416 | |
---|
| 2417 | Int getNumRefIdx ( RefPicList e ) { return m_aiNumRefIdx[e]; } |
---|
| 2418 | TComPic* getPic () { return m_pcPic; } |
---|
| 2419 | TComPic* getRefPic ( RefPicList e, Int iRefIdx) { return m_apcRefPicList[e][iRefIdx]; } |
---|
| 2420 | Int getRefPOC ( RefPicList e, Int iRefIdx) { return m_aiRefPOCList[e][iRefIdx]; } |
---|
| 2421 | Int getDepth () { return m_iDepth; } |
---|
| 2422 | UInt getColFromL0Flag () { return m_colFromL0Flag; } |
---|
| 2423 | UInt getColRefIdx () { return m_colRefIdx; } |
---|
| 2424 | Void checkColRefIdx (UInt curSliceIdx, TComPic* pic); |
---|
| 2425 | Bool getIsUsedAsLongTerm (Int i, Int j) { return m_bIsUsedAsLongTerm[i][j]; } |
---|
[442] | 2426 | Void setIsUsedAsLongTerm (Int i, Int j, Bool value) { m_bIsUsedAsLongTerm[i][j] = value; } |
---|
[313] | 2427 | Bool getCheckLDC () { return m_bCheckLDC; } |
---|
| 2428 | Bool getMvdL1ZeroFlag () { return m_bLMvdL1Zero; } |
---|
| 2429 | Int getNumRpsCurrTempList(); |
---|
| 2430 | Int getList1IdxToList0Idx ( Int list1Idx ) { return m_list1IdxToList0Idx[list1Idx]; } |
---|
| 2431 | Void setReferenced(Bool b) { m_bRefenced = b; } |
---|
| 2432 | Bool isReferenced() { return m_bRefenced; } |
---|
[442] | 2433 | 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) ); } |
---|
| 2434 | 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] | 2435 | Void setNalUnitType ( NalUnitType e ) { m_eNalUnitType = e; } |
---|
| 2436 | NalUnitType getNalUnitType () const { return m_eNalUnitType; } |
---|
| 2437 | Bool getRapPicFlag (); |
---|
| 2438 | Bool getIdrPicFlag () { return getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP; } |
---|
| 2439 | Bool isIRAP () const { return (getNalUnitType() >= 16) && (getNalUnitType() <= 23); } |
---|
[442] | 2440 | Void checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, NalUnitType& associatedIRAPType, TComList<TComPic *>& rcListPic); |
---|
[540] | 2441 | #if NO_CLRAS_OUTPUT_FLAG |
---|
[713] | 2442 | Void decodingRefreshMarking( TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag ); |
---|
[540] | 2443 | Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag); |
---|
| 2444 | #else |
---|
[313] | 2445 | Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic); |
---|
[540] | 2446 | #endif |
---|
[313] | 2447 | Void setSliceType ( SliceType e ) { m_eSliceType = e; } |
---|
| 2448 | Void setSliceQp ( Int i ) { m_iSliceQp = i; } |
---|
| 2449 | #if ADAPTIVE_QP_SELECTION |
---|
| 2450 | Void setSliceQpBase ( Int i ) { m_iSliceQpBase = i; } |
---|
| 2451 | #endif |
---|
| 2452 | Void setSliceQpDelta ( Int i ) { m_iSliceQpDelta = i; } |
---|
| 2453 | Void setSliceQpDeltaCb ( Int i ) { m_iSliceQpDeltaCb = i; } |
---|
| 2454 | Void setSliceQpDeltaCr ( Int i ) { m_iSliceQpDeltaCr = i; } |
---|
| 2455 | Void setDeblockingFilterDisable( Bool b ) { m_deblockingFilterDisable= b; } |
---|
| 2456 | Void setDeblockingFilterOverrideFlag( Bool b ) { m_deblockingFilterOverrideFlag = b; } |
---|
| 2457 | Void setDeblockingFilterBetaOffsetDiv2( Int i ) { m_deblockingFilterBetaOffsetDiv2 = i; } |
---|
| 2458 | Void setDeblockingFilterTcOffsetDiv2( Int i ) { m_deblockingFilterTcOffsetDiv2 = i; } |
---|
| 2459 | |
---|
| 2460 | Void setRefPic ( TComPic* p, RefPicList e, Int iRefIdx ) { m_apcRefPicList[e][iRefIdx] = p; } |
---|
| 2461 | Void setRefPOC ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefPOCList[e][iRefIdx] = i; } |
---|
| 2462 | Void setNumRefIdx ( RefPicList e, Int i ) { m_aiNumRefIdx[e] = i; } |
---|
| 2463 | Void setPic ( TComPic* p ) { m_pcPic = p; } |
---|
| 2464 | Void setDepth ( Int iDepth ) { m_iDepth = iDepth; } |
---|
| 2465 | |
---|
| 2466 | #if SVC_EXTENSION |
---|
| 2467 | Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false, TComPic** ilpPic = NULL ); |
---|
[713] | 2468 | #if Q0048_CGS_3D_ASYMLUT |
---|
| 2469 | Int getCGSOverWritePPS() { return m_nCGSOverWritePPS; } |
---|
| 2470 | Void setCGSOverWritePPS(Int n) { m_nCGSOverWritePPS = n; } |
---|
| 2471 | #endif |
---|
[313] | 2472 | #else |
---|
| 2473 | Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false ); |
---|
| 2474 | #endif |
---|
| 2475 | Void setRefPOCList (); |
---|
| 2476 | Void setColFromL0Flag ( UInt colFromL0 ) { m_colFromL0Flag = colFromL0; } |
---|
| 2477 | Void setColRefIdx ( UInt refIdx) { m_colRefIdx = refIdx; } |
---|
| 2478 | Void setCheckLDC ( Bool b ) { m_bCheckLDC = b; } |
---|
| 2479 | Void setMvdL1ZeroFlag ( Bool b) { m_bLMvdL1Zero = b; } |
---|
| 2480 | |
---|
| 2481 | Bool isIntra () { return m_eSliceType == I_SLICE; } |
---|
| 2482 | Bool isInterB () { return m_eSliceType == B_SLICE; } |
---|
| 2483 | Bool isInterP () { return m_eSliceType == P_SLICE; } |
---|
| 2484 | |
---|
[540] | 2485 | Void setLambdas ( const Double lambdas[3] ) { for (Int component = 0; component < 3; component++) m_lambdas[component] = lambdas[component]; } |
---|
| 2486 | const Double* getLambdas() const { return m_lambdas; } |
---|
[313] | 2487 | |
---|
| 2488 | Void initEqualRef(); |
---|
| 2489 | Bool isEqualRef ( RefPicList e, Int iRefIdx1, Int iRefIdx2 ) |
---|
| 2490 | { |
---|
| 2491 | if (iRefIdx1 < 0 || iRefIdx2 < 0) return false; |
---|
| 2492 | return m_abEqualRef[e][iRefIdx1][iRefIdx2]; |
---|
| 2493 | } |
---|
| 2494 | |
---|
| 2495 | Void setEqualRef( RefPicList e, Int iRefIdx1, Int iRefIdx2, Bool b) |
---|
| 2496 | { |
---|
| 2497 | m_abEqualRef[e][iRefIdx1][iRefIdx2] = m_abEqualRef[e][iRefIdx2][iRefIdx1] = b; |
---|
| 2498 | } |
---|
| 2499 | |
---|
| 2500 | static Void sortPicList ( TComList<TComPic*>& rcListPic ); |
---|
| 2501 | Void setList1IdxToList0Idx(); |
---|
| 2502 | |
---|
| 2503 | UInt getTLayer () { return m_uiTLayer; } |
---|
| 2504 | Void setTLayer ( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } |
---|
| 2505 | |
---|
| 2506 | Void setTLayerInfo( UInt uiTLayer ); |
---|
| 2507 | Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum ); |
---|
[815] | 2508 | #if POC_RESET_IDC_ENCODER |
---|
| 2509 | Void checkLeadingPictureRestrictions(TComList<TComPic*>& rcListPic, Bool usePocBeforeReset = false); |
---|
| 2510 | #else |
---|
[442] | 2511 | Void checkLeadingPictureRestrictions( TComList<TComPic*>& rcListPic ); |
---|
[815] | 2512 | #endif |
---|
[313] | 2513 | Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList); |
---|
| 2514 | Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); |
---|
| 2515 | Bool isStepwiseTemporalLayerSwitchingPointCandidate( TComList<TComPic*>& rcListPic ); |
---|
[713] | 2516 | #if ALLOW_RECOVERY_POINT_AS_RAP |
---|
| 2517 | Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0, Bool bUseRecoveryPoint = false); |
---|
| 2518 | Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess = 0, Bool bUseRecoveryPoint = false); |
---|
| 2519 | #else |
---|
| 2520 | Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0); |
---|
| 2521 | Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP); |
---|
| 2522 | #endif |
---|
[313] | 2523 | |
---|
| 2524 | Void setMaxNumMergeCand (UInt val ) { m_maxNumMergeCand = val; } |
---|
| 2525 | UInt getMaxNumMergeCand () { return m_maxNumMergeCand; } |
---|
| 2526 | |
---|
[713] | 2527 | #if SETTING_NO_OUT_PIC_PRIOR |
---|
| 2528 | Void setNoOutputPriorPicsFlag ( Bool val ) { m_noOutputPriorPicsFlag = val; } |
---|
| 2529 | Bool getNoOutputPriorPicsFlag () { return m_noOutputPriorPicsFlag; } |
---|
| 2530 | |
---|
| 2531 | Void setNoRaslOutputFlag ( Bool val ) { m_noRaslOutputFlag = val; } |
---|
| 2532 | Bool getNoRaslOutputFlag () { return m_noRaslOutputFlag; } |
---|
| 2533 | |
---|
| 2534 | Void setHandleCraAsBlaFlag ( Bool val ) { m_handleCraAsBlaFlag = val; } |
---|
| 2535 | Bool getHandleCraAsBlaFlag () { return m_handleCraAsBlaFlag; } |
---|
| 2536 | #endif |
---|
| 2537 | |
---|
[313] | 2538 | Void setSliceMode ( UInt uiMode ) { m_sliceMode = uiMode; } |
---|
| 2539 | UInt getSliceMode () { return m_sliceMode; } |
---|
| 2540 | Void setSliceArgument ( UInt uiArgument ) { m_sliceArgument = uiArgument; } |
---|
| 2541 | UInt getSliceArgument () { return m_sliceArgument; } |
---|
| 2542 | Void setSliceCurStartCUAddr ( UInt uiAddr ) { m_sliceCurStartCUAddr = uiAddr; } |
---|
| 2543 | UInt getSliceCurStartCUAddr () { return m_sliceCurStartCUAddr; } |
---|
| 2544 | Void setSliceCurEndCUAddr ( UInt uiAddr ) { m_sliceCurEndCUAddr = uiAddr; } |
---|
| 2545 | UInt getSliceCurEndCUAddr () { return m_sliceCurEndCUAddr; } |
---|
| 2546 | Void setSliceIdx ( UInt i) { m_sliceIdx = i; } |
---|
| 2547 | UInt getSliceIdx () { return m_sliceIdx; } |
---|
| 2548 | Void copySliceInfo (TComSlice *pcSliceSrc); |
---|
| 2549 | Void setSliceSegmentMode ( UInt uiMode ) { m_sliceSegmentMode = uiMode; } |
---|
| 2550 | UInt getSliceSegmentMode () { return m_sliceSegmentMode; } |
---|
| 2551 | Void setSliceSegmentArgument ( UInt uiArgument ) { m_sliceSegmentArgument = uiArgument; } |
---|
| 2552 | UInt getSliceSegmentArgument () { return m_sliceSegmentArgument; } |
---|
| 2553 | Void setSliceSegmentCurStartCUAddr ( UInt uiAddr ) { m_sliceSegmentCurStartCUAddr = uiAddr; } |
---|
| 2554 | UInt getSliceSegmentCurStartCUAddr () { return m_sliceSegmentCurStartCUAddr; } |
---|
| 2555 | Void setSliceSegmentCurEndCUAddr ( UInt uiAddr ) { m_sliceSegmentCurEndCUAddr = uiAddr; } |
---|
| 2556 | UInt getSliceSegmentCurEndCUAddr () { return m_sliceSegmentCurEndCUAddr; } |
---|
| 2557 | Void setNextSlice ( Bool b ) { m_nextSlice = b; } |
---|
| 2558 | Bool isNextSlice () { return m_nextSlice; } |
---|
| 2559 | Void setNextSliceSegment ( Bool b ) { m_nextSliceSegment = b; } |
---|
| 2560 | Bool isNextSliceSegment () { return m_nextSliceSegment; } |
---|
| 2561 | Void setSliceBits ( UInt uiVal ) { m_sliceBits = uiVal; } |
---|
| 2562 | UInt getSliceBits () { return m_sliceBits; } |
---|
| 2563 | Void setSliceSegmentBits ( UInt uiVal ) { m_sliceSegmentBits = uiVal; } |
---|
| 2564 | UInt getSliceSegmentBits () { return m_sliceSegmentBits; } |
---|
| 2565 | Void setFinalized ( Bool uiVal ) { m_bFinalized = uiVal; } |
---|
| 2566 | Bool getFinalized () { return m_bFinalized; } |
---|
| 2567 | Void setWpScaling ( wpScalingParam wp[2][MAX_NUM_REF][3] ) { memcpy(m_weightPredTable, wp, sizeof(wpScalingParam)*2*MAX_NUM_REF*3); } |
---|
| 2568 | Void getWpScaling ( RefPicList e, Int iRefIdx, wpScalingParam *&wp); |
---|
| 2569 | |
---|
| 2570 | Void resetWpScaling (); |
---|
| 2571 | Void initWpScaling (); |
---|
| 2572 | inline Bool applyWP () { return( (m_eSliceType==P_SLICE && m_pcPPS->getUseWP()) || (m_eSliceType==B_SLICE && m_pcPPS->getWPBiPred()) ); } |
---|
| 2573 | |
---|
| 2574 | Void setWpAcDcParam ( wpACDCParam wp[3] ) { memcpy(m_weightACDCParam, wp, sizeof(wpACDCParam)*3); } |
---|
| 2575 | Void getWpAcDcParam ( wpACDCParam *&wp ); |
---|
| 2576 | Void initWpAcDcParam (); |
---|
| 2577 | |
---|
| 2578 | Void setTileLocationCount ( UInt cnt ) { return m_tileByteLocation.resize(cnt); } |
---|
| 2579 | UInt getTileLocationCount () { return (UInt) m_tileByteLocation.size(); } |
---|
| 2580 | Void setTileLocation ( Int idx, UInt location ) { assert (idx<m_tileByteLocation.size()); |
---|
| 2581 | m_tileByteLocation[idx] = location; } |
---|
| 2582 | Void addTileLocation ( UInt location ) { m_tileByteLocation.push_back(location); } |
---|
| 2583 | UInt getTileLocation ( Int idx ) { return m_tileByteLocation[idx]; } |
---|
| 2584 | |
---|
| 2585 | Void setTileOffstForMultES (UInt uiOffset ) { m_uiTileOffstForMultES = uiOffset; } |
---|
| 2586 | UInt getTileOffstForMultES () { return m_uiTileOffstForMultES; } |
---|
| 2587 | Void allocSubstreamSizes ( UInt uiNumSubstreams ); |
---|
| 2588 | UInt* getSubstreamSizes () { return m_puiSubstreamSizes; } |
---|
| 2589 | Void setScalingList ( TComScalingList* scalingList ) { m_scalingList = scalingList; } |
---|
| 2590 | TComScalingList* getScalingList () { return m_scalingList; } |
---|
| 2591 | Void setDefaultScalingList (); |
---|
| 2592 | Bool checkDefaultScalingList (); |
---|
| 2593 | Void setCabacInitFlag ( Bool val ) { m_cabacInitFlag = val; } //!< set CABAC initial flag |
---|
| 2594 | Bool getCabacInitFlag () { return m_cabacInitFlag; } //!< get CABAC initial flag |
---|
| 2595 | Void setNumEntryPointOffsets(Int val) { m_numEntryPointOffsets = val; } |
---|
| 2596 | Int getNumEntryPointOffsets() { return m_numEntryPointOffsets; } |
---|
| 2597 | Bool getTemporalLayerNonReferenceFlag() { return m_temporalLayerNonReferenceFlag;} |
---|
| 2598 | Void setTemporalLayerNonReferenceFlag(Bool x) { m_temporalLayerNonReferenceFlag = x;} |
---|
| 2599 | Void setLFCrossSliceBoundaryFlag ( Bool val ) { m_LFCrossSliceBoundaryFlag = val; } |
---|
| 2600 | Bool getLFCrossSliceBoundaryFlag () { return m_LFCrossSliceBoundaryFlag;} |
---|
| 2601 | |
---|
| 2602 | Void setEnableTMVPFlag ( Bool b ) { m_enableTMVPFlag = b; } |
---|
| 2603 | Bool getEnableTMVPFlag () { return m_enableTMVPFlag;} |
---|
| 2604 | |
---|
[906] | 2605 | #if R0226_SLICE_TMVP |
---|
| 2606 | Void setAvailableForTMVPRefFlag ( Bool b ) { m_availableForTMVPRefFlag = b; } |
---|
| 2607 | Bool getAvailableForTMVPRefFlag () { return m_availableForTMVPRefFlag;} |
---|
| 2608 | #endif |
---|
| 2609 | |
---|
[313] | 2610 | #if SVC_EXTENSION |
---|
[540] | 2611 | Bool setBaseColPic ( TComList<TComPic*>& rcListPic , UInt refLayerIdc ); |
---|
[313] | 2612 | Void setBaseColPic (UInt refLayerIdc, TComPic* p) { m_pcBaseColPic[refLayerIdc] = p; } |
---|
| 2613 | TComPic* getBaseColPic (UInt refLayerIdc) { return m_pcBaseColPic[refLayerIdc]; } |
---|
| 2614 | TComPic** getBaseColPic () { return &m_pcBaseColPic[0]; } |
---|
[494] | 2615 | #if MFM_ENCCONSTRAINT |
---|
| 2616 | TComPic* getBaseColPic( TComList<TComPic*>& rcListPic ); |
---|
| 2617 | #endif |
---|
[313] | 2618 | |
---|
| 2619 | Void setLayerId (UInt layerId) { m_layerId = layerId; } |
---|
| 2620 | UInt getLayerId () { return m_layerId; } |
---|
| 2621 | |
---|
| 2622 | Void setFullPelBaseRec (UInt refLayerIdc, TComPicYuv* p) { m_pcFullPelBaseRec[refLayerIdc] = p; } |
---|
| 2623 | TComPicYuv* getFullPelBaseRec (UInt refLayerIdc) { return m_pcFullPelBaseRec[refLayerIdc]; } |
---|
| 2624 | |
---|
| 2625 | Void setRefPicListModificationSvc(); |
---|
| 2626 | Int getNumILRRefIdx ( ) { return m_pcVPS->getNumDirectRefLayers( m_layerId ); } |
---|
| 2627 | |
---|
| 2628 | Int getActiveNumILRRefIdx ( ) { return m_activeNumILRRefIdx; } |
---|
| 2629 | Void setActiveNumILRRefIdx ( Int i ) { m_activeNumILRRefIdx = i; } |
---|
| 2630 | |
---|
| 2631 | Int getInterLayerPredLayerIdc (UInt layerIdx) { return m_interLayerPredLayerIdc[layerIdx];} |
---|
| 2632 | Void setInterLayerPredLayerIdc (UInt refLayerIdc, UInt layerIdx) { m_interLayerPredLayerIdc[layerIdx] = refLayerIdc; } |
---|
| 2633 | |
---|
| 2634 | Void setInterLayerPredEnabledFlag ( Bool val ) { m_interLayerPredEnabledFlag = val; } |
---|
| 2635 | Bool getInterLayerPredEnabledFlag () { return m_interLayerPredEnabledFlag;} |
---|
| 2636 | |
---|
[644] | 2637 | #if P0312_VERT_PHASE_ADJ |
---|
| 2638 | Int getVertPhasePositionFlag (UInt layerIdx) { return m_vertPhasePositionFlag[layerIdx];} |
---|
| 2639 | Void setVertPhasePositionFlag (Bool b, UInt layerIdx) { m_vertPhasePositionFlag[layerIdx] = b; } |
---|
| 2640 | #endif |
---|
| 2641 | |
---|
[313] | 2642 | Void setNumMotionPredRefLayers(int i) { m_numMotionPredRefLayers = i; } |
---|
| 2643 | Int getNumMotionPredRefLayers() { return m_numMotionPredRefLayers; } |
---|
| 2644 | #if REF_IDX_MFM |
---|
| 2645 | Void setMFMEnabledFlag(Bool flag) { m_bMFMEnabledFlag = flag; } |
---|
| 2646 | Bool getMFMEnabledFlag() { return m_bMFMEnabledFlag; } |
---|
| 2647 | #endif |
---|
| 2648 | |
---|
[494] | 2649 | TComPic* getRefPic(TComList<TComPic*>& rcListPic, Int poc) { return xGetRefPic( rcListPic, poc ); } |
---|
[313] | 2650 | |
---|
[588] | 2651 | Bool isRADL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_R); } |
---|
| 2652 | Bool isRASL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_R); } |
---|
[313] | 2653 | |
---|
[906] | 2654 | #if POC_RESET_RESTRICTIONS |
---|
| 2655 | Bool isIDR() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL |
---|
| 2656 | || m_eNalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP); } |
---|
| 2657 | Bool isCRA() { return m_eNalUnitType == NAL_UNIT_CODED_SLICE_CRA; } |
---|
| 2658 | Bool isBLA() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_LP |
---|
| 2659 | || m_eNalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_RADL |
---|
| 2660 | || m_eNalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP ); } |
---|
| 2661 | Bool isSLNR() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_TRAIL_N |
---|
| 2662 | || m_eNalUnitType == NAL_UNIT_CODED_SLICE_TSA_N |
---|
| 2663 | || m_eNalUnitType == NAL_UNIT_CODED_SLICE_STSA_N |
---|
| 2664 | || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_N |
---|
| 2665 | || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_N |
---|
| 2666 | || m_eNalUnitType == NAL_UNIT_RESERVED_VCL_N10 |
---|
| 2667 | || m_eNalUnitType == NAL_UNIT_RESERVED_VCL_N12 |
---|
| 2668 | || m_eNalUnitType == NAL_UNIT_RESERVED_VCL_N14 ); } |
---|
| 2669 | #endif |
---|
[494] | 2670 | #if POC_RESET_FLAG |
---|
| 2671 | Bool getPocResetFlag () { return m_bPocResetFlag; } |
---|
| 2672 | Void setPocResetFlag (Bool b) { m_bPocResetFlag = b; } |
---|
| 2673 | Int getPocValueBeforeReset () { return m_pocValueBeforeReset; } |
---|
| 2674 | Void setPocValueBeforeReset (Int x) { m_pocValueBeforeReset = x ; } |
---|
| 2675 | #endif |
---|
| 2676 | Bool getDiscardableFlag () { return m_bDiscardableFlag; } |
---|
| 2677 | Void setDiscardableFlag (Bool b) { m_bDiscardableFlag = b; } |
---|
[540] | 2678 | #if O0149_CROSS_LAYER_BLA_FLAG |
---|
| 2679 | Bool getCrossLayerBLAFlag () { return m_bCrossLayerBLAFlag; } |
---|
| 2680 | Void setCrossLayerBLAFlag (Bool b) { m_bCrossLayerBLAFlag = b; } |
---|
| 2681 | #endif |
---|
[494] | 2682 | |
---|
| 2683 | #if RPL_INIT_N0316_N0082 |
---|
| 2684 | Int getNumNegativeRpsCurrTempList(); |
---|
| 2685 | #endif |
---|
| 2686 | |
---|
[442] | 2687 | #if REPN_FORMAT_IN_VPS |
---|
| 2688 | UInt getPicWidthInLumaSamples(); |
---|
| 2689 | UInt getPicHeightInLumaSamples(); |
---|
[494] | 2690 | #if AUXILIARY_PICTURES |
---|
| 2691 | ChromaFormat getChromaFormatIdc(); |
---|
| 2692 | #else |
---|
[442] | 2693 | UInt getChromaFormatIdc(); |
---|
[494] | 2694 | #endif |
---|
[442] | 2695 | UInt getBitDepthY(); |
---|
| 2696 | UInt getBitDepthC(); |
---|
[494] | 2697 | Int getQpBDOffsetY(); |
---|
| 2698 | Int getQpBDOffsetC(); |
---|
[906] | 2699 | |
---|
| 2700 | #if R0156_CONF_WINDOW_IN_REP_FORMAT |
---|
| 2701 | Window& getConformanceWindow(); |
---|
[442] | 2702 | #endif |
---|
[906] | 2703 | #endif |
---|
[494] | 2704 | |
---|
| 2705 | Void setILRPic(TComPic **pcIlpPic); |
---|
[644] | 2706 | #if POC_RESET_IDC_SIGNALLING |
---|
| 2707 | Int getPocResetIdc () { return m_pocResetIdc; } |
---|
| 2708 | Void setPocResetIdc (Int b) { m_pocResetIdc = b; } |
---|
| 2709 | Int getPocResetPeriodId () { return m_pocResetPeriodId; } |
---|
| 2710 | Void setPocResetPeriodId (Int b) { m_pocResetPeriodId = b; } |
---|
| 2711 | Bool getFullPocResetFlag () { return m_fullPocResetFlag; } |
---|
| 2712 | Void setFullPocResetFlag (Bool b) { m_fullPocResetFlag = b; } |
---|
| 2713 | Int getPocLsbVal () { return m_pocLsbVal; } |
---|
| 2714 | Void setPocLsbVal (Int b) { m_pocLsbVal = b; } |
---|
[906] | 2715 | #if P0297_VPS_POC_LSB_ALIGNED_FLAG |
---|
| 2716 | Void setPocMsbNeeded (Bool x) { m_pocMsbValNeeded = x; } |
---|
| 2717 | Bool getPocMsbNeeded () { return m_pocMsbValNeeded; } |
---|
| 2718 | Int getPocResetDeltaPoc () { return m_pocResetDeltaPoc; } |
---|
| 2719 | Void setPocResetDeltaPoc (Int x) { m_pocResetDeltaPoc = x; } |
---|
| 2720 | #endif |
---|
[644] | 2721 | Int getPocMsbVal () { return m_pocMsbVal; } |
---|
| 2722 | Void setPocMsbVal (Int b) { m_pocMsbVal = b; } |
---|
| 2723 | Bool getPocMsbValPresentFlag () { return m_pocMsbValPresentFlag; } |
---|
| 2724 | Void setPocMsbValPresentFlag (Bool x) { m_pocMsbValPresentFlag = x; } |
---|
| 2725 | Bool getPocMsbValRequiredFlag () { return m_pocMsbValRequiredFlag; } |
---|
| 2726 | Void setPocMsbValRequiredFlag (Bool x) { m_pocMsbValRequiredFlag = x; } |
---|
| 2727 | #endif |
---|
| 2728 | |
---|
[713] | 2729 | #if NO_OUTPUT_OF_PRIOR_PICS |
---|
| 2730 | Bool getBlaPicFlag (); |
---|
| 2731 | Bool getCraPicFlag (); |
---|
| 2732 | #endif |
---|
[815] | 2733 | #if POC_RESET_IDC_DECODER |
---|
| 2734 | Bool getRaslPicFlag (); |
---|
| 2735 | Bool getRadlPicFlag (); |
---|
| 2736 | #endif |
---|
| 2737 | #if POC_RESET_IDC_DECODER || POC_RESET_IDC_ENCODER |
---|
| 2738 | Int getPicOrderCntLsb() { return m_picOrderCntLsb; } |
---|
| 2739 | Void setPicOrderCntLsb(Int x) { m_picOrderCntLsb = x; } |
---|
| 2740 | #endif |
---|
[713] | 2741 | |
---|
[815] | 2742 | #if POC_RESET_IDC_ENCODER |
---|
| 2743 | Int getPocValueBeforeReset () { return m_pocValueBeforeReset; } |
---|
| 2744 | Void setPocValueBeforeReset (Int x) { m_pocValueBeforeReset = x ; } |
---|
| 2745 | Void decrementRefPocValues(Int const decrementValue); |
---|
| 2746 | Int getCurrMsb( Int currLsb, Int prevLsb, Int prevMsb, Int maxLsbVal ); |
---|
| 2747 | #endif |
---|
[906] | 2748 | Int getReferenceLayerIdc( UInt refLayerId ); |
---|
[815] | 2749 | |
---|
[494] | 2750 | #endif //SVC_EXTENSION |
---|
[313] | 2751 | protected: |
---|
| 2752 | TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, |
---|
| 2753 | Int poc); |
---|
| 2754 | TComPic* xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb); |
---|
| 2755 | };// END CLASS DEFINITION TComSlice |
---|
| 2756 | |
---|
| 2757 | |
---|
| 2758 | template <class T> class ParameterSetMap |
---|
| 2759 | { |
---|
| 2760 | public: |
---|
| 2761 | ParameterSetMap(Int maxId) |
---|
| 2762 | :m_maxId (maxId) |
---|
| 2763 | {} |
---|
| 2764 | |
---|
| 2765 | ~ParameterSetMap() |
---|
| 2766 | { |
---|
| 2767 | for (typename std::map<Int,T *>::iterator i = m_paramsetMap.begin(); i!= m_paramsetMap.end(); i++) |
---|
| 2768 | { |
---|
| 2769 | delete (*i).second; |
---|
| 2770 | } |
---|
| 2771 | } |
---|
| 2772 | |
---|
| 2773 | Void storePS(Int psId, T *ps) |
---|
| 2774 | { |
---|
| 2775 | assert ( psId < m_maxId ); |
---|
| 2776 | if ( m_paramsetMap.find(psId) != m_paramsetMap.end() ) |
---|
| 2777 | { |
---|
| 2778 | delete m_paramsetMap[psId]; |
---|
| 2779 | } |
---|
| 2780 | m_paramsetMap[psId] = ps; |
---|
| 2781 | } |
---|
| 2782 | |
---|
| 2783 | Void mergePSList(ParameterSetMap<T> &rPsList) |
---|
| 2784 | { |
---|
| 2785 | for (typename std::map<Int,T *>::iterator i = rPsList.m_paramsetMap.begin(); i!= rPsList.m_paramsetMap.end(); i++) |
---|
| 2786 | { |
---|
| 2787 | storePS(i->first, i->second); |
---|
| 2788 | } |
---|
| 2789 | rPsList.m_paramsetMap.clear(); |
---|
| 2790 | } |
---|
| 2791 | |
---|
| 2792 | |
---|
| 2793 | T* getPS(Int psId) |
---|
| 2794 | { |
---|
| 2795 | return ( m_paramsetMap.find(psId) == m_paramsetMap.end() ) ? NULL : m_paramsetMap[psId]; |
---|
| 2796 | } |
---|
| 2797 | |
---|
| 2798 | T* getFirstPS() |
---|
| 2799 | { |
---|
| 2800 | return (m_paramsetMap.begin() == m_paramsetMap.end() ) ? NULL : m_paramsetMap.begin()->second; |
---|
| 2801 | } |
---|
| 2802 | |
---|
| 2803 | private: |
---|
| 2804 | std::map<Int,T *> m_paramsetMap; |
---|
| 2805 | Int m_maxId; |
---|
| 2806 | }; |
---|
| 2807 | |
---|
| 2808 | class ParameterSetManager |
---|
| 2809 | { |
---|
| 2810 | public: |
---|
| 2811 | ParameterSetManager(); |
---|
| 2812 | virtual ~ParameterSetManager(); |
---|
| 2813 | |
---|
| 2814 | //! store sequence parameter set and take ownership of it |
---|
| 2815 | Void storeVPS(TComVPS *vps) { m_vpsMap.storePS( vps->getVPSId(), vps); }; |
---|
| 2816 | //! get pointer to existing video parameter set |
---|
| 2817 | TComVPS* getVPS(Int vpsId) { return m_vpsMap.getPS(vpsId); }; |
---|
| 2818 | TComVPS* getFirstVPS() { return m_vpsMap.getFirstPS(); }; |
---|
| 2819 | |
---|
| 2820 | //! store sequence parameter set and take ownership of it |
---|
| 2821 | Void storeSPS(TComSPS *sps) { m_spsMap.storePS( sps->getSPSId(), sps); }; |
---|
| 2822 | //! get pointer to existing sequence parameter set |
---|
| 2823 | TComSPS* getSPS(Int spsId) { return m_spsMap.getPS(spsId); }; |
---|
| 2824 | TComSPS* getFirstSPS() { return m_spsMap.getFirstPS(); }; |
---|
| 2825 | |
---|
| 2826 | //! store picture parameter set and take ownership of it |
---|
| 2827 | Void storePPS(TComPPS *pps) { m_ppsMap.storePS( pps->getPPSId(), pps); }; |
---|
| 2828 | //! get pointer to existing picture parameter set |
---|
| 2829 | TComPPS* getPPS(Int ppsId) { return m_ppsMap.getPS(ppsId); }; |
---|
| 2830 | TComPPS* getFirstPPS() { return m_ppsMap.getFirstPS(); }; |
---|
| 2831 | |
---|
| 2832 | //! activate a SPS from a active parameter sets SEI message |
---|
| 2833 | //! \returns true, if activation is successful |
---|
| 2834 | Bool activateSPSWithSEI(Int SPSId); |
---|
| 2835 | |
---|
| 2836 | //! activate a PPS and depending on isIDR parameter also SPS and VPS |
---|
| 2837 | //! \returns true, if activation is successful |
---|
| 2838 | Bool activatePPS(Int ppsId, Bool isIRAP); |
---|
| 2839 | |
---|
| 2840 | TComVPS* getActiveVPS(){ return m_vpsMap.getPS(m_activeVPSId); }; |
---|
| 2841 | TComSPS* getActiveSPS(){ return m_spsMap.getPS(m_activeSPSId); }; |
---|
| 2842 | TComPPS* getActivePPS(){ return m_ppsMap.getPS(m_activePPSId); }; |
---|
| 2843 | |
---|
| 2844 | protected: |
---|
| 2845 | |
---|
| 2846 | #if SVC_EXTENSION |
---|
| 2847 | static ParameterSetMap<TComVPS> m_vpsMap; |
---|
[906] | 2848 | static ParameterSetMap<TComSPS> m_spsMap; |
---|
| 2849 | static ParameterSetMap<TComPPS> m_ppsMap; |
---|
[313] | 2850 | #else |
---|
| 2851 | ParameterSetMap<TComVPS> m_vpsMap; |
---|
| 2852 | ParameterSetMap<TComSPS> m_spsMap; |
---|
| 2853 | ParameterSetMap<TComPPS> m_ppsMap; |
---|
[906] | 2854 | #endif |
---|
[313] | 2855 | |
---|
| 2856 | #if SVC_EXTENSION |
---|
| 2857 | static Int m_activeVPSId; |
---|
| 2858 | #else |
---|
| 2859 | Int m_activeVPSId; |
---|
| 2860 | #endif |
---|
| 2861 | Int m_activeSPSId; |
---|
| 2862 | Int m_activePPSId; |
---|
| 2863 | }; |
---|
| 2864 | |
---|
| 2865 | //! \} |
---|
| 2866 | |
---|
| 2867 | #endif // __TCOMSLICE__ |
---|
[906] | 2868 | |
---|