[5] | 1 | /* The copyright in this software is being made available under the BSD |
---|
| 2 | * License, included below. This software may be subject to other third party |
---|
| 3 | * and contributor rights, including patent rights, and no such rights are |
---|
[56] | 4 | * granted under this license. |
---|
[5] | 5 | * |
---|
[608] | 6 | * Copyright (c) 2010-2013, 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" |
---|
| 47 | |
---|
[56] | 48 | //! \ingroup TLibCommon |
---|
| 49 | //! \{ |
---|
| 50 | |
---|
[2] | 51 | class TComPic; |
---|
[56] | 52 | class TComTrQuant; |
---|
[608] | 53 | #if H_MV |
---|
| 54 | class TComPicLists; |
---|
[773] | 55 | class TComVPS; |
---|
[5] | 56 | #endif |
---|
[56] | 57 | // ==================================================================================================================== |
---|
| 58 | // Constants |
---|
| 59 | // ==================================================================================================================== |
---|
[2] | 60 | |
---|
| 61 | // ==================================================================================================================== |
---|
| 62 | // Class definition |
---|
| 63 | // ==================================================================================================================== |
---|
| 64 | |
---|
[56] | 65 | /// Reference Picture Set class |
---|
| 66 | class TComReferencePictureSet |
---|
| 67 | { |
---|
| 68 | private: |
---|
| 69 | Int m_numberOfPictures; |
---|
| 70 | Int m_numberOfNegativePictures; |
---|
| 71 | Int m_numberOfPositivePictures; |
---|
| 72 | Int m_numberOfLongtermPictures; |
---|
| 73 | Int m_deltaPOC[MAX_NUM_REF_PICS]; |
---|
| 74 | Int m_POC[MAX_NUM_REF_PICS]; |
---|
| 75 | Bool m_used[MAX_NUM_REF_PICS]; |
---|
| 76 | Bool m_interRPSPrediction; |
---|
| 77 | Int m_deltaRIdxMinus1; |
---|
| 78 | Int m_deltaRPS; |
---|
| 79 | Int m_numRefIdc; |
---|
| 80 | Int m_refIdc[MAX_NUM_REF_PICS+1]; |
---|
[608] | 81 | Bool m_bCheckLTMSB[MAX_NUM_REF_PICS]; |
---|
| 82 | Int m_pocLSBLT[MAX_NUM_REF_PICS]; |
---|
| 83 | Int m_deltaPOCMSBCycleLT[MAX_NUM_REF_PICS]; |
---|
| 84 | Bool m_deltaPocMSBPresentFlag[MAX_NUM_REF_PICS]; |
---|
[56] | 85 | |
---|
| 86 | public: |
---|
| 87 | TComReferencePictureSet(); |
---|
| 88 | virtual ~TComReferencePictureSet(); |
---|
[608] | 89 | Int getPocLSBLT(Int i) { return m_pocLSBLT[i]; } |
---|
| 90 | Void setPocLSBLT(Int i, Int x) { m_pocLSBLT[i] = x; } |
---|
| 91 | Int getDeltaPocMSBCycleLT(Int i) { return m_deltaPOCMSBCycleLT[i]; } |
---|
| 92 | Void setDeltaPocMSBCycleLT(Int i, Int x) { m_deltaPOCMSBCycleLT[i] = x; } |
---|
| 93 | Bool getDeltaPocMSBPresentFlag(Int i) { return m_deltaPocMSBPresentFlag[i]; } |
---|
| 94 | Void setDeltaPocMSBPresentFlag(Int i, Bool x) { m_deltaPocMSBPresentFlag[i] = x; } |
---|
| 95 | Void setUsed(Int bufferNum, Bool used); |
---|
| 96 | Void setDeltaPOC(Int bufferNum, Int deltaPOC); |
---|
| 97 | Void setPOC(Int bufferNum, Int deltaPOC); |
---|
| 98 | Void setNumberOfPictures(Int numberOfPictures); |
---|
| 99 | Void setCheckLTMSBPresent(Int bufferNum, Bool b ); |
---|
| 100 | Bool getCheckLTMSBPresent(Int bufferNum); |
---|
[56] | 101 | |
---|
[608] | 102 | Int getUsed(Int bufferNum); |
---|
| 103 | Int getDeltaPOC(Int bufferNum); |
---|
| 104 | Int getPOC(Int bufferNum); |
---|
[56] | 105 | Int getNumberOfPictures(); |
---|
[608] | 106 | |
---|
[56] | 107 | Void setNumberOfNegativePictures(Int number) { m_numberOfNegativePictures = number; } |
---|
| 108 | Int getNumberOfNegativePictures() { return m_numberOfNegativePictures; } |
---|
| 109 | Void setNumberOfPositivePictures(Int number) { m_numberOfPositivePictures = number; } |
---|
| 110 | Int getNumberOfPositivePictures() { return m_numberOfPositivePictures; } |
---|
| 111 | Void setNumberOfLongtermPictures(Int number) { m_numberOfLongtermPictures = number; } |
---|
| 112 | Int getNumberOfLongtermPictures() { return m_numberOfLongtermPictures; } |
---|
| 113 | |
---|
| 114 | Void setInterRPSPrediction(Bool flag) { m_interRPSPrediction = flag; } |
---|
| 115 | Bool getInterRPSPrediction() { return m_interRPSPrediction; } |
---|
| 116 | Void setDeltaRIdxMinus1(Int x) { m_deltaRIdxMinus1 = x; } |
---|
| 117 | Int getDeltaRIdxMinus1() { return m_deltaRIdxMinus1; } |
---|
| 118 | Void setDeltaRPS(Int x) { m_deltaRPS = x; } |
---|
| 119 | Int getDeltaRPS() { return m_deltaRPS; } |
---|
| 120 | Void setNumRefIdc(Int x) { m_numRefIdc = x; } |
---|
| 121 | Int getNumRefIdc() { return m_numRefIdc; } |
---|
| 122 | |
---|
| 123 | Void setRefIdc(Int bufferNum, Int refIdc); |
---|
| 124 | Int getRefIdc(Int bufferNum); |
---|
| 125 | |
---|
| 126 | Void sortDeltaPOC(); |
---|
| 127 | Void printDeltaPOC(); |
---|
| 128 | }; |
---|
| 129 | |
---|
| 130 | /// Reference Picture Set set class |
---|
| 131 | class TComRPSList |
---|
| 132 | { |
---|
| 133 | private: |
---|
| 134 | Int m_numberOfReferencePictureSets; |
---|
| 135 | TComReferencePictureSet* m_referencePictureSets; |
---|
| 136 | |
---|
| 137 | public: |
---|
| 138 | TComRPSList(); |
---|
| 139 | virtual ~TComRPSList(); |
---|
| 140 | |
---|
| 141 | Void create (Int numberOfEntries); |
---|
| 142 | Void destroy (); |
---|
| 143 | |
---|
| 144 | |
---|
| 145 | TComReferencePictureSet* getReferencePictureSet(Int referencePictureSetNum); |
---|
| 146 | Int getNumberOfReferencePictureSets(); |
---|
| 147 | Void setNumberOfReferencePictureSets(Int numberOfReferencePictureSets); |
---|
| 148 | }; |
---|
| 149 | |
---|
[608] | 150 | /// SCALING_LIST class |
---|
| 151 | class TComScalingList |
---|
| 152 | { |
---|
| 153 | public: |
---|
| 154 | TComScalingList(); |
---|
| 155 | virtual ~TComScalingList(); |
---|
| 156 | Void setScalingListPresentFlag (Bool b) { m_scalingListPresentFlag = b; } |
---|
| 157 | Bool getScalingListPresentFlag () { return m_scalingListPresentFlag; } |
---|
| 158 | Int* getScalingListAddress (UInt sizeId, UInt listId) { return m_scalingListCoef[sizeId][listId]; } //!< get matrix coefficient |
---|
| 159 | Bool checkPredMode (UInt sizeId, UInt listId); |
---|
| 160 | Void setRefMatrixId (UInt sizeId, UInt listId, UInt u) { m_refMatrixId[sizeId][listId] = u; } //!< set reference matrix ID |
---|
| 161 | UInt getRefMatrixId (UInt sizeId, UInt listId) { return m_refMatrixId[sizeId][listId]; } //!< get reference matrix ID |
---|
| 162 | Int* getScalingListDefaultAddress (UInt sizeId, UInt listId); //!< get default matrix coefficient |
---|
| 163 | Void processDefaultMarix (UInt sizeId, UInt listId); |
---|
| 164 | Void setScalingListDC (UInt sizeId, UInt listId, UInt u) { m_scalingListDC[sizeId][listId] = u; } //!< set DC value |
---|
| 165 | |
---|
| 166 | Int getScalingListDC (UInt sizeId, UInt listId) { return m_scalingListDC[sizeId][listId]; } //!< get DC value |
---|
| 167 | Void checkDcOfMatrix (); |
---|
| 168 | Void processRefMatrix (UInt sizeId, UInt listId , UInt refListId ); |
---|
| 169 | Bool xParseScalingList (Char* pchFile); |
---|
[622] | 170 | #if H_MV |
---|
| 171 | Void inferFrom ( TComScalingList* srcScLi ); |
---|
| 172 | #endif |
---|
[608] | 173 | |
---|
| 174 | private: |
---|
| 175 | Void init (); |
---|
| 176 | Void destroy (); |
---|
| 177 | Int m_scalingListDC [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< the DC value of the matrix coefficient for 16x16 |
---|
| 178 | Bool m_useDefaultScalingMatrixFlag [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< UseDefaultScalingMatrixFlag |
---|
| 179 | UInt m_refMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< RefMatrixID |
---|
| 180 | Bool m_scalingListPresentFlag; //!< flag for using default matrix |
---|
| 181 | UInt m_predMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< reference list index |
---|
| 182 | Int *m_scalingListCoef [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< quantization matrix |
---|
| 183 | }; |
---|
| 184 | |
---|
| 185 | class ProfileTierLevel |
---|
| 186 | { |
---|
| 187 | Int m_profileSpace; |
---|
| 188 | Bool m_tierFlag; |
---|
| 189 | Int m_profileIdc; |
---|
| 190 | Bool m_profileCompatibilityFlag[32]; |
---|
| 191 | Int m_levelIdc; |
---|
| 192 | |
---|
| 193 | Bool m_progressiveSourceFlag; |
---|
| 194 | Bool m_interlacedSourceFlag; |
---|
| 195 | Bool m_nonPackedConstraintFlag; |
---|
| 196 | Bool m_frameOnlyConstraintFlag; |
---|
| 197 | |
---|
| 198 | public: |
---|
| 199 | ProfileTierLevel(); |
---|
| 200 | |
---|
| 201 | Int getProfileSpace() const { return m_profileSpace; } |
---|
| 202 | Void setProfileSpace(Int x) { m_profileSpace = x; } |
---|
| 203 | |
---|
| 204 | Bool getTierFlag() const { return m_tierFlag; } |
---|
| 205 | Void setTierFlag(Bool x) { m_tierFlag = x; } |
---|
| 206 | |
---|
| 207 | Int getProfileIdc() const { return m_profileIdc; } |
---|
| 208 | Void setProfileIdc(Int x) { m_profileIdc = x; } |
---|
| 209 | |
---|
| 210 | Bool getProfileCompatibilityFlag(Int i) const { return m_profileCompatibilityFlag[i]; } |
---|
| 211 | Void setProfileCompatibilityFlag(Int i, Bool x) { m_profileCompatibilityFlag[i] = x; } |
---|
| 212 | |
---|
| 213 | Int getLevelIdc() const { return m_levelIdc; } |
---|
| 214 | Void setLevelIdc(Int x) { m_levelIdc = x; } |
---|
| 215 | |
---|
| 216 | Bool getProgressiveSourceFlag() const { return m_progressiveSourceFlag; } |
---|
| 217 | Void setProgressiveSourceFlag(Bool b) { m_progressiveSourceFlag = b; } |
---|
| 218 | |
---|
| 219 | Bool getInterlacedSourceFlag() const { return m_interlacedSourceFlag; } |
---|
| 220 | Void setInterlacedSourceFlag(Bool b) { m_interlacedSourceFlag = b; } |
---|
| 221 | |
---|
| 222 | Bool getNonPackedConstraintFlag() const { return m_nonPackedConstraintFlag; } |
---|
| 223 | Void setNonPackedConstraintFlag(Bool b) { m_nonPackedConstraintFlag = b; } |
---|
| 224 | |
---|
| 225 | Bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; } |
---|
| 226 | Void setFrameOnlyConstraintFlag(Bool b) { m_frameOnlyConstraintFlag = b; } |
---|
| 227 | }; |
---|
| 228 | |
---|
| 229 | |
---|
| 230 | class TComPTL |
---|
| 231 | { |
---|
| 232 | ProfileTierLevel m_generalPTL; |
---|
| 233 | ProfileTierLevel m_subLayerPTL[6]; // max. value of max_sub_layers_minus1 is 6 |
---|
| 234 | Bool m_subLayerProfilePresentFlag[6]; |
---|
| 235 | Bool m_subLayerLevelPresentFlag[6]; |
---|
| 236 | |
---|
| 237 | public: |
---|
| 238 | TComPTL(); |
---|
| 239 | Bool getSubLayerProfilePresentFlag(Int i) const { return m_subLayerProfilePresentFlag[i]; } |
---|
| 240 | Void setSubLayerProfilePresentFlag(Int i, Bool x) { m_subLayerProfilePresentFlag[i] = x; } |
---|
| 241 | |
---|
| 242 | Bool getSubLayerLevelPresentFlag(Int i) const { return m_subLayerLevelPresentFlag[i]; } |
---|
| 243 | Void setSubLayerLevelPresentFlag(Int i, Bool x) { m_subLayerLevelPresentFlag[i] = x; } |
---|
| 244 | |
---|
| 245 | ProfileTierLevel* getGeneralPTL() { return &m_generalPTL; } |
---|
| 246 | ProfileTierLevel* getSubLayerPTL(Int i) { return &m_subLayerPTL[i]; } |
---|
| 247 | #if H_MV |
---|
| 248 | Void copyLevelFrom( TComPTL* source ); |
---|
| 249 | #endif |
---|
| 250 | }; |
---|
[77] | 251 | /// VPS class |
---|
| 252 | |
---|
[608] | 253 | struct HrdSubLayerInfo |
---|
| 254 | { |
---|
| 255 | Bool fixedPicRateFlag; |
---|
| 256 | Bool fixedPicRateWithinCvsFlag; |
---|
| 257 | UInt picDurationInTcMinus1; |
---|
| 258 | Bool lowDelayHrdFlag; |
---|
| 259 | UInt cpbCntMinus1; |
---|
| 260 | UInt bitRateValueMinus1[MAX_CPB_CNT][2]; |
---|
| 261 | UInt cpbSizeValue [MAX_CPB_CNT][2]; |
---|
| 262 | UInt ducpbSizeValue [MAX_CPB_CNT][2]; |
---|
| 263 | UInt cbrFlag [MAX_CPB_CNT][2]; |
---|
| 264 | UInt duBitRateValue [MAX_CPB_CNT][2]; |
---|
| 265 | }; |
---|
| 266 | |
---|
| 267 | class TComHRD |
---|
| 268 | { |
---|
| 269 | private: |
---|
| 270 | Bool m_nalHrdParametersPresentFlag; |
---|
| 271 | Bool m_vclHrdParametersPresentFlag; |
---|
| 272 | Bool m_subPicCpbParamsPresentFlag; |
---|
| 273 | UInt m_tickDivisorMinus2; |
---|
| 274 | UInt m_duCpbRemovalDelayLengthMinus1; |
---|
| 275 | Bool m_subPicCpbParamsInPicTimingSEIFlag; |
---|
| 276 | UInt m_dpbOutputDelayDuLengthMinus1; |
---|
| 277 | UInt m_bitRateScale; |
---|
| 278 | UInt m_cpbSizeScale; |
---|
| 279 | UInt m_ducpbSizeScale; |
---|
| 280 | UInt m_initialCpbRemovalDelayLengthMinus1; |
---|
| 281 | UInt m_cpbRemovalDelayLengthMinus1; |
---|
| 282 | UInt m_dpbOutputDelayLengthMinus1; |
---|
| 283 | UInt m_numDU; |
---|
| 284 | HrdSubLayerInfo m_HRD[MAX_TLAYER]; |
---|
| 285 | |
---|
| 286 | public: |
---|
| 287 | TComHRD() |
---|
| 288 | :m_nalHrdParametersPresentFlag(0) |
---|
| 289 | ,m_vclHrdParametersPresentFlag(0) |
---|
| 290 | ,m_subPicCpbParamsPresentFlag(false) |
---|
| 291 | ,m_tickDivisorMinus2(0) |
---|
| 292 | ,m_duCpbRemovalDelayLengthMinus1(0) |
---|
| 293 | ,m_subPicCpbParamsInPicTimingSEIFlag(false) |
---|
| 294 | ,m_dpbOutputDelayDuLengthMinus1(0) |
---|
| 295 | ,m_bitRateScale(0) |
---|
| 296 | ,m_cpbSizeScale(0) |
---|
| 297 | ,m_initialCpbRemovalDelayLengthMinus1(0) |
---|
| 298 | ,m_cpbRemovalDelayLengthMinus1(0) |
---|
| 299 | ,m_dpbOutputDelayLengthMinus1(0) |
---|
| 300 | {} |
---|
| 301 | |
---|
| 302 | virtual ~TComHRD() {} |
---|
| 303 | |
---|
| 304 | Void setNalHrdParametersPresentFlag ( Bool flag ) { m_nalHrdParametersPresentFlag = flag; } |
---|
| 305 | Bool getNalHrdParametersPresentFlag ( ) { return m_nalHrdParametersPresentFlag; } |
---|
| 306 | |
---|
| 307 | Void setVclHrdParametersPresentFlag ( Bool flag ) { m_vclHrdParametersPresentFlag = flag; } |
---|
| 308 | Bool getVclHrdParametersPresentFlag ( ) { return m_vclHrdParametersPresentFlag; } |
---|
| 309 | |
---|
| 310 | Void setSubPicCpbParamsPresentFlag ( Bool flag ) { m_subPicCpbParamsPresentFlag = flag; } |
---|
| 311 | Bool getSubPicCpbParamsPresentFlag ( ) { return m_subPicCpbParamsPresentFlag; } |
---|
| 312 | |
---|
| 313 | Void setTickDivisorMinus2 ( UInt value ) { m_tickDivisorMinus2 = value; } |
---|
| 314 | UInt getTickDivisorMinus2 ( ) { return m_tickDivisorMinus2; } |
---|
| 315 | |
---|
| 316 | Void setDuCpbRemovalDelayLengthMinus1 ( UInt value ) { m_duCpbRemovalDelayLengthMinus1 = value; } |
---|
| 317 | UInt getDuCpbRemovalDelayLengthMinus1 ( ) { return m_duCpbRemovalDelayLengthMinus1; } |
---|
| 318 | |
---|
| 319 | Void setSubPicCpbParamsInPicTimingSEIFlag ( Bool flag) { m_subPicCpbParamsInPicTimingSEIFlag = flag; } |
---|
| 320 | Bool getSubPicCpbParamsInPicTimingSEIFlag () { return m_subPicCpbParamsInPicTimingSEIFlag; } |
---|
| 321 | |
---|
| 322 | Void setDpbOutputDelayDuLengthMinus1 (UInt value ) { m_dpbOutputDelayDuLengthMinus1 = value; } |
---|
| 323 | UInt getDpbOutputDelayDuLengthMinus1 () { return m_dpbOutputDelayDuLengthMinus1; } |
---|
| 324 | |
---|
| 325 | Void setBitRateScale ( UInt value ) { m_bitRateScale = value; } |
---|
| 326 | UInt getBitRateScale ( ) { return m_bitRateScale; } |
---|
| 327 | |
---|
| 328 | Void setCpbSizeScale ( UInt value ) { m_cpbSizeScale = value; } |
---|
| 329 | UInt getCpbSizeScale ( ) { return m_cpbSizeScale; } |
---|
| 330 | Void setDuCpbSizeScale ( UInt value ) { m_ducpbSizeScale = value; } |
---|
| 331 | UInt getDuCpbSizeScale ( ) { return m_ducpbSizeScale; } |
---|
| 332 | |
---|
| 333 | Void setInitialCpbRemovalDelayLengthMinus1( UInt value ) { m_initialCpbRemovalDelayLengthMinus1 = value; } |
---|
| 334 | UInt getInitialCpbRemovalDelayLengthMinus1( ) { return m_initialCpbRemovalDelayLengthMinus1; } |
---|
| 335 | |
---|
| 336 | Void setCpbRemovalDelayLengthMinus1 ( UInt value ) { m_cpbRemovalDelayLengthMinus1 = value; } |
---|
| 337 | UInt getCpbRemovalDelayLengthMinus1 ( ) { return m_cpbRemovalDelayLengthMinus1; } |
---|
| 338 | |
---|
| 339 | Void setDpbOutputDelayLengthMinus1 ( UInt value ) { m_dpbOutputDelayLengthMinus1 = value; } |
---|
| 340 | UInt getDpbOutputDelayLengthMinus1 ( ) { return m_dpbOutputDelayLengthMinus1; } |
---|
| 341 | |
---|
| 342 | Void setFixedPicRateFlag ( Int layer, Bool flag ) { m_HRD[layer].fixedPicRateFlag = flag; } |
---|
| 343 | Bool getFixedPicRateFlag ( Int layer ) { return m_HRD[layer].fixedPicRateFlag; } |
---|
| 344 | |
---|
| 345 | Void setFixedPicRateWithinCvsFlag ( Int layer, Bool flag ) { m_HRD[layer].fixedPicRateWithinCvsFlag = flag; } |
---|
| 346 | Bool getFixedPicRateWithinCvsFlag ( Int layer ) { return m_HRD[layer].fixedPicRateWithinCvsFlag; } |
---|
| 347 | |
---|
| 348 | Void setPicDurationInTcMinus1 ( Int layer, UInt value ) { m_HRD[layer].picDurationInTcMinus1 = value; } |
---|
| 349 | UInt getPicDurationInTcMinus1 ( Int layer ) { return m_HRD[layer].picDurationInTcMinus1; } |
---|
| 350 | |
---|
| 351 | Void setLowDelayHrdFlag ( Int layer, Bool flag ) { m_HRD[layer].lowDelayHrdFlag = flag; } |
---|
| 352 | Bool getLowDelayHrdFlag ( Int layer ) { return m_HRD[layer].lowDelayHrdFlag; } |
---|
| 353 | |
---|
| 354 | Void setCpbCntMinus1 ( Int layer, UInt value ) { m_HRD[layer].cpbCntMinus1 = value; } |
---|
| 355 | UInt getCpbCntMinus1 ( Int layer ) { return m_HRD[layer].cpbCntMinus1; } |
---|
| 356 | |
---|
| 357 | Void setBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].bitRateValueMinus1[cpbcnt][nalOrVcl] = value; } |
---|
| 358 | UInt getBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].bitRateValueMinus1[cpbcnt][nalOrVcl]; } |
---|
| 359 | |
---|
| 360 | Void setCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].cpbSizeValue[cpbcnt][nalOrVcl] = value; } |
---|
| 361 | UInt getCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].cpbSizeValue[cpbcnt][nalOrVcl]; } |
---|
| 362 | Void setDuCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].ducpbSizeValue[cpbcnt][nalOrVcl] = value; } |
---|
| 363 | UInt getDuCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].ducpbSizeValue[cpbcnt][nalOrVcl]; } |
---|
| 364 | Void setDuBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].duBitRateValue[cpbcnt][nalOrVcl] = value; } |
---|
| 365 | UInt getDuBitRateValueMinus1 (Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].duBitRateValue[cpbcnt][nalOrVcl]; } |
---|
| 366 | Void setCbrFlag ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].cbrFlag[cpbcnt][nalOrVcl] = value; } |
---|
| 367 | Bool getCbrFlag ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].cbrFlag[cpbcnt][nalOrVcl]; } |
---|
| 368 | |
---|
| 369 | Void setNumDU ( UInt value ) { m_numDU = value; } |
---|
| 370 | UInt getNumDU ( ) { return m_numDU; } |
---|
| 371 | Bool getCpbDpbDelaysPresentFlag() { return getNalHrdParametersPresentFlag() || getVclHrdParametersPresentFlag(); } |
---|
| 372 | }; |
---|
| 373 | |
---|
| 374 | class TimingInfo |
---|
| 375 | { |
---|
| 376 | Bool m_timingInfoPresentFlag; |
---|
| 377 | UInt m_numUnitsInTick; |
---|
| 378 | UInt m_timeScale; |
---|
| 379 | Bool m_pocProportionalToTimingFlag; |
---|
| 380 | Int m_numTicksPocDiffOneMinus1; |
---|
| 381 | public: |
---|
| 382 | TimingInfo() |
---|
| 383 | : m_timingInfoPresentFlag(false) |
---|
| 384 | , m_numUnitsInTick(1001) |
---|
| 385 | , m_timeScale(60000) |
---|
| 386 | , m_pocProportionalToTimingFlag(false) |
---|
| 387 | , m_numTicksPocDiffOneMinus1(0) {} |
---|
| 388 | |
---|
| 389 | Void setTimingInfoPresentFlag ( Bool flag ) { m_timingInfoPresentFlag = flag; } |
---|
| 390 | Bool getTimingInfoPresentFlag ( ) { return m_timingInfoPresentFlag; } |
---|
| 391 | |
---|
| 392 | Void setNumUnitsInTick ( UInt value ) { m_numUnitsInTick = value; } |
---|
| 393 | UInt getNumUnitsInTick ( ) { return m_numUnitsInTick; } |
---|
| 394 | |
---|
| 395 | Void setTimeScale ( UInt value ) { m_timeScale = value; } |
---|
| 396 | UInt getTimeScale ( ) { return m_timeScale; } |
---|
| 397 | |
---|
| 398 | Bool getPocProportionalToTimingFlag ( ) { return m_pocProportionalToTimingFlag; } |
---|
| 399 | Void setPocProportionalToTimingFlag (Bool x ) { m_pocProportionalToTimingFlag = x; } |
---|
| 400 | |
---|
| 401 | Int getNumTicksPocDiffOneMinus1 ( ) { return m_numTicksPocDiffOneMinus1; } |
---|
| 402 | Void setNumTicksPocDiffOneMinus1 (Int x ) { m_numTicksPocDiffOneMinus1 = x; } |
---|
| 403 | }; |
---|
| 404 | |
---|
[622] | 405 | #if H_MV |
---|
[738] | 406 | |
---|
| 407 | class TComVideoSignalInfo |
---|
| 408 | { |
---|
| 409 | private: |
---|
| 410 | Int m_videoVpsFormat; |
---|
| 411 | Bool m_videoFullRangeVpsFlag; |
---|
| 412 | Int m_colourPrimariesVps; |
---|
| 413 | Int m_transferCharacteristicsVps; |
---|
| 414 | Int m_matrixCoeffsVps; |
---|
| 415 | public: |
---|
| 416 | Void setVideoVpsFormat( Int val ) { m_videoVpsFormat = val; } |
---|
| 417 | Int getVideoVpsFormat( ) { return m_videoVpsFormat; } |
---|
| 418 | |
---|
| 419 | Void setVideoFullRangeVpsFlag( Bool flag ) { m_videoFullRangeVpsFlag = flag; } |
---|
| 420 | Bool getVideoFullRangeVpsFlag( ) { return m_videoFullRangeVpsFlag; } |
---|
| 421 | |
---|
| 422 | Void setColourPrimariesVps( Int val ) { m_colourPrimariesVps = val; } |
---|
| 423 | Int getColourPrimariesVps( ) { return m_colourPrimariesVps; } |
---|
| 424 | |
---|
| 425 | Void setTransferCharacteristicsVps( Int val ) { m_transferCharacteristicsVps = val; } |
---|
| 426 | Int getTransferCharacteristicsVps( ) { return m_transferCharacteristicsVps; } |
---|
| 427 | |
---|
| 428 | Void setMatrixCoeffsVps( Int val ) { m_matrixCoeffsVps = val; } |
---|
| 429 | Int getMatrixCoeffsVps( ) { return m_matrixCoeffsVps; } |
---|
| 430 | }; |
---|
| 431 | class TComVpsVuiBspHrdParameters |
---|
| 432 | { |
---|
| 433 | private: |
---|
| 434 | Int m_vpsNumBspHrdParametersMinus1; |
---|
| 435 | Bool m_bspCprmsPresentFlag[MAX_NUM_BSP_HRD_PARAMETERS]; |
---|
| 436 | Int m_numBitstreamPartitions[MAX_VPS_OP_SETS_PLUS1]; |
---|
| 437 | Bool m_layerInBspFlag[MAX_VPS_OP_SETS_PLUS1][MAX_NUM_BSP_HRD_PARAMETERS][MAX_NUM_LAYERS]; |
---|
| 438 | Int m_numBspSchedCombinations[MAX_VPS_OP_SETS_PLUS1]; |
---|
| 439 | Int m_bspCombHrdIdx[MAX_VPS_OP_SETS_PLUS1][MAX_NUM_BSP_HRD_PARAMETERS][MAX_NUM_BSP_SCHED_COMBINATION]; |
---|
| 440 | Int m_bspCombSchedIdx[MAX_VPS_OP_SETS_PLUS1][MAX_NUM_BSP_HRD_PARAMETERS][MAX_NUM_BSP_SCHED_COMBINATION]; |
---|
| 441 | TComHRD* m_hrdParameters[MAX_NUM_BSP_HRD_PARAMETERS]; |
---|
| 442 | public: |
---|
| 443 | |
---|
| 444 | Void setVpsNumBspHrdParametersMinus1( Int val ) { m_vpsNumBspHrdParametersMinus1 = val; } |
---|
| 445 | Int getVpsNumBspHrdParametersMinus1( ) { return m_vpsNumBspHrdParametersMinus1; } |
---|
| 446 | |
---|
| 447 | Void setBspCprmsPresentFlag( Int i, Bool flag ) { m_bspCprmsPresentFlag[i] = flag; } |
---|
| 448 | Bool getBspCprmsPresentFlag( Int i ) { return m_bspCprmsPresentFlag[i]; } |
---|
| 449 | |
---|
| 450 | Void setNumBitstreamPartitions( Int h, Int val ) { m_numBitstreamPartitions[h] = val; } |
---|
| 451 | Int getNumBitstreamPartitions( Int h ) { return m_numBitstreamPartitions[h]; } |
---|
| 452 | |
---|
| 453 | Void setLayerInBspFlag( Int h, Int i, Int j, Bool flag ) { m_layerInBspFlag[h][i][j] = flag; } |
---|
| 454 | Bool getLayerInBspFlag( Int h, Int i, Int j ) { return m_layerInBspFlag[h][i][j]; } |
---|
| 455 | Void checkLayerInBspFlag ( TComVPS* vps, Int h ); |
---|
| 456 | |
---|
| 457 | Void setNumBspSchedCombinations( Int h, Int val ) { m_numBspSchedCombinations[h] = val; } |
---|
| 458 | Int getNumBspSchedCombinations( Int h ) { return m_numBspSchedCombinations[h]; } |
---|
| 459 | |
---|
| 460 | Void setBspCombHrdIdx( Int h, Int i, Int j, Int val ) { m_bspCombHrdIdx[h][i][j] = val; } |
---|
| 461 | Int getBspCombHrdIdx( Int h, Int i, Int j ) { return m_bspCombHrdIdx[h][i][j]; } |
---|
| 462 | |
---|
| 463 | Void setBspCombSchedIdx( Int h, Int i, Int j, Int val ) { m_bspCombSchedIdx[h][i][j] = val; } |
---|
| 464 | Int getBspCombSchedIdx( Int h, Int i, Int j ) { return m_bspCombSchedIdx[h][i][j]; } |
---|
| 465 | |
---|
| 466 | Void setHrdParametermeters( Int k, TComHRD* val ) { m_hrdParameters[k] = val; }; |
---|
| 467 | TComHRD* getHrdParametermeters( Int k ) { return m_hrdParameters[k]; }; |
---|
| 468 | }; |
---|
| 469 | |
---|
[622] | 470 | class TComVPSVUI |
---|
| 471 | { |
---|
| 472 | private: |
---|
[738] | 473 | Bool m_crossLayerPicTypeAlignedFlag; |
---|
| 474 | Bool m_crossLayerIrapAlignedFlag; |
---|
[622] | 475 | Bool m_bitRatePresentVpsFlag; |
---|
| 476 | Bool m_picRatePresentVpsFlag; |
---|
| 477 | Bool m_bitRatePresentFlag [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; |
---|
| 478 | Bool m_picRatePresentFlag [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; |
---|
| 479 | Int m_avgBitRate [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; |
---|
| 480 | Int m_maxBitRate [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; |
---|
| 481 | Int m_constantPicRateIdc [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; |
---|
| 482 | Int m_avgPicRate [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; |
---|
[738] | 483 | Bool m_tilesNotInUseFlag; |
---|
| 484 | Bool m_tilesInUseFlag [MAX_NUM_LAYERS]; |
---|
| 485 | Bool m_loopFilterNotAcrossTilesFlag[MAX_NUM_LAYERS]; |
---|
[622] | 486 | Bool m_tileBoundariesAlignedFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
[738] | 487 | Bool m_wppNotInUseFlag; |
---|
| 488 | Bool m_wppInUseFlag [MAX_NUM_LAYERS]; |
---|
[622] | 489 | Bool m_ilpRestrictedRefLayersFlag; |
---|
| 490 | Int m_minSpatialSegmentOffsetPlus1[MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
| 491 | Bool m_ctuBasedOffsetEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
| 492 | Int m_minHorizontalCtuOffsetPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
[738] | 493 | Bool m_videoSignalInfoIdxPresentFlag; |
---|
| 494 | Int m_vpsNumVideoSignalInfoMinus1; |
---|
| 495 | TComVideoSignalInfo* m_videoSignalInfo[MAX_NUM_VIDEO_SIGNAL_INFO]; |
---|
| 496 | Int m_vpsVideoSignalInfoIdx [MAX_NUM_VIDEO_SIGNAL_INFO]; |
---|
| 497 | Bool m_vpsVuiBspHrdPresentFlag; |
---|
| 498 | TComVpsVuiBspHrdParameters* m_vpsVuiBspHrdParameters; |
---|
[622] | 499 | |
---|
| 500 | public: |
---|
[738] | 501 | TComVPSVUI(); |
---|
| 502 | ~TComVPSVUI(); |
---|
| 503 | Void setCrossLayerPicTypeAlignedFlag( Bool flag ) { m_crossLayerPicTypeAlignedFlag = flag; } |
---|
| 504 | Bool getCrossLayerPicTypeAlignedFlag( ) { return m_crossLayerPicTypeAlignedFlag; } |
---|
[622] | 505 | |
---|
[738] | 506 | Void setCrossLayerIrapAlignedFlag( Bool flag ) { m_crossLayerIrapAlignedFlag = flag; } |
---|
| 507 | Bool getCrossLayerIrapAlignedFlag( ) { return m_crossLayerIrapAlignedFlag; } |
---|
| 508 | |
---|
[622] | 509 | Void setBitRatePresentVpsFlag( Bool flag ) { m_bitRatePresentVpsFlag = flag; } |
---|
| 510 | Bool getBitRatePresentVpsFlag( ) { return m_bitRatePresentVpsFlag; } |
---|
| 511 | |
---|
| 512 | Void setPicRatePresentVpsFlag( Bool flag ) { m_picRatePresentVpsFlag = flag; } |
---|
| 513 | Bool getPicRatePresentVpsFlag( ) { return m_picRatePresentVpsFlag; } |
---|
| 514 | |
---|
| 515 | Void setBitRatePresentFlag( Int i, Int j, Bool flag ) { m_bitRatePresentFlag[i][j] = flag; } |
---|
| 516 | Bool getBitRatePresentFlag( Int i, Int j ) { return m_bitRatePresentFlag[i][j]; } |
---|
| 517 | |
---|
| 518 | Void setPicRatePresentFlag( Int i, Int j, Bool flag ) { m_picRatePresentFlag[i][j] = flag; } |
---|
| 519 | Bool getPicRatePresentFlag( Int i, Int j ) { return m_picRatePresentFlag[i][j]; } |
---|
| 520 | |
---|
| 521 | Void setAvgBitRate( Int i, Int j, Int val ) { m_avgBitRate[i][j] = val; } |
---|
| 522 | Int getAvgBitRate( Int i, Int j ) { return m_avgBitRate[i][j]; } |
---|
| 523 | |
---|
| 524 | Void setMaxBitRate( Int i, Int j, Int val ) { m_maxBitRate[i][j] = val; } |
---|
| 525 | Int getMaxBitRate( Int i, Int j ) { return m_maxBitRate[i][j]; } |
---|
| 526 | |
---|
| 527 | Void setConstantPicRateIdc( Int i, Int j, Int val ) { m_constantPicRateIdc[i][j] = val; } |
---|
| 528 | Int getConstantPicRateIdc( Int i, Int j ) { return m_constantPicRateIdc[i][j]; } |
---|
| 529 | |
---|
| 530 | Void setAvgPicRate( Int i, Int j, Int val ) { m_avgPicRate[i][j] = val; } |
---|
| 531 | Int getAvgPicRate( Int i, Int j ) { return m_avgPicRate[i][j]; } |
---|
| 532 | |
---|
[738] | 533 | Void setTilesNotInUseFlag( Bool flag ) { m_tilesNotInUseFlag = flag; } |
---|
| 534 | Bool getTilesNotInUseFlag( ) { return m_tilesNotInUseFlag; } |
---|
| 535 | |
---|
| 536 | Void setTilesInUseFlag( Int i, Bool flag ) { m_tilesInUseFlag[i] = flag; } |
---|
| 537 | Bool getTilesInUseFlag( Int i ) { return m_tilesInUseFlag[i]; } |
---|
| 538 | |
---|
| 539 | Void setLoopFilterNotAcrossTilesFlag( Int i, Int val ) { m_loopFilterNotAcrossTilesFlag[i] = val; } |
---|
| 540 | Bool getLoopFilterNotAcrossTilesFlag( Int i ) { return m_loopFilterNotAcrossTilesFlag[i]; } |
---|
| 541 | |
---|
[622] | 542 | Void setTileBoundariesAlignedFlag( Int i, Int j, Bool flag ) { m_tileBoundariesAlignedFlag[i][j] = flag; } |
---|
| 543 | Bool getTileBoundariesAlignedFlag( Int i, Int j ) { return m_tileBoundariesAlignedFlag[i][j]; } |
---|
| 544 | |
---|
[738] | 545 | Void setWppNotInUseFlag( Bool flag ) { m_wppNotInUseFlag = flag; } |
---|
| 546 | Bool getWppNotInUseFlag( ) { return m_wppNotInUseFlag; } |
---|
| 547 | |
---|
| 548 | Void setWppInUseFlag( Int i, Bool flag ) { m_wppInUseFlag[i] = flag; } |
---|
| 549 | Bool getWppInUseFlag( Int i ) { return m_wppInUseFlag[i]; } |
---|
| 550 | |
---|
[622] | 551 | Void setIlpRestrictedRefLayersFlag( Bool flag ) { m_ilpRestrictedRefLayersFlag = flag; } |
---|
| 552 | Bool getIlpRestrictedRefLayersFlag( ) { return m_ilpRestrictedRefLayersFlag; } |
---|
| 553 | |
---|
| 554 | Void setMinSpatialSegmentOffsetPlus1( Int i, Int j, Int val ) { m_minSpatialSegmentOffsetPlus1[i][j] = val; } |
---|
| 555 | Int getMinSpatialSegmentOffsetPlus1( Int i, Int j ) { return m_minSpatialSegmentOffsetPlus1[i][j]; } |
---|
| 556 | |
---|
| 557 | Void setCtuBasedOffsetEnabledFlag( Int i, Int j, Bool flag ) { m_ctuBasedOffsetEnabledFlag[i][j] = flag; } |
---|
| 558 | Bool getCtuBasedOffsetEnabledFlag( Int i, Int j ) { return m_ctuBasedOffsetEnabledFlag[i][j]; } |
---|
| 559 | |
---|
| 560 | Void setMinHorizontalCtuOffsetPlus1( Int i, Int j, Int val ) { m_minHorizontalCtuOffsetPlus1[i][j] = val; } |
---|
| 561 | Int getMinHorizontalCtuOffsetPlus1( Int i, Int j ) { return m_minHorizontalCtuOffsetPlus1[i][j]; } |
---|
| 562 | |
---|
[738] | 563 | Void setVideoSignalInfoIdxPresentFlag( Bool flag ) { m_videoSignalInfoIdxPresentFlag = flag; } |
---|
| 564 | Bool getVideoSignalInfoIdxPresentFlag( ) { return m_videoSignalInfoIdxPresentFlag; } |
---|
| 565 | |
---|
| 566 | Void setVideoSignalInfo( Int i, TComVideoSignalInfo* val ) { m_videoSignalInfo[i] = val; } |
---|
| 567 | TComVideoSignalInfo* getVideoSignalInfo( Int i ) { return m_videoSignalInfo[i]; } |
---|
| 568 | |
---|
| 569 | Void setVpsNumVideoSignalInfoMinus1( Int val ) { m_vpsNumVideoSignalInfoMinus1 = val; } |
---|
| 570 | Int getVpsNumVideoSignalInfoMinus1( ) { return m_vpsNumVideoSignalInfoMinus1; } |
---|
| 571 | |
---|
| 572 | Void setVpsVideoSignalInfoIdx( Int i, Int val ) { m_vpsVideoSignalInfoIdx[i] = val; } |
---|
| 573 | Int getVpsVideoSignalInfoIdx( Int i ) { return m_vpsVideoSignalInfoIdx[i]; } |
---|
| 574 | |
---|
| 575 | Void setVpsVuiBspHrdPresentFlag( Bool flag ) { m_vpsVuiBspHrdPresentFlag = flag; } |
---|
| 576 | Bool getVpsVuiBspHrdPresentFlag( ) { return m_vpsVuiBspHrdPresentFlag; } |
---|
| 577 | |
---|
| 578 | Void setVpsVuiBspHrdParameters( TComVpsVuiBspHrdParameters* val) { m_vpsVuiBspHrdParameters = val; } |
---|
| 579 | TComVpsVuiBspHrdParameters* getVpsVuiBspHrdParameters( ) { return m_vpsVuiBspHrdParameters; } |
---|
[622] | 580 | }; |
---|
| 581 | |
---|
| 582 | class TComRepFormat |
---|
| 583 | { |
---|
| 584 | private: |
---|
[738] | 585 | Bool m_chromaAndBitDepthVpsPresentFlag; |
---|
[622] | 586 | Int m_chromaFormatVpsIdc; |
---|
| 587 | Bool m_separateColourPlaneVpsFlag; |
---|
| 588 | Int m_picWidthVpsInLumaSamples; |
---|
| 589 | Int m_picHeightVpsInLumaSamples; |
---|
| 590 | Int m_bitDepthVpsLumaMinus8; |
---|
| 591 | Int m_bitDepthVpsChromaMinus8; |
---|
| 592 | |
---|
| 593 | public: |
---|
| 594 | TComRepFormat() { }; |
---|
| 595 | |
---|
[738] | 596 | Void setChromaAndBitDepthVpsPresentFlag( Bool flag ) { m_chromaAndBitDepthVpsPresentFlag = flag; } |
---|
| 597 | Bool getChromaAndBitDepthVpsPresentFlag( ) { return m_chromaAndBitDepthVpsPresentFlag; } |
---|
| 598 | Void checkChromaAndBitDepthVpsPresentFlag( Int i ) { 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. |
---|
| 599 | Void inferChromaAndBitDepth( TComRepFormat* prevRepFormat, Bool encoderFlag ); |
---|
| 600 | |
---|
[622] | 601 | Void setChromaFormatVpsIdc( Int val ) { m_chromaFormatVpsIdc = val; } |
---|
| 602 | Int getChromaFormatVpsIdc( ) { return m_chromaFormatVpsIdc; } |
---|
| 603 | |
---|
| 604 | Void setSeparateColourPlaneVpsFlag( Bool flag ) { m_separateColourPlaneVpsFlag = flag; } |
---|
| 605 | Bool getSeparateColourPlaneVpsFlag( ) { return m_separateColourPlaneVpsFlag; } |
---|
| 606 | |
---|
| 607 | Void setPicWidthVpsInLumaSamples( Int val ) { m_picWidthVpsInLumaSamples = val; } |
---|
| 608 | Int getPicWidthVpsInLumaSamples( ) { return m_picWidthVpsInLumaSamples; } |
---|
| 609 | |
---|
| 610 | Void setPicHeightVpsInLumaSamples( Int val ) { m_picHeightVpsInLumaSamples = val; } |
---|
| 611 | Int getPicHeightVpsInLumaSamples( ) { return m_picHeightVpsInLumaSamples; } |
---|
| 612 | |
---|
| 613 | Void setBitDepthVpsLumaMinus8( Int val ) { m_bitDepthVpsLumaMinus8 = val; } |
---|
| 614 | Int getBitDepthVpsLumaMinus8( ) { return m_bitDepthVpsLumaMinus8; } |
---|
| 615 | |
---|
| 616 | Void setBitDepthVpsChromaMinus8( Int val ) { m_bitDepthVpsChromaMinus8 = val; } |
---|
| 617 | Int getBitDepthVpsChromaMinus8( ) { return m_bitDepthVpsChromaMinus8; } |
---|
| 618 | }; |
---|
| 619 | |
---|
[773] | 620 | |
---|
[738] | 621 | class TComDpbSize |
---|
| 622 | { |
---|
| 623 | private: |
---|
| 624 | Bool m_subLayerFlagInfoPresentFlag[MAX_VPS_OUTPUTLAYER_SETS]; |
---|
| 625 | Bool m_subLayerDpbInfoPresentFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_TLAYER]; |
---|
| 626 | Int m_maxVpsDecPicBufferingMinus1[MAX_VPS_OUTPUTLAYER_SETS][MAX_NUM_LAYER_IDS][MAX_TLAYER];; |
---|
| 627 | Int m_maxVpsNumReorderPics [MAX_VPS_OUTPUTLAYER_SETS][MAX_TLAYER]; |
---|
| 628 | Int m_maxVpsLatencyIncreasePlus1 [MAX_VPS_OUTPUTLAYER_SETS][MAX_TLAYER]; |
---|
| 629 | |
---|
| 630 | public: |
---|
| 631 | TComDpbSize( ) |
---|
| 632 | { |
---|
| 633 | for (Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++ ) |
---|
| 634 | { |
---|
| 635 | m_subLayerFlagInfoPresentFlag[i] = false; |
---|
| 636 | |
---|
| 637 | for (Int j = 0; j < MAX_TLAYER; j++ ) |
---|
| 638 | { |
---|
| 639 | m_subLayerDpbInfoPresentFlag [i][j] = ( j == 0) ; |
---|
| 640 | m_maxVpsNumReorderPics [i][j] = 0; |
---|
| 641 | m_maxVpsLatencyIncreasePlus1 [i][j] = 0; |
---|
| 642 | |
---|
| 643 | for (Int k = 0; k < MAX_NUM_LAYER_IDS; k++ ) |
---|
| 644 | { |
---|
| 645 | m_maxVpsDecPicBufferingMinus1[i][k][j] = 0; |
---|
| 646 | } |
---|
| 647 | } |
---|
| 648 | } |
---|
| 649 | } |
---|
| 650 | |
---|
| 651 | Void setSubLayerFlagInfoPresentFlag( Int i, Bool flag ) { m_subLayerFlagInfoPresentFlag[i] = flag; } |
---|
| 652 | Bool getSubLayerFlagInfoPresentFlag( Int i ) { return m_subLayerFlagInfoPresentFlag[i]; } |
---|
| 653 | |
---|
| 654 | Void setSubLayerDpbInfoPresentFlag( Int i, Int j, Bool flag ) { m_subLayerDpbInfoPresentFlag[i][j] = flag; } |
---|
| 655 | Bool getSubLayerDpbInfoPresentFlag( Int i, Int j ) { return m_subLayerDpbInfoPresentFlag[i][j]; } |
---|
| 656 | |
---|
| 657 | Void setMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j, Int val ) { m_maxVpsDecPicBufferingMinus1[i][k][j] = val; } |
---|
| 658 | Int getMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j ) { return m_maxVpsDecPicBufferingMinus1[i][k][j]; } |
---|
| 659 | |
---|
| 660 | Void setMaxVpsNumReorderPics( Int i, Int j, Int val ) { m_maxVpsNumReorderPics[i][j] = val; } |
---|
| 661 | Int getMaxVpsNumReorderPics( Int i, Int j ) { return m_maxVpsNumReorderPics[i][j]; } |
---|
| 662 | |
---|
| 663 | Void setMaxVpsLatencyIncreasePlus1( Int i, Int j, Int val ) { m_maxVpsLatencyIncreasePlus1[i][j] = val; } |
---|
| 664 | Int getMaxVpsLatencyIncreasePlus1( Int i, Int j ) { return m_maxVpsLatencyIncreasePlus1[i][j]; } |
---|
| 665 | }; |
---|
| 666 | #endif |
---|
[77] | 667 | class TComVPS |
---|
| 668 | { |
---|
| 669 | private: |
---|
| 670 | Int m_VPSId; |
---|
[100] | 671 | UInt m_uiMaxTLayers; |
---|
[622] | 672 | |
---|
| 673 | #if H_MV |
---|
| 674 | UInt m_uiMaxLayersMinus1; |
---|
| 675 | #else |
---|
[100] | 676 | UInt m_uiMaxLayers; |
---|
[622] | 677 | #endif |
---|
[100] | 678 | Bool m_bTemporalIdNestingFlag; |
---|
[608] | 679 | |
---|
| 680 | UInt m_numReorderPics[MAX_TLAYER]; |
---|
| 681 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
| 682 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) |
---|
[77] | 683 | |
---|
[608] | 684 | UInt m_numHrdParameters; |
---|
| 685 | #if H_MV |
---|
| 686 | UInt m_maxLayerId; |
---|
[210] | 687 | #else |
---|
[608] | 688 | UInt m_maxNuhReservedZeroLayerId; |
---|
[210] | 689 | #endif |
---|
[608] | 690 | TComHRD* m_hrdParameters; |
---|
| 691 | UInt* m_hrdOpSetIdx; |
---|
| 692 | Bool* m_cprmsPresentFlag; |
---|
| 693 | #if H_MV |
---|
| 694 | UInt m_vpsNumLayerSetsMinus1; |
---|
| 695 | Bool m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_LAYER_ID_PLUS1]; |
---|
| 696 | #else |
---|
| 697 | UInt m_numOpSets; |
---|
| 698 | Bool m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1]; |
---|
[210] | 699 | #endif |
---|
[608] | 700 | |
---|
| 701 | #if H_MV |
---|
| 702 | TComPTL m_pcPTL[MAX_VPS_OP_SETS_PLUS1]; |
---|
| 703 | #else |
---|
| 704 | TComPTL m_pcPTL; |
---|
[210] | 705 | #endif |
---|
[608] | 706 | TimingInfo m_timingInfo; |
---|
| 707 | #if H_MV |
---|
| 708 | /// VPS EXTENSION SYNTAX ELEMENTS |
---|
| 709 | Bool m_avcBaseLayerFlag; |
---|
[622] | 710 | Int m_vpsVuiOffset; |
---|
[608] | 711 | Bool m_splittingFlag; |
---|
[622] | 712 | Bool m_scalabilityMaskFlag [MAX_NUM_SCALABILITY_TYPES]; |
---|
[608] | 713 | Int m_dimensionIdLen [MAX_NUM_SCALABILITY_TYPES]; |
---|
| 714 | Bool m_vpsNuhLayerIdPresentFlag; |
---|
| 715 | Int m_layerIdInNuh [MAX_NUM_LAYER_IDS]; |
---|
| 716 | Int m_dimensionId [MAX_NUM_LAYER_IDS][MAX_NUM_SCALABILITY_TYPES]; |
---|
[738] | 717 | |
---|
| 718 | Int m_viewIdLen; |
---|
[622] | 719 | Int m_viewIdVal [MAX_NUM_LAYERS]; |
---|
[608] | 720 | Bool m_directDependencyFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; |
---|
[738] | 721 | Bool m_vpsSubLayersMaxMinus1PresentFlag; |
---|
| 722 | Int m_subLayersVpsMaxMinus1 [MAX_NUM_LAYERS]; |
---|
[622] | 723 | Bool m_maxTidRefPresentFlag; |
---|
[738] | 724 | Int m_maxTidIlRefPicsPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
[622] | 725 | Bool m_allRefLayersActiveFlag; |
---|
[608] | 726 | Int m_vpsNumberLayerSetsMinus1; |
---|
| 727 | Int m_vpsNumProfileTierLevelMinus1; |
---|
| 728 | Bool m_vpsProfilePresentFlag [MAX_VPS_OP_SETS_PLUS1]; |
---|
| 729 | Int m_profileRefMinus1 [MAX_VPS_PROFILE_TIER_LEVEL]; |
---|
| 730 | Bool m_moreOutputLayerSetsThanDefaultFlag; |
---|
| 731 | Int m_numAddOutputLayerSetsMinus1; |
---|
[738] | 732 | Int m_defaultOneTargetOutputLayerIdc; |
---|
[608] | 733 | Int m_outputLayerSetIdxMinus1 [MAX_VPS_OUTPUTLAYER_SETS]; |
---|
| 734 | Bool m_outputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1]; |
---|
| 735 | Int m_profileLevelTierIdx [MAX_VPS_OUTPUTLAYER_SETS ]; |
---|
[738] | 736 | Bool m_altOutputLayerFlag; |
---|
[622] | 737 | Bool m_repFormatIdxPresentFlag; |
---|
| 738 | Int m_vpsNumRepFormatsMinus1; |
---|
| 739 | Int m_vpsRepFormatIdx [MAX_NUM_LAYERS]; |
---|
| 740 | TComRepFormat* m_repFormat [MAX_NUM_LAYERS]; |
---|
[608] | 741 | Bool m_maxOneActiveRefLayerFlag; |
---|
[738] | 742 | Bool m_pocLsbNotPresentFlag [MAX_NUM_LAYERS]; |
---|
| 743 | |
---|
| 744 | TComDpbSize* m_dpbSize; |
---|
[608] | 745 | Int m_directDepTypeLenMinus2; |
---|
[738] | 746 | Bool m_defaultDirectDependencyFlag; |
---|
| 747 | Int m_defaultDirectDependencyType; |
---|
[622] | 748 | Bool m_vpsVuiPresentFlag; |
---|
| 749 | TComVPSVUI* m_vpsVUI; |
---|
[608] | 750 | Int m_directDependencyType [MAX_NUM_LAYERS] [MAX_NUM_LAYERS]; |
---|
[77] | 751 | |
---|
[608] | 752 | // VPS EXTENSION SEMANTICS VARIABLES |
---|
| 753 | Int m_layerIdInVps [MAX_NUM_LAYERS ]; |
---|
| 754 | |
---|
| 755 | Int m_numDirectRefLayers [MAX_NUM_LAYERS]; |
---|
| 756 | Int m_refLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
| 757 | |
---|
| 758 | Int m_numSamplePredRefLayers [MAX_NUM_LAYERS]; |
---|
| 759 | Bool m_samplePredEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
| 760 | Int m_samplePredRefLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
| 761 | |
---|
| 762 | Int m_numMotionPredRefLayers [MAX_NUM_LAYERS]; |
---|
| 763 | Bool m_motionPredEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
| 764 | Int m_motionPredRefLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; |
---|
[622] | 765 | Int m_viewIndex [MAX_NUM_LAYERS ]; |
---|
[738] | 766 | |
---|
| 767 | std::vector< std::vector< Int> > m_targetDecLayerIdLists; //[TargetOptLayerSetIdx][i] |
---|
| 768 | std::vector< std::vector< Int> > m_targetOptLayerIdLists; |
---|
| 769 | std::vector< std::vector< Int> > m_layerSetLayerIdList; |
---|
| 770 | |
---|
| 771 | |
---|
[608] | 772 | Int xGetDimBitOffset( Int j ); |
---|
| 773 | |
---|
[622] | 774 | // VPS EXTENSION 2 SYNTAX ELEMENTS |
---|
[608] | 775 | #if H_3D_ARP |
---|
| 776 | UInt m_uiUseAdvResPred [MAX_NUM_LAYERS ]; |
---|
| 777 | UInt m_uiARPStepNum [MAX_NUM_LAYERS ]; |
---|
[443] | 778 | #endif |
---|
[608] | 779 | #if H_3D_IV_MERGE |
---|
| 780 | Bool m_ivMvPredFlag [ MAX_NUM_LAYERS ]; |
---|
[773] | 781 | #if H_3D_SPIVMP |
---|
[724] | 782 | Int m_iSubPULog2Size [MAX_NUM_LAYERS ]; |
---|
[443] | 783 | #endif |
---|
[724] | 784 | #endif |
---|
[833] | 785 | #if QC_SPIVMP_MPI_G0119 |
---|
| 786 | Int m_iSubPUMPILog2Size; |
---|
| 787 | #endif |
---|
[608] | 788 | #if H_3D_VSP |
---|
| 789 | Bool m_viewSynthesisPredFlag [ MAX_NUM_LAYERS ]; |
---|
| 790 | #endif |
---|
| 791 | #if H_3D_NBDV_REF |
---|
| 792 | Bool m_depthRefinementFlag [ MAX_NUM_LAYERS ]; |
---|
| 793 | #endif |
---|
| 794 | Bool m_vpsDepthModesFlag [MAX_NUM_LAYERS ]; |
---|
[758] | 795 | |
---|
[622] | 796 | #if H_3D |
---|
[758] | 797 | UInt m_uiCamParPrecision; |
---|
| 798 | Bool* m_bCamParInSliceHeader; |
---|
| 799 | Bool* m_bCamParPresent; |
---|
| 800 | Int ***m_aaaiCodedScale ; |
---|
| 801 | Int ***m_aaaiCodedOffset; |
---|
[608] | 802 | Bool m_ivMvScalingFlag; |
---|
| 803 | #endif |
---|
[655] | 804 | #if H_3D_INTER_SDC |
---|
[608] | 805 | Bool m_bInterSDCFlag[MAX_NUM_LAYERS ]; |
---|
| 806 | #endif |
---|
[833] | 807 | #if H_3D_DBBP |
---|
| 808 | Bool m_dbbpFlag[MAX_NUM_LAYERS]; |
---|
| 809 | #endif |
---|
[773] | 810 | #if H_3D_IV_MERGE |
---|
[724] | 811 | Bool m_bMPIFlag[MAX_NUM_LAYERS ]; |
---|
| 812 | #endif |
---|
[443] | 813 | |
---|
[608] | 814 | #endif |
---|
[77] | 815 | public: |
---|
| 816 | TComVPS(); |
---|
| 817 | virtual ~TComVPS(); |
---|
[608] | 818 | |
---|
| 819 | Void createHrdParamBuffer() |
---|
| 820 | { |
---|
| 821 | m_hrdParameters = new TComHRD[ getNumHrdParameters() ]; |
---|
| 822 | m_hrdOpSetIdx = new UInt [ getNumHrdParameters() ]; |
---|
| 823 | m_cprmsPresentFlag = new Bool [ getNumHrdParameters() ]; |
---|
| 824 | } |
---|
| 825 | |
---|
| 826 | TComHRD* getHrdParameters ( UInt i ) { return &m_hrdParameters[ i ]; } |
---|
| 827 | UInt getHrdOpSetIdx ( UInt i ) { return m_hrdOpSetIdx[ i ]; } |
---|
| 828 | Void setHrdOpSetIdx ( UInt val, UInt i ) { m_hrdOpSetIdx[ i ] = val; } |
---|
| 829 | Bool getCprmsPresentFlag ( UInt i ) { return m_cprmsPresentFlag[ i ]; } |
---|
| 830 | Void setCprmsPresentFlag ( Bool val, UInt i ) { m_cprmsPresentFlag[ i ] = val; } |
---|
| 831 | |
---|
[77] | 832 | Int getVPSId () { return m_VPSId; } |
---|
| 833 | Void setVPSId (Int i) { m_VPSId = i; } |
---|
[608] | 834 | |
---|
[77] | 835 | UInt getMaxTLayers () { return m_uiMaxTLayers; } |
---|
| 836 | Void setMaxTLayers (UInt t) { m_uiMaxTLayers = t; } |
---|
[773] | 837 | |
---|
| 838 | #if H_MV |
---|
[738] | 839 | UInt getMaxSubLayersMinus1() { return m_uiMaxTLayers - 1; } // For consistency with draft spec |
---|
[622] | 840 | UInt getMaxLayersMinus1() { return m_uiMaxLayersMinus1; }; |
---|
| 841 | Void setMaxLayersMinus1(UInt l) { m_uiMaxLayersMinus1 = l; } |
---|
| 842 | #else |
---|
[77] | 843 | UInt getMaxLayers () { return m_uiMaxLayers; } |
---|
[100] | 844 | Void setMaxLayers (UInt l) { m_uiMaxLayers = l; } |
---|
[622] | 845 | #endif |
---|
[608] | 846 | |
---|
| 847 | Bool getTemporalNestingFlag () { return m_bTemporalIdNestingFlag; } |
---|
| 848 | Void setTemporalNestingFlag (Bool t) { m_bTemporalIdNestingFlag = t; } |
---|
[100] | 849 | |
---|
[608] | 850 | Void setNumReorderPics(UInt v, UInt tLayer) { m_numReorderPics[tLayer] = v; } |
---|
| 851 | UInt getNumReorderPics(UInt tLayer) { return m_numReorderPics[tLayer]; } |
---|
[77] | 852 | |
---|
[608] | 853 | Void setMaxDecPicBuffering(UInt v, UInt tLayer) { m_uiMaxDecPicBuffering[tLayer] = v; } |
---|
| 854 | UInt getMaxDecPicBuffering(UInt tLayer) { return m_uiMaxDecPicBuffering[tLayer]; } |
---|
| 855 | |
---|
| 856 | Void setMaxLatencyIncrease(UInt v, UInt tLayer) { m_uiMaxLatencyIncrease[tLayer] = v; } |
---|
| 857 | UInt getMaxLatencyIncrease(UInt tLayer) { return m_uiMaxLatencyIncrease[tLayer]; } |
---|
| 858 | |
---|
| 859 | UInt getNumHrdParameters() { return m_numHrdParameters; } |
---|
| 860 | Void setNumHrdParameters(UInt v) { m_numHrdParameters = v; } |
---|
| 861 | |
---|
| 862 | #if H_MV |
---|
| 863 | UInt getVpsMaxLayerId() { return m_maxLayerId; } |
---|
| 864 | Void setVpsMaxLayerId(UInt v) { m_maxLayerId = v; } |
---|
| 865 | |
---|
| 866 | UInt getVpsNumLayerSetsMinus1() { return m_vpsNumLayerSetsMinus1; } |
---|
| 867 | Void setVpsNumLayerSetsMinus1(UInt v) { m_vpsNumLayerSetsMinus1 = v; } |
---|
| 868 | #else |
---|
| 869 | UInt getMaxNuhReservedZeroLayerId() { return m_maxNuhReservedZeroLayerId; } |
---|
| 870 | Void setMaxNuhReservedZeroLayerId(UInt v) { m_maxNuhReservedZeroLayerId = v; } |
---|
| 871 | |
---|
| 872 | UInt getMaxOpSets() { return m_numOpSets; } |
---|
| 873 | Void setMaxOpSets(UInt v) { m_numOpSets = v; } |
---|
[210] | 874 | #endif |
---|
[608] | 875 | Bool getLayerIdIncludedFlag(UInt opsIdx, UInt id) { return m_layerIdIncludedFlag[opsIdx][id]; } |
---|
| 876 | Void setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id) { m_layerIdIncludedFlag[opsIdx][id] = v; } |
---|
| 877 | |
---|
| 878 | #if H_MV |
---|
| 879 | TComPTL* getPTL( Int layerSet = 0 ) { return &m_pcPTL[layerSet]; } |
---|
| 880 | #else |
---|
| 881 | TComPTL* getPTL() { return &m_pcPTL; } |
---|
[210] | 882 | #endif |
---|
[608] | 883 | TimingInfo* getTimingInfo() { return &m_timingInfo; } |
---|
| 884 | #if H_MV |
---|
| 885 | Void setAvcBaseLayerFlag( Bool val ) { m_avcBaseLayerFlag = val; } |
---|
| 886 | Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } |
---|
| 887 | |
---|
[622] | 888 | Void setVpsVuiOffset( Int val ) { m_vpsVuiOffset = val; } |
---|
| 889 | Int getVpsVuiOffset( ) { return m_vpsVuiOffset; } |
---|
| 890 | |
---|
[608] | 891 | Void setSplittingFlag( Bool val ) { m_splittingFlag = val; } |
---|
| 892 | Bool getSplittingFlag() { return m_splittingFlag; } |
---|
| 893 | |
---|
[622] | 894 | Void setScalabilityMaskFlag( UInt val ); |
---|
| 895 | Void setScalabilityMaskFlag( Int scalType, Bool val ) { m_scalabilityMaskFlag[scalType] = val; } |
---|
| 896 | Bool getScalabilityMaskFlag( Int scalType ) { return m_scalabilityMaskFlag[scalType]; } |
---|
[608] | 897 | Int getNumScalabilityTypes( ); |
---|
| 898 | |
---|
| 899 | Void setDimensionIdLen( Int sIdx, Int val ) { m_dimensionIdLen[sIdx] = val; } |
---|
| 900 | Int getDimensionIdLen( Int sIdx ) { assert( m_dimensionIdLen[sIdx] > 0) ; return m_dimensionIdLen[sIdx]; } |
---|
| 901 | |
---|
| 902 | Void setVpsNuhLayerIdPresentFlag( Bool val ) { m_vpsNuhLayerIdPresentFlag = val; } |
---|
| 903 | Bool getVpsNuhLayerIdPresentFlag() { return m_vpsNuhLayerIdPresentFlag; } |
---|
| 904 | |
---|
| 905 | Void setLayerIdInNuh( Int layerIdInVps, Int val ) { m_layerIdInNuh[layerIdInVps] = val; } |
---|
| 906 | Int getLayerIdInNuh( Int layerIdInVps ) { assert( m_layerIdInNuh[layerIdInVps] >= 0 ); return m_layerIdInNuh[layerIdInVps]; } |
---|
| 907 | |
---|
| 908 | Bool nuhLayerIdIncluded( Int layerIdinNuh ) { return ( m_layerIdInVps[ layerIdinNuh ] > 0 ); } |
---|
| 909 | |
---|
| 910 | Void setDimensionId( Int layerIdInVps, Int scalIdx, Int val ) { m_dimensionId[layerIdInVps][scalIdx] = val; } |
---|
| 911 | Int getDimensionId( Int layerIdInVps, Int scalIdx ) { return m_dimensionId[layerIdInVps][scalIdx]; } |
---|
| 912 | |
---|
[738] | 913 | Void setViewIdLen( Int val ) { m_viewIdLen = val; } |
---|
| 914 | Int getViewIdLen( ) { return m_viewIdLen; } |
---|
[622] | 915 | |
---|
| 916 | Void setViewIdVal( Int viewOrderIndex, Int val ) { m_viewIdVal[viewOrderIndex] = val; } |
---|
| 917 | Int getViewIdVal( Int viewOrderIndex ) { return m_viewIdVal[viewOrderIndex]; } |
---|
[608] | 918 | Void setDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Bool val ) { m_directDependencyFlag[depLayeridInVps][refLayeridInVps] = val; } |
---|
| 919 | Bool getDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps ) { return m_directDependencyFlag[depLayeridInVps][refLayeridInVps]; } |
---|
[738] | 920 | Void setVpsSubLayersMaxMinus1PresentFlag( Bool flag ) { m_vpsSubLayersMaxMinus1PresentFlag = flag; } |
---|
| 921 | Bool getVpsSubLayersMaxMinus1PresentFlag( ) { return m_vpsSubLayersMaxMinus1PresentFlag; } |
---|
| 922 | Void setSubLayersVpsMaxMinus1( Int i, Int val ) { m_subLayersVpsMaxMinus1[i] = val; } |
---|
| 923 | Int getSubLayersVpsMaxMinus1( Int i ) { return m_subLayersVpsMaxMinus1[i]; } |
---|
| 924 | Void checkSubLayersVpsMaxMinus1( Int i ) { assert( m_subLayersVpsMaxMinus1[i] >= 0 && m_subLayersVpsMaxMinus1[i] <= m_uiMaxTLayers - 1 ); } |
---|
[622] | 925 | Void setMaxTidRefPresentFlag( Bool flag ) { m_maxTidRefPresentFlag = flag; } |
---|
| 926 | Bool getMaxTidRefPresentFlag( ) { return m_maxTidRefPresentFlag; } |
---|
[738] | 927 | Void setMaxTidIlRefPicsPlus1( Int i, Int j, Int val ) { m_maxTidIlRefPicsPlus1[i][j] = val; } |
---|
| 928 | Int getMaxTidIlRefPicsPlus1( Int i, Int j ) { return m_maxTidIlRefPicsPlus1[i][j]; } |
---|
[622] | 929 | Void setAllRefLayersActiveFlag( Bool flag ) { m_allRefLayersActiveFlag = flag; } |
---|
| 930 | Bool getAllRefLayersActiveFlag( ) { return m_allRefLayersActiveFlag; } |
---|
[608] | 931 | Void setVpsNumberLayerSetsMinus1( Int val ) { m_vpsNumberLayerSetsMinus1 = val; } |
---|
| 932 | Int getVpsNumberLayerSetsMinus1( ) { return m_vpsNumberLayerSetsMinus1; } |
---|
[77] | 933 | |
---|
[608] | 934 | Void setVpsNumProfileTierLevelMinus1( Int val ) { m_vpsNumProfileTierLevelMinus1 = val; } |
---|
| 935 | Int getVpsNumProfileTierLevelMinus1( ) { return m_vpsNumProfileTierLevelMinus1; } |
---|
| 936 | |
---|
| 937 | Void setVpsProfilePresentFlag( Int idx, Bool val ) { m_vpsProfilePresentFlag[idx] = val; } |
---|
| 938 | Bool getVpsProfilePresentFlag( Int idx ) { return m_vpsProfilePresentFlag[idx]; } |
---|
[210] | 939 | |
---|
[608] | 940 | Void setProfileRefMinus1( Int profileTierLevelIdx, Int val ) { m_profileRefMinus1[ profileTierLevelIdx ] = val; } |
---|
| 941 | Int getProfileRefMinus1( Int profileTierLevelIdx ) { return m_profileRefMinus1[ profileTierLevelIdx ]; } |
---|
[738] | 942 | Void checkProfileRefMinus1( Int i ) { assert( getProfileRefMinus1( i ) + 1 <= i ); }; // The value of profile_ref_minus1[ i ] + 1 shall be less than or equal to i. |
---|
[608] | 943 | Void setMoreOutputLayerSetsThanDefaultFlag( Bool flag ) { m_moreOutputLayerSetsThanDefaultFlag = flag; } |
---|
| 944 | Bool getMoreOutputLayerSetsThanDefaultFlag() { return m_moreOutputLayerSetsThanDefaultFlag; } |
---|
[77] | 945 | |
---|
[608] | 946 | Void setNumAddOutputLayerSetsMinus1( Int val ) { m_numAddOutputLayerSetsMinus1 = val; } |
---|
| 947 | Int getNumAddOutputLayerSetsMinus1( ) { return m_numAddOutputLayerSetsMinus1; } |
---|
| 948 | |
---|
[738] | 949 | Void setDefaultOneTargetOutputLayerIdc( Int val ) { m_defaultOneTargetOutputLayerIdc = val; } |
---|
| 950 | Int getDefaultOneTargetOutputLayerIdc( ) { return m_defaultOneTargetOutputLayerIdc; } |
---|
| 951 | Void checkDefaultOneTargetOutputLayerIdc( ) { assert( m_defaultOneTargetOutputLayerIdc >= 0 && m_defaultOneTargetOutputLayerIdc <= 1 ); } |
---|
[608] | 952 | |
---|
| 953 | Void setOutputLayerSetIdxMinus1( Int outLayerSetIdx, Int val ) { m_outputLayerSetIdxMinus1[ outLayerSetIdx ] = val; } |
---|
| 954 | Int getOutputLayerSetIdxMinus1( Int outLayerSetIdx ) { return m_outputLayerSetIdxMinus1[ outLayerSetIdx ]; } |
---|
[443] | 955 | |
---|
[608] | 956 | Void setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag ) { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; } |
---|
| 957 | Bool getOutputLayerFlag( Int outLayerSetIdx, Int i ) { return m_outputLayerFlag[ outLayerSetIdx ][ i ]; } |
---|
[738] | 958 | Bool inferOutputLayerFlag( Int layerSetIdx, Int i ) { return ( getDefaultOneTargetOutputLayerIdc( ) == 0 || ( ( getDefaultOneTargetOutputLayerIdc( ) == 1 ) && ( i == m_layerSetLayerIdList[layerSetIdx].size() - 1 ) )); } |
---|
[608] | 959 | |
---|
[833] | 960 | Void setProfileLevelTierIdx( Int outLayerSetIdx, Int val ) { m_profileLevelTierIdx[ outLayerSetIdx ] = val; } |
---|
[608] | 961 | Int getProfileLevelTierIdx( Int outLayerSetIdx ) { return m_profileLevelTierIdx[ outLayerSetIdx ]; } |
---|
[738] | 962 | Void setAltOutputLayerFlag( Bool flag ) { m_altOutputLayerFlag = flag; } |
---|
| 963 | Bool getAltOutputLayerFlag( ) { return m_altOutputLayerFlag; } |
---|
[608] | 964 | |
---|
[622] | 965 | Void setRepFormatIdxPresentFlag( Bool flag ) { m_repFormatIdxPresentFlag = flag; } |
---|
| 966 | Bool getRepFormatIdxPresentFlag( ) { return m_repFormatIdxPresentFlag; } |
---|
| 967 | |
---|
| 968 | Void setVpsNumRepFormatsMinus1( Int val ) { m_vpsNumRepFormatsMinus1 = val; } |
---|
| 969 | Int getVpsNumRepFormatsMinus1( ) { return m_vpsNumRepFormatsMinus1; } |
---|
| 970 | |
---|
| 971 | Void setVpsRepFormatIdx( Int i, Int val ) { m_vpsRepFormatIdx[i] = val; } |
---|
| 972 | Int getVpsRepFormatIdx( Int i ) { return m_vpsRepFormatIdx[i]; } |
---|
| 973 | |
---|
| 974 | Void setRepFormat( Int i, TComRepFormat* val ) { m_repFormat[i] = val; } |
---|
| 975 | TComRepFormat* getRepFormat( Int i ) { return m_repFormat[i]; } |
---|
[608] | 976 | Void setMaxOneActiveRefLayerFlag( Bool flag) { m_maxOneActiveRefLayerFlag = flag; } |
---|
| 977 | Bool getMaxOneActiveRefLayerFlag( ) { return m_maxOneActiveRefLayerFlag; } |
---|
[738] | 978 | |
---|
| 979 | Void setDpbSize( TComDpbSize* val ) { assert( m_dpbSize != 0 ); m_dpbSize = val; } |
---|
| 980 | TComDpbSize* getDpbSize( ) { return m_dpbSize;} |
---|
| 981 | |
---|
| 982 | Void setPocLsbNotPresentFlag( Int i, Bool flag ) { m_pocLsbNotPresentFlag[i] = flag; } |
---|
| 983 | Bool getPocLsbNotPresentFlag( Int i ) { return m_pocLsbNotPresentFlag[i]; } |
---|
[608] | 984 | Void setDirectDepTypeLenMinus2( Int val) { m_directDepTypeLenMinus2 = val; } |
---|
| 985 | Int getDirectDepTypeLenMinus2( ) { return m_directDepTypeLenMinus2; } |
---|
| 986 | |
---|
[738] | 987 | Void setDefaultDirectDependencyFlag( Bool flag ) { m_defaultDirectDependencyFlag = flag; } |
---|
| 988 | Bool getDefaultDirectDependencyFlag( ) { return m_defaultDirectDependencyFlag; } |
---|
| 989 | |
---|
| 990 | Void setDefaultDirectDependencyType( Int val ) { m_defaultDirectDependencyType = val; } |
---|
| 991 | Int getDefaultDirectDependencyType( ) { return m_defaultDirectDependencyType; } |
---|
[608] | 992 | Void setDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps, Int val) { m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ] = val; } |
---|
| 993 | Int getDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps) { return m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ]; } |
---|
[622] | 994 | Void setVpsVuiPresentFlag( Bool flag ) { m_vpsVuiPresentFlag = flag; } |
---|
| 995 | Bool getVpsVuiPresentFlag( ) { return m_vpsVuiPresentFlag; } |
---|
[608] | 996 | |
---|
[622] | 997 | TComVPSVUI* getVPSVUI( ) { return m_vpsVUI; } |
---|
[773] | 998 | |
---|
| 999 | // VPS EXTENSION SEMANTICS VARIABLES |
---|
[608] | 1000 | Void setLayerIdInVps( Int layerIdInNuh, Int val ) { m_layerIdInVps[layerIdInNuh] = val; } |
---|
| 1001 | Int getLayerIdInVps( Int layerIdInNuh ) { assert( m_layerIdInVps[layerIdInNuh] >= 0 ); return m_layerIdInVps[layerIdInNuh]; } |
---|
| 1002 | |
---|
| 1003 | Int getScalabilityId ( Int layerIdInVps, ScalabilityType scalType ); |
---|
[738] | 1004 | Int getViewId ( Int layerIdInNuh ) { return m_viewIdVal[ getViewIndex( layerIdInNuh )]; } |
---|
[608] | 1005 | Void setRefLayers(); |
---|
| 1006 | |
---|
[622] | 1007 | Int getViewIndex ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX ); } |
---|
| 1008 | Int getNumViews(); |
---|
| 1009 | |
---|
| 1010 | Int getNumDirectRefLayers( Int layerIdInNuh ) { return m_numDirectRefLayers[ layerIdInNuh ]; }; |
---|
| 1011 | Int getRefLayerId ( Int layerIdInNuh, Int idx );; |
---|
[608] | 1012 | Bool checkVPSExtensionSyntax(); |
---|
| 1013 | Int scalTypeToScalIdx ( ScalabilityType scalType ); |
---|
| 1014 | |
---|
[622] | 1015 | Int getProfileLevelTierIdxLen() { return gCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); }; |
---|
| 1016 | |
---|
[738] | 1017 | Int getNumLayersInIdList ( Int lsIdx ); |
---|
[608] | 1018 | |
---|
[738] | 1019 | Int getNumOutputLayerSets() ; |
---|
| 1020 | Int getNumSubDpbs( Int i ) { return getNumLayersInIdList( i ); }; |
---|
| 1021 | Bool isOutputLayer( Int outLayerSetIdx, Int layerIdInNuh ); |
---|
| 1022 | Void deriveLayerSetLayerIdList(); |
---|
| 1023 | Void deriveTargetLayerIdLists(); |
---|
| 1024 | std::vector<Int> getTargetDecLayerIdList( Int targetOptLayerSetIdx ) { return m_targetDecLayerIdLists[targetOptLayerSetIdx]; }; |
---|
| 1025 | std::vector<Int> getTargetOptLayerIdList( Int targetOptLayerSetIdx ) { return m_targetDecLayerIdLists[targetOptLayerSetIdx]; }; |
---|
| 1026 | |
---|
| 1027 | |
---|
[608] | 1028 | // inference |
---|
| 1029 | Int inferDimensionId ( Int i, Int j ); |
---|
| 1030 | Int inferLastDimsionIdLenMinus1(); |
---|
| 1031 | |
---|
[622] | 1032 | // helpers |
---|
| 1033 | Bool getInDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Int depth = 0 ); |
---|
| 1034 | /// VPS EXTENSION 2 SYNTAX ELEMENTS |
---|
[608] | 1035 | #if H_3D |
---|
[622] | 1036 | Int getDepthId ( Int layerIdInNuh) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), DEPTH_ID ); } |
---|
[608] | 1037 | Int getLayerIdInNuh( Int viewIndex, Bool depthFlag ); |
---|
| 1038 | |
---|
| 1039 | #if H_3D_ARP |
---|
| 1040 | UInt getUseAdvRP ( Int layerIdInVps ) { return m_uiUseAdvResPred[layerIdInVps]; } |
---|
| 1041 | UInt getARPStepNum( Int layerIdInVps ) { return m_uiARPStepNum[layerIdInVps]; } |
---|
| 1042 | Void setUseAdvRP ( Int layerIdInVps, UInt val ) { m_uiUseAdvResPred[layerIdInVps] = val; } |
---|
| 1043 | Void setARPStepNum( Int layerIdInVps, UInt val ) { m_uiARPStepNum[layerIdInVps] = val; } |
---|
[443] | 1044 | #endif |
---|
[773] | 1045 | |
---|
[758] | 1046 | Void createCamPars(Int iNumViews); |
---|
| 1047 | Void deleteCamPars(); |
---|
| 1048 | Void initCamParaVPS ( UInt uiViewIndex, Bool bCamParPresent = false, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); |
---|
| 1049 | UInt getCamParPrecision () { return m_uiCamParPrecision; } |
---|
| 1050 | Bool getCamParPresent ( Int viewIndex ) { return m_bCamParPresent[viewIndex]; } |
---|
| 1051 | Bool hasCamParInSliceHeader( Int viewIndex ) { return m_bCamParInSliceHeader[viewIndex]; } |
---|
| 1052 | Void setHasCamParInSliceHeader( Int viewIndex, Bool b ) { m_bCamParInSliceHeader[viewIndex] = b; } |
---|
| 1053 | Int* getCodedScale ( Int viewIndex ) { return m_aaaiCodedScale [viewIndex][0]; } |
---|
| 1054 | Int* getCodedOffset ( Int viewIndex ) { return m_aaaiCodedOffset[viewIndex][0]; } |
---|
| 1055 | Int* getInvCodedScale ( Int viewIndex ) { return m_aaaiCodedScale [viewIndex][1]; } |
---|
| 1056 | Int* getInvCodedOffset ( Int viewIndex ) { return m_aaaiCodedOffset[viewIndex][1]; } |
---|
| 1057 | |
---|
[608] | 1058 | #if H_3D_IV_MERGE |
---|
| 1059 | Void setIvMvPredFlag ( Int layerIdInVps, Bool val ) { m_ivMvPredFlag[ layerIdInVps ] = val; } |
---|
| 1060 | Bool getIvMvPredFlag ( Int layerIdInVps ) { return m_ivMvPredFlag[ layerIdInVps ]; }; |
---|
[773] | 1061 | #if H_3D_SPIVMP |
---|
[724] | 1062 | Int getSubPULog2Size(Int layerIdInVps) { return m_iSubPULog2Size[layerIdInVps]; } |
---|
| 1063 | Void setSubPULog2Size(Int layerIdInVps, Int u) { m_iSubPULog2Size[layerIdInVps] = u;} |
---|
[443] | 1064 | #endif |
---|
[724] | 1065 | #endif |
---|
[833] | 1066 | #if QC_SPIVMP_MPI_G0119 |
---|
| 1067 | Int getSubPUMPILog2Size( ) { return m_iSubPUMPILog2Size; } |
---|
| 1068 | Void setSubPUMPILog2Size( Int u ) { m_iSubPUMPILog2Size = u; } |
---|
| 1069 | #endif |
---|
[608] | 1070 | #if H_3D_VSP |
---|
| 1071 | Void setViewSynthesisPredFlag ( Int layerIdInVps, Bool val ) { m_viewSynthesisPredFlag[ layerIdInVps ] = val; } |
---|
| 1072 | Bool getViewSynthesisPredFlag ( Int layerIdInVps ) { return m_viewSynthesisPredFlag[ layerIdInVps ]; }; |
---|
| 1073 | #endif |
---|
| 1074 | #if H_3D_NBDV_REF |
---|
| 1075 | Void setDepthRefinementFlag ( Int layerIdInVps, Bool val ) { m_depthRefinementFlag[ layerIdInVps ] = val; } |
---|
| 1076 | Bool getDepthRefinementFlag ( Int layerIdInVps ) { return m_depthRefinementFlag[ layerIdInVps ]; }; |
---|
| 1077 | #endif |
---|
| 1078 | Void setVpsDepthModesFlag( Int layerIdInVps, Bool val ) { m_vpsDepthModesFlag[ layerIdInVps ] = val; } |
---|
| 1079 | Bool getVpsDepthModesFlag( Int layerIdInVps ) { return m_vpsDepthModesFlag[ layerIdInVps ]; } |
---|
[758] | 1080 | |
---|
[608] | 1081 | Bool getIvMvScalingFlag ( ) { return m_ivMvScalingFlag; } |
---|
| 1082 | Void setIvMvScalingFlag ( Bool b ) { m_ivMvScalingFlag = b; } |
---|
[655] | 1083 | #if H_3D_INTER_SDC |
---|
[608] | 1084 | Bool getInterSDCFlag ( Int layerIdInVps ) { return m_bInterSDCFlag[layerIdInVps]; } |
---|
| 1085 | Void setInterSDCFlag ( Int layerIdInVps, Bool bval ){ m_bInterSDCFlag[layerIdInVps] = bval; } |
---|
| 1086 | #endif |
---|
[833] | 1087 | #if H_3D_DBBP |
---|
| 1088 | Bool getUseDBBP ( Int layerIdInVps ) { return m_dbbpFlag[layerIdInVps]; } |
---|
| 1089 | Void setUseDBBP ( Int layerIdInVps, Bool bval ){ m_dbbpFlag[layerIdInVps] = bval; } |
---|
| 1090 | #endif |
---|
[773] | 1091 | #if H_3D_IV_MERGE |
---|
[724] | 1092 | Bool getMPIFlag ( Int layerIdInVps ) { return m_bMPIFlag[layerIdInVps]; } |
---|
| 1093 | Void setMPIFlag ( Int layerIdInVps, Bool bval ){ m_bMPIFlag[layerIdInVps] = bval; } |
---|
| 1094 | #endif |
---|
[608] | 1095 | #endif |
---|
| 1096 | #endif |
---|
[77] | 1097 | }; |
---|
| 1098 | |
---|
[773] | 1099 | #if H_3D |
---|
[758] | 1100 | class TComDLT |
---|
| 1101 | { |
---|
| 1102 | private: |
---|
| 1103 | Bool m_bDltPresentFlag; |
---|
| 1104 | Bool m_bUseDLTFlag [ MAX_NUM_LAYERS ]; |
---|
| 1105 | Bool m_bInterViewDltPredEnableFlag[ MAX_NUM_LAYERS ]; |
---|
| 1106 | |
---|
| 1107 | Int m_iBitsPerDepthValue [ MAX_NUM_LAYERS ]; |
---|
| 1108 | Int m_iNumDepthmapValues [ MAX_NUM_LAYERS ]; |
---|
| 1109 | Int* m_iDepthValue2Idx [ MAX_NUM_LAYERS ]; |
---|
| 1110 | Int* m_iIdx2DepthValue [ MAX_NUM_LAYERS ]; |
---|
| 1111 | |
---|
| 1112 | Int m_iNumDepthViews; |
---|
| 1113 | UInt m_uiDepthViewBitDepth; |
---|
| 1114 | |
---|
| 1115 | public: |
---|
| 1116 | TComDLT(); |
---|
| 1117 | ~TComDLT(); |
---|
| 1118 | |
---|
| 1119 | Bool getDltPresentFlag () { return m_bDltPresentFlag; } |
---|
| 1120 | Void setDltPresentFlag ( Bool b ) { m_bDltPresentFlag = b; } |
---|
| 1121 | |
---|
| 1122 | Bool getUseDLTFlag ( Int layerIdInVps ) { return m_bUseDLTFlag[ layerIdInVps ]; } |
---|
| 1123 | Void setUseDLTFlag ( Int layerIdInVps, Bool b ) { m_bUseDLTFlag[ layerIdInVps ] = b; } |
---|
| 1124 | |
---|
| 1125 | Bool getInterViewDltPredEnableFlag( Int layerIdInVps ) { return m_bInterViewDltPredEnableFlag[ layerIdInVps ]; } |
---|
| 1126 | Void setInterViewDltPredEnableFlag( Int layerIdInVps, Bool b ) { m_bInterViewDltPredEnableFlag[ layerIdInVps ] = b; } |
---|
| 1127 | |
---|
| 1128 | Void setNumDepthViews ( Int n ) { m_iNumDepthViews = n; } |
---|
| 1129 | Int getNumDepthViews () { return m_iNumDepthViews; } |
---|
| 1130 | |
---|
| 1131 | Void setDepthViewBitDepth( UInt n ) { m_uiDepthViewBitDepth = n; } |
---|
| 1132 | UInt getDepthViewBitDepth() { return m_uiDepthViewBitDepth; } |
---|
| 1133 | |
---|
| 1134 | Int getBitsPerDepthValue( Int layerIdInVps ) { return getUseDLTFlag(layerIdInVps)?m_iBitsPerDepthValue[layerIdInVps]:g_bitDepthY; } |
---|
| 1135 | Int getNumDepthValues( Int layerIdInVps ) { return getUseDLTFlag(layerIdInVps)?m_iNumDepthmapValues[layerIdInVps]:((1 << g_bitDepthY)-1); } |
---|
| 1136 | Int depthValue2idx( Int layerIdInVps, Pel value ) { return getUseDLTFlag(layerIdInVps)?m_iDepthValue2Idx[layerIdInVps][value]:value; } |
---|
| 1137 | Pel idx2DepthValue( Int layerIdInVps, UInt uiIdx ) { return getUseDLTFlag(layerIdInVps)?m_iIdx2DepthValue[layerIdInVps][uiIdx]:uiIdx; } |
---|
| 1138 | Void setDepthLUTs( Int layerIdInVps, Int* idx2DepthValue = NULL, Int iNumDepthValues = 0 ); |
---|
| 1139 | #if H_3D_DELTA_DLT |
---|
| 1140 | Int* idx2DepthValue( Int layerIdInVps ) { return m_iIdx2DepthValue[layerIdInVps]; } |
---|
| 1141 | Void getDeltaDLT( Int layerIdInVps, Int* piDLTInRef, UInt uiDLTInRefNum, Int* piDeltaDLTOut, UInt *puiDeltaDLTOutNum ); |
---|
| 1142 | Void setDeltaDLT( Int layerIdInVps, Int* piDLTInRef, UInt uiDLTInRefNum, Int* piDeltaDLTIn, UInt uiDeltaDLTInNum ); |
---|
| 1143 | #endif |
---|
| 1144 | }; |
---|
| 1145 | #endif |
---|
| 1146 | |
---|
[608] | 1147 | class Window |
---|
| 1148 | { |
---|
| 1149 | private: |
---|
| 1150 | Bool m_enabledFlag; |
---|
| 1151 | Int m_winLeftOffset; |
---|
| 1152 | Int m_winRightOffset; |
---|
| 1153 | Int m_winTopOffset; |
---|
| 1154 | Int m_winBottomOffset; |
---|
[622] | 1155 | #if H_MV |
---|
| 1156 | Bool m_scaledFlag; |
---|
| 1157 | #endif |
---|
[608] | 1158 | public: |
---|
| 1159 | Window() |
---|
| 1160 | : m_enabledFlag (false) |
---|
| 1161 | , m_winLeftOffset (0) |
---|
| 1162 | , m_winRightOffset (0) |
---|
| 1163 | , m_winTopOffset (0) |
---|
| 1164 | , m_winBottomOffset (0) |
---|
[622] | 1165 | #if H_MV |
---|
| 1166 | , m_scaledFlag(true) |
---|
| 1167 | #endif |
---|
[608] | 1168 | { } |
---|
| 1169 | |
---|
| 1170 | Bool getWindowEnabledFlag() const { return m_enabledFlag; } |
---|
| 1171 | Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0; } |
---|
| 1172 | Int getWindowLeftOffset() const { return m_enabledFlag ? m_winLeftOffset : 0; } |
---|
| 1173 | Void setWindowLeftOffset(Int val) { m_winLeftOffset = val; m_enabledFlag = true; } |
---|
| 1174 | Int getWindowRightOffset() const { return m_enabledFlag ? m_winRightOffset : 0; } |
---|
| 1175 | Void setWindowRightOffset(Int val) { m_winRightOffset = val; m_enabledFlag = true; } |
---|
| 1176 | Int getWindowTopOffset() const { return m_enabledFlag ? m_winTopOffset : 0; } |
---|
| 1177 | Void setWindowTopOffset(Int val) { m_winTopOffset = val; m_enabledFlag = true; } |
---|
| 1178 | Int getWindowBottomOffset() const { return m_enabledFlag ? m_winBottomOffset: 0; } |
---|
| 1179 | Void setWindowBottomOffset(Int val) { m_winBottomOffset = val; m_enabledFlag = true; } |
---|
| 1180 | |
---|
[622] | 1181 | #if H_MV |
---|
| 1182 | Void setScaledFlag(Bool flag) { m_scaledFlag = flag; } |
---|
| 1183 | Bool getScaledFlag() const { return m_scaledFlag; } |
---|
| 1184 | Void scaleOffsets( Int scal ) |
---|
| 1185 | { |
---|
| 1186 | if (! m_scaledFlag ) |
---|
| 1187 | { |
---|
| 1188 | m_scaledFlag = true; |
---|
| 1189 | m_winLeftOffset *= scal; |
---|
| 1190 | m_winRightOffset *= scal; |
---|
| 1191 | m_winTopOffset *= scal; |
---|
| 1192 | m_winBottomOffset *= scal; |
---|
| 1193 | } |
---|
| 1194 | } |
---|
| 1195 | #endif |
---|
[608] | 1196 | Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom) |
---|
| 1197 | { |
---|
| 1198 | m_enabledFlag = true; |
---|
| 1199 | m_winLeftOffset = offsetLeft; |
---|
| 1200 | m_winRightOffset = offsetLRight; |
---|
| 1201 | m_winTopOffset = offsetLTop; |
---|
| 1202 | m_winBottomOffset = offsetLBottom; |
---|
| 1203 | } |
---|
| 1204 | }; |
---|
| 1205 | |
---|
| 1206 | |
---|
| 1207 | class TComVUI |
---|
| 1208 | { |
---|
| 1209 | private: |
---|
| 1210 | Bool m_aspectRatioInfoPresentFlag; |
---|
| 1211 | Int m_aspectRatioIdc; |
---|
| 1212 | Int m_sarWidth; |
---|
| 1213 | Int m_sarHeight; |
---|
| 1214 | Bool m_overscanInfoPresentFlag; |
---|
| 1215 | Bool m_overscanAppropriateFlag; |
---|
| 1216 | Bool m_videoSignalTypePresentFlag; |
---|
| 1217 | Int m_videoFormat; |
---|
| 1218 | Bool m_videoFullRangeFlag; |
---|
| 1219 | Bool m_colourDescriptionPresentFlag; |
---|
| 1220 | Int m_colourPrimaries; |
---|
| 1221 | Int m_transferCharacteristics; |
---|
| 1222 | Int m_matrixCoefficients; |
---|
| 1223 | Bool m_chromaLocInfoPresentFlag; |
---|
| 1224 | Int m_chromaSampleLocTypeTopField; |
---|
| 1225 | Int m_chromaSampleLocTypeBottomField; |
---|
| 1226 | Bool m_neutralChromaIndicationFlag; |
---|
| 1227 | Bool m_fieldSeqFlag; |
---|
| 1228 | |
---|
| 1229 | Window m_defaultDisplayWindow; |
---|
| 1230 | Bool m_frameFieldInfoPresentFlag; |
---|
| 1231 | Bool m_hrdParametersPresentFlag; |
---|
| 1232 | Bool m_bitstreamRestrictionFlag; |
---|
| 1233 | Bool m_tilesFixedStructureFlag; |
---|
| 1234 | Bool m_motionVectorsOverPicBoundariesFlag; |
---|
| 1235 | Bool m_restrictedRefPicListsFlag; |
---|
| 1236 | Int m_minSpatialSegmentationIdc; |
---|
| 1237 | Int m_maxBytesPerPicDenom; |
---|
| 1238 | Int m_maxBitsPerMinCuDenom; |
---|
| 1239 | Int m_log2MaxMvLengthHorizontal; |
---|
| 1240 | Int m_log2MaxMvLengthVertical; |
---|
| 1241 | TComHRD m_hrdParameters; |
---|
| 1242 | TimingInfo m_timingInfo; |
---|
[77] | 1243 | |
---|
[608] | 1244 | public: |
---|
| 1245 | TComVUI() |
---|
| 1246 | :m_aspectRatioInfoPresentFlag(false) |
---|
| 1247 | ,m_aspectRatioIdc(0) |
---|
| 1248 | ,m_sarWidth(0) |
---|
| 1249 | ,m_sarHeight(0) |
---|
| 1250 | ,m_overscanInfoPresentFlag(false) |
---|
| 1251 | ,m_overscanAppropriateFlag(false) |
---|
| 1252 | ,m_videoSignalTypePresentFlag(false) |
---|
| 1253 | ,m_videoFormat(5) |
---|
| 1254 | ,m_videoFullRangeFlag(false) |
---|
| 1255 | ,m_colourDescriptionPresentFlag(false) |
---|
| 1256 | ,m_colourPrimaries(2) |
---|
| 1257 | ,m_transferCharacteristics(2) |
---|
| 1258 | ,m_matrixCoefficients(2) |
---|
| 1259 | ,m_chromaLocInfoPresentFlag(false) |
---|
| 1260 | ,m_chromaSampleLocTypeTopField(0) |
---|
| 1261 | ,m_chromaSampleLocTypeBottomField(0) |
---|
| 1262 | ,m_neutralChromaIndicationFlag(false) |
---|
| 1263 | ,m_fieldSeqFlag(false) |
---|
| 1264 | ,m_frameFieldInfoPresentFlag(false) |
---|
| 1265 | ,m_hrdParametersPresentFlag(false) |
---|
| 1266 | ,m_bitstreamRestrictionFlag(false) |
---|
| 1267 | ,m_tilesFixedStructureFlag(false) |
---|
| 1268 | ,m_motionVectorsOverPicBoundariesFlag(true) |
---|
| 1269 | ,m_restrictedRefPicListsFlag(1) |
---|
| 1270 | ,m_minSpatialSegmentationIdc(0) |
---|
| 1271 | ,m_maxBytesPerPicDenom(2) |
---|
| 1272 | ,m_maxBitsPerMinCuDenom(1) |
---|
| 1273 | ,m_log2MaxMvLengthHorizontal(15) |
---|
| 1274 | ,m_log2MaxMvLengthVertical(15) |
---|
| 1275 | {} |
---|
| 1276 | |
---|
| 1277 | virtual ~TComVUI() {} |
---|
| 1278 | |
---|
| 1279 | Bool getAspectRatioInfoPresentFlag() { return m_aspectRatioInfoPresentFlag; } |
---|
| 1280 | Void setAspectRatioInfoPresentFlag(Bool i) { m_aspectRatioInfoPresentFlag = i; } |
---|
| 1281 | |
---|
| 1282 | Int getAspectRatioIdc() { return m_aspectRatioIdc; } |
---|
| 1283 | Void setAspectRatioIdc(Int i) { m_aspectRatioIdc = i; } |
---|
| 1284 | |
---|
| 1285 | Int getSarWidth() { return m_sarWidth; } |
---|
| 1286 | Void setSarWidth(Int i) { m_sarWidth = i; } |
---|
| 1287 | |
---|
| 1288 | Int getSarHeight() { return m_sarHeight; } |
---|
| 1289 | Void setSarHeight(Int i) { m_sarHeight = i; } |
---|
| 1290 | |
---|
| 1291 | Bool getOverscanInfoPresentFlag() { return m_overscanInfoPresentFlag; } |
---|
| 1292 | Void setOverscanInfoPresentFlag(Bool i) { m_overscanInfoPresentFlag = i; } |
---|
| 1293 | |
---|
| 1294 | Bool getOverscanAppropriateFlag() { return m_overscanAppropriateFlag; } |
---|
| 1295 | Void setOverscanAppropriateFlag(Bool i) { m_overscanAppropriateFlag = i; } |
---|
| 1296 | |
---|
| 1297 | Bool getVideoSignalTypePresentFlag() { return m_videoSignalTypePresentFlag; } |
---|
| 1298 | Void setVideoSignalTypePresentFlag(Bool i) { m_videoSignalTypePresentFlag = i; } |
---|
| 1299 | |
---|
| 1300 | Int getVideoFormat() { return m_videoFormat; } |
---|
| 1301 | Void setVideoFormat(Int i) { m_videoFormat = i; } |
---|
| 1302 | |
---|
| 1303 | Bool getVideoFullRangeFlag() { return m_videoFullRangeFlag; } |
---|
| 1304 | Void setVideoFullRangeFlag(Bool i) { m_videoFullRangeFlag = i; } |
---|
| 1305 | |
---|
| 1306 | Bool getColourDescriptionPresentFlag() { return m_colourDescriptionPresentFlag; } |
---|
| 1307 | Void setColourDescriptionPresentFlag(Bool i) { m_colourDescriptionPresentFlag = i; } |
---|
| 1308 | |
---|
| 1309 | Int getColourPrimaries() { return m_colourPrimaries; } |
---|
| 1310 | Void setColourPrimaries(Int i) { m_colourPrimaries = i; } |
---|
| 1311 | |
---|
| 1312 | Int getTransferCharacteristics() { return m_transferCharacteristics; } |
---|
| 1313 | Void setTransferCharacteristics(Int i) { m_transferCharacteristics = i; } |
---|
| 1314 | |
---|
| 1315 | Int getMatrixCoefficients() { return m_matrixCoefficients; } |
---|
| 1316 | Void setMatrixCoefficients(Int i) { m_matrixCoefficients = i; } |
---|
| 1317 | |
---|
| 1318 | Bool getChromaLocInfoPresentFlag() { return m_chromaLocInfoPresentFlag; } |
---|
| 1319 | Void setChromaLocInfoPresentFlag(Bool i) { m_chromaLocInfoPresentFlag = i; } |
---|
| 1320 | |
---|
| 1321 | Int getChromaSampleLocTypeTopField() { return m_chromaSampleLocTypeTopField; } |
---|
| 1322 | Void setChromaSampleLocTypeTopField(Int i) { m_chromaSampleLocTypeTopField = i; } |
---|
| 1323 | |
---|
| 1324 | Int getChromaSampleLocTypeBottomField() { return m_chromaSampleLocTypeBottomField; } |
---|
| 1325 | Void setChromaSampleLocTypeBottomField(Int i) { m_chromaSampleLocTypeBottomField = i; } |
---|
| 1326 | |
---|
| 1327 | Bool getNeutralChromaIndicationFlag() { return m_neutralChromaIndicationFlag; } |
---|
| 1328 | Void setNeutralChromaIndicationFlag(Bool i) { m_neutralChromaIndicationFlag = i; } |
---|
| 1329 | |
---|
| 1330 | Bool getFieldSeqFlag() { return m_fieldSeqFlag; } |
---|
| 1331 | Void setFieldSeqFlag(Bool i) { m_fieldSeqFlag = i; } |
---|
| 1332 | |
---|
| 1333 | Bool getFrameFieldInfoPresentFlag() { return m_frameFieldInfoPresentFlag; } |
---|
| 1334 | Void setFrameFieldInfoPresentFlag(Bool i) { m_frameFieldInfoPresentFlag = i; } |
---|
| 1335 | |
---|
| 1336 | Window& getDefaultDisplayWindow() { return m_defaultDisplayWindow; } |
---|
| 1337 | Void setDefaultDisplayWindow(Window& defaultDisplayWindow ) { m_defaultDisplayWindow = defaultDisplayWindow; } |
---|
| 1338 | |
---|
| 1339 | Bool getHrdParametersPresentFlag() { return m_hrdParametersPresentFlag; } |
---|
| 1340 | Void setHrdParametersPresentFlag(Bool i) { m_hrdParametersPresentFlag = i; } |
---|
| 1341 | |
---|
| 1342 | Bool getBitstreamRestrictionFlag() { return m_bitstreamRestrictionFlag; } |
---|
| 1343 | Void setBitstreamRestrictionFlag(Bool i) { m_bitstreamRestrictionFlag = i; } |
---|
| 1344 | |
---|
| 1345 | Bool getTilesFixedStructureFlag() { return m_tilesFixedStructureFlag; } |
---|
| 1346 | Void setTilesFixedStructureFlag(Bool i) { m_tilesFixedStructureFlag = i; } |
---|
| 1347 | |
---|
| 1348 | Bool getMotionVectorsOverPicBoundariesFlag() { return m_motionVectorsOverPicBoundariesFlag; } |
---|
| 1349 | Void setMotionVectorsOverPicBoundariesFlag(Bool i) { m_motionVectorsOverPicBoundariesFlag = i; } |
---|
| 1350 | |
---|
| 1351 | Bool getRestrictedRefPicListsFlag() { return m_restrictedRefPicListsFlag; } |
---|
| 1352 | Void setRestrictedRefPicListsFlag(Bool b) { m_restrictedRefPicListsFlag = b; } |
---|
| 1353 | |
---|
| 1354 | Int getMinSpatialSegmentationIdc() { return m_minSpatialSegmentationIdc; } |
---|
| 1355 | Void setMinSpatialSegmentationIdc(Int i) { m_minSpatialSegmentationIdc = i; } |
---|
| 1356 | Int getMaxBytesPerPicDenom() { return m_maxBytesPerPicDenom; } |
---|
| 1357 | Void setMaxBytesPerPicDenom(Int i) { m_maxBytesPerPicDenom = i; } |
---|
| 1358 | |
---|
| 1359 | Int getMaxBitsPerMinCuDenom() { return m_maxBitsPerMinCuDenom; } |
---|
| 1360 | Void setMaxBitsPerMinCuDenom(Int i) { m_maxBitsPerMinCuDenom = i; } |
---|
| 1361 | |
---|
| 1362 | Int getLog2MaxMvLengthHorizontal() { return m_log2MaxMvLengthHorizontal; } |
---|
| 1363 | Void setLog2MaxMvLengthHorizontal(Int i) { m_log2MaxMvLengthHorizontal = i; } |
---|
| 1364 | |
---|
| 1365 | Int getLog2MaxMvLengthVertical() { return m_log2MaxMvLengthVertical; } |
---|
| 1366 | Void setLog2MaxMvLengthVertical(Int i) { m_log2MaxMvLengthVertical = i; } |
---|
| 1367 | |
---|
| 1368 | TComHRD* getHrdParameters () { return &m_hrdParameters; } |
---|
| 1369 | TimingInfo* getTimingInfo() { return &m_timingInfo; } |
---|
[773] | 1370 | #if H_MV |
---|
| 1371 | Void inferVideoSignalInfo( TComVPS* vps, Int layerIdCurr ); |
---|
[738] | 1372 | #endif |
---|
[608] | 1373 | }; |
---|
| 1374 | |
---|
[2] | 1375 | /// SPS class |
---|
| 1376 | class TComSPS |
---|
| 1377 | { |
---|
| 1378 | private: |
---|
[56] | 1379 | Int m_SPSId; |
---|
[608] | 1380 | Int m_VPSId; |
---|
[56] | 1381 | Int m_chromaFormatIdc; |
---|
| 1382 | |
---|
| 1383 | UInt m_uiMaxTLayers; // maximum number of temporal layers |
---|
| 1384 | |
---|
[2] | 1385 | // Structure |
---|
[56] | 1386 | UInt m_picWidthInLumaSamples; |
---|
| 1387 | UInt m_picHeightInLumaSamples; |
---|
[608] | 1388 | |
---|
| 1389 | Int m_log2MinCodingBlockSize; |
---|
| 1390 | Int m_log2DiffMaxMinCodingBlockSize; |
---|
[2] | 1391 | UInt m_uiMaxCUWidth; |
---|
| 1392 | UInt m_uiMaxCUHeight; |
---|
| 1393 | UInt m_uiMaxCUDepth; |
---|
[608] | 1394 | |
---|
| 1395 | Window m_conformanceWindow; |
---|
| 1396 | |
---|
| 1397 | TComRPSList m_RPSList; |
---|
[56] | 1398 | Bool m_bLongTermRefsPresent; |
---|
[608] | 1399 | Bool m_TMVPFlagsPresent; |
---|
[56] | 1400 | Int m_numReorderPics[MAX_TLAYER]; |
---|
| 1401 | |
---|
[2] | 1402 | // Tool list |
---|
| 1403 | UInt m_uiQuadtreeTULog2MaxSize; |
---|
| 1404 | UInt m_uiQuadtreeTULog2MinSize; |
---|
| 1405 | UInt m_uiQuadtreeTUMaxDepthInter; |
---|
| 1406 | UInt m_uiQuadtreeTUMaxDepthIntra; |
---|
[56] | 1407 | Bool m_usePCM; |
---|
| 1408 | UInt m_pcmLog2MaxSize; |
---|
| 1409 | UInt m_uiPCMLog2MinSize; |
---|
| 1410 | Bool m_useAMP; |
---|
[2] | 1411 | |
---|
[608] | 1412 | #if H_3D_QTLPC |
---|
| 1413 | Bool m_bUseQTL; |
---|
| 1414 | Bool m_bUsePC; |
---|
| 1415 | #endif |
---|
[2] | 1416 | // Parameter |
---|
[608] | 1417 | Int m_bitDepthY; |
---|
| 1418 | Int m_bitDepthC; |
---|
[56] | 1419 | Int m_qpBDOffsetY; |
---|
| 1420 | Int m_qpBDOffsetC; |
---|
[5] | 1421 | |
---|
[56] | 1422 | Bool m_useLossless; |
---|
| 1423 | |
---|
| 1424 | UInt m_uiPCMBitDepthLuma; |
---|
| 1425 | UInt m_uiPCMBitDepthChroma; |
---|
| 1426 | Bool m_bPCMFilterDisableFlag; |
---|
| 1427 | |
---|
| 1428 | UInt m_uiBitsForPOC; |
---|
[608] | 1429 | UInt m_numLongTermRefPicSPS; |
---|
| 1430 | UInt m_ltRefPicPocLsbSps[33]; |
---|
| 1431 | Bool m_usedByCurrPicLtSPSFlag[33]; |
---|
[2] | 1432 | // Max physical transform size |
---|
| 1433 | UInt m_uiMaxTrSize; |
---|
[56] | 1434 | |
---|
[2] | 1435 | Int m_iAMPAcc[MAX_CU_DEPTH]; |
---|
[56] | 1436 | Bool m_bUseSAO; |
---|
[2] | 1437 | |
---|
[56] | 1438 | Bool m_bTemporalIdNestingFlag; // temporal_id_nesting_flag |
---|
[2] | 1439 | |
---|
[56] | 1440 | Bool m_scalingListEnabledFlag; |
---|
[608] | 1441 | Bool m_scalingListPresentFlag; |
---|
| 1442 | TComScalingList* m_scalingList; //!< ScalingList class pointer |
---|
[56] | 1443 | UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; |
---|
[608] | 1444 | UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) |
---|
[56] | 1445 | |
---|
| 1446 | Bool m_useDF; |
---|
[608] | 1447 | Bool m_useStrongIntraSmoothing; |
---|
[56] | 1448 | |
---|
[608] | 1449 | Bool m_vuiParametersPresentFlag; |
---|
| 1450 | TComVUI m_vuiParameters; |
---|
[56] | 1451 | |
---|
[608] | 1452 | static const Int m_winUnitX[MAX_CHROMA_FORMAT_IDC+1]; |
---|
| 1453 | static const Int m_winUnitY[MAX_CHROMA_FORMAT_IDC+1]; |
---|
| 1454 | TComPTL m_pcPTL; |
---|
| 1455 | #if H_MV |
---|
[622] | 1456 | TComVPS* m_pcVPS; |
---|
| 1457 | // SPS |
---|
[738] | 1458 | Bool m_spsExtensionFlag; |
---|
| 1459 | Bool m_spsExtensionTypeFlag[PS_EX_T_MAX_NUM]; |
---|
[622] | 1460 | Bool m_spsInferScalingListFlag; |
---|
| 1461 | Int m_spsScalingListRefLayerId; |
---|
| 1462 | Bool m_updateRepFormatFlag; |
---|
[738] | 1463 | Int m_spsRepFormatIdx; |
---|
[622] | 1464 | // SPS Extension |
---|
[608] | 1465 | Bool m_interViewMvVertConstraintFlag; |
---|
[738] | 1466 | Int m_numScaledRefLayerOffsets; |
---|
| 1467 | Int m_scaledRefLayerId [MAX_NUM_SCALED_REF_LAYERS]; |
---|
| 1468 | Int m_scaledRefLayerLeftOffset [MAX_NUM_LAYERS]; |
---|
| 1469 | Int m_scaledRefLayerTopOffset [MAX_NUM_LAYERS]; |
---|
| 1470 | Int m_scaledRefLayerRightOffset [MAX_NUM_LAYERS]; |
---|
| 1471 | Int m_scaledRefLayerBottomOffset[MAX_NUM_LAYERS]; |
---|
[2] | 1472 | #endif |
---|
[608] | 1473 | #if H_3D |
---|
| 1474 | UInt m_uiCamParPrecision; |
---|
| 1475 | Bool m_bCamParInSliceHeader; |
---|
| 1476 | Int m_aaiCodedScale [2][MAX_NUM_LAYERS]; |
---|
| 1477 | Int m_aaiCodedOffset[2][MAX_NUM_LAYERS]; |
---|
[210] | 1478 | #endif |
---|
[608] | 1479 | #if H_MV |
---|
| 1480 | Int m_layerId; |
---|
[115] | 1481 | #endif |
---|
[2] | 1482 | public: |
---|
| 1483 | TComSPS(); |
---|
| 1484 | virtual ~TComSPS(); |
---|
[608] | 1485 | |
---|
[100] | 1486 | Int getVPSId () { return m_VPSId; } |
---|
[77] | 1487 | Void setVPSId (Int i) { m_VPSId = i; } |
---|
[56] | 1488 | Int getSPSId () { return m_SPSId; } |
---|
| 1489 | Void setSPSId (Int i) { m_SPSId = i; } |
---|
| 1490 | Int getChromaFormatIdc () { return m_chromaFormatIdc; } |
---|
| 1491 | Void setChromaFormatIdc (Int i) { m_chromaFormatIdc = i; } |
---|
[608] | 1492 | |
---|
| 1493 | static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitX[chromaFormatIdc]; } |
---|
| 1494 | static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc]; } |
---|
[56] | 1495 | |
---|
[2] | 1496 | // structure |
---|
[56] | 1497 | Void setPicWidthInLumaSamples ( UInt u ) { m_picWidthInLumaSamples = u; } |
---|
| 1498 | UInt getPicWidthInLumaSamples () { return m_picWidthInLumaSamples; } |
---|
| 1499 | Void setPicHeightInLumaSamples ( UInt u ) { m_picHeightInLumaSamples = u; } |
---|
| 1500 | UInt getPicHeightInLumaSamples () { return m_picHeightInLumaSamples; } |
---|
| 1501 | |
---|
[608] | 1502 | Window& getConformanceWindow() { return m_conformanceWindow; } |
---|
| 1503 | Void setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; } |
---|
[56] | 1504 | |
---|
[608] | 1505 | UInt getNumLongTermRefPicSPS() { return m_numLongTermRefPicSPS; } |
---|
| 1506 | Void setNumLongTermRefPicSPS(UInt val) { m_numLongTermRefPicSPS = val; } |
---|
| 1507 | |
---|
| 1508 | UInt getLtRefPicPocLsbSps(UInt index) { return m_ltRefPicPocLsbSps[index]; } |
---|
| 1509 | Void setLtRefPicPocLsbSps(UInt index, UInt val) { m_ltRefPicPocLsbSps[index] = val; } |
---|
| 1510 | |
---|
| 1511 | Bool getUsedByCurrPicLtSPSFlag(Int i) {return m_usedByCurrPicLtSPSFlag[i];} |
---|
| 1512 | Void setUsedByCurrPicLtSPSFlag(Int i, Bool x) { m_usedByCurrPicLtSPSFlag[i] = x;} |
---|
| 1513 | |
---|
| 1514 | Int getLog2MinCodingBlockSize() const { return m_log2MinCodingBlockSize; } |
---|
| 1515 | Void setLog2MinCodingBlockSize(Int val) { m_log2MinCodingBlockSize = val; } |
---|
| 1516 | Int getLog2DiffMaxMinCodingBlockSize() const { return m_log2DiffMaxMinCodingBlockSize; } |
---|
| 1517 | Void setLog2DiffMaxMinCodingBlockSize(Int val) { m_log2DiffMaxMinCodingBlockSize = val; } |
---|
| 1518 | |
---|
[2] | 1519 | Void setMaxCUWidth ( UInt u ) { m_uiMaxCUWidth = u; } |
---|
| 1520 | UInt getMaxCUWidth () { return m_uiMaxCUWidth; } |
---|
| 1521 | Void setMaxCUHeight ( UInt u ) { m_uiMaxCUHeight = u; } |
---|
| 1522 | UInt getMaxCUHeight () { return m_uiMaxCUHeight; } |
---|
| 1523 | Void setMaxCUDepth ( UInt u ) { m_uiMaxCUDepth = u; } |
---|
| 1524 | UInt getMaxCUDepth () { return m_uiMaxCUDepth; } |
---|
[56] | 1525 | Void setUsePCM ( Bool b ) { m_usePCM = b; } |
---|
| 1526 | Bool getUsePCM () { return m_usePCM; } |
---|
| 1527 | Void setPCMLog2MaxSize ( UInt u ) { m_pcmLog2MaxSize = u; } |
---|
| 1528 | UInt getPCMLog2MaxSize () { return m_pcmLog2MaxSize; } |
---|
| 1529 | Void setPCMLog2MinSize ( UInt u ) { m_uiPCMLog2MinSize = u; } |
---|
| 1530 | UInt getPCMLog2MinSize () { return m_uiPCMLog2MinSize; } |
---|
| 1531 | Void setBitsForPOC ( UInt u ) { m_uiBitsForPOC = u; } |
---|
| 1532 | UInt getBitsForPOC () { return m_uiBitsForPOC; } |
---|
| 1533 | Bool getUseAMP() { return m_useAMP; } |
---|
| 1534 | Void setUseAMP( Bool b ) { m_useAMP = b; } |
---|
[2] | 1535 | Void setQuadtreeTULog2MaxSize( UInt u ) { m_uiQuadtreeTULog2MaxSize = u; } |
---|
| 1536 | UInt getQuadtreeTULog2MaxSize() { return m_uiQuadtreeTULog2MaxSize; } |
---|
| 1537 | Void setQuadtreeTULog2MinSize( UInt u ) { m_uiQuadtreeTULog2MinSize = u; } |
---|
| 1538 | UInt getQuadtreeTULog2MinSize() { return m_uiQuadtreeTULog2MinSize; } |
---|
| 1539 | Void setQuadtreeTUMaxDepthInter( UInt u ) { m_uiQuadtreeTUMaxDepthInter = u; } |
---|
| 1540 | Void setQuadtreeTUMaxDepthIntra( UInt u ) { m_uiQuadtreeTUMaxDepthIntra = u; } |
---|
| 1541 | UInt getQuadtreeTUMaxDepthInter() { return m_uiQuadtreeTUMaxDepthInter; } |
---|
| 1542 | UInt getQuadtreeTUMaxDepthIntra() { return m_uiQuadtreeTUMaxDepthIntra; } |
---|
[56] | 1543 | Void setNumReorderPics(Int i, UInt tlayer) { m_numReorderPics[tlayer] = i; } |
---|
| 1544 | Int getNumReorderPics(UInt tlayer) { return m_numReorderPics[tlayer]; } |
---|
[608] | 1545 | Void createRPSList( Int numRPS ); |
---|
| 1546 | TComRPSList* getRPSList() { return &m_RPSList; } |
---|
[56] | 1547 | Bool getLongTermRefsPresent() { return m_bLongTermRefsPresent; } |
---|
| 1548 | Void setLongTermRefsPresent(Bool b) { m_bLongTermRefsPresent=b; } |
---|
[608] | 1549 | Bool getTMVPFlagsPresent() { return m_TMVPFlagsPresent; } |
---|
| 1550 | Void setTMVPFlagsPresent(Bool b) { m_TMVPFlagsPresent=b; } |
---|
[2] | 1551 | // physical transform |
---|
| 1552 | Void setMaxTrSize ( UInt u ) { m_uiMaxTrSize = u; } |
---|
| 1553 | UInt getMaxTrSize () { return m_uiMaxTrSize; } |
---|
[56] | 1554 | |
---|
[2] | 1555 | // Tool list |
---|
[56] | 1556 | Bool getUseLossless () { return m_useLossless; } |
---|
| 1557 | Void setUseLossless ( Bool b ) { m_useLossless = b; } |
---|
| 1558 | |
---|
| 1559 | // AMP accuracy |
---|
| 1560 | Int getAMPAcc ( UInt uiDepth ) { return m_iAMPAcc[uiDepth]; } |
---|
| 1561 | Void setAMPAcc ( UInt uiDepth, Int iAccu ) { assert( uiDepth < g_uiMaxCUDepth); m_iAMPAcc[uiDepth] = iAccu; } |
---|
[5] | 1562 | |
---|
[2] | 1563 | // Bit-depth |
---|
[608] | 1564 | Int getBitDepthY() { return m_bitDepthY; } |
---|
| 1565 | Void setBitDepthY(Int u) { m_bitDepthY = u; } |
---|
| 1566 | Int getBitDepthC() { return m_bitDepthC; } |
---|
| 1567 | Void setBitDepthC(Int u) { m_bitDepthC = u; } |
---|
[56] | 1568 | Int getQpBDOffsetY () { return m_qpBDOffsetY; } |
---|
| 1569 | Void setQpBDOffsetY ( Int value ) { m_qpBDOffsetY = value; } |
---|
| 1570 | Int getQpBDOffsetC () { return m_qpBDOffsetC; } |
---|
| 1571 | Void setQpBDOffsetC ( Int value ) { m_qpBDOffsetC = value; } |
---|
[2] | 1572 | Void setUseSAO (Bool bVal) {m_bUseSAO = bVal;} |
---|
| 1573 | Bool getUseSAO () {return m_bUseSAO;} |
---|
| 1574 | |
---|
[56] | 1575 | UInt getMaxTLayers() { return m_uiMaxTLayers; } |
---|
| 1576 | Void setMaxTLayers( UInt uiMaxTLayers ) { assert( uiMaxTLayers <= MAX_TLAYER ); m_uiMaxTLayers = uiMaxTLayers; } |
---|
[2] | 1577 | |
---|
[56] | 1578 | Bool getTemporalIdNestingFlag() { return m_bTemporalIdNestingFlag; } |
---|
| 1579 | Void setTemporalIdNestingFlag( Bool bValue ) { m_bTemporalIdNestingFlag = bValue; } |
---|
| 1580 | UInt getPCMBitDepthLuma () { return m_uiPCMBitDepthLuma; } |
---|
| 1581 | Void setPCMBitDepthLuma ( UInt u ) { m_uiPCMBitDepthLuma = u; } |
---|
| 1582 | UInt getPCMBitDepthChroma () { return m_uiPCMBitDepthChroma; } |
---|
| 1583 | Void setPCMBitDepthChroma ( UInt u ) { m_uiPCMBitDepthChroma = u; } |
---|
| 1584 | Void setPCMFilterDisableFlag ( Bool bValue ) { m_bPCMFilterDisableFlag = bValue; } |
---|
| 1585 | Bool getPCMFilterDisableFlag () { return m_bPCMFilterDisableFlag; } |
---|
| 1586 | |
---|
| 1587 | Bool getScalingListFlag () { return m_scalingListEnabledFlag; } |
---|
| 1588 | Void setScalingListFlag ( Bool b ) { m_scalingListEnabledFlag = b; } |
---|
[608] | 1589 | Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } |
---|
| 1590 | Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } |
---|
| 1591 | Void setScalingList ( TComScalingList *scalingList); |
---|
| 1592 | TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in SPS |
---|
[56] | 1593 | UInt getMaxDecPicBuffering (UInt tlayer) { return m_uiMaxDecPicBuffering[tlayer]; } |
---|
| 1594 | Void setMaxDecPicBuffering ( UInt ui, UInt tlayer ) { m_uiMaxDecPicBuffering[tlayer] = ui; } |
---|
| 1595 | UInt getMaxLatencyIncrease (UInt tlayer) { return m_uiMaxLatencyIncrease[tlayer]; } |
---|
| 1596 | Void setMaxLatencyIncrease ( UInt ui , UInt tlayer) { m_uiMaxLatencyIncrease[tlayer] = ui; } |
---|
| 1597 | |
---|
[608] | 1598 | Void setUseStrongIntraSmoothing (Bool bVal) {m_useStrongIntraSmoothing = bVal;} |
---|
| 1599 | Bool getUseStrongIntraSmoothing () {return m_useStrongIntraSmoothing;} |
---|
[56] | 1600 | |
---|
[608] | 1601 | Bool getVuiParametersPresentFlag() { return m_vuiParametersPresentFlag; } |
---|
| 1602 | Void setVuiParametersPresentFlag(Bool b) { m_vuiParametersPresentFlag = b; } |
---|
| 1603 | TComVUI* getVuiParameters() { return &m_vuiParameters; } |
---|
| 1604 | Void setHrdParameters( UInt frameRate, UInt numDU, UInt bitRate, Bool randomAccess ); |
---|
[210] | 1605 | |
---|
[608] | 1606 | TComPTL* getPTL() { return &m_pcPTL; } |
---|
| 1607 | #if H_MV |
---|
[738] | 1608 | Void setSpsExtensionFlag( Bool flag ) { m_spsExtensionFlag = flag; } |
---|
| 1609 | Bool getSpsExtensionFlag( ) { return m_spsExtensionFlag; } |
---|
| 1610 | |
---|
| 1611 | Void setSpsExtensionTypeFlag( Int i, Bool flag ) { m_spsExtensionTypeFlag[i] = flag; } |
---|
| 1612 | Bool getSpsExtensionTypeFlag( Int i ) { return m_spsExtensionTypeFlag[i]; } |
---|
[622] | 1613 | Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } |
---|
| 1614 | TComVPS* getVPS () { return m_pcVPS; } |
---|
| 1615 | |
---|
| 1616 | Void setSpsInferScalingListFlag( Bool flag ) { m_spsInferScalingListFlag = flag; } |
---|
| 1617 | Bool getSpsInferScalingListFlag( ) { return m_spsInferScalingListFlag; } |
---|
| 1618 | |
---|
| 1619 | Void setSpsScalingListRefLayerId( Int val ) { m_spsScalingListRefLayerId = val; } |
---|
| 1620 | Int getSpsScalingListRefLayerId( ) { return m_spsScalingListRefLayerId; } |
---|
| 1621 | |
---|
| 1622 | Void setUpdateRepFormatFlag( Bool flag ) { m_updateRepFormatFlag = flag; } |
---|
| 1623 | Bool getUpdateRepFormatFlag( ) { return m_updateRepFormatFlag; } |
---|
[738] | 1624 | Void setSpsRepFormatIdx( Int val ) { m_spsRepFormatIdx = val; } |
---|
| 1625 | Int getSpsRepFormatIdx( ) { return m_spsRepFormatIdx; } |
---|
[622] | 1626 | // SPS Extension |
---|
[608] | 1627 | Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; } |
---|
| 1628 | Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;} |
---|
[738] | 1629 | |
---|
| 1630 | Void setNumScaledRefLayerOffsets( Int val ) { m_numScaledRefLayerOffsets = val; } |
---|
| 1631 | Int getNumScaledRefLayerOffsets( ) { return m_numScaledRefLayerOffsets; } |
---|
| 1632 | |
---|
| 1633 | Void setScaledRefLayerId( Int i, Int val ) { m_scaledRefLayerId[i] = val; } |
---|
| 1634 | Int getScaledRefLayerId( Int i ) { return m_scaledRefLayerId[i]; } |
---|
| 1635 | |
---|
| 1636 | Void setScaledRefLayerLeftOffset( Int j, Int val ) { m_scaledRefLayerLeftOffset[j] = val; } |
---|
| 1637 | Int getScaledRefLayerLeftOffset( Int j ) { return m_scaledRefLayerLeftOffset[j]; } |
---|
| 1638 | |
---|
| 1639 | Void setScaledRefLayerTopOffset( Int j, Int val ) { m_scaledRefLayerTopOffset[j] = val; } |
---|
| 1640 | Int getScaledRefLayerTopOffset( Int j ) { return m_scaledRefLayerTopOffset[j]; } |
---|
| 1641 | |
---|
| 1642 | Void setScaledRefLayerRightOffset( Int j, Int val ) { m_scaledRefLayerRightOffset[j] = val; } |
---|
| 1643 | Int getScaledRefLayerRightOffset( Int j ) { return m_scaledRefLayerRightOffset[j]; } |
---|
| 1644 | |
---|
| 1645 | Void setScaledRefLayerBottomOffset( Int j, Int val ) { m_scaledRefLayerBottomOffset[j] = val; } |
---|
| 1646 | Int getScaledRefLayerBottomOffset( Int j ) { return m_scaledRefLayerBottomOffset[j]; } |
---|
[622] | 1647 | // Inference |
---|
| 1648 | Void inferRepFormat( TComVPS* vps, Int layerIdCurr ); |
---|
[115] | 1649 | |
---|
[622] | 1650 | Void inferScalingList( TComSPS* spsSrc ); |
---|
[313] | 1651 | #endif |
---|
[608] | 1652 | #if H_3D_QTLPC |
---|
| 1653 | Void setUseQTL( Bool b ) { m_bUseQTL = b; } |
---|
| 1654 | Bool getUseQTL() { return m_bUseQTL; } |
---|
| 1655 | Void setUsePC ( Bool b ) { m_bUsePC = b; } |
---|
| 1656 | Bool getUsePC () { return m_bUsePC; } |
---|
| 1657 | #endif |
---|
| 1658 | #if H_MV |
---|
| 1659 | Int getLayerId () { return m_layerId; } |
---|
| 1660 | Void setLayerId ( Int val ) { m_layerId = val; } |
---|
[5] | 1661 | #endif |
---|
| 1662 | |
---|
[56] | 1663 | }; |
---|
[42] | 1664 | |
---|
[56] | 1665 | /// Reference Picture Lists class |
---|
| 1666 | class TComRefPicListModification |
---|
| 1667 | { |
---|
| 1668 | private: |
---|
| 1669 | UInt m_bRefPicListModificationFlagL0; |
---|
| 1670 | UInt m_bRefPicListModificationFlagL1; |
---|
| 1671 | UInt m_RefPicSetIdxL0[32]; |
---|
| 1672 | UInt m_RefPicSetIdxL1[32]; |
---|
| 1673 | |
---|
| 1674 | public: |
---|
| 1675 | TComRefPicListModification(); |
---|
| 1676 | virtual ~TComRefPicListModification(); |
---|
| 1677 | |
---|
| 1678 | Void create (); |
---|
| 1679 | Void destroy (); |
---|
| 1680 | |
---|
| 1681 | Bool getRefPicListModificationFlagL0() { return m_bRefPicListModificationFlagL0; } |
---|
| 1682 | Void setRefPicListModificationFlagL0(Bool flag) { m_bRefPicListModificationFlagL0 = flag; } |
---|
| 1683 | Bool getRefPicListModificationFlagL1() { return m_bRefPicListModificationFlagL1; } |
---|
| 1684 | Void setRefPicListModificationFlagL1(Bool flag) { m_bRefPicListModificationFlagL1 = flag; } |
---|
| 1685 | Void setRefPicSetIdxL0(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL0[idx] = refPicSetIdx; } |
---|
| 1686 | UInt getRefPicSetIdxL0(UInt idx) { return m_RefPicSetIdxL0[idx]; } |
---|
| 1687 | Void setRefPicSetIdxL1(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL1[idx] = refPicSetIdx; } |
---|
| 1688 | UInt getRefPicSetIdxL1(UInt idx) { return m_RefPicSetIdxL1[idx]; } |
---|
[608] | 1689 | #if H_MV |
---|
| 1690 | // Why not an listIdx for all members, would avoid code duplication?? |
---|
| 1691 | Void setRefPicSetIdxL(UInt li, UInt idx, UInt refPicSetIdx) {( li==0 ? m_RefPicSetIdxL0[idx] : m_RefPicSetIdxL1[idx] ) = refPicSetIdx; } |
---|
| 1692 | UInt getRefPicSetIdxL(UInt li, UInt idx ) { return ( li == 0 ) ? m_RefPicSetIdxL0[idx] : m_RefPicSetIdxL1[idx] ; } |
---|
| 1693 | Void setRefPicListModificationFlagL(UInt li, Bool flag) { ( li==0 ? m_bRefPicListModificationFlagL0 : m_bRefPicListModificationFlagL1 ) = flag; } |
---|
| 1694 | Bool getRefPicListModificationFlagL(UInt li ) { return ( li== 0) ? m_bRefPicListModificationFlagL0 : m_bRefPicListModificationFlagL1; } |
---|
| 1695 | #endif |
---|
[2] | 1696 | }; |
---|
| 1697 | |
---|
| 1698 | /// PPS class |
---|
| 1699 | class TComPPS |
---|
| 1700 | { |
---|
| 1701 | private: |
---|
[56] | 1702 | Int m_PPSId; // pic_parameter_set_id |
---|
| 1703 | Int m_SPSId; // seq_parameter_set_id |
---|
| 1704 | Int m_picInitQPMinus26; |
---|
| 1705 | Bool m_useDQP; |
---|
| 1706 | Bool m_bConstrainedIntraPred; // constrained_intra_pred_flag |
---|
[608] | 1707 | Bool m_bSliceChromaQpFlag; // slicelevel_chroma_qp_flag |
---|
| 1708 | |
---|
[56] | 1709 | // access channel |
---|
| 1710 | TComSPS* m_pcSPS; |
---|
| 1711 | UInt m_uiMaxCuDQPDepth; |
---|
| 1712 | UInt m_uiMinCuDQPSize; |
---|
| 1713 | |
---|
[608] | 1714 | Int m_chromaCbQpOffset; |
---|
| 1715 | Int m_chromaCrQpOffset; |
---|
[56] | 1716 | |
---|
[608] | 1717 | UInt m_numRefIdxL0DefaultActive; |
---|
| 1718 | UInt m_numRefIdxL1DefaultActive; |
---|
[56] | 1719 | |
---|
[2] | 1720 | Bool m_bUseWeightPred; // Use of Weighting Prediction (P_SLICE) |
---|
[608] | 1721 | Bool m_useWeightedBiPred; // Use of Weighting Bi-Prediction (B_SLICE) |
---|
[56] | 1722 | Bool m_OutputFlagPresentFlag; // Indicates the presence of output_flag in slice header |
---|
| 1723 | |
---|
[608] | 1724 | Bool m_TransquantBypassEnableFlag; // Indicates presence of cu_transquant_bypass_flag in CUs. |
---|
| 1725 | Bool m_useTransformSkip; |
---|
| 1726 | Bool m_dependentSliceSegmentsEnabledFlag; //!< Indicates the presence of dependent slices |
---|
| 1727 | Bool m_tilesEnabledFlag; //!< Indicates the presence of tiles |
---|
| 1728 | Bool m_entropyCodingSyncEnabledFlag; //!< Indicates the presence of wavefronts |
---|
| 1729 | |
---|
| 1730 | Bool m_loopFilterAcrossTilesEnabledFlag; |
---|
| 1731 | Int m_uniformSpacingFlag; |
---|
[56] | 1732 | Int m_iNumColumnsMinus1; |
---|
| 1733 | UInt* m_puiColumnWidth; |
---|
| 1734 | Int m_iNumRowsMinus1; |
---|
| 1735 | UInt* m_puiRowHeight; |
---|
[608] | 1736 | |
---|
[56] | 1737 | Int m_iNumSubstreams; |
---|
[5] | 1738 | |
---|
[56] | 1739 | Int m_signHideFlag; |
---|
| 1740 | |
---|
| 1741 | Bool m_cabacInitPresentFlag; |
---|
| 1742 | UInt m_encCABACTableIdx; // Used to transmit table selection across slices |
---|
[608] | 1743 | |
---|
| 1744 | Bool m_sliceHeaderExtensionPresentFlag; |
---|
| 1745 | Bool m_loopFilterAcrossSlicesEnabledFlag; |
---|
| 1746 | Bool m_deblockingFilterControlPresentFlag; |
---|
| 1747 | Bool m_deblockingFilterOverrideEnabledFlag; |
---|
| 1748 | Bool m_picDisableDeblockingFilterFlag; |
---|
| 1749 | Int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
| 1750 | Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
| 1751 | Bool m_scalingListPresentFlag; |
---|
| 1752 | TComScalingList* m_scalingList; //!< ScalingList class pointer |
---|
| 1753 | Bool m_listsModificationPresentFlag; |
---|
[56] | 1754 | UInt m_log2ParallelMergeLevelMinus2; |
---|
[608] | 1755 | Int m_numExtraSliceHeaderBits; |
---|
| 1756 | |
---|
[622] | 1757 | #if H_MV |
---|
| 1758 | Int m_layerId; |
---|
| 1759 | Bool m_ppsInferScalingListFlag; |
---|
| 1760 | Int m_ppsScalingListRefLayerId; |
---|
| 1761 | #endif |
---|
[758] | 1762 | |
---|
[773] | 1763 | #if H_3D |
---|
[758] | 1764 | TComDLT* m_pcDLT; |
---|
| 1765 | #endif |
---|
| 1766 | |
---|
[2] | 1767 | public: |
---|
| 1768 | TComPPS(); |
---|
| 1769 | virtual ~TComPPS(); |
---|
[56] | 1770 | |
---|
| 1771 | Int getPPSId () { return m_PPSId; } |
---|
| 1772 | Void setPPSId (Int i) { m_PPSId = i; } |
---|
| 1773 | Int getSPSId () { return m_SPSId; } |
---|
| 1774 | Void setSPSId (Int i) { m_SPSId = i; } |
---|
| 1775 | |
---|
| 1776 | Int getPicInitQPMinus26 () { return m_picInitQPMinus26; } |
---|
| 1777 | Void setPicInitQPMinus26 ( Int i ) { m_picInitQPMinus26 = i; } |
---|
| 1778 | Bool getUseDQP () { return m_useDQP; } |
---|
| 1779 | Void setUseDQP ( Bool b ) { m_useDQP = b; } |
---|
[2] | 1780 | Bool getConstrainedIntraPred () { return m_bConstrainedIntraPred; } |
---|
| 1781 | Void setConstrainedIntraPred ( Bool b ) { m_bConstrainedIntraPred = b; } |
---|
[608] | 1782 | Bool getSliceChromaQpFlag () { return m_bSliceChromaQpFlag; } |
---|
| 1783 | Void setSliceChromaQpFlag ( Bool b ) { m_bSliceChromaQpFlag = b; } |
---|
[56] | 1784 | |
---|
| 1785 | Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
| 1786 | TComSPS* getSPS () { return m_pcSPS; } |
---|
| 1787 | Void setMaxCuDQPDepth ( UInt u ) { m_uiMaxCuDQPDepth = u; } |
---|
| 1788 | UInt getMaxCuDQPDepth () { return m_uiMaxCuDQPDepth;} |
---|
| 1789 | Void setMinCuDQPSize ( UInt u ) { m_uiMinCuDQPSize = u; } |
---|
| 1790 | UInt getMinCuDQPSize () { return m_uiMinCuDQPSize; } |
---|
[2] | 1791 | |
---|
[773] | 1792 | #if H_3D |
---|
[758] | 1793 | Void setDLT ( TComDLT* pcDLT ) { m_pcDLT = pcDLT; } |
---|
| 1794 | TComDLT* getDLT () { return m_pcDLT; } |
---|
| 1795 | #endif |
---|
| 1796 | |
---|
[608] | 1797 | Void setChromaCbQpOffset( Int i ) { m_chromaCbQpOffset = i; } |
---|
| 1798 | Int getChromaCbQpOffset() { return m_chromaCbQpOffset; } |
---|
| 1799 | Void setChromaCrQpOffset( Int i ) { m_chromaCrQpOffset = i; } |
---|
| 1800 | Int getChromaCrQpOffset() { return m_chromaCrQpOffset; } |
---|
[56] | 1801 | |
---|
[608] | 1802 | Void setNumRefIdxL0DefaultActive(UInt ui) { m_numRefIdxL0DefaultActive=ui; } |
---|
| 1803 | UInt getNumRefIdxL0DefaultActive() { return m_numRefIdxL0DefaultActive; } |
---|
| 1804 | Void setNumRefIdxL1DefaultActive(UInt ui) { m_numRefIdxL1DefaultActive=ui; } |
---|
| 1805 | UInt getNumRefIdxL1DefaultActive() { return m_numRefIdxL1DefaultActive; } |
---|
| 1806 | |
---|
[56] | 1807 | Bool getUseWP () { return m_bUseWeightPred; } |
---|
[608] | 1808 | Bool getWPBiPred () { return m_useWeightedBiPred; } |
---|
[56] | 1809 | Void setUseWP ( Bool b ) { m_bUseWeightPred = b; } |
---|
[608] | 1810 | Void setWPBiPred ( Bool b ) { m_useWeightedBiPred = b; } |
---|
[56] | 1811 | Void setOutputFlagPresentFlag( Bool b ) { m_OutputFlagPresentFlag = b; } |
---|
| 1812 | Bool getOutputFlagPresentFlag() { return m_OutputFlagPresentFlag; } |
---|
[608] | 1813 | Void setTransquantBypassEnableFlag( Bool b ) { m_TransquantBypassEnableFlag = b; } |
---|
| 1814 | Bool getTransquantBypassEnableFlag() { return m_TransquantBypassEnableFlag; } |
---|
[56] | 1815 | |
---|
[608] | 1816 | Bool getUseTransformSkip () { return m_useTransformSkip; } |
---|
| 1817 | Void setUseTransformSkip ( Bool b ) { m_useTransformSkip = b; } |
---|
| 1818 | |
---|
| 1819 | Void setLoopFilterAcrossTilesEnabledFlag (Bool b) { m_loopFilterAcrossTilesEnabledFlag = b; } |
---|
| 1820 | Bool getLoopFilterAcrossTilesEnabledFlag () { return m_loopFilterAcrossTilesEnabledFlag; } |
---|
| 1821 | Bool getDependentSliceSegmentsEnabledFlag() const { return m_dependentSliceSegmentsEnabledFlag; } |
---|
| 1822 | Void setDependentSliceSegmentsEnabledFlag(Bool val) { m_dependentSliceSegmentsEnabledFlag = val; } |
---|
| 1823 | Bool getTilesEnabledFlag() const { return m_tilesEnabledFlag; } |
---|
| 1824 | Void setTilesEnabledFlag(Bool val) { m_tilesEnabledFlag = val; } |
---|
| 1825 | Bool getEntropyCodingSyncEnabledFlag() const { return m_entropyCodingSyncEnabledFlag; } |
---|
| 1826 | Void setEntropyCodingSyncEnabledFlag(Bool val) { m_entropyCodingSyncEnabledFlag = val; } |
---|
| 1827 | Void setUniformSpacingFlag ( Bool b ) { m_uniformSpacingFlag = b; } |
---|
| 1828 | Bool getUniformSpacingFlag () { return m_uniformSpacingFlag; } |
---|
[56] | 1829 | Void setNumColumnsMinus1 ( Int i ) { m_iNumColumnsMinus1 = i; } |
---|
| 1830 | Int getNumColumnsMinus1 () { return m_iNumColumnsMinus1; } |
---|
| 1831 | Void setColumnWidth ( UInt* columnWidth ) |
---|
| 1832 | { |
---|
[608] | 1833 | if( m_uniformSpacingFlag == 0 && m_iNumColumnsMinus1 > 0 ) |
---|
[56] | 1834 | { |
---|
| 1835 | m_puiColumnWidth = new UInt[ m_iNumColumnsMinus1 ]; |
---|
[42] | 1836 | |
---|
[56] | 1837 | for(Int i=0; i<m_iNumColumnsMinus1; i++) |
---|
| 1838 | { |
---|
| 1839 | m_puiColumnWidth[i] = columnWidth[i]; |
---|
| 1840 | } |
---|
| 1841 | } |
---|
| 1842 | } |
---|
| 1843 | UInt getColumnWidth (UInt columnIdx) { return *( m_puiColumnWidth + columnIdx ); } |
---|
| 1844 | Void setNumRowsMinus1( Int i ) { m_iNumRowsMinus1 = i; } |
---|
| 1845 | Int getNumRowsMinus1() { return m_iNumRowsMinus1; } |
---|
| 1846 | Void setRowHeight ( UInt* rowHeight ) |
---|
| 1847 | { |
---|
[608] | 1848 | if( m_uniformSpacingFlag == 0 && m_iNumRowsMinus1 > 0 ) |
---|
[56] | 1849 | { |
---|
| 1850 | m_puiRowHeight = new UInt[ m_iNumRowsMinus1 ]; |
---|
| 1851 | |
---|
| 1852 | for(Int i=0; i<m_iNumRowsMinus1; i++) |
---|
| 1853 | { |
---|
| 1854 | m_puiRowHeight[i] = rowHeight[i]; |
---|
| 1855 | } |
---|
| 1856 | } |
---|
| 1857 | } |
---|
| 1858 | UInt getRowHeight (UInt rowIdx) { return *( m_puiRowHeight + rowIdx ); } |
---|
| 1859 | Void setNumSubstreams(Int iNumSubstreams) { m_iNumSubstreams = iNumSubstreams; } |
---|
| 1860 | Int getNumSubstreams() { return m_iNumSubstreams; } |
---|
| 1861 | |
---|
| 1862 | Void setSignHideFlag( Int signHideFlag ) { m_signHideFlag = signHideFlag; } |
---|
| 1863 | Int getSignHideFlag() { return m_signHideFlag; } |
---|
| 1864 | |
---|
| 1865 | Void setCabacInitPresentFlag( Bool flag ) { m_cabacInitPresentFlag = flag; } |
---|
| 1866 | Void setEncCABACTableIdx( Int idx ) { m_encCABACTableIdx = idx; } |
---|
| 1867 | Bool getCabacInitPresentFlag() { return m_cabacInitPresentFlag; } |
---|
| 1868 | UInt getEncCABACTableIdx() { return m_encCABACTableIdx; } |
---|
[608] | 1869 | Void setDeblockingFilterControlPresentFlag( Bool val ) { m_deblockingFilterControlPresentFlag = val; } |
---|
| 1870 | Bool getDeblockingFilterControlPresentFlag() { return m_deblockingFilterControlPresentFlag; } |
---|
| 1871 | Void setDeblockingFilterOverrideEnabledFlag( Bool val ) { m_deblockingFilterOverrideEnabledFlag = val; } |
---|
| 1872 | Bool getDeblockingFilterOverrideEnabledFlag() { return m_deblockingFilterOverrideEnabledFlag; } |
---|
| 1873 | Void setPicDisableDeblockingFilterFlag(Bool val) { m_picDisableDeblockingFilterFlag = val; } //!< set offset for deblocking filter disabled |
---|
| 1874 | Bool getPicDisableDeblockingFilterFlag() { return m_picDisableDeblockingFilterFlag; } //!< get offset for deblocking filter disabled |
---|
| 1875 | Void setDeblockingFilterBetaOffsetDiv2(Int val) { m_deblockingFilterBetaOffsetDiv2 = val; } //!< set beta offset for deblocking filter |
---|
| 1876 | Int getDeblockingFilterBetaOffsetDiv2() { return m_deblockingFilterBetaOffsetDiv2; } //!< get beta offset for deblocking filter |
---|
| 1877 | Void setDeblockingFilterTcOffsetDiv2(Int val) { m_deblockingFilterTcOffsetDiv2 = val; } //!< set tc offset for deblocking filter |
---|
| 1878 | Int getDeblockingFilterTcOffsetDiv2() { return m_deblockingFilterTcOffsetDiv2; } //!< get tc offset for deblocking filter |
---|
| 1879 | Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } |
---|
| 1880 | Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } |
---|
| 1881 | Void setScalingList ( TComScalingList *scalingList); |
---|
| 1882 | TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in PPS |
---|
| 1883 | Bool getListsModificationPresentFlag () { return m_listsModificationPresentFlag; } |
---|
| 1884 | Void setListsModificationPresentFlag ( Bool b ) { m_listsModificationPresentFlag = b; } |
---|
[56] | 1885 | UInt getLog2ParallelMergeLevelMinus2 () { return m_log2ParallelMergeLevelMinus2; } |
---|
| 1886 | Void setLog2ParallelMergeLevelMinus2 (UInt mrgLevel) { m_log2ParallelMergeLevelMinus2 = mrgLevel; } |
---|
[608] | 1887 | Int getNumExtraSliceHeaderBits() { return m_numExtraSliceHeaderBits; } |
---|
| 1888 | Void setNumExtraSliceHeaderBits(Int i) { m_numExtraSliceHeaderBits = i; } |
---|
| 1889 | Void setLoopFilterAcrossSlicesEnabledFlag ( Bool bValue ) { m_loopFilterAcrossSlicesEnabledFlag = bValue; } |
---|
| 1890 | Bool getLoopFilterAcrossSlicesEnabledFlag () { return m_loopFilterAcrossSlicesEnabledFlag; } |
---|
| 1891 | Bool getSliceHeaderExtensionPresentFlag () { return m_sliceHeaderExtensionPresentFlag; } |
---|
| 1892 | Void setSliceHeaderExtensionPresentFlag (Bool val) { m_sliceHeaderExtensionPresentFlag = val; } |
---|
[622] | 1893 | #if H_MV |
---|
| 1894 | Void setLayerId( Int val ) { m_layerId = val; } |
---|
| 1895 | Int getLayerId( ) { return m_layerId; } |
---|
| 1896 | |
---|
| 1897 | Void setPpsInferScalingListFlag( Bool flag ) { m_ppsInferScalingListFlag = flag; } |
---|
| 1898 | Bool getPpsInferScalingListFlag( ) { return m_ppsInferScalingListFlag; } |
---|
| 1899 | |
---|
| 1900 | Void setPpsScalingListRefLayerId( Int val ) { m_ppsScalingListRefLayerId = val; } |
---|
| 1901 | Int getPpsScalingListRefLayerId( ) { return m_ppsScalingListRefLayerId; } |
---|
| 1902 | #endif |
---|
[2] | 1903 | }; |
---|
| 1904 | |
---|
[608] | 1905 | typedef struct |
---|
[56] | 1906 | { |
---|
[2] | 1907 | // Explicit weighted prediction parameters parsed in slice header, |
---|
| 1908 | // or Implicit weighted prediction parameters (8 bits depth values). |
---|
| 1909 | Bool bPresentFlag; |
---|
| 1910 | UInt uiLog2WeightDenom; |
---|
| 1911 | Int iWeight; |
---|
| 1912 | Int iOffset; |
---|
| 1913 | |
---|
| 1914 | // Weighted prediction scaling values built from above parameters (bitdepth scaled): |
---|
| 1915 | Int w, o, offset, shift, round; |
---|
| 1916 | } wpScalingParam; |
---|
| 1917 | |
---|
[608] | 1918 | typedef struct |
---|
| 1919 | { |
---|
[2] | 1920 | Int64 iAC; |
---|
| 1921 | Int64 iDC; |
---|
| 1922 | } wpACDCParam; |
---|
| 1923 | |
---|
| 1924 | /// slice header class |
---|
| 1925 | class TComSlice |
---|
| 1926 | { |
---|
[56] | 1927 | |
---|
[2] | 1928 | private: |
---|
| 1929 | // Bitstream writing |
---|
[608] | 1930 | Bool m_saoEnabledFlag; |
---|
| 1931 | Bool m_saoEnabledFlagChroma; ///< SAO Cb&Cr enabled flag |
---|
[56] | 1932 | Int m_iPPSId; ///< picture parameter set ID |
---|
| 1933 | Bool m_PicOutputFlag; ///< pic_output_flag |
---|
| 1934 | Int m_iPOC; |
---|
[622] | 1935 | #if H_MV |
---|
| 1936 | Int m_iPOCBeforeReset; |
---|
| 1937 | #endif |
---|
[56] | 1938 | Int m_iLastIDR; |
---|
[655] | 1939 | Int m_iAssociatedIRAP; |
---|
| 1940 | NalUnitType m_iAssociatedIRAPType; |
---|
| 1941 | static Int m_prevTid0POC; |
---|
[56] | 1942 | TComReferencePictureSet *m_pcRPS; |
---|
| 1943 | TComReferencePictureSet m_LocalRPS; |
---|
| 1944 | Int m_iBDidx; |
---|
| 1945 | TComRefPicListModification m_RefPicListModification; |
---|
[608] | 1946 | NalUnitType m_eNalUnitType; ///< Nal unit type for the slice |
---|
[2] | 1947 | SliceType m_eSliceType; |
---|
| 1948 | Int m_iSliceQp; |
---|
[608] | 1949 | Bool m_dependentSliceSegmentFlag; |
---|
[56] | 1950 | #if ADAPTIVE_QP_SELECTION |
---|
| 1951 | Int m_iSliceQpBase; |
---|
| 1952 | #endif |
---|
[608] | 1953 | Bool m_deblockingFilterDisable; |
---|
| 1954 | Bool m_deblockingFilterOverrideFlag; //< offsets for deblocking filter inherit from PPS |
---|
| 1955 | Int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter |
---|
| 1956 | Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter |
---|
| 1957 | Int m_list1IdxToList0Idx[MAX_NUM_REF]; |
---|
| 1958 | Int m_aiNumRefIdx [2]; // for multiple reference of current slice |
---|
[2] | 1959 | |
---|
[56] | 1960 | Bool m_bCheckLDC; |
---|
| 1961 | |
---|
[2] | 1962 | // Data |
---|
| 1963 | Int m_iSliceQpDelta; |
---|
[608] | 1964 | Int m_iSliceQpDeltaCb; |
---|
| 1965 | Int m_iSliceQpDeltaCr; |
---|
| 1966 | TComPic* m_apcRefPicList [2][MAX_NUM_REF+1]; |
---|
| 1967 | Int m_aiRefPOCList [2][MAX_NUM_REF+1]; |
---|
| 1968 | #if H_MV |
---|
| 1969 | Int m_aiRefLayerIdList[2][MAX_NUM_REF+1]; |
---|
| 1970 | #endif |
---|
| 1971 | Bool m_bIsUsedAsLongTerm[2][MAX_NUM_REF+1]; |
---|
[2] | 1972 | Int m_iDepth; |
---|
[56] | 1973 | |
---|
[2] | 1974 | // referenced slice? |
---|
| 1975 | Bool m_bRefenced; |
---|
[56] | 1976 | |
---|
[2] | 1977 | // access channel |
---|
[77] | 1978 | TComVPS* m_pcVPS; |
---|
[2] | 1979 | TComSPS* m_pcSPS; |
---|
| 1980 | TComPPS* m_pcPPS; |
---|
| 1981 | TComPic* m_pcPic; |
---|
[56] | 1982 | #if ADAPTIVE_QP_SELECTION |
---|
| 1983 | TComTrQuant* m_pcTrQuant; |
---|
| 1984 | #endif |
---|
[608] | 1985 | UInt m_colFromL0Flag; // collocated picture from List0 flag |
---|
[56] | 1986 | |
---|
| 1987 | UInt m_colRefIdx; |
---|
[608] | 1988 | UInt m_maxNumMergeCand; |
---|
[5] | 1989 | |
---|
[608] | 1990 | |
---|
| 1991 | #if SAO_CHROMA_LAMBDA |
---|
[56] | 1992 | Double m_dLambdaLuma; |
---|
| 1993 | Double m_dLambdaChroma; |
---|
| 1994 | #else |
---|
[2] | 1995 | Double m_dLambda; |
---|
[56] | 1996 | #endif |
---|
[5] | 1997 | |
---|
[2] | 1998 | Bool m_abEqualRef [2][MAX_NUM_REF][MAX_NUM_REF]; |
---|
[56] | 1999 | UInt m_uiTLayer; |
---|
| 2000 | Bool m_bTLayerSwitchingFlag; |
---|
[2] | 2001 | |
---|
[608] | 2002 | UInt m_sliceMode; |
---|
| 2003 | UInt m_sliceArgument; |
---|
| 2004 | UInt m_sliceCurStartCUAddr; |
---|
| 2005 | UInt m_sliceCurEndCUAddr; |
---|
| 2006 | UInt m_sliceIdx; |
---|
| 2007 | UInt m_sliceSegmentMode; |
---|
| 2008 | UInt m_sliceSegmentArgument; |
---|
| 2009 | UInt m_sliceSegmentCurStartCUAddr; |
---|
| 2010 | UInt m_sliceSegmentCurEndCUAddr; |
---|
| 2011 | Bool m_nextSlice; |
---|
| 2012 | Bool m_nextSliceSegment; |
---|
| 2013 | UInt m_sliceBits; |
---|
| 2014 | UInt m_sliceSegmentBits; |
---|
[56] | 2015 | Bool m_bFinalized; |
---|
[2] | 2016 | |
---|
| 2017 | wpScalingParam m_weightPredTable[2][MAX_NUM_REF][3]; // [REF_PIC_LIST_0 or REF_PIC_LIST_1][refIdx][0:Y, 1:U, 2:V] |
---|
[56] | 2018 | wpACDCParam m_weightACDCParam[3]; // [0:Y, 1:U, 2:V] |
---|
| 2019 | |
---|
[608] | 2020 | std::vector<UInt> m_tileByteLocation; |
---|
[56] | 2021 | UInt m_uiTileOffstForMultES; |
---|
| 2022 | |
---|
| 2023 | UInt* m_puiSubstreamSizes; |
---|
| 2024 | TComScalingList* m_scalingList; //!< pointer of quantization matrix |
---|
| 2025 | Bool m_cabacInitFlag; |
---|
[5] | 2026 | |
---|
[56] | 2027 | Bool m_bLMvdL1Zero; |
---|
| 2028 | Int m_numEntryPointOffsets; |
---|
[608] | 2029 | Bool m_temporalLayerNonReferenceFlag; |
---|
| 2030 | Bool m_LFCrossSliceBoundaryFlag; |
---|
[56] | 2031 | |
---|
[608] | 2032 | Bool m_enableTMVPFlag; |
---|
| 2033 | #if H_MV |
---|
[622] | 2034 | std::vector<TComPic*>* m_refPicSetInterLayer0; |
---|
| 2035 | std::vector<TComPic*>* m_refPicSetInterLayer1; |
---|
| 2036 | Int m_layerId; |
---|
| 2037 | Int m_viewId; |
---|
| 2038 | Int m_viewIndex; |
---|
| 2039 | #if H_3D |
---|
| 2040 | Bool m_isDepth; |
---|
| 2041 | #endif |
---|
[56] | 2042 | |
---|
[608] | 2043 | // Additional slice header syntax elements |
---|
[622] | 2044 | Bool m_pocResetFlag; |
---|
[738] | 2045 | Bool m_crossLayerBlaFlag; |
---|
[608] | 2046 | Bool m_discardableFlag; |
---|
| 2047 | Bool m_interLayerPredEnabledFlag; |
---|
| 2048 | Int m_numInterLayerRefPicsMinus1; |
---|
| 2049 | Int m_interLayerPredLayerIdc [MAX_NUM_LAYERS]; |
---|
| 2050 | Int m_aaiCodedScale [2][MAX_NUM_LAYERS]; |
---|
| 2051 | Int m_aaiCodedOffset[2][MAX_NUM_LAYERS]; |
---|
| 2052 | #if H_3D_TMVP |
---|
| 2053 | Int m_aiAlterRefIdx [2]; |
---|
[189] | 2054 | #endif |
---|
[608] | 2055 | #if H_3D_ARP |
---|
[724] | 2056 | Bool m_arpRefPicAvailable[2][MAX_NUM_LAYERS]; |
---|
[608] | 2057 | TComList<TComPic*> * m_pBaseViewRefPicList[MAX_NUM_LAYERS]; |
---|
[443] | 2058 | UInt m_nARPStepNum; |
---|
[724] | 2059 | Int m_aiFirstTRefIdx [2]; |
---|
[443] | 2060 | #endif |
---|
[608] | 2061 | #if H_3D_IC |
---|
| 2062 | Bool m_bApplyIC; |
---|
| 2063 | Bool m_icSkipParseFlag; |
---|
[296] | 2064 | #endif |
---|
[608] | 2065 | #if H_3D |
---|
| 2066 | TComPic* m_ivPicsCurrPoc [2][MAX_NUM_LAYERS]; |
---|
| 2067 | Int** m_depthToDisparityB; |
---|
| 2068 | Int** m_depthToDisparityF; |
---|
[443] | 2069 | #endif |
---|
[296] | 2070 | #endif |
---|
[833] | 2071 | |
---|
| 2072 | #if MTK_DDD_G0063 |
---|
| 2073 | Int m_aiDDDInvScale [MAX_NUM_LAYERS]; |
---|
| 2074 | Int m_aiDDDInvOffset[MAX_NUM_LAYERS]; |
---|
| 2075 | UInt m_aiDDDShift [MAX_NUM_LAYERS]; |
---|
| 2076 | #endif |
---|
| 2077 | |
---|
[2] | 2078 | public: |
---|
| 2079 | TComSlice(); |
---|
[608] | 2080 | virtual ~TComSlice(); |
---|
[2] | 2081 | Void initSlice (); |
---|
[5] | 2082 | |
---|
[77] | 2083 | Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } |
---|
| 2084 | TComVPS* getVPS () { return m_pcVPS; } |
---|
[2] | 2085 | Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
| 2086 | TComSPS* getSPS () { return m_pcSPS; } |
---|
[56] | 2087 | |
---|
| 2088 | Void setPPS ( TComPPS* pcPPS ) { assert(pcPPS!=NULL); m_pcPPS = pcPPS; m_iPPSId = pcPPS->getPPSId(); } |
---|
[2] | 2089 | TComPPS* getPPS () { return m_pcPPS; } |
---|
[5] | 2090 | |
---|
[56] | 2091 | #if ADAPTIVE_QP_SELECTION |
---|
| 2092 | Void setTrQuant ( TComTrQuant* pcTrQuant ) { m_pcTrQuant = pcTrQuant; } |
---|
| 2093 | TComTrQuant* getTrQuant () { return m_pcTrQuant; } |
---|
| 2094 | #endif |
---|
| 2095 | |
---|
| 2096 | Void setPPSId ( Int PPSId ) { m_iPPSId = PPSId; } |
---|
| 2097 | Int getPPSId () { return m_iPPSId; } |
---|
| 2098 | Void setPicOutputFlag( Bool b ) { m_PicOutputFlag = b; } |
---|
| 2099 | Bool getPicOutputFlag() { return m_PicOutputFlag; } |
---|
| 2100 | Void setSaoEnabledFlag(Bool s) {m_saoEnabledFlag =s; } |
---|
| 2101 | Bool getSaoEnabledFlag() { return m_saoEnabledFlag; } |
---|
[443] | 2102 | Void setSaoEnabledFlagChroma(Bool s) {m_saoEnabledFlagChroma =s; } //!< set SAO Cb&Cr enabled flag |
---|
| 2103 | Bool getSaoEnabledFlagChroma() { return m_saoEnabledFlagChroma; } //!< get SAO Cb&Cr enabled flag |
---|
[56] | 2104 | Void setRPS ( TComReferencePictureSet *pcRPS ) { m_pcRPS = pcRPS; } |
---|
| 2105 | TComReferencePictureSet* getRPS () { return m_pcRPS; } |
---|
| 2106 | TComReferencePictureSet* getLocalRPS () { return &m_LocalRPS; } |
---|
| 2107 | |
---|
| 2108 | Void setRPSidx ( Int iBDidx ) { m_iBDidx = iBDidx; } |
---|
| 2109 | Int getRPSidx () { return m_iBDidx; } |
---|
[655] | 2110 | Int getPrevTid0POC () { return m_prevTid0POC; } |
---|
[56] | 2111 | TComRefPicListModification* getRefPicListModification() { return &m_RefPicListModification; } |
---|
| 2112 | Void setLastIDR(Int iIDRPOC) { m_iLastIDR = iIDRPOC; } |
---|
| 2113 | Int getLastIDR() { return m_iLastIDR; } |
---|
[655] | 2114 | Void setAssociatedIRAPPOC(Int iAssociatedIRAPPOC) { m_iAssociatedIRAP = iAssociatedIRAPPOC; } |
---|
| 2115 | Int getAssociatedIRAPPOC() { return m_iAssociatedIRAP; } |
---|
| 2116 | Void setAssociatedIRAPType(NalUnitType associatedIRAPType) { m_iAssociatedIRAPType = associatedIRAPType; } |
---|
| 2117 | NalUnitType getAssociatedIRAPType() { return m_iAssociatedIRAPType; } |
---|
[2] | 2118 | SliceType getSliceType () { return m_eSliceType; } |
---|
| 2119 | Int getPOC () { return m_iPOC; } |
---|
[56] | 2120 | Int getSliceQp () { return m_iSliceQp; } |
---|
[608] | 2121 | Bool getDependentSliceSegmentFlag() const { return m_dependentSliceSegmentFlag; } |
---|
| 2122 | void setDependentSliceSegmentFlag(Bool val) { m_dependentSliceSegmentFlag = val; } |
---|
[56] | 2123 | #if ADAPTIVE_QP_SELECTION |
---|
| 2124 | Int getSliceQpBase () { return m_iSliceQpBase; } |
---|
[21] | 2125 | #endif |
---|
[2] | 2126 | Int getSliceQpDelta () { return m_iSliceQpDelta; } |
---|
[608] | 2127 | Int getSliceQpDeltaCb () { return m_iSliceQpDeltaCb; } |
---|
| 2128 | Int getSliceQpDeltaCr () { return m_iSliceQpDeltaCr; } |
---|
| 2129 | Bool getDeblockingFilterDisable() { return m_deblockingFilterDisable; } |
---|
| 2130 | Bool getDeblockingFilterOverrideFlag() { return m_deblockingFilterOverrideFlag; } |
---|
| 2131 | Int getDeblockingFilterBetaOffsetDiv2() { return m_deblockingFilterBetaOffsetDiv2; } |
---|
| 2132 | Int getDeblockingFilterTcOffsetDiv2() { return m_deblockingFilterTcOffsetDiv2; } |
---|
[56] | 2133 | |
---|
[2] | 2134 | Int getNumRefIdx ( RefPicList e ) { return m_aiNumRefIdx[e]; } |
---|
| 2135 | TComPic* getPic () { return m_pcPic; } |
---|
| 2136 | TComPic* getRefPic ( RefPicList e, Int iRefIdx) { return m_apcRefPicList[e][iRefIdx]; } |
---|
| 2137 | Int getRefPOC ( RefPicList e, Int iRefIdx) { return m_aiRefPOCList[e][iRefIdx]; } |
---|
[608] | 2138 | #if H_3D |
---|
| 2139 | TComPic* getIvPic ( Bool depthFlag, Int viewIndex){ return m_ivPicsCurrPoc[ depthFlag ? 1 : 0 ][ viewIndex ]; } |
---|
| 2140 | #endif |
---|
[622] | 2141 | #if H_3D |
---|
[608] | 2142 | TComPic* getTexturePic () { return m_ivPicsCurrPoc[0][ m_viewIndex ]; } |
---|
| 2143 | #endif |
---|
| 2144 | #if H_3D_IC |
---|
| 2145 | Void setApplyIC( Bool b ) { m_bApplyIC = b; } |
---|
| 2146 | Bool getApplyIC() { return m_bApplyIC; } |
---|
| 2147 | Void xSetApplyIC(); |
---|
| 2148 | Void setIcSkipParseFlag( Bool b ) { m_icSkipParseFlag = b; } |
---|
| 2149 | Bool getIcSkipParseFlag() { return m_icSkipParseFlag; } |
---|
| 2150 | #endif |
---|
| 2151 | #if H_3D_ARP |
---|
| 2152 | Void setBaseViewRefPicList( TComList<TComPic*> *pListPic, Int iViewIdx ) { m_pBaseViewRefPicList[iViewIdx] = pListPic; } |
---|
[724] | 2153 | Void setARPStepNum( TComPicLists*ivPicLists ); |
---|
[608] | 2154 | TComPic* getBaseViewRefPic ( UInt uiPOC , Int iViewIdx ) { return xGetRefPic( *m_pBaseViewRefPicList[iViewIdx], uiPOC ); } |
---|
| 2155 | UInt getARPStepNum( ) { return m_nARPStepNum; } |
---|
| 2156 | #endif |
---|
[2] | 2157 | Int getDepth () { return m_iDepth; } |
---|
[608] | 2158 | UInt getColFromL0Flag () { return m_colFromL0Flag; } |
---|
| 2159 | UInt getColRefIdx () { return m_colRefIdx; } |
---|
[56] | 2160 | Void checkColRefIdx (UInt curSliceIdx, TComPic* pic); |
---|
[608] | 2161 | Bool getIsUsedAsLongTerm (Int i, Int j) { return m_bIsUsedAsLongTerm[i][j]; } |
---|
[655] | 2162 | Void setIsUsedAsLongTerm (Int i, Int j, Bool value) { m_bIsUsedAsLongTerm[i][j] = value; } |
---|
[56] | 2163 | Bool getCheckLDC () { return m_bCheckLDC; } |
---|
| 2164 | Bool getMvdL1ZeroFlag () { return m_bLMvdL1Zero; } |
---|
[608] | 2165 | Int getNumRpsCurrTempList(); |
---|
| 2166 | Int getList1IdxToList0Idx ( Int list1Idx ) { return m_list1IdxToList0Idx[list1Idx]; } |
---|
[2] | 2167 | Void setReferenced(Bool b) { m_bRefenced = b; } |
---|
| 2168 | Bool isReferenced() { return m_bRefenced; } |
---|
[655] | 2169 | Bool isReferenceNalu() { return ((getNalUnitType() <= NAL_UNIT_RESERVED_VCL_R15) && (getNalUnitType()%2 != 0)) || ((getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP) && (getNalUnitType() <= NAL_UNIT_RESERVED_IRAP_VCL23) ); } |
---|
| 2170 | Void setPOC ( Int i ) { m_iPOC = i; if ((getTLayer()==0) && (isReferenceNalu() && (getNalUnitType()!=NAL_UNIT_CODED_SLICE_RASL_R)&& (getNalUnitType()!=NAL_UNIT_CODED_SLICE_RADL_R))) {m_prevTid0POC=i;} } |
---|
[2] | 2171 | Void setNalUnitType ( NalUnitType e ) { m_eNalUnitType = e; } |
---|
[608] | 2172 | NalUnitType getNalUnitType () const { return m_eNalUnitType; } |
---|
| 2173 | Bool getRapPicFlag (); |
---|
| 2174 | Bool getIdrPicFlag () { return getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP; } |
---|
| 2175 | Bool isIRAP () const { return (getNalUnitType() >= 16) && (getNalUnitType() <= 23); } |
---|
[655] | 2176 | Void checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, NalUnitType& associatedIRAPType, TComList<TComPic *>& rcListPic); |
---|
[56] | 2177 | Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic); |
---|
[2] | 2178 | Void setSliceType ( SliceType e ) { m_eSliceType = e; } |
---|
| 2179 | Void setSliceQp ( Int i ) { m_iSliceQp = i; } |
---|
[56] | 2180 | #if ADAPTIVE_QP_SELECTION |
---|
| 2181 | Void setSliceQpBase ( Int i ) { m_iSliceQpBase = i; } |
---|
| 2182 | #endif |
---|
[2] | 2183 | Void setSliceQpDelta ( Int i ) { m_iSliceQpDelta = i; } |
---|
[608] | 2184 | Void setSliceQpDeltaCb ( Int i ) { m_iSliceQpDeltaCb = i; } |
---|
| 2185 | Void setSliceQpDeltaCr ( Int i ) { m_iSliceQpDeltaCr = i; } |
---|
| 2186 | Void setDeblockingFilterDisable( Bool b ) { m_deblockingFilterDisable= b; } |
---|
| 2187 | Void setDeblockingFilterOverrideFlag( Bool b ) { m_deblockingFilterOverrideFlag = b; } |
---|
| 2188 | Void setDeblockingFilterBetaOffsetDiv2( Int i ) { m_deblockingFilterBetaOffsetDiv2 = i; } |
---|
| 2189 | Void setDeblockingFilterTcOffsetDiv2( Int i ) { m_deblockingFilterTcOffsetDiv2 = i; } |
---|
[56] | 2190 | |
---|
[2] | 2191 | Void setRefPic ( TComPic* p, RefPicList e, Int iRefIdx ) { m_apcRefPicList[e][iRefIdx] = p; } |
---|
| 2192 | Void setRefPOC ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefPOCList[e][iRefIdx] = i; } |
---|
| 2193 | Void setNumRefIdx ( RefPicList e, Int i ) { m_aiNumRefIdx[e] = i; } |
---|
| 2194 | Void setPic ( TComPic* p ) { m_pcPic = p; } |
---|
| 2195 | Void setDepth ( Int iDepth ) { m_iDepth = iDepth; } |
---|
[56] | 2196 | |
---|
[608] | 2197 | #if H_MV |
---|
[622] | 2198 | Void setPocBeforeReset ( Int i ) { m_iPOCBeforeReset = i; } |
---|
| 2199 | Int getPocBeforeReset ( ) { return m_iPOCBeforeReset; } |
---|
[608] | 2200 | Int getRefLayerId ( RefPicList e, Int iRefIdx) { return m_aiRefLayerIdList[e][iRefIdx]; } |
---|
| 2201 | Void setRefLayerId ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefLayerIdList[e][iRefIdx] = i; } |
---|
[622] | 2202 | Void getTempRefPicLists ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1, |
---|
| 2203 | std::vector<TComPic*> rpsCurrList[2], std::vector<Bool> usedAsLongTerm[2], Int& numPocTotalCurr, Bool checkNumPocTotalCurr = false ); |
---|
| 2204 | |
---|
| 2205 | Void setRefPicList ( std::vector<TComPic*> rpsCurrList[2], std::vector<Bool> usedAsLongTerm[2], Int numPocTotalCurr, Bool checkNumPocTotalCurr = false ); |
---|
| 2206 | #else |
---|
[608] | 2207 | #if FIX1071 |
---|
| 2208 | Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false ); |
---|
| 2209 | #else |
---|
| 2210 | Void setRefPicList ( TComList<TComPic*>& rcListPic ); |
---|
| 2211 | #endif |
---|
| 2212 | #endif |
---|
| 2213 | Void setRefPOCList (); |
---|
| 2214 | Void setColFromL0Flag ( UInt colFromL0 ) { m_colFromL0Flag = colFromL0; } |
---|
[56] | 2215 | Void setColRefIdx ( UInt refIdx) { m_colRefIdx = refIdx; } |
---|
| 2216 | Void setCheckLDC ( Bool b ) { m_bCheckLDC = b; } |
---|
| 2217 | Void setMvdL1ZeroFlag ( Bool b) { m_bLMvdL1Zero = b; } |
---|
[5] | 2218 | |
---|
[2] | 2219 | Bool isIntra () { return m_eSliceType == I_SLICE; } |
---|
| 2220 | Bool isInterB () { return m_eSliceType == B_SLICE; } |
---|
| 2221 | Bool isInterP () { return m_eSliceType == P_SLICE; } |
---|
[56] | 2222 | |
---|
[608] | 2223 | #if SAO_CHROMA_LAMBDA |
---|
[56] | 2224 | Void setLambda( Double d, Double e ) { m_dLambdaLuma = d; m_dLambdaChroma = e;} |
---|
| 2225 | Double getLambdaLuma() { return m_dLambdaLuma; } |
---|
| 2226 | Double getLambdaChroma() { return m_dLambdaChroma; } |
---|
| 2227 | #else |
---|
[2] | 2228 | Void setLambda( Double d ) { m_dLambda = d; } |
---|
| 2229 | Double getLambda() { return m_dLambda; } |
---|
[42] | 2230 | #endif |
---|
[56] | 2231 | |
---|
[2] | 2232 | Void initEqualRef(); |
---|
| 2233 | Bool isEqualRef ( RefPicList e, Int iRefIdx1, Int iRefIdx2 ) |
---|
| 2234 | { |
---|
| 2235 | if (iRefIdx1 < 0 || iRefIdx2 < 0) return false; |
---|
| 2236 | return m_abEqualRef[e][iRefIdx1][iRefIdx2]; |
---|
| 2237 | } |
---|
[56] | 2238 | |
---|
[2] | 2239 | Void setEqualRef( RefPicList e, Int iRefIdx1, Int iRefIdx2, Bool b) |
---|
| 2240 | { |
---|
| 2241 | m_abEqualRef[e][iRefIdx1][iRefIdx2] = m_abEqualRef[e][iRefIdx2][iRefIdx1] = b; |
---|
| 2242 | } |
---|
[56] | 2243 | |
---|
[2] | 2244 | static Void sortPicList ( TComList<TComPic*>& rcListPic ); |
---|
[608] | 2245 | Void setList1IdxToList0Idx(); |
---|
[56] | 2246 | |
---|
| 2247 | UInt getTLayer () { return m_uiTLayer; } |
---|
| 2248 | Void setTLayer ( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } |
---|
| 2249 | |
---|
| 2250 | Void setTLayerInfo( UInt uiTLayer ); |
---|
| 2251 | Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum ); |
---|
[655] | 2252 | Void checkLeadingPictureRestrictions( TComList<TComPic*>& rcListPic ); |
---|
[56] | 2253 | Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList); |
---|
[608] | 2254 | #if H_MV |
---|
[622] | 2255 | Void createInterLayerReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1 ); |
---|
| 2256 | static Void markIvRefPicsAsShortTerm ( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 ); |
---|
[608] | 2257 | static Void markCurrPic ( TComPic* currPic );; |
---|
| 2258 | static Void markIvRefPicsAsUnused ( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc ); |
---|
[622] | 2259 | Void printRefPicList(); |
---|
[2] | 2260 | #endif |
---|
[608] | 2261 | Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); |
---|
| 2262 | Bool isStepwiseTemporalLayerSwitchingPointCandidate( TComList<TComPic*>& rcListPic ); |
---|
| 2263 | Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0); |
---|
| 2264 | #if FIX1071 |
---|
| 2265 | Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP); |
---|
| 2266 | #else |
---|
[56] | 2267 | Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet); |
---|
[608] | 2268 | #endif |
---|
[56] | 2269 | |
---|
[608] | 2270 | Void setMaxNumMergeCand (UInt val ) { m_maxNumMergeCand = val; } |
---|
| 2271 | UInt getMaxNumMergeCand () { return m_maxNumMergeCand; } |
---|
[56] | 2272 | |
---|
[608] | 2273 | Void setSliceMode ( UInt uiMode ) { m_sliceMode = uiMode; } |
---|
| 2274 | UInt getSliceMode () { return m_sliceMode; } |
---|
| 2275 | Void setSliceArgument ( UInt uiArgument ) { m_sliceArgument = uiArgument; } |
---|
| 2276 | UInt getSliceArgument () { return m_sliceArgument; } |
---|
| 2277 | Void setSliceCurStartCUAddr ( UInt uiAddr ) { m_sliceCurStartCUAddr = uiAddr; } |
---|
| 2278 | UInt getSliceCurStartCUAddr () { return m_sliceCurStartCUAddr; } |
---|
| 2279 | Void setSliceCurEndCUAddr ( UInt uiAddr ) { m_sliceCurEndCUAddr = uiAddr; } |
---|
| 2280 | UInt getSliceCurEndCUAddr () { return m_sliceCurEndCUAddr; } |
---|
| 2281 | Void setSliceIdx ( UInt i) { m_sliceIdx = i; } |
---|
| 2282 | UInt getSliceIdx () { return m_sliceIdx; } |
---|
[2] | 2283 | Void copySliceInfo (TComSlice *pcSliceSrc); |
---|
[608] | 2284 | Void setSliceSegmentMode ( UInt uiMode ) { m_sliceSegmentMode = uiMode; } |
---|
| 2285 | UInt getSliceSegmentMode () { return m_sliceSegmentMode; } |
---|
| 2286 | Void setSliceSegmentArgument ( UInt uiArgument ) { m_sliceSegmentArgument = uiArgument; } |
---|
| 2287 | UInt getSliceSegmentArgument () { return m_sliceSegmentArgument; } |
---|
| 2288 | Void setSliceSegmentCurStartCUAddr ( UInt uiAddr ) { m_sliceSegmentCurStartCUAddr = uiAddr; } |
---|
| 2289 | UInt getSliceSegmentCurStartCUAddr () { return m_sliceSegmentCurStartCUAddr; } |
---|
| 2290 | Void setSliceSegmentCurEndCUAddr ( UInt uiAddr ) { m_sliceSegmentCurEndCUAddr = uiAddr; } |
---|
| 2291 | UInt getSliceSegmentCurEndCUAddr () { return m_sliceSegmentCurEndCUAddr; } |
---|
| 2292 | Void setNextSlice ( Bool b ) { m_nextSlice = b; } |
---|
| 2293 | Bool isNextSlice () { return m_nextSlice; } |
---|
| 2294 | Void setNextSliceSegment ( Bool b ) { m_nextSliceSegment = b; } |
---|
| 2295 | Bool isNextSliceSegment () { return m_nextSliceSegment; } |
---|
| 2296 | Void setSliceBits ( UInt uiVal ) { m_sliceBits = uiVal; } |
---|
| 2297 | UInt getSliceBits () { return m_sliceBits; } |
---|
| 2298 | Void setSliceSegmentBits ( UInt uiVal ) { m_sliceSegmentBits = uiVal; } |
---|
| 2299 | UInt getSliceSegmentBits () { return m_sliceSegmentBits; } |
---|
[56] | 2300 | Void setFinalized ( Bool uiVal ) { m_bFinalized = uiVal; } |
---|
| 2301 | Bool getFinalized () { return m_bFinalized; } |
---|
| 2302 | Void setWpScaling ( wpScalingParam wp[2][MAX_NUM_REF][3] ) { memcpy(m_weightPredTable, wp, sizeof(wpScalingParam)*2*MAX_NUM_REF*3); } |
---|
| 2303 | Void getWpScaling ( RefPicList e, Int iRefIdx, wpScalingParam *&wp); |
---|
[5] | 2304 | |
---|
[608] | 2305 | Void resetWpScaling (); |
---|
[56] | 2306 | Void initWpScaling (); |
---|
[608] | 2307 | inline Bool applyWP () { return( (m_eSliceType==P_SLICE && m_pcPPS->getUseWP()) || (m_eSliceType==B_SLICE && m_pcPPS->getWPBiPred()) ); } |
---|
| 2308 | |
---|
[56] | 2309 | Void setWpAcDcParam ( wpACDCParam wp[3] ) { memcpy(m_weightACDCParam, wp, sizeof(wpACDCParam)*3); } |
---|
| 2310 | Void getWpAcDcParam ( wpACDCParam *&wp ); |
---|
| 2311 | Void initWpAcDcParam (); |
---|
[608] | 2312 | |
---|
| 2313 | Void setTileLocationCount ( UInt cnt ) { return m_tileByteLocation.resize(cnt); } |
---|
| 2314 | UInt getTileLocationCount () { return (UInt) m_tileByteLocation.size(); } |
---|
| 2315 | Void setTileLocation ( Int idx, UInt location ) { assert (idx<m_tileByteLocation.size()); |
---|
| 2316 | m_tileByteLocation[idx] = location; } |
---|
| 2317 | Void addTileLocation ( UInt location ) { m_tileByteLocation.push_back(location); } |
---|
| 2318 | UInt getTileLocation ( Int idx ) { return m_tileByteLocation[idx]; } |
---|
| 2319 | |
---|
[56] | 2320 | Void setTileOffstForMultES (UInt uiOffset ) { m_uiTileOffstForMultES = uiOffset; } |
---|
| 2321 | UInt getTileOffstForMultES () { return m_uiTileOffstForMultES; } |
---|
| 2322 | Void allocSubstreamSizes ( UInt uiNumSubstreams ); |
---|
| 2323 | UInt* getSubstreamSizes () { return m_puiSubstreamSizes; } |
---|
| 2324 | Void setScalingList ( TComScalingList* scalingList ) { m_scalingList = scalingList; } |
---|
| 2325 | TComScalingList* getScalingList () { return m_scalingList; } |
---|
| 2326 | Void setDefaultScalingList (); |
---|
| 2327 | Bool checkDefaultScalingList (); |
---|
| 2328 | Void setCabacInitFlag ( Bool val ) { m_cabacInitFlag = val; } //!< set CABAC initial flag |
---|
| 2329 | Bool getCabacInitFlag () { return m_cabacInitFlag; } //!< get CABAC initial flag |
---|
| 2330 | Void setNumEntryPointOffsets(Int val) { m_numEntryPointOffsets = val; } |
---|
| 2331 | Int getNumEntryPointOffsets() { return m_numEntryPointOffsets; } |
---|
[608] | 2332 | Bool getTemporalLayerNonReferenceFlag() { return m_temporalLayerNonReferenceFlag;} |
---|
| 2333 | Void setTemporalLayerNonReferenceFlag(Bool x) { m_temporalLayerNonReferenceFlag = x;} |
---|
| 2334 | Void setLFCrossSliceBoundaryFlag ( Bool val ) { m_LFCrossSliceBoundaryFlag = val; } |
---|
| 2335 | Bool getLFCrossSliceBoundaryFlag () { return m_LFCrossSliceBoundaryFlag;} |
---|
[56] | 2336 | |
---|
[608] | 2337 | Void setEnableTMVPFlag ( Bool b ) { m_enableTMVPFlag = b; } |
---|
| 2338 | Bool getEnableTMVPFlag () { return m_enableTMVPFlag;} |
---|
| 2339 | |
---|
| 2340 | #if H_MV |
---|
| 2341 | Void setLayerId ( Int layerId ) { m_layerId = layerId; } |
---|
| 2342 | Int getLayerId () { return m_layerId; } |
---|
| 2343 | Int getLayerIdInVps () { return getVPS()->getLayerIdInVps( m_layerId ); }; |
---|
| 2344 | Void setViewId ( Int viewId ) { m_viewId = viewId; } |
---|
| 2345 | Int getViewId () { return m_viewId; } |
---|
[622] | 2346 | Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } |
---|
| 2347 | Int getViewIndex () { return m_viewIndex; } |
---|
[608] | 2348 | #if H_3D |
---|
| 2349 | #if H_3D_TMVP |
---|
| 2350 | Void generateAlterRefforTMVP (); |
---|
| 2351 | Void setAlterRefIdx ( RefPicList e, Int i ) { m_aiAlterRefIdx[e] = i; } |
---|
| 2352 | Int getAlterRefIdx ( RefPicList e ) { return m_aiAlterRefIdx[e]; } |
---|
[210] | 2353 | #endif |
---|
[773] | 2354 | #if H_3D_ARP |
---|
[724] | 2355 | Int getFirstTRefIdx ( RefPicList e ) { return m_aiFirstTRefIdx[e]; } |
---|
| 2356 | Void setFirstTRefIdx ( RefPicList e, Int i ) { m_aiFirstTRefIdx[e] = i; } |
---|
| 2357 | Bool getArpRefPicAvailable( RefPicList e, Int viewIdx) {return m_arpRefPicAvailable[e][getVPS()->getLayerIdInNuh(viewIdx, 0)]; } |
---|
| 2358 | #endif |
---|
[608] | 2359 | Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } |
---|
| 2360 | Bool getIsDepth () { return m_isDepth; } |
---|
| 2361 | Void setCamparaSlice ( Int** aaiScale = 0, Int** aaiOffset = 0 ); |
---|
[2] | 2362 | Int* getCodedScale () { return m_aaiCodedScale [0]; } |
---|
| 2363 | Int* getCodedOffset () { return m_aaiCodedOffset[0]; } |
---|
| 2364 | Int* getInvCodedScale () { return m_aaiCodedScale [1]; } |
---|
| 2365 | Int* getInvCodedOffset () { return m_aaiCodedOffset[1]; } |
---|
[189] | 2366 | #endif |
---|
[443] | 2367 | #endif |
---|
[608] | 2368 | #if H_3D |
---|
| 2369 | Void setIvPicLists( TComPicLists* m_ivPicLists ); |
---|
| 2370 | Void setDepthToDisparityLUTs(); |
---|
[189] | 2371 | |
---|
[608] | 2372 | Int* getDepthToDisparityB( Int refViewIdx ) { return m_depthToDisparityB[ refViewIdx ]; }; |
---|
| 2373 | Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ refViewIdx ]; }; |
---|
| 2374 | Bool getVpsDepthModesFlag () { return getVPS()->getVpsDepthModesFlag( getVPS()->getLayerIdInVps( m_layerId ) ); } |
---|
| 2375 | |
---|
[296] | 2376 | #endif |
---|
[608] | 2377 | #if H_MV |
---|
| 2378 | // Additional slice header syntax elements |
---|
[622] | 2379 | |
---|
[738] | 2380 | Void setCrossLayerBlaFlag( Bool flag ) { m_crossLayerBlaFlag = flag; } |
---|
| 2381 | Bool getCrossLayerBlaFlag( ) { return m_crossLayerBlaFlag; } |
---|
| 2382 | Void checkCrossLayerBlaFlag ( ) |
---|
| 2383 | { |
---|
| 2384 | // cross_layer_bla_flag shall be equal to 0 for pictures with nal_unit_type not equal to IDR_W_RADL or IDR_N_LP or with nuh_layer_id not equal to 0. |
---|
| 2385 | if ( getLayerId() != 0 || getNalUnitType() != NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP ) |
---|
| 2386 | { |
---|
| 2387 | assert( m_crossLayerBlaFlag == 0 ); |
---|
| 2388 | } |
---|
| 2389 | } |
---|
| 2390 | |
---|
[622] | 2391 | Void setPocResetFlag( Bool flag ) { m_pocResetFlag = flag; } |
---|
| 2392 | Bool getPocResetFlag( ) { return m_pocResetFlag; } |
---|
| 2393 | |
---|
[773] | 2394 | Void setDiscardableFlag( Bool flag ) { m_discardableFlag = flag; } |
---|
| 2395 | Bool getDiscardableFlag( ) { return m_discardableFlag; } |
---|
[296] | 2396 | |
---|
[773] | 2397 | Void setInterLayerPredEnabledFlag( Bool flag ) { m_interLayerPredEnabledFlag = flag; } |
---|
| 2398 | Bool getInterLayerPredEnabledFlag( ) { return m_interLayerPredEnabledFlag; } |
---|
[608] | 2399 | |
---|
[773] | 2400 | Void setNumInterLayerRefPicsMinus1( Int val ) { m_numInterLayerRefPicsMinus1 = val; } |
---|
| 2401 | Int getNumInterLayerRefPicsMinus1( ) { return m_numInterLayerRefPicsMinus1; } |
---|
[608] | 2402 | |
---|
[773] | 2403 | Void setInterLayerPredLayerIdc( Int i, Int val ) { m_interLayerPredLayerIdc[i] = val; } |
---|
| 2404 | Int getInterLayerPredLayerIdc( Int i ) { return m_interLayerPredLayerIdc[i]; } |
---|
[608] | 2405 | |
---|
[622] | 2406 | // Additional variables derived in slice header semantics |
---|
| 2407 | Int getNumInterLayerRefPicsMinus1Len( ) { return gCeilLog2( getVPS()->getNumDirectRefLayers( getLayerId() )); } |
---|
| 2408 | Int getInterLayerPredLayerIdcLen ( ) { return gCeilLog2( getVPS()->getNumDirectRefLayers( getLayerId() )); } |
---|
| 2409 | |
---|
[738] | 2410 | Int getRefLayerPicFlag( Int i ); |
---|
| 2411 | Int getRefLayerPicIdc ( Int j ); |
---|
| 2412 | Int getNumRefLayerPics( ); |
---|
| 2413 | |
---|
[622] | 2414 | Int getNumActiveRefLayerPics( ); |
---|
| 2415 | |
---|
| 2416 | Int getNumActiveRefLayerPics0( ) { return (Int) m_refPicSetInterLayer0->size(); }; |
---|
| 2417 | Int getNumActiveRefLayerPics1( ) { return (Int) m_refPicSetInterLayer1->size(); }; |
---|
| 2418 | |
---|
| 2419 | Int getRefPicLayerId ( Int i ); |
---|
| 2420 | |
---|
| 2421 | Void setRefPicSetInterLayer ( std::vector<TComPic*>* refPicSetInterLayer0, std::vector<TComPic*>* refPicSetInterLayer1); |
---|
| 2422 | TComPic* getPicFromRefPicSetInterLayer( Int setIdc, Int layerId ); |
---|
[443] | 2423 | #endif |
---|
[833] | 2424 | |
---|
| 2425 | #if MTK_DDD_G0063 |
---|
| 2426 | Void InitializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx ); |
---|
| 2427 | Int getDepthFromDV( Int iDV, Int iBaseViewIdx ) |
---|
| 2428 | { |
---|
| 2429 | return ClipY(( iDV * m_aiDDDInvScale[ iBaseViewIdx ] + m_aiDDDInvOffset[ iBaseViewIdx ] ) >> m_aiDDDShift[ iBaseViewIdx ]); |
---|
| 2430 | } |
---|
| 2431 | #endif |
---|
| 2432 | |
---|
[56] | 2433 | protected: |
---|
[608] | 2434 | TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, |
---|
| 2435 | Int poc); |
---|
| 2436 | TComPic* xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb); |
---|
| 2437 | #if H_MV |
---|
| 2438 | TComPic* xGetInterLayerRefPic( std::vector<TComPic*>& rcListIlPic, Int layerId ); |
---|
| 2439 | #endif |
---|
[56] | 2440 | };// END CLASS DEFINITION TComSlice |
---|
[2] | 2441 | |
---|
[5] | 2442 | |
---|
[56] | 2443 | template <class T> class ParameterSetMap |
---|
| 2444 | { |
---|
| 2445 | public: |
---|
| 2446 | ParameterSetMap(Int maxId) |
---|
| 2447 | :m_maxId (maxId) |
---|
| 2448 | {} |
---|
[2] | 2449 | |
---|
[56] | 2450 | ~ParameterSetMap() |
---|
| 2451 | { |
---|
| 2452 | for (typename std::map<Int,T *>::iterator i = m_paramsetMap.begin(); i!= m_paramsetMap.end(); i++) |
---|
| 2453 | { |
---|
| 2454 | delete (*i).second; |
---|
| 2455 | } |
---|
| 2456 | } |
---|
| 2457 | |
---|
| 2458 | Void storePS(Int psId, T *ps) |
---|
| 2459 | { |
---|
| 2460 | assert ( psId < m_maxId ); |
---|
| 2461 | if ( m_paramsetMap.find(psId) != m_paramsetMap.end() ) |
---|
| 2462 | { |
---|
| 2463 | delete m_paramsetMap[psId]; |
---|
| 2464 | } |
---|
| 2465 | m_paramsetMap[psId] = ps; |
---|
| 2466 | } |
---|
| 2467 | |
---|
| 2468 | Void mergePSList(ParameterSetMap<T> &rPsList) |
---|
| 2469 | { |
---|
| 2470 | for (typename std::map<Int,T *>::iterator i = rPsList.m_paramsetMap.begin(); i!= rPsList.m_paramsetMap.end(); i++) |
---|
| 2471 | { |
---|
| 2472 | storePS(i->first, i->second); |
---|
| 2473 | } |
---|
| 2474 | rPsList.m_paramsetMap.clear(); |
---|
| 2475 | } |
---|
| 2476 | |
---|
| 2477 | |
---|
| 2478 | T* getPS(Int psId) |
---|
| 2479 | { |
---|
| 2480 | return ( m_paramsetMap.find(psId) == m_paramsetMap.end() ) ? NULL : m_paramsetMap[psId]; |
---|
| 2481 | } |
---|
| 2482 | |
---|
| 2483 | T* getFirstPS() |
---|
| 2484 | { |
---|
| 2485 | return (m_paramsetMap.begin() == m_paramsetMap.end() ) ? NULL : m_paramsetMap.begin()->second; |
---|
| 2486 | } |
---|
| 2487 | |
---|
| 2488 | private: |
---|
| 2489 | std::map<Int,T *> m_paramsetMap; |
---|
| 2490 | Int m_maxId; |
---|
| 2491 | }; |
---|
| 2492 | |
---|
| 2493 | class ParameterSetManager |
---|
| 2494 | { |
---|
| 2495 | public: |
---|
| 2496 | ParameterSetManager(); |
---|
| 2497 | virtual ~ParameterSetManager(); |
---|
[608] | 2498 | |
---|
| 2499 | //! store sequence parameter set and take ownership of it |
---|
[77] | 2500 | Void storeVPS(TComVPS *vps) { m_vpsMap.storePS( vps->getVPSId(), vps); }; |
---|
| 2501 | //! get pointer to existing video parameter set |
---|
| 2502 | TComVPS* getVPS(Int vpsId) { return m_vpsMap.getPS(vpsId); }; |
---|
| 2503 | TComVPS* getFirstVPS() { return m_vpsMap.getFirstPS(); }; |
---|
[608] | 2504 | |
---|
[56] | 2505 | //! store sequence parameter set and take ownership of it |
---|
| 2506 | Void storeSPS(TComSPS *sps) { m_spsMap.storePS( sps->getSPSId(), sps); }; |
---|
| 2507 | //! get pointer to existing sequence parameter set |
---|
| 2508 | TComSPS* getSPS(Int spsId) { return m_spsMap.getPS(spsId); }; |
---|
| 2509 | TComSPS* getFirstSPS() { return m_spsMap.getFirstPS(); }; |
---|
| 2510 | |
---|
| 2511 | //! store picture parameter set and take ownership of it |
---|
| 2512 | Void storePPS(TComPPS *pps) { m_ppsMap.storePS( pps->getPPSId(), pps); }; |
---|
| 2513 | //! get pointer to existing picture parameter set |
---|
| 2514 | TComPPS* getPPS(Int ppsId) { return m_ppsMap.getPS(ppsId); }; |
---|
| 2515 | TComPPS* getFirstPPS() { return m_ppsMap.getFirstPS(); }; |
---|
| 2516 | |
---|
[608] | 2517 | //! activate a SPS from a active parameter sets SEI message |
---|
| 2518 | //! \returns true, if activation is successful |
---|
[622] | 2519 | #if H_MV |
---|
| 2520 | Bool activateSPSWithSEI(Int SPSId, Int layerId ); |
---|
| 2521 | #else |
---|
| 2522 | Bool activateSPSWithSEI(Int SPSId); |
---|
| 2523 | #endif |
---|
| 2524 | |
---|
| 2525 | //! activate a PPS and depending on isIDR parameter also SPS and VPS |
---|
| 2526 | //! \returns true, if activation is successful |
---|
| 2527 | #if H_MV |
---|
| 2528 | Bool activatePPS(Int ppsId, Bool isIRAP, Int layerId ); |
---|
| 2529 | #else |
---|
| 2530 | Bool activatePPS(Int ppsId, Bool isIRAP); |
---|
| 2531 | #endif |
---|
| 2532 | |
---|
| 2533 | TComVPS* getActiveVPS(){ return m_vpsMap.getPS(m_activeVPSId); }; |
---|
| 2534 | #if H_MV |
---|
| 2535 | TComSPS* getActiveSPS( Int layerId ){ return m_spsMap.getPS( m_activeSPSId[ layerId ] ); }; |
---|
| 2536 | TComPPS* getActivePPS( Int layerId ){ return m_ppsMap.getPS( m_activePPSId[ layerId ] ); }; |
---|
| 2537 | #else |
---|
| 2538 | TComSPS* getActiveSPS(){ return m_spsMap.getPS(m_activeSPSId); }; |
---|
| 2539 | TComPPS* getActivePPS(){ return m_ppsMap.getPS(m_activePPSId); }; |
---|
| 2540 | #endif |
---|
| 2541 | protected: |
---|
| 2542 | |
---|
| 2543 | ParameterSetMap<TComVPS> m_vpsMap; |
---|
| 2544 | ParameterSetMap<TComSPS> m_spsMap; |
---|
| 2545 | ParameterSetMap<TComPPS> m_ppsMap; |
---|
| 2546 | |
---|
| 2547 | Int m_activeVPSId; |
---|
| 2548 | #if H_MV |
---|
| 2549 | Int m_activeSPSId[ MAX_NUM_LAYERS ]; |
---|
| 2550 | Int m_activePPSId[ MAX_NUM_LAYERS ]; |
---|
| 2551 | #else |
---|
| 2552 | Int m_activeSPSId; |
---|
| 2553 | Int m_activePPSId; |
---|
| 2554 | #endif |
---|
| 2555 | |
---|
[56] | 2556 | }; |
---|
[5] | 2557 | |
---|
[56] | 2558 | //! \} |
---|
[2] | 2559 | |
---|
| 2560 | #endif // __TCOMSLICE__ |
---|