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