[1200] | 1 | /* The copyright in this software is being made available under the BSD |
---|
[5] | 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 |
---|
[1200] | 4 | * granted under this license. |
---|
[5] | 5 | * |
---|
[1200] | 6 | * Copyright (c) 2010-2015, ITU/ISO/IEC |
---|
[5] | 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. |
---|
[56] | 17 | * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may |
---|
[5] | 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 | */ |
---|
[2] | 33 | |
---|
| 34 | /** \file TComSlice.h |
---|
| 35 | \brief slice header and SPS class (header) |
---|
| 36 | */ |
---|
| 37 | |
---|
| 38 | #ifndef __TCOMSLICE__ |
---|
| 39 | #define __TCOMSLICE__ |
---|
| 40 | |
---|
[56] | 41 | #include <cstring> |
---|
| 42 | #include <map> |
---|
| 43 | #include <vector> |
---|
[2] | 44 | #include "CommonDef.h" |
---|
[56] | 45 | #include "TComRom.h" |
---|
[2] | 46 | #include "TComList.h" |
---|
[1200] | 47 | #include "TComChromaFormat.h" |
---|
| 48 | |
---|
[56] | 49 | //! \ingroup TLibCommon |
---|
| 50 | //! \{ |
---|
| 51 | |
---|
[2] | 52 | class TComPic; |
---|
[56] | 53 | class TComTrQuant; |
---|
[1200] | 54 | #if NH_MV |
---|
[608] | 55 | class TComPicLists; |
---|
[773] | 56 | class TComVPS; |
---|
[964] | 57 | class TComSPS; |
---|
[5] | 58 | #endif |
---|
[56] | 59 | // ==================================================================================================================== |
---|
| 60 | // Constants |
---|
| 61 | // ==================================================================================================================== |
---|
[2] | 62 | |
---|
[1200] | 63 | static const UInt REF_PIC_LIST_NUM_IDX=32; |
---|
| 64 | |
---|
[2] | 65 | // ==================================================================================================================== |
---|
| 66 | // Class definition |
---|
| 67 | // ==================================================================================================================== |
---|
| 68 | |
---|
[56] | 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; |
---|
[1200] | 81 | Int m_deltaRIdxMinus1; |
---|
| 82 | Int m_deltaRPS; |
---|
| 83 | Int m_numRefIdc; |
---|
[56] | 84 | Int m_refIdc[MAX_NUM_REF_PICS+1]; |
---|
[608] | 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]; |
---|
[56] | 89 | |
---|
| 90 | public: |
---|
[1200] | 91 | TComReferencePictureSet(); |
---|
[56] | 92 | virtual ~TComReferencePictureSet(); |
---|
[1200] | 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; |
---|
[56] | 105 | |
---|
[1200] | 106 | Int getUsed(Int bufferNum) const; |
---|
| 107 | Int getDeltaPOC(Int bufferNum) const; |
---|
| 108 | Int getPOC(Int bufferNum) const; |
---|
| 109 | Int getNumberOfPictures() const; |
---|
[608] | 110 | |
---|
[1200] | 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; } |
---|
[56] | 117 | |
---|
[1200] | 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; } |
---|
[56] | 126 | |
---|
[1200] | 127 | Void setRefIdc(Int bufferNum, Int refIdc); |
---|
| 128 | Int getRefIdc(Int bufferNum) const ; |
---|
[56] | 129 | |
---|
[1200] | 130 | Void sortDeltaPOC(); |
---|
| 131 | Void printDeltaPOC() const; |
---|
[964] | 132 | |
---|
[1200] | 133 | #if NH_MV |
---|
| 134 | Void checkMaxNumPics( Bool vpsExtensionFlag, Int maxNumPics, Int nuhLayerId, Int spsMaxDecPicBufferingMinus1 ) const; |
---|
[964] | 135 | #endif |
---|
[1200] | 136 | |
---|
[56] | 137 | }; |
---|
| 138 | |
---|
| 139 | /// Reference Picture Set set class |
---|
| 140 | class TComRPSList |
---|
| 141 | { |
---|
| 142 | private: |
---|
[1200] | 143 | std::vector<TComReferencePictureSet> m_referencePictureSets; |
---|
| 144 | |
---|
[56] | 145 | public: |
---|
[1200] | 146 | TComRPSList() { } |
---|
| 147 | virtual ~TComRPSList() { } |
---|
[56] | 148 | |
---|
[1200] | 149 | Void create (Int numberOfEntries) { m_referencePictureSets.resize(numberOfEntries); } |
---|
| 150 | Void destroy () { } |
---|
[56] | 151 | |
---|
[1200] | 152 | |
---|
| 153 | TComReferencePictureSet* getReferencePictureSet(Int referencePictureSetNum) { return &m_referencePictureSets[referencePictureSetNum]; } |
---|
| 154 | const TComReferencePictureSet* getReferencePictureSet(Int referencePictureSetNum) const { return &m_referencePictureSets[referencePictureSetNum]; } |
---|
| 155 | |
---|
| 156 | Int getNumberOfReferencePictureSets() const { return Int(m_referencePictureSets.size()); } |
---|
[56] | 157 | }; |
---|
| 158 | |
---|
[608] | 159 | /// SCALING_LIST class |
---|
| 160 | class TComScalingList |
---|
| 161 | { |
---|
| 162 | public: |
---|
[1200] | 163 | TComScalingList(); |
---|
| 164 | virtual ~TComScalingList() { } |
---|
| 165 | Int* getScalingListAddress(UInt sizeId, UInt listId) { return &(m_scalingListCoef[sizeId][listId][0]); } //!< get matrix coefficient |
---|
| 166 | const Int* getScalingListAddress(UInt sizeId, UInt listId) const { return &(m_scalingListCoef[sizeId][listId][0]); } //!< get matrix coefficient |
---|
| 167 | Void checkPredMode(UInt sizeId, UInt listId); |
---|
[608] | 168 | |
---|
[1200] | 169 | Void setRefMatrixId(UInt sizeId, UInt listId, UInt u) { m_refMatrixId[sizeId][listId] = u; } //!< set reference matrix ID |
---|
| 170 | UInt getRefMatrixId(UInt sizeId, UInt listId) const { return m_refMatrixId[sizeId][listId]; } //!< get reference matrix ID |
---|
| 171 | |
---|
| 172 | const Int* getScalingListDefaultAddress(UInt sizeId, UInt listId); //!< get default matrix coefficient |
---|
| 173 | Void processDefaultMatrix(UInt sizeId, UInt listId); |
---|
| 174 | |
---|
| 175 | Void setScalingListDC(UInt sizeId, UInt listId, UInt u) { m_scalingListDC[sizeId][listId] = u; } //!< set DC value |
---|
| 176 | Int getScalingListDC(UInt sizeId, UInt listId) const { return m_scalingListDC[sizeId][listId]; } //!< get DC value |
---|
| 177 | |
---|
| 178 | Void setScalingListPredModeFlag(UInt sizeId, UInt listId, Bool bIsDPCM) { m_scalingListPredModeFlagIsDPCM[sizeId][listId] = bIsDPCM; } |
---|
| 179 | Bool getScalingListPredModeFlag(UInt sizeId, UInt listId) const { return m_scalingListPredModeFlagIsDPCM[sizeId][listId]; } |
---|
| 180 | |
---|
| 181 | Void checkDcOfMatrix(); |
---|
| 182 | Void processRefMatrix(UInt sizeId, UInt listId , UInt refListId ); |
---|
| 183 | Bool xParseScalingList(Char* pchFile); |
---|
| 184 | #if NH_MV |
---|
| 185 | Void inferFrom ( const TComScalingList& srcScLi ); |
---|
[622] | 186 | #endif |
---|
[1200] | 187 | Void setDefaultScalingList(); |
---|
| 188 | Bool checkDefaultScalingList(); |
---|
[608] | 189 | |
---|
| 190 | private: |
---|
[1200] | 191 | Void outputScalingLists(std::ostream &os) const; |
---|
| 192 | Bool m_scalingListPredModeFlagIsDPCM [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< reference list index |
---|
| 193 | Int m_scalingListDC [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< the DC value of the matrix coefficient for 16x16 |
---|
| 194 | UInt m_refMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< RefMatrixID |
---|
| 195 | std::vector<Int> m_scalingListCoef [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< quantization matrix |
---|
[608] | 196 | }; |
---|
| 197 | |
---|
| 198 | class ProfileTierLevel |
---|
| 199 | { |
---|
[1200] | 200 | Int m_profileSpace; |
---|
| 201 | Level::Tier m_tierFlag; |
---|
| 202 | Profile::Name m_profileIdc; |
---|
| 203 | Bool m_profileCompatibilityFlag[32]; |
---|
| 204 | Level::Name m_levelIdc; |
---|
[608] | 205 | |
---|
[1200] | 206 | Bool m_progressiveSourceFlag; |
---|
| 207 | Bool m_interlacedSourceFlag; |
---|
| 208 | Bool m_nonPackedConstraintFlag; |
---|
| 209 | Bool m_frameOnlyConstraintFlag; |
---|
| 210 | UInt m_bitDepthConstraintValue; |
---|
| 211 | ChromaFormat m_chromaFormatConstraintValue; |
---|
| 212 | Bool m_intraConstraintFlag; |
---|
| 213 | Bool m_onePictureOnlyConstraintFlag; |
---|
| 214 | Bool m_lowerBitRateConstraintFlag; |
---|
| 215 | #if NH_MV |
---|
| 216 | Bool m_max12bitConstraintFlag; |
---|
| 217 | Bool m_max10bitConstraintFlag; |
---|
| 218 | Bool m_max8bitConstraintFlag; |
---|
| 219 | Bool m_max422chromaConstraintFlag; |
---|
| 220 | Bool m_max420chromaConstraintFlag; |
---|
| 221 | Bool m_maxMonochromeConstraintFlag; |
---|
| 222 | Bool m_inbldFlag; |
---|
[1066] | 223 | #endif |
---|
[608] | 224 | public: |
---|
[1200] | 225 | ProfileTierLevel(); |
---|
[608] | 226 | |
---|
[1200] | 227 | Int getProfileSpace() const { return m_profileSpace; } |
---|
| 228 | Void setProfileSpace(Int x) { m_profileSpace = x; } |
---|
[608] | 229 | |
---|
[1200] | 230 | Level::Tier getTierFlag() const { return m_tierFlag; } |
---|
| 231 | Void setTierFlag(Level::Tier x) { m_tierFlag = x; } |
---|
[608] | 232 | |
---|
[1200] | 233 | Profile::Name getProfileIdc() const { return m_profileIdc; } |
---|
| 234 | Void setProfileIdc(Profile::Name x) { m_profileIdc = x; } |
---|
[608] | 235 | |
---|
[1200] | 236 | Bool getProfileCompatibilityFlag(Int i) const { return m_profileCompatibilityFlag[i]; } |
---|
| 237 | Void setProfileCompatibilityFlag(Int i, Bool x) { m_profileCompatibilityFlag[i] = x; } |
---|
[608] | 238 | |
---|
[1200] | 239 | Level::Name getLevelIdc() const { return m_levelIdc; } |
---|
| 240 | Void setLevelIdc(Level::Name x) { m_levelIdc = x; } |
---|
[1066] | 241 | |
---|
[1200] | 242 | Bool getProgressiveSourceFlag() const { return m_progressiveSourceFlag; } |
---|
| 243 | Void setProgressiveSourceFlag(Bool b) { m_progressiveSourceFlag = b; } |
---|
| 244 | |
---|
| 245 | Bool getInterlacedSourceFlag() const { return m_interlacedSourceFlag; } |
---|
| 246 | Void setInterlacedSourceFlag(Bool b) { m_interlacedSourceFlag = b; } |
---|
| 247 | |
---|
| 248 | Bool getNonPackedConstraintFlag() const { return m_nonPackedConstraintFlag; } |
---|
| 249 | Void setNonPackedConstraintFlag(Bool b) { m_nonPackedConstraintFlag = b; } |
---|
| 250 | |
---|
| 251 | Bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; } |
---|
| 252 | Void setFrameOnlyConstraintFlag(Bool b) { m_frameOnlyConstraintFlag = b; } |
---|
| 253 | |
---|
| 254 | UInt getBitDepthConstraint() const { return m_bitDepthConstraintValue; } |
---|
| 255 | Void setBitDepthConstraint(UInt bitDepth) { m_bitDepthConstraintValue=bitDepth; } |
---|
| 256 | |
---|
| 257 | ChromaFormat getChromaFormatConstraint() const { return m_chromaFormatConstraintValue; } |
---|
| 258 | Void setChromaFormatConstraint(ChromaFormat fmt) { m_chromaFormatConstraintValue=fmt; } |
---|
| 259 | |
---|
| 260 | Bool getIntraConstraintFlag() const { return m_intraConstraintFlag; } |
---|
| 261 | Void setIntraConstraintFlag(Bool b) { m_intraConstraintFlag = b; } |
---|
| 262 | |
---|
| 263 | Bool getOnePictureOnlyConstraintFlag() const { return m_onePictureOnlyConstraintFlag;} |
---|
| 264 | Void setOnePictureOnlyConstraintFlag(Bool b) { m_onePictureOnlyConstraintFlag = b; } |
---|
| 265 | |
---|
| 266 | Bool getLowerBitRateConstraintFlag() const { return m_lowerBitRateConstraintFlag; } |
---|
| 267 | Void setLowerBitRateConstraintFlag(Bool b) { m_lowerBitRateConstraintFlag = b; } |
---|
| 268 | |
---|
| 269 | #if NH_MV |
---|
| 270 | Void setMax12bitConstraintFlag( Bool flag ) { m_max12bitConstraintFlag = flag; } |
---|
| 271 | Bool getMax12bitConstraintFlag( ) const { return m_max12bitConstraintFlag; } |
---|
| 272 | |
---|
| 273 | Void setMax10bitConstraintFlag( Bool flag ) { m_max10bitConstraintFlag = flag; } |
---|
| 274 | Bool getMax10bitConstraintFlag( ) const { return m_max10bitConstraintFlag; } |
---|
| 275 | |
---|
| 276 | Void setMax8bitConstraintFlag( Bool flag ) { m_max8bitConstraintFlag = flag; } |
---|
| 277 | Bool getMax8bitConstraintFlag( ) const { return m_max8bitConstraintFlag; } |
---|
| 278 | |
---|
| 279 | Void setMax422chromaConstraintFlag( Bool flag ) { m_max422chromaConstraintFlag = flag; } |
---|
| 280 | Bool getMax422chromaConstraintFlag( ) const { return m_max422chromaConstraintFlag; } |
---|
| 281 | |
---|
| 282 | Void setMax420chromaConstraintFlag( Bool flag ) { m_max420chromaConstraintFlag = flag; } |
---|
| 283 | Bool getMax420chromaConstraintFlag( ) const { return m_max420chromaConstraintFlag; } |
---|
| 284 | |
---|
| 285 | Void setMaxMonochromeConstraintFlag( Bool flag ) { m_maxMonochromeConstraintFlag = flag; } |
---|
| 286 | Bool getMaxMonochromeConstraintFlag( ) const { return m_maxMonochromeConstraintFlag; } |
---|
| 287 | |
---|
| 288 | Void setInbldFlag( Bool flag ) { m_inbldFlag = flag; } |
---|
| 289 | Bool getInbldFlag( ) const { return m_inbldFlag; } |
---|
| 290 | |
---|
| 291 | Bool getV2ConstraintsPresentFlag() const; |
---|
| 292 | Bool getInbldPresentFlag() const; |
---|
| 293 | |
---|
| 294 | Void copyV2ConstraintFlags( ProfileTierLevel* ptlRef ); |
---|
| 295 | Void copyProfile( ProfileTierLevel* ptlRef ); |
---|
[1066] | 296 | #endif |
---|
[1200] | 297 | |
---|
[608] | 298 | }; |
---|
| 299 | |
---|
| 300 | |
---|
| 301 | class TComPTL |
---|
| 302 | { |
---|
| 303 | ProfileTierLevel m_generalPTL; |
---|
[964] | 304 | ProfileTierLevel m_subLayerPTL [MAX_TLAYER-1]; // max. value of max_sub_layers_minus1 is MAX_TLAYER-1 (= 6) |
---|
| 305 | Bool m_subLayerProfilePresentFlag [MAX_TLAYER-1]; |
---|
| 306 | Bool m_subLayerLevelPresentFlag [MAX_TLAYER-1]; |
---|
[608] | 307 | |
---|
| 308 | public: |
---|
[1200] | 309 | TComPTL(); |
---|
| 310 | Bool getSubLayerProfilePresentFlag(Int i) const { return m_subLayerProfilePresentFlag[i]; } |
---|
| 311 | Void setSubLayerProfilePresentFlag(Int i, Bool x) { m_subLayerProfilePresentFlag[i] = x; } |
---|
[608] | 312 | |
---|
[1200] | 313 | Bool getSubLayerLevelPresentFlag(Int i) const { return m_subLayerLevelPresentFlag[i]; } |
---|
| 314 | Void setSubLayerLevelPresentFlag(Int i, Bool x) { m_subLayerLevelPresentFlag[i] = x; } |
---|
| 315 | |
---|
| 316 | ProfileTierLevel* getGeneralPTL() { return &m_generalPTL; } |
---|
| 317 | const ProfileTierLevel* getGeneralPTL() const { return &m_generalPTL; } |
---|
| 318 | ProfileTierLevel* getSubLayerPTL(Int i) { return &m_subLayerPTL[i]; } |
---|
| 319 | const ProfileTierLevel* getSubLayerPTL(Int i) const { return &m_subLayerPTL[i]; } |
---|
| 320 | |
---|
| 321 | #if NH_MV |
---|
| 322 | Void inferGeneralValues ( Bool profilePresentFlag , Int k, TComPTL* refPTL );; |
---|
| 323 | Void inferSubLayerValues( Int maxNumSubLayersMinus1, Int k, TComPTL* refPTL );; |
---|
[608] | 324 | #endif |
---|
[1200] | 325 | |
---|
[608] | 326 | }; |
---|
[1200] | 327 | |
---|
[77] | 328 | /// VPS class |
---|
| 329 | |
---|
[608] | 330 | struct HrdSubLayerInfo |
---|
| 331 | { |
---|
| 332 | Bool fixedPicRateFlag; |
---|
| 333 | Bool fixedPicRateWithinCvsFlag; |
---|
| 334 | UInt picDurationInTcMinus1; |
---|
| 335 | Bool lowDelayHrdFlag; |
---|
| 336 | UInt cpbCntMinus1; |
---|
| 337 | UInt bitRateValueMinus1[MAX_CPB_CNT][2]; |
---|
| 338 | UInt cpbSizeValue [MAX_CPB_CNT][2]; |
---|
| 339 | UInt ducpbSizeValue [MAX_CPB_CNT][2]; |
---|
[1200] | 340 | Bool cbrFlag [MAX_CPB_CNT][2]; |
---|
[608] | 341 | UInt duBitRateValue [MAX_CPB_CNT][2]; |
---|
| 342 | }; |
---|
| 343 | |
---|
| 344 | class TComHRD |
---|
| 345 | { |
---|
| 346 | private: |
---|
| 347 | Bool m_nalHrdParametersPresentFlag; |
---|
| 348 | Bool m_vclHrdParametersPresentFlag; |
---|
| 349 | Bool m_subPicCpbParamsPresentFlag; |
---|
| 350 | UInt m_tickDivisorMinus2; |
---|
| 351 | UInt m_duCpbRemovalDelayLengthMinus1; |
---|
| 352 | Bool m_subPicCpbParamsInPicTimingSEIFlag; |
---|
| 353 | UInt m_dpbOutputDelayDuLengthMinus1; |
---|
| 354 | UInt m_bitRateScale; |
---|
| 355 | UInt m_cpbSizeScale; |
---|
| 356 | UInt m_ducpbSizeScale; |
---|
| 357 | UInt m_initialCpbRemovalDelayLengthMinus1; |
---|
| 358 | UInt m_cpbRemovalDelayLengthMinus1; |
---|
| 359 | UInt m_dpbOutputDelayLengthMinus1; |
---|
| 360 | HrdSubLayerInfo m_HRD[MAX_TLAYER]; |
---|
| 361 | |
---|
| 362 | public: |
---|
| 363 | TComHRD() |
---|
[1200] | 364 | :m_nalHrdParametersPresentFlag (0) |
---|
| 365 | ,m_vclHrdParametersPresentFlag (0) |
---|
| 366 | ,m_subPicCpbParamsPresentFlag (false) |
---|
| 367 | ,m_tickDivisorMinus2 (0) |
---|
| 368 | ,m_duCpbRemovalDelayLengthMinus1 (0) |
---|
| 369 | ,m_subPicCpbParamsInPicTimingSEIFlag (false) |
---|
| 370 | ,m_dpbOutputDelayDuLengthMinus1 (0) |
---|
| 371 | ,m_bitRateScale (0) |
---|
| 372 | ,m_cpbSizeScale (0) |
---|
| 373 | ,m_initialCpbRemovalDelayLengthMinus1(23) |
---|
| 374 | ,m_cpbRemovalDelayLengthMinus1 (23) |
---|
| 375 | ,m_dpbOutputDelayLengthMinus1 (23) |
---|
[608] | 376 | {} |
---|
| 377 | |
---|
| 378 | virtual ~TComHRD() {} |
---|
| 379 | |
---|
[1200] | 380 | Void setNalHrdParametersPresentFlag( Bool flag ) { m_nalHrdParametersPresentFlag = flag; } |
---|
| 381 | Bool getNalHrdParametersPresentFlag( ) const { return m_nalHrdParametersPresentFlag; } |
---|
[608] | 382 | |
---|
[1200] | 383 | Void setVclHrdParametersPresentFlag( Bool flag ) { m_vclHrdParametersPresentFlag = flag; } |
---|
| 384 | Bool getVclHrdParametersPresentFlag( ) const { return m_vclHrdParametersPresentFlag; } |
---|
[608] | 385 | |
---|
[1200] | 386 | Void setSubPicCpbParamsPresentFlag( Bool flag ) { m_subPicCpbParamsPresentFlag = flag; } |
---|
| 387 | Bool getSubPicCpbParamsPresentFlag( ) const { return m_subPicCpbParamsPresentFlag; } |
---|
[608] | 388 | |
---|
[1200] | 389 | Void setTickDivisorMinus2( UInt value ) { m_tickDivisorMinus2 = value; } |
---|
| 390 | UInt getTickDivisorMinus2( ) const { return m_tickDivisorMinus2; } |
---|
[608] | 391 | |
---|
[1200] | 392 | Void setDuCpbRemovalDelayLengthMinus1( UInt value ) { m_duCpbRemovalDelayLengthMinus1 = value; } |
---|
| 393 | UInt getDuCpbRemovalDelayLengthMinus1( ) const { return m_duCpbRemovalDelayLengthMinus1; } |
---|
[608] | 394 | |
---|
[1200] | 395 | Void setSubPicCpbParamsInPicTimingSEIFlag( Bool flag) { m_subPicCpbParamsInPicTimingSEIFlag = flag; } |
---|
| 396 | Bool getSubPicCpbParamsInPicTimingSEIFlag( ) const { return m_subPicCpbParamsInPicTimingSEIFlag; } |
---|
[608] | 397 | |
---|
[1200] | 398 | Void setDpbOutputDelayDuLengthMinus1(UInt value ) { m_dpbOutputDelayDuLengthMinus1 = value; } |
---|
| 399 | UInt getDpbOutputDelayDuLengthMinus1( ) const { return m_dpbOutputDelayDuLengthMinus1; } |
---|
[608] | 400 | |
---|
[1200] | 401 | Void setBitRateScale( UInt value ) { m_bitRateScale = value; } |
---|
| 402 | UInt getBitRateScale( ) const { return m_bitRateScale; } |
---|
[608] | 403 | |
---|
[1200] | 404 | Void setCpbSizeScale( UInt value ) { m_cpbSizeScale = value; } |
---|
| 405 | UInt getCpbSizeScale( ) const { return m_cpbSizeScale; } |
---|
| 406 | Void setDuCpbSizeScale( UInt value ) { m_ducpbSizeScale = value; } |
---|
| 407 | UInt getDuCpbSizeScale( ) const { return m_ducpbSizeScale; } |
---|
[608] | 408 | |
---|
[1200] | 409 | Void setInitialCpbRemovalDelayLengthMinus1( UInt value ) { m_initialCpbRemovalDelayLengthMinus1 = value; } |
---|
| 410 | UInt getInitialCpbRemovalDelayLengthMinus1( ) const { return m_initialCpbRemovalDelayLengthMinus1; } |
---|
[608] | 411 | |
---|
[1200] | 412 | Void setCpbRemovalDelayLengthMinus1( UInt value ) { m_cpbRemovalDelayLengthMinus1 = value; } |
---|
| 413 | UInt getCpbRemovalDelayLengthMinus1( ) const { return m_cpbRemovalDelayLengthMinus1; } |
---|
[608] | 414 | |
---|
[1200] | 415 | Void setDpbOutputDelayLengthMinus1( UInt value ) { m_dpbOutputDelayLengthMinus1 = value; } |
---|
| 416 | UInt getDpbOutputDelayLengthMinus1( ) const { return m_dpbOutputDelayLengthMinus1; } |
---|
[608] | 417 | |
---|
[1200] | 418 | Void setFixedPicRateFlag( Int layer, Bool flag ) { m_HRD[layer].fixedPicRateFlag = flag; } |
---|
| 419 | Bool getFixedPicRateFlag( Int layer ) const { return m_HRD[layer].fixedPicRateFlag; } |
---|
[608] | 420 | |
---|
[1200] | 421 | Void setFixedPicRateWithinCvsFlag( Int layer, Bool flag ) { m_HRD[layer].fixedPicRateWithinCvsFlag = flag; } |
---|
| 422 | Bool getFixedPicRateWithinCvsFlag( Int layer ) const { return m_HRD[layer].fixedPicRateWithinCvsFlag; } |
---|
[608] | 423 | |
---|
[1200] | 424 | Void setPicDurationInTcMinus1( Int layer, UInt value ) { m_HRD[layer].picDurationInTcMinus1 = value; } |
---|
| 425 | UInt getPicDurationInTcMinus1( Int layer ) const { return m_HRD[layer].picDurationInTcMinus1; } |
---|
[608] | 426 | |
---|
[1200] | 427 | Void setLowDelayHrdFlag( Int layer, Bool flag ) { m_HRD[layer].lowDelayHrdFlag = flag; } |
---|
| 428 | Bool getLowDelayHrdFlag( Int layer ) const { return m_HRD[layer].lowDelayHrdFlag; } |
---|
[608] | 429 | |
---|
[1200] | 430 | Void setCpbCntMinus1( Int layer, UInt value ) { m_HRD[layer].cpbCntMinus1 = value; } |
---|
| 431 | UInt getCpbCntMinus1( Int layer ) const { return m_HRD[layer].cpbCntMinus1; } |
---|
[608] | 432 | |
---|
[1200] | 433 | Void setBitRateValueMinus1( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].bitRateValueMinus1[cpbcnt][nalOrVcl] = value; } |
---|
| 434 | UInt getBitRateValueMinus1( Int layer, Int cpbcnt, Int nalOrVcl ) const { return m_HRD[layer].bitRateValueMinus1[cpbcnt][nalOrVcl]; } |
---|
| 435 | |
---|
| 436 | Void setCpbSizeValueMinus1( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].cpbSizeValue[cpbcnt][nalOrVcl] = value; } |
---|
| 437 | UInt getCpbSizeValueMinus1( Int layer, Int cpbcnt, Int nalOrVcl ) const { return m_HRD[layer].cpbSizeValue[cpbcnt][nalOrVcl]; } |
---|
| 438 | Void setDuCpbSizeValueMinus1( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].ducpbSizeValue[cpbcnt][nalOrVcl] = value; } |
---|
| 439 | UInt getDuCpbSizeValueMinus1( Int layer, Int cpbcnt, Int nalOrVcl ) const { return m_HRD[layer].ducpbSizeValue[cpbcnt][nalOrVcl]; } |
---|
| 440 | Void setDuBitRateValueMinus1( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].duBitRateValue[cpbcnt][nalOrVcl] = value; } |
---|
| 441 | UInt getDuBitRateValueMinus1(Int layer, Int cpbcnt, Int nalOrVcl ) const { return m_HRD[layer].duBitRateValue[cpbcnt][nalOrVcl]; } |
---|
| 442 | Void setCbrFlag( Int layer, Int cpbcnt, Int nalOrVcl, Bool value ) { m_HRD[layer].cbrFlag[cpbcnt][nalOrVcl] = value; } |
---|
| 443 | Bool getCbrFlag( Int layer, Int cpbcnt, Int nalOrVcl ) const { return m_HRD[layer].cbrFlag[cpbcnt][nalOrVcl]; } |
---|
| 444 | |
---|
| 445 | Bool getCpbDpbDelaysPresentFlag( ) const { return getNalHrdParametersPresentFlag() || getVclHrdParametersPresentFlag(); } |
---|
[608] | 446 | }; |
---|
| 447 | |
---|
| 448 | class TimingInfo |
---|
| 449 | { |
---|
| 450 | Bool m_timingInfoPresentFlag; |
---|
| 451 | UInt m_numUnitsInTick; |
---|
| 452 | UInt m_timeScale; |
---|
| 453 | Bool m_pocProportionalToTimingFlag; |
---|
| 454 | Int m_numTicksPocDiffOneMinus1; |
---|
| 455 | public: |
---|
| 456 | TimingInfo() |
---|
[1200] | 457 | : m_timingInfoPresentFlag (false) |
---|
| 458 | , m_numUnitsInTick (1001) |
---|
| 459 | , m_timeScale (60000) |
---|
[608] | 460 | , m_pocProportionalToTimingFlag(false) |
---|
[1200] | 461 | , m_numTicksPocDiffOneMinus1 (0) |
---|
| 462 | {} |
---|
[608] | 463 | |
---|
[1200] | 464 | Void setTimingInfoPresentFlag( Bool flag ) { m_timingInfoPresentFlag = flag; } |
---|
| 465 | Bool getTimingInfoPresentFlag( ) const { return m_timingInfoPresentFlag; } |
---|
[608] | 466 | |
---|
[1200] | 467 | Void setNumUnitsInTick( UInt value ) { m_numUnitsInTick = value; } |
---|
| 468 | UInt getNumUnitsInTick( ) const { return m_numUnitsInTick; } |
---|
[608] | 469 | |
---|
[1200] | 470 | Void setTimeScale( UInt value ) { m_timeScale = value; } |
---|
| 471 | UInt getTimeScale( ) const { return m_timeScale; } |
---|
| 472 | |
---|
| 473 | Void setPocProportionalToTimingFlag(Bool x) { m_pocProportionalToTimingFlag = x; } |
---|
| 474 | Bool getPocProportionalToTimingFlag( ) const { return m_pocProportionalToTimingFlag; } |
---|
| 475 | |
---|
| 476 | Void setNumTicksPocDiffOneMinus1(Int x) { m_numTicksPocDiffOneMinus1 = x; } |
---|
| 477 | Int getNumTicksPocDiffOneMinus1( ) const { return m_numTicksPocDiffOneMinus1; } |
---|
[608] | 478 | }; |
---|
| 479 | |
---|
[1200] | 480 | struct ChromaQpAdj |
---|
| 481 | { |
---|
| 482 | union |
---|
| 483 | { |
---|
| 484 | struct { |
---|
| 485 | Int CbOffset; |
---|
| 486 | Int CrOffset; |
---|
| 487 | } comp; |
---|
| 488 | Int offset[2]; /* two chroma components */ |
---|
| 489 | } u; |
---|
| 490 | }; |
---|
[738] | 491 | |
---|
[1200] | 492 | #if NH_MV |
---|
| 493 | |
---|
[738] | 494 | class TComVideoSignalInfo |
---|
| 495 | { |
---|
| 496 | private: |
---|
| 497 | Int m_videoVpsFormat; |
---|
| 498 | Bool m_videoFullRangeVpsFlag; |
---|
| 499 | Int m_colourPrimariesVps; |
---|
| 500 | Int m_transferCharacteristicsVps; |
---|
| 501 | Int m_matrixCoeffsVps; |
---|
| 502 | public: |
---|
[1200] | 503 | Void setVideoVpsFormat( Int val ) { m_videoVpsFormat = val; } |
---|
| 504 | Int getVideoVpsFormat( ) const { return m_videoVpsFormat; } |
---|
[738] | 505 | |
---|
[1200] | 506 | Void setVideoFullRangeVpsFlag( Bool flag ) { m_videoFullRangeVpsFlag = flag; } |
---|
| 507 | Bool getVideoFullRangeVpsFlag( ) const { return m_videoFullRangeVpsFlag; } |
---|
[738] | 508 | |
---|
[1200] | 509 | Void setColourPrimariesVps( Int val ) { m_colourPrimariesVps = val; } |
---|
| 510 | Int getColourPrimariesVps( ) const { return m_colourPrimariesVps; } |
---|
[738] | 511 | |
---|
[1200] | 512 | Void setTransferCharacteristicsVps( Int val ) { m_transferCharacteristicsVps = val; } |
---|
| 513 | Int getTransferCharacteristicsVps( ) const { return m_transferCharacteristicsVps; } |
---|
[738] | 514 | |
---|
[1200] | 515 | Void setMatrixCoeffsVps( Int val ) { m_matrixCoeffsVps = val; } |
---|
| 516 | Int getMatrixCoeffsVps( ) const { return m_matrixCoeffsVps; } |
---|
[738] | 517 | }; |
---|
[1066] | 518 | |
---|
[738] | 519 | class TComVpsVuiBspHrdParameters |
---|
| 520 | { |
---|
[1066] | 521 | /* Not yet tested */ |
---|
[738] | 522 | private: |
---|
[1066] | 523 | |
---|
[1200] | 524 | Int m_vpsNumAddHrdParams; |
---|
| 525 | BoolAry1d m_cprmsAddPresentFlag; |
---|
| 526 | std::vector<TComHRD> m_hrdParameters; |
---|
| 527 | IntAry1d m_numSubLayerHrdMinus1; |
---|
| 528 | IntAry1d m_numSignalledPartitioningSchemes; |
---|
| 529 | IntAry2d m_numPartitionsInSchemeMinus1; |
---|
[1066] | 530 | |
---|
[1200] | 531 | BoolAry4d m_layerIncludedInPartitionFlag; |
---|
| 532 | IntAry3d m_numBspSchedulesMinus1; |
---|
| 533 | IntAry5d m_bspHrdIdx; |
---|
| 534 | IntAry5d m_bspSchedIdx; |
---|
[1066] | 535 | |
---|
| 536 | // Array sizes |
---|
| 537 | Int m_offsetHrdParamIdx; |
---|
| 538 | Int m_numHrdParam; |
---|
| 539 | Int m_numOls; |
---|
| 540 | TComVPS* m_vps; |
---|
[1200] | 541 | public: |
---|
[1066] | 542 | |
---|
[1200] | 543 | Void createAfterVpsNumAddHrdParams( const TComVPS* vps ); |
---|
| 544 | Void createAfterNumSignalledPartitioningSchemes(const TComVPS* vps, Int h ); |
---|
| 545 | Void createAfterNumPartitionsInSchemeMinus1(const TComVPS* vps, Int h, Int j); |
---|
| 546 | Void createAfterNumBspSchedulesMinus1(const TComVPS* vps, Int h, Int i, Int t); |
---|
[1066] | 547 | |
---|
[1200] | 548 | Void setVpsNumAddHrdParams( Int val ) { m_vpsNumAddHrdParams = val; } |
---|
| 549 | Int getVpsNumAddHrdParams( ) const { return m_vpsNumAddHrdParams; } |
---|
[1066] | 550 | |
---|
[1200] | 551 | Void setCprmsAddPresentFlag( Int i, Bool flag ) { m_cprmsAddPresentFlag[i - m_offsetHrdParamIdx] = flag; } |
---|
| 552 | Bool getCprmsAddPresentFlag( Int i ) const { return m_cprmsAddPresentFlag[i - m_offsetHrdParamIdx]; } |
---|
[1066] | 553 | |
---|
[1200] | 554 | Void setNumSubLayerHrdMinus1( Int i, Int val ) { m_numSubLayerHrdMinus1[i - m_offsetHrdParamIdx] = val; } |
---|
| 555 | Int getNumSubLayerHrdMinus1( Int i ) const { return m_numSubLayerHrdMinus1[i - m_offsetHrdParamIdx]; } |
---|
| 556 | |
---|
| 557 | Void setNumSignalledPartitioningSchemes( Int h, Int val ) { m_numSignalledPartitioningSchemes[h] = val; } |
---|
| 558 | Int getNumSignalledPartitioningSchemes( Int h ) const { return m_numSignalledPartitioningSchemes[h]; } |
---|
| 559 | |
---|
| 560 | Void setNumPartitionsInSchemeMinus1( Int h, Int j, Int val ) { m_numPartitionsInSchemeMinus1[h][j] = val; } |
---|
| 561 | Int getNumPartitionsInSchemeMinus1( Int h, Int j ) const { return m_numPartitionsInSchemeMinus1[h][j]; } |
---|
| 562 | |
---|
| 563 | Void setLayerIncludedInPartitionFlag( Int h, Int j, Int k, Int r, Bool flag ) { m_layerIncludedInPartitionFlag[h][j][k][r] = flag; } |
---|
| 564 | Bool getLayerIncludedInPartitionFlag( Int h, Int j, Int k, Int r ) const { return m_layerIncludedInPartitionFlag[h][j][k][r]; } |
---|
| 565 | |
---|
| 566 | Void setNumBspSchedulesMinus1( Int h, Int i, Int t, Int val ) { m_numBspSchedulesMinus1[h][i][t] = val; } |
---|
| 567 | Int getNumBspSchedulesMinus1( Int h, Int i, Int t ) const { return m_numBspSchedulesMinus1[h][i][t]; } |
---|
| 568 | |
---|
| 569 | Void setBspHrdIdx( Int h, Int i, Int t, Int j, Int k, Int val ) { m_bspHrdIdx[h][i - m_offsetHrdParamIdx][t][j][k] = val; } |
---|
| 570 | Int getBspHrdIdx( Int h, Int i, Int t, Int j, Int k ) const { return m_bspHrdIdx[h][i - m_offsetHrdParamIdx][t][j][k]; } |
---|
| 571 | |
---|
| 572 | Int getBspHrdIdxLen ( const TComVPS* vps ) const ; |
---|
| 573 | |
---|
| 574 | Void setBspSchedIdx( Int h, Int i, Int t, Int j, Int k, Int val ) { m_bspSchedIdx[h][i - m_offsetHrdParamIdx][t][j][k] = val; } |
---|
| 575 | Int getBspSchedIdx( Int h, Int i, Int t, Int j, Int k ) const { return m_bspSchedIdx[h][i - m_offsetHrdParamIdx][t][j][k]; } |
---|
| 576 | |
---|
| 577 | Void setHrdParametermeters( Int k, TComHRD val ) { m_hrdParameters[k] = val; } |
---|
| 578 | const TComHRD* getHrdParametermeters( Int k ) const { return &m_hrdParameters[k]; } |
---|
[738] | 579 | }; |
---|
| 580 | |
---|
[622] | 581 | class TComVPSVUI |
---|
| 582 | { |
---|
| 583 | private: |
---|
[1200] | 584 | Bool m_crossLayerPicTypeAlignedFlag ; |
---|
| 585 | Bool m_crossLayerIrapAlignedFlag ; |
---|
| 586 | Bool m_allLayersIdrAlignedFlag ; |
---|
| 587 | Bool m_bitRatePresentVpsFlag ; |
---|
| 588 | Bool m_picRatePresentVpsFlag ; |
---|
| 589 | BoolAry2d m_bitRatePresentFlag ; |
---|
| 590 | BoolAry2d m_picRatePresentFlag ; |
---|
| 591 | IntAry2d m_avgBitRate ; |
---|
| 592 | IntAry2d m_maxBitRate ; |
---|
| 593 | IntAry2d m_constantPicRateIdc ; |
---|
| 594 | IntAry2d m_avgPicRate ; |
---|
| 595 | Bool m_videoSignalInfoIdxPresentFlag ; |
---|
| 596 | Int m_vpsNumVideoSignalInfoMinus1 ; |
---|
| 597 | std::vector< TComVideoSignalInfo > m_videoSignalInfo ; |
---|
| 598 | IntAry1d m_vpsVideoSignalInfoIdx ; |
---|
| 599 | Bool m_tilesNotInUseFlag; ; |
---|
| 600 | BoolAry1d m_tilesInUseFlag ; |
---|
| 601 | BoolAry1d m_loopFilterNotAcrossTilesFlag ; |
---|
| 602 | BoolAry2d m_tileBoundariesAlignedFlag ; |
---|
| 603 | Bool m_wppNotInUseFlag ; |
---|
| 604 | BoolAry1d m_wppInUseFlag ; |
---|
| 605 | Bool m_singleLayerForNonIrapFlag ; |
---|
| 606 | Bool m_higherLayerIrapSkipFlag ; |
---|
| 607 | Bool m_ilpRestrictedRefLayersFlag ; |
---|
| 608 | IntAry2d m_minSpatialSegmentOffsetPlus1 ; |
---|
| 609 | BoolAry2d m_ctuBasedOffsetEnabledFlag ; |
---|
| 610 | IntAry2d m_minHorizontalCtuOffsetPlus1 ; |
---|
| 611 | Bool m_vpsVuiBspHrdPresentFlag ; |
---|
| 612 | TComVpsVuiBspHrdParameters m_vpsVuiBspHrdParameters ; |
---|
| 613 | BoolAry1d m_baseLayerParameterSetCompatibilityFlag; |
---|
[622] | 614 | |
---|
| 615 | public: |
---|
| 616 | |
---|
[1200] | 617 | Void init( Int numLayerSets, Int maxNumSubLayers, Int maxNumLayers ); |
---|
[738] | 618 | |
---|
[1200] | 619 | Void setCrossLayerPicTypeAlignedFlag( Bool flag ) { m_crossLayerPicTypeAlignedFlag = flag; } |
---|
| 620 | Bool getCrossLayerPicTypeAlignedFlag( ) const { return m_crossLayerPicTypeAlignedFlag; } |
---|
[872] | 621 | |
---|
[1200] | 622 | Void setCrossLayerIrapAlignedFlag( Bool flag ) { m_crossLayerIrapAlignedFlag = flag; } |
---|
| 623 | Bool getCrossLayerIrapAlignedFlag( ) const { return m_crossLayerIrapAlignedFlag; } |
---|
[622] | 624 | |
---|
[1200] | 625 | Void setAllLayersIdrAlignedFlag( Bool flag ) { m_allLayersIdrAlignedFlag = flag; } |
---|
| 626 | Bool getAllLayersIdrAlignedFlag( ) const { return m_allLayersIdrAlignedFlag; } |
---|
[622] | 627 | |
---|
[1200] | 628 | Void setBitRatePresentVpsFlag( Bool flag ) { m_bitRatePresentVpsFlag = flag; } |
---|
| 629 | Bool getBitRatePresentVpsFlag( ) const { return m_bitRatePresentVpsFlag; } |
---|
[622] | 630 | |
---|
[1200] | 631 | Void setPicRatePresentVpsFlag( Bool flag ) { m_picRatePresentVpsFlag = flag; } |
---|
| 632 | Bool getPicRatePresentVpsFlag( ) const { return m_picRatePresentVpsFlag; } |
---|
[622] | 633 | |
---|
[1200] | 634 | Void setBitRatePresentFlag( Int i, Int j, Bool flag ) { m_bitRatePresentFlag[i][j] = flag; } |
---|
| 635 | Bool getBitRatePresentFlag( Int i, Int j ) const { return m_bitRatePresentFlag[i][j]; } |
---|
[622] | 636 | |
---|
[1200] | 637 | Void setPicRatePresentFlag( Int i, Int j, Bool flag ) { m_picRatePresentFlag[i][j] = flag; } |
---|
| 638 | Bool getPicRatePresentFlag( Int i, Int j ) const { return m_picRatePresentFlag[i][j]; } |
---|
[622] | 639 | |
---|
[1200] | 640 | Void setAvgBitRate( Int i, Int j, Int val ) { m_avgBitRate[i][j] = val; } |
---|
| 641 | Int getAvgBitRate( Int i, Int j ) const { return m_avgBitRate[i][j]; } |
---|
[622] | 642 | |
---|
[1200] | 643 | Void setMaxBitRate( Int i, Int j, Int val ) { m_maxBitRate[i][j] = val; } |
---|
| 644 | Int getMaxBitRate( Int i, Int j ) const { return m_maxBitRate[i][j]; } |
---|
[622] | 645 | |
---|
[1200] | 646 | Void setConstantPicRateIdc( Int i, Int j, Int val ) { m_constantPicRateIdc[i][j] = val; } |
---|
| 647 | Int getConstantPicRateIdc( Int i, Int j ) const { return m_constantPicRateIdc[i][j]; } |
---|
[872] | 648 | |
---|
[1200] | 649 | Void setAvgPicRate( Int i, Int j, Int val ) { m_avgPicRate[i][j] = val; } |
---|
| 650 | Int getAvgPicRate( Int i, Int j ) const { return m_avgPicRate[i][j]; } |
---|
[872] | 651 | |
---|
[1200] | 652 | Void setVideoSignalInfoIdxPresentFlag( Bool flag ) { m_videoSignalInfoIdxPresentFlag = flag; } |
---|
| 653 | Bool getVideoSignalInfoIdxPresentFlag( ) const { return m_videoSignalInfoIdxPresentFlag; } |
---|
[872] | 654 | |
---|
[1200] | 655 | Void setVideoSignalInfo( std::vector<TComVideoSignalInfo> val ) { m_videoSignalInfo = val; } |
---|
| 656 | const TComVideoSignalInfo* getVideoSignalInfo( Int i ) const { return &m_videoSignalInfo[i]; } |
---|
[872] | 657 | |
---|
[1200] | 658 | Void setVpsNumVideoSignalInfoMinus1( Int val ) { m_vpsNumVideoSignalInfoMinus1 = val; } |
---|
| 659 | Int getVpsNumVideoSignalInfoMinus1( ) const { return m_vpsNumVideoSignalInfoMinus1; } |
---|
[738] | 660 | |
---|
[1200] | 661 | Void setVpsVideoSignalInfoIdx( Int i, Int val ) { m_vpsVideoSignalInfoIdx[i] = val; } |
---|
| 662 | Int getVpsVideoSignalInfoIdx( Int i ) const { return m_vpsVideoSignalInfoIdx[i]; } |
---|
[738] | 663 | |
---|
[1200] | 664 | Void setTilesNotInUseFlag( Bool flag ) { m_tilesNotInUseFlag = flag; } |
---|
| 665 | Bool getTilesNotInUseFlag( ) const { return m_tilesNotInUseFlag; } |
---|
[738] | 666 | |
---|
[1200] | 667 | Void setTilesInUseFlag( Int i, Bool flag ) { m_tilesInUseFlag[i] = flag; } |
---|
| 668 | Bool getTilesInUseFlag( Int i ) const { return m_tilesInUseFlag[i]; } |
---|
[622] | 669 | |
---|
[1200] | 670 | Void setLoopFilterNotAcrossTilesFlag( Int i, Int val ) { m_loopFilterNotAcrossTilesFlag[i] = val; } |
---|
| 671 | Bool getLoopFilterNotAcrossTilesFlag( Int i ) const { return m_loopFilterNotAcrossTilesFlag[i]; } |
---|
[738] | 672 | |
---|
[1200] | 673 | Void setTileBoundariesAlignedFlag( Int i, Int j, Bool flag ) { m_tileBoundariesAlignedFlag[i][j] = flag; } |
---|
| 674 | Bool getTileBoundariesAlignedFlag( Int i, Int j ) const { return m_tileBoundariesAlignedFlag[i][j]; } |
---|
[738] | 675 | |
---|
[1200] | 676 | Void setWppNotInUseFlag( Bool flag ) { m_wppNotInUseFlag = flag; } |
---|
| 677 | Bool getWppNotInUseFlag( ) const { return m_wppNotInUseFlag; } |
---|
[1066] | 678 | |
---|
[1200] | 679 | Void setWppInUseFlag( Int i, Bool flag ) { m_wppInUseFlag[i] = flag; } |
---|
| 680 | Bool getWppInUseFlag( Int i ) const { return m_wppInUseFlag[i]; } |
---|
[1066] | 681 | |
---|
[1200] | 682 | Void setSingleLayerForNonIrapFlag( Bool flag ) { m_singleLayerForNonIrapFlag = flag; } |
---|
| 683 | Bool getSingleLayerForNonIrapFlag( ) const { return m_singleLayerForNonIrapFlag; } |
---|
[622] | 684 | |
---|
[1200] | 685 | Void setHigherLayerIrapSkipFlag( Bool flag ) { m_higherLayerIrapSkipFlag = flag; } |
---|
| 686 | Bool getHigherLayerIrapSkipFlag( ) const { return m_higherLayerIrapSkipFlag; } |
---|
[622] | 687 | |
---|
[1200] | 688 | Void setIlpRestrictedRefLayersFlag( Bool flag ) { m_ilpRestrictedRefLayersFlag = flag; } |
---|
| 689 | Bool getIlpRestrictedRefLayersFlag( ) const { return m_ilpRestrictedRefLayersFlag; } |
---|
[622] | 690 | |
---|
[1200] | 691 | Void setMinSpatialSegmentOffsetPlus1( Int i, Int j, Int val ) { m_minSpatialSegmentOffsetPlus1[i][j] = val; } |
---|
| 692 | Int getMinSpatialSegmentOffsetPlus1( Int i, Int j ) const { return m_minSpatialSegmentOffsetPlus1[i][j]; } |
---|
[738] | 693 | |
---|
[1200] | 694 | Void setCtuBasedOffsetEnabledFlag( Int i, Int j, Bool flag ) { m_ctuBasedOffsetEnabledFlag[i][j] = flag; } |
---|
| 695 | Bool getCtuBasedOffsetEnabledFlag( Int i, Int j ) const { return m_ctuBasedOffsetEnabledFlag[i][j]; } |
---|
[738] | 696 | |
---|
[1200] | 697 | Void setMinHorizontalCtuOffsetPlus1( Int i, Int j, Int val ) { m_minHorizontalCtuOffsetPlus1[i][j] = val; } |
---|
| 698 | Int getMinHorizontalCtuOffsetPlus1( Int i, Int j ) const { return m_minHorizontalCtuOffsetPlus1[i][j]; } |
---|
[872] | 699 | |
---|
[1200] | 700 | Void setVpsVuiBspHrdPresentFlag( Bool flag ) { m_vpsVuiBspHrdPresentFlag = flag; } |
---|
| 701 | Bool getVpsVuiBspHrdPresentFlag( ) const { return m_vpsVuiBspHrdPresentFlag; } |
---|
[872] | 702 | |
---|
[1200] | 703 | Void setVpsVuiBspHrdParameters( TComVpsVuiBspHrdParameters val) { m_vpsVuiBspHrdParameters = val; } |
---|
| 704 | const TComVpsVuiBspHrdParameters* getVpsVuiBspHrdParameters( ) const { return &m_vpsVuiBspHrdParameters; } |
---|
| 705 | |
---|
| 706 | Void setBaseLayerParameterSetCompatibilityFlag( Int i, Bool flag ) { m_baseLayerParameterSetCompatibilityFlag[i] = flag; } |
---|
| 707 | Bool getBaseLayerParameterSetCompatibilityFlag( Int i ) const { return m_baseLayerParameterSetCompatibilityFlag[i]; } |
---|
[622] | 708 | }; |
---|
| 709 | |
---|
| 710 | class TComRepFormat |
---|
| 711 | { |
---|
| 712 | private: |
---|
[738] | 713 | Bool m_chromaAndBitDepthVpsPresentFlag; |
---|
[622] | 714 | Int m_chromaFormatVpsIdc; |
---|
| 715 | Bool m_separateColourPlaneVpsFlag; |
---|
| 716 | Int m_picWidthVpsInLumaSamples; |
---|
| 717 | Int m_picHeightVpsInLumaSamples; |
---|
| 718 | Int m_bitDepthVpsLumaMinus8; |
---|
| 719 | Int m_bitDepthVpsChromaMinus8; |
---|
[1066] | 720 | Bool m_conformanceWindowVpsFlag; |
---|
| 721 | Int m_confWinVpsLeftOffset; |
---|
| 722 | Int m_confWinVpsRightOffset; |
---|
| 723 | Int m_confWinVpsTopOffset; |
---|
| 724 | Int m_confWinVpsBottomOffset; |
---|
[622] | 725 | |
---|
| 726 | public: |
---|
[1066] | 727 | |
---|
| 728 | TComRepFormat() |
---|
| 729 | { |
---|
[1200] | 730 | m_conformanceWindowVpsFlag = 0; |
---|
| 731 | m_confWinVpsLeftOffset = 0; |
---|
| 732 | m_confWinVpsRightOffset = 0; |
---|
| 733 | m_confWinVpsTopOffset = 0; |
---|
| 734 | m_confWinVpsBottomOffset = 0; |
---|
[1066] | 735 | }; |
---|
[622] | 736 | |
---|
[1200] | 737 | Void setChromaAndBitDepthVpsPresentFlag( Bool flag ) { m_chromaAndBitDepthVpsPresentFlag = flag; } |
---|
| 738 | Bool getChromaAndBitDepthVpsPresentFlag( ) const { return m_chromaAndBitDepthVpsPresentFlag; } |
---|
| 739 | Void checkChromaAndBitDepthVpsPresentFlag( Int i ) const { assert( i != 0 || m_chromaAndBitDepthVpsPresentFlag ); } // The value of chroma_and_bit_depth_vps_present_flag of the first rep_format( ) syntax structure in the VPS shall be equal to 1. |
---|
[738] | 740 | |
---|
[1200] | 741 | Void inferChromaAndBitDepth ( const TComRepFormat* prevRepFormat ); |
---|
| 742 | Void checkInferChromaAndBitDepth( const TComRepFormat* prevRepFormat ) const; |
---|
[622] | 743 | |
---|
[1200] | 744 | Void setChromaFormatVpsIdc( Int val ) { m_chromaFormatVpsIdc = val; } |
---|
| 745 | Int getChromaFormatVpsIdc( ) const { return m_chromaFormatVpsIdc; } |
---|
[622] | 746 | |
---|
[1200] | 747 | Void setSeparateColourPlaneVpsFlag( Bool flag ) { m_separateColourPlaneVpsFlag = flag; } |
---|
| 748 | Bool getSeparateColourPlaneVpsFlag( ) const { return m_separateColourPlaneVpsFlag; } |
---|
[622] | 749 | |
---|
[1200] | 750 | Void setPicWidthVpsInLumaSamples( Int val ) { m_picWidthVpsInLumaSamples = val; } |
---|
| 751 | Int getPicWidthVpsInLumaSamples( ) const { return m_picWidthVpsInLumaSamples; } |
---|
[622] | 752 | |
---|
[1200] | 753 | Void setPicHeightVpsInLumaSamples( Int val ) { m_picHeightVpsInLumaSamples = val; } |
---|
| 754 | Int getPicHeightVpsInLumaSamples( ) const { return m_picHeightVpsInLumaSamples; } |
---|
[622] | 755 | |
---|
[1200] | 756 | Void setBitDepthVpsLumaMinus8( Int val ) { m_bitDepthVpsLumaMinus8 = val; } |
---|
| 757 | Int getBitDepthVpsLumaMinus8( ) const { return m_bitDepthVpsLumaMinus8; } |
---|
[1066] | 758 | |
---|
[1200] | 759 | Void setBitDepthVpsChromaMinus8( Int val ) { m_bitDepthVpsChromaMinus8 = val; } |
---|
| 760 | Int getBitDepthVpsChromaMinus8( ) const { return m_bitDepthVpsChromaMinus8; } |
---|
[1066] | 761 | |
---|
[1200] | 762 | Void setConformanceWindowVpsFlag( Bool flag ) { m_conformanceWindowVpsFlag = flag; } |
---|
| 763 | Bool getConformanceWindowVpsFlag( ) const { return m_conformanceWindowVpsFlag; } |
---|
[1066] | 764 | |
---|
[1200] | 765 | Void setConfWinVpsLeftOffset( Int val ) { m_confWinVpsLeftOffset = val; } |
---|
| 766 | Int getConfWinVpsLeftOffset( ) const { return m_confWinVpsLeftOffset; } |
---|
[1066] | 767 | |
---|
[1200] | 768 | Void setConfWinVpsRightOffset( Int val ) { m_confWinVpsRightOffset = val; } |
---|
| 769 | Int getConfWinVpsRightOffset( ) const { return m_confWinVpsRightOffset; } |
---|
[1066] | 770 | |
---|
[1200] | 771 | Void setConfWinVpsTopOffset( Int val ) { m_confWinVpsTopOffset = val; } |
---|
| 772 | Int getConfWinVpsTopOffset( ) const { return m_confWinVpsTopOffset; } |
---|
| 773 | |
---|
| 774 | Void setConfWinVpsBottomOffset( Int val ) { m_confWinVpsBottomOffset = val; } |
---|
| 775 | Int getConfWinVpsBottomOffset( ) const { return m_confWinVpsBottomOffset; } |
---|
[622] | 776 | }; |
---|
| 777 | |
---|
[773] | 778 | |
---|
[738] | 779 | class TComDpbSize |
---|
| 780 | { |
---|
| 781 | private: |
---|
[1200] | 782 | BoolAry1d m_subLayerFlagInfoPresentFlag; |
---|
| 783 | BoolAry2d m_subLayerDpbInfoPresentFlag ; |
---|
| 784 | IntAry3d m_maxVpsDecPicBufferingMinus1; |
---|
| 785 | IntAry2d m_maxVpsNumReorderPics ; |
---|
| 786 | IntAry2d m_maxVpsLatencyIncreasePlus1 ; |
---|
[738] | 787 | |
---|
| 788 | public: |
---|
[1200] | 789 | TComDpbSize() {}; |
---|
[738] | 790 | |
---|
[1200] | 791 | Void init( Int numOutputLayerSets, Int maxNumLayerIds, Int maxNumSubLayers ); |
---|
[738] | 792 | |
---|
[1200] | 793 | Void setSubLayerFlagInfoPresentFlag( Int i, Bool flag ) { m_subLayerFlagInfoPresentFlag[i] = flag; } |
---|
| 794 | Bool getSubLayerFlagInfoPresentFlag( Int i ) const { return m_subLayerFlagInfoPresentFlag[i]; } |
---|
[738] | 795 | |
---|
[1200] | 796 | Void setSubLayerDpbInfoPresentFlag( Int i, Int j, Bool flag ) { m_subLayerDpbInfoPresentFlag[i][j] = flag; } |
---|
| 797 | Bool getSubLayerDpbInfoPresentFlag( Int i, Int j ) const { return m_subLayerDpbInfoPresentFlag[i][j]; } |
---|
[738] | 798 | |
---|
[1200] | 799 | Void setMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j, Int val ) { m_maxVpsDecPicBufferingMinus1[i][k][j] = val; } |
---|
| 800 | Int getMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j ) const { assert( m_maxVpsDecPicBufferingMinus1[i][k][j] >= 0 ); return m_maxVpsDecPicBufferingMinus1[i][k][j]; } |
---|
[964] | 801 | |
---|
[1200] | 802 | Void setMaxVpsNumReorderPics( Int i, Int j, Int val ) { m_maxVpsNumReorderPics[i][j] = val; } |
---|
| 803 | Int getMaxVpsNumReorderPics( Int i, Int j ) const { return m_maxVpsNumReorderPics[i][j]; } |
---|
| 804 | |
---|
| 805 | Void setMaxVpsLatencyIncreasePlus1( Int i, Int j, Int val ) { m_maxVpsLatencyIncreasePlus1[i][j] = val; } |
---|
| 806 | Int getMaxVpsLatencyIncreasePlus1( Int i, Int j ) const { return m_maxVpsLatencyIncreasePlus1[i][j]; } |
---|
[738] | 807 | }; |
---|
| 808 | #endif |
---|
[1200] | 809 | |
---|
[77] | 810 | class TComVPS |
---|
| 811 | { |
---|
| 812 | private: |
---|
[1200] | 813 | Int m_VPSId; |
---|
| 814 | #if NH_MV |
---|
| 815 | Bool m_vpsBaseLayerInternalFlag; |
---|
| 816 | Bool m_vpsBaseLayerAvailableFlag; |
---|
[964] | 817 | #endif |
---|
| 818 | |
---|
[1200] | 819 | UInt m_uiMaxTLayers; |
---|
[622] | 820 | |
---|
[1200] | 821 | #if NH_MV |
---|
| 822 | UInt m_uiMaxLayersMinus1; |
---|
[622] | 823 | #else |
---|
[1200] | 824 | UInt m_uiMaxLayers; |
---|
[622] | 825 | #endif |
---|
[1200] | 826 | Bool m_bTemporalIdNestingFlag; |
---|
[77] | 827 | |
---|
[1200] | 828 | UInt m_numReorderPics[MAX_TLAYER]; |
---|
| 829 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
| 830 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) |
---|
| 831 | |
---|
| 832 | UInt m_numHrdParameters; |
---|
| 833 | #if NH_MV |
---|
| 834 | UInt m_maxLayerId; |
---|
[210] | 835 | #else |
---|
[1200] | 836 | UInt m_maxNuhReservedZeroLayerId; |
---|
[210] | 837 | #endif |
---|
[1200] | 838 | std::vector<TComHRD> m_hrdParameters; |
---|
| 839 | std::vector<UInt> m_hrdOpSetIdx; |
---|
| 840 | std::vector<Bool> m_cprmsPresentFlag; |
---|
| 841 | #if NH_MV |
---|
| 842 | UInt m_vpsNumLayerSetsMinus1; |
---|
| 843 | Bool m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_LAYER_ID_PLUS1]; |
---|
[608] | 844 | #else |
---|
[1200] | 845 | UInt m_numOpSets; |
---|
| 846 | Bool m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1]; |
---|
[210] | 847 | #endif |
---|
[608] | 848 | |
---|
[1200] | 849 | #if NH_MV |
---|
| 850 | TComPTL m_pcPTL[MAX_VPS_OP_SETS_PLUS1]; |
---|
[608] | 851 | #else |
---|
[1200] | 852 | TComPTL m_pcPTL; |
---|
[210] | 853 | #endif |
---|
[1200] | 854 | TimingInfo m_timingInfo; |
---|
| 855 | #if NH_MV |
---|
| 856 | Bool m_vpsExtensionFlag; |
---|
[976] | 857 | |
---|
[608] | 858 | /// VPS EXTENSION SYNTAX ELEMENTS |
---|
[872] | 859 | Int m_vpsNonVuiExtensionLength; |
---|
[608] | 860 | Bool m_splittingFlag; |
---|
[622] | 861 | Bool m_scalabilityMaskFlag [MAX_NUM_SCALABILITY_TYPES]; |
---|
[608] | 862 | Int m_dimensionIdLen [MAX_NUM_SCALABILITY_TYPES]; |
---|
| 863 | Bool m_vpsNuhLayerIdPresentFlag; |
---|
| 864 | Int m_layerIdInNuh [MAX_NUM_LAYER_IDS]; |
---|
| 865 | Int m_dimensionId [MAX_NUM_LAYER_IDS][MAX_NUM_SCALABILITY_TYPES]; |
---|
[738] | 866 | |
---|
| 867 | Int m_viewIdLen; |
---|
[622] | 868 | Int m_viewIdVal [MAX_NUM_LAYERS]; |
---|
[608] | 869 | Bool m_directDependencyFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; |
---|
[738] | 870 | Bool m_vpsSubLayersMaxMinus1PresentFlag; |
---|
| 871 | Int m_subLayersVpsMaxMinus1 [MAX_NUM_LAYERS]; |
---|
[622] | 872 | Bool m_maxTidRefPresentFlag; |
---|
[738] | 873 | Int m_maxTidIlRefPicsPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
[622] | 874 | Bool m_allRefLayersActiveFlag; |
---|
[608] | 875 | Int m_vpsNumProfileTierLevelMinus1; |
---|
| 876 | Bool m_vpsProfilePresentFlag [MAX_VPS_OP_SETS_PLUS1]; |
---|
[872] | 877 | |
---|
[964] | 878 | Int m_numAddLayerSets; |
---|
| 879 | Int m_highestLayerIdxPlus1 [MAX_VPS_ADD_OUTPUT_LAYER_SETS][MAX_NUM_LAYERS]; |
---|
| 880 | Int m_numAddOlss; |
---|
[976] | 881 | |
---|
[964] | 882 | Int m_defaultOutputLayerIdc; |
---|
[872] | 883 | |
---|
[964] | 884 | Int m_layerSetIdxForOlsMinus1 [MAX_VPS_OUTPUTLAYER_SETS]; |
---|
[608] | 885 | Bool m_outputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1]; |
---|
[1066] | 886 | Int m_profileTierLevelIdx [MAX_VPS_OUTPUTLAYER_SETS ][MAX_NUM_LAYERS]; |
---|
[872] | 887 | Bool m_altOutputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS]; |
---|
[622] | 888 | Bool m_repFormatIdxPresentFlag; |
---|
[964] | 889 | |
---|
[622] | 890 | Int m_vpsNumRepFormatsMinus1; |
---|
| 891 | Int m_vpsRepFormatIdx [MAX_NUM_LAYERS]; |
---|
[1200] | 892 | |
---|
| 893 | std::vector<TComRepFormat> m_repFormat; |
---|
[608] | 894 | Bool m_maxOneActiveRefLayerFlag; |
---|
[872] | 895 | Bool m_vpsPocLsbAlignedFlag; |
---|
[738] | 896 | Bool m_pocLsbNotPresentFlag [MAX_NUM_LAYERS]; |
---|
| 897 | |
---|
[1200] | 898 | TComDpbSize m_dpbSize; |
---|
[608] | 899 | Int m_directDepTypeLenMinus2; |
---|
[738] | 900 | Bool m_defaultDirectDependencyFlag; |
---|
| 901 | Int m_defaultDirectDependencyType; |
---|
[872] | 902 | |
---|
| 903 | #if H_MV_HLS7_GEN |
---|
| 904 | Int m_directDependencyType [MAX_NUM_LAYERS] [MAX_NUM_LAYERS]; |
---|
| 905 | #endif |
---|
[622] | 906 | Bool m_vpsVuiPresentFlag; |
---|
[1200] | 907 | TComVPSVUI m_vpsVUI; |
---|
[872] | 908 | #if !H_MV_HLS7_GEN |
---|
[608] | 909 | Int m_directDependencyType [MAX_NUM_LAYERS] [MAX_NUM_LAYERS]; |
---|
[872] | 910 | #endif |
---|
[77] | 911 | |
---|
[608] | 912 | // VPS EXTENSION SEMANTICS VARIABLES |
---|
| 913 | Int m_layerIdInVps [MAX_NUM_LAYERS ]; |
---|
[1066] | 914 | Int m_dependencyFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
[608] | 915 | |
---|
[1124] | 916 | Int m_numViews; |
---|
[608] | 917 | Int m_numDirectRefLayers [MAX_NUM_LAYERS]; |
---|
[1066] | 918 | Int m_idDirectRefLayer [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
[1200] | 919 | #if NH_3D |
---|
[1124] | 920 | Int m_numRefListLayers [MAX_NUM_LAYERS]; |
---|
| 921 | Int m_idRefListLayer [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
| 922 | #endif |
---|
[608] | 923 | |
---|
[1124] | 924 | |
---|
[964] | 925 | Int m_numRefLayers [MAX_NUM_LAYER_IDS]; |
---|
[1066] | 926 | Int m_idRefLayer [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
| 927 | |
---|
| 928 | |
---|
| 929 | Int m_numPredictedLayers [MAX_NUM_LAYERS ]; |
---|
| 930 | Int m_idPredictedLayer [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS]; |
---|
[964] | 931 | Int m_numIndependentLayers; |
---|
| 932 | Int m_numLayersInTreePartition [MAX_NUM_LAYER_IDS]; |
---|
| 933 | Int m_treePartitionLayerIdList [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS]; |
---|
| 934 | Bool m_recursiveRefLayerFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; |
---|
[622] | 935 | Int m_viewIndex [MAX_NUM_LAYERS ]; |
---|
[738] | 936 | |
---|
[1200] | 937 | IntAry2d m_targetDecLayerIdLists; //[TargetOptLayerSetIdx][i] |
---|
| 938 | IntAry2d m_targetOptLayerIdLists; |
---|
| 939 | IntAry2d m_layerSetLayerIdList; |
---|
[738] | 940 | |
---|
[1200] | 941 | Int m_numNecessaryLayers [MAX_VPS_OUTPUTLAYER_SETS]; |
---|
| 942 | Bool m_necessaryLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_NUM_LAYERS]; |
---|
[738] | 943 | |
---|
[1200] | 944 | Int xGetDimBitOffset( Int j ) const; |
---|
[976] | 945 | Void xSetRefLayerFlags( Int currLayerId ); |
---|
[1196] | 946 | |
---|
[622] | 947 | // VPS EXTENSION 2 SYNTAX ELEMENTS |
---|
[1200] | 948 | #if NH_3D |
---|
| 949 | IntAry1d m_numCp; |
---|
| 950 | IntAry2d m_cpRefVoi; |
---|
| 951 | BoolAry2d m_cpPresentFlag; |
---|
| 952 | Int m_cpPrecision; |
---|
| 953 | BoolAry1d m_cpInSliceSegmentHeaderFlag; |
---|
| 954 | IntAry3d m_aaaiCodedScale ; |
---|
| 955 | IntAry3d m_aaaiCodedOffset; |
---|
[1124] | 956 | |
---|
[1200] | 957 | IntAry1d m_viewOIdxList; |
---|
| 958 | BoolAry2d m_viewCompLayerPresentFlag; |
---|
| 959 | IntAry2d m_viewCompLayerId; |
---|
[1124] | 960 | #endif |
---|
[443] | 961 | |
---|
[608] | 962 | #endif |
---|
[1200] | 963 | |
---|
[77] | 964 | public: |
---|
[1200] | 965 | TComVPS(); |
---|
[608] | 966 | |
---|
[1200] | 967 | virtual ~TComVPS(); |
---|
| 968 | |
---|
| 969 | Void createHrdParamBuffer() |
---|
[608] | 970 | { |
---|
[1200] | 971 | m_hrdParameters.resize(getNumHrdParameters()); |
---|
| 972 | m_hrdOpSetIdx.resize(getNumHrdParameters()); |
---|
| 973 | m_cprmsPresentFlag.resize(getNumHrdParameters()); |
---|
[608] | 974 | } |
---|
| 975 | |
---|
[1200] | 976 | TComHRD* getHrdParameters( UInt i ) { return &m_hrdParameters[ i ]; } |
---|
| 977 | const TComHRD* getHrdParameters( UInt i ) const { return &m_hrdParameters[ i ]; } |
---|
| 978 | UInt getHrdOpSetIdx( UInt i ) const { return m_hrdOpSetIdx[ i ]; } |
---|
| 979 | Void setHrdOpSetIdx( UInt val, UInt i ) { m_hrdOpSetIdx[ i ] = val; } |
---|
| 980 | Bool getCprmsPresentFlag( UInt i ) const { return m_cprmsPresentFlag[ i ]; } |
---|
| 981 | Void setCprmsPresentFlag( Bool val, UInt i ) { m_cprmsPresentFlag[ i ] = val; } |
---|
[608] | 982 | |
---|
[1200] | 983 | Int getVPSId() const { return m_VPSId; } |
---|
| 984 | Void setVPSId(Int i) { m_VPSId = i; } |
---|
| 985 | #if NH_MV |
---|
| 986 | Void setVpsBaseLayerInternalFlag( Bool flag ) { m_vpsBaseLayerInternalFlag = flag; } |
---|
| 987 | Bool getVpsBaseLayerInternalFlag( ) const { return m_vpsBaseLayerInternalFlag; } |
---|
| 988 | Void setVpsBaseLayerAvailableFlag( Bool flag ) { m_vpsBaseLayerAvailableFlag = flag; } |
---|
| 989 | Bool getVpsBaseLayerAvailableFlag( ) const { return m_vpsBaseLayerAvailableFlag; } |
---|
[964] | 990 | #endif |
---|
| 991 | |
---|
[1200] | 992 | UInt getMaxTLayers() const { return m_uiMaxTLayers; } |
---|
| 993 | Void setMaxTLayers(UInt t) { m_uiMaxTLayers = t; } |
---|
| 994 | #if NH_MV |
---|
| 995 | UInt getMaxSubLayersMinus1() const { return m_uiMaxTLayers - 1; } // For consistency with draft spec |
---|
| 996 | Void setMaxSubLayersMinus1(UInt val) { m_uiMaxTLayers = (val + 1); } |
---|
| 997 | UInt getMaxLayersMinus1() const { return m_uiMaxLayersMinus1; } |
---|
| 998 | Void setMaxLayersMinus1(UInt l) { m_uiMaxLayersMinus1 = l; } |
---|
| 999 | #else |
---|
[773] | 1000 | |
---|
[1200] | 1001 | UInt getMaxLayers() const { return m_uiMaxLayers; } |
---|
| 1002 | Void setMaxLayers(UInt l) { m_uiMaxLayers = l; } |
---|
[622] | 1003 | #endif |
---|
[608] | 1004 | |
---|
[1200] | 1005 | Bool getTemporalNestingFlag() const { return m_bTemporalIdNestingFlag; } |
---|
| 1006 | Void setTemporalNestingFlag(Bool t) { m_bTemporalIdNestingFlag = t; } |
---|
[608] | 1007 | |
---|
[1200] | 1008 | Void setNumReorderPics(UInt v, UInt tLayer) { m_numReorderPics[tLayer] = v; } |
---|
| 1009 | UInt getNumReorderPics(UInt tLayer) const { return m_numReorderPics[tLayer]; } |
---|
[608] | 1010 | |
---|
[1200] | 1011 | Void setMaxDecPicBuffering(UInt v, UInt tLayer) { assert(tLayer < MAX_TLAYER); m_uiMaxDecPicBuffering[tLayer] = v; } |
---|
| 1012 | UInt getMaxDecPicBuffering(UInt tLayer) const { return m_uiMaxDecPicBuffering[tLayer]; } |
---|
[608] | 1013 | |
---|
[1200] | 1014 | Void setMaxLatencyIncrease(UInt v, UInt tLayer) { m_uiMaxLatencyIncrease[tLayer] = v; } |
---|
| 1015 | UInt getMaxLatencyIncrease(UInt tLayer) const { return m_uiMaxLatencyIncrease[tLayer]; } |
---|
[608] | 1016 | |
---|
[1200] | 1017 | UInt getNumHrdParameters() const { return m_numHrdParameters; } |
---|
| 1018 | Void setNumHrdParameters(UInt v) { m_numHrdParameters = v; } |
---|
| 1019 | #if NH_MV |
---|
| 1020 | UInt getVpsMaxLayerId() const { return m_maxLayerId; } |
---|
| 1021 | Void setVpsMaxLayerId(UInt v) { m_maxLayerId = v; } |
---|
| 1022 | |
---|
| 1023 | UInt getVpsNumLayerSetsMinus1() const { return m_vpsNumLayerSetsMinus1; } |
---|
| 1024 | Void setVpsNumLayerSetsMinus1(UInt v) { m_vpsNumLayerSetsMinus1 = v; } |
---|
| 1025 | #else |
---|
| 1026 | UInt getMaxNuhReservedZeroLayerId() const { return m_maxNuhReservedZeroLayerId; } |
---|
| 1027 | Void setMaxNuhReservedZeroLayerId(UInt v) { m_maxNuhReservedZeroLayerId = v; } |
---|
| 1028 | |
---|
| 1029 | UInt getMaxOpSets() const { return m_numOpSets; } |
---|
| 1030 | Void setMaxOpSets(UInt v) { m_numOpSets = v; } |
---|
[210] | 1031 | #endif |
---|
[1200] | 1032 | Bool getLayerIdIncludedFlag(UInt opsIdx, UInt id) const { return m_layerIdIncludedFlag[opsIdx][id]; } |
---|
| 1033 | Void setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id) { m_layerIdIncludedFlag[opsIdx][id] = v; } |
---|
[608] | 1034 | |
---|
[1200] | 1035 | #if NH_MV |
---|
| 1036 | TComPTL* getPTL( Int idx = 0 ) { return &m_pcPTL[idx]; } |
---|
| 1037 | const TComPTL* getPTL( Int idx = 0 ) const { return &m_pcPTL[idx]; } |
---|
[1066] | 1038 | #else |
---|
[1200] | 1039 | TComPTL* getPTL() { return &m_pcPTL; } |
---|
| 1040 | const TComPTL* getPTL() const { return &m_pcPTL; } |
---|
[210] | 1041 | #endif |
---|
[1200] | 1042 | TimingInfo* getTimingInfo() { return &m_timingInfo; } |
---|
| 1043 | const TimingInfo* getTimingInfo() const { return &m_timingInfo; } |
---|
[976] | 1044 | |
---|
[1200] | 1045 | #if NH_MV |
---|
| 1046 | Void setVpsExtensionFlag( Bool flag ) { m_vpsExtensionFlag = flag; } |
---|
| 1047 | Bool getVpsExtensionFlag( ) const { return m_vpsExtensionFlag; } |
---|
| 1048 | |
---|
| 1049 | Void setVpsNonVuiExtensionLength( Int val ) { m_vpsNonVuiExtensionLength = val; } |
---|
| 1050 | Int getVpsNonVuiExtensionLength( ) const { return m_vpsNonVuiExtensionLength; } |
---|
[1196] | 1051 | |
---|
| 1052 | // VPS Extension |
---|
[1200] | 1053 | Void setSplittingFlag( Bool val ) { m_splittingFlag = val; } |
---|
| 1054 | Bool getSplittingFlag() const { return m_splittingFlag; } |
---|
[608] | 1055 | |
---|
[622] | 1056 | Void setScalabilityMaskFlag( UInt val ); |
---|
[1200] | 1057 | Void setScalabilityMaskFlag( Int scalType, Bool val ) { m_scalabilityMaskFlag[scalType] = val; } |
---|
| 1058 | Bool getScalabilityMaskFlag( Int scalType ) const { return m_scalabilityMaskFlag[scalType]; } |
---|
[884] | 1059 | |
---|
[1200] | 1060 | Int getNumScalabilityTypes( ) const; |
---|
[608] | 1061 | |
---|
[1200] | 1062 | Void setDimensionIdLen( Int sIdx, Int val ) { m_dimensionIdLen[sIdx] = val; } |
---|
| 1063 | Int getDimensionIdLen( Int sIdx ) const { assert( m_dimensionIdLen[sIdx] > 0) ; return m_dimensionIdLen[sIdx]; } |
---|
[608] | 1064 | |
---|
[1200] | 1065 | Void setVpsNuhLayerIdPresentFlag( Bool val ) { m_vpsNuhLayerIdPresentFlag = val; } |
---|
| 1066 | Bool getVpsNuhLayerIdPresentFlag() const { return m_vpsNuhLayerIdPresentFlag; } |
---|
[608] | 1067 | |
---|
[1200] | 1068 | Void setLayerIdInNuh( Int layerIdInVps, Int val ) { m_layerIdInNuh[layerIdInVps] = val; } |
---|
| 1069 | Int getLayerIdInNuh( Int layerIdInVps ) const { assert( m_layerIdInNuh[layerIdInVps] >= 0 ); return m_layerIdInNuh[layerIdInVps]; } |
---|
[608] | 1070 | |
---|
[1200] | 1071 | Bool nuhLayerIdIncluded( Int layerIdinNuh ) const { return ( m_layerIdInVps[ layerIdinNuh ] > 0 ); } |
---|
[608] | 1072 | |
---|
[1200] | 1073 | Void setDimensionId( Int layerIdInVps, Int scalIdx, Int val ) { m_dimensionId[layerIdInVps][scalIdx] = val; } |
---|
| 1074 | Int getDimensionId( Int layerIdInVps, Int scalIdx ) const { return m_dimensionId[layerIdInVps][scalIdx]; } |
---|
[608] | 1075 | |
---|
[1200] | 1076 | Void setViewIdLen( Int val ) { m_viewIdLen = val; } |
---|
| 1077 | Int getViewIdLen( ) const { return m_viewIdLen; } |
---|
[622] | 1078 | |
---|
[1200] | 1079 | Void setViewIdVal( Int viewOrderIndex, Int val ) { m_viewIdVal[viewOrderIndex] = val; } |
---|
| 1080 | Int getViewIdVal( Int viewOrderIndex ) const { return m_viewIdVal[viewOrderIndex]; } |
---|
[884] | 1081 | |
---|
[1200] | 1082 | Void setDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Bool val ) { m_directDependencyFlag[depLayeridInVps][refLayeridInVps] = val; } |
---|
| 1083 | Bool getDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps ) const { return m_directDependencyFlag[depLayeridInVps][refLayeridInVps]; } |
---|
[884] | 1084 | |
---|
[1200] | 1085 | Void setVpsSubLayersMaxMinus1PresentFlag( Bool flag ) { m_vpsSubLayersMaxMinus1PresentFlag = flag; } |
---|
| 1086 | Bool getVpsSubLayersMaxMinus1PresentFlag( ) const { return m_vpsSubLayersMaxMinus1PresentFlag; } |
---|
[884] | 1087 | |
---|
[1200] | 1088 | Void setSubLayersVpsMaxMinus1( Int i, Int val ) { m_subLayersVpsMaxMinus1[i] = val; } |
---|
| 1089 | Int getSubLayersVpsMaxMinus1( Int i ) const { return m_subLayersVpsMaxMinus1[i]; } |
---|
| 1090 | Void checkSubLayersVpsMaxMinus1( Int i ) const { assert( m_subLayersVpsMaxMinus1[i] >= 0 && m_subLayersVpsMaxMinus1[i] <= m_uiMaxTLayers - 1 ); } |
---|
[884] | 1091 | |
---|
[1200] | 1092 | Void setMaxTidRefPresentFlag( Bool flag ) { m_maxTidRefPresentFlag = flag; } |
---|
| 1093 | Bool getMaxTidRefPresentFlag( ) const { return m_maxTidRefPresentFlag; } |
---|
[884] | 1094 | |
---|
[1200] | 1095 | Void setMaxTidIlRefPicsPlus1( Int i, Int j, Int val ) { m_maxTidIlRefPicsPlus1[i][j] = val; } |
---|
| 1096 | Int getMaxTidIlRefPicsPlus1( Int i, Int j ) const { return m_maxTidIlRefPicsPlus1[i][j]; } |
---|
[884] | 1097 | |
---|
[1200] | 1098 | Void setAllRefLayersActiveFlag( Bool flag ) { m_allRefLayersActiveFlag = flag; } |
---|
| 1099 | Bool getAllRefLayersActiveFlag( ) const { return m_allRefLayersActiveFlag; } |
---|
[872] | 1100 | |
---|
[1200] | 1101 | Void setVpsNumProfileTierLevelMinus1( Int val ) { m_vpsNumProfileTierLevelMinus1 = val; } |
---|
| 1102 | Int getVpsNumProfileTierLevelMinus1( ) const { return m_vpsNumProfileTierLevelMinus1; } |
---|
[608] | 1103 | |
---|
[1200] | 1104 | Void setVpsProfilePresentFlag( Int idx, Bool val ) { m_vpsProfilePresentFlag[idx] = val; } |
---|
| 1105 | Bool getVpsProfilePresentFlag( Int idx ) const { return m_vpsProfilePresentFlag[idx]; } |
---|
[210] | 1106 | |
---|
[1200] | 1107 | Void setNumAddLayerSets( Int val ) { m_numAddLayerSets = val; } |
---|
| 1108 | Int getNumAddLayerSets( ) const { return m_numAddLayerSets; } |
---|
[608] | 1109 | |
---|
[1200] | 1110 | Void setHighestLayerIdxPlus1( Int i, Int j, Int val ) { m_highestLayerIdxPlus1[i][j] = val; } |
---|
| 1111 | Int getHighestLayerIdxPlus1( Int i, Int j ) const { return m_highestLayerIdxPlus1[i][j]; } |
---|
[964] | 1112 | |
---|
[1200] | 1113 | Void setNumAddOlss( Int val ) { m_numAddOlss = val; } |
---|
| 1114 | Int getNumAddOlss( ) const { return m_numAddOlss; } |
---|
[964] | 1115 | |
---|
[1200] | 1116 | Void setDefaultOutputLayerIdc( Int val ) { m_defaultOutputLayerIdc = val; } |
---|
| 1117 | Int getDefaultOutputLayerIdc( ) const { return m_defaultOutputLayerIdc; } |
---|
[608] | 1118 | |
---|
[1200] | 1119 | Void setLayerSetIdxForOlsMinus1( Int outLayerSetIdx, Int val ) { m_layerSetIdxForOlsMinus1[ outLayerSetIdx ] = val; } |
---|
| 1120 | Int getLayerSetIdxForOlsMinus1( Int outLayerSetIdx ) const { return m_layerSetIdxForOlsMinus1[ outLayerSetIdx ]; } |
---|
| 1121 | Int getLayerSetIdxForOlsMinus1Len( Int outLayerSetIdx ) const { return gCeilLog2( getNumLayerSets() ); } |
---|
[443] | 1122 | |
---|
[1200] | 1123 | Void setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag ) { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; } |
---|
| 1124 | Bool getOutputLayerFlag( Int outLayerSetIdx, Int i ) const { return m_outputLayerFlag[ outLayerSetIdx ][ i ]; } |
---|
[608] | 1125 | |
---|
[1200] | 1126 | Bool inferOutputLayerFlag( Int i, Int j ) const; |
---|
[884] | 1127 | |
---|
[1200] | 1128 | Void setProfileTierLevelIdx( Int i, Int j, Int val ) { m_profileTierLevelIdx[ i ][ j ] = val; } |
---|
| 1129 | Int getProfileTierLevelIdx( Int i, Int j ) const { return m_profileTierLevelIdx[ i ][ j ]; } |
---|
| 1130 | Int inferProfileTierLevelIdx( Int i, Int j ) const; |
---|
| 1131 | |
---|
| 1132 | Void setAltOutputLayerFlag( Int i, Bool flag ) { m_altOutputLayerFlag[i] = flag; } |
---|
| 1133 | Bool getAltOutputLayerFlag( Int i ) const { return m_altOutputLayerFlag[i]; } |
---|
| 1134 | |
---|
| 1135 | Void setRepFormatIdxPresentFlag( Bool flag ) { m_repFormatIdxPresentFlag = flag; } |
---|
| 1136 | Bool getRepFormatIdxPresentFlag( ) const { return m_repFormatIdxPresentFlag; } |
---|
| 1137 | |
---|
| 1138 | Void setVpsNumRepFormatsMinus1( Int val ) { m_vpsNumRepFormatsMinus1 = val; } |
---|
| 1139 | Int getVpsNumRepFormatsMinus1( ) const { return m_vpsNumRepFormatsMinus1; } |
---|
| 1140 | |
---|
| 1141 | Void setVpsRepFormatIdx( Int i, Int val ) { m_vpsRepFormatIdx[i] = val; } |
---|
| 1142 | Int getVpsRepFormatIdx( Int i ) const { return m_vpsRepFormatIdx[i]; } |
---|
[608] | 1143 | |
---|
[1200] | 1144 | Int inferVpsRepFormatIdx( Int i ) const { return std::min( i, getVpsNumRepFormatsMinus1() ); } |
---|
[622] | 1145 | |
---|
[1200] | 1146 | Void setRepFormat( Int i, TComRepFormat val ) { m_repFormat[i] = val; } |
---|
| 1147 | Void setRepFormat( std::vector<TComRepFormat> val ) { m_repFormat = val; } |
---|
| 1148 | const TComRepFormat* getRepFormat( Int i ) const { return &m_repFormat[i]; } |
---|
| 1149 | |
---|
| 1150 | Void setMaxOneActiveRefLayerFlag( Bool flag) { m_maxOneActiveRefLayerFlag = flag; } |
---|
| 1151 | Bool getMaxOneActiveRefLayerFlag( ) const { return m_maxOneActiveRefLayerFlag; } |
---|
| 1152 | |
---|
| 1153 | Void setVpsPocLsbAlignedFlag( Bool flag ) { m_vpsPocLsbAlignedFlag = flag; } |
---|
| 1154 | Bool getVpsPocLsbAlignedFlag( ) const { return m_vpsPocLsbAlignedFlag; } |
---|
| 1155 | |
---|
| 1156 | Void setDpbSize( TComDpbSize val ) { m_dpbSize = val; } |
---|
| 1157 | const TComDpbSize * getDpbSize( ) const { return &m_dpbSize; } |
---|
| 1158 | |
---|
| 1159 | |
---|
| 1160 | Void setPocLsbNotPresentFlag( Int i, Bool flag ) { m_pocLsbNotPresentFlag[i] = flag; } |
---|
| 1161 | Bool getPocLsbNotPresentFlag( Int i ) const { return m_pocLsbNotPresentFlag[i]; } |
---|
| 1162 | |
---|
| 1163 | Void setDirectDepTypeLenMinus2( Int val) { m_directDepTypeLenMinus2 = val; } |
---|
| 1164 | Int getDirectDepTypeLenMinus2( ) const { return m_directDepTypeLenMinus2; } |
---|
| 1165 | |
---|
| 1166 | Void setDefaultDirectDependencyFlag( Bool flag ) { m_defaultDirectDependencyFlag = flag; } |
---|
| 1167 | Bool getDefaultDirectDependencyFlag( ) const { return m_defaultDirectDependencyFlag; } |
---|
| 1168 | |
---|
| 1169 | Void setDefaultDirectDependencyType( Int val ) { m_defaultDirectDependencyType = val; } |
---|
| 1170 | Int getDefaultDirectDependencyType( ) const { return m_defaultDirectDependencyType; } |
---|
[884] | 1171 | |
---|
[608] | 1172 | Void setDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps, Int val) { m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ] = val; } |
---|
[1200] | 1173 | Int getDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps) const { return m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ]; } |
---|
[872] | 1174 | |
---|
[1200] | 1175 | Void setVpsVuiPresentFlag( Bool flag ) { m_vpsVuiPresentFlag = flag; } |
---|
| 1176 | Bool getVpsVuiPresentFlag( ) const { return m_vpsVuiPresentFlag; } |
---|
| 1177 | |
---|
| 1178 | const TComVPSVUI* getVPSVUI( ) const { return &m_vpsVUI; } |
---|
| 1179 | Void setVPSVUI( TComVPSVUI val ) { m_vpsVUI = val; } |
---|
[773] | 1180 | |
---|
| 1181 | // VPS EXTENSION SEMANTICS VARIABLES |
---|
[1200] | 1182 | Void setLayerIdInVps( Int layerIdInNuh, Int val ) { m_layerIdInVps[layerIdInNuh] = val; } |
---|
| 1183 | Int getLayerIdInVps( Int layerIdInNuh ) const { assert( m_layerIdInVps[layerIdInNuh] >= 0 ); return m_layerIdInVps[layerIdInNuh]; } |
---|
[608] | 1184 | |
---|
[1200] | 1185 | Int getScalabilityId ( Int layerIdInVps, ScalabilityType scalType ) const ; |
---|
| 1186 | Int getViewId ( Int layerIdInNuh ) const { return m_viewIdVal[ getViewIndex( layerIdInNuh )]; } |
---|
[608] | 1187 | Void setRefLayers(); |
---|
| 1188 | |
---|
[1124] | 1189 | // To be aligned with spec naming, getViewIndex will be removed in future versions |
---|
[1200] | 1190 | Int getViewOrderIdx ( Int layerIdInNuh ) const { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX ); } |
---|
| 1191 | Int getViewIndex ( Int layerIdInNuh ) const { return getViewOrderIdx( layerIdInNuh ); } |
---|
| 1192 | Int getAuxId ( Int layerIdInNuh ) const { return getScalabilityId( getLayerIdInVps(layerIdInNuh), AUX_ID ); } |
---|
| 1193 | Int getDependencyId ( Int layerIdInNuh ) const { return getScalabilityId( getLayerIdInVps(layerIdInNuh), DEPENDENCY_ID ); } |
---|
| 1194 | Int getNumViews() const { return m_numViews; } |
---|
[1124] | 1195 | Void initNumViews(); |
---|
[1200] | 1196 | #if NH_3D |
---|
| 1197 | Void initViewCompLayer( ); |
---|
| 1198 | Int getViewOIdxList( Int i ) const { return m_viewOIdxList[i]; } |
---|
| 1199 | std::vector<Int> getViewOIdxList( ) const { return m_viewOIdxList; } |
---|
[622] | 1200 | |
---|
[1200] | 1201 | Int getVoiInVps( Int viewOIdx ) const; |
---|
[1179] | 1202 | |
---|
[1200] | 1203 | Bool getViewCompLayerPresentFlag (Int i, Bool d ) const { return m_viewCompLayerPresentFlag[ getVoiInVps(i) ][d]; } |
---|
| 1204 | Bool getViewCompLayerId (Int i, Bool d ) const { return m_viewCompLayerId [ getVoiInVps(i) ][d]; } |
---|
[1179] | 1205 | #endif |
---|
[1200] | 1206 | Bool getDependencyFlag( Int i, Int j ) const { return m_dependencyFlag[i][j]; } |
---|
| 1207 | Int getNumDirectRefLayers( Int layerIdInNuh ) const { return m_numDirectRefLayers[ layerIdInNuh ]; }; |
---|
| 1208 | #if NH_3D |
---|
| 1209 | Int getNumRefListLayers( Int layerIdInNuh ) const { return m_numRefListLayers[ layerIdInNuh ]; }; |
---|
[1124] | 1210 | #endif |
---|
| 1211 | |
---|
[1200] | 1212 | Int getNumRefLayers ( Int i ) const { return m_numRefLayers[i]; } |
---|
| 1213 | Int getNumPredictedLayers ( Int i ) const { return m_numPredictedLayers[i]; } |
---|
| 1214 | |
---|
| 1215 | Int getIdRefLayer ( Int i, Int j ) const { assert( j >= 0 && j < getNumRefLayers ( i )); return m_idRefLayer [i][j]; } |
---|
| 1216 | Int getIdPredictedLayer ( Int i, Int j ) const { assert( j >= 0 && j < getNumPredictedLayers( i )); return m_idPredictedLayer[i][j]; } |
---|
| 1217 | Int getIdDirectRefLayer ( Int i, Int j ) const { assert( j >= 0 && j < getNumDirectRefLayers( i )); return m_idDirectRefLayer[i][j]; } |
---|
| 1218 | #if NH_3D |
---|
| 1219 | Int getIdRefListLayer ( Int i, Int j ) const { assert( j >= 0 && j < getNumRefListLayers ( i )); return m_idRefListLayer[i][j]; } |
---|
| 1220 | #endif |
---|
| 1221 | Int getNumIndependentLayers ( ) const { return m_numIndependentLayers; } |
---|
| 1222 | Int getNumLayersInTreePartition( Int i ) const { return m_numLayersInTreePartition[i]; } |
---|
| 1223 | Int getTreePartitionLayerIdList( Int i, Int j ) const { return m_treePartitionLayerIdList[i][j]; } |
---|
| 1224 | Bool getRecursiveRefLayerFlag ( Int i, Int j ) const { return m_recursiveRefLayerFlag[i][j]; } |
---|
| 1225 | Int getNumLayerSets( ) const { return getVpsNumLayerSetsMinus1() + 1 + getNumAddLayerSets(); }; |
---|
| 1226 | |
---|
| 1227 | Int getFirstAddLayerSetIdx() const { return getVpsNumLayerSetsMinus1() + 1; } |
---|
| 1228 | Int getLastAddLayerSetIdx() const { return getFirstAddLayerSetIdx() + getNumAddLayerSets() - 1; } |
---|
[608] | 1229 | Bool checkVPSExtensionSyntax(); |
---|
[1200] | 1230 | Int scalTypeToScalIdx ( ScalabilityType scalType ) const ; |
---|
[608] | 1231 | |
---|
[1200] | 1232 | Int getProfileTierLevelIdxLen() const { return gCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); }; |
---|
| 1233 | Int getVpsRepFormatIdxLen() const { return gCeilLog2( getVpsNumRepFormatsMinus1() + 1 ); }; |
---|
[622] | 1234 | |
---|
[1200] | 1235 | Int getNumLayersInIdList ( Int lsIdx ) const; |
---|
| 1236 | Int getLayerSetLayerIdList(Int lsIdx, Int j ) const { return m_layerSetLayerIdList[ lsIdx ][ j ]; }; |
---|
[608] | 1237 | |
---|
[1200] | 1238 | Int getNumOutputLayerSets() const; |
---|
[976] | 1239 | |
---|
[1200] | 1240 | Bool isOutputLayer( Int outLayerSetIdx, Int layerIdInNuh ) const; |
---|
[738] | 1241 | Void deriveLayerSetLayerIdList(); |
---|
[872] | 1242 | |
---|
[1200] | 1243 | Int olsIdxToLsIdx( Int i ) const { return ( i < getNumLayerSets() ) ? i : getLayerSetIdxForOlsMinus1( i ) + 1 ; }; |
---|
[872] | 1244 | Void initTargetLayerIdLists ( ); |
---|
| 1245 | Void deriveTargetLayerIdList ( Int i ); |
---|
[1200] | 1246 | std::vector<Int> getTargetDecLayerIdList( Int targetDecLayerSetIdx ) const { return m_targetDecLayerIdLists[targetDecLayerSetIdx]; }; |
---|
| 1247 | std::vector<Int> getTargetOptLayerIdList( Int targetOptLayerSetIdx ) const { return m_targetOptLayerIdLists[targetOptLayerSetIdx]; }; |
---|
[872] | 1248 | |
---|
[1200] | 1249 | Int getNumOutputLayersInOutputLayerSet( Int i ) const { return (Int) getTargetOptLayerIdList( i ).size(); }; |
---|
| 1250 | Int getOlsHighestOutputLayerId( Int i ) const { return getTargetOptLayerIdList( i ).back(); }; |
---|
[738] | 1251 | |
---|
[1066] | 1252 | Void deriveAddLayerSetLayerIdList( Int i ); |
---|
[1200] | 1253 | Void deriveNecessaryLayerFlags( Int olsIdx ); |
---|
| 1254 | Int getNecessaryLayerFlag( Int i, Int j ) const { AOF( i >= 0 && i < getNumOutputLayerSets() ); AOF( j >= 0 && j < getNumLayersInIdList( olsIdxToLsIdx( i ) ) ); return m_necessaryLayerFlag[i][j]; }; |
---|
[1066] | 1255 | |
---|
[1200] | 1256 | Int getMaxSubLayersInLayerSetMinus1( Int i ) const; |
---|
| 1257 | Int getHighestLayerIdxPlus1Len( Int j ) const { return gCeilLog2( getNumLayersInTreePartition( j ) + 1 ); }; |
---|
| 1258 | Bool getAltOutputLayerFlagVar( Int i ) const; |
---|
[964] | 1259 | |
---|
[608] | 1260 | // inference |
---|
[1200] | 1261 | Int inferDimensionId ( Int i, Int j ) const; |
---|
| 1262 | Int inferLastDimsionIdLenMinus1() const; |
---|
[608] | 1263 | |
---|
[622] | 1264 | // helpers |
---|
[1200] | 1265 | Void printPTL() const; |
---|
| 1266 | Void printLayerDependencies() const; |
---|
| 1267 | Void printScalabilityId() const; |
---|
| 1268 | Void printLayerSets() const; |
---|
[964] | 1269 | |
---|
[1066] | 1270 | |
---|
[1200] | 1271 | /// VPS EXTENSION 2 SYNTAX ELEMENTS |
---|
| 1272 | Int getDepthId ( Int layerIdInNuh) const { return getScalabilityId( getLayerIdInVps(layerIdInNuh), DEPTH_ID ); } |
---|
| 1273 | #if NH_3D |
---|
| 1274 | Bool getVpsDepthFlag ( Int layerIdInNuh) const { return (getDepthId( layerIdInNuh ) > 0); } |
---|
| 1275 | Int getLayerIdInNuh ( Int viewIndex, Bool depthFlag ) const; |
---|
| 1276 | |
---|
| 1277 | Void createCamPars ( Int iNumViews ); |
---|
| 1278 | Void initCamParaVPS ( Int vOIdxInVps, Int numCp, Bool cpInSliceSegmentHeaderFlag, Int* cpRefVoi, Int** aaiScale, Int** aaiOffset ); |
---|
| 1279 | |
---|
| 1280 | Void setCpPrecision ( Int val ) { m_cpPrecision = val; } |
---|
| 1281 | Int getCpPrecision ( ) const { return m_cpPrecision; } |
---|
| 1282 | |
---|
| 1283 | Void setNumCp ( Int i, Int val ) { m_numCp[i] = val; } |
---|
| 1284 | Int getNumCp ( Int i ) const { return m_numCp[i]; } |
---|
| 1285 | |
---|
| 1286 | Void setCpRefVoi ( Int i, Int m, Int val ) { m_cpRefVoi[i][m] = val; } |
---|
| 1287 | Int getCpRefVoi ( Int i, Int m ) const { return m_cpRefVoi[i][m]; } |
---|
| 1288 | |
---|
| 1289 | Void setCpInSliceSegmentHeaderFlag( Int i, Bool flag ) { m_cpInSliceSegmentHeaderFlag[i] = flag; } |
---|
| 1290 | Bool getCpInSliceSegmentHeaderFlag( Int i ) const { return m_cpInSliceSegmentHeaderFlag[i]; } |
---|
| 1291 | |
---|
| 1292 | Void setVpsCpScale ( Int i, Int j, Int val ) { m_aaaiCodedScale [i][0][j] = val; } |
---|
| 1293 | Int getVpsCpScale ( Int i, Int j ) const { return m_aaaiCodedScale[i][0][j]; } |
---|
| 1294 | |
---|
| 1295 | Void setVpsCpOff ( Int i, Int j, Int val ) { m_aaaiCodedOffset[i][0][j] = val; } |
---|
| 1296 | Int getVpsCpOff ( Int i, Int j ) const { return m_aaaiCodedOffset[i][0][j]; } |
---|
| 1297 | |
---|
| 1298 | Void setVpsCpInvScale ( Int i, Int j, Int val ) { m_aaaiCodedScale[i][1][j] = val; } |
---|
| 1299 | Int getVpsCpInvScale ( Int i, Int j ) const { return m_aaaiCodedScale[i][1][j]; } |
---|
| 1300 | |
---|
| 1301 | Void setVpsCpInvOff ( Int i, Int j, Int val ) { m_aaaiCodedOffset[i][1][j] = val; } |
---|
| 1302 | Int getVpsCpInvOff ( Int i, Int j ) const { return m_aaaiCodedOffset[i][1][j]; } |
---|
[1066] | 1303 | |
---|
[1200] | 1304 | // Derived |
---|
| 1305 | Void deriveCpPresentFlag ( ); |
---|
| 1306 | Void setCpPresentFlag ( Int i, Int m, Bool flag ) { m_cpPresentFlag[i][m] = flag; } |
---|
| 1307 | Bool getCpPresentFlag ( Int i, Int m ) const { return m_cpPresentFlag[i][m]; } |
---|
| 1308 | |
---|
| 1309 | const IntAry1d& getCodedScale ( Int viewIndex ) const { return m_aaaiCodedScale [viewIndex][0]; } |
---|
| 1310 | const IntAry1d& getCodedOffset ( Int viewIndex ) const { return m_aaaiCodedOffset[viewIndex][0]; } |
---|
| 1311 | const IntAry1d& getInvCodedScale ( Int viewIndex ) const { return m_aaaiCodedScale [viewIndex][1]; } |
---|
| 1312 | const IntAry1d& getInvCodedOffset ( Int viewIndex ) const { return m_aaaiCodedOffset[viewIndex][1]; } |
---|
| 1313 | #endif |
---|
| 1314 | |
---|
| 1315 | template <typename T, typename S, typename U> Void xPrintArray( const Char* name, Int numElemDim1, U idx, S numElemDim2, T vec, Bool printNumber, Bool printIdx = true ) const |
---|
[1066] | 1316 | { |
---|
| 1317 | std::cout << std::endl; |
---|
| 1318 | for (Int j = 0; j < numElemDim1; j++ ) |
---|
| 1319 | { |
---|
| 1320 | std::cout << std::right << std::setw(27) << name; |
---|
| 1321 | if (printIdx) |
---|
| 1322 | { |
---|
| 1323 | std::cout << "[" << std::right << std::setw(3) << idx[ j ] << "]" ; |
---|
| 1324 | } |
---|
| 1325 | else |
---|
| 1326 | { |
---|
| 1327 | std::cout << std::right << std::setw(5) << " "; |
---|
| 1328 | } |
---|
[1200] | 1329 | |
---|
[1066] | 1330 | if ( printNumber ) |
---|
| 1331 | { |
---|
| 1332 | std::cout << " (" << std::right << std::setw(3) << numElemDim2[j] << ")"; |
---|
| 1333 | } |
---|
| 1334 | else |
---|
| 1335 | { |
---|
[1200] | 1336 | std::cout << std::right << std::setw(6) << " "; |
---|
[1066] | 1337 | } |
---|
| 1338 | |
---|
| 1339 | std::cout << ":"; |
---|
| 1340 | for (Int i = 0; i < numElemDim2[j]; i++) |
---|
| 1341 | { |
---|
| 1342 | std::cout << std::right << std::setw(3) << vec[j][i]; |
---|
| 1343 | } |
---|
| 1344 | std::cout << std::endl; |
---|
| 1345 | } |
---|
| 1346 | } |
---|
| 1347 | |
---|
[1200] | 1348 | template <typename T> Void xPrintArray( const char* name, Int numElem, T vec, Bool printNumber ) const |
---|
[1066] | 1349 | { |
---|
| 1350 | std::vector<Int> numElemDim2(1, numElem); |
---|
| 1351 | std::vector<T> vec2 (1, vec ); |
---|
| 1352 | std::vector<Int> idx2 (0); |
---|
| 1353 | xPrintArray( name, 1, idx2, numElemDim2, vec2, printNumber, false ); |
---|
| 1354 | } |
---|
| 1355 | |
---|
[833] | 1356 | #endif |
---|
[77] | 1357 | }; |
---|
| 1358 | |
---|
[773] | 1359 | #if H_3D |
---|
[758] | 1360 | class TComDLT |
---|
| 1361 | { |
---|
| 1362 | private: |
---|
| 1363 | Bool m_bDltPresentFlag; |
---|
| 1364 | Bool m_bUseDLTFlag [ MAX_NUM_LAYERS ]; |
---|
| 1365 | Bool m_bInterViewDltPredEnableFlag[ MAX_NUM_LAYERS ]; |
---|
| 1366 | |
---|
| 1367 | Int m_iNumDepthmapValues [ MAX_NUM_LAYERS ]; |
---|
| 1368 | Int* m_iDepthValue2Idx [ MAX_NUM_LAYERS ]; |
---|
| 1369 | Int* m_iIdx2DepthValue [ MAX_NUM_LAYERS ]; |
---|
| 1370 | |
---|
| 1371 | Int m_iNumDepthViews; |
---|
| 1372 | UInt m_uiDepthViewBitDepth; |
---|
| 1373 | |
---|
| 1374 | public: |
---|
| 1375 | TComDLT(); |
---|
| 1376 | ~TComDLT(); |
---|
| 1377 | |
---|
| 1378 | Bool getDltPresentFlag () { return m_bDltPresentFlag; } |
---|
| 1379 | Void setDltPresentFlag ( Bool b ) { m_bDltPresentFlag = b; } |
---|
| 1380 | |
---|
| 1381 | Bool getUseDLTFlag ( Int layerIdInVps ) { return m_bUseDLTFlag[ layerIdInVps ]; } |
---|
| 1382 | Void setUseDLTFlag ( Int layerIdInVps, Bool b ) { m_bUseDLTFlag[ layerIdInVps ] = b; } |
---|
| 1383 | |
---|
| 1384 | Bool getInterViewDltPredEnableFlag( Int layerIdInVps ) { return m_bInterViewDltPredEnableFlag[ layerIdInVps ]; } |
---|
| 1385 | Void setInterViewDltPredEnableFlag( Int layerIdInVps, Bool b ) { m_bInterViewDltPredEnableFlag[ layerIdInVps ] = b; } |
---|
| 1386 | |
---|
| 1387 | Void setNumDepthViews ( Int n ) { m_iNumDepthViews = n; } |
---|
| 1388 | Int getNumDepthViews () { return m_iNumDepthViews; } |
---|
| 1389 | |
---|
| 1390 | Void setDepthViewBitDepth( UInt n ) { m_uiDepthViewBitDepth = n; } |
---|
| 1391 | UInt getDepthViewBitDepth() { return m_uiDepthViewBitDepth; } |
---|
| 1392 | |
---|
| 1393 | Int getNumDepthValues( Int layerIdInVps ) { return getUseDLTFlag(layerIdInVps)?m_iNumDepthmapValues[layerIdInVps]:((1 << g_bitDepthY)-1); } |
---|
| 1394 | Int depthValue2idx( Int layerIdInVps, Pel value ) { return getUseDLTFlag(layerIdInVps)?m_iDepthValue2Idx[layerIdInVps][value]:value; } |
---|
[1039] | 1395 | Pel idx2DepthValue( Int layerIdInVps, UInt uiIdx ) { return getUseDLTFlag(layerIdInVps)?m_iIdx2DepthValue[layerIdInVps][ClipY(uiIdx)]:uiIdx; } |
---|
[758] | 1396 | Void setDepthLUTs( Int layerIdInVps, Int* idx2DepthValue = NULL, Int iNumDepthValues = 0 ); |
---|
| 1397 | Int* idx2DepthValue( Int layerIdInVps ) { return m_iIdx2DepthValue[layerIdInVps]; } |
---|
| 1398 | Void getDeltaDLT( Int layerIdInVps, Int* piDLTInRef, UInt uiDLTInRefNum, Int* piDeltaDLTOut, UInt *puiDeltaDLTOutNum ); |
---|
| 1399 | Void setDeltaDLT( Int layerIdInVps, Int* piDLTInRef, UInt uiDLTInRefNum, Int* piDeltaDLTIn, UInt uiDeltaDLTInNum ); |
---|
| 1400 | }; |
---|
| 1401 | #endif |
---|
| 1402 | |
---|
[1200] | 1403 | |
---|
[608] | 1404 | class Window |
---|
| 1405 | { |
---|
| 1406 | private: |
---|
[1200] | 1407 | Bool m_enabledFlag; |
---|
| 1408 | Int m_winLeftOffset; |
---|
| 1409 | Int m_winRightOffset; |
---|
| 1410 | Int m_winTopOffset; |
---|
| 1411 | Int m_winBottomOffset; |
---|
| 1412 | #if NH_MV |
---|
[622] | 1413 | Bool m_scaledFlag; |
---|
| 1414 | #endif |
---|
[608] | 1415 | public: |
---|
| 1416 | Window() |
---|
[1200] | 1417 | : m_enabledFlag (false) |
---|
| 1418 | , m_winLeftOffset (0) |
---|
| 1419 | , m_winRightOffset (0) |
---|
| 1420 | , m_winTopOffset (0) |
---|
| 1421 | , m_winBottomOffset(0) |
---|
| 1422 | #if NH_MV |
---|
[622] | 1423 | , m_scaledFlag(true) |
---|
| 1424 | #endif |
---|
[608] | 1425 | { } |
---|
| 1426 | |
---|
[1200] | 1427 | Bool getWindowEnabledFlag() const { return m_enabledFlag; } |
---|
| 1428 | Int getWindowLeftOffset() const { return m_enabledFlag ? m_winLeftOffset : 0; } |
---|
| 1429 | Void setWindowLeftOffset(Int val) { m_winLeftOffset = val; m_enabledFlag = true; } |
---|
| 1430 | Int getWindowRightOffset() const { return m_enabledFlag ? m_winRightOffset : 0; } |
---|
| 1431 | Void setWindowRightOffset(Int val) { m_winRightOffset = val; m_enabledFlag = true; } |
---|
| 1432 | Int getWindowTopOffset() const { return m_enabledFlag ? m_winTopOffset : 0; } |
---|
| 1433 | Void setWindowTopOffset(Int val) { m_winTopOffset = val; m_enabledFlag = true; } |
---|
| 1434 | Int getWindowBottomOffset() const { return m_enabledFlag ? m_winBottomOffset: 0; } |
---|
| 1435 | Void setWindowBottomOffset(Int val) { m_winBottomOffset = val; m_enabledFlag = true; } |
---|
[608] | 1436 | |
---|
[1200] | 1437 | #if NH_MV |
---|
[622] | 1438 | Void setScaledFlag(Bool flag) { m_scaledFlag = flag; } |
---|
| 1439 | Bool getScaledFlag() const { return m_scaledFlag; } |
---|
[976] | 1440 | Void scaleOffsets( Int scal ); |
---|
[622] | 1441 | #endif |
---|
[1200] | 1442 | Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom) |
---|
[608] | 1443 | { |
---|
[1200] | 1444 | m_enabledFlag = true; |
---|
| 1445 | m_winLeftOffset = offsetLeft; |
---|
| 1446 | m_winRightOffset = offsetLRight; |
---|
| 1447 | m_winTopOffset = offsetLTop; |
---|
| 1448 | m_winBottomOffset = offsetLBottom; |
---|
[608] | 1449 | } |
---|
| 1450 | }; |
---|
| 1451 | |
---|
| 1452 | |
---|
| 1453 | class TComVUI |
---|
| 1454 | { |
---|
| 1455 | private: |
---|
[1200] | 1456 | Bool m_aspectRatioInfoPresentFlag; |
---|
| 1457 | Int m_aspectRatioIdc; |
---|
| 1458 | Int m_sarWidth; |
---|
| 1459 | Int m_sarHeight; |
---|
| 1460 | Bool m_overscanInfoPresentFlag; |
---|
| 1461 | Bool m_overscanAppropriateFlag; |
---|
| 1462 | Bool m_videoSignalTypePresentFlag; |
---|
| 1463 | Int m_videoFormat; |
---|
| 1464 | Bool m_videoFullRangeFlag; |
---|
| 1465 | Bool m_colourDescriptionPresentFlag; |
---|
| 1466 | Int m_colourPrimaries; |
---|
| 1467 | Int m_transferCharacteristics; |
---|
| 1468 | Int m_matrixCoefficients; |
---|
| 1469 | Bool m_chromaLocInfoPresentFlag; |
---|
| 1470 | Int m_chromaSampleLocTypeTopField; |
---|
| 1471 | Int m_chromaSampleLocTypeBottomField; |
---|
| 1472 | Bool m_neutralChromaIndicationFlag; |
---|
| 1473 | Bool m_fieldSeqFlag; |
---|
| 1474 | Window m_defaultDisplayWindow; |
---|
| 1475 | Bool m_frameFieldInfoPresentFlag; |
---|
| 1476 | Bool m_hrdParametersPresentFlag; |
---|
| 1477 | Bool m_bitstreamRestrictionFlag; |
---|
| 1478 | Bool m_tilesFixedStructureFlag; |
---|
| 1479 | Bool m_motionVectorsOverPicBoundariesFlag; |
---|
| 1480 | Bool m_restrictedRefPicListsFlag; |
---|
| 1481 | Int m_minSpatialSegmentationIdc; |
---|
| 1482 | Int m_maxBytesPerPicDenom; |
---|
| 1483 | Int m_maxBitsPerMinCuDenom; |
---|
| 1484 | Int m_log2MaxMvLengthHorizontal; |
---|
| 1485 | Int m_log2MaxMvLengthVertical; |
---|
| 1486 | TComHRD m_hrdParameters; |
---|
[608] | 1487 | TimingInfo m_timingInfo; |
---|
[77] | 1488 | |
---|
[608] | 1489 | public: |
---|
| 1490 | TComVUI() |
---|
[1200] | 1491 | : m_aspectRatioInfoPresentFlag (false) //TODO: This initialiser list contains magic numbers |
---|
| 1492 | , m_aspectRatioIdc (0) |
---|
| 1493 | , m_sarWidth (0) |
---|
| 1494 | , m_sarHeight (0) |
---|
| 1495 | , m_overscanInfoPresentFlag (false) |
---|
| 1496 | , m_overscanAppropriateFlag (false) |
---|
| 1497 | , m_videoSignalTypePresentFlag (false) |
---|
| 1498 | , m_videoFormat (5) |
---|
| 1499 | , m_videoFullRangeFlag (false) |
---|
| 1500 | , m_colourDescriptionPresentFlag (false) |
---|
| 1501 | , m_colourPrimaries (2) |
---|
| 1502 | , m_transferCharacteristics (2) |
---|
| 1503 | , m_matrixCoefficients (2) |
---|
| 1504 | , m_chromaLocInfoPresentFlag (false) |
---|
| 1505 | , m_chromaSampleLocTypeTopField (0) |
---|
| 1506 | , m_chromaSampleLocTypeBottomField (0) |
---|
| 1507 | , m_neutralChromaIndicationFlag (false) |
---|
| 1508 | , m_fieldSeqFlag (false) |
---|
| 1509 | , m_frameFieldInfoPresentFlag (false) |
---|
| 1510 | , m_hrdParametersPresentFlag (false) |
---|
| 1511 | , m_bitstreamRestrictionFlag (false) |
---|
| 1512 | , m_tilesFixedStructureFlag (false) |
---|
| 1513 | , m_motionVectorsOverPicBoundariesFlag(true) |
---|
| 1514 | , m_restrictedRefPicListsFlag (1) |
---|
| 1515 | , m_minSpatialSegmentationIdc (0) |
---|
| 1516 | , m_maxBytesPerPicDenom (2) |
---|
| 1517 | , m_maxBitsPerMinCuDenom (1) |
---|
| 1518 | , m_log2MaxMvLengthHorizontal (15) |
---|
| 1519 | , m_log2MaxMvLengthVertical (15) |
---|
[608] | 1520 | {} |
---|
| 1521 | |
---|
[1200] | 1522 | virtual ~TComVUI() {} |
---|
[608] | 1523 | |
---|
[1200] | 1524 | Bool getAspectRatioInfoPresentFlag() const { return m_aspectRatioInfoPresentFlag; } |
---|
| 1525 | Void setAspectRatioInfoPresentFlag(Bool i) { m_aspectRatioInfoPresentFlag = i; } |
---|
[608] | 1526 | |
---|
[1200] | 1527 | Int getAspectRatioIdc() const { return m_aspectRatioIdc; } |
---|
| 1528 | Void setAspectRatioIdc(Int i) { m_aspectRatioIdc = i; } |
---|
[608] | 1529 | |
---|
[1200] | 1530 | Int getSarWidth() const { return m_sarWidth; } |
---|
| 1531 | Void setSarWidth(Int i) { m_sarWidth = i; } |
---|
[608] | 1532 | |
---|
[1200] | 1533 | Int getSarHeight() const { return m_sarHeight; } |
---|
| 1534 | Void setSarHeight(Int i) { m_sarHeight = i; } |
---|
[608] | 1535 | |
---|
[1200] | 1536 | Bool getOverscanInfoPresentFlag() const { return m_overscanInfoPresentFlag; } |
---|
| 1537 | Void setOverscanInfoPresentFlag(Bool i) { m_overscanInfoPresentFlag = i; } |
---|
[608] | 1538 | |
---|
[1200] | 1539 | Bool getOverscanAppropriateFlag() const { return m_overscanAppropriateFlag; } |
---|
| 1540 | Void setOverscanAppropriateFlag(Bool i) { m_overscanAppropriateFlag = i; } |
---|
[608] | 1541 | |
---|
[1200] | 1542 | Bool getVideoSignalTypePresentFlag() const { return m_videoSignalTypePresentFlag; } |
---|
| 1543 | Void setVideoSignalTypePresentFlag(Bool i) { m_videoSignalTypePresentFlag = i; } |
---|
[608] | 1544 | |
---|
[1200] | 1545 | Int getVideoFormat() const { return m_videoFormat; } |
---|
| 1546 | Void setVideoFormat(Int i) { m_videoFormat = i; } |
---|
[608] | 1547 | |
---|
[1200] | 1548 | Bool getVideoFullRangeFlag() const { return m_videoFullRangeFlag; } |
---|
| 1549 | Void setVideoFullRangeFlag(Bool i) { m_videoFullRangeFlag = i; } |
---|
[608] | 1550 | |
---|
[1200] | 1551 | Bool getColourDescriptionPresentFlag() const { return m_colourDescriptionPresentFlag; } |
---|
| 1552 | Void setColourDescriptionPresentFlag(Bool i) { m_colourDescriptionPresentFlag = i; } |
---|
[608] | 1553 | |
---|
[1200] | 1554 | Int getColourPrimaries() const { return m_colourPrimaries; } |
---|
| 1555 | Void setColourPrimaries(Int i) { m_colourPrimaries = i; } |
---|
[608] | 1556 | |
---|
[1200] | 1557 | Int getTransferCharacteristics() const { return m_transferCharacteristics; } |
---|
| 1558 | Void setTransferCharacteristics(Int i) { m_transferCharacteristics = i; } |
---|
[608] | 1559 | |
---|
[1200] | 1560 | Int getMatrixCoefficients() const { return m_matrixCoefficients; } |
---|
| 1561 | Void setMatrixCoefficients(Int i) { m_matrixCoefficients = i; } |
---|
[608] | 1562 | |
---|
[1200] | 1563 | Bool getChromaLocInfoPresentFlag() const { return m_chromaLocInfoPresentFlag; } |
---|
| 1564 | Void setChromaLocInfoPresentFlag(Bool i) { m_chromaLocInfoPresentFlag = i; } |
---|
[608] | 1565 | |
---|
[1200] | 1566 | Int getChromaSampleLocTypeTopField() const { return m_chromaSampleLocTypeTopField; } |
---|
| 1567 | Void setChromaSampleLocTypeTopField(Int i) { m_chromaSampleLocTypeTopField = i; } |
---|
[608] | 1568 | |
---|
[1200] | 1569 | Int getChromaSampleLocTypeBottomField() const { return m_chromaSampleLocTypeBottomField; } |
---|
| 1570 | Void setChromaSampleLocTypeBottomField(Int i) { m_chromaSampleLocTypeBottomField = i; } |
---|
[608] | 1571 | |
---|
[1200] | 1572 | Bool getNeutralChromaIndicationFlag() const { return m_neutralChromaIndicationFlag; } |
---|
| 1573 | Void setNeutralChromaIndicationFlag(Bool i) { m_neutralChromaIndicationFlag = i; } |
---|
[608] | 1574 | |
---|
[1200] | 1575 | Bool getFieldSeqFlag() const { return m_fieldSeqFlag; } |
---|
| 1576 | Void setFieldSeqFlag(Bool i) { m_fieldSeqFlag = i; } |
---|
[608] | 1577 | |
---|
[1200] | 1578 | Bool getFrameFieldInfoPresentFlag() const { return m_frameFieldInfoPresentFlag; } |
---|
| 1579 | Void setFrameFieldInfoPresentFlag(Bool i) { m_frameFieldInfoPresentFlag = i; } |
---|
[608] | 1580 | |
---|
[1200] | 1581 | Window& getDefaultDisplayWindow() { return m_defaultDisplayWindow; } |
---|
| 1582 | const Window& getDefaultDisplayWindow() const { return m_defaultDisplayWindow; } |
---|
| 1583 | Void setDefaultDisplayWindow(Window& defaultDisplayWindow ) { m_defaultDisplayWindow = defaultDisplayWindow; } |
---|
[608] | 1584 | |
---|
[1200] | 1585 | Bool getHrdParametersPresentFlag() const { return m_hrdParametersPresentFlag; } |
---|
| 1586 | Void setHrdParametersPresentFlag(Bool i) { m_hrdParametersPresentFlag = i; } |
---|
[608] | 1587 | |
---|
[1200] | 1588 | Bool getBitstreamRestrictionFlag() const { return m_bitstreamRestrictionFlag; } |
---|
| 1589 | Void setBitstreamRestrictionFlag(Bool i) { m_bitstreamRestrictionFlag = i; } |
---|
[608] | 1590 | |
---|
[1200] | 1591 | Bool getTilesFixedStructureFlag() const { return m_tilesFixedStructureFlag; } |
---|
| 1592 | Void setTilesFixedStructureFlag(Bool i) { m_tilesFixedStructureFlag = i; } |
---|
[608] | 1593 | |
---|
[1200] | 1594 | Bool getMotionVectorsOverPicBoundariesFlag() const { return m_motionVectorsOverPicBoundariesFlag; } |
---|
| 1595 | Void setMotionVectorsOverPicBoundariesFlag(Bool i) { m_motionVectorsOverPicBoundariesFlag = i; } |
---|
[608] | 1596 | |
---|
[1200] | 1597 | Bool getRestrictedRefPicListsFlag() const { return m_restrictedRefPicListsFlag; } |
---|
| 1598 | Void setRestrictedRefPicListsFlag(Bool b) { m_restrictedRefPicListsFlag = b; } |
---|
[608] | 1599 | |
---|
[1200] | 1600 | Int getMinSpatialSegmentationIdc() const { return m_minSpatialSegmentationIdc; } |
---|
| 1601 | Void setMinSpatialSegmentationIdc(Int i) { m_minSpatialSegmentationIdc = i; } |
---|
[608] | 1602 | |
---|
[1200] | 1603 | Int getMaxBytesPerPicDenom() const { return m_maxBytesPerPicDenom; } |
---|
| 1604 | Void setMaxBytesPerPicDenom(Int i) { m_maxBytesPerPicDenom = i; } |
---|
[608] | 1605 | |
---|
[1200] | 1606 | Int getMaxBitsPerMinCuDenom() const { return m_maxBitsPerMinCuDenom; } |
---|
| 1607 | Void setMaxBitsPerMinCuDenom(Int i) { m_maxBitsPerMinCuDenom = i; } |
---|
[608] | 1608 | |
---|
[1200] | 1609 | Int getLog2MaxMvLengthHorizontal() const { return m_log2MaxMvLengthHorizontal; } |
---|
| 1610 | Void setLog2MaxMvLengthHorizontal(Int i) { m_log2MaxMvLengthHorizontal = i; } |
---|
[608] | 1611 | |
---|
[1200] | 1612 | Int getLog2MaxMvLengthVertical() const { return m_log2MaxMvLengthVertical; } |
---|
| 1613 | Void setLog2MaxMvLengthVertical(Int i) { m_log2MaxMvLengthVertical = i; } |
---|
| 1614 | |
---|
| 1615 | TComHRD* getHrdParameters() { return &m_hrdParameters; } |
---|
| 1616 | const TComHRD* getHrdParameters() const { return &m_hrdParameters; } |
---|
| 1617 | |
---|
| 1618 | TimingInfo* getTimingInfo() { return &m_timingInfo; } |
---|
| 1619 | const TimingInfo* getTimingInfo() const { return &m_timingInfo; } |
---|
| 1620 | #if NH_MV |
---|
| 1621 | Void inferVideoSignalInfo( const TComVPS* vps, Int layerIdCurr ); |
---|
[738] | 1622 | #endif |
---|
[608] | 1623 | }; |
---|
| 1624 | |
---|
[1200] | 1625 | /// SPS RExt class |
---|
| 1626 | class TComSPSRExt // Names aligned to text specification |
---|
| 1627 | { |
---|
| 1628 | private: |
---|
| 1629 | Bool m_transformSkipRotationEnabledFlag; |
---|
| 1630 | Bool m_transformSkipContextEnabledFlag; |
---|
| 1631 | Bool m_rdpcmEnabledFlag[NUMBER_OF_RDPCM_SIGNALLING_MODES]; |
---|
| 1632 | Bool m_extendedPrecisionProcessingFlag; |
---|
| 1633 | Bool m_intraSmoothingDisabledFlag; |
---|
| 1634 | Bool m_highPrecisionOffsetsEnabledFlag; |
---|
| 1635 | Bool m_persistentRiceAdaptationEnabledFlag; |
---|
| 1636 | Bool m_cabacBypassAlignmentEnabledFlag; |
---|
| 1637 | |
---|
| 1638 | public: |
---|
| 1639 | TComSPSRExt(); |
---|
| 1640 | |
---|
| 1641 | Bool settingsDifferFromDefaults() const |
---|
| 1642 | { |
---|
| 1643 | return getTransformSkipRotationEnabledFlag() |
---|
| 1644 | || getTransformSkipContextEnabledFlag() |
---|
| 1645 | || getRdpcmEnabledFlag(RDPCM_SIGNAL_IMPLICIT) |
---|
| 1646 | || getRdpcmEnabledFlag(RDPCM_SIGNAL_EXPLICIT) |
---|
| 1647 | || getExtendedPrecisionProcessingFlag() |
---|
| 1648 | || getIntraSmoothingDisabledFlag() |
---|
| 1649 | || getHighPrecisionOffsetsEnabledFlag() |
---|
| 1650 | || getPersistentRiceAdaptationEnabledFlag() |
---|
| 1651 | || getCabacBypassAlignmentEnabledFlag(); |
---|
| 1652 | } |
---|
| 1653 | |
---|
| 1654 | |
---|
| 1655 | Bool getTransformSkipRotationEnabledFlag() const { return m_transformSkipRotationEnabledFlag; } |
---|
| 1656 | Void setTransformSkipRotationEnabledFlag(const Bool value) { m_transformSkipRotationEnabledFlag = value; } |
---|
| 1657 | |
---|
| 1658 | Bool getTransformSkipContextEnabledFlag() const { return m_transformSkipContextEnabledFlag; } |
---|
| 1659 | Void setTransformSkipContextEnabledFlag(const Bool value) { m_transformSkipContextEnabledFlag = value; } |
---|
| 1660 | |
---|
| 1661 | Bool getRdpcmEnabledFlag(const RDPCMSignallingMode signallingMode) const { return m_rdpcmEnabledFlag[signallingMode]; } |
---|
| 1662 | Void setRdpcmEnabledFlag(const RDPCMSignallingMode signallingMode, const Bool value) { m_rdpcmEnabledFlag[signallingMode] = value; } |
---|
| 1663 | |
---|
| 1664 | Bool getExtendedPrecisionProcessingFlag() const { return m_extendedPrecisionProcessingFlag; } |
---|
| 1665 | Void setExtendedPrecisionProcessingFlag(Bool value) { m_extendedPrecisionProcessingFlag = value; } |
---|
| 1666 | |
---|
| 1667 | Bool getIntraSmoothingDisabledFlag() const { return m_intraSmoothingDisabledFlag; } |
---|
| 1668 | Void setIntraSmoothingDisabledFlag(Bool bValue) { m_intraSmoothingDisabledFlag=bValue; } |
---|
| 1669 | |
---|
| 1670 | Bool getHighPrecisionOffsetsEnabledFlag() const { return m_highPrecisionOffsetsEnabledFlag; } |
---|
| 1671 | Void setHighPrecisionOffsetsEnabledFlag(Bool value) { m_highPrecisionOffsetsEnabledFlag = value; } |
---|
| 1672 | |
---|
| 1673 | Bool getPersistentRiceAdaptationEnabledFlag() const { return m_persistentRiceAdaptationEnabledFlag; } |
---|
| 1674 | Void setPersistentRiceAdaptationEnabledFlag(const Bool value) { m_persistentRiceAdaptationEnabledFlag = value; } |
---|
| 1675 | |
---|
| 1676 | Bool getCabacBypassAlignmentEnabledFlag() const { return m_cabacBypassAlignmentEnabledFlag; } |
---|
| 1677 | Void setCabacBypassAlignmentEnabledFlag(const Bool value) { m_cabacBypassAlignmentEnabledFlag = value; } |
---|
| 1678 | }; |
---|
| 1679 | |
---|
| 1680 | |
---|
| 1681 | #if NH_3D |
---|
[1124] | 1682 | class TComSps3dExtension |
---|
| 1683 | { |
---|
| 1684 | public: |
---|
| 1685 | TComSps3dExtension() |
---|
| 1686 | { |
---|
| 1687 | for (Int d = 0; d < 2; d++) |
---|
| 1688 | { |
---|
| 1689 | m_ivMvPredFlag [d] = false; |
---|
| 1690 | m_ivMvScalingFlag [d] = false; |
---|
| 1691 | m_log2SubPbSizeMinus3 [d] = 3; |
---|
| 1692 | m_ivResPredFlag [d] = false; |
---|
| 1693 | m_depthRefinementFlag [d] = false; |
---|
| 1694 | m_viewSynthesisPredFlag [d] = false; |
---|
| 1695 | m_depthBasedBlkPartFlag [d] = false; |
---|
| 1696 | m_mpiFlag [d] = false; |
---|
| 1697 | m_log2MpiSubPbSizeMinus3[d] = 3; |
---|
| 1698 | m_intraContourFlag [d] = false; |
---|
| 1699 | m_intraSdcWedgeFlag [d] = false; |
---|
| 1700 | m_qtPredFlag [d] = false; |
---|
| 1701 | m_interSdcFlag [d] = false; |
---|
[1179] | 1702 | m_depthIntraSkipFlag [d] = false; |
---|
[1124] | 1703 | } |
---|
| 1704 | } |
---|
| 1705 | |
---|
[1200] | 1706 | Void setIvMvPredFlag( Int d, Bool flag ) { m_ivMvPredFlag[d] = flag; } |
---|
| 1707 | Bool getIvMvPredFlag( Int d ) const { return m_ivMvPredFlag[d]; } |
---|
[1124] | 1708 | |
---|
[1200] | 1709 | Void setIvMvScalingFlag( Int d, Bool flag ) { m_ivMvScalingFlag[d] = flag; } |
---|
| 1710 | Bool getIvMvScalingFlag( Int d ) const { return m_ivMvScalingFlag[d]; } |
---|
[1124] | 1711 | |
---|
[1200] | 1712 | Void setLog2SubPbSizeMinus3( Int d, Int val ) { m_log2SubPbSizeMinus3[d] = val; } |
---|
| 1713 | Int getLog2SubPbSizeMinus3( Int d ) const { return m_log2SubPbSizeMinus3[d]; } |
---|
[1124] | 1714 | |
---|
[1200] | 1715 | Void setIvResPredFlag( Int d, Bool flag ) { m_ivResPredFlag[d] = flag; } |
---|
| 1716 | Bool getIvResPredFlag( Int d ) const { return m_ivResPredFlag[d]; } |
---|
[1124] | 1717 | |
---|
[1200] | 1718 | Void setDepthRefinementFlag( Int d, Bool flag ) { m_depthRefinementFlag[d] = flag; } |
---|
| 1719 | Bool getDepthRefinementFlag( Int d ) const { return m_depthRefinementFlag[d]; } |
---|
[1124] | 1720 | |
---|
[1200] | 1721 | Void setViewSynthesisPredFlag( Int d, Bool flag ) { m_viewSynthesisPredFlag[d] = flag; } |
---|
| 1722 | Bool getViewSynthesisPredFlag( Int d ) const { return m_viewSynthesisPredFlag[d]; } |
---|
[1124] | 1723 | |
---|
[1200] | 1724 | Void setDepthBasedBlkPartFlag( Int d, Bool flag ) { m_depthBasedBlkPartFlag[d] = flag; } |
---|
| 1725 | Bool getDepthBasedBlkPartFlag( Int d ) const { return m_depthBasedBlkPartFlag[d]; } |
---|
[1124] | 1726 | |
---|
[1200] | 1727 | Void setMpiFlag( Int d, Bool flag ) { m_mpiFlag[d] = flag; } |
---|
| 1728 | Bool getMpiFlag( Int d ) const { return m_mpiFlag[d]; } |
---|
[1124] | 1729 | |
---|
[1200] | 1730 | Void setLog2MpiSubPbSizeMinus3( Int d, Int val ) { m_log2MpiSubPbSizeMinus3[d] = val; } |
---|
| 1731 | Int getLog2MpiSubPbSizeMinus3( Int d ) const { return m_log2MpiSubPbSizeMinus3[d]; } |
---|
[1124] | 1732 | |
---|
[1200] | 1733 | Void setIntraContourFlag( Int d, Bool flag ) { m_intraContourFlag[d] = flag; } |
---|
| 1734 | Bool getIntraContourFlag( Int d ) const { return m_intraContourFlag[d]; } |
---|
[1124] | 1735 | |
---|
[1200] | 1736 | Void setIntraSdcWedgeFlag( Int d, Bool flag ) { m_intraSdcWedgeFlag[d] = flag; } |
---|
| 1737 | Bool getIntraSdcWedgeFlag( Int d ) const { return m_intraSdcWedgeFlag[d]; } |
---|
[1124] | 1738 | |
---|
[1200] | 1739 | Void setQtPredFlag( Int d, Bool flag ) { m_qtPredFlag[d] = flag; } |
---|
| 1740 | Bool getQtPredFlag( Int d ) const { return m_qtPredFlag[d]; } |
---|
[1124] | 1741 | |
---|
[1200] | 1742 | Void setInterSdcFlag( Int d, Bool flag ) { m_interSdcFlag[d] = flag; } |
---|
| 1743 | Bool getInterSdcFlag( Int d ) const { return m_interSdcFlag[d]; } |
---|
[1124] | 1744 | |
---|
[1200] | 1745 | Void setDepthIntraSkipFlag( Int d, Bool flag ) { m_depthIntraSkipFlag[d] = flag; } |
---|
| 1746 | Bool getDepthIntraSkipFlag( Int d ) const { return m_depthIntraSkipFlag[d]; } |
---|
[1124] | 1747 | private: |
---|
| 1748 | |
---|
| 1749 | Bool m_ivMvPredFlag [2]; |
---|
| 1750 | Bool m_ivMvScalingFlag [2]; |
---|
| 1751 | Int m_log2SubPbSizeMinus3 [2]; |
---|
| 1752 | Bool m_ivResPredFlag [2]; |
---|
| 1753 | Bool m_depthRefinementFlag [2]; |
---|
| 1754 | Bool m_viewSynthesisPredFlag [2]; |
---|
| 1755 | Bool m_depthBasedBlkPartFlag [2]; |
---|
| 1756 | Bool m_mpiFlag [2]; |
---|
| 1757 | Int m_log2MpiSubPbSizeMinus3[2]; |
---|
| 1758 | Bool m_intraContourFlag [2]; |
---|
| 1759 | Bool m_intraSdcWedgeFlag [2]; |
---|
| 1760 | Bool m_qtPredFlag [2]; |
---|
| 1761 | Bool m_interSdcFlag [2]; |
---|
[1179] | 1762 | Bool m_depthIntraSkipFlag [2]; |
---|
[1124] | 1763 | }; |
---|
| 1764 | |
---|
| 1765 | #endif |
---|
| 1766 | |
---|
[1200] | 1767 | |
---|
[2] | 1768 | /// SPS class |
---|
| 1769 | class TComSPS |
---|
| 1770 | { |
---|
| 1771 | private: |
---|
[1200] | 1772 | Int m_SPSId; |
---|
| 1773 | Int m_VPSId; |
---|
| 1774 | ChromaFormat m_chromaFormatIdc; |
---|
[56] | 1775 | |
---|
[1200] | 1776 | UInt m_uiMaxTLayers; // maximum number of temporal layers |
---|
[56] | 1777 | |
---|
[2] | 1778 | // Structure |
---|
[1200] | 1779 | UInt m_picWidthInLumaSamples; |
---|
| 1780 | UInt m_picHeightInLumaSamples; |
---|
[608] | 1781 | |
---|
[1200] | 1782 | Int m_log2MinCodingBlockSize; |
---|
| 1783 | Int m_log2DiffMaxMinCodingBlockSize; |
---|
| 1784 | UInt m_uiMaxCUWidth; |
---|
| 1785 | UInt m_uiMaxCUHeight; |
---|
| 1786 | UInt m_uiMaxTotalCUDepth; ///< Total CU depth, relative to the smallest possible transform block size. |
---|
[608] | 1787 | |
---|
[1200] | 1788 | Window m_conformanceWindow; |
---|
| 1789 | |
---|
| 1790 | TComRPSList m_RPSList; |
---|
| 1791 | Bool m_bLongTermRefsPresent; |
---|
| 1792 | Bool m_TMVPFlagsPresent; |
---|
| 1793 | Int m_numReorderPics[MAX_TLAYER]; |
---|
| 1794 | |
---|
[2] | 1795 | // Tool list |
---|
[1200] | 1796 | UInt m_uiQuadtreeTULog2MaxSize; |
---|
| 1797 | UInt m_uiQuadtreeTULog2MinSize; |
---|
| 1798 | UInt m_uiQuadtreeTUMaxDepthInter; |
---|
| 1799 | UInt m_uiQuadtreeTUMaxDepthIntra; |
---|
| 1800 | Bool m_usePCM; |
---|
| 1801 | UInt m_pcmLog2MaxSize; |
---|
| 1802 | UInt m_uiPCMLog2MinSize; |
---|
| 1803 | Bool m_useAMP; |
---|
[2] | 1804 | |
---|
| 1805 | // Parameter |
---|
[1200] | 1806 | BitDepths m_bitDepths; |
---|
| 1807 | Int m_qpBDOffset[MAX_NUM_CHANNEL_TYPE]; |
---|
| 1808 | Int m_pcmBitDepths[MAX_NUM_CHANNEL_TYPE]; |
---|
| 1809 | Bool m_bPCMFilterDisableFlag; |
---|
[5] | 1810 | |
---|
[1200] | 1811 | UInt m_uiBitsForPOC; |
---|
| 1812 | UInt m_numLongTermRefPicSPS; |
---|
| 1813 | UInt m_ltRefPicPocLsbSps[MAX_NUM_LONG_TERM_REF_PICS]; |
---|
| 1814 | Bool m_usedByCurrPicLtSPSFlag[MAX_NUM_LONG_TERM_REF_PICS]; |
---|
| 1815 | // Max physical transform size |
---|
| 1816 | UInt m_uiMaxTrSize; |
---|
[56] | 1817 | |
---|
[1200] | 1818 | Bool m_bUseSAO; |
---|
[964] | 1819 | |
---|
[1200] | 1820 | Bool m_bTemporalIdNestingFlag; // temporal_id_nesting_flag |
---|
[2] | 1821 | |
---|
[1200] | 1822 | Bool m_scalingListEnabledFlag; |
---|
| 1823 | Bool m_scalingListPresentFlag; |
---|
| 1824 | TComScalingList m_scalingList; |
---|
| 1825 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
| 1826 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) |
---|
[2] | 1827 | |
---|
[1200] | 1828 | Bool m_useStrongIntraSmoothing; |
---|
[56] | 1829 | |
---|
[1200] | 1830 | Bool m_vuiParametersPresentFlag; |
---|
| 1831 | TComVUI m_vuiParameters; |
---|
[56] | 1832 | |
---|
[1200] | 1833 | TComSPSRExt m_spsRangeExtension; |
---|
[56] | 1834 | |
---|
[1200] | 1835 | static const Int m_winUnitX[NUM_CHROMA_FORMAT]; |
---|
| 1836 | static const Int m_winUnitY[NUM_CHROMA_FORMAT]; |
---|
| 1837 | TComPTL m_pcPTL; |
---|
[976] | 1838 | |
---|
[1200] | 1839 | #if O0043_BEST_EFFORT_DECODING |
---|
| 1840 | 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) |
---|
[964] | 1841 | #endif |
---|
[1200] | 1842 | #if NH_MV |
---|
| 1843 | TComVPS* m_pcVPS; |
---|
| 1844 | // SPS |
---|
| 1845 | Int m_spsMaxSubLayersMinus1; |
---|
| 1846 | Int m_spsExtOrMaxSubLayersMinus1; |
---|
| 1847 | Bool m_spsExtensionPresentFlag; |
---|
| 1848 | |
---|
| 1849 | Bool m_spsRangeExtensionsFlag; |
---|
| 1850 | Bool m_spsMultilayerExtensionFlag; |
---|
[976] | 1851 | |
---|
[1200] | 1852 | Bool m_sps3dExtensionFlag; |
---|
| 1853 | Int m_spsExtension5bits; |
---|
| 1854 | |
---|
| 1855 | Bool m_spsInferScalingListFlag; |
---|
| 1856 | Int m_spsScalingListRefLayerId; |
---|
| 1857 | Bool m_updateRepFormatFlag; |
---|
| 1858 | Int m_spsRepFormatIdx; |
---|
[622] | 1859 | // SPS Extension |
---|
[1200] | 1860 | Bool m_interViewMvVertConstraintFlag; |
---|
[2] | 1861 | #endif |
---|
[1200] | 1862 | #if NH_3D |
---|
[1124] | 1863 | TComSps3dExtension m_sps3dExtension; |
---|
[1200] | 1864 | Int m_aaiCodedScale [2][MAX_NUM_LAYERS]; |
---|
| 1865 | Int m_aaiCodedOffset[2][MAX_NUM_LAYERS]; |
---|
| 1866 | #endif |
---|
| 1867 | #if NH_MV |
---|
| 1868 | Int m_layerId; |
---|
[210] | 1869 | #endif |
---|
[1200] | 1870 | |
---|
| 1871 | public: |
---|
| 1872 | TComSPS(); |
---|
| 1873 | virtual ~TComSPS(); |
---|
| 1874 | #if O0043_BEST_EFFORT_DECODING |
---|
| 1875 | Void setForceDecodeBitDepth(UInt bitDepth) { m_forceDecodeBitDepth = bitDepth; } |
---|
| 1876 | UInt getForceDecodeBitDepth() const { return m_forceDecodeBitDepth; } |
---|
[115] | 1877 | #endif |
---|
[608] | 1878 | |
---|
[1200] | 1879 | Int getVPSId() const { return m_VPSId; } |
---|
| 1880 | Void setVPSId(Int i) { m_VPSId = i; } |
---|
| 1881 | Int getSPSId() const { return m_SPSId; } |
---|
| 1882 | Void setSPSId(Int i) { m_SPSId = i; } |
---|
| 1883 | ChromaFormat getChromaFormatIdc () const { return m_chromaFormatIdc; } |
---|
| 1884 | Void setChromaFormatIdc (ChromaFormat i) { m_chromaFormatIdc = i; } |
---|
[608] | 1885 | |
---|
[1200] | 1886 | static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc < NUM_CHROMA_FORMAT); return m_winUnitX[chromaFormatIdc]; } |
---|
| 1887 | static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc < NUM_CHROMA_FORMAT); return m_winUnitY[chromaFormatIdc]; } |
---|
| 1888 | |
---|
[2] | 1889 | // structure |
---|
[1200] | 1890 | Void setPicWidthInLumaSamples( UInt u ) { m_picWidthInLumaSamples = u; } |
---|
| 1891 | UInt getPicWidthInLumaSamples() const { return m_picWidthInLumaSamples; } |
---|
| 1892 | Void setPicHeightInLumaSamples( UInt u ) { m_picHeightInLumaSamples = u; } |
---|
| 1893 | UInt getPicHeightInLumaSamples() const { return m_picHeightInLumaSamples; } |
---|
[56] | 1894 | |
---|
[1200] | 1895 | Window& getConformanceWindow() { return m_conformanceWindow; } |
---|
| 1896 | const Window& getConformanceWindow() const { return m_conformanceWindow; } |
---|
| 1897 | Void setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; } |
---|
[56] | 1898 | |
---|
[1200] | 1899 | UInt getNumLongTermRefPicSPS() const { return m_numLongTermRefPicSPS; } |
---|
| 1900 | Void setNumLongTermRefPicSPS(UInt val) { m_numLongTermRefPicSPS = val; } |
---|
[608] | 1901 | |
---|
[1200] | 1902 | UInt getLtRefPicPocLsbSps(UInt index) const { assert( index < MAX_NUM_LONG_TERM_REF_PICS ); return m_ltRefPicPocLsbSps[index]; } |
---|
| 1903 | Void setLtRefPicPocLsbSps(UInt index, UInt val) { assert( index < MAX_NUM_LONG_TERM_REF_PICS ); m_ltRefPicPocLsbSps[index] = val; } |
---|
[608] | 1904 | |
---|
[1200] | 1905 | Bool getUsedByCurrPicLtSPSFlag(Int i) const { assert( i < MAX_NUM_LONG_TERM_REF_PICS ); return m_usedByCurrPicLtSPSFlag[i]; } |
---|
| 1906 | Void setUsedByCurrPicLtSPSFlag(Int i, Bool x) { assert( i < MAX_NUM_LONG_TERM_REF_PICS ); m_usedByCurrPicLtSPSFlag[i] = x; } |
---|
[608] | 1907 | |
---|
[1200] | 1908 | Int getLog2MinCodingBlockSize() const { return m_log2MinCodingBlockSize; } |
---|
| 1909 | Void setLog2MinCodingBlockSize(Int val) { m_log2MinCodingBlockSize = val; } |
---|
| 1910 | Int getLog2DiffMaxMinCodingBlockSize() const { return m_log2DiffMaxMinCodingBlockSize; } |
---|
| 1911 | Void setLog2DiffMaxMinCodingBlockSize(Int val) { m_log2DiffMaxMinCodingBlockSize = val; } |
---|
[608] | 1912 | |
---|
[1200] | 1913 | Void setMaxCUWidth( UInt u ) { m_uiMaxCUWidth = u; } |
---|
| 1914 | UInt getMaxCUWidth() const { return m_uiMaxCUWidth; } |
---|
| 1915 | Void setMaxCUHeight( UInt u ) { m_uiMaxCUHeight = u; } |
---|
| 1916 | UInt getMaxCUHeight() const { return m_uiMaxCUHeight; } |
---|
| 1917 | Void setMaxTotalCUDepth( UInt u ) { m_uiMaxTotalCUDepth = u; } |
---|
| 1918 | UInt getMaxTotalCUDepth() const { return m_uiMaxTotalCUDepth; } |
---|
| 1919 | Void setUsePCM( Bool b ) { m_usePCM = b; } |
---|
| 1920 | Bool getUsePCM() const { return m_usePCM; } |
---|
| 1921 | Void setPCMLog2MaxSize( UInt u ) { m_pcmLog2MaxSize = u; } |
---|
| 1922 | UInt getPCMLog2MaxSize() const { return m_pcmLog2MaxSize; } |
---|
| 1923 | Void setPCMLog2MinSize( UInt u ) { m_uiPCMLog2MinSize = u; } |
---|
| 1924 | UInt getPCMLog2MinSize() const { return m_uiPCMLog2MinSize; } |
---|
| 1925 | Void setBitsForPOC( UInt u ) { m_uiBitsForPOC = u; } |
---|
| 1926 | UInt getBitsForPOC() const { return m_uiBitsForPOC; } |
---|
| 1927 | Bool getUseAMP() const { return m_useAMP; } |
---|
| 1928 | Void setUseAMP( Bool b ) { m_useAMP = b; } |
---|
| 1929 | Void setQuadtreeTULog2MaxSize( UInt u ) { m_uiQuadtreeTULog2MaxSize = u; } |
---|
| 1930 | UInt getQuadtreeTULog2MaxSize() const { return m_uiQuadtreeTULog2MaxSize; } |
---|
| 1931 | Void setQuadtreeTULog2MinSize( UInt u ) { m_uiQuadtreeTULog2MinSize = u; } |
---|
| 1932 | UInt getQuadtreeTULog2MinSize() const { return m_uiQuadtreeTULog2MinSize; } |
---|
| 1933 | Void setQuadtreeTUMaxDepthInter( UInt u ) { m_uiQuadtreeTUMaxDepthInter = u; } |
---|
| 1934 | Void setQuadtreeTUMaxDepthIntra( UInt u ) { m_uiQuadtreeTUMaxDepthIntra = u; } |
---|
| 1935 | UInt getQuadtreeTUMaxDepthInter() const { return m_uiQuadtreeTUMaxDepthInter; } |
---|
| 1936 | UInt getQuadtreeTUMaxDepthIntra() const { return m_uiQuadtreeTUMaxDepthIntra; } |
---|
| 1937 | Void setNumReorderPics(Int i, UInt tlayer) { m_numReorderPics[tlayer] = i; } |
---|
| 1938 | Int getNumReorderPics(UInt tlayer) const { return m_numReorderPics[tlayer]; } |
---|
| 1939 | Void createRPSList( Int numRPS ); |
---|
| 1940 | const TComRPSList* getRPSList() const { return &m_RPSList; } |
---|
| 1941 | TComRPSList* getRPSList() { return &m_RPSList; } |
---|
| 1942 | Bool getLongTermRefsPresent() const { return m_bLongTermRefsPresent; } |
---|
| 1943 | Void setLongTermRefsPresent(Bool b) { m_bLongTermRefsPresent=b; } |
---|
| 1944 | Bool getTMVPFlagsPresent() const { return m_TMVPFlagsPresent; } |
---|
| 1945 | Void setTMVPFlagsPresent(Bool b) { m_TMVPFlagsPresent=b; } |
---|
[2] | 1946 | // physical transform |
---|
[1200] | 1947 | Void setMaxTrSize( UInt u ) { m_uiMaxTrSize = u; } |
---|
| 1948 | UInt getMaxTrSize() const { return m_uiMaxTrSize; } |
---|
[5] | 1949 | |
---|
[2] | 1950 | // Bit-depth |
---|
[1200] | 1951 | Int getBitDepth(ChannelType type) const { return m_bitDepths.recon[type]; } |
---|
| 1952 | Void setBitDepth(ChannelType type, Int u ) { m_bitDepths.recon[type] = u; } |
---|
| 1953 | #if O0043_BEST_EFFORT_DECODING |
---|
| 1954 | Int getStreamBitDepth(ChannelType type) const { return m_bitDepths.stream[type]; } |
---|
| 1955 | Void setStreamBitDepth(ChannelType type, Int u ) { m_bitDepths.stream[type] = u; } |
---|
[964] | 1956 | #endif |
---|
[1200] | 1957 | const BitDepths& getBitDepths() const { return m_bitDepths; } |
---|
| 1958 | Int getMaxLog2TrDynamicRange(ChannelType channelType) const { return getSpsRangeExtension().getExtendedPrecisionProcessingFlag() ? std::max<Int>(15, Int(m_bitDepths.recon[channelType] + 6)) : 15; } |
---|
[2] | 1959 | |
---|
[1200] | 1960 | Int getDifferentialLumaChromaBitDepth() const { return Int(m_bitDepths.recon[CHANNEL_TYPE_LUMA]) - Int(m_bitDepths.recon[CHANNEL_TYPE_CHROMA]); } |
---|
| 1961 | Int getQpBDOffset(ChannelType type) const { return m_qpBDOffset[type]; } |
---|
| 1962 | Void setQpBDOffset(ChannelType type, Int i) { m_qpBDOffset[type] = i; } |
---|
[56] | 1963 | |
---|
[1200] | 1964 | Void setUseSAO(Bool bVal) { m_bUseSAO = bVal; } |
---|
| 1965 | Bool getUseSAO() const { return m_bUseSAO; } |
---|
[56] | 1966 | |
---|
[1200] | 1967 | UInt getMaxTLayers() const { return m_uiMaxTLayers; } |
---|
| 1968 | Void setMaxTLayers( UInt uiMaxTLayers ) { assert( uiMaxTLayers <= MAX_TLAYER ); m_uiMaxTLayers = uiMaxTLayers; } |
---|
[56] | 1969 | |
---|
[1200] | 1970 | Bool getTemporalIdNestingFlag() const { return m_bTemporalIdNestingFlag; } |
---|
| 1971 | Void setTemporalIdNestingFlag( Bool bValue ) { m_bTemporalIdNestingFlag = bValue; } |
---|
| 1972 | UInt getPCMBitDepth(ChannelType type) const { return m_pcmBitDepths[type]; } |
---|
| 1973 | Void setPCMBitDepth(ChannelType type, UInt u) { m_pcmBitDepths[type] = u; } |
---|
| 1974 | Void setPCMFilterDisableFlag( Bool bValue ) { m_bPCMFilterDisableFlag = bValue; } |
---|
| 1975 | Bool getPCMFilterDisableFlag() const { return m_bPCMFilterDisableFlag; } |
---|
[210] | 1976 | |
---|
[1200] | 1977 | Bool getScalingListFlag() const { return m_scalingListEnabledFlag; } |
---|
| 1978 | Void setScalingListFlag( Bool b ) { m_scalingListEnabledFlag = b; } |
---|
| 1979 | Bool getScalingListPresentFlag() const { return m_scalingListPresentFlag; } |
---|
| 1980 | Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } |
---|
| 1981 | Void setScalingList( TComScalingList *scalingList); |
---|
| 1982 | TComScalingList& getScalingList() { return m_scalingList; } |
---|
| 1983 | const TComScalingList& getScalingList() const { return m_scalingList; } |
---|
| 1984 | UInt getMaxDecPicBuffering(UInt tlayer) const { return m_uiMaxDecPicBuffering[tlayer]; } |
---|
| 1985 | Void setMaxDecPicBuffering( UInt ui, UInt tlayer ) { assert(tlayer < MAX_TLAYER); m_uiMaxDecPicBuffering[tlayer] = ui; } |
---|
| 1986 | UInt getMaxLatencyIncrease(UInt tlayer) const { return m_uiMaxLatencyIncrease[tlayer]; } |
---|
| 1987 | Void setMaxLatencyIncrease( UInt ui , UInt tlayer) { m_uiMaxLatencyIncrease[tlayer] = ui; } |
---|
[1066] | 1988 | |
---|
[1200] | 1989 | Void setUseStrongIntraSmoothing(Bool bVal) { m_useStrongIntraSmoothing = bVal; } |
---|
| 1990 | Bool getUseStrongIntraSmoothing() const { return m_useStrongIntraSmoothing; } |
---|
[738] | 1991 | |
---|
[1200] | 1992 | Bool getVuiParametersPresentFlag() const { return m_vuiParametersPresentFlag; } |
---|
| 1993 | Void setVuiParametersPresentFlag(Bool b) { m_vuiParametersPresentFlag = b; } |
---|
| 1994 | TComVUI* getVuiParameters() { return &m_vuiParameters; } |
---|
| 1995 | const TComVUI* getVuiParameters() const { return &m_vuiParameters; } |
---|
| 1996 | const TComPTL* getPTL() const { return &m_pcPTL; } |
---|
| 1997 | TComPTL* getPTL() { return &m_pcPTL; } |
---|
[964] | 1998 | |
---|
[1200] | 1999 | const TComSPSRExt& getSpsRangeExtension() const { return m_spsRangeExtension; } |
---|
| 2000 | TComSPSRExt& getSpsRangeExtension() { return m_spsRangeExtension; } |
---|
[964] | 2001 | |
---|
[1200] | 2002 | // Sequence parameter set range extension syntax |
---|
| 2003 | // WAS: getUseResidualRotation and setUseResidualRotation |
---|
| 2004 | // Now getSpsRangeExtension().getTransformSkipRotationEnabledFlag and getSpsRangeExtension().setTransformSkipRotationEnabledFlag |
---|
[964] | 2005 | |
---|
[1200] | 2006 | // WAS: getUseSingleSignificanceMapContext and setUseSingleSignificanceMapContext |
---|
| 2007 | // Now: getSpsRangeExtension().getTransformSkipContextEnabledFlag and getSpsRangeExtension().setTransformSkipContextEnabledFlag |
---|
[622] | 2008 | |
---|
[1200] | 2009 | // WAS: getUseResidualDPCM and setUseResidualDPCM |
---|
| 2010 | // Now: getSpsRangeExtension().getRdpcmEnabledFlag and getSpsRangeExtension().setRdpcmEnabledFlag and |
---|
[622] | 2011 | |
---|
[1200] | 2012 | // WAS: getUseExtendedPrecision and setUseExtendedPrecision |
---|
| 2013 | // Now: getSpsRangeExtension().getExtendedPrecisionProcessingFlag and getSpsRangeExtension().setExtendedPrecisionProcessingFlag |
---|
[622] | 2014 | |
---|
[1200] | 2015 | // WAS: getDisableIntraReferenceSmoothing and setDisableIntraReferenceSmoothing |
---|
| 2016 | // Now: getSpsRangeExtension().getIntraSmoothingDisabledFlag and getSpsRangeExtension().setIntraSmoothingDisabledFlag |
---|
[738] | 2017 | |
---|
[1200] | 2018 | // WAS: getUseHighPrecisionPredictionWeighting and setUseHighPrecisionPredictionWeighting |
---|
| 2019 | // Now: getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag and getSpsRangeExtension().setHighPrecisionOffsetsEnabledFlag |
---|
[1124] | 2020 | |
---|
[1200] | 2021 | // WAS: getUseGolombRiceParameterAdaptation and setUseGolombRiceParameterAdaptation |
---|
| 2022 | // Now: getSpsRangeExtension().getPersistentRiceAdaptationEnabledFlag and getSpsRangeExtension().setPersistentRiceAdaptationEnabledFlag |
---|
[1066] | 2023 | |
---|
[1200] | 2024 | // WAS: getAlignCABACBeforeBypass and setAlignCABACBeforeBypass |
---|
| 2025 | // Now: getSpsRangeExtension().getCabacBypassAlignmentEnabledFlag and getSpsRangeExtension().setCabacBypassAlignmentEnabledFlag |
---|
[964] | 2026 | |
---|
| 2027 | |
---|
[1200] | 2028 | #if NH_MV |
---|
| 2029 | |
---|
| 2030 | UInt getSpsMaxSubLayersMinus1() const { return ( m_uiMaxTLayers - 1); } |
---|
| 2031 | Void setSpsMaxSubLayersMinus1( UInt val ) { setMaxTLayers( val + 1 ); } |
---|
| 2032 | |
---|
| 2033 | Void setSpsExtOrMaxSubLayersMinus1( Int val ) { m_spsExtOrMaxSubLayersMinus1 = val; } |
---|
| 2034 | Int getSpsExtOrMaxSubLayersMinus1( ) const { return m_spsExtOrMaxSubLayersMinus1; } |
---|
| 2035 | Void inferSpsMaxSubLayersMinus1( Bool atPsActivation, TComVPS* vps ); |
---|
| 2036 | |
---|
| 2037 | Bool getMultiLayerExtSpsFlag() const { return ( getLayerId() != 0 && getSpsExtOrMaxSubLayersMinus1() == 7 ); } |
---|
| 2038 | Void inferSpsMaxDecPicBufferingMinus1( TComVPS* vps, Int targetOptLayerSetIdx, Int currLayerId, Bool encoder ); |
---|
| 2039 | |
---|
| 2040 | Void setSpsExtensionPresentFlag( Bool flag ) { m_spsExtensionPresentFlag = flag; } |
---|
| 2041 | Bool getSpsExtensionPresentFlag( ) const { return m_spsExtensionPresentFlag; } |
---|
| 2042 | |
---|
| 2043 | Void setSpsRangeExtensionsFlag( Bool flag ) { m_spsRangeExtensionsFlag = flag; } |
---|
| 2044 | Bool getSpsRangeExtensionsFlag( ) const { return m_spsRangeExtensionsFlag; } |
---|
| 2045 | |
---|
| 2046 | Void setSpsMultilayerExtensionFlag( Bool flag ) { m_spsMultilayerExtensionFlag = flag; } |
---|
| 2047 | Bool getSpsMultilayerExtensionFlag( ) const { return m_spsMultilayerExtensionFlag; } |
---|
| 2048 | |
---|
| 2049 | Void setSps3dExtensionFlag( Bool flag ) { m_sps3dExtensionFlag = flag; } |
---|
| 2050 | Bool getSps3dExtensionFlag( ) const { return m_sps3dExtensionFlag; } |
---|
| 2051 | |
---|
| 2052 | Void setSpsExtension5bits( Int val ) { m_spsExtension5bits = val; } |
---|
| 2053 | Int getSpsExtension5bits( ) const { return m_spsExtension5bits; } |
---|
| 2054 | |
---|
| 2055 | Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } |
---|
| 2056 | TComVPS* getVPS () const { return m_pcVPS; } |
---|
| 2057 | |
---|
| 2058 | Void setSpsInferScalingListFlag( Bool flag ) { m_spsInferScalingListFlag = flag; } |
---|
| 2059 | Bool getSpsInferScalingListFlag( ) const { return m_spsInferScalingListFlag; } |
---|
| 2060 | |
---|
| 2061 | Void setSpsScalingListRefLayerId( Int val ) { m_spsScalingListRefLayerId = val; } |
---|
| 2062 | Int getSpsScalingListRefLayerId( ) const { return m_spsScalingListRefLayerId; } |
---|
| 2063 | |
---|
| 2064 | Void setUpdateRepFormatFlag( Bool flag ) { m_updateRepFormatFlag = flag; } |
---|
| 2065 | Bool getUpdateRepFormatFlag( ) const { return m_updateRepFormatFlag; } |
---|
| 2066 | |
---|
| 2067 | Void setSpsRepFormatIdx( Int val ) { m_spsRepFormatIdx = val; } |
---|
| 2068 | Int getSpsRepFormatIdx( ) const { return m_spsRepFormatIdx; } |
---|
| 2069 | |
---|
| 2070 | // SPS Extension |
---|
| 2071 | Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; } |
---|
| 2072 | Bool getInterViewMvVertConstraintFlag() const { return m_interViewMvVertConstraintFlag; } |
---|
| 2073 | |
---|
| 2074 | #if NH_3D |
---|
| 2075 | Void setSps3dExtension ( TComSps3dExtension& sps3dExtension ) { m_sps3dExtension = sps3dExtension; } |
---|
| 2076 | const TComSps3dExtension* getSps3dExtension ( ) const { return &m_sps3dExtension; } |
---|
| 2077 | #endif |
---|
| 2078 | |
---|
| 2079 | // Inference |
---|
| 2080 | |
---|
| 2081 | Void inferRepFormat( TComVPS* vps, Int layerIdCurr, Bool encoder ); |
---|
| 2082 | Void inferScalingList( const TComSPS* spsSrc ); |
---|
| 2083 | |
---|
| 2084 | // others |
---|
| 2085 | Void checkRpsMaxNumPics( const TComVPS* vps, Int currLayerId ) const; |
---|
| 2086 | |
---|
| 2087 | Int getLayerId () const { return m_layerId; } |
---|
| 2088 | Void setLayerId ( Int val ) { m_layerId = val; } |
---|
| 2089 | |
---|
[313] | 2090 | #endif |
---|
[5] | 2091 | |
---|
[56] | 2092 | }; |
---|
[42] | 2093 | |
---|
[1200] | 2094 | |
---|
[56] | 2095 | /// Reference Picture Lists class |
---|
[1200] | 2096 | |
---|
[56] | 2097 | class TComRefPicListModification |
---|
| 2098 | { |
---|
| 2099 | private: |
---|
[1200] | 2100 | Bool m_refPicListModificationFlagL0; |
---|
| 2101 | Bool m_refPicListModificationFlagL1; |
---|
| 2102 | UInt m_RefPicSetIdxL0[REF_PIC_LIST_NUM_IDX]; |
---|
| 2103 | UInt m_RefPicSetIdxL1[REF_PIC_LIST_NUM_IDX]; |
---|
| 2104 | |
---|
[56] | 2105 | public: |
---|
[1200] | 2106 | TComRefPicListModification(); |
---|
[56] | 2107 | virtual ~TComRefPicListModification(); |
---|
| 2108 | |
---|
[1200] | 2109 | Void create(); |
---|
| 2110 | Void destroy(); |
---|
| 2111 | |
---|
| 2112 | Bool getRefPicListModificationFlagL0() const { return m_refPicListModificationFlagL0; } |
---|
| 2113 | Void setRefPicListModificationFlagL0(Bool flag) { m_refPicListModificationFlagL0 = flag; } |
---|
| 2114 | Bool getRefPicListModificationFlagL1() const { return m_refPicListModificationFlagL1; } |
---|
| 2115 | Void setRefPicListModificationFlagL1(Bool flag) { m_refPicListModificationFlagL1 = flag; } |
---|
| 2116 | UInt getRefPicSetIdxL0(UInt idx) const { assert(idx<REF_PIC_LIST_NUM_IDX); return m_RefPicSetIdxL0[idx]; } |
---|
| 2117 | Void setRefPicSetIdxL0(UInt idx, UInt refPicSetIdx) { assert(idx<REF_PIC_LIST_NUM_IDX); m_RefPicSetIdxL0[idx] = refPicSetIdx; } |
---|
| 2118 | UInt getRefPicSetIdxL1(UInt idx) const { assert(idx<REF_PIC_LIST_NUM_IDX); return m_RefPicSetIdxL1[idx]; } |
---|
| 2119 | Void setRefPicSetIdxL1(UInt idx, UInt refPicSetIdx) { assert(idx<REF_PIC_LIST_NUM_IDX); m_RefPicSetIdxL1[idx] = refPicSetIdx; } |
---|
| 2120 | #if NH_MV |
---|
| 2121 | // Why not a listIdx for all members, would avoid code duplication?? |
---|
| 2122 | Void setRefPicSetIdxL(UInt li, UInt idx, UInt refPicSetIdx) {( li==0 ? m_RefPicSetIdxL0[idx] : m_RefPicSetIdxL1[idx] ) = refPicSetIdx; } |
---|
| 2123 | UInt getRefPicSetIdxL(UInt li, UInt idx ) { return ( li == 0 ) ? m_RefPicSetIdxL0[idx] : m_RefPicSetIdxL1[idx] ; } |
---|
| 2124 | Void setRefPicListModificationFlagL(UInt li, Bool flag) { ( li==0 ? m_refPicListModificationFlagL0 : m_refPicListModificationFlagL1 ) = flag; } |
---|
| 2125 | Bool getRefPicListModificationFlagL(UInt li ) { return ( li== 0) ? m_refPicListModificationFlagL0 : m_refPicListModificationFlagL1; } |
---|
[608] | 2126 | #endif |
---|
[2] | 2127 | }; |
---|
| 2128 | |
---|
[1200] | 2129 | /// PPS RExt class |
---|
| 2130 | class TComPPSRExt // Names aligned to text specification |
---|
| 2131 | { |
---|
| 2132 | private: |
---|
| 2133 | Int m_log2MaxTransformSkipBlockSize; |
---|
| 2134 | Bool m_crossComponentPredictionEnabledFlag; |
---|
| 2135 | |
---|
| 2136 | // Chroma QP Adjustments |
---|
| 2137 | Int m_diffCuChromaQpOffsetDepth; |
---|
| 2138 | Int m_chromaQpOffsetListLen; // size (excludes the null entry used in the following array). |
---|
| 2139 | ChromaQpAdj m_ChromaQpAdjTableIncludingNullEntry[1+MAX_QP_OFFSET_LIST_SIZE]; //!< Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0, and entries [cu_chroma_qp_offset_idx+1...] otherwise |
---|
| 2140 | |
---|
| 2141 | UInt m_log2SaoOffsetScale[MAX_NUM_CHANNEL_TYPE]; |
---|
| 2142 | |
---|
| 2143 | public: |
---|
| 2144 | TComPPSRExt(); |
---|
| 2145 | |
---|
| 2146 | Bool settingsDifferFromDefaults(const bool bTransformSkipEnabledFlag) const |
---|
| 2147 | { |
---|
| 2148 | return (bTransformSkipEnabledFlag && (getLog2MaxTransformSkipBlockSize() !=2)) |
---|
| 2149 | || (getCrossComponentPredictionEnabledFlag() ) |
---|
| 2150 | || (getChromaQpOffsetListEnabledFlag() ) |
---|
| 2151 | || (getLog2SaoOffsetScale(CHANNEL_TYPE_LUMA) !=0 ) |
---|
| 2152 | || (getLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA) !=0 ); |
---|
| 2153 | } |
---|
| 2154 | |
---|
| 2155 | UInt getLog2MaxTransformSkipBlockSize() const { return m_log2MaxTransformSkipBlockSize; } |
---|
| 2156 | Void setLog2MaxTransformSkipBlockSize( UInt u ) { m_log2MaxTransformSkipBlockSize = u; } |
---|
| 2157 | |
---|
| 2158 | Bool getCrossComponentPredictionEnabledFlag() const { return m_crossComponentPredictionEnabledFlag; } |
---|
| 2159 | Void setCrossComponentPredictionEnabledFlag(Bool value) { m_crossComponentPredictionEnabledFlag = value; } |
---|
| 2160 | |
---|
| 2161 | Void clearChromaQpOffsetList() { m_chromaQpOffsetListLen = 0; } |
---|
| 2162 | |
---|
| 2163 | UInt getDiffCuChromaQpOffsetDepth () const { return m_diffCuChromaQpOffsetDepth; } |
---|
| 2164 | Void setDiffCuChromaQpOffsetDepth ( UInt u ) { m_diffCuChromaQpOffsetDepth = u; } |
---|
| 2165 | |
---|
| 2166 | Bool getChromaQpOffsetListEnabledFlag() const { return getChromaQpOffsetListLen()>0; } |
---|
| 2167 | Int getChromaQpOffsetListLen() const { return m_chromaQpOffsetListLen; } |
---|
| 2168 | |
---|
| 2169 | const ChromaQpAdj& getChromaQpOffsetListEntry( Int cuChromaQpOffsetIdxPlus1 ) const |
---|
| 2170 | { |
---|
| 2171 | assert(cuChromaQpOffsetIdxPlus1 < m_chromaQpOffsetListLen+1); |
---|
| 2172 | return m_ChromaQpAdjTableIncludingNullEntry[cuChromaQpOffsetIdxPlus1]; // Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0, and entries [cu_chroma_qp_offset_idx+1...] otherwise |
---|
| 2173 | } |
---|
| 2174 | |
---|
| 2175 | Void setChromaQpOffsetListEntry( Int cuChromaQpOffsetIdxPlus1, Int cbOffset, Int crOffset ) |
---|
| 2176 | { |
---|
| 2177 | assert (cuChromaQpOffsetIdxPlus1 != 0 && cuChromaQpOffsetIdxPlus1 <= MAX_QP_OFFSET_LIST_SIZE); |
---|
| 2178 | m_ChromaQpAdjTableIncludingNullEntry[cuChromaQpOffsetIdxPlus1].u.comp.CbOffset = cbOffset; // Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0, and entries [cu_chroma_qp_offset_idx+1...] otherwise |
---|
| 2179 | m_ChromaQpAdjTableIncludingNullEntry[cuChromaQpOffsetIdxPlus1].u.comp.CrOffset = crOffset; |
---|
| 2180 | m_chromaQpOffsetListLen = max(m_chromaQpOffsetListLen, cuChromaQpOffsetIdxPlus1); |
---|
| 2181 | } |
---|
| 2182 | |
---|
| 2183 | // Now: getPpsRangeExtension().getLog2SaoOffsetScale and getPpsRangeExtension().setLog2SaoOffsetScale |
---|
| 2184 | UInt getLog2SaoOffsetScale(ChannelType type) const { return m_log2SaoOffsetScale[type]; } |
---|
| 2185 | Void setLog2SaoOffsetScale(ChannelType type, UInt uiBitShift) { m_log2SaoOffsetScale[type] = uiBitShift; } |
---|
| 2186 | |
---|
| 2187 | }; |
---|
| 2188 | |
---|
| 2189 | |
---|
[2] | 2190 | /// PPS class |
---|
| 2191 | class TComPPS |
---|
| 2192 | { |
---|
| 2193 | private: |
---|
[1200] | 2194 | Int m_PPSId; // pic_parameter_set_id |
---|
| 2195 | Int m_SPSId; // seq_parameter_set_id |
---|
| 2196 | Int m_picInitQPMinus26; |
---|
| 2197 | Bool m_useDQP; |
---|
| 2198 | Bool m_bConstrainedIntraPred; // constrained_intra_pred_flag |
---|
| 2199 | Bool m_bSliceChromaQpFlag; // slicelevel_chroma_qp_flag |
---|
[608] | 2200 | |
---|
[56] | 2201 | // access channel |
---|
[1200] | 2202 | UInt m_uiMaxCuDQPDepth; |
---|
[56] | 2203 | |
---|
[1200] | 2204 | Int m_chromaCbQpOffset; |
---|
| 2205 | Int m_chromaCrQpOffset; |
---|
[56] | 2206 | |
---|
[1200] | 2207 | UInt m_numRefIdxL0DefaultActive; |
---|
| 2208 | UInt m_numRefIdxL1DefaultActive; |
---|
[56] | 2209 | |
---|
[1200] | 2210 | Bool m_bUseWeightPred; //!< Use of Weighting Prediction (P_SLICE) |
---|
| 2211 | Bool m_useWeightedBiPred; //!< Use of Weighting Bi-Prediction (B_SLICE) |
---|
| 2212 | Bool m_OutputFlagPresentFlag; //!< Indicates the presence of output_flag in slice header |
---|
| 2213 | Bool m_TransquantBypassEnableFlag; //!< Indicates presence of cu_transquant_bypass_flag in CUs. |
---|
| 2214 | Bool m_useTransformSkip; |
---|
| 2215 | Bool m_dependentSliceSegmentsEnabledFlag; //!< Indicates the presence of dependent slices |
---|
| 2216 | Bool m_tilesEnabledFlag; //!< Indicates the presence of tiles |
---|
| 2217 | Bool m_entropyCodingSyncEnabledFlag; //!< Indicates the presence of wavefronts |
---|
[56] | 2218 | |
---|
[1200] | 2219 | Bool m_loopFilterAcrossTilesEnabledFlag; |
---|
[1084] | 2220 | Bool m_uniformSpacingFlag; |
---|
| 2221 | Int m_numTileColumnsMinus1; |
---|
| 2222 | Int m_numTileRowsMinus1; |
---|
| 2223 | std::vector<Int> m_tileColumnWidth; |
---|
| 2224 | std::vector<Int> m_tileRowHeight; |
---|
[608] | 2225 | |
---|
[1200] | 2226 | Bool m_signHideFlag; |
---|
[5] | 2227 | |
---|
[1200] | 2228 | Bool m_cabacInitPresentFlag; |
---|
[56] | 2229 | |
---|
[1200] | 2230 | Bool m_sliceHeaderExtensionPresentFlag; |
---|
| 2231 | Bool m_loopFilterAcrossSlicesEnabledFlag; |
---|
| 2232 | Bool m_deblockingFilterControlPresentFlag; |
---|
| 2233 | Bool m_deblockingFilterOverrideEnabledFlag; |
---|
| 2234 | Bool m_picDisableDeblockingFilterFlag; |
---|
| 2235 | Int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
| 2236 | Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
| 2237 | Bool m_scalingListPresentFlag; |
---|
| 2238 | TComScalingList m_scalingList; //!< ScalingList class |
---|
| 2239 | Bool m_listsModificationPresentFlag; |
---|
| 2240 | UInt m_log2ParallelMergeLevelMinus2; |
---|
| 2241 | Int m_numExtraSliceHeaderBits; |
---|
[608] | 2242 | |
---|
[1200] | 2243 | TComPPSRExt m_ppsRangeExtension; |
---|
[608] | 2244 | |
---|
[1200] | 2245 | #if NH_MV |
---|
| 2246 | Int m_layerId; |
---|
| 2247 | Bool m_ppsInferScalingListFlag; |
---|
| 2248 | Int m_ppsScalingListRefLayerId; |
---|
| 2249 | |
---|
| 2250 | Bool m_ppsRangeExtensionsFlag; |
---|
| 2251 | Bool m_ppsMultilayerExtensionFlag; |
---|
| 2252 | Bool m_pps3dExtensionFlag; |
---|
| 2253 | Int m_ppsExtension5bits; |
---|
[872] | 2254 | |
---|
[1200] | 2255 | Bool m_pocResetInfoPresentFlag; |
---|
[964] | 2256 | #endif |
---|
| 2257 | |
---|
[773] | 2258 | #if H_3D |
---|
[1200] | 2259 | TComDLT* m_pcDLT; |
---|
[758] | 2260 | #endif |
---|
| 2261 | |
---|
[2] | 2262 | public: |
---|
[1200] | 2263 | TComPPS(); |
---|
| 2264 | virtual ~TComPPS(); |
---|
[56] | 2265 | |
---|
[1200] | 2266 | Int getPPSId() const { return m_PPSId; } |
---|
| 2267 | Void setPPSId(Int i) { m_PPSId = i; } |
---|
| 2268 | Int getSPSId() const { return m_SPSId; } |
---|
| 2269 | Void setSPSId(Int i) { m_SPSId = i; } |
---|
[2] | 2270 | |
---|
[1200] | 2271 | Int getPicInitQPMinus26() const { return m_picInitQPMinus26; } |
---|
| 2272 | Void setPicInitQPMinus26( Int i ) { m_picInitQPMinus26 = i; } |
---|
| 2273 | Bool getUseDQP() const { return m_useDQP; } |
---|
| 2274 | Void setUseDQP( Bool b ) { m_useDQP = b; } |
---|
| 2275 | Bool getConstrainedIntraPred() const { return m_bConstrainedIntraPred; } |
---|
| 2276 | Void setConstrainedIntraPred( Bool b ) { m_bConstrainedIntraPred = b; } |
---|
| 2277 | Bool getSliceChromaQpFlag() const { return m_bSliceChromaQpFlag; } |
---|
| 2278 | Void setSliceChromaQpFlag( Bool b ) { m_bSliceChromaQpFlag = b; } |
---|
| 2279 | |
---|
| 2280 | Void setMaxCuDQPDepth( UInt u ) { m_uiMaxCuDQPDepth = u; } |
---|
| 2281 | UInt getMaxCuDQPDepth() const { return m_uiMaxCuDQPDepth; } |
---|
| 2282 | |
---|
[773] | 2283 | #if H_3D |
---|
[1200] | 2284 | Void setDLT( TComDLT* pcDLT ) { m_pcDLT = pcDLT; } |
---|
| 2285 | TComDLT* getDLT() { return m_pcDLT; } |
---|
[758] | 2286 | #endif |
---|
| 2287 | |
---|
[56] | 2288 | |
---|
[1200] | 2289 | Void setQpOffset(ComponentID compID, Int i ) |
---|
| 2290 | { |
---|
| 2291 | if (compID==COMPONENT_Cb) |
---|
| 2292 | { |
---|
| 2293 | m_chromaCbQpOffset = i; |
---|
| 2294 | } |
---|
| 2295 | else if (compID==COMPONENT_Cr) |
---|
| 2296 | { |
---|
| 2297 | m_chromaCrQpOffset = i; |
---|
| 2298 | } |
---|
| 2299 | else |
---|
| 2300 | { |
---|
| 2301 | assert(0); |
---|
| 2302 | } |
---|
| 2303 | } |
---|
| 2304 | Int getQpOffset(ComponentID compID) const |
---|
| 2305 | { |
---|
| 2306 | return (compID==COMPONENT_Y) ? 0 : (compID==COMPONENT_Cb ? m_chromaCbQpOffset : m_chromaCrQpOffset ); |
---|
| 2307 | } |
---|
[608] | 2308 | |
---|
[1200] | 2309 | Void setNumRefIdxL0DefaultActive(UInt ui) { m_numRefIdxL0DefaultActive=ui; } |
---|
| 2310 | UInt getNumRefIdxL0DefaultActive() const { return m_numRefIdxL0DefaultActive; } |
---|
| 2311 | Void setNumRefIdxL1DefaultActive(UInt ui) { m_numRefIdxL1DefaultActive=ui; } |
---|
| 2312 | UInt getNumRefIdxL1DefaultActive() const { return m_numRefIdxL1DefaultActive; } |
---|
[56] | 2313 | |
---|
[1200] | 2314 | Bool getUseWP() const { return m_bUseWeightPred; } |
---|
| 2315 | Bool getWPBiPred() const { return m_useWeightedBiPred; } |
---|
| 2316 | Void setUseWP( Bool b ) { m_bUseWeightPred = b; } |
---|
| 2317 | Void setWPBiPred( Bool b ) { m_useWeightedBiPred = b; } |
---|
[608] | 2318 | |
---|
[1200] | 2319 | Void setOutputFlagPresentFlag( Bool b ) { m_OutputFlagPresentFlag = b; } |
---|
| 2320 | Bool getOutputFlagPresentFlag() const { return m_OutputFlagPresentFlag; } |
---|
| 2321 | Void setTransquantBypassEnableFlag( Bool b ) { m_TransquantBypassEnableFlag = b; } |
---|
| 2322 | Bool getTransquantBypassEnableFlag() const { return m_TransquantBypassEnableFlag; } |
---|
[42] | 2323 | |
---|
[1200] | 2324 | Bool getUseTransformSkip() const { return m_useTransformSkip; } |
---|
| 2325 | Void setUseTransformSkip( Bool b ) { m_useTransformSkip = b; } |
---|
[56] | 2326 | |
---|
[1200] | 2327 | Void setLoopFilterAcrossTilesEnabledFlag(Bool b) { m_loopFilterAcrossTilesEnabledFlag = b; } |
---|
| 2328 | Bool getLoopFilterAcrossTilesEnabledFlag() const { return m_loopFilterAcrossTilesEnabledFlag; } |
---|
| 2329 | Bool getDependentSliceSegmentsEnabledFlag() const { return m_dependentSliceSegmentsEnabledFlag; } |
---|
| 2330 | Void setDependentSliceSegmentsEnabledFlag(Bool val) { m_dependentSliceSegmentsEnabledFlag = val; } |
---|
| 2331 | Bool getEntropyCodingSyncEnabledFlag() const { return m_entropyCodingSyncEnabledFlag; } |
---|
| 2332 | Void setEntropyCodingSyncEnabledFlag(Bool val) { m_entropyCodingSyncEnabledFlag = val; } |
---|
[56] | 2333 | |
---|
[1200] | 2334 | Void setTilesEnabledFlag(Bool val) { m_tilesEnabledFlag = val; } |
---|
| 2335 | Bool getTilesEnabledFlag() const { return m_tilesEnabledFlag; } |
---|
| 2336 | Void setTileUniformSpacingFlag(Bool b) { m_uniformSpacingFlag = b; } |
---|
| 2337 | Bool getTileUniformSpacingFlag() const { return m_uniformSpacingFlag; } |
---|
| 2338 | Void setNumTileColumnsMinus1(Int i) { m_numTileColumnsMinus1 = i; } |
---|
| 2339 | Int getNumTileColumnsMinus1() const { return m_numTileColumnsMinus1; } |
---|
| 2340 | Void setTileColumnWidth(const std::vector<Int>& columnWidth ) { m_tileColumnWidth = columnWidth; } |
---|
| 2341 | UInt getTileColumnWidth(UInt columnIdx) const { return m_tileColumnWidth[columnIdx]; } |
---|
| 2342 | Void setNumTileRowsMinus1(Int i) { m_numTileRowsMinus1 = i; } |
---|
| 2343 | Int getNumTileRowsMinus1() const { return m_numTileRowsMinus1; } |
---|
| 2344 | Void setTileRowHeight(const std::vector<Int>& rowHeight) { m_tileRowHeight = rowHeight; } |
---|
| 2345 | UInt getTileRowHeight(UInt rowIdx) const { return m_tileRowHeight[rowIdx]; } |
---|
[56] | 2346 | |
---|
[1200] | 2347 | Void setSignHideFlag( Bool signHideFlag ) { m_signHideFlag = signHideFlag; } |
---|
| 2348 | Bool getSignHideFlag() const { return m_signHideFlag; } |
---|
[622] | 2349 | |
---|
[1200] | 2350 | Void setCabacInitPresentFlag( Bool flag ) { m_cabacInitPresentFlag = flag; } |
---|
| 2351 | Bool getCabacInitPresentFlag() const { return m_cabacInitPresentFlag; } |
---|
| 2352 | Void setDeblockingFilterControlPresentFlag( Bool val ) { m_deblockingFilterControlPresentFlag = val; } |
---|
| 2353 | Bool getDeblockingFilterControlPresentFlag() const { return m_deblockingFilterControlPresentFlag; } |
---|
| 2354 | Void setDeblockingFilterOverrideEnabledFlag( Bool val ) { m_deblockingFilterOverrideEnabledFlag = val; } |
---|
| 2355 | Bool getDeblockingFilterOverrideEnabledFlag() const { return m_deblockingFilterOverrideEnabledFlag; } |
---|
| 2356 | Void setPicDisableDeblockingFilterFlag(Bool val) { m_picDisableDeblockingFilterFlag = val; } //!< set offset for deblocking filter disabled |
---|
| 2357 | Bool getPicDisableDeblockingFilterFlag() const { return m_picDisableDeblockingFilterFlag; } //!< get offset for deblocking filter disabled |
---|
| 2358 | Void setDeblockingFilterBetaOffsetDiv2(Int val) { m_deblockingFilterBetaOffsetDiv2 = val; } //!< set beta offset for deblocking filter |
---|
| 2359 | Int getDeblockingFilterBetaOffsetDiv2() const { return m_deblockingFilterBetaOffsetDiv2; } //!< get beta offset for deblocking filter |
---|
| 2360 | Void setDeblockingFilterTcOffsetDiv2(Int val) { m_deblockingFilterTcOffsetDiv2 = val; } //!< set tc offset for deblocking filter |
---|
| 2361 | Int getDeblockingFilterTcOffsetDiv2() const { return m_deblockingFilterTcOffsetDiv2; } //!< get tc offset for deblocking filter |
---|
| 2362 | Bool getScalingListPresentFlag() const { return m_scalingListPresentFlag; } |
---|
| 2363 | Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } |
---|
| 2364 | TComScalingList& getScalingList() { return m_scalingList; } |
---|
| 2365 | const TComScalingList& getScalingList() const { return m_scalingList; } |
---|
| 2366 | Bool getListsModificationPresentFlag() const { return m_listsModificationPresentFlag; } |
---|
| 2367 | Void setListsModificationPresentFlag( Bool b ) { m_listsModificationPresentFlag = b; } |
---|
| 2368 | UInt getLog2ParallelMergeLevelMinus2() const { return m_log2ParallelMergeLevelMinus2; } |
---|
| 2369 | Void setLog2ParallelMergeLevelMinus2(UInt mrgLevel) { m_log2ParallelMergeLevelMinus2 = mrgLevel; } |
---|
| 2370 | Int getNumExtraSliceHeaderBits() const { return m_numExtraSliceHeaderBits; } |
---|
| 2371 | Void setNumExtraSliceHeaderBits(Int i) { m_numExtraSliceHeaderBits = i; } |
---|
| 2372 | Void setLoopFilterAcrossSlicesEnabledFlag( Bool bValue ) { m_loopFilterAcrossSlicesEnabledFlag = bValue; } |
---|
| 2373 | Bool getLoopFilterAcrossSlicesEnabledFlag() const { return m_loopFilterAcrossSlicesEnabledFlag; } |
---|
| 2374 | Bool getSliceHeaderExtensionPresentFlag() const { return m_sliceHeaderExtensionPresentFlag; } |
---|
| 2375 | Void setSliceHeaderExtensionPresentFlag(Bool val) { m_sliceHeaderExtensionPresentFlag = val; } |
---|
[622] | 2376 | |
---|
[872] | 2377 | |
---|
[1200] | 2378 | const TComPPSRExt& getPpsRangeExtension() const { return m_ppsRangeExtension; } |
---|
| 2379 | TComPPSRExt& getPpsRangeExtension() { return m_ppsRangeExtension; } |
---|
[964] | 2380 | |
---|
[1200] | 2381 | // WAS: getTransformSkipLog2MaxSize and setTransformSkipLog2MaxSize |
---|
| 2382 | // Now: getPpsRangeExtension().getLog2MaxTransformSkipBlockSize and getPpsRangeExtension().setLog2MaxTransformSkipBlockSize |
---|
[964] | 2383 | |
---|
[1200] | 2384 | // WAS: getUseCrossComponentPrediction and setUseCrossComponentPrediction |
---|
| 2385 | // Now: getPpsRangeExtension().getCrossComponentPredictionEnabledFlag and getPpsRangeExtension().setCrossComponentPredictionEnabledFlag |
---|
[964] | 2386 | |
---|
[1200] | 2387 | // WAS: clearChromaQpAdjTable |
---|
| 2388 | // Now: getPpsRangeExtension().clearChromaQpOffsetList |
---|
[872] | 2389 | |
---|
[1200] | 2390 | // WAS: getMaxCuChromaQpAdjDepth and setMaxCuChromaQpAdjDepth |
---|
| 2391 | // Now: getPpsRangeExtension().getDiffCuChromaQpOffsetDepth and getPpsRangeExtension().setDiffCuChromaQpOffsetDepth |
---|
| 2392 | |
---|
| 2393 | // WAS: getChromaQpAdjTableSize |
---|
| 2394 | // Now: getPpsRangeExtension().getChromaQpOffsetListLen |
---|
| 2395 | |
---|
| 2396 | // WAS: getChromaQpAdjTableAt and setChromaQpAdjTableAt |
---|
| 2397 | // Now: getPpsRangeExtension().getChromaQpOffsetListEntry and getPpsRangeExtension().setChromaQpOffsetListEntry |
---|
| 2398 | |
---|
| 2399 | // WAS: getSaoOffsetBitShift and setSaoOffsetBitShift |
---|
| 2400 | // Now: getPpsRangeExtension().getLog2SaoOffsetScale and getPpsRangeExtension().setLog2SaoOffsetScale |
---|
| 2401 | |
---|
| 2402 | #if NH_MV |
---|
| 2403 | Void setLayerId( Int val ) { m_layerId = val; } |
---|
| 2404 | Int getLayerId( ) const { return m_layerId; } |
---|
| 2405 | |
---|
| 2406 | Void setPpsInferScalingListFlag( Bool flag ) { m_ppsInferScalingListFlag = flag; } |
---|
| 2407 | Bool getPpsInferScalingListFlag( ) const { return m_ppsInferScalingListFlag; } |
---|
| 2408 | |
---|
| 2409 | Void setPpsScalingListRefLayerId( Int val ) { m_ppsScalingListRefLayerId = val; } |
---|
| 2410 | Int getPpsScalingListRefLayerId( ) const { return m_ppsScalingListRefLayerId; } |
---|
| 2411 | |
---|
| 2412 | Void setPpsRangeExtensionsFlag( Bool flag ) { m_ppsRangeExtensionsFlag = flag; } |
---|
| 2413 | Bool getPpsRangeExtensionsFlag( ) const { return m_ppsRangeExtensionsFlag; } |
---|
| 2414 | |
---|
| 2415 | Void setPpsMultilayerExtensionFlag( Bool flag ) { m_ppsMultilayerExtensionFlag = flag; } |
---|
| 2416 | Bool getPpsMultilayerExtensionFlag( ) const { return m_ppsMultilayerExtensionFlag; } |
---|
| 2417 | |
---|
| 2418 | Void setPps3dExtensionFlag( Bool flag ) { m_pps3dExtensionFlag = flag; } |
---|
| 2419 | Bool getPps3dExtensionFlag( ) const { return m_pps3dExtensionFlag; } |
---|
| 2420 | |
---|
| 2421 | Void setPpsExtension5bits( Int val ) { m_ppsExtension5bits = val; } |
---|
| 2422 | Int getPpsExtension5bits( ) const { return m_ppsExtension5bits; } |
---|
| 2423 | |
---|
| 2424 | Void setPocResetInfoPresentFlag( Bool flag ) { m_pocResetInfoPresentFlag = flag; } |
---|
| 2425 | Bool getPocResetInfoPresentFlag( ) const { return m_pocResetInfoPresentFlag; } |
---|
[872] | 2426 | #endif |
---|
[2] | 2427 | }; |
---|
[1200] | 2428 | struct WPScalingParam |
---|
[56] | 2429 | { |
---|
[2] | 2430 | // Explicit weighted prediction parameters parsed in slice header, |
---|
| 2431 | // or Implicit weighted prediction parameters (8 bits depth values). |
---|
[1200] | 2432 | Bool bPresentFlag; |
---|
| 2433 | UInt uiLog2WeightDenom; |
---|
| 2434 | Int iWeight; |
---|
| 2435 | Int iOffset; |
---|
[2] | 2436 | |
---|
| 2437 | // Weighted prediction scaling values built from above parameters (bitdepth scaled): |
---|
[1200] | 2438 | Int w; |
---|
| 2439 | Int o; |
---|
| 2440 | Int offset; |
---|
| 2441 | Int shift; |
---|
| 2442 | Int round; |
---|
| 2443 | }; |
---|
[2] | 2444 | |
---|
[1200] | 2445 | struct WPACDCParam |
---|
[608] | 2446 | { |
---|
[2] | 2447 | Int64 iAC; |
---|
| 2448 | Int64 iDC; |
---|
[1200] | 2449 | }; |
---|
[2] | 2450 | |
---|
| 2451 | /// slice header class |
---|
| 2452 | class TComSlice |
---|
| 2453 | { |
---|
[1200] | 2454 | |
---|
[2] | 2455 | private: |
---|
| 2456 | // Bitstream writing |
---|
[1200] | 2457 | Bool m_saoEnabledFlag[MAX_NUM_CHANNEL_TYPE]; |
---|
| 2458 | Int m_iPPSId; ///< picture parameter set ID |
---|
| 2459 | Bool m_PicOutputFlag; ///< pic_output_flag |
---|
| 2460 | #if NH_MV |
---|
| 2461 | Int m_slicePicOrderCntLsb; |
---|
[964] | 2462 | #endif |
---|
[1200] | 2463 | Int m_iPOC; |
---|
| 2464 | #if NH_MV |
---|
| 2465 | Int m_iPOCBeforeReset; |
---|
[622] | 2466 | #endif |
---|
[1200] | 2467 | Int m_iLastIDR; |
---|
| 2468 | Int m_iAssociatedIRAP; |
---|
| 2469 | NalUnitType m_iAssociatedIRAPType; |
---|
| 2470 | TComReferencePictureSet* m_pcRPS; |
---|
| 2471 | TComReferencePictureSet m_LocalRPS; |
---|
| 2472 | Int m_iBDidx; |
---|
[56] | 2473 | TComRefPicListModification m_RefPicListModification; |
---|
[1200] | 2474 | NalUnitType m_eNalUnitType; ///< Nal unit type for the slice |
---|
| 2475 | SliceType m_eSliceType; |
---|
| 2476 | Int m_iSliceQp; |
---|
| 2477 | Bool m_dependentSliceSegmentFlag; |
---|
[56] | 2478 | #if ADAPTIVE_QP_SELECTION |
---|
[1200] | 2479 | Int m_iSliceQpBase; |
---|
[56] | 2480 | #endif |
---|
[1200] | 2481 | Bool m_ChromaQpAdjEnabled; |
---|
| 2482 | Bool m_deblockingFilterDisable; |
---|
| 2483 | Bool m_deblockingFilterOverrideFlag; //< offsets for deblocking filter inherit from PPS |
---|
| 2484 | Int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
| 2485 | Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
| 2486 | Int m_list1IdxToList0Idx[MAX_NUM_REF]; |
---|
| 2487 | Int m_aiNumRefIdx [NUM_REF_PIC_LIST_01]; // for multiple reference of current slice |
---|
[2] | 2488 | |
---|
[1200] | 2489 | Bool m_bCheckLDC; |
---|
[56] | 2490 | |
---|
[2] | 2491 | // Data |
---|
[1200] | 2492 | Int m_iSliceQpDelta; |
---|
| 2493 | Int m_iSliceChromaQpDelta[MAX_NUM_COMPONENT]; |
---|
| 2494 | TComPic* m_apcRefPicList [NUM_REF_PIC_LIST_01][MAX_NUM_REF+1]; |
---|
| 2495 | Int m_aiRefPOCList [NUM_REF_PIC_LIST_01][MAX_NUM_REF+1]; |
---|
| 2496 | #if NH_MV |
---|
[608] | 2497 | Int m_aiRefLayerIdList[2][MAX_NUM_REF+1]; |
---|
| 2498 | #endif |
---|
[1200] | 2499 | Bool m_bIsUsedAsLongTerm[NUM_REF_PIC_LIST_01][MAX_NUM_REF+1]; |
---|
| 2500 | Int m_iDepth; |
---|
| 2501 | |
---|
[2] | 2502 | // referenced slice? |
---|
[1200] | 2503 | Bool m_bRefenced; |
---|
| 2504 | |
---|
[2] | 2505 | // access channel |
---|
[1200] | 2506 | const TComVPS* m_pcVPS; |
---|
| 2507 | const TComSPS* m_pcSPS; |
---|
| 2508 | const TComPPS* m_pcPPS; |
---|
| 2509 | TComPic* m_pcPic; |
---|
| 2510 | Bool m_colFromL0Flag; // collocated picture from List0 flag |
---|
[5] | 2511 | |
---|
[1200] | 2512 | Bool m_noOutputPriorPicsFlag; |
---|
| 2513 | Bool m_noRaslOutputFlag; |
---|
| 2514 | Bool m_handleCraAsBlaFlag; |
---|
[608] | 2515 | |
---|
[1200] | 2516 | UInt m_colRefIdx; |
---|
| 2517 | UInt m_maxNumMergeCand; |
---|
[2] | 2518 | |
---|
[1200] | 2519 | Double m_lambdas[MAX_NUM_COMPONENT]; |
---|
[2] | 2520 | |
---|
[1200] | 2521 | Bool m_abEqualRef [NUM_REF_PIC_LIST_01][MAX_NUM_REF][MAX_NUM_REF]; |
---|
| 2522 | UInt m_uiTLayer; |
---|
| 2523 | Bool m_bTLayerSwitchingFlag; |
---|
[56] | 2524 | |
---|
[1200] | 2525 | SliceConstraint m_sliceMode; |
---|
| 2526 | UInt m_sliceArgument; |
---|
| 2527 | UInt m_sliceCurStartCtuTsAddr; |
---|
| 2528 | UInt m_sliceCurEndCtuTsAddr; |
---|
| 2529 | UInt m_sliceIdx; |
---|
| 2530 | SliceConstraint m_sliceSegmentMode; |
---|
| 2531 | UInt m_sliceSegmentArgument; |
---|
| 2532 | UInt m_sliceSegmentCurStartCtuTsAddr; |
---|
| 2533 | UInt m_sliceSegmentCurEndCtuTsAddr; |
---|
| 2534 | Bool m_nextSlice; |
---|
| 2535 | Bool m_nextSliceSegment; |
---|
| 2536 | UInt m_sliceBits; |
---|
| 2537 | UInt m_sliceSegmentBits; |
---|
| 2538 | Bool m_bFinalized; |
---|
[56] | 2539 | |
---|
[1200] | 2540 | Bool m_bTestWeightPred; |
---|
| 2541 | Bool m_bTestWeightBiPred; |
---|
| 2542 | 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] |
---|
| 2543 | WPACDCParam m_weightACDCParam[MAX_NUM_COMPONENT]; |
---|
[5] | 2544 | |
---|
[1200] | 2545 | std::vector<UInt> m_substreamSizes; |
---|
[56] | 2546 | |
---|
[1200] | 2547 | Bool m_cabacInitFlag; |
---|
| 2548 | |
---|
| 2549 | Bool m_bLMvdL1Zero; |
---|
| 2550 | Bool m_temporalLayerNonReferenceFlag; |
---|
| 2551 | Bool m_LFCrossSliceBoundaryFlag; |
---|
| 2552 | |
---|
| 2553 | Bool m_enableTMVPFlag; |
---|
| 2554 | |
---|
| 2555 | SliceType m_encCABACTableIdx; // Used to transmit table selection across slices. |
---|
| 2556 | #if NH_MV |
---|
[1066] | 2557 | Bool m_availableForTMVPRefFlag; |
---|
| 2558 | #endif |
---|
| 2559 | |
---|
[1200] | 2560 | #if NH_MV |
---|
[622] | 2561 | std::vector<TComPic*>* m_refPicSetInterLayer0; |
---|
| 2562 | std::vector<TComPic*>* m_refPicSetInterLayer1; |
---|
| 2563 | Int m_layerId; |
---|
| 2564 | Int m_viewId; |
---|
| 2565 | Int m_viewIndex; |
---|
[1200] | 2566 | #if NH_3D |
---|
[622] | 2567 | Bool m_isDepth; |
---|
| 2568 | #endif |
---|
[56] | 2569 | |
---|
[608] | 2570 | // Additional slice header syntax elements |
---|
[872] | 2571 | #if !H_MV_HLS7_GEN |
---|
[622] | 2572 | Bool m_pocResetFlag; |
---|
[872] | 2573 | #endif |
---|
[738] | 2574 | Bool m_crossLayerBlaFlag; |
---|
[608] | 2575 | Bool m_discardableFlag; |
---|
| 2576 | Bool m_interLayerPredEnabledFlag; |
---|
| 2577 | Int m_numInterLayerRefPicsMinus1; |
---|
| 2578 | Int m_interLayerPredLayerIdc [MAX_NUM_LAYERS]; |
---|
[872] | 2579 | |
---|
| 2580 | Int m_sliceSegmentHeaderExtensionLength; |
---|
| 2581 | Int m_pocResetIdc; |
---|
| 2582 | Int m_pocResetPeriodId; |
---|
| 2583 | Bool m_fullPocResetFlag; |
---|
| 2584 | Int m_pocLsbVal; |
---|
| 2585 | Bool m_pocMsbValPresentFlag; |
---|
| 2586 | Int m_pocMsbVal; |
---|
| 2587 | Bool m_pocMsbValRequiredFlag; |
---|
| 2588 | |
---|
[1200] | 2589 | #if NH_3D |
---|
| 2590 | IntAry2d m_aaiCodedScale ; |
---|
| 2591 | IntAry2d m_aaiCodedOffset; |
---|
[872] | 2592 | #endif |
---|
[608] | 2593 | #if H_3D_TMVP |
---|
| 2594 | Int m_aiAlterRefIdx [2]; |
---|
[189] | 2595 | #endif |
---|
[608] | 2596 | #if H_3D_ARP |
---|
[1200] | 2597 | Bool m_arpRefPicAvailable[2][MAX_NUM_LAYERS]; |
---|
[608] | 2598 | TComList<TComPic*> * m_pBaseViewRefPicList[MAX_NUM_LAYERS]; |
---|
[1200] | 2599 | UInt m_nARPStepNum; |
---|
| 2600 | Int m_aiFirstTRefIdx [2]; |
---|
| 2601 | #endif |
---|
| 2602 | #if NH_3D |
---|
[1179] | 2603 | std::vector<Int> m_pocsInCurrRPSs; |
---|
[443] | 2604 | #endif |
---|
[608] | 2605 | #if H_3D_IC |
---|
[1200] | 2606 | Bool m_bApplyIC; |
---|
| 2607 | Bool m_icSkipParseFlag; |
---|
[296] | 2608 | #endif |
---|
[1200] | 2609 | #if NH_3D |
---|
[1179] | 2610 | std::vector<Int> m_inCmpRefViewIdcs; |
---|
| 2611 | Bool m_inCmpPredAvailFlag; |
---|
| 2612 | Bool m_inCmpPredFlag; |
---|
| 2613 | Bool m_cpAvailableFlag; |
---|
| 2614 | Int m_numViews; |
---|
[608] | 2615 | TComPic* m_ivPicsCurrPoc [2][MAX_NUM_LAYERS]; |
---|
| 2616 | Int** m_depthToDisparityB; |
---|
| 2617 | Int** m_depthToDisparityF; |
---|
[1200] | 2618 | Bool m_bApplyDIS; |
---|
[443] | 2619 | #endif |
---|
[296] | 2620 | #endif |
---|
[1084] | 2621 | #if H_3D_IC |
---|
[1200] | 2622 | Int* m_aICEnableCandidate; |
---|
| 2623 | Int* m_aICEnableNum; |
---|
| 2624 | #endif |
---|
| 2625 | #if NH_3D |
---|
| 2626 | Int m_iDefaultRefViewIdx; |
---|
| 2627 | Bool m_bDefaultRefViewIdxAvailableFlag; |
---|
| 2628 | |
---|
| 2629 | Bool m_ivMvPredFlag ; |
---|
| 2630 | Bool m_ivMvScalingFlag ; |
---|
| 2631 | Bool m_ivResPredFlag ; |
---|
| 2632 | Bool m_depthRefinementFlag ; |
---|
| 2633 | Bool m_viewSynthesisPredFlag; |
---|
| 2634 | Bool m_depthBasedBlkPartFlag; |
---|
| 2635 | Bool m_mpiFlag ; |
---|
| 2636 | Bool m_intraContourFlag ; |
---|
| 2637 | Bool m_intraSdcWedgeFlag ; |
---|
| 2638 | Bool m_qtPredFlag ; |
---|
| 2639 | Bool m_interSdcFlag ; |
---|
| 2640 | Bool m_depthIntraSkipFlag ; |
---|
| 2641 | Int m_mpiSubPbSize ; |
---|
| 2642 | Int m_subPbSize ; |
---|
[1066] | 2643 | #endif |
---|
[2] | 2644 | public: |
---|
[1200] | 2645 | TComSlice(); |
---|
| 2646 | virtual ~TComSlice(); |
---|
| 2647 | Void initSlice(); |
---|
[5] | 2648 | |
---|
[1200] | 2649 | Void setVPS( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } |
---|
| 2650 | const TComVPS* getVPS() const { return m_pcVPS; } |
---|
| 2651 | Void setSPS( const TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
| 2652 | const TComSPS* getSPS() const { return m_pcSPS; } |
---|
[5] | 2653 | |
---|
[1200] | 2654 | Void setPPS( const TComPPS* pcPPS ) { m_pcPPS = pcPPS; m_iPPSId = (pcPPS) ? pcPPS->getPPSId() : -1; } |
---|
| 2655 | const TComPPS* getPPS() const { return m_pcPPS; } |
---|
[56] | 2656 | |
---|
[1200] | 2657 | Void setPPSId( Int PPSId ) { m_iPPSId = PPSId; } |
---|
| 2658 | Int getPPSId() const { return m_iPPSId; } |
---|
| 2659 | Void setPicOutputFlag( Bool b ) { m_PicOutputFlag = b; } |
---|
| 2660 | #if NH_MV |
---|
| 2661 | Void setSlicePicOrderCntLsb( Int i ) { m_slicePicOrderCntLsb = i; } |
---|
| 2662 | Int getSlicePicOrderCntLsb( ) const { return m_slicePicOrderCntLsb; } |
---|
[964] | 2663 | #endif |
---|
[1200] | 2664 | Bool getPicOutputFlag() const { return m_PicOutputFlag; } |
---|
| 2665 | Void setSaoEnabledFlag(ChannelType chType, Bool s) {m_saoEnabledFlag[chType] =s; } |
---|
| 2666 | Bool getSaoEnabledFlag(ChannelType chType) const { return m_saoEnabledFlag[chType]; } |
---|
| 2667 | Void setRPS( TComReferencePictureSet *pcRPS ) { m_pcRPS = pcRPS; } |
---|
| 2668 | TComReferencePictureSet* getRPS() { return m_pcRPS; } |
---|
| 2669 | TComReferencePictureSet* getLocalRPS() { return &m_LocalRPS; } |
---|
[56] | 2670 | |
---|
[1200] | 2671 | Void setRPSidx( Int iBDidx ) { m_iBDidx = iBDidx; } |
---|
| 2672 | Int getRPSidx() const { return m_iBDidx; } |
---|
| 2673 | TComRefPicListModification* getRefPicListModification() { return &m_RefPicListModification; } |
---|
| 2674 | Void setLastIDR(Int iIDRPOC) { m_iLastIDR = iIDRPOC; } |
---|
| 2675 | Int getLastIDR() const { return m_iLastIDR; } |
---|
| 2676 | Void setAssociatedIRAPPOC(Int iAssociatedIRAPPOC) { m_iAssociatedIRAP = iAssociatedIRAPPOC; } |
---|
| 2677 | Int getAssociatedIRAPPOC() const { return m_iAssociatedIRAP; } |
---|
| 2678 | Void setAssociatedIRAPType(NalUnitType associatedIRAPType) { m_iAssociatedIRAPType = associatedIRAPType; } |
---|
| 2679 | NalUnitType getAssociatedIRAPType() const { return m_iAssociatedIRAPType; } |
---|
| 2680 | SliceType getSliceType() const { return m_eSliceType; } |
---|
| 2681 | Int getPOC() const { return m_iPOC; } |
---|
| 2682 | Int getSliceQp() const { return m_iSliceQp; } |
---|
| 2683 | Bool getDependentSliceSegmentFlag() const { return m_dependentSliceSegmentFlag; } |
---|
| 2684 | Void setDependentSliceSegmentFlag(Bool val) { m_dependentSliceSegmentFlag = val; } |
---|
[56] | 2685 | #if ADAPTIVE_QP_SELECTION |
---|
[1200] | 2686 | Int getSliceQpBase() const { return m_iSliceQpBase; } |
---|
[21] | 2687 | #endif |
---|
[1200] | 2688 | Int getSliceQpDelta() const { return m_iSliceQpDelta; } |
---|
| 2689 | Int getSliceChromaQpDelta(ComponentID compID) const { return isLuma(compID) ? 0 : m_iSliceChromaQpDelta[compID]; } |
---|
| 2690 | Bool getUseChromaQpAdj() const { return m_ChromaQpAdjEnabled; } |
---|
| 2691 | Bool getDeblockingFilterDisable() const { return m_deblockingFilterDisable; } |
---|
| 2692 | Bool getDeblockingFilterOverrideFlag() const { return m_deblockingFilterOverrideFlag; } |
---|
| 2693 | Int getDeblockingFilterBetaOffsetDiv2()const { return m_deblockingFilterBetaOffsetDiv2; } |
---|
| 2694 | Int getDeblockingFilterTcOffsetDiv2() const { return m_deblockingFilterTcOffsetDiv2; } |
---|
[56] | 2695 | |
---|
[1200] | 2696 | Int getNumRefIdx( RefPicList e ) const { return m_aiNumRefIdx[e]; } |
---|
| 2697 | TComPic* getPic() { return m_pcPic; } |
---|
| 2698 | TComPic* getRefPic( RefPicList e, Int iRefIdx) { return m_apcRefPicList[e][iRefIdx]; } |
---|
| 2699 | Int getRefPOC( RefPicList e, Int iRefIdx) { return m_aiRefPOCList[e][iRefIdx]; } |
---|
| 2700 | #if NH_3D |
---|
| 2701 | Bool getInCmpPredAvailFlag( ) const { return m_inCmpPredAvailFlag; } |
---|
| 2702 | Bool getCpAvailableFlag( ) const { return m_cpAvailableFlag; } |
---|
| 2703 | Bool getInCompPredFlag( ) const { return m_inCmpPredFlag; } |
---|
| 2704 | Void setInCompPredFlag( Bool b ) { m_inCmpPredFlag = b; } |
---|
| 2705 | Int getInCmpRefViewIdcs( Int i ) const { return m_inCmpRefViewIdcs [i]; } |
---|
| 2706 | Int getNumCurCmpLIds( ) const { return (Int) m_inCmpRefViewIdcs.size(); } |
---|
| 2707 | TComPic* getIvPic( Bool depthFlag, Int viewIndex) const { return m_ivPicsCurrPoc[ depthFlag ? 1 : 0 ][ viewIndex ]; } |
---|
| 2708 | #endif |
---|
| 2709 | #if H_3D |
---|
| 2710 | TComPic* getTexturePic () { return m_ivPicsCurrPoc[0][ m_viewIndex ]; } |
---|
| 2711 | #endif |
---|
| 2712 | #if H_3D_IC |
---|
| 2713 | Void setApplyIC( Bool b ) { m_bApplyIC = b; } |
---|
| 2714 | Bool getApplyIC() { return m_bApplyIC; } |
---|
| 2715 | Void xSetApplyIC(); |
---|
| 2716 | Void xSetApplyIC(Bool bUseLowLatencyICEnc); |
---|
| 2717 | Void setIcSkipParseFlag( Bool b ) { m_icSkipParseFlag = b; } |
---|
| 2718 | Bool getIcSkipParseFlag() { return m_icSkipParseFlag; } |
---|
| 2719 | #endif |
---|
| 2720 | #if H_3D_ARP |
---|
| 2721 | Void setBaseViewRefPicList( TComList<TComPic*> *pListPic, Int iViewIdx ) { m_pBaseViewRefPicList[iViewIdx] = pListPic; } |
---|
| 2722 | Void setARPStepNum( TComPicLists*ivPicLists ); |
---|
| 2723 | TComPic* getBaseViewRefPic ( UInt uiPOC , Int iViewIdx ) { return xGetRefPic( *m_pBaseViewRefPicList[iViewIdx], uiPOC ); } |
---|
| 2724 | UInt getARPStepNum( ) { return m_nARPStepNum; } |
---|
[608] | 2725 | #endif |
---|
[1200] | 2726 | Int getDepth() const { return m_iDepth; } |
---|
| 2727 | Bool getColFromL0Flag() const { return m_colFromL0Flag; } |
---|
| 2728 | UInt getColRefIdx() const { return m_colRefIdx; } |
---|
| 2729 | Void checkColRefIdx(UInt curSliceIdx, TComPic* pic); |
---|
| 2730 | Bool getIsUsedAsLongTerm(Int i, Int j) const { return m_bIsUsedAsLongTerm[i][j]; } |
---|
| 2731 | Void setIsUsedAsLongTerm(Int i, Int j, Bool value) { m_bIsUsedAsLongTerm[i][j] = value; } |
---|
| 2732 | Bool getCheckLDC() const { return m_bCheckLDC; } |
---|
| 2733 | Bool getMvdL1ZeroFlag() const { return m_bLMvdL1Zero; } |
---|
| 2734 | Int getNumRpsCurrTempList() const; |
---|
| 2735 | Int getList1IdxToList0Idx( Int list1Idx ) const { return m_list1IdxToList0Idx[list1Idx]; } |
---|
| 2736 | Void setReferenced(Bool b) { m_bRefenced = b; } |
---|
| 2737 | Bool isReferenced() const { return m_bRefenced; } |
---|
| 2738 | 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) ); } |
---|
| 2739 | Void setPOC( Int i ) { m_iPOC = i; } |
---|
| 2740 | Void setNalUnitType( NalUnitType e ) { m_eNalUnitType = e; } |
---|
| 2741 | NalUnitType getNalUnitType() const { return m_eNalUnitType; } |
---|
| 2742 | Bool getRapPicFlag() const; |
---|
| 2743 | Bool getIdrPicFlag() const { return getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP; } |
---|
| 2744 | Bool isIRAP() const { return (getNalUnitType() >= 16) && (getNalUnitType() <= 23); } |
---|
| 2745 | Void checkCRA(const TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, NalUnitType& associatedIRAPType, TComList<TComPic *>& rcListPic); |
---|
| 2746 | Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, const bool bEfficientFieldIRAPEnabled); |
---|
| 2747 | Void setSliceType( SliceType e ) { m_eSliceType = e; } |
---|
| 2748 | Void setSliceQp( Int i ) { m_iSliceQp = i; } |
---|
[56] | 2749 | #if ADAPTIVE_QP_SELECTION |
---|
[1200] | 2750 | Void setSliceQpBase( Int i ) { m_iSliceQpBase = i; } |
---|
[56] | 2751 | #endif |
---|
[1200] | 2752 | Void setSliceQpDelta( Int i ) { m_iSliceQpDelta = i; } |
---|
| 2753 | Void setSliceChromaQpDelta( ComponentID compID, Int i ) { m_iSliceChromaQpDelta[compID] = isLuma(compID) ? 0 : i; } |
---|
| 2754 | Void setUseChromaQpAdj( Bool b ) { m_ChromaQpAdjEnabled = b; } |
---|
| 2755 | Void setDeblockingFilterDisable( Bool b ) { m_deblockingFilterDisable= b; } |
---|
| 2756 | Void setDeblockingFilterOverrideFlag( Bool b ) { m_deblockingFilterOverrideFlag = b; } |
---|
| 2757 | Void setDeblockingFilterBetaOffsetDiv2( Int i ) { m_deblockingFilterBetaOffsetDiv2 = i; } |
---|
| 2758 | Void setDeblockingFilterTcOffsetDiv2( Int i ) { m_deblockingFilterTcOffsetDiv2 = i; } |
---|
[622] | 2759 | |
---|
[1200] | 2760 | Void setRefPic( TComPic* p, RefPicList e, Int iRefIdx ) { m_apcRefPicList[e][iRefIdx] = p; } |
---|
| 2761 | Void setRefPOC( Int i, RefPicList e, Int iRefIdx ) { m_aiRefPOCList[e][iRefIdx] = i; } |
---|
| 2762 | Void setNumRefIdx( RefPicList e, Int i ) { m_aiNumRefIdx[e] = i; } |
---|
| 2763 | Void setPic( TComPic* p ) { m_pcPic = p; } |
---|
| 2764 | Void setDepth( Int iDepth ) { m_iDepth = iDepth; } |
---|
| 2765 | #if NH_MV |
---|
| 2766 | Void setPocBeforeReset( Int i ) { m_iPOCBeforeReset = i; } |
---|
| 2767 | Int getPocBeforeReset( ) { return m_iPOCBeforeReset; } |
---|
| 2768 | Int getRefLayerId( RefPicList e, Int iRefIdx) { return m_aiRefLayerIdList[e][iRefIdx]; } |
---|
| 2769 | Void setRefLayerId( Int i, RefPicList e, Int iRefIdx ) { m_aiRefLayerIdList[e][iRefIdx] = i; } |
---|
| 2770 | Void getTempRefPicLists ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1, |
---|
| 2771 | std::vector<TComPic*> rpsCurrList[2], BoolAry1d usedAsLongTerm[2], Int& numPocTotalCurr, Bool checkNumPocTotalCurr = false ); |
---|
| 2772 | |
---|
| 2773 | Void setRefPicList ( std::vector<TComPic*> rpsCurrList[2], BoolAry1d usedAsLongTerm[2], Int numPocTotalCurr, Bool checkNumPocTotalCurr = false ); |
---|
[622] | 2774 | #else |
---|
[1200] | 2775 | Void setRefPicList( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false ); |
---|
[608] | 2776 | #endif |
---|
[1200] | 2777 | Void setRefPOCList(); |
---|
| 2778 | Void setColFromL0Flag( Bool colFromL0 ) { m_colFromL0Flag = colFromL0; } |
---|
| 2779 | Void setColRefIdx( UInt refIdx) { m_colRefIdx = refIdx; } |
---|
| 2780 | Void setCheckLDC( Bool b ) { m_bCheckLDC = b; } |
---|
| 2781 | Void setMvdL1ZeroFlag( Bool b) { m_bLMvdL1Zero = b; } |
---|
[5] | 2782 | |
---|
[1200] | 2783 | Bool isIntra() const { return m_eSliceType == I_SLICE; } |
---|
| 2784 | Bool isInterB() const { return m_eSliceType == B_SLICE; } |
---|
| 2785 | Bool isInterP() const { return m_eSliceType == P_SLICE; } |
---|
| 2786 | |
---|
| 2787 | Void setLambdas( const Double lambdas[MAX_NUM_COMPONENT] ) { for (Int component = 0; component < MAX_NUM_COMPONENT; component++) m_lambdas[component] = lambdas[component]; } |
---|
| 2788 | const Double* getLambdas() const { return m_lambdas; } |
---|
| 2789 | |
---|
| 2790 | Void initEqualRef(); |
---|
| 2791 | Bool isEqualRef( RefPicList e, Int iRefIdx1, Int iRefIdx2 ) |
---|
[2] | 2792 | { |
---|
[1200] | 2793 | assert(e<NUM_REF_PIC_LIST_01); |
---|
| 2794 | if (iRefIdx1 < 0 || iRefIdx2 < 0) |
---|
| 2795 | { |
---|
| 2796 | return false; |
---|
| 2797 | } |
---|
| 2798 | else |
---|
| 2799 | { |
---|
| 2800 | return m_abEqualRef[e][iRefIdx1][iRefIdx2]; |
---|
| 2801 | } |
---|
[2] | 2802 | } |
---|
[1200] | 2803 | |
---|
| 2804 | Void setEqualRef( RefPicList e, Int iRefIdx1, Int iRefIdx2, Bool b) |
---|
[2] | 2805 | { |
---|
[1200] | 2806 | assert(e<NUM_REF_PIC_LIST_01); |
---|
[2] | 2807 | m_abEqualRef[e][iRefIdx1][iRefIdx2] = m_abEqualRef[e][iRefIdx2][iRefIdx1] = b; |
---|
| 2808 | } |
---|
[56] | 2809 | |
---|
[1200] | 2810 | static Void sortPicList( TComList<TComPic*>& rcListPic ); |
---|
| 2811 | Void setList1IdxToList0Idx(); |
---|
| 2812 | |
---|
| 2813 | UInt getTLayer() const { return m_uiTLayer; } |
---|
| 2814 | Void setTLayer( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } |
---|
| 2815 | #if NH_MV |
---|
| 2816 | Int getTemporalId ( ) { return (Int) m_uiTLayer; } |
---|
[1179] | 2817 | #endif |
---|
[56] | 2818 | |
---|
[1200] | 2819 | Void setTLayerInfo( UInt uiTLayer ); |
---|
| 2820 | Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum ); |
---|
| 2821 | Void checkLeadingPictureRestrictions( TComList<TComPic*>& rcListPic ); |
---|
| 2822 | Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *RPSList); |
---|
| 2823 | #if NH_MV |
---|
| 2824 | Void createInterLayerReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1 ); |
---|
| 2825 | static Void markIvRefPicsAsShortTerm ( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 ); |
---|
| 2826 | static Void markCurrPic ( TComPic* currPic ); |
---|
| 2827 | Void printRefPicList(); |
---|
[2] | 2828 | #endif |
---|
[1200] | 2829 | Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); |
---|
| 2830 | Bool isStepwiseTemporalLayerSwitchingPointCandidate( TComList<TComPic*>& rcListPic ); |
---|
| 2831 | Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0, Bool bUseRecoveryPoint = false); |
---|
| 2832 | Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess, Bool bUseRecoveryPoint, const Bool bEfficientFieldIRAPEnabled); |
---|
| 2833 | Void setMaxNumMergeCand(UInt val ) { m_maxNumMergeCand = val; } |
---|
| 2834 | UInt getMaxNumMergeCand() const { return m_maxNumMergeCand; } |
---|
[56] | 2835 | |
---|
[1200] | 2836 | Void setNoOutputPriorPicsFlag( Bool val ) { m_noOutputPriorPicsFlag = val; } |
---|
| 2837 | Bool getNoOutputPriorPicsFlag() const { return m_noOutputPriorPicsFlag; } |
---|
[56] | 2838 | |
---|
[1200] | 2839 | Void setNoRaslOutputFlag( Bool val ) { m_noRaslOutputFlag = val; } |
---|
| 2840 | Bool getNoRaslOutputFlag() const { return m_noRaslOutputFlag; } |
---|
[964] | 2841 | |
---|
[1200] | 2842 | Void setHandleCraAsBlaFlag( Bool val ) { m_handleCraAsBlaFlag = val; } |
---|
| 2843 | Bool getHandleCraAsBlaFlag() const { return m_handleCraAsBlaFlag; } |
---|
[964] | 2844 | |
---|
[1200] | 2845 | Void setSliceMode( SliceConstraint mode ) { m_sliceMode = mode; } |
---|
| 2846 | SliceConstraint getSliceMode() const { return m_sliceMode; } |
---|
| 2847 | Void setSliceArgument( UInt uiArgument ) { m_sliceArgument = uiArgument; } |
---|
| 2848 | UInt getSliceArgument() const { return m_sliceArgument; } |
---|
| 2849 | Void setSliceCurStartCtuTsAddr( UInt ctuTsAddr ) { m_sliceCurStartCtuTsAddr = ctuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan) |
---|
| 2850 | UInt getSliceCurStartCtuTsAddr() const { return m_sliceCurStartCtuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan) |
---|
| 2851 | Void setSliceCurEndCtuTsAddr( UInt ctuTsAddr ) { m_sliceCurEndCtuTsAddr = ctuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan) |
---|
| 2852 | UInt getSliceCurEndCtuTsAddr() const { return m_sliceCurEndCtuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan) |
---|
| 2853 | Void setSliceIdx( UInt i) { m_sliceIdx = i; } |
---|
| 2854 | UInt getSliceIdx() const { return m_sliceIdx; } |
---|
| 2855 | Void copySliceInfo(TComSlice *pcSliceSrc); |
---|
| 2856 | Void setSliceSegmentMode( SliceConstraint mode ) { m_sliceSegmentMode = mode; } |
---|
| 2857 | SliceConstraint getSliceSegmentMode() const { return m_sliceSegmentMode; } |
---|
| 2858 | Void setSliceSegmentArgument( UInt uiArgument ) { m_sliceSegmentArgument = uiArgument; } |
---|
| 2859 | UInt getSliceSegmentArgument() const { return m_sliceSegmentArgument; } |
---|
| 2860 | Void setSliceSegmentCurStartCtuTsAddr( UInt ctuTsAddr ) { m_sliceSegmentCurStartCtuTsAddr = ctuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan) |
---|
| 2861 | UInt getSliceSegmentCurStartCtuTsAddr() const { return m_sliceSegmentCurStartCtuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan) |
---|
| 2862 | Void setSliceSegmentCurEndCtuTsAddr( UInt ctuTsAddr ) { m_sliceSegmentCurEndCtuTsAddr = ctuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan) |
---|
| 2863 | UInt getSliceSegmentCurEndCtuTsAddr() const { return m_sliceSegmentCurEndCtuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan) |
---|
| 2864 | Void setSliceBits( UInt uiVal ) { m_sliceBits = uiVal; } |
---|
| 2865 | UInt getSliceBits() const { return m_sliceBits; } |
---|
| 2866 | Void setSliceSegmentBits( UInt uiVal ) { m_sliceSegmentBits = uiVal; } |
---|
| 2867 | UInt getSliceSegmentBits() const { return m_sliceSegmentBits; } |
---|
| 2868 | Void setFinalized( Bool uiVal ) { m_bFinalized = uiVal; } |
---|
| 2869 | Bool getFinalized() const { return m_bFinalized; } |
---|
| 2870 | Bool testWeightPred( ) const { return m_bTestWeightPred; } |
---|
| 2871 | Void setTestWeightPred( Bool bValue ) { m_bTestWeightPred = bValue; } |
---|
| 2872 | Bool testWeightBiPred( ) const { return m_bTestWeightBiPred; } |
---|
| 2873 | Void setTestWeightBiPred( Bool bValue ) { m_bTestWeightBiPred = bValue; } |
---|
| 2874 | Void setWpScaling( WPScalingParam wp[NUM_REF_PIC_LIST_01][MAX_NUM_REF][MAX_NUM_COMPONENT] ) |
---|
| 2875 | { |
---|
| 2876 | memcpy(m_weightPredTable, wp, sizeof(WPScalingParam)*NUM_REF_PIC_LIST_01*MAX_NUM_REF*MAX_NUM_COMPONENT); |
---|
| 2877 | } |
---|
[964] | 2878 | |
---|
[1200] | 2879 | Void getWpScaling( RefPicList e, Int iRefIdx, WPScalingParam *&wp); |
---|
[5] | 2880 | |
---|
[1200] | 2881 | Void resetWpScaling(); |
---|
| 2882 | Void initWpScaling(const TComSPS *sps); |
---|
[608] | 2883 | |
---|
[1200] | 2884 | Void setWpAcDcParam( WPACDCParam wp[MAX_NUM_COMPONENT] ) |
---|
| 2885 | { |
---|
| 2886 | memcpy(m_weightACDCParam, wp, sizeof(WPACDCParam)*MAX_NUM_COMPONENT); |
---|
| 2887 | } |
---|
[608] | 2888 | |
---|
[1200] | 2889 | Void getWpAcDcParam( WPACDCParam *&wp ); |
---|
| 2890 | Void initWpAcDcParam(); |
---|
[56] | 2891 | |
---|
[1200] | 2892 | Void clearSubstreamSizes( ) { return m_substreamSizes.clear(); } |
---|
| 2893 | UInt getNumberOfSubstreamSizes( ) { return (UInt) m_substreamSizes.size(); } |
---|
| 2894 | Void addSubstreamSize( UInt size ) { m_substreamSizes.push_back(size); } |
---|
| 2895 | UInt getSubstreamSize( Int idx ) { assert(idx<getNumberOfSubstreamSizes()); return m_substreamSizes[idx]; } |
---|
[608] | 2896 | |
---|
[1200] | 2897 | Void setCabacInitFlag( Bool val ) { m_cabacInitFlag = val; } //!< set CABAC initial flag |
---|
| 2898 | Bool getCabacInitFlag() { return m_cabacInitFlag; } //!< get CABAC initial flag |
---|
| 2899 | Bool getTemporalLayerNonReferenceFlag() { return m_temporalLayerNonReferenceFlag; } |
---|
| 2900 | Void setTemporalLayerNonReferenceFlag(Bool x) { m_temporalLayerNonReferenceFlag = x; } |
---|
| 2901 | Void setLFCrossSliceBoundaryFlag( Bool val ) { m_LFCrossSliceBoundaryFlag = val; } |
---|
| 2902 | Bool getLFCrossSliceBoundaryFlag() { return m_LFCrossSliceBoundaryFlag; } |
---|
| 2903 | |
---|
| 2904 | Void setEnableTMVPFlag( Bool b ) { m_enableTMVPFlag = b; } |
---|
| 2905 | Bool getEnableTMVPFlag() { return m_enableTMVPFlag; } |
---|
| 2906 | |
---|
| 2907 | Void setEncCABACTableIdx( SliceType idx ) { m_encCABACTableIdx = idx; } |
---|
| 2908 | SliceType getEncCABACTableIdx() const { return m_encCABACTableIdx; } |
---|
| 2909 | |
---|
| 2910 | #if NH_MV |
---|
| 2911 | Void setAvailableForTMVPRefFlag( Bool b ) { m_availableForTMVPRefFlag = b; } |
---|
| 2912 | Bool getAvailableForTMVPRefFlag() { return m_availableForTMVPRefFlag; } |
---|
| 2913 | |
---|
| 2914 | Void setLayerId ( Int layerId ) { m_layerId = layerId; } |
---|
| 2915 | Int getLayerId () const { return m_layerId; } |
---|
| 2916 | Int getLayerIdInVps() const { return getVPS()->getLayerIdInVps( m_layerId ); } |
---|
| 2917 | Void setViewId ( Int viewId ) { m_viewId = viewId; } |
---|
| 2918 | Int getViewId () const { return m_viewId; } |
---|
| 2919 | Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } |
---|
| 2920 | Int getViewIndex () const { return m_viewIndex; } |
---|
| 2921 | #if NH_3D |
---|
[608] | 2922 | #if H_3D_TMVP |
---|
[1200] | 2923 | Void generateAlterRefforTMVP (); |
---|
| 2924 | Void setAlterRefIdx ( RefPicList e, Int i ) { m_aiAlterRefIdx[e] = i; } |
---|
| 2925 | Int getAlterRefIdx ( RefPicList e ) { return m_aiAlterRefIdx[e]; } |
---|
| 2926 | #endif |
---|
| 2927 | #if H_3D_ARP |
---|
| 2928 | Int getFirstTRefIdx ( RefPicList e ) { return m_aiFirstTRefIdx[e]; } |
---|
| 2929 | Void setFirstTRefIdx ( RefPicList e, Int i ) { m_aiFirstTRefIdx[e] = i; } |
---|
| 2930 | Bool getArpRefPicAvailable ( RefPicList e, Int viewIdx) { return m_arpRefPicAvailable[e][getVPS()->getLayerIdInNuh(viewIdx, 0)]; } |
---|
| 2931 | IntAry1d getPocsInCurrRPSs() { return m_pocsInCurrRPSs; } |
---|
| 2932 | #endif |
---|
| 2933 | Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } |
---|
| 2934 | Bool getIsDepth () const { return m_isDepth; } |
---|
| 2935 | Void setCamparaSlice ( Int** aaiScale = 0, Int** aaiOffset = 0 ); |
---|
[1179] | 2936 | |
---|
[1200] | 2937 | IntAry1d getCodedScale () { return m_aaiCodedScale [0]; } |
---|
| 2938 | IntAry1d getCodedOffset () { return m_aaiCodedOffset[0]; } |
---|
| 2939 | IntAry1d getInvCodedScale () { return m_aaiCodedScale [1]; } |
---|
| 2940 | IntAry1d getInvCodedOffset () { return m_aaiCodedOffset[1]; } |
---|
| 2941 | |
---|
| 2942 | Void setCpScale( Int j, Int val ) { m_aaiCodedScale[0][j] = val; } |
---|
| 2943 | Int getCpScale( Int j ) { return m_aaiCodedScale[0][j]; } |
---|
| 2944 | |
---|
| 2945 | Void setCpOff( Int j, Int val ) { m_aaiCodedOffset[0][j] = val; } |
---|
| 2946 | Int getCpOff( Int j ) { return m_aaiCodedOffset[0][j]; } |
---|
| 2947 | |
---|
| 2948 | Void setCpInvScale( Int j, Int val ) { m_aaiCodedScale[1][j] = val; } |
---|
| 2949 | Int getCpInvScale( Int j ) { return m_aaiCodedScale[1][j]; } |
---|
| 2950 | |
---|
| 2951 | Void setCpInvOff( Int j, Int val ) { m_aaiCodedOffset[1][j] = val; } |
---|
| 2952 | Int getCpInvOff( Int j ) { return m_aaiCodedOffset[1][j]; } |
---|
| 2953 | |
---|
| 2954 | Void setIvPicLists( TComPicLists* m_ivPicLists ); |
---|
| 2955 | Void setDepthToDisparityLUTs(); |
---|
| 2956 | |
---|
| 2957 | Int* getDepthToDisparityB( Int refViewIdx ) { return m_depthToDisparityB[ getVPS()->getVoiInVps( refViewIdx) ];} |
---|
| 2958 | Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ getVPS()->getVoiInVps( refViewIdx) ];} |
---|
| 2959 | #if H_3D_IC |
---|
| 2960 | Void setICEnableCandidate( Int* icEnableCandidate) { m_aICEnableCandidate = icEnableCandidate; } |
---|
| 2961 | Void setICEnableNum( Int* icEnableNum) { m_aICEnableNum = icEnableNum; } |
---|
| 2962 | Void setICEnableCandidate( UInt layer, Int value) { m_aICEnableCandidate[ layer ] = value; } |
---|
| 2963 | Void setICEnableNum( UInt layer, Int value) { m_aICEnableNum[ layer ] = value; ; } |
---|
| 2964 | |
---|
| 2965 | Int getICEnableCandidate( Int layer) { return m_aICEnableCandidate[ layer ]; } |
---|
| 2966 | Int getICEnableNum( Int layer) { return m_aICEnableNum[ layer ]; } |
---|
[443] | 2967 | #endif |
---|
[1179] | 2968 | #endif |
---|
[608] | 2969 | // Additional slice header syntax elements |
---|
[622] | 2970 | |
---|
[1200] | 2971 | Void setCrossLayerBlaFlag( Bool flag ) { m_crossLayerBlaFlag = flag; } |
---|
| 2972 | Bool getCrossLayerBlaFlag( ) const { return m_crossLayerBlaFlag; } |
---|
| 2973 | Void checkCrossLayerBlaFlag ( ) const ; |
---|
[738] | 2974 | |
---|
[872] | 2975 | #if !H_MV_HLS7_GEN |
---|
[1200] | 2976 | Void setPocResetFlag( Bool flag ) { m_pocResetFlag = flag; } |
---|
| 2977 | Bool getPocResetFlag( ) const { return m_pocResetFlag; } |
---|
[872] | 2978 | #endif |
---|
[622] | 2979 | |
---|
[1200] | 2980 | Void setDiscardableFlag( Bool flag ) { m_discardableFlag = flag; } |
---|
| 2981 | Bool getDiscardableFlag( ) const { return m_discardableFlag; } |
---|
[296] | 2982 | |
---|
[1200] | 2983 | Void setInterLayerPredEnabledFlag( Bool flag ) { m_interLayerPredEnabledFlag = flag; } |
---|
| 2984 | Bool getInterLayerPredEnabledFlag( ) const { return m_interLayerPredEnabledFlag; } |
---|
[608] | 2985 | |
---|
[1200] | 2986 | Void setNumInterLayerRefPicsMinus1( Int val ) { m_numInterLayerRefPicsMinus1 = val; } |
---|
| 2987 | Int getNumInterLayerRefPicsMinus1( ) const { return m_numInterLayerRefPicsMinus1; } |
---|
[608] | 2988 | |
---|
[1200] | 2989 | Void setInterLayerPredLayerIdc( Int i, Int val ) { m_interLayerPredLayerIdc[i] = val; } |
---|
| 2990 | Int getInterLayerPredLayerIdc( Int i ) const { return m_interLayerPredLayerIdc[i]; } |
---|
[608] | 2991 | |
---|
[1200] | 2992 | Void setSliceSegmentHeaderExtensionLength( Int val ) { m_sliceSegmentHeaderExtensionLength = val; } |
---|
| 2993 | Int getSliceSegmentHeaderExtensionLength( ) const { return m_sliceSegmentHeaderExtensionLength; } |
---|
[872] | 2994 | |
---|
[1200] | 2995 | Void setPocResetIdc( Int val ) { m_pocResetIdc = val; } |
---|
| 2996 | Int getPocResetIdc( ) const { return m_pocResetIdc; } |
---|
| 2997 | Void checkPocResetIdc( ) const { assert( !(getVPS()->getPocLsbNotPresentFlag( getLayerIdInVps() ) ) || !(getSlicePicOrderCntLsb() > 0 ) || !( getPocResetIdc() == 2) ); } |
---|
[976] | 2998 | |
---|
[1200] | 2999 | Void setPocResetPeriodId( Int val ) { m_pocResetPeriodId = val; } |
---|
| 3000 | Int getPocResetPeriodId( ) const { return m_pocResetPeriodId; } |
---|
[872] | 3001 | |
---|
[1200] | 3002 | Void setFullPocResetFlag( Bool flag ) { m_fullPocResetFlag = flag; } |
---|
| 3003 | Bool getFullPocResetFlag( ) const { return m_fullPocResetFlag; } |
---|
[872] | 3004 | |
---|
[1200] | 3005 | Void setPocLsbVal( Int val ) { m_pocLsbVal = val; } |
---|
| 3006 | Int getPocLsbVal( ) const { return m_pocLsbVal; } |
---|
| 3007 | Void checkPocLsbVal( ) const { assert( !(getVPS()->getPocLsbNotPresentFlag( getLayerIdInVps() ) ) || !getFullPocResetFlag() || ( getPocLsbVal() == 0 ) ); } |
---|
[872] | 3008 | |
---|
[1200] | 3009 | Void setPocMsbValPresentFlag( Bool flag ) { m_pocMsbValPresentFlag = flag; } |
---|
| 3010 | Bool getPocMsbValPresentFlag( ) const { return m_pocMsbValPresentFlag; } |
---|
[872] | 3011 | |
---|
[1200] | 3012 | Void setPocMsbVal( Int val ) { m_pocMsbVal = val; } |
---|
| 3013 | Int getPocMsbVal( ) const { return m_pocMsbVal; } |
---|
[872] | 3014 | |
---|
[1200] | 3015 | Bool getCraOrBlaPicFlag() const { return ( getCraPicFlag() || getBlaPicFlag() ); } |
---|
| 3016 | Bool getPocMsbValRequiredFlag() const { return ( getCraOrBlaPicFlag() && ( getVPS()->getVpsPocLsbAlignedFlag() || getVPS()->getNumDirectRefLayers( getLayerIdInVps() ) == 0 ) ); } |
---|
[872] | 3017 | |
---|
[1200] | 3018 | UInt getPocLsbValLen() const { return getSPS()->getBitsForPOC(); }; //log2_max_pic_order_cnt_lsb_minus4 + 4 |
---|
[1124] | 3019 | |
---|
[1200] | 3020 | Bool getBlaPicFlag() const |
---|
[872] | 3021 | { |
---|
| 3022 | return getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP |
---|
| 3023 | || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL |
---|
| 3024 | || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP; |
---|
| 3025 | } |
---|
[1200] | 3026 | Bool getCraPicFlag () const |
---|
[872] | 3027 | { |
---|
| 3028 | return getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA; |
---|
| 3029 | } |
---|
| 3030 | |
---|
[622] | 3031 | // Additional variables derived in slice header semantics |
---|
[1200] | 3032 | #if NH_3D |
---|
| 3033 | Int getNumInterLayerRefPicsMinus1Len( ) const { return gCeilLog2( getVPS()->getNumRefListLayers( getLayerId() )); } |
---|
| 3034 | Int getInterLayerPredLayerIdcLen ( ) const { return gCeilLog2( getVPS()->getNumRefListLayers( getLayerId() )); } |
---|
[1124] | 3035 | #else |
---|
[1200] | 3036 | Int getNumInterLayerRefPicsMinus1Len( ) const { return gCeilLog2( getVPS()->getNumDirectRefLayers( getLayerId() )); } |
---|
| 3037 | Int getInterLayerPredLayerIdcLen ( ) const { return gCeilLog2( getVPS()->getNumDirectRefLayers( getLayerId() )); } |
---|
[1124] | 3038 | #endif |
---|
[622] | 3039 | |
---|
[1200] | 3040 | Int getRefLayerPicFlag( Int i ) const; |
---|
| 3041 | Int getRefLayerPicIdc ( Int j ) const; |
---|
| 3042 | Int getNumRefLayerPics( ) const; |
---|
[1124] | 3043 | |
---|
[1200] | 3044 | Int getNumActiveRefLayerPics( ) const; |
---|
[738] | 3045 | |
---|
[1200] | 3046 | Int getNumActiveRefLayerPics0( ) const { return (Int) m_refPicSetInterLayer0->size(); }; |
---|
| 3047 | Int getNumActiveRefLayerPics1( ) const { return (Int) m_refPicSetInterLayer1->size(); }; |
---|
[622] | 3048 | |
---|
[1200] | 3049 | Int getRefPicLayerId ( Int i ) const; |
---|
[622] | 3050 | |
---|
[1200] | 3051 | Void setRefPicSetInterLayer ( std::vector<TComPic*>* refPicSetInterLayer0, std::vector<TComPic*>* refPicSetInterLayer1); |
---|
| 3052 | TComPic* getPicFromRefPicSetInterLayer ( Int setIdc, Int layerId ) const ; |
---|
[622] | 3053 | |
---|
[1200] | 3054 | #if NH_3D |
---|
[1124] | 3055 | // 3D-HEVC tool parameters |
---|
[1200] | 3056 | Void deriveInCmpPredAndCpAvailFlag( ); |
---|
| 3057 | Void init3dToolParameters(); |
---|
| 3058 | Void checkInCompPredRefLayers();; |
---|
[1179] | 3059 | |
---|
[1200] | 3060 | Bool getIvMvPredFlag ( ) { return m_ivMvPredFlag ; }; |
---|
| 3061 | Bool getIvMvScalingFlag ( ) { return m_ivMvScalingFlag ; }; |
---|
| 3062 | Bool getIvResPredFlag ( ) { return m_ivResPredFlag ; }; |
---|
| 3063 | Bool getDepthRefinementFlag ( ) { return m_depthRefinementFlag ; }; |
---|
| 3064 | Bool getViewSynthesisPredFlag ( ) { return m_viewSynthesisPredFlag ; }; |
---|
| 3065 | Bool getDepthBasedBlkPartFlag ( ) { return m_depthBasedBlkPartFlag ; }; |
---|
| 3066 | Bool getMpiFlag ( ) { return m_mpiFlag ; }; |
---|
| 3067 | Bool getIntraContourFlag ( ) { return m_intraContourFlag ; }; |
---|
| 3068 | Bool getIntraSdcWedgeFlag ( ) { return m_intraSdcWedgeFlag ; }; |
---|
| 3069 | Bool getQtPredFlag ( ) { return m_qtPredFlag ; }; |
---|
| 3070 | Bool getInterSdcFlag ( ) { return m_interSdcFlag ; }; |
---|
| 3071 | Bool getDepthIntraSkipFlag ( ) { return m_depthIntraSkipFlag ; }; |
---|
[1124] | 3072 | |
---|
[1200] | 3073 | Int getMpiSubPbSize ( ) { return m_mpiSubPbSize ; }; |
---|
| 3074 | Int getSubPbSize ( ) { return m_subPbSize ; }; |
---|
[1210] | 3075 | #if NH_3D_NBDV |
---|
| 3076 | Int getDefaultRefViewIdx() { return m_iDefaultRefViewIdx; } |
---|
| 3077 | Void setDefaultRefViewIdx(Int iViewIdx) { m_iDefaultRefViewIdx = iViewIdx; } |
---|
| 3078 | |
---|
| 3079 | Bool getDefaultRefViewIdxAvailableFlag() { return m_bDefaultRefViewIdxAvailableFlag; } |
---|
| 3080 | Void setDefaultRefViewIdxAvailableFlag(Bool bViewIdx) { m_bDefaultRefViewIdxAvailableFlag = bViewIdx; } |
---|
| 3081 | Void setDefaultRefView( ); |
---|
[1124] | 3082 | #endif |
---|
[1210] | 3083 | #endif |
---|
[976] | 3084 | // Inference |
---|
[1200] | 3085 | Bool inferPocMsbValPresentFlag(); |
---|
[443] | 3086 | #endif |
---|
[1133] | 3087 | #if H_3D |
---|
[1200] | 3088 | Int getDefaultRefViewIdx() { return m_iDefaultRefViewIdx; } |
---|
| 3089 | Void setDefaultRefViewIdx(Int iViewIdx) { m_iDefaultRefViewIdx = iViewIdx; } |
---|
[833] | 3090 | |
---|
[1200] | 3091 | Bool getDefaultRefViewIdxAvailableFlag() { return m_bDefaultRefViewIdxAvailableFlag; } |
---|
| 3092 | Void setDefaultRefViewIdxAvailableFlag(Bool bViewIdx) { m_bDefaultRefViewIdxAvailableFlag = bViewIdx; } |
---|
| 3093 | Void setDefaultRefView( ); |
---|
[1124] | 3094 | #endif |
---|
[56] | 3095 | protected: |
---|
[1200] | 3096 | TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, Int poc); |
---|
| 3097 | TComPic* xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb); |
---|
| 3098 | #if NH_MV |
---|
| 3099 | TComPic* xGetInterLayerRefPic( std::vector<TComPic*>& rcListIlPic, Int layerId ); |
---|
[608] | 3100 | #endif |
---|
[56] | 3101 | };// END CLASS DEFINITION TComSlice |
---|
[2] | 3102 | |
---|
[5] | 3103 | |
---|
[1200] | 3104 | Void calculateParameterSetChangedFlag(Bool &bChanged, const std::vector<UChar> *pOldData, const std::vector<UChar> &newData); |
---|
| 3105 | |
---|
[56] | 3106 | template <class T> class ParameterSetMap |
---|
| 3107 | { |
---|
| 3108 | public: |
---|
[1200] | 3109 | template <class Tm> |
---|
| 3110 | struct MapData |
---|
| 3111 | { |
---|
| 3112 | Bool bChanged; |
---|
| 3113 | std::vector<UChar> *pNaluData; // Can be null |
---|
| 3114 | Tm* parameterSet; |
---|
| 3115 | }; |
---|
| 3116 | |
---|
[56] | 3117 | ParameterSetMap(Int maxId) |
---|
| 3118 | :m_maxId (maxId) |
---|
| 3119 | {} |
---|
[2] | 3120 | |
---|
[56] | 3121 | ~ParameterSetMap() |
---|
| 3122 | { |
---|
[1200] | 3123 | for (typename std::map<Int,MapData<T> >::iterator i = m_paramsetMap.begin(); i!= m_paramsetMap.end(); i++) |
---|
[56] | 3124 | { |
---|
[1200] | 3125 | delete (*i).second.pNaluData; |
---|
| 3126 | delete (*i).second.parameterSet; |
---|
[56] | 3127 | } |
---|
| 3128 | } |
---|
| 3129 | |
---|
[1200] | 3130 | Void storePS(Int psId, T *ps, const std::vector<UChar> &naluData) |
---|
[56] | 3131 | { |
---|
| 3132 | assert ( psId < m_maxId ); |
---|
| 3133 | if ( m_paramsetMap.find(psId) != m_paramsetMap.end() ) |
---|
| 3134 | { |
---|
[1200] | 3135 | MapData<T> &mapData=m_paramsetMap[psId]; |
---|
| 3136 | |
---|
| 3137 | // work out changed flag |
---|
| 3138 | calculateParameterSetChangedFlag(mapData.bChanged, mapData.pNaluData, naluData); |
---|
| 3139 | delete m_paramsetMap[psId].pNaluData; |
---|
| 3140 | delete m_paramsetMap[psId].parameterSet; |
---|
| 3141 | |
---|
| 3142 | m_paramsetMap[psId].parameterSet = ps; |
---|
[56] | 3143 | } |
---|
[1200] | 3144 | else |
---|
| 3145 | { |
---|
| 3146 | m_paramsetMap[psId].parameterSet = ps; |
---|
| 3147 | m_paramsetMap[psId].bChanged = false; |
---|
| 3148 | } |
---|
| 3149 | m_paramsetMap[psId].pNaluData=new std::vector<UChar>; |
---|
| 3150 | *(m_paramsetMap[psId].pNaluData) = naluData; |
---|
[56] | 3151 | } |
---|
| 3152 | |
---|
[1200] | 3153 | Void clearChangedFlag(Int psId) |
---|
[56] | 3154 | { |
---|
[1200] | 3155 | if ( m_paramsetMap.find(psId) != m_paramsetMap.end() ) |
---|
[56] | 3156 | { |
---|
[1200] | 3157 | m_paramsetMap[psId].bChanged=false; |
---|
[56] | 3158 | } |
---|
| 3159 | } |
---|
| 3160 | |
---|
[1200] | 3161 | Bool getChangedFlag(Int psId) const |
---|
| 3162 | { |
---|
| 3163 | const typename std::map<Int,MapData<T> >::const_iterator constit=m_paramsetMap.find(psId); |
---|
| 3164 | if ( constit != m_paramsetMap.end() ) |
---|
| 3165 | { |
---|
| 3166 | return constit->second.bChanged; |
---|
| 3167 | } |
---|
| 3168 | return false; |
---|
| 3169 | } |
---|
[56] | 3170 | |
---|
| 3171 | T* getPS(Int psId) |
---|
| 3172 | { |
---|
[1200] | 3173 | typename std::map<Int,MapData<T> >::iterator it=m_paramsetMap.find(psId); |
---|
| 3174 | return ( it == m_paramsetMap.end() ) ? NULL : (it)->second.parameterSet; |
---|
[56] | 3175 | } |
---|
| 3176 | |
---|
[1200] | 3177 | const T* getPS(Int psId) const |
---|
| 3178 | { |
---|
| 3179 | typename std::map<Int,MapData<T> >::const_iterator it=m_paramsetMap.find(psId); |
---|
| 3180 | return ( it == m_paramsetMap.end() ) ? NULL : (it)->second.parameterSet; |
---|
| 3181 | } |
---|
| 3182 | |
---|
[56] | 3183 | T* getFirstPS() |
---|
| 3184 | { |
---|
[1200] | 3185 | return (m_paramsetMap.begin() == m_paramsetMap.end() ) ? NULL : m_paramsetMap.begin()->second.parameterSet; |
---|
[56] | 3186 | } |
---|
| 3187 | |
---|
| 3188 | private: |
---|
[1200] | 3189 | std::map<Int,MapData<T> > m_paramsetMap; |
---|
| 3190 | Int m_maxId; |
---|
[56] | 3191 | }; |
---|
| 3192 | |
---|
| 3193 | class ParameterSetManager |
---|
| 3194 | { |
---|
| 3195 | public: |
---|
[1200] | 3196 | ParameterSetManager(); |
---|
| 3197 | virtual ~ParameterSetManager(); |
---|
[608] | 3198 | |
---|
[1200] | 3199 | //! store sequence parameter set and take ownership of it |
---|
| 3200 | Void storeVPS(TComVPS *vps, const std::vector<UChar> &naluData) { m_vpsMap.storePS( vps->getVPSId(), vps, naluData); }; |
---|
| 3201 | //! get pointer to existing video parameter set |
---|
| 3202 | TComVPS* getVPS(Int vpsId) { return m_vpsMap.getPS(vpsId); }; |
---|
| 3203 | Bool getVPSChangedFlag(Int vpsId) const { return m_vpsMap.getChangedFlag(vpsId); } |
---|
| 3204 | Void clearVPSChangedFlag(Int vpsId) { m_vpsMap.clearChangedFlag(vpsId); } |
---|
| 3205 | TComVPS* getFirstVPS() { return m_vpsMap.getFirstPS(); }; |
---|
[56] | 3206 | |
---|
[1200] | 3207 | //! store sequence parameter set and take ownership of it |
---|
| 3208 | Void storeSPS(TComSPS *sps, const std::vector<UChar> &naluData) { m_spsMap.storePS( sps->getSPSId(), sps, naluData); }; |
---|
| 3209 | //! get pointer to existing sequence parameter set |
---|
| 3210 | TComSPS* getSPS(Int spsId) { return m_spsMap.getPS(spsId); }; |
---|
| 3211 | Bool getSPSChangedFlag(Int spsId) const { return m_spsMap.getChangedFlag(spsId); } |
---|
| 3212 | Void clearSPSChangedFlag(Int spsId) { m_spsMap.clearChangedFlag(spsId); } |
---|
| 3213 | TComSPS* getFirstSPS() { return m_spsMap.getFirstPS(); }; |
---|
[56] | 3214 | |
---|
[1200] | 3215 | //! store picture parameter set and take ownership of it |
---|
| 3216 | Void storePPS(TComPPS *pps, const std::vector<UChar> &naluData) { m_ppsMap.storePS( pps->getPPSId(), pps, naluData); }; |
---|
| 3217 | //! get pointer to existing picture parameter set |
---|
| 3218 | TComPPS* getPPS(Int ppsId) { return m_ppsMap.getPS(ppsId); }; |
---|
| 3219 | Bool getPPSChangedFlag(Int ppsId) const { return m_ppsMap.getChangedFlag(ppsId); } |
---|
| 3220 | Void clearPPSChangedFlag(Int ppsId) { m_ppsMap.clearChangedFlag(ppsId); } |
---|
| 3221 | TComPPS* getFirstPPS() { return m_ppsMap.getFirstPS(); }; |
---|
| 3222 | |
---|
[608] | 3223 | //! activate a SPS from a active parameter sets SEI message |
---|
| 3224 | //! \returns true, if activation is successful |
---|
[1200] | 3225 | #if NH_MV |
---|
| 3226 | // Bool activateSPSWithSEI(Int SPSId, Int layerId ); |
---|
[622] | 3227 | #else |
---|
[1200] | 3228 | // Bool activateSPSWithSEI(Int SPSId); |
---|
[622] | 3229 | #endif |
---|
| 3230 | |
---|
| 3231 | //! activate a PPS and depending on isIDR parameter also SPS and VPS |
---|
| 3232 | //! \returns true, if activation is successful |
---|
[1200] | 3233 | #if NH_MV |
---|
| 3234 | Bool activatePPS(Int ppsId, Bool isIRAP, Int layerId ); |
---|
[622] | 3235 | #else |
---|
[1200] | 3236 | Bool activatePPS(Int ppsId, Bool isIRAP); |
---|
[622] | 3237 | #endif |
---|
| 3238 | |
---|
[1200] | 3239 | const TComVPS* getActiveVPS()const { return m_vpsMap.getPS(m_activeVPSId); }; |
---|
| 3240 | |
---|
| 3241 | #if NH_MV |
---|
| 3242 | const TComSPS* getActiveSPS( Int layer )const { return m_spsMap.getPS(m_activeSPSId[layer]); }; |
---|
| 3243 | #else |
---|
| 3244 | const TComSPS* getActiveSPS()const { return m_spsMap.getPS(m_activeSPSId); }; |
---|
[622] | 3245 | #endif |
---|
[1200] | 3246 | |
---|
[622] | 3247 | protected: |
---|
| 3248 | ParameterSetMap<TComVPS> m_vpsMap; |
---|
[1200] | 3249 | ParameterSetMap<TComSPS> m_spsMap; |
---|
[622] | 3250 | ParameterSetMap<TComPPS> m_ppsMap; |
---|
| 3251 | |
---|
[1200] | 3252 | Int m_activeVPSId; // -1 for nothing active |
---|
| 3253 | #if NH_MV |
---|
| 3254 | Int m_activeSPSId[ MAX_NUM_LAYERS ]; // -1 for nothing active |
---|
| 3255 | #else |
---|
| 3256 | Int m_activeSPSId; // -1 for nothing active |
---|
[622] | 3257 | #endif |
---|
[56] | 3258 | }; |
---|
[5] | 3259 | |
---|
[56] | 3260 | //! \} |
---|
[2] | 3261 | |
---|
| 3262 | #endif // __TCOMSLICE__ |
---|