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