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