[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 | Bool getUseTransformSkip () { return m_useTransformSkip; } |
---|
| 159 | Void setUseTransformSkip (Bool b) { m_useTransformSkip = b; } |
---|
| 160 | Int* getScalingListAddress (UInt sizeId, UInt listId) { return m_scalingListCoef[sizeId][listId]; } //!< get matrix coefficient |
---|
| 161 | Bool checkPredMode (UInt sizeId, UInt listId); |
---|
| 162 | Void setRefMatrixId (UInt sizeId, UInt listId, UInt u) { m_refMatrixId[sizeId][listId] = u; } //!< set reference matrix ID |
---|
| 163 | UInt getRefMatrixId (UInt sizeId, UInt listId) { return m_refMatrixId[sizeId][listId]; } //!< get reference matrix ID |
---|
| 164 | Int* getScalingListDefaultAddress (UInt sizeId, UInt listId); //!< get default matrix coefficient |
---|
| 165 | Void processDefaultMarix (UInt sizeId, UInt listId); |
---|
| 166 | Void setScalingListDC (UInt sizeId, UInt listId, UInt u) { m_scalingListDC[sizeId][listId] = u; } //!< set DC value |
---|
| 167 | |
---|
| 168 | Int getScalingListDC (UInt sizeId, UInt listId) { return m_scalingListDC[sizeId][listId]; } //!< get DC value |
---|
| 169 | Void checkDcOfMatrix (); |
---|
| 170 | Void processRefMatrix (UInt sizeId, UInt listId , UInt refListId ); |
---|
| 171 | Bool xParseScalingList (Char* pchFile); |
---|
| 172 | |
---|
| 173 | private: |
---|
| 174 | Void init (); |
---|
| 175 | Void destroy (); |
---|
| 176 | Int m_scalingListDC [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< the DC value of the matrix coefficient for 16x16 |
---|
| 177 | Bool m_useDefaultScalingMatrixFlag [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< UseDefaultScalingMatrixFlag |
---|
| 178 | UInt m_refMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< RefMatrixID |
---|
| 179 | Bool m_scalingListPresentFlag; //!< flag for using default matrix |
---|
| 180 | UInt m_predMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< reference list index |
---|
| 181 | Int *m_scalingListCoef [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< quantization matrix |
---|
| 182 | Bool m_useTransformSkip; //!< transform skipping flag for setting default scaling matrix for 4x4 |
---|
| 183 | }; |
---|
| 184 | |
---|
| 185 | class ProfileTierLevel |
---|
| 186 | { |
---|
| 187 | Int m_profileSpace; |
---|
| 188 | Bool m_tierFlag; |
---|
| 189 | Int m_profileIdc; |
---|
| 190 | Bool m_profileCompatibilityFlag[32]; |
---|
| 191 | Int m_levelIdc; |
---|
| 192 | |
---|
| 193 | Bool m_progressiveSourceFlag; |
---|
| 194 | Bool m_interlacedSourceFlag; |
---|
| 195 | Bool m_nonPackedConstraintFlag; |
---|
| 196 | Bool m_frameOnlyConstraintFlag; |
---|
| 197 | |
---|
| 198 | public: |
---|
| 199 | ProfileTierLevel(); |
---|
| 200 | |
---|
| 201 | Int getProfileSpace() const { return m_profileSpace; } |
---|
| 202 | Void setProfileSpace(Int x) { m_profileSpace = x; } |
---|
| 203 | |
---|
| 204 | Bool getTierFlag() const { return m_tierFlag; } |
---|
| 205 | Void setTierFlag(Bool x) { m_tierFlag = x; } |
---|
| 206 | |
---|
| 207 | Int getProfileIdc() const { return m_profileIdc; } |
---|
| 208 | Void setProfileIdc(Int x) { m_profileIdc = x; } |
---|
| 209 | |
---|
| 210 | Bool getProfileCompatibilityFlag(Int i) const { return m_profileCompatibilityFlag[i]; } |
---|
| 211 | Void setProfileCompatibilityFlag(Int i, Bool x) { m_profileCompatibilityFlag[i] = x; } |
---|
| 212 | |
---|
| 213 | Int getLevelIdc() const { return m_levelIdc; } |
---|
| 214 | Void setLevelIdc(Int x) { m_levelIdc = x; } |
---|
| 215 | |
---|
| 216 | Bool getProgressiveSourceFlag() const { return m_progressiveSourceFlag; } |
---|
| 217 | Void setProgressiveSourceFlag(Bool b) { m_progressiveSourceFlag = b; } |
---|
| 218 | |
---|
| 219 | Bool getInterlacedSourceFlag() const { return m_interlacedSourceFlag; } |
---|
| 220 | Void setInterlacedSourceFlag(Bool b) { m_interlacedSourceFlag = b; } |
---|
| 221 | |
---|
| 222 | Bool getNonPackedConstraintFlag() const { return m_nonPackedConstraintFlag; } |
---|
| 223 | Void setNonPackedConstraintFlag(Bool b) { m_nonPackedConstraintFlag = b; } |
---|
| 224 | |
---|
| 225 | Bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; } |
---|
| 226 | Void setFrameOnlyConstraintFlag(Bool b) { m_frameOnlyConstraintFlag = b; } |
---|
| 227 | #if VPS_EXTN_PROFILE_INFO |
---|
| 228 | Void copyProfileInfo(ProfileTierLevel *ptl); |
---|
| 229 | #endif |
---|
| 230 | }; |
---|
| 231 | |
---|
| 232 | |
---|
| 233 | class TComPTL |
---|
| 234 | { |
---|
| 235 | ProfileTierLevel m_generalPTL; |
---|
| 236 | ProfileTierLevel m_subLayerPTL[6]; // max. value of max_sub_layers_minus1 is 6 |
---|
| 237 | Bool m_subLayerProfilePresentFlag[6]; |
---|
| 238 | Bool m_subLayerLevelPresentFlag[6]; |
---|
| 239 | |
---|
| 240 | public: |
---|
| 241 | TComPTL(); |
---|
| 242 | Bool getSubLayerProfilePresentFlag(Int i) const { return m_subLayerProfilePresentFlag[i]; } |
---|
| 243 | Void setSubLayerProfilePresentFlag(Int i, Bool x) { m_subLayerProfilePresentFlag[i] = x; } |
---|
| 244 | |
---|
| 245 | Bool getSubLayerLevelPresentFlag(Int i) const { return m_subLayerLevelPresentFlag[i]; } |
---|
| 246 | Void setSubLayerLevelPresentFlag(Int i, Bool x) { m_subLayerLevelPresentFlag[i] = x; } |
---|
| 247 | |
---|
| 248 | ProfileTierLevel* getGeneralPTL() { return &m_generalPTL; } |
---|
| 249 | ProfileTierLevel* getSubLayerPTL(Int i) { return &m_subLayerPTL[i]; } |
---|
| 250 | #if VPS_EXTN_PROFILE_INFO |
---|
| 251 | Void copyProfileInfo(TComPTL *ptl); |
---|
| 252 | #endif |
---|
| 253 | }; |
---|
| 254 | /// VPS class |
---|
| 255 | |
---|
| 256 | struct HrdSubLayerInfo |
---|
| 257 | { |
---|
| 258 | Bool fixedPicRateFlag; |
---|
| 259 | Bool fixedPicRateWithinCvsFlag; |
---|
| 260 | UInt picDurationInTcMinus1; |
---|
| 261 | Bool lowDelayHrdFlag; |
---|
| 262 | UInt cpbCntMinus1; |
---|
| 263 | UInt bitRateValueMinus1[MAX_CPB_CNT][2]; |
---|
| 264 | UInt cpbSizeValue [MAX_CPB_CNT][2]; |
---|
| 265 | UInt ducpbSizeValue [MAX_CPB_CNT][2]; |
---|
| 266 | UInt cbrFlag [MAX_CPB_CNT][2]; |
---|
| 267 | UInt duBitRateValue [MAX_CPB_CNT][2]; |
---|
| 268 | }; |
---|
| 269 | |
---|
| 270 | class TComHRD |
---|
| 271 | { |
---|
| 272 | private: |
---|
| 273 | Bool m_nalHrdParametersPresentFlag; |
---|
| 274 | Bool m_vclHrdParametersPresentFlag; |
---|
| 275 | Bool m_subPicCpbParamsPresentFlag; |
---|
| 276 | UInt m_tickDivisorMinus2; |
---|
| 277 | UInt m_duCpbRemovalDelayLengthMinus1; |
---|
| 278 | Bool m_subPicCpbParamsInPicTimingSEIFlag; |
---|
| 279 | UInt m_dpbOutputDelayDuLengthMinus1; |
---|
| 280 | UInt m_bitRateScale; |
---|
| 281 | UInt m_cpbSizeScale; |
---|
| 282 | UInt m_ducpbSizeScale; |
---|
| 283 | UInt m_initialCpbRemovalDelayLengthMinus1; |
---|
| 284 | UInt m_cpbRemovalDelayLengthMinus1; |
---|
| 285 | UInt m_dpbOutputDelayLengthMinus1; |
---|
| 286 | UInt m_numDU; |
---|
| 287 | HrdSubLayerInfo m_HRD[MAX_TLAYER]; |
---|
| 288 | |
---|
| 289 | public: |
---|
| 290 | TComHRD() |
---|
| 291 | :m_nalHrdParametersPresentFlag(0) |
---|
| 292 | ,m_vclHrdParametersPresentFlag(0) |
---|
| 293 | ,m_subPicCpbParamsPresentFlag(false) |
---|
| 294 | ,m_tickDivisorMinus2(0) |
---|
| 295 | ,m_duCpbRemovalDelayLengthMinus1(0) |
---|
| 296 | ,m_subPicCpbParamsInPicTimingSEIFlag(false) |
---|
| 297 | ,m_dpbOutputDelayDuLengthMinus1(0) |
---|
| 298 | ,m_bitRateScale(0) |
---|
| 299 | ,m_cpbSizeScale(0) |
---|
| 300 | ,m_initialCpbRemovalDelayLengthMinus1(0) |
---|
| 301 | ,m_cpbRemovalDelayLengthMinus1(0) |
---|
| 302 | ,m_dpbOutputDelayLengthMinus1(0) |
---|
| 303 | {} |
---|
| 304 | |
---|
| 305 | virtual ~TComHRD() {} |
---|
| 306 | |
---|
| 307 | Void setNalHrdParametersPresentFlag ( Bool flag ) { m_nalHrdParametersPresentFlag = flag; } |
---|
| 308 | Bool getNalHrdParametersPresentFlag ( ) { return m_nalHrdParametersPresentFlag; } |
---|
| 309 | |
---|
| 310 | Void setVclHrdParametersPresentFlag ( Bool flag ) { m_vclHrdParametersPresentFlag = flag; } |
---|
| 311 | Bool getVclHrdParametersPresentFlag ( ) { return m_vclHrdParametersPresentFlag; } |
---|
| 312 | |
---|
| 313 | Void setSubPicCpbParamsPresentFlag ( Bool flag ) { m_subPicCpbParamsPresentFlag = flag; } |
---|
| 314 | Bool getSubPicCpbParamsPresentFlag ( ) { return m_subPicCpbParamsPresentFlag; } |
---|
| 315 | |
---|
| 316 | Void setTickDivisorMinus2 ( UInt value ) { m_tickDivisorMinus2 = value; } |
---|
| 317 | UInt getTickDivisorMinus2 ( ) { return m_tickDivisorMinus2; } |
---|
| 318 | |
---|
| 319 | Void setDuCpbRemovalDelayLengthMinus1 ( UInt value ) { m_duCpbRemovalDelayLengthMinus1 = value; } |
---|
| 320 | UInt getDuCpbRemovalDelayLengthMinus1 ( ) { return m_duCpbRemovalDelayLengthMinus1; } |
---|
| 321 | |
---|
| 322 | Void setSubPicCpbParamsInPicTimingSEIFlag ( Bool flag) { m_subPicCpbParamsInPicTimingSEIFlag = flag; } |
---|
| 323 | Bool getSubPicCpbParamsInPicTimingSEIFlag () { return m_subPicCpbParamsInPicTimingSEIFlag; } |
---|
| 324 | |
---|
| 325 | Void setDpbOutputDelayDuLengthMinus1 (UInt value ) { m_dpbOutputDelayDuLengthMinus1 = value; } |
---|
| 326 | UInt getDpbOutputDelayDuLengthMinus1 () { return m_dpbOutputDelayDuLengthMinus1; } |
---|
| 327 | |
---|
| 328 | Void setBitRateScale ( UInt value ) { m_bitRateScale = value; } |
---|
| 329 | UInt getBitRateScale ( ) { return m_bitRateScale; } |
---|
| 330 | |
---|
| 331 | Void setCpbSizeScale ( UInt value ) { m_cpbSizeScale = value; } |
---|
| 332 | UInt getCpbSizeScale ( ) { return m_cpbSizeScale; } |
---|
| 333 | Void setDuCpbSizeScale ( UInt value ) { m_ducpbSizeScale = value; } |
---|
| 334 | UInt getDuCpbSizeScale ( ) { return m_ducpbSizeScale; } |
---|
| 335 | |
---|
| 336 | Void setInitialCpbRemovalDelayLengthMinus1( UInt value ) { m_initialCpbRemovalDelayLengthMinus1 = value; } |
---|
| 337 | UInt getInitialCpbRemovalDelayLengthMinus1( ) { return m_initialCpbRemovalDelayLengthMinus1; } |
---|
| 338 | |
---|
| 339 | Void setCpbRemovalDelayLengthMinus1 ( UInt value ) { m_cpbRemovalDelayLengthMinus1 = value; } |
---|
| 340 | UInt getCpbRemovalDelayLengthMinus1 ( ) { return m_cpbRemovalDelayLengthMinus1; } |
---|
| 341 | |
---|
| 342 | Void setDpbOutputDelayLengthMinus1 ( UInt value ) { m_dpbOutputDelayLengthMinus1 = value; } |
---|
| 343 | UInt getDpbOutputDelayLengthMinus1 ( ) { return m_dpbOutputDelayLengthMinus1; } |
---|
| 344 | |
---|
| 345 | Void setFixedPicRateFlag ( Int layer, Bool flag ) { m_HRD[layer].fixedPicRateFlag = flag; } |
---|
| 346 | Bool getFixedPicRateFlag ( Int layer ) { return m_HRD[layer].fixedPicRateFlag; } |
---|
| 347 | |
---|
| 348 | Void setFixedPicRateWithinCvsFlag ( Int layer, Bool flag ) { m_HRD[layer].fixedPicRateWithinCvsFlag = flag; } |
---|
| 349 | Bool getFixedPicRateWithinCvsFlag ( Int layer ) { return m_HRD[layer].fixedPicRateWithinCvsFlag; } |
---|
| 350 | |
---|
| 351 | Void setPicDurationInTcMinus1 ( Int layer, UInt value ) { m_HRD[layer].picDurationInTcMinus1 = value; } |
---|
| 352 | UInt getPicDurationInTcMinus1 ( Int layer ) { return m_HRD[layer].picDurationInTcMinus1; } |
---|
| 353 | |
---|
| 354 | Void setLowDelayHrdFlag ( Int layer, Bool flag ) { m_HRD[layer].lowDelayHrdFlag = flag; } |
---|
| 355 | Bool getLowDelayHrdFlag ( Int layer ) { return m_HRD[layer].lowDelayHrdFlag; } |
---|
| 356 | |
---|
| 357 | Void setCpbCntMinus1 ( Int layer, UInt value ) { m_HRD[layer].cpbCntMinus1 = value; } |
---|
| 358 | UInt getCpbCntMinus1 ( Int layer ) { return m_HRD[layer].cpbCntMinus1; } |
---|
| 359 | |
---|
| 360 | Void setBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].bitRateValueMinus1[cpbcnt][nalOrVcl] = value; } |
---|
| 361 | UInt getBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].bitRateValueMinus1[cpbcnt][nalOrVcl]; } |
---|
| 362 | |
---|
| 363 | Void setCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].cpbSizeValue[cpbcnt][nalOrVcl] = value; } |
---|
| 364 | UInt getCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].cpbSizeValue[cpbcnt][nalOrVcl]; } |
---|
| 365 | Void setDuCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].ducpbSizeValue[cpbcnt][nalOrVcl] = value; } |
---|
| 366 | UInt getDuCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].ducpbSizeValue[cpbcnt][nalOrVcl]; } |
---|
| 367 | Void setDuBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].duBitRateValue[cpbcnt][nalOrVcl] = value; } |
---|
| 368 | UInt getDuBitRateValueMinus1 (Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].duBitRateValue[cpbcnt][nalOrVcl]; } |
---|
| 369 | Void setCbrFlag ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].cbrFlag[cpbcnt][nalOrVcl] = value; } |
---|
| 370 | Bool getCbrFlag ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].cbrFlag[cpbcnt][nalOrVcl]; } |
---|
| 371 | |
---|
| 372 | Void setNumDU ( UInt value ) { m_numDU = value; } |
---|
| 373 | UInt getNumDU ( ) { return m_numDU; } |
---|
| 374 | Bool getCpbDpbDelaysPresentFlag() { return getNalHrdParametersPresentFlag() || getVclHrdParametersPresentFlag(); } |
---|
| 375 | }; |
---|
| 376 | |
---|
| 377 | class TimingInfo |
---|
| 378 | { |
---|
| 379 | Bool m_timingInfoPresentFlag; |
---|
| 380 | UInt m_numUnitsInTick; |
---|
| 381 | UInt m_timeScale; |
---|
| 382 | Bool m_pocProportionalToTimingFlag; |
---|
| 383 | Int m_numTicksPocDiffOneMinus1; |
---|
| 384 | public: |
---|
| 385 | TimingInfo() |
---|
| 386 | : m_timingInfoPresentFlag(false) |
---|
| 387 | , m_numUnitsInTick(1001) |
---|
| 388 | , m_timeScale(60000) |
---|
| 389 | , m_pocProportionalToTimingFlag(false) |
---|
| 390 | , m_numTicksPocDiffOneMinus1(0) {} |
---|
| 391 | |
---|
| 392 | Void setTimingInfoPresentFlag ( Bool flag ) { m_timingInfoPresentFlag = flag; } |
---|
| 393 | Bool getTimingInfoPresentFlag ( ) { return m_timingInfoPresentFlag; } |
---|
| 394 | |
---|
| 395 | Void setNumUnitsInTick ( UInt value ) { m_numUnitsInTick = value; } |
---|
| 396 | UInt getNumUnitsInTick ( ) { return m_numUnitsInTick; } |
---|
| 397 | |
---|
| 398 | Void setTimeScale ( UInt value ) { m_timeScale = value; } |
---|
| 399 | UInt getTimeScale ( ) { return m_timeScale; } |
---|
| 400 | |
---|
| 401 | Bool getPocProportionalToTimingFlag ( ) { return m_pocProportionalToTimingFlag; } |
---|
| 402 | Void setPocProportionalToTimingFlag (Bool x ) { m_pocProportionalToTimingFlag = x; } |
---|
| 403 | |
---|
| 404 | Int getNumTicksPocDiffOneMinus1 ( ) { return m_numTicksPocDiffOneMinus1; } |
---|
| 405 | Void setNumTicksPocDiffOneMinus1 (Int x ) { m_numTicksPocDiffOneMinus1 = x; } |
---|
| 406 | }; |
---|
| 407 | |
---|
| 408 | class TComVPS |
---|
| 409 | { |
---|
| 410 | private: |
---|
| 411 | Int m_VPSId; |
---|
| 412 | UInt m_uiMaxTLayers; |
---|
| 413 | UInt m_uiMaxLayers; |
---|
| 414 | Bool m_bTemporalIdNestingFlag; |
---|
| 415 | |
---|
| 416 | UInt m_numReorderPics[MAX_TLAYER]; |
---|
| 417 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
| 418 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) |
---|
| 419 | |
---|
| 420 | UInt m_numHrdParameters; |
---|
| 421 | #if !VPS_RENAME |
---|
| 422 | UInt m_maxNuhReservedZeroLayerId; |
---|
| 423 | #endif |
---|
| 424 | TComHRD* m_hrdParameters; |
---|
| 425 | UInt* m_hrdOpSetIdx; |
---|
| 426 | Bool* m_cprmsPresentFlag; |
---|
| 427 | #if VPS_RENAME |
---|
| 428 | UInt m_maxLayerId; |
---|
| 429 | UInt m_numLayerSets; |
---|
| 430 | Bool m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 431 | #else |
---|
| 432 | UInt m_numOpSets; |
---|
| 433 | Bool m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1]; |
---|
| 434 | #endif |
---|
| 435 | #if DERIVE_LAYER_ID_LIST_VARIABLES |
---|
| 436 | Int m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 437 | Int m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
| 438 | #endif |
---|
| 439 | TComPTL m_pcPTL; |
---|
| 440 | TimingInfo m_timingInfo; |
---|
| 441 | |
---|
| 442 | // ------------------------------------------ |
---|
| 443 | // Variables related to VPS extensions |
---|
| 444 | // ------------------------------------------ |
---|
| 445 | #if VPS_EXTN_MASK_AND_DIM_INFO |
---|
| 446 | Bool m_avcBaseLayerFlag; // For now, always set to true. |
---|
| 447 | Bool m_splittingFlag; |
---|
| 448 | Bool m_scalabilityMask[MAX_VPS_NUM_SCALABILITY_TYPES]; |
---|
| 449 | UInt m_dimensionIdLen[MAX_VPS_NUM_SCALABILITY_TYPES]; |
---|
| 450 | Bool m_nuhLayerIdPresentFlag; |
---|
| 451 | UInt m_layerIdInNuh[MAX_VPS_LAYER_ID_PLUS1]; // Maps layer ID in the VPS with layer_id_in_nuh |
---|
| 452 | UInt m_dimensionId[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_NUM_SCALABILITY_TYPES]; |
---|
| 453 | |
---|
| 454 | // Below are derived variables |
---|
| 455 | UInt m_numScalabilityTypes; |
---|
| 456 | UInt m_layerIdInVps[MAX_VPS_LAYER_ID_PLUS1]; // Maps layer_id_in_nuh with the layer ID in the VPS |
---|
| 457 | #endif |
---|
| 458 | #if VPS_EXTN_PROFILE_INFO |
---|
| 459 | // Profile-tier-level signalling related |
---|
| 460 | Bool m_profilePresentFlag[MAX_VPS_LAYER_SETS_PLUS1]; // The value with index 0 will not be used. |
---|
| 461 | UInt m_profileLayerSetRef[MAX_VPS_LAYER_SETS_PLUS1]; // The value with index 0 will not be used. |
---|
| 462 | std::vector<TComPTL> m_pcPTLForExtn; |
---|
| 463 | #endif |
---|
| 464 | #if VPS_EXTN_OP_LAYER_SETS |
---|
| 465 | // .. More declarations here |
---|
| 466 | // Target output layer signalling related |
---|
| 467 | UInt m_numOutputLayerSets; |
---|
| 468 | UInt m_outputLayerSetIdx[MAX_VPS_LAYER_SETS_PLUS1]; |
---|
| 469 | Bool m_outputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 470 | #endif |
---|
| 471 | #if VPS_EXTN_DIRECT_REF_LAYERS |
---|
| 472 | Bool m_directDependencyFlag[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 473 | UInt m_numDirectRefLayers[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 474 | UInt m_refLayerId[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 475 | #if M0457_PREDICTION_INDICATIONS |
---|
| 476 | UInt m_directDepTypeLen; |
---|
| 477 | UInt m_directDependencyType[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 478 | #endif |
---|
| 479 | #endif |
---|
| 480 | #if VPS_PROFILE_OUTPUT_LAYERS |
---|
| 481 | UInt m_numProfileTierLevel; |
---|
| 482 | Bool m_moreOutputLayerSetsThanDefaultFlag; |
---|
| 483 | Int m_numAddOutputLayerSets; |
---|
| 484 | Bool m_defaultOneTargetOutputLayerFlag; |
---|
| 485 | Int m_profileLevelTierIdx[64]; |
---|
| 486 | #endif |
---|
| 487 | #if JCTVC_M0458_INTERLAYER_RPS_SIG |
---|
| 488 | Bool m_maxOneActiveRefLayerFlag; |
---|
| 489 | #endif |
---|
| 490 | #if JCTVC_M0203_INTERLAYER_PRED_IDC |
---|
| 491 | UInt m_maxSublayerForIlpPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1]; |
---|
| 492 | #endif |
---|
| 493 | #if M0040_ADAPTIVE_RESOLUTION_CHANGE |
---|
| 494 | Bool m_singleLayerForNonIrapFlag; |
---|
| 495 | #endif |
---|
| 496 | public: |
---|
| 497 | TComVPS(); |
---|
| 498 | virtual ~TComVPS(); |
---|
| 499 | |
---|
| 500 | Void createHrdParamBuffer() |
---|
| 501 | { |
---|
| 502 | m_hrdParameters = new TComHRD[ getNumHrdParameters() ]; |
---|
| 503 | m_hrdOpSetIdx = new UInt [ getNumHrdParameters() ]; |
---|
| 504 | m_cprmsPresentFlag = new Bool [ getNumHrdParameters() ]; |
---|
| 505 | } |
---|
| 506 | |
---|
| 507 | TComHRD* getHrdParameters ( UInt i ) { return &m_hrdParameters[ i ]; } |
---|
| 508 | UInt getHrdOpSetIdx ( UInt i ) { return m_hrdOpSetIdx[ i ]; } |
---|
| 509 | Void setHrdOpSetIdx ( UInt val, UInt i ) { m_hrdOpSetIdx[ i ] = val; } |
---|
| 510 | Bool getCprmsPresentFlag ( UInt i ) { return m_cprmsPresentFlag[ i ]; } |
---|
| 511 | Void setCprmsPresentFlag ( Bool val, UInt i ) { m_cprmsPresentFlag[ i ] = val; } |
---|
| 512 | |
---|
| 513 | Int getVPSId () { return m_VPSId; } |
---|
| 514 | Void setVPSId (Int i) { m_VPSId = i; } |
---|
| 515 | |
---|
| 516 | UInt getMaxTLayers () { return m_uiMaxTLayers; } |
---|
| 517 | Void setMaxTLayers (UInt t) { m_uiMaxTLayers = t; } |
---|
| 518 | |
---|
| 519 | UInt getMaxLayers () { return m_uiMaxLayers; } |
---|
| 520 | Void setMaxLayers (UInt l) { m_uiMaxLayers = l; } |
---|
| 521 | |
---|
| 522 | Bool getTemporalNestingFlag () { return m_bTemporalIdNestingFlag; } |
---|
| 523 | Void setTemporalNestingFlag (Bool t) { m_bTemporalIdNestingFlag = t; } |
---|
| 524 | |
---|
| 525 | Void setNumReorderPics(UInt v, UInt tLayer) { m_numReorderPics[tLayer] = v; } |
---|
| 526 | UInt getNumReorderPics(UInt tLayer) { return m_numReorderPics[tLayer]; } |
---|
| 527 | |
---|
| 528 | Void setMaxDecPicBuffering(UInt v, UInt tLayer) { m_uiMaxDecPicBuffering[tLayer] = v; } |
---|
| 529 | UInt getMaxDecPicBuffering(UInt tLayer) { return m_uiMaxDecPicBuffering[tLayer]; } |
---|
| 530 | |
---|
| 531 | Void setMaxLatencyIncrease(UInt v, UInt tLayer) { m_uiMaxLatencyIncrease[tLayer] = v; } |
---|
| 532 | UInt getMaxLatencyIncrease(UInt tLayer) { return m_uiMaxLatencyIncrease[tLayer]; } |
---|
| 533 | |
---|
| 534 | UInt getNumHrdParameters() { return m_numHrdParameters; } |
---|
| 535 | Void setNumHrdParameters(UInt v) { m_numHrdParameters = v; } |
---|
| 536 | |
---|
| 537 | #if VPS_RENAME |
---|
| 538 | UInt getMaxLayerId() { return m_maxLayerId; } |
---|
| 539 | Void setMaxLayerId(UInt v) { m_maxLayerId = v; } |
---|
| 540 | |
---|
| 541 | UInt getNumLayerSets() { return m_numLayerSets; } |
---|
| 542 | Void setNumLayerSets(UInt v) { m_numLayerSets = v; } |
---|
| 543 | #else |
---|
| 544 | UInt getMaxNuhReservedZeroLayerId() { return m_maxNuhReservedZeroLayerId; } |
---|
| 545 | Void setMaxNuhReservedZeroLayerId(UInt v) { m_maxNuhReservedZeroLayerId = v; } |
---|
| 546 | |
---|
| 547 | UInt getMaxOpSets() { return m_numOpSets; } |
---|
| 548 | Void setMaxOpSets(UInt v) { m_numOpSets = v; } |
---|
| 549 | #endif |
---|
| 550 | Bool getLayerIdIncludedFlag(UInt opsIdx, UInt id) { return m_layerIdIncludedFlag[opsIdx][id]; } |
---|
| 551 | Void setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id) { m_layerIdIncludedFlag[opsIdx][id] = v; } |
---|
| 552 | #if DERIVE_LAYER_ID_LIST_VARIABLES |
---|
| 553 | Int getLayerSetLayerIdList(Int set, Int layerId) { return m_layerSetLayerIdList[set][layerId]; } |
---|
| 554 | Void setLayerSetLayerIdList(Int set, Int layerId, Int x) { m_layerSetLayerIdList[set][layerId] = x ; } |
---|
| 555 | |
---|
| 556 | Int getNumLayersInIdList(Int set) { return m_numLayerInIdList[set]; } |
---|
| 557 | Void setNumLayersInIdList(Int set, Int x) { m_numLayerInIdList[set] = x ; } |
---|
| 558 | |
---|
| 559 | Void deriveLayerIdListVariables(); |
---|
| 560 | #endif |
---|
| 561 | TComPTL* getPTL() { return &m_pcPTL; } |
---|
| 562 | TimingInfo* getTimingInfo() { return &m_timingInfo; } |
---|
| 563 | #if VPS_EXTN_MASK_AND_DIM_INFO |
---|
| 564 | Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } |
---|
| 565 | Void setAvcBaseLayerFlag(Bool x) { m_avcBaseLayerFlag = x; } |
---|
| 566 | |
---|
| 567 | Bool getSplittingFlag() { return m_splittingFlag; } |
---|
| 568 | Void setSplittingFlag(Bool x) { m_splittingFlag = x; } |
---|
| 569 | |
---|
| 570 | Bool getScalabilityMask(Int id) { return m_scalabilityMask[id]; } |
---|
| 571 | Void setScalabilityMask(Int id, Bool x) { m_scalabilityMask[id] = x; } |
---|
| 572 | |
---|
| 573 | UInt getDimensionIdLen(Int id) { return m_dimensionIdLen[id]; } |
---|
| 574 | Void setDimensionIdLen(Int id, UInt x) { m_dimensionIdLen[id] = x; } |
---|
| 575 | |
---|
| 576 | Bool getNuhLayerIdPresentFlag() { return m_nuhLayerIdPresentFlag; } |
---|
| 577 | Void setNuhLayerIdPresentFlag(Bool x) { m_nuhLayerIdPresentFlag = x; } |
---|
| 578 | |
---|
| 579 | UInt getLayerIdInNuh(Int id) { return m_layerIdInNuh[id]; } |
---|
| 580 | Void setLayerIdInNuh(Int id, UInt x) { m_layerIdInNuh[id] = x; } |
---|
| 581 | |
---|
| 582 | UInt getDimensionId(Int lyrId, Int id) { return m_dimensionId[lyrId][id]; } |
---|
| 583 | Void setDimensionId(Int lyrId, Int id, UInt x) { m_dimensionId[lyrId][id] = x; } |
---|
| 584 | |
---|
| 585 | UInt getNumScalabilityTypes() { return m_numScalabilityTypes; } |
---|
| 586 | Void setNumScalabilityTypes(UInt x) { m_numScalabilityTypes = x; } |
---|
| 587 | |
---|
| 588 | UInt getLayerIdInVps(Int id) { return m_layerIdInVps[id]; } |
---|
| 589 | Void setLayerIdInVps(Int id, UInt x) { m_layerIdInVps[id] = x; } |
---|
| 590 | #endif |
---|
| 591 | #if VPS_EXTN_PROFILE_INFO |
---|
| 592 | Bool getProfilePresentFlag(Int id) { return m_profilePresentFlag[id]; } |
---|
| 593 | Void setProfilePresentFlag(Int id, Bool x) { m_profilePresentFlag[id] = x; } |
---|
| 594 | |
---|
| 595 | UInt getProfileLayerSetRef(Int id) { return m_profileLayerSetRef[id]; } |
---|
| 596 | Void setProfileLayerSetRef(Int id, Bool x) { m_profileLayerSetRef[id] = x; } |
---|
| 597 | |
---|
| 598 | std::vector<TComPTL>* getPTLForExtnPtr() { return &m_pcPTLForExtn; } |
---|
| 599 | TComPTL* getPTLForExtn(Int id) { return &m_pcPTLForExtn[id]; } |
---|
| 600 | #endif |
---|
| 601 | #if VPS_EXTN_OP_LAYER_SETS |
---|
| 602 | // Target output layer signalling related |
---|
| 603 | UInt getNumOutputLayerSets() { return m_numOutputLayerSets; } |
---|
| 604 | Void setNumOutputLayerSets(Int x) { m_numOutputLayerSets = x; } |
---|
| 605 | |
---|
| 606 | UInt getOutputLayerSetIdx(Int idx) { return m_outputLayerSetIdx[idx]; } |
---|
| 607 | Void setOutputLayerSetIdx(Int idx, UInt x) { m_outputLayerSetIdx[idx] = x; } |
---|
| 608 | |
---|
| 609 | Bool getOutputLayerFlag(Int layerSet, Int layerId) { return m_outputLayerFlag[layerSet][layerId]; } |
---|
| 610 | Void setOutputLayerFlag(Int layerSet, Int layerId, Bool x) { m_outputLayerFlag[layerSet][layerId] = x; } |
---|
| 611 | #endif |
---|
| 612 | #if VPS_EXTN_DIRECT_REF_LAYERS |
---|
| 613 | // Direct dependency of layers |
---|
| 614 | Bool getDirectDependencyFlag(Int currLayerId, Int refLayerId) { return m_directDependencyFlag[currLayerId][refLayerId]; } |
---|
| 615 | Void setDirectDependencyFlag(Int currLayerId, Int refLayerId, Bool x) { m_directDependencyFlag[currLayerId][refLayerId] = x; } |
---|
| 616 | |
---|
| 617 | UInt getNumDirectRefLayers(Int layerId) { return m_numDirectRefLayers[layerId]; } |
---|
| 618 | Void setNumDirectRefLayers(Int layerId, UInt refLayerNum) { m_numDirectRefLayers[layerId] = refLayerNum; } |
---|
| 619 | |
---|
| 620 | UInt getRefLayerId(Int layerId, Int refLayerIdx) { return m_refLayerId[layerId][refLayerIdx]; } |
---|
| 621 | Void setRefLayerId(Int layerId, Int refLayerIdx, UInt refLayerId) { m_refLayerId[layerId][refLayerIdx] = refLayerId; } |
---|
| 622 | |
---|
| 623 | #if M0457_PREDICTION_INDICATIONS |
---|
| 624 | UInt getDirectDepTypeLen() { return m_directDepTypeLen; } |
---|
| 625 | Void setDirectDepTypeLen(UInt x) { m_directDepTypeLen = x; } |
---|
| 626 | |
---|
| 627 | UInt getDirectDependencyType(Int currLayerId, Int refLayerId) { return m_directDependencyType[currLayerId][refLayerId]; } |
---|
| 628 | Void setDirectDependencyType(Int currLayerId, Int refLayerId, UInt x) { m_directDependencyType[currLayerId][refLayerId] = x; } |
---|
| 629 | #endif |
---|
| 630 | #endif |
---|
| 631 | #if VPS_PROFILE_OUTPUT_LAYERS |
---|
| 632 | UInt getNumProfileTierLevel() { return m_numProfileTierLevel; } |
---|
| 633 | Void setNumProfileTierLevel(Int x) { m_numProfileTierLevel = x; } |
---|
| 634 | |
---|
| 635 | Bool getMoreOutputLayerSetsThanDefaultFlag() { return m_moreOutputLayerSetsThanDefaultFlag;} |
---|
| 636 | Void setMoreOutputLayerSetsThanDefaultFlag(Bool x) { m_moreOutputLayerSetsThanDefaultFlag = x ;} |
---|
| 637 | |
---|
| 638 | Int getNumAddOutputLayerSets() { return m_numAddOutputLayerSets; } |
---|
| 639 | Void setNumAddOutputLayerSets(Int x) { m_numAddOutputLayerSets = x ; } |
---|
| 640 | |
---|
| 641 | Bool getDefaultOneTargetOutputLayerFlag() { return m_defaultOneTargetOutputLayerFlag;} |
---|
| 642 | Void setDefaultOneTargetOutputLayerFlag(Bool x) { m_defaultOneTargetOutputLayerFlag= x ;} |
---|
| 643 | |
---|
| 644 | Int getProfileLevelTierIdx(Int i) { return m_profileLevelTierIdx[i]; } |
---|
| 645 | Void setProfileLevelTierIdx(Int i, Int x) { m_profileLevelTierIdx[i] = x ; } |
---|
| 646 | #endif |
---|
| 647 | #if JCTVC_M0458_INTERLAYER_RPS_SIG |
---|
| 648 | Bool getMaxOneActiveRefLayerFlag() { return m_maxOneActiveRefLayerFlag; } |
---|
| 649 | Void setMaxOneActiveRefLayerFlag(Bool x) { m_maxOneActiveRefLayerFlag = x; } |
---|
| 650 | #endif |
---|
| 651 | #if JCTVC_M0203_INTERLAYER_PRED_IDC |
---|
| 652 | Bool getMaxSublayerForIlpPlus1(Int layerId) { return m_maxSublayerForIlpPlus1[layerId]; } |
---|
| 653 | Void setMaxSublayerForIlpPlus1(Int layerId, UInt maxSublayer) { m_maxSublayerForIlpPlus1[layerId] = maxSublayer; } |
---|
| 654 | #endif |
---|
| 655 | #if M0040_ADAPTIVE_RESOLUTION_CHANGE |
---|
| 656 | Bool getSingleLayerForNonIrapFlag() { return m_singleLayerForNonIrapFlag; } |
---|
| 657 | Void setSingleLayerForNonIrapFlag(Bool x) { m_singleLayerForNonIrapFlag = x; } |
---|
| 658 | #endif |
---|
| 659 | }; |
---|
| 660 | |
---|
| 661 | class Window |
---|
| 662 | { |
---|
| 663 | private: |
---|
| 664 | Bool m_enabledFlag; |
---|
| 665 | Int m_winLeftOffset; |
---|
| 666 | Int m_winRightOffset; |
---|
| 667 | Int m_winTopOffset; |
---|
| 668 | Int m_winBottomOffset; |
---|
| 669 | public: |
---|
| 670 | Window() |
---|
| 671 | : m_enabledFlag (false) |
---|
| 672 | , m_winLeftOffset (0) |
---|
| 673 | , m_winRightOffset (0) |
---|
| 674 | , m_winTopOffset (0) |
---|
| 675 | , m_winBottomOffset (0) |
---|
| 676 | { } |
---|
| 677 | |
---|
| 678 | Bool getWindowEnabledFlag() const { return m_enabledFlag; } |
---|
| 679 | Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0; } |
---|
| 680 | Int getWindowLeftOffset() const { return m_enabledFlag ? m_winLeftOffset : 0; } |
---|
| 681 | Void setWindowLeftOffset(Int val) { m_winLeftOffset = val; m_enabledFlag = true; } |
---|
| 682 | Int getWindowRightOffset() const { return m_enabledFlag ? m_winRightOffset : 0; } |
---|
| 683 | Void setWindowRightOffset(Int val) { m_winRightOffset = val; m_enabledFlag = true; } |
---|
| 684 | Int getWindowTopOffset() const { return m_enabledFlag ? m_winTopOffset : 0; } |
---|
| 685 | Void setWindowTopOffset(Int val) { m_winTopOffset = val; m_enabledFlag = true; } |
---|
| 686 | Int getWindowBottomOffset() const { return m_enabledFlag ? m_winBottomOffset: 0; } |
---|
| 687 | Void setWindowBottomOffset(Int val) { m_winBottomOffset = val; m_enabledFlag = true; } |
---|
| 688 | |
---|
| 689 | Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom) |
---|
| 690 | { |
---|
| 691 | m_enabledFlag = true; |
---|
| 692 | m_winLeftOffset = offsetLeft; |
---|
| 693 | m_winRightOffset = offsetLRight; |
---|
| 694 | m_winTopOffset = offsetLTop; |
---|
| 695 | m_winBottomOffset = offsetLBottom; |
---|
| 696 | } |
---|
| 697 | }; |
---|
| 698 | |
---|
| 699 | |
---|
| 700 | class TComVUI |
---|
| 701 | { |
---|
| 702 | private: |
---|
| 703 | Bool m_aspectRatioInfoPresentFlag; |
---|
| 704 | Int m_aspectRatioIdc; |
---|
| 705 | Int m_sarWidth; |
---|
| 706 | Int m_sarHeight; |
---|
| 707 | Bool m_overscanInfoPresentFlag; |
---|
| 708 | Bool m_overscanAppropriateFlag; |
---|
| 709 | Bool m_videoSignalTypePresentFlag; |
---|
| 710 | Int m_videoFormat; |
---|
| 711 | Bool m_videoFullRangeFlag; |
---|
| 712 | Bool m_colourDescriptionPresentFlag; |
---|
| 713 | Int m_colourPrimaries; |
---|
| 714 | Int m_transferCharacteristics; |
---|
| 715 | Int m_matrixCoefficients; |
---|
| 716 | Bool m_chromaLocInfoPresentFlag; |
---|
| 717 | Int m_chromaSampleLocTypeTopField; |
---|
| 718 | Int m_chromaSampleLocTypeBottomField; |
---|
| 719 | Bool m_neutralChromaIndicationFlag; |
---|
| 720 | Bool m_fieldSeqFlag; |
---|
| 721 | |
---|
| 722 | Window m_defaultDisplayWindow; |
---|
| 723 | Bool m_frameFieldInfoPresentFlag; |
---|
| 724 | Bool m_hrdParametersPresentFlag; |
---|
| 725 | Bool m_bitstreamRestrictionFlag; |
---|
| 726 | Bool m_tilesFixedStructureFlag; |
---|
| 727 | Bool m_motionVectorsOverPicBoundariesFlag; |
---|
| 728 | Bool m_restrictedRefPicListsFlag; |
---|
| 729 | Int m_minSpatialSegmentationIdc; |
---|
| 730 | Int m_maxBytesPerPicDenom; |
---|
| 731 | Int m_maxBitsPerMinCuDenom; |
---|
| 732 | Int m_log2MaxMvLengthHorizontal; |
---|
| 733 | Int m_log2MaxMvLengthVertical; |
---|
| 734 | TComHRD m_hrdParameters; |
---|
| 735 | TimingInfo m_timingInfo; |
---|
| 736 | #if M0464_TILE_BOUNDARY_ALIGNED_FLAG |
---|
| 737 | Bool m_tileBoundariesAlignedFlag; |
---|
| 738 | #endif |
---|
| 739 | |
---|
| 740 | |
---|
| 741 | public: |
---|
| 742 | TComVUI() |
---|
| 743 | :m_aspectRatioInfoPresentFlag(false) |
---|
| 744 | ,m_aspectRatioIdc(0) |
---|
| 745 | ,m_sarWidth(0) |
---|
| 746 | ,m_sarHeight(0) |
---|
| 747 | ,m_overscanInfoPresentFlag(false) |
---|
| 748 | ,m_overscanAppropriateFlag(false) |
---|
| 749 | ,m_videoSignalTypePresentFlag(false) |
---|
| 750 | ,m_videoFormat(5) |
---|
| 751 | ,m_videoFullRangeFlag(false) |
---|
| 752 | ,m_colourDescriptionPresentFlag(false) |
---|
| 753 | ,m_colourPrimaries(2) |
---|
| 754 | ,m_transferCharacteristics(2) |
---|
| 755 | ,m_matrixCoefficients(2) |
---|
| 756 | ,m_chromaLocInfoPresentFlag(false) |
---|
| 757 | ,m_chromaSampleLocTypeTopField(0) |
---|
| 758 | ,m_chromaSampleLocTypeBottomField(0) |
---|
| 759 | ,m_neutralChromaIndicationFlag(false) |
---|
| 760 | ,m_fieldSeqFlag(false) |
---|
| 761 | ,m_frameFieldInfoPresentFlag(false) |
---|
| 762 | ,m_hrdParametersPresentFlag(false) |
---|
| 763 | ,m_bitstreamRestrictionFlag(false) |
---|
| 764 | ,m_tilesFixedStructureFlag(false) |
---|
| 765 | ,m_motionVectorsOverPicBoundariesFlag(true) |
---|
| 766 | ,m_restrictedRefPicListsFlag(1) |
---|
| 767 | ,m_minSpatialSegmentationIdc(0) |
---|
| 768 | ,m_maxBytesPerPicDenom(2) |
---|
| 769 | ,m_maxBitsPerMinCuDenom(1) |
---|
| 770 | ,m_log2MaxMvLengthHorizontal(15) |
---|
| 771 | ,m_log2MaxMvLengthVertical(15) |
---|
| 772 | #if M0464_TILE_BOUNDARY_ALIGNED_FLAG |
---|
| 773 | ,m_tileBoundariesAlignedFlag(true) |
---|
| 774 | #endif |
---|
| 775 | {} |
---|
| 776 | |
---|
| 777 | virtual ~TComVUI() {} |
---|
| 778 | |
---|
| 779 | Bool getAspectRatioInfoPresentFlag() { return m_aspectRatioInfoPresentFlag; } |
---|
| 780 | Void setAspectRatioInfoPresentFlag(Bool i) { m_aspectRatioInfoPresentFlag = i; } |
---|
| 781 | |
---|
| 782 | Int getAspectRatioIdc() { return m_aspectRatioIdc; } |
---|
| 783 | Void setAspectRatioIdc(Int i) { m_aspectRatioIdc = i; } |
---|
| 784 | |
---|
| 785 | Int getSarWidth() { return m_sarWidth; } |
---|
| 786 | Void setSarWidth(Int i) { m_sarWidth = i; } |
---|
| 787 | |
---|
| 788 | Int getSarHeight() { return m_sarHeight; } |
---|
| 789 | Void setSarHeight(Int i) { m_sarHeight = i; } |
---|
| 790 | |
---|
| 791 | Bool getOverscanInfoPresentFlag() { return m_overscanInfoPresentFlag; } |
---|
| 792 | Void setOverscanInfoPresentFlag(Bool i) { m_overscanInfoPresentFlag = i; } |
---|
| 793 | |
---|
| 794 | Bool getOverscanAppropriateFlag() { return m_overscanAppropriateFlag; } |
---|
| 795 | Void setOverscanAppropriateFlag(Bool i) { m_overscanAppropriateFlag = i; } |
---|
| 796 | |
---|
| 797 | Bool getVideoSignalTypePresentFlag() { return m_videoSignalTypePresentFlag; } |
---|
| 798 | Void setVideoSignalTypePresentFlag(Bool i) { m_videoSignalTypePresentFlag = i; } |
---|
| 799 | |
---|
| 800 | Int getVideoFormat() { return m_videoFormat; } |
---|
| 801 | Void setVideoFormat(Int i) { m_videoFormat = i; } |
---|
| 802 | |
---|
| 803 | Bool getVideoFullRangeFlag() { return m_videoFullRangeFlag; } |
---|
| 804 | Void setVideoFullRangeFlag(Bool i) { m_videoFullRangeFlag = i; } |
---|
| 805 | |
---|
| 806 | Bool getColourDescriptionPresentFlag() { return m_colourDescriptionPresentFlag; } |
---|
| 807 | Void setColourDescriptionPresentFlag(Bool i) { m_colourDescriptionPresentFlag = i; } |
---|
| 808 | |
---|
| 809 | Int getColourPrimaries() { return m_colourPrimaries; } |
---|
| 810 | Void setColourPrimaries(Int i) { m_colourPrimaries = i; } |
---|
| 811 | |
---|
| 812 | Int getTransferCharacteristics() { return m_transferCharacteristics; } |
---|
| 813 | Void setTransferCharacteristics(Int i) { m_transferCharacteristics = i; } |
---|
| 814 | |
---|
| 815 | Int getMatrixCoefficients() { return m_matrixCoefficients; } |
---|
| 816 | Void setMatrixCoefficients(Int i) { m_matrixCoefficients = i; } |
---|
| 817 | |
---|
| 818 | Bool getChromaLocInfoPresentFlag() { return m_chromaLocInfoPresentFlag; } |
---|
| 819 | Void setChromaLocInfoPresentFlag(Bool i) { m_chromaLocInfoPresentFlag = i; } |
---|
| 820 | |
---|
| 821 | Int getChromaSampleLocTypeTopField() { return m_chromaSampleLocTypeTopField; } |
---|
| 822 | Void setChromaSampleLocTypeTopField(Int i) { m_chromaSampleLocTypeTopField = i; } |
---|
| 823 | |
---|
| 824 | Int getChromaSampleLocTypeBottomField() { return m_chromaSampleLocTypeBottomField; } |
---|
| 825 | Void setChromaSampleLocTypeBottomField(Int i) { m_chromaSampleLocTypeBottomField = i; } |
---|
| 826 | |
---|
| 827 | Bool getNeutralChromaIndicationFlag() { return m_neutralChromaIndicationFlag; } |
---|
| 828 | Void setNeutralChromaIndicationFlag(Bool i) { m_neutralChromaIndicationFlag = i; } |
---|
| 829 | |
---|
| 830 | Bool getFieldSeqFlag() { return m_fieldSeqFlag; } |
---|
| 831 | Void setFieldSeqFlag(Bool i) { m_fieldSeqFlag = i; } |
---|
| 832 | |
---|
| 833 | Bool getFrameFieldInfoPresentFlag() { return m_frameFieldInfoPresentFlag; } |
---|
| 834 | Void setFrameFieldInfoPresentFlag(Bool i) { m_frameFieldInfoPresentFlag = i; } |
---|
| 835 | |
---|
| 836 | Window& getDefaultDisplayWindow() { return m_defaultDisplayWindow; } |
---|
| 837 | Void setDefaultDisplayWindow(Window& defaultDisplayWindow ) { m_defaultDisplayWindow = defaultDisplayWindow; } |
---|
| 838 | |
---|
| 839 | Bool getHrdParametersPresentFlag() { return m_hrdParametersPresentFlag; } |
---|
| 840 | Void setHrdParametersPresentFlag(Bool i) { m_hrdParametersPresentFlag = i; } |
---|
| 841 | |
---|
| 842 | Bool getBitstreamRestrictionFlag() { return m_bitstreamRestrictionFlag; } |
---|
| 843 | Void setBitstreamRestrictionFlag(Bool i) { m_bitstreamRestrictionFlag = i; } |
---|
| 844 | |
---|
| 845 | Bool getTilesFixedStructureFlag() { return m_tilesFixedStructureFlag; } |
---|
| 846 | Void setTilesFixedStructureFlag(Bool i) { m_tilesFixedStructureFlag = i; } |
---|
| 847 | |
---|
| 848 | Bool getMotionVectorsOverPicBoundariesFlag() { return m_motionVectorsOverPicBoundariesFlag; } |
---|
| 849 | Void setMotionVectorsOverPicBoundariesFlag(Bool i) { m_motionVectorsOverPicBoundariesFlag = i; } |
---|
| 850 | |
---|
| 851 | Bool getRestrictedRefPicListsFlag() { return m_restrictedRefPicListsFlag; } |
---|
| 852 | Void setRestrictedRefPicListsFlag(Bool b) { m_restrictedRefPicListsFlag = b; } |
---|
| 853 | |
---|
| 854 | Int getMinSpatialSegmentationIdc() { return m_minSpatialSegmentationIdc; } |
---|
| 855 | Void setMinSpatialSegmentationIdc(Int i) { m_minSpatialSegmentationIdc = i; } |
---|
| 856 | Int getMaxBytesPerPicDenom() { return m_maxBytesPerPicDenom; } |
---|
| 857 | Void setMaxBytesPerPicDenom(Int i) { m_maxBytesPerPicDenom = i; } |
---|
| 858 | |
---|
| 859 | Int getMaxBitsPerMinCuDenom() { return m_maxBitsPerMinCuDenom; } |
---|
| 860 | Void setMaxBitsPerMinCuDenom(Int i) { m_maxBitsPerMinCuDenom = i; } |
---|
| 861 | |
---|
| 862 | Int getLog2MaxMvLengthHorizontal() { return m_log2MaxMvLengthHorizontal; } |
---|
| 863 | Void setLog2MaxMvLengthHorizontal(Int i) { m_log2MaxMvLengthHorizontal = i; } |
---|
| 864 | |
---|
| 865 | Int getLog2MaxMvLengthVertical() { return m_log2MaxMvLengthVertical; } |
---|
| 866 | Void setLog2MaxMvLengthVertical(Int i) { m_log2MaxMvLengthVertical = i; } |
---|
| 867 | |
---|
| 868 | TComHRD* getHrdParameters () { return &m_hrdParameters; } |
---|
| 869 | TimingInfo* getTimingInfo() { return &m_timingInfo; } |
---|
| 870 | #if M0464_TILE_BOUNDARY_ALIGNED_FLAG |
---|
| 871 | Bool getTileBoundariesAlignedFlag( ) { return m_tileBoundariesAlignedFlag; } |
---|
| 872 | Void setTileBoundariesAlignedFlag( Bool flag ) { m_tileBoundariesAlignedFlag = flag; } |
---|
| 873 | #endif |
---|
| 874 | }; |
---|
| 875 | |
---|
| 876 | /// SPS class |
---|
| 877 | class TComSPS |
---|
| 878 | { |
---|
| 879 | private: |
---|
| 880 | Int m_SPSId; |
---|
| 881 | Int m_VPSId; |
---|
| 882 | Int m_chromaFormatIdc; |
---|
| 883 | |
---|
| 884 | UInt m_uiMaxTLayers; // maximum number of temporal layers |
---|
| 885 | |
---|
| 886 | // Structure |
---|
| 887 | UInt m_picWidthInLumaSamples; |
---|
| 888 | UInt m_picHeightInLumaSamples; |
---|
| 889 | |
---|
| 890 | Int m_log2MinCodingBlockSize; |
---|
| 891 | Int m_log2DiffMaxMinCodingBlockSize; |
---|
| 892 | UInt m_uiMaxCUWidth; |
---|
| 893 | UInt m_uiMaxCUHeight; |
---|
| 894 | UInt m_uiMaxCUDepth; |
---|
| 895 | |
---|
| 896 | Window m_conformanceWindow; |
---|
| 897 | |
---|
| 898 | TComRPSList m_RPSList; |
---|
| 899 | Bool m_bLongTermRefsPresent; |
---|
| 900 | Bool m_TMVPFlagsPresent; |
---|
| 901 | Int m_numReorderPics[MAX_TLAYER]; |
---|
| 902 | |
---|
| 903 | // Tool list |
---|
| 904 | UInt m_uiQuadtreeTULog2MaxSize; |
---|
| 905 | UInt m_uiQuadtreeTULog2MinSize; |
---|
| 906 | UInt m_uiQuadtreeTUMaxDepthInter; |
---|
| 907 | UInt m_uiQuadtreeTUMaxDepthIntra; |
---|
| 908 | Bool m_usePCM; |
---|
| 909 | UInt m_pcmLog2MaxSize; |
---|
| 910 | UInt m_uiPCMLog2MinSize; |
---|
| 911 | Bool m_useAMP; |
---|
| 912 | |
---|
| 913 | // Parameter |
---|
| 914 | Int m_bitDepthY; |
---|
| 915 | Int m_bitDepthC; |
---|
| 916 | Int m_qpBDOffsetY; |
---|
| 917 | Int m_qpBDOffsetC; |
---|
| 918 | |
---|
| 919 | Bool m_useLossless; |
---|
| 920 | |
---|
| 921 | UInt m_uiPCMBitDepthLuma; |
---|
| 922 | UInt m_uiPCMBitDepthChroma; |
---|
| 923 | Bool m_bPCMFilterDisableFlag; |
---|
| 924 | |
---|
| 925 | UInt m_uiBitsForPOC; |
---|
| 926 | UInt m_numLongTermRefPicSPS; |
---|
| 927 | UInt m_ltRefPicPocLsbSps[33]; |
---|
| 928 | Bool m_usedByCurrPicLtSPSFlag[33]; |
---|
| 929 | // Max physical transform size |
---|
| 930 | UInt m_uiMaxTrSize; |
---|
| 931 | |
---|
| 932 | Int m_iAMPAcc[MAX_CU_DEPTH]; |
---|
| 933 | Bool m_bUseSAO; |
---|
| 934 | |
---|
| 935 | Bool m_bTemporalIdNestingFlag; // temporal_id_nesting_flag |
---|
| 936 | |
---|
| 937 | Bool m_scalingListEnabledFlag; |
---|
| 938 | Bool m_scalingListPresentFlag; |
---|
| 939 | TComScalingList* m_scalingList; //!< ScalingList class pointer |
---|
| 940 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
| 941 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) |
---|
| 942 | |
---|
| 943 | Bool m_useDF; |
---|
| 944 | Bool m_useStrongIntraSmoothing; |
---|
| 945 | |
---|
| 946 | Bool m_vuiParametersPresentFlag; |
---|
| 947 | TComVUI m_vuiParameters; |
---|
| 948 | |
---|
| 949 | static const Int m_winUnitX[MAX_CHROMA_FORMAT_IDC+1]; |
---|
| 950 | static const Int m_winUnitY[MAX_CHROMA_FORMAT_IDC+1]; |
---|
| 951 | TComPTL m_pcPTL; |
---|
| 952 | |
---|
| 953 | #if M0463_VUI_EXT_ILP_REF |
---|
| 954 | Bool m_interViewMvVertConstraintFlag; |
---|
| 955 | Int m_numIlpRestrictedRefLayers ; |
---|
| 956 | Int m_minSpatialSegmentOffsetPlus1[MAX_LAYERS]; |
---|
| 957 | Bool m_ctuBasedOffsetEnabledFlag [MAX_LAYERS]; |
---|
| 958 | Int m_minHorizontalCtuOffsetPlus1 [MAX_LAYERS]; |
---|
| 959 | #endif |
---|
| 960 | |
---|
| 961 | #if SVC_EXTENSION |
---|
| 962 | UInt m_layerId; |
---|
| 963 | #endif |
---|
| 964 | #if REF_IDX_MFM |
---|
| 965 | #if !M0457_COL_PICTURE_SIGNALING |
---|
| 966 | Bool m_bMFMEnabledFlag; |
---|
| 967 | #endif |
---|
| 968 | #endif |
---|
| 969 | #if SCALED_REF_LAYER_OFFSETS |
---|
| 970 | UInt m_numScaledRefLayerOffsets; |
---|
| 971 | Window m_scaledRefLayerWindow[MAX_LAYERS]; |
---|
| 972 | #endif |
---|
| 973 | public: |
---|
| 974 | TComSPS(); |
---|
| 975 | virtual ~TComSPS(); |
---|
| 976 | |
---|
| 977 | Int getVPSId () { return m_VPSId; } |
---|
| 978 | Void setVPSId (Int i) { m_VPSId = i; } |
---|
| 979 | Int getSPSId () { return m_SPSId; } |
---|
| 980 | Void setSPSId (Int i) { m_SPSId = i; } |
---|
| 981 | Int getChromaFormatIdc () { return m_chromaFormatIdc; } |
---|
| 982 | Void setChromaFormatIdc (Int i) { m_chromaFormatIdc = i; } |
---|
| 983 | |
---|
| 984 | static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitX[chromaFormatIdc]; } |
---|
| 985 | static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc]; } |
---|
| 986 | |
---|
| 987 | // structure |
---|
| 988 | Void setPicWidthInLumaSamples ( UInt u ) { m_picWidthInLumaSamples = u; } |
---|
| 989 | UInt getPicWidthInLumaSamples () { return m_picWidthInLumaSamples; } |
---|
| 990 | Void setPicHeightInLumaSamples ( UInt u ) { m_picHeightInLumaSamples = u; } |
---|
| 991 | UInt getPicHeightInLumaSamples () { return m_picHeightInLumaSamples; } |
---|
| 992 | |
---|
| 993 | Window& getConformanceWindow() { return m_conformanceWindow; } |
---|
| 994 | Void setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; } |
---|
| 995 | |
---|
| 996 | UInt getNumLongTermRefPicSPS() { return m_numLongTermRefPicSPS; } |
---|
| 997 | Void setNumLongTermRefPicSPS(UInt val) { m_numLongTermRefPicSPS = val; } |
---|
| 998 | |
---|
| 999 | UInt getLtRefPicPocLsbSps(UInt index) { return m_ltRefPicPocLsbSps[index]; } |
---|
| 1000 | Void setLtRefPicPocLsbSps(UInt index, UInt val) { m_ltRefPicPocLsbSps[index] = val; } |
---|
| 1001 | |
---|
| 1002 | Bool getUsedByCurrPicLtSPSFlag(Int i) {return m_usedByCurrPicLtSPSFlag[i];} |
---|
| 1003 | Void setUsedByCurrPicLtSPSFlag(Int i, Bool x) { m_usedByCurrPicLtSPSFlag[i] = x;} |
---|
| 1004 | |
---|
| 1005 | Int getLog2MinCodingBlockSize() const { return m_log2MinCodingBlockSize; } |
---|
| 1006 | Void setLog2MinCodingBlockSize(Int val) { m_log2MinCodingBlockSize = val; } |
---|
| 1007 | Int getLog2DiffMaxMinCodingBlockSize() const { return m_log2DiffMaxMinCodingBlockSize; } |
---|
| 1008 | Void setLog2DiffMaxMinCodingBlockSize(Int val) { m_log2DiffMaxMinCodingBlockSize = val; } |
---|
| 1009 | |
---|
| 1010 | Void setMaxCUWidth ( UInt u ) { m_uiMaxCUWidth = u; } |
---|
| 1011 | UInt getMaxCUWidth () { return m_uiMaxCUWidth; } |
---|
| 1012 | Void setMaxCUHeight ( UInt u ) { m_uiMaxCUHeight = u; } |
---|
| 1013 | UInt getMaxCUHeight () { return m_uiMaxCUHeight; } |
---|
| 1014 | Void setMaxCUDepth ( UInt u ) { m_uiMaxCUDepth = u; } |
---|
| 1015 | UInt getMaxCUDepth () { return m_uiMaxCUDepth; } |
---|
| 1016 | Void setUsePCM ( Bool b ) { m_usePCM = b; } |
---|
| 1017 | Bool getUsePCM () { return m_usePCM; } |
---|
| 1018 | Void setPCMLog2MaxSize ( UInt u ) { m_pcmLog2MaxSize = u; } |
---|
| 1019 | UInt getPCMLog2MaxSize () { return m_pcmLog2MaxSize; } |
---|
| 1020 | Void setPCMLog2MinSize ( UInt u ) { m_uiPCMLog2MinSize = u; } |
---|
| 1021 | UInt getPCMLog2MinSize () { return m_uiPCMLog2MinSize; } |
---|
| 1022 | Void setBitsForPOC ( UInt u ) { m_uiBitsForPOC = u; } |
---|
| 1023 | UInt getBitsForPOC () { return m_uiBitsForPOC; } |
---|
| 1024 | Bool getUseAMP() { return m_useAMP; } |
---|
| 1025 | Void setUseAMP( Bool b ) { m_useAMP = b; } |
---|
| 1026 | Void setQuadtreeTULog2MaxSize( UInt u ) { m_uiQuadtreeTULog2MaxSize = u; } |
---|
| 1027 | UInt getQuadtreeTULog2MaxSize() { return m_uiQuadtreeTULog2MaxSize; } |
---|
| 1028 | Void setQuadtreeTULog2MinSize( UInt u ) { m_uiQuadtreeTULog2MinSize = u; } |
---|
| 1029 | UInt getQuadtreeTULog2MinSize() { return m_uiQuadtreeTULog2MinSize; } |
---|
| 1030 | Void setQuadtreeTUMaxDepthInter( UInt u ) { m_uiQuadtreeTUMaxDepthInter = u; } |
---|
| 1031 | Void setQuadtreeTUMaxDepthIntra( UInt u ) { m_uiQuadtreeTUMaxDepthIntra = u; } |
---|
| 1032 | UInt getQuadtreeTUMaxDepthInter() { return m_uiQuadtreeTUMaxDepthInter; } |
---|
| 1033 | UInt getQuadtreeTUMaxDepthIntra() { return m_uiQuadtreeTUMaxDepthIntra; } |
---|
| 1034 | Void setNumReorderPics(Int i, UInt tlayer) { m_numReorderPics[tlayer] = i; } |
---|
| 1035 | Int getNumReorderPics(UInt tlayer) { return m_numReorderPics[tlayer]; } |
---|
| 1036 | Void createRPSList( Int numRPS ); |
---|
| 1037 | TComRPSList* getRPSList() { return &m_RPSList; } |
---|
| 1038 | Bool getLongTermRefsPresent() { return m_bLongTermRefsPresent; } |
---|
| 1039 | Void setLongTermRefsPresent(Bool b) { m_bLongTermRefsPresent=b; } |
---|
| 1040 | Bool getTMVPFlagsPresent() { return m_TMVPFlagsPresent; } |
---|
| 1041 | Void setTMVPFlagsPresent(Bool b) { m_TMVPFlagsPresent=b; } |
---|
| 1042 | // physical transform |
---|
| 1043 | Void setMaxTrSize ( UInt u ) { m_uiMaxTrSize = u; } |
---|
| 1044 | UInt getMaxTrSize () { return m_uiMaxTrSize; } |
---|
| 1045 | |
---|
| 1046 | // Tool list |
---|
| 1047 | Bool getUseLossless () { return m_useLossless; } |
---|
| 1048 | Void setUseLossless ( Bool b ) { m_useLossless = b; } |
---|
| 1049 | |
---|
| 1050 | // AMP accuracy |
---|
| 1051 | Int getAMPAcc ( UInt uiDepth ) { return m_iAMPAcc[uiDepth]; } |
---|
| 1052 | Void setAMPAcc ( UInt uiDepth, Int iAccu ) { assert( uiDepth < g_uiMaxCUDepth); m_iAMPAcc[uiDepth] = iAccu; } |
---|
| 1053 | |
---|
| 1054 | // Bit-depth |
---|
| 1055 | Int getBitDepthY() { return m_bitDepthY; } |
---|
| 1056 | Void setBitDepthY(Int u) { m_bitDepthY = u; } |
---|
| 1057 | Int getBitDepthC() { return m_bitDepthC; } |
---|
| 1058 | Void setBitDepthC(Int u) { m_bitDepthC = u; } |
---|
| 1059 | Int getQpBDOffsetY () { return m_qpBDOffsetY; } |
---|
| 1060 | Void setQpBDOffsetY ( Int value ) { m_qpBDOffsetY = value; } |
---|
| 1061 | Int getQpBDOffsetC () { return m_qpBDOffsetC; } |
---|
| 1062 | Void setQpBDOffsetC ( Int value ) { m_qpBDOffsetC = value; } |
---|
| 1063 | Void setUseSAO (Bool bVal) {m_bUseSAO = bVal;} |
---|
| 1064 | Bool getUseSAO () {return m_bUseSAO;} |
---|
| 1065 | |
---|
| 1066 | UInt getMaxTLayers() { return m_uiMaxTLayers; } |
---|
| 1067 | Void setMaxTLayers( UInt uiMaxTLayers ) { assert( uiMaxTLayers <= MAX_TLAYER ); m_uiMaxTLayers = uiMaxTLayers; } |
---|
| 1068 | |
---|
| 1069 | Bool getTemporalIdNestingFlag() { return m_bTemporalIdNestingFlag; } |
---|
| 1070 | Void setTemporalIdNestingFlag( Bool bValue ) { m_bTemporalIdNestingFlag = bValue; } |
---|
| 1071 | UInt getPCMBitDepthLuma () { return m_uiPCMBitDepthLuma; } |
---|
| 1072 | Void setPCMBitDepthLuma ( UInt u ) { m_uiPCMBitDepthLuma = u; } |
---|
| 1073 | UInt getPCMBitDepthChroma () { return m_uiPCMBitDepthChroma; } |
---|
| 1074 | Void setPCMBitDepthChroma ( UInt u ) { m_uiPCMBitDepthChroma = u; } |
---|
| 1075 | Void setPCMFilterDisableFlag ( Bool bValue ) { m_bPCMFilterDisableFlag = bValue; } |
---|
| 1076 | Bool getPCMFilterDisableFlag () { return m_bPCMFilterDisableFlag; } |
---|
| 1077 | |
---|
| 1078 | Bool getScalingListFlag () { return m_scalingListEnabledFlag; } |
---|
| 1079 | Void setScalingListFlag ( Bool b ) { m_scalingListEnabledFlag = b; } |
---|
| 1080 | Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } |
---|
| 1081 | Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } |
---|
| 1082 | Void setScalingList ( TComScalingList *scalingList); |
---|
| 1083 | TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in SPS |
---|
| 1084 | UInt getMaxDecPicBuffering (UInt tlayer) { return m_uiMaxDecPicBuffering[tlayer]; } |
---|
| 1085 | Void setMaxDecPicBuffering ( UInt ui, UInt tlayer ) { m_uiMaxDecPicBuffering[tlayer] = ui; } |
---|
| 1086 | UInt getMaxLatencyIncrease (UInt tlayer) { return m_uiMaxLatencyIncrease[tlayer]; } |
---|
| 1087 | Void setMaxLatencyIncrease ( UInt ui , UInt tlayer) { m_uiMaxLatencyIncrease[tlayer] = ui; } |
---|
| 1088 | |
---|
| 1089 | Void setUseStrongIntraSmoothing (Bool bVal) {m_useStrongIntraSmoothing = bVal;} |
---|
| 1090 | Bool getUseStrongIntraSmoothing () {return m_useStrongIntraSmoothing;} |
---|
| 1091 | |
---|
| 1092 | Bool getVuiParametersPresentFlag() { return m_vuiParametersPresentFlag; } |
---|
| 1093 | Void setVuiParametersPresentFlag(Bool b) { m_vuiParametersPresentFlag = b; } |
---|
| 1094 | TComVUI* getVuiParameters() { return &m_vuiParameters; } |
---|
| 1095 | Void setHrdParameters( UInt frameRate, UInt numDU, UInt bitRate, Bool randomAccess ); |
---|
| 1096 | |
---|
| 1097 | TComPTL* getPTL() { return &m_pcPTL; } |
---|
| 1098 | |
---|
| 1099 | #if SVC_EXTENSION |
---|
| 1100 | #if M0463_VUI_EXT_ILP_REF |
---|
| 1101 | Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; } |
---|
| 1102 | Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;} |
---|
| 1103 | |
---|
| 1104 | //// sps_extension_vui_parameters( ) |
---|
| 1105 | Void setNumIlpRestrictedRefLayers ( Int val ) { m_numIlpRestrictedRefLayers = val;} |
---|
| 1106 | Int getNumIlpRestrictedRefLayers ( ) { return m_numIlpRestrictedRefLayers ;} |
---|
| 1107 | |
---|
| 1108 | Void setMinSpatialSegmentOffsetPlus1( Int i, Int val ) { m_minSpatialSegmentOffsetPlus1[ i ] = val;} |
---|
| 1109 | Int getMinSpatialSegmentOffsetPlus1( Int i ) { return m_minSpatialSegmentOffsetPlus1[ i ];} |
---|
| 1110 | |
---|
| 1111 | Void setCtuBasedOffsetEnabledFlag ( Int i, Bool flag ) { m_ctuBasedOffsetEnabledFlag [ i ] = flag;} |
---|
| 1112 | Bool getCtuBasedOffsetEnabledFlag ( Int i ) { return m_ctuBasedOffsetEnabledFlag [ i ];} |
---|
| 1113 | |
---|
| 1114 | Void setMinHorizontalCtuOffsetPlus1 ( Int i, Int val ) { m_minHorizontalCtuOffsetPlus1 [ i ] = val;} |
---|
| 1115 | Int getMinHorizontalCtuOffsetPlus1 ( Int i ) { return m_minHorizontalCtuOffsetPlus1 [ i ];} |
---|
| 1116 | #endif |
---|
| 1117 | Void setLayerId(UInt layerId) { m_layerId = layerId; } |
---|
| 1118 | UInt getLayerId() { return m_layerId; } |
---|
| 1119 | #endif |
---|
| 1120 | #if REF_IDX_MFM |
---|
| 1121 | #if !M0457_COL_PICTURE_SIGNALING |
---|
| 1122 | Void setMFMEnabledFlag(Bool flag) {m_bMFMEnabledFlag = flag;} |
---|
| 1123 | Bool getMFMEnabledFlag() {return m_bMFMEnabledFlag;} |
---|
| 1124 | #endif |
---|
| 1125 | #endif |
---|
| 1126 | #if SCALED_REF_LAYER_OFFSETS |
---|
| 1127 | UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } |
---|
| 1128 | Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } |
---|
| 1129 | Window& getScaledRefLayerWindow( Int x ) { return m_scaledRefLayerWindow[x]; } |
---|
| 1130 | #endif |
---|
| 1131 | }; |
---|
| 1132 | |
---|
| 1133 | /// Reference Picture Lists class |
---|
| 1134 | class TComRefPicListModification |
---|
| 1135 | { |
---|
| 1136 | private: |
---|
| 1137 | UInt m_bRefPicListModificationFlagL0; |
---|
| 1138 | UInt m_bRefPicListModificationFlagL1; |
---|
| 1139 | UInt m_RefPicSetIdxL0[32]; |
---|
| 1140 | UInt m_RefPicSetIdxL1[32]; |
---|
| 1141 | |
---|
| 1142 | public: |
---|
| 1143 | TComRefPicListModification(); |
---|
| 1144 | virtual ~TComRefPicListModification(); |
---|
| 1145 | |
---|
| 1146 | Void create (); |
---|
| 1147 | Void destroy (); |
---|
| 1148 | |
---|
| 1149 | Bool getRefPicListModificationFlagL0() { return m_bRefPicListModificationFlagL0; } |
---|
| 1150 | Void setRefPicListModificationFlagL0(Bool flag) { m_bRefPicListModificationFlagL0 = flag; } |
---|
| 1151 | Bool getRefPicListModificationFlagL1() { return m_bRefPicListModificationFlagL1; } |
---|
| 1152 | Void setRefPicListModificationFlagL1(Bool flag) { m_bRefPicListModificationFlagL1 = flag; } |
---|
| 1153 | Void setRefPicSetIdxL0(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL0[idx] = refPicSetIdx; } |
---|
| 1154 | UInt getRefPicSetIdxL0(UInt idx) { return m_RefPicSetIdxL0[idx]; } |
---|
| 1155 | Void setRefPicSetIdxL1(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL1[idx] = refPicSetIdx; } |
---|
| 1156 | UInt getRefPicSetIdxL1(UInt idx) { return m_RefPicSetIdxL1[idx]; } |
---|
| 1157 | }; |
---|
| 1158 | |
---|
| 1159 | /// PPS class |
---|
| 1160 | class TComPPS |
---|
| 1161 | { |
---|
| 1162 | private: |
---|
| 1163 | Int m_PPSId; // pic_parameter_set_id |
---|
| 1164 | Int m_SPSId; // seq_parameter_set_id |
---|
| 1165 | Int m_picInitQPMinus26; |
---|
| 1166 | Bool m_useDQP; |
---|
| 1167 | Bool m_bConstrainedIntraPred; // constrained_intra_pred_flag |
---|
| 1168 | Bool m_bSliceChromaQpFlag; // slicelevel_chroma_qp_flag |
---|
| 1169 | |
---|
| 1170 | // access channel |
---|
| 1171 | TComSPS* m_pcSPS; |
---|
| 1172 | UInt m_uiMaxCuDQPDepth; |
---|
| 1173 | UInt m_uiMinCuDQPSize; |
---|
| 1174 | |
---|
| 1175 | Int m_chromaCbQpOffset; |
---|
| 1176 | Int m_chromaCrQpOffset; |
---|
| 1177 | |
---|
| 1178 | UInt m_numRefIdxL0DefaultActive; |
---|
| 1179 | UInt m_numRefIdxL1DefaultActive; |
---|
| 1180 | |
---|
| 1181 | Bool m_bUseWeightPred; // Use of Weighting Prediction (P_SLICE) |
---|
| 1182 | Bool m_useWeightedBiPred; // Use of Weighting Bi-Prediction (B_SLICE) |
---|
| 1183 | Bool m_OutputFlagPresentFlag; // Indicates the presence of output_flag in slice header |
---|
| 1184 | |
---|
| 1185 | Bool m_TransquantBypassEnableFlag; // Indicates presence of cu_transquant_bypass_flag in CUs. |
---|
| 1186 | Bool m_useTransformSkip; |
---|
| 1187 | Bool m_dependentSliceSegmentsEnabledFlag; //!< Indicates the presence of dependent slices |
---|
| 1188 | Bool m_tilesEnabledFlag; //!< Indicates the presence of tiles |
---|
| 1189 | Bool m_entropyCodingSyncEnabledFlag; //!< Indicates the presence of wavefronts |
---|
| 1190 | |
---|
| 1191 | Bool m_loopFilterAcrossTilesEnabledFlag; |
---|
| 1192 | Int m_uniformSpacingFlag; |
---|
| 1193 | Int m_iNumColumnsMinus1; |
---|
| 1194 | UInt* m_puiColumnWidth; |
---|
| 1195 | Int m_iNumRowsMinus1; |
---|
| 1196 | UInt* m_puiRowHeight; |
---|
| 1197 | |
---|
| 1198 | Int m_iNumSubstreams; |
---|
| 1199 | |
---|
| 1200 | Int m_signHideFlag; |
---|
| 1201 | |
---|
| 1202 | Bool m_cabacInitPresentFlag; |
---|
| 1203 | UInt m_encCABACTableIdx; // Used to transmit table selection across slices |
---|
| 1204 | |
---|
| 1205 | Bool m_sliceHeaderExtensionPresentFlag; |
---|
| 1206 | Bool m_loopFilterAcrossSlicesEnabledFlag; |
---|
| 1207 | Bool m_deblockingFilterControlPresentFlag; |
---|
| 1208 | Bool m_deblockingFilterOverrideEnabledFlag; |
---|
| 1209 | Bool m_picDisableDeblockingFilterFlag; |
---|
| 1210 | Int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
| 1211 | Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
| 1212 | Bool m_scalingListPresentFlag; |
---|
| 1213 | TComScalingList* m_scalingList; //!< ScalingList class pointer |
---|
| 1214 | Bool m_listsModificationPresentFlag; |
---|
| 1215 | UInt m_log2ParallelMergeLevelMinus2; |
---|
| 1216 | Int m_numExtraSliceHeaderBits; |
---|
| 1217 | |
---|
| 1218 | public: |
---|
| 1219 | TComPPS(); |
---|
| 1220 | virtual ~TComPPS(); |
---|
| 1221 | |
---|
| 1222 | Int getPPSId () { return m_PPSId; } |
---|
| 1223 | Void setPPSId (Int i) { m_PPSId = i; } |
---|
| 1224 | Int getSPSId () { return m_SPSId; } |
---|
| 1225 | Void setSPSId (Int i) { m_SPSId = i; } |
---|
| 1226 | |
---|
| 1227 | Int getPicInitQPMinus26 () { return m_picInitQPMinus26; } |
---|
| 1228 | Void setPicInitQPMinus26 ( Int i ) { m_picInitQPMinus26 = i; } |
---|
| 1229 | Bool getUseDQP () { return m_useDQP; } |
---|
| 1230 | Void setUseDQP ( Bool b ) { m_useDQP = b; } |
---|
| 1231 | Bool getConstrainedIntraPred () { return m_bConstrainedIntraPred; } |
---|
| 1232 | Void setConstrainedIntraPred ( Bool b ) { m_bConstrainedIntraPred = b; } |
---|
| 1233 | Bool getSliceChromaQpFlag () { return m_bSliceChromaQpFlag; } |
---|
| 1234 | Void setSliceChromaQpFlag ( Bool b ) { m_bSliceChromaQpFlag = b; } |
---|
| 1235 | |
---|
| 1236 | Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
| 1237 | TComSPS* getSPS () { return m_pcSPS; } |
---|
| 1238 | Void setMaxCuDQPDepth ( UInt u ) { m_uiMaxCuDQPDepth = u; } |
---|
| 1239 | UInt getMaxCuDQPDepth () { return m_uiMaxCuDQPDepth;} |
---|
| 1240 | Void setMinCuDQPSize ( UInt u ) { m_uiMinCuDQPSize = u; } |
---|
| 1241 | UInt getMinCuDQPSize () { return m_uiMinCuDQPSize; } |
---|
| 1242 | |
---|
| 1243 | Void setChromaCbQpOffset( Int i ) { m_chromaCbQpOffset = i; } |
---|
| 1244 | Int getChromaCbQpOffset() { return m_chromaCbQpOffset; } |
---|
| 1245 | Void setChromaCrQpOffset( Int i ) { m_chromaCrQpOffset = i; } |
---|
| 1246 | Int getChromaCrQpOffset() { return m_chromaCrQpOffset; } |
---|
| 1247 | |
---|
| 1248 | Void setNumRefIdxL0DefaultActive(UInt ui) { m_numRefIdxL0DefaultActive=ui; } |
---|
| 1249 | UInt getNumRefIdxL0DefaultActive() { return m_numRefIdxL0DefaultActive; } |
---|
| 1250 | Void setNumRefIdxL1DefaultActive(UInt ui) { m_numRefIdxL1DefaultActive=ui; } |
---|
| 1251 | UInt getNumRefIdxL1DefaultActive() { return m_numRefIdxL1DefaultActive; } |
---|
| 1252 | |
---|
| 1253 | Bool getUseWP () { return m_bUseWeightPred; } |
---|
| 1254 | Bool getWPBiPred () { return m_useWeightedBiPred; } |
---|
| 1255 | Void setUseWP ( Bool b ) { m_bUseWeightPred = b; } |
---|
| 1256 | Void setWPBiPred ( Bool b ) { m_useWeightedBiPred = b; } |
---|
| 1257 | Void setOutputFlagPresentFlag( Bool b ) { m_OutputFlagPresentFlag = b; } |
---|
| 1258 | Bool getOutputFlagPresentFlag() { return m_OutputFlagPresentFlag; } |
---|
| 1259 | Void setTransquantBypassEnableFlag( Bool b ) { m_TransquantBypassEnableFlag = b; } |
---|
| 1260 | Bool getTransquantBypassEnableFlag() { return m_TransquantBypassEnableFlag; } |
---|
| 1261 | |
---|
| 1262 | Bool getUseTransformSkip () { return m_useTransformSkip; } |
---|
| 1263 | Void setUseTransformSkip ( Bool b ) { m_useTransformSkip = b; } |
---|
| 1264 | |
---|
| 1265 | Void setLoopFilterAcrossTilesEnabledFlag (Bool b) { m_loopFilterAcrossTilesEnabledFlag = b; } |
---|
| 1266 | Bool getLoopFilterAcrossTilesEnabledFlag () { return m_loopFilterAcrossTilesEnabledFlag; } |
---|
| 1267 | Bool getDependentSliceSegmentsEnabledFlag() const { return m_dependentSliceSegmentsEnabledFlag; } |
---|
| 1268 | Void setDependentSliceSegmentsEnabledFlag(Bool val) { m_dependentSliceSegmentsEnabledFlag = val; } |
---|
| 1269 | Bool getTilesEnabledFlag() const { return m_tilesEnabledFlag; } |
---|
| 1270 | Void setTilesEnabledFlag(Bool val) { m_tilesEnabledFlag = val; } |
---|
| 1271 | Bool getEntropyCodingSyncEnabledFlag() const { return m_entropyCodingSyncEnabledFlag; } |
---|
| 1272 | Void setEntropyCodingSyncEnabledFlag(Bool val) { m_entropyCodingSyncEnabledFlag = val; } |
---|
| 1273 | Void setUniformSpacingFlag ( Bool b ) { m_uniformSpacingFlag = b; } |
---|
| 1274 | Bool getUniformSpacingFlag () { return m_uniformSpacingFlag; } |
---|
| 1275 | Void setNumColumnsMinus1 ( Int i ) { m_iNumColumnsMinus1 = i; } |
---|
| 1276 | Int getNumColumnsMinus1 () { return m_iNumColumnsMinus1; } |
---|
| 1277 | Void setColumnWidth ( UInt* columnWidth ) |
---|
| 1278 | { |
---|
| 1279 | if( m_uniformSpacingFlag == 0 && m_iNumColumnsMinus1 > 0 ) |
---|
| 1280 | { |
---|
| 1281 | m_puiColumnWidth = new UInt[ m_iNumColumnsMinus1 ]; |
---|
| 1282 | |
---|
| 1283 | for(Int i=0; i<m_iNumColumnsMinus1; i++) |
---|
| 1284 | { |
---|
| 1285 | m_puiColumnWidth[i] = columnWidth[i]; |
---|
| 1286 | } |
---|
| 1287 | } |
---|
| 1288 | } |
---|
| 1289 | UInt getColumnWidth (UInt columnIdx) { return *( m_puiColumnWidth + columnIdx ); } |
---|
| 1290 | Void setNumRowsMinus1( Int i ) { m_iNumRowsMinus1 = i; } |
---|
| 1291 | Int getNumRowsMinus1() { return m_iNumRowsMinus1; } |
---|
| 1292 | Void setRowHeight ( UInt* rowHeight ) |
---|
| 1293 | { |
---|
| 1294 | if( m_uniformSpacingFlag == 0 && m_iNumRowsMinus1 > 0 ) |
---|
| 1295 | { |
---|
| 1296 | m_puiRowHeight = new UInt[ m_iNumRowsMinus1 ]; |
---|
| 1297 | |
---|
| 1298 | for(Int i=0; i<m_iNumRowsMinus1; i++) |
---|
| 1299 | { |
---|
| 1300 | m_puiRowHeight[i] = rowHeight[i]; |
---|
| 1301 | } |
---|
| 1302 | } |
---|
| 1303 | } |
---|
| 1304 | UInt getRowHeight (UInt rowIdx) { return *( m_puiRowHeight + rowIdx ); } |
---|
| 1305 | Void setNumSubstreams(Int iNumSubstreams) { m_iNumSubstreams = iNumSubstreams; } |
---|
| 1306 | Int getNumSubstreams() { return m_iNumSubstreams; } |
---|
| 1307 | |
---|
| 1308 | Void setSignHideFlag( Int signHideFlag ) { m_signHideFlag = signHideFlag; } |
---|
| 1309 | Int getSignHideFlag() { return m_signHideFlag; } |
---|
| 1310 | |
---|
| 1311 | Void setCabacInitPresentFlag( Bool flag ) { m_cabacInitPresentFlag = flag; } |
---|
| 1312 | Void setEncCABACTableIdx( Int idx ) { m_encCABACTableIdx = idx; } |
---|
| 1313 | Bool getCabacInitPresentFlag() { return m_cabacInitPresentFlag; } |
---|
| 1314 | UInt getEncCABACTableIdx() { return m_encCABACTableIdx; } |
---|
| 1315 | Void setDeblockingFilterControlPresentFlag( Bool val ) { m_deblockingFilterControlPresentFlag = val; } |
---|
| 1316 | Bool getDeblockingFilterControlPresentFlag() { return m_deblockingFilterControlPresentFlag; } |
---|
| 1317 | Void setDeblockingFilterOverrideEnabledFlag( Bool val ) { m_deblockingFilterOverrideEnabledFlag = val; } |
---|
| 1318 | Bool getDeblockingFilterOverrideEnabledFlag() { return m_deblockingFilterOverrideEnabledFlag; } |
---|
| 1319 | Void setPicDisableDeblockingFilterFlag(Bool val) { m_picDisableDeblockingFilterFlag = val; } //!< set offset for deblocking filter disabled |
---|
| 1320 | Bool getPicDisableDeblockingFilterFlag() { return m_picDisableDeblockingFilterFlag; } //!< get offset for deblocking filter disabled |
---|
| 1321 | Void setDeblockingFilterBetaOffsetDiv2(Int val) { m_deblockingFilterBetaOffsetDiv2 = val; } //!< set beta offset for deblocking filter |
---|
| 1322 | Int getDeblockingFilterBetaOffsetDiv2() { return m_deblockingFilterBetaOffsetDiv2; } //!< get beta offset for deblocking filter |
---|
| 1323 | Void setDeblockingFilterTcOffsetDiv2(Int val) { m_deblockingFilterTcOffsetDiv2 = val; } //!< set tc offset for deblocking filter |
---|
| 1324 | Int getDeblockingFilterTcOffsetDiv2() { return m_deblockingFilterTcOffsetDiv2; } //!< get tc offset for deblocking filter |
---|
| 1325 | Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } |
---|
| 1326 | Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } |
---|
| 1327 | Void setScalingList ( TComScalingList *scalingList); |
---|
| 1328 | TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in PPS |
---|
| 1329 | Bool getListsModificationPresentFlag () { return m_listsModificationPresentFlag; } |
---|
| 1330 | Void setListsModificationPresentFlag ( Bool b ) { m_listsModificationPresentFlag = b; } |
---|
| 1331 | UInt getLog2ParallelMergeLevelMinus2 () { return m_log2ParallelMergeLevelMinus2; } |
---|
| 1332 | Void setLog2ParallelMergeLevelMinus2 (UInt mrgLevel) { m_log2ParallelMergeLevelMinus2 = mrgLevel; } |
---|
| 1333 | Int getNumExtraSliceHeaderBits() { return m_numExtraSliceHeaderBits; } |
---|
| 1334 | Void setNumExtraSliceHeaderBits(Int i) { m_numExtraSliceHeaderBits = i; } |
---|
| 1335 | Void setLoopFilterAcrossSlicesEnabledFlag ( Bool bValue ) { m_loopFilterAcrossSlicesEnabledFlag = bValue; } |
---|
| 1336 | Bool getLoopFilterAcrossSlicesEnabledFlag () { return m_loopFilterAcrossSlicesEnabledFlag; } |
---|
| 1337 | Bool getSliceHeaderExtensionPresentFlag () { return m_sliceHeaderExtensionPresentFlag; } |
---|
| 1338 | Void setSliceHeaderExtensionPresentFlag (Bool val) { m_sliceHeaderExtensionPresentFlag = val; } |
---|
| 1339 | }; |
---|
| 1340 | |
---|
| 1341 | typedef struct |
---|
| 1342 | { |
---|
| 1343 | // Explicit weighted prediction parameters parsed in slice header, |
---|
| 1344 | // or Implicit weighted prediction parameters (8 bits depth values). |
---|
| 1345 | Bool bPresentFlag; |
---|
| 1346 | UInt uiLog2WeightDenom; |
---|
| 1347 | Int iWeight; |
---|
| 1348 | Int iOffset; |
---|
| 1349 | |
---|
| 1350 | // Weighted prediction scaling values built from above parameters (bitdepth scaled): |
---|
| 1351 | Int w, o, offset, shift, round; |
---|
| 1352 | } wpScalingParam; |
---|
| 1353 | |
---|
| 1354 | typedef struct |
---|
| 1355 | { |
---|
| 1356 | Int64 iAC; |
---|
| 1357 | Int64 iDC; |
---|
| 1358 | } wpACDCParam; |
---|
| 1359 | |
---|
| 1360 | /// slice header class |
---|
| 1361 | class TComSlice |
---|
| 1362 | { |
---|
| 1363 | |
---|
| 1364 | private: |
---|
| 1365 | // Bitstream writing |
---|
| 1366 | Bool m_saoEnabledFlag; |
---|
| 1367 | Bool m_saoEnabledFlagChroma; ///< SAO Cb&Cr enabled flag |
---|
| 1368 | Int m_iPPSId; ///< picture parameter set ID |
---|
| 1369 | Bool m_PicOutputFlag; ///< pic_output_flag |
---|
| 1370 | Int m_iPOC; |
---|
| 1371 | Int m_iLastIDR; |
---|
| 1372 | static Int m_prevPOC; |
---|
| 1373 | TComReferencePictureSet *m_pcRPS; |
---|
| 1374 | TComReferencePictureSet m_LocalRPS; |
---|
| 1375 | Int m_iBDidx; |
---|
| 1376 | TComRefPicListModification m_RefPicListModification; |
---|
| 1377 | NalUnitType m_eNalUnitType; ///< Nal unit type for the slice |
---|
| 1378 | SliceType m_eSliceType; |
---|
| 1379 | Int m_iSliceQp; |
---|
| 1380 | Bool m_dependentSliceSegmentFlag; |
---|
| 1381 | #if ADAPTIVE_QP_SELECTION |
---|
| 1382 | Int m_iSliceQpBase; |
---|
| 1383 | #endif |
---|
| 1384 | Bool m_deblockingFilterDisable; |
---|
| 1385 | Bool m_deblockingFilterOverrideFlag; //< offsets for deblocking filter inherit from PPS |
---|
| 1386 | Int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
| 1387 | Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
| 1388 | #if JCTVC_M0458_INTERLAYER_RPS_SIG |
---|
| 1389 | Int m_activeNumILRRefIdx; //< Active inter-layer reference pictures |
---|
| 1390 | Int m_interLayerPredLayerIdc [MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 1391 | #else |
---|
| 1392 | #if REF_IDX_FRAMEWORK |
---|
| 1393 | Int m_numILRRefIdx; //< for inter-layer reference picture ser |
---|
| 1394 | #endif |
---|
| 1395 | #endif |
---|
| 1396 | #if M0457_IL_SAMPLE_PRED_ONLY_FLAG |
---|
| 1397 | Int m_numSamplePredRefLayers; |
---|
| 1398 | Bool m_interLayerSamplePredOnlyFlag; |
---|
| 1399 | #endif |
---|
| 1400 | Int m_list1IdxToList0Idx[MAX_NUM_REF]; |
---|
| 1401 | Int m_aiNumRefIdx [2]; // for multiple reference of current slice |
---|
| 1402 | |
---|
| 1403 | Bool m_bCheckLDC; |
---|
| 1404 | |
---|
| 1405 | // Data |
---|
| 1406 | Int m_iSliceQpDelta; |
---|
| 1407 | Int m_iSliceQpDeltaCb; |
---|
| 1408 | Int m_iSliceQpDeltaCr; |
---|
| 1409 | TComPic* m_apcRefPicList [2][MAX_NUM_REF+1]; |
---|
| 1410 | Int m_aiRefPOCList [2][MAX_NUM_REF+1]; |
---|
| 1411 | Bool m_bIsUsedAsLongTerm[2][MAX_NUM_REF+1]; |
---|
| 1412 | Int m_iDepth; |
---|
| 1413 | |
---|
| 1414 | // referenced slice? |
---|
| 1415 | Bool m_bRefenced; |
---|
| 1416 | |
---|
| 1417 | #if SH_DISCARDABLE_FLAG |
---|
| 1418 | Bool m_bDiscardableFlag; |
---|
| 1419 | #endif |
---|
| 1420 | |
---|
| 1421 | // access channel |
---|
| 1422 | TComVPS* m_pcVPS; |
---|
| 1423 | TComSPS* m_pcSPS; |
---|
| 1424 | TComPPS* m_pcPPS; |
---|
| 1425 | TComPic* m_pcPic; |
---|
| 1426 | #if ADAPTIVE_QP_SELECTION |
---|
| 1427 | TComTrQuant* m_pcTrQuant; |
---|
| 1428 | #endif |
---|
| 1429 | UInt m_colFromL0Flag; // collocated picture from List0 flag |
---|
| 1430 | |
---|
| 1431 | UInt m_colRefIdx; |
---|
| 1432 | UInt m_maxNumMergeCand; |
---|
| 1433 | |
---|
| 1434 | |
---|
| 1435 | #if SAO_CHROMA_LAMBDA |
---|
| 1436 | Double m_dLambdaLuma; |
---|
| 1437 | Double m_dLambdaChroma; |
---|
| 1438 | #else |
---|
| 1439 | Double m_dLambda; |
---|
| 1440 | #endif |
---|
| 1441 | |
---|
| 1442 | Bool m_abEqualRef [2][MAX_NUM_REF][MAX_NUM_REF]; |
---|
| 1443 | UInt m_uiTLayer; |
---|
| 1444 | #if SVC_EXTENSION |
---|
| 1445 | UInt m_layerId; |
---|
| 1446 | TComPic* m_pcBaseColPic[MAX_LAYERS]; |
---|
| 1447 | TComPicYuv* m_pcFullPelBaseRec[MAX_LAYERS]; |
---|
| 1448 | #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING |
---|
| 1449 | Int m_numMotionPredRefLayers; |
---|
| 1450 | #if REF_IDX_MFM |
---|
| 1451 | Bool m_bMFMEnabledFlag; |
---|
| 1452 | Int m_colRefLayerIdx; |
---|
| 1453 | Bool m_altColIndicationFlag; |
---|
| 1454 | TComPic* m_pcIlpPic; |
---|
| 1455 | #endif |
---|
| 1456 | #endif |
---|
| 1457 | #endif |
---|
| 1458 | Bool m_bTLayerSwitchingFlag; |
---|
| 1459 | |
---|
| 1460 | UInt m_sliceMode; |
---|
| 1461 | UInt m_sliceArgument; |
---|
| 1462 | UInt m_sliceCurStartCUAddr; |
---|
| 1463 | UInt m_sliceCurEndCUAddr; |
---|
| 1464 | UInt m_sliceIdx; |
---|
| 1465 | UInt m_sliceSegmentMode; |
---|
| 1466 | UInt m_sliceSegmentArgument; |
---|
| 1467 | UInt m_sliceSegmentCurStartCUAddr; |
---|
| 1468 | UInt m_sliceSegmentCurEndCUAddr; |
---|
| 1469 | Bool m_nextSlice; |
---|
| 1470 | Bool m_nextSliceSegment; |
---|
| 1471 | UInt m_sliceBits; |
---|
| 1472 | UInt m_sliceSegmentBits; |
---|
| 1473 | Bool m_bFinalized; |
---|
| 1474 | |
---|
| 1475 | wpScalingParam m_weightPredTable[2][MAX_NUM_REF][3]; // [REF_PIC_LIST_0 or REF_PIC_LIST_1][refIdx][0:Y, 1:U, 2:V] |
---|
| 1476 | wpACDCParam m_weightACDCParam[3]; // [0:Y, 1:U, 2:V] |
---|
| 1477 | |
---|
| 1478 | std::vector<UInt> m_tileByteLocation; |
---|
| 1479 | UInt m_uiTileOffstForMultES; |
---|
| 1480 | |
---|
| 1481 | UInt* m_puiSubstreamSizes; |
---|
| 1482 | TComScalingList* m_scalingList; //!< pointer of quantization matrix |
---|
| 1483 | Bool m_cabacInitFlag; |
---|
| 1484 | |
---|
| 1485 | Bool m_bLMvdL1Zero; |
---|
| 1486 | Int m_numEntryPointOffsets; |
---|
| 1487 | Bool m_temporalLayerNonReferenceFlag; |
---|
| 1488 | Bool m_LFCrossSliceBoundaryFlag; |
---|
| 1489 | |
---|
| 1490 | Bool m_enableTMVPFlag; |
---|
| 1491 | #if JCTVC_M0458_INTERLAYER_RPS_SIG |
---|
| 1492 | Bool m_interLayerPredEnabledFlag; |
---|
| 1493 | #endif |
---|
| 1494 | public: |
---|
| 1495 | TComSlice(); |
---|
| 1496 | virtual ~TComSlice(); |
---|
| 1497 | #if SVC_EXTENSION |
---|
| 1498 | Void initSlice ( UInt layerId ); |
---|
| 1499 | #else |
---|
| 1500 | Void initSlice (); |
---|
| 1501 | #endif |
---|
| 1502 | |
---|
| 1503 | Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } |
---|
| 1504 | TComVPS* getVPS () { return m_pcVPS; } |
---|
| 1505 | Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
| 1506 | TComSPS* getSPS () { return m_pcSPS; } |
---|
| 1507 | |
---|
| 1508 | Void setPPS ( TComPPS* pcPPS ) { assert(pcPPS!=NULL); m_pcPPS = pcPPS; m_iPPSId = pcPPS->getPPSId(); } |
---|
| 1509 | TComPPS* getPPS () { return m_pcPPS; } |
---|
| 1510 | |
---|
| 1511 | #if ADAPTIVE_QP_SELECTION |
---|
| 1512 | Void setTrQuant ( TComTrQuant* pcTrQuant ) { m_pcTrQuant = pcTrQuant; } |
---|
| 1513 | TComTrQuant* getTrQuant () { return m_pcTrQuant; } |
---|
| 1514 | #endif |
---|
| 1515 | |
---|
| 1516 | Void setPPSId ( Int PPSId ) { m_iPPSId = PPSId; } |
---|
| 1517 | Int getPPSId () { return m_iPPSId; } |
---|
| 1518 | Void setPicOutputFlag( Bool b ) { m_PicOutputFlag = b; } |
---|
| 1519 | Bool getPicOutputFlag() { return m_PicOutputFlag; } |
---|
| 1520 | Void setSaoEnabledFlag(Bool s) {m_saoEnabledFlag =s; } |
---|
| 1521 | Bool getSaoEnabledFlag() { return m_saoEnabledFlag; } |
---|
| 1522 | Void setSaoEnabledFlagChroma(Bool s) {m_saoEnabledFlagChroma =s; } //!< set SAO Cb&Cr enabled flag |
---|
| 1523 | Bool getSaoEnabledFlagChroma() { return m_saoEnabledFlagChroma; } //!< get SAO Cb&Cr enabled flag |
---|
| 1524 | Void setRPS ( TComReferencePictureSet *pcRPS ) { m_pcRPS = pcRPS; } |
---|
| 1525 | TComReferencePictureSet* getRPS () { return m_pcRPS; } |
---|
| 1526 | TComReferencePictureSet* getLocalRPS () { return &m_LocalRPS; } |
---|
| 1527 | |
---|
| 1528 | Void setRPSidx ( Int iBDidx ) { m_iBDidx = iBDidx; } |
---|
| 1529 | Int getRPSidx () { return m_iBDidx; } |
---|
| 1530 | Int getPrevPOC () { return m_prevPOC; } |
---|
| 1531 | TComRefPicListModification* getRefPicListModification() { return &m_RefPicListModification; } |
---|
| 1532 | Void setLastIDR(Int iIDRPOC) { m_iLastIDR = iIDRPOC; } |
---|
| 1533 | Int getLastIDR() { return m_iLastIDR; } |
---|
| 1534 | SliceType getSliceType () { return m_eSliceType; } |
---|
| 1535 | Int getPOC () { return m_iPOC; } |
---|
| 1536 | Int getSliceQp () { return m_iSliceQp; } |
---|
| 1537 | Bool getDependentSliceSegmentFlag() const { return m_dependentSliceSegmentFlag; } |
---|
| 1538 | void setDependentSliceSegmentFlag(Bool val) { m_dependentSliceSegmentFlag = val; } |
---|
| 1539 | #if ADAPTIVE_QP_SELECTION |
---|
| 1540 | Int getSliceQpBase () { return m_iSliceQpBase; } |
---|
| 1541 | #endif |
---|
| 1542 | Int getSliceQpDelta () { return m_iSliceQpDelta; } |
---|
| 1543 | Int getSliceQpDeltaCb () { return m_iSliceQpDeltaCb; } |
---|
| 1544 | Int getSliceQpDeltaCr () { return m_iSliceQpDeltaCr; } |
---|
| 1545 | Bool getDeblockingFilterDisable() { return m_deblockingFilterDisable; } |
---|
| 1546 | Bool getDeblockingFilterOverrideFlag() { return m_deblockingFilterOverrideFlag; } |
---|
| 1547 | Int getDeblockingFilterBetaOffsetDiv2() { return m_deblockingFilterBetaOffsetDiv2; } |
---|
| 1548 | Int getDeblockingFilterTcOffsetDiv2() { return m_deblockingFilterTcOffsetDiv2; } |
---|
| 1549 | |
---|
| 1550 | Int getNumRefIdx ( RefPicList e ) { return m_aiNumRefIdx[e]; } |
---|
| 1551 | TComPic* getPic () { return m_pcPic; } |
---|
| 1552 | TComPic* getRefPic ( RefPicList e, Int iRefIdx) { return m_apcRefPicList[e][iRefIdx]; } |
---|
| 1553 | Int getRefPOC ( RefPicList e, Int iRefIdx) { return m_aiRefPOCList[e][iRefIdx]; } |
---|
| 1554 | Int getDepth () { return m_iDepth; } |
---|
| 1555 | UInt getColFromL0Flag () { return m_colFromL0Flag; } |
---|
| 1556 | UInt getColRefIdx () { return m_colRefIdx; } |
---|
| 1557 | Void checkColRefIdx (UInt curSliceIdx, TComPic* pic); |
---|
| 1558 | Bool getIsUsedAsLongTerm (Int i, Int j) { return m_bIsUsedAsLongTerm[i][j]; } |
---|
| 1559 | Bool getCheckLDC () { return m_bCheckLDC; } |
---|
| 1560 | Bool getMvdL1ZeroFlag () { return m_bLMvdL1Zero; } |
---|
| 1561 | Int getNumRpsCurrTempList(); |
---|
| 1562 | Int getList1IdxToList0Idx ( Int list1Idx ) { return m_list1IdxToList0Idx[list1Idx]; } |
---|
| 1563 | Void setReferenced(Bool b) { m_bRefenced = b; } |
---|
| 1564 | Bool isReferenced() { return m_bRefenced; } |
---|
| 1565 | Void setPOC ( Int i ) { m_iPOC = i; if(getTLayer()==0) m_prevPOC=i; } |
---|
| 1566 | Void setNalUnitType ( NalUnitType e ) { m_eNalUnitType = e; } |
---|
| 1567 | NalUnitType getNalUnitType () const { return m_eNalUnitType; } |
---|
| 1568 | Bool getRapPicFlag (); |
---|
| 1569 | Bool getIdrPicFlag () { return getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP; } |
---|
| 1570 | Bool isIRAP () const { return (getNalUnitType() >= 16) && (getNalUnitType() <= 23); } |
---|
| 1571 | #if RESTR_CHK |
---|
| 1572 | Bool isRADL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_R); } |
---|
| 1573 | Bool isRASL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_R); } |
---|
| 1574 | #endif |
---|
| 1575 | |
---|
| 1576 | #if SH_DISCARDABLE_FLAG |
---|
| 1577 | Bool getDiscardableFlag () { return m_bDiscardableFlag; } |
---|
| 1578 | Void setDiscardableFlag (Bool b) { m_bDiscardableFlag = b; } |
---|
| 1579 | #endif |
---|
| 1580 | |
---|
| 1581 | Void checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, Bool& prevRAPisBLA, TComList<TComPic *>& rcListPic); |
---|
| 1582 | Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic); |
---|
| 1583 | Void setSliceType ( SliceType e ) { m_eSliceType = e; } |
---|
| 1584 | Void setSliceQp ( Int i ) { m_iSliceQp = i; } |
---|
| 1585 | #if ADAPTIVE_QP_SELECTION |
---|
| 1586 | Void setSliceQpBase ( Int i ) { m_iSliceQpBase = i; } |
---|
| 1587 | #endif |
---|
| 1588 | Void setSliceQpDelta ( Int i ) { m_iSliceQpDelta = i; } |
---|
| 1589 | Void setSliceQpDeltaCb ( Int i ) { m_iSliceQpDeltaCb = i; } |
---|
| 1590 | Void setSliceQpDeltaCr ( Int i ) { m_iSliceQpDeltaCr = i; } |
---|
| 1591 | Void setDeblockingFilterDisable( Bool b ) { m_deblockingFilterDisable= b; } |
---|
| 1592 | Void setDeblockingFilterOverrideFlag( Bool b ) { m_deblockingFilterOverrideFlag = b; } |
---|
| 1593 | Void setDeblockingFilterBetaOffsetDiv2( Int i ) { m_deblockingFilterBetaOffsetDiv2 = i; } |
---|
| 1594 | Void setDeblockingFilterTcOffsetDiv2( Int i ) { m_deblockingFilterTcOffsetDiv2 = i; } |
---|
| 1595 | |
---|
| 1596 | Void setRefPic ( TComPic* p, RefPicList e, Int iRefIdx ) { m_apcRefPicList[e][iRefIdx] = p; } |
---|
| 1597 | Void setRefPOC ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefPOCList[e][iRefIdx] = i; } |
---|
| 1598 | Void setNumRefIdx ( RefPicList e, Int i ) { m_aiNumRefIdx[e] = i; } |
---|
| 1599 | Void setPic ( TComPic* p ) { m_pcPic = p; } |
---|
| 1600 | Void setDepth ( Int iDepth ) { m_iDepth = iDepth; } |
---|
| 1601 | |
---|
| 1602 | #if FIX1071 |
---|
| 1603 | #if SVC_EXTENSION |
---|
| 1604 | Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false, TComPic** ilpPic = NULL ); |
---|
| 1605 | #else |
---|
| 1606 | Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false ); |
---|
| 1607 | #endif |
---|
| 1608 | #else |
---|
| 1609 | Void setRefPicList ( TComList<TComPic*>& rcListPic ); |
---|
| 1610 | #endif |
---|
| 1611 | Void setRefPOCList (); |
---|
| 1612 | Void setColFromL0Flag ( UInt colFromL0 ) { m_colFromL0Flag = colFromL0; } |
---|
| 1613 | Void setColRefIdx ( UInt refIdx) { m_colRefIdx = refIdx; } |
---|
| 1614 | Void setCheckLDC ( Bool b ) { m_bCheckLDC = b; } |
---|
| 1615 | Void setMvdL1ZeroFlag ( Bool b) { m_bLMvdL1Zero = b; } |
---|
| 1616 | |
---|
| 1617 | Bool isIntra () { return m_eSliceType == I_SLICE; } |
---|
| 1618 | Bool isInterB () { return m_eSliceType == B_SLICE; } |
---|
| 1619 | Bool isInterP () { return m_eSliceType == P_SLICE; } |
---|
| 1620 | |
---|
| 1621 | #if SAO_CHROMA_LAMBDA |
---|
| 1622 | Void setLambda( Double d, Double e ) { m_dLambdaLuma = d; m_dLambdaChroma = e;} |
---|
| 1623 | Double getLambdaLuma() { return m_dLambdaLuma; } |
---|
| 1624 | Double getLambdaChroma() { return m_dLambdaChroma; } |
---|
| 1625 | #else |
---|
| 1626 | Void setLambda( Double d ) { m_dLambda = d; } |
---|
| 1627 | Double getLambda() { return m_dLambda; } |
---|
| 1628 | #endif |
---|
| 1629 | |
---|
| 1630 | Void initEqualRef(); |
---|
| 1631 | Bool isEqualRef ( RefPicList e, Int iRefIdx1, Int iRefIdx2 ) |
---|
| 1632 | { |
---|
| 1633 | if (iRefIdx1 < 0 || iRefIdx2 < 0) return false; |
---|
| 1634 | return m_abEqualRef[e][iRefIdx1][iRefIdx2]; |
---|
| 1635 | } |
---|
| 1636 | |
---|
| 1637 | Void setEqualRef( RefPicList e, Int iRefIdx1, Int iRefIdx2, Bool b) |
---|
| 1638 | { |
---|
| 1639 | m_abEqualRef[e][iRefIdx1][iRefIdx2] = m_abEqualRef[e][iRefIdx2][iRefIdx1] = b; |
---|
| 1640 | } |
---|
| 1641 | |
---|
| 1642 | static Void sortPicList ( TComList<TComPic*>& rcListPic ); |
---|
| 1643 | Void setList1IdxToList0Idx(); |
---|
| 1644 | |
---|
| 1645 | UInt getTLayer () { return m_uiTLayer; } |
---|
| 1646 | Void setTLayer ( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } |
---|
| 1647 | |
---|
| 1648 | Void setTLayerInfo( UInt uiTLayer ); |
---|
| 1649 | Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum ); |
---|
| 1650 | Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList); |
---|
| 1651 | Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); |
---|
| 1652 | Bool isStepwiseTemporalLayerSwitchingPointCandidate( TComList<TComPic*>& rcListPic ); |
---|
| 1653 | Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0); |
---|
| 1654 | #if FIX1071 |
---|
| 1655 | Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP); |
---|
| 1656 | #else |
---|
| 1657 | Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet); |
---|
| 1658 | #endif |
---|
| 1659 | |
---|
| 1660 | Void setMaxNumMergeCand (UInt val ) { m_maxNumMergeCand = val; } |
---|
| 1661 | UInt getMaxNumMergeCand () { return m_maxNumMergeCand; } |
---|
| 1662 | |
---|
| 1663 | Void setSliceMode ( UInt uiMode ) { m_sliceMode = uiMode; } |
---|
| 1664 | UInt getSliceMode () { return m_sliceMode; } |
---|
| 1665 | Void setSliceArgument ( UInt uiArgument ) { m_sliceArgument = uiArgument; } |
---|
| 1666 | UInt getSliceArgument () { return m_sliceArgument; } |
---|
| 1667 | Void setSliceCurStartCUAddr ( UInt uiAddr ) { m_sliceCurStartCUAddr = uiAddr; } |
---|
| 1668 | UInt getSliceCurStartCUAddr () { return m_sliceCurStartCUAddr; } |
---|
| 1669 | Void setSliceCurEndCUAddr ( UInt uiAddr ) { m_sliceCurEndCUAddr = uiAddr; } |
---|
| 1670 | UInt getSliceCurEndCUAddr () { return m_sliceCurEndCUAddr; } |
---|
| 1671 | Void setSliceIdx ( UInt i) { m_sliceIdx = i; } |
---|
| 1672 | UInt getSliceIdx () { return m_sliceIdx; } |
---|
| 1673 | Void copySliceInfo (TComSlice *pcSliceSrc); |
---|
| 1674 | Void setSliceSegmentMode ( UInt uiMode ) { m_sliceSegmentMode = uiMode; } |
---|
| 1675 | UInt getSliceSegmentMode () { return m_sliceSegmentMode; } |
---|
| 1676 | Void setSliceSegmentArgument ( UInt uiArgument ) { m_sliceSegmentArgument = uiArgument; } |
---|
| 1677 | UInt getSliceSegmentArgument () { return m_sliceSegmentArgument; } |
---|
| 1678 | Void setSliceSegmentCurStartCUAddr ( UInt uiAddr ) { m_sliceSegmentCurStartCUAddr = uiAddr; } |
---|
| 1679 | UInt getSliceSegmentCurStartCUAddr () { return m_sliceSegmentCurStartCUAddr; } |
---|
| 1680 | Void setSliceSegmentCurEndCUAddr ( UInt uiAddr ) { m_sliceSegmentCurEndCUAddr = uiAddr; } |
---|
| 1681 | UInt getSliceSegmentCurEndCUAddr () { return m_sliceSegmentCurEndCUAddr; } |
---|
| 1682 | Void setNextSlice ( Bool b ) { m_nextSlice = b; } |
---|
| 1683 | Bool isNextSlice () { return m_nextSlice; } |
---|
| 1684 | Void setNextSliceSegment ( Bool b ) { m_nextSliceSegment = b; } |
---|
| 1685 | Bool isNextSliceSegment () { return m_nextSliceSegment; } |
---|
| 1686 | Void setSliceBits ( UInt uiVal ) { m_sliceBits = uiVal; } |
---|
| 1687 | UInt getSliceBits () { return m_sliceBits; } |
---|
| 1688 | Void setSliceSegmentBits ( UInt uiVal ) { m_sliceSegmentBits = uiVal; } |
---|
| 1689 | UInt getSliceSegmentBits () { return m_sliceSegmentBits; } |
---|
| 1690 | Void setFinalized ( Bool uiVal ) { m_bFinalized = uiVal; } |
---|
| 1691 | Bool getFinalized () { return m_bFinalized; } |
---|
| 1692 | Void setWpScaling ( wpScalingParam wp[2][MAX_NUM_REF][3] ) { memcpy(m_weightPredTable, wp, sizeof(wpScalingParam)*2*MAX_NUM_REF*3); } |
---|
| 1693 | Void getWpScaling ( RefPicList e, Int iRefIdx, wpScalingParam *&wp); |
---|
| 1694 | |
---|
| 1695 | Void resetWpScaling (); |
---|
| 1696 | Void initWpScaling (); |
---|
| 1697 | inline Bool applyWP () { return( (m_eSliceType==P_SLICE && m_pcPPS->getUseWP()) || (m_eSliceType==B_SLICE && m_pcPPS->getWPBiPred()) ); } |
---|
| 1698 | |
---|
| 1699 | Void setWpAcDcParam ( wpACDCParam wp[3] ) { memcpy(m_weightACDCParam, wp, sizeof(wpACDCParam)*3); } |
---|
| 1700 | Void getWpAcDcParam ( wpACDCParam *&wp ); |
---|
| 1701 | Void initWpAcDcParam (); |
---|
| 1702 | |
---|
| 1703 | Void setTileLocationCount ( UInt cnt ) { return m_tileByteLocation.resize(cnt); } |
---|
| 1704 | UInt getTileLocationCount () { return (UInt) m_tileByteLocation.size(); } |
---|
| 1705 | Void setTileLocation ( Int idx, UInt location ) { assert (idx<m_tileByteLocation.size()); |
---|
| 1706 | m_tileByteLocation[idx] = location; } |
---|
| 1707 | Void addTileLocation ( UInt location ) { m_tileByteLocation.push_back(location); } |
---|
| 1708 | UInt getTileLocation ( Int idx ) { return m_tileByteLocation[idx]; } |
---|
| 1709 | |
---|
| 1710 | Void setTileOffstForMultES (UInt uiOffset ) { m_uiTileOffstForMultES = uiOffset; } |
---|
| 1711 | UInt getTileOffstForMultES () { return m_uiTileOffstForMultES; } |
---|
| 1712 | Void allocSubstreamSizes ( UInt uiNumSubstreams ); |
---|
| 1713 | UInt* getSubstreamSizes () { return m_puiSubstreamSizes; } |
---|
| 1714 | Void setScalingList ( TComScalingList* scalingList ) { m_scalingList = scalingList; } |
---|
| 1715 | TComScalingList* getScalingList () { return m_scalingList; } |
---|
| 1716 | Void setDefaultScalingList (); |
---|
| 1717 | Bool checkDefaultScalingList (); |
---|
| 1718 | Void setCabacInitFlag ( Bool val ) { m_cabacInitFlag = val; } //!< set CABAC initial flag |
---|
| 1719 | Bool getCabacInitFlag () { return m_cabacInitFlag; } //!< get CABAC initial flag |
---|
| 1720 | Void setNumEntryPointOffsets(Int val) { m_numEntryPointOffsets = val; } |
---|
| 1721 | Int getNumEntryPointOffsets() { return m_numEntryPointOffsets; } |
---|
| 1722 | Bool getTemporalLayerNonReferenceFlag() { return m_temporalLayerNonReferenceFlag;} |
---|
| 1723 | Void setTemporalLayerNonReferenceFlag(Bool x) { m_temporalLayerNonReferenceFlag = x;} |
---|
| 1724 | Void setLFCrossSliceBoundaryFlag ( Bool val ) { m_LFCrossSliceBoundaryFlag = val; } |
---|
| 1725 | Bool getLFCrossSliceBoundaryFlag () { return m_LFCrossSliceBoundaryFlag;} |
---|
| 1726 | |
---|
| 1727 | Void setEnableTMVPFlag ( Bool b ) { m_enableTMVPFlag = b; } |
---|
| 1728 | Bool getEnableTMVPFlag () { return m_enableTMVPFlag;} |
---|
| 1729 | |
---|
| 1730 | #if SVC_EXTENSION |
---|
| 1731 | Void setBaseColPic ( TComList<TComPic*>& rcListPic , UInt refLayerIdc ); |
---|
| 1732 | Void setBaseColPic (UInt refLayerIdc, TComPic* p) { m_pcBaseColPic[refLayerIdc] = p; } |
---|
| 1733 | TComPic* getBaseColPic (UInt refLayerIdc) { return m_pcBaseColPic[refLayerIdc]; } |
---|
| 1734 | TComPic** getBaseColPic () { return &m_pcBaseColPic[0]; } |
---|
| 1735 | |
---|
| 1736 | Void setLayerId (UInt layerId) { m_layerId = layerId; } |
---|
| 1737 | UInt getLayerId () { return m_layerId; } |
---|
| 1738 | |
---|
| 1739 | Void setFullPelBaseRec (UInt refLayerIdc, TComPicYuv* p) { m_pcFullPelBaseRec[refLayerIdc] = p; } |
---|
| 1740 | TComPicYuv* getFullPelBaseRec (UInt refLayerIdc) { return m_pcFullPelBaseRec[refLayerIdc]; } |
---|
| 1741 | |
---|
| 1742 | #if AVC_SYNTAX |
---|
| 1743 | Void initBaseLayerRPL( TComSlice *pcSlice ); |
---|
| 1744 | #endif |
---|
| 1745 | |
---|
| 1746 | #if REF_IDX_FRAMEWORK |
---|
| 1747 | Void setRefPicListModificationSvc(); |
---|
| 1748 | Int getNumILRRefIdx ( ) { return m_pcVPS->getNumDirectRefLayers( m_layerId ); } |
---|
| 1749 | |
---|
| 1750 | #if REF_IDX_MFM |
---|
| 1751 | Void setRefPOCListILP(TComPic** ilpPic, TComPic** pcRefPicRL); |
---|
| 1752 | #endif |
---|
| 1753 | |
---|
| 1754 | #if JCTVC_M0458_INTERLAYER_RPS_SIG |
---|
| 1755 | Int getActiveNumILRRefIdx ( ) { return m_activeNumILRRefIdx; } |
---|
| 1756 | Void setActiveNumILRRefIdx ( Int i ) { m_activeNumILRRefIdx = i; } |
---|
| 1757 | |
---|
| 1758 | Int getInterLayerPredLayerIdc (UInt layerIdx) { return m_interLayerPredLayerIdc[layerIdx];} |
---|
| 1759 | Void setInterLayerPredLayerIdc (UInt refLayerIdc, UInt layerIdx) { m_interLayerPredLayerIdc[layerIdx] = refLayerIdc; } |
---|
| 1760 | |
---|
| 1761 | Void setInterLayerPredEnabledFlag ( Bool val ) { m_interLayerPredEnabledFlag = val; } |
---|
| 1762 | Bool getInterLayerPredEnabledFlag () { return m_interLayerPredEnabledFlag;} |
---|
| 1763 | #else |
---|
| 1764 | Void setNumILRRefIdx ( Int i ) { m_numILRRefIdx = i; } |
---|
| 1765 | #endif |
---|
| 1766 | |
---|
| 1767 | #if M0457_IL_SAMPLE_PRED_ONLY_FLAG |
---|
| 1768 | Int getNumSamplePredRefLayers ( ) { return m_numSamplePredRefLayers; } |
---|
| 1769 | Void setNumSamplePredRefLayers ( Int i ) { m_numSamplePredRefLayers = i; } |
---|
| 1770 | Bool getInterLayerSamplePredOnlyFlag( ) { return m_interLayerSamplePredOnlyFlag; } |
---|
| 1771 | Void setInterLayerSamplePredOnlyFlag( Bool val ) { m_interLayerSamplePredOnlyFlag = val; } |
---|
| 1772 | #endif |
---|
| 1773 | |
---|
| 1774 | #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING |
---|
| 1775 | Void setNumMotionPredRefLayers(int i) { m_numMotionPredRefLayers = i; } |
---|
| 1776 | Int getNumMotionPredRefLayers() { return m_numMotionPredRefLayers; } |
---|
| 1777 | #if REF_IDX_MFM |
---|
| 1778 | Void setMFMEnabledFlag(Bool flag) { m_bMFMEnabledFlag = flag; } |
---|
| 1779 | Bool getMFMEnabledFlag() { return m_bMFMEnabledFlag; } |
---|
| 1780 | Void setColRefLayerIdx(Int i) { m_colRefLayerIdx = i; } |
---|
| 1781 | Int getColRefLayerIdx() { return m_colRefLayerIdx; } |
---|
| 1782 | Void setAltColIndicationFlag(Bool i) { m_altColIndicationFlag = i; } |
---|
| 1783 | Bool getAltColIndicationFlag() { return m_altColIndicationFlag; } |
---|
| 1784 | Void setMotionPredIlp(TComPic *ilpPic) { m_pcIlpPic = ilpPic; } |
---|
| 1785 | TComPic* getMotionPredIlp() { return m_pcIlpPic; } |
---|
| 1786 | #endif |
---|
| 1787 | #endif |
---|
| 1788 | |
---|
| 1789 | #else |
---|
| 1790 | // temporal solution for IntraBL. Only one reference layer is supported. |
---|
| 1791 | Int getActiveNumILRRefIdx ( ) { return 1; } |
---|
| 1792 | Int getInterLayerPredLayerIdc (UInt layerIdx) { return m_layerId - 1;} |
---|
| 1793 | Void setActiveNumILRRefIdx ( Int i ) {} |
---|
| 1794 | Void setInterLayerPredEnabledFlag( Bool val ) {} |
---|
| 1795 | #endif |
---|
| 1796 | |
---|
| 1797 | TComPic* getRefPic(TComList<TComPic*>& rcListPic, Int poc) { return xGetRefPic( rcListPic, poc ); } |
---|
| 1798 | |
---|
| 1799 | #endif //SVC_EXTENSION |
---|
| 1800 | |
---|
| 1801 | protected: |
---|
| 1802 | TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, |
---|
| 1803 | Int poc); |
---|
| 1804 | TComPic* xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb); |
---|
| 1805 | };// END CLASS DEFINITION TComSlice |
---|
| 1806 | |
---|
| 1807 | |
---|
| 1808 | template <class T> class ParameterSetMap |
---|
| 1809 | { |
---|
| 1810 | public: |
---|
| 1811 | ParameterSetMap(Int maxId) |
---|
| 1812 | :m_maxId (maxId) |
---|
| 1813 | {} |
---|
| 1814 | |
---|
| 1815 | ~ParameterSetMap() |
---|
| 1816 | { |
---|
| 1817 | for (typename std::map<Int,T *>::iterator i = m_paramsetMap.begin(); i!= m_paramsetMap.end(); i++) |
---|
| 1818 | { |
---|
| 1819 | delete (*i).second; |
---|
| 1820 | } |
---|
| 1821 | } |
---|
| 1822 | |
---|
| 1823 | Void storePS(Int psId, T *ps) |
---|
| 1824 | { |
---|
| 1825 | assert ( psId < m_maxId ); |
---|
| 1826 | if ( m_paramsetMap.find(psId) != m_paramsetMap.end() ) |
---|
| 1827 | { |
---|
| 1828 | delete m_paramsetMap[psId]; |
---|
| 1829 | } |
---|
| 1830 | m_paramsetMap[psId] = ps; |
---|
| 1831 | } |
---|
| 1832 | |
---|
| 1833 | Void mergePSList(ParameterSetMap<T> &rPsList) |
---|
| 1834 | { |
---|
| 1835 | for (typename std::map<Int,T *>::iterator i = rPsList.m_paramsetMap.begin(); i!= rPsList.m_paramsetMap.end(); i++) |
---|
| 1836 | { |
---|
| 1837 | storePS(i->first, i->second); |
---|
| 1838 | } |
---|
| 1839 | rPsList.m_paramsetMap.clear(); |
---|
| 1840 | } |
---|
| 1841 | |
---|
| 1842 | |
---|
| 1843 | T* getPS(Int psId) |
---|
| 1844 | { |
---|
| 1845 | return ( m_paramsetMap.find(psId) == m_paramsetMap.end() ) ? NULL : m_paramsetMap[psId]; |
---|
| 1846 | } |
---|
| 1847 | |
---|
| 1848 | T* getFirstPS() |
---|
| 1849 | { |
---|
| 1850 | return (m_paramsetMap.begin() == m_paramsetMap.end() ) ? NULL : m_paramsetMap.begin()->second; |
---|
| 1851 | } |
---|
| 1852 | |
---|
| 1853 | private: |
---|
| 1854 | std::map<Int,T *> m_paramsetMap; |
---|
| 1855 | Int m_maxId; |
---|
| 1856 | }; |
---|
| 1857 | |
---|
| 1858 | class ParameterSetManager |
---|
| 1859 | { |
---|
| 1860 | public: |
---|
| 1861 | ParameterSetManager(); |
---|
| 1862 | virtual ~ParameterSetManager(); |
---|
| 1863 | |
---|
| 1864 | //! store sequence parameter set and take ownership of it |
---|
| 1865 | Void storeVPS(TComVPS *vps) { m_vpsMap.storePS( vps->getVPSId(), vps); }; |
---|
| 1866 | //! get pointer to existing video parameter set |
---|
| 1867 | TComVPS* getVPS(Int vpsId) { return m_vpsMap.getPS(vpsId); }; |
---|
| 1868 | TComVPS* getFirstVPS() { return m_vpsMap.getFirstPS(); }; |
---|
| 1869 | |
---|
| 1870 | //! store sequence parameter set and take ownership of it |
---|
| 1871 | Void storeSPS(TComSPS *sps) { m_spsMap.storePS( sps->getSPSId(), sps); }; |
---|
| 1872 | //! get pointer to existing sequence parameter set |
---|
| 1873 | TComSPS* getSPS(Int spsId) { return m_spsMap.getPS(spsId); }; |
---|
| 1874 | TComSPS* getFirstSPS() { return m_spsMap.getFirstPS(); }; |
---|
| 1875 | |
---|
| 1876 | //! store picture parameter set and take ownership of it |
---|
| 1877 | Void storePPS(TComPPS *pps) { m_ppsMap.storePS( pps->getPPSId(), pps); }; |
---|
| 1878 | //! get pointer to existing picture parameter set |
---|
| 1879 | TComPPS* getPPS(Int ppsId) { return m_ppsMap.getPS(ppsId); }; |
---|
| 1880 | TComPPS* getFirstPPS() { return m_ppsMap.getFirstPS(); }; |
---|
| 1881 | |
---|
| 1882 | //! activate a SPS from a active parameter sets SEI message |
---|
| 1883 | //! \returns true, if activation is successful |
---|
| 1884 | Bool activateSPSWithSEI(Int SPSId); |
---|
| 1885 | |
---|
| 1886 | //! activate a PPS and depending on isIDR parameter also SPS and VPS |
---|
| 1887 | //! \returns true, if activation is successful |
---|
| 1888 | Bool activatePPS(Int ppsId, Bool isIRAP); |
---|
| 1889 | |
---|
| 1890 | TComVPS* getActiveVPS(){ return m_vpsMap.getPS(m_activeVPSId); }; |
---|
| 1891 | TComSPS* getActiveSPS(){ return m_spsMap.getPS(m_activeSPSId); }; |
---|
| 1892 | TComPPS* getActivePPS(){ return m_ppsMap.getPS(m_activePPSId); }; |
---|
| 1893 | |
---|
| 1894 | protected: |
---|
| 1895 | |
---|
| 1896 | #if SVC_EXTENSION |
---|
| 1897 | static ParameterSetMap<TComVPS> m_vpsMap; |
---|
| 1898 | #else |
---|
| 1899 | ParameterSetMap<TComVPS> m_vpsMap; |
---|
| 1900 | #endif |
---|
| 1901 | ParameterSetMap<TComSPS> m_spsMap; |
---|
| 1902 | ParameterSetMap<TComPPS> m_ppsMap; |
---|
| 1903 | |
---|
| 1904 | #if SVC_EXTENSION |
---|
| 1905 | static Int m_activeVPSId; |
---|
| 1906 | #else |
---|
| 1907 | Int m_activeVPSId; |
---|
| 1908 | #endif |
---|
| 1909 | Int m_activeSPSId; |
---|
| 1910 | Int m_activePPSId; |
---|
| 1911 | }; |
---|
| 1912 | |
---|
| 1913 | //! \} |
---|
| 1914 | |
---|
| 1915 | #endif // __TCOMSLICE__ |
---|