[51] | 1 | /* The copyright in this software is being made available under the BSD |
---|
| 2 | * License, included below. This software may be subject to other third party |
---|
| 3 | * and contributor rights, including patent rights, and no such rights are |
---|
| 4 | * granted under this license. |
---|
| 5 | * |
---|
| 6 | * Copyright (c) 2010-2013, ITU/ISO/IEC |
---|
| 7 | * All rights reserved. |
---|
| 8 | * |
---|
| 9 | * Redistribution and use in source and binary forms, with or without |
---|
| 10 | * modification, are permitted provided that the following conditions are met: |
---|
| 11 | * |
---|
| 12 | * * Redistributions of source code must retain the above copyright notice, |
---|
| 13 | * this list of conditions and the following disclaimer. |
---|
| 14 | * * Redistributions in binary form must reproduce the above copyright notice, |
---|
| 15 | * this list of conditions and the following disclaimer in the documentation |
---|
| 16 | * and/or other materials provided with the distribution. |
---|
| 17 | * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may |
---|
| 18 | * be used to endorse or promote products derived from this software without |
---|
| 19 | * specific prior written permission. |
---|
| 20 | * |
---|
| 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
---|
| 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
| 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
| 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS |
---|
| 25 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
---|
| 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
---|
| 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
---|
| 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
---|
| 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
---|
| 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
---|
| 31 | * THE POSSIBILITY OF SUCH DAMAGE. |
---|
| 32 | */ |
---|
| 33 | |
---|
| 34 | /** \file TEncCfg.h |
---|
| 35 | \brief encoder configuration class (header) |
---|
| 36 | */ |
---|
| 37 | |
---|
| 38 | #ifndef __TENCCFG__ |
---|
| 39 | #define __TENCCFG__ |
---|
| 40 | |
---|
| 41 | #if _MSC_VER > 1000 |
---|
| 42 | #pragma once |
---|
| 43 | #endif // _MSC_VER > 1000 |
---|
| 44 | |
---|
| 45 | #include "TLibCommon/CommonDef.h" |
---|
| 46 | #include "TLibCommon/TComSlice.h" |
---|
| 47 | #include <assert.h> |
---|
| 48 | |
---|
| 49 | struct GOPEntry |
---|
| 50 | { |
---|
| 51 | Int m_POC; |
---|
| 52 | Int m_QPOffset; |
---|
| 53 | Double m_QPFactor; |
---|
| 54 | Int m_tcOffsetDiv2; |
---|
| 55 | Int m_betaOffsetDiv2; |
---|
| 56 | Int m_temporalId; |
---|
| 57 | Bool m_refPic; |
---|
| 58 | Int m_numRefPicsActive; |
---|
| 59 | Char m_sliceType; |
---|
| 60 | Int m_numRefPics; |
---|
| 61 | Int m_referencePics[MAX_NUM_REF_PICS]; |
---|
| 62 | Int m_usedByCurrPic[MAX_NUM_REF_PICS]; |
---|
| 63 | #if AUTO_INTER_RPS |
---|
| 64 | Int m_interRPSPrediction; |
---|
| 65 | #else |
---|
| 66 | Bool m_interRPSPrediction; |
---|
| 67 | #endif |
---|
| 68 | Int m_deltaRPS; |
---|
| 69 | Int m_numRefIdc; |
---|
| 70 | Int m_refIdc[MAX_NUM_REF_PICS+1]; |
---|
| 71 | GOPEntry() |
---|
| 72 | : m_POC(-1) |
---|
| 73 | , m_QPOffset(0) |
---|
| 74 | , m_QPFactor(0) |
---|
| 75 | , m_tcOffsetDiv2(0) |
---|
| 76 | , m_betaOffsetDiv2(0) |
---|
| 77 | , m_temporalId(0) |
---|
| 78 | , m_refPic(false) |
---|
| 79 | , m_numRefPicsActive(0) |
---|
| 80 | , m_sliceType('P') |
---|
| 81 | , m_numRefPics(0) |
---|
| 82 | , m_interRPSPrediction(false) |
---|
| 83 | , m_deltaRPS(0) |
---|
| 84 | , m_numRefIdc(0) |
---|
| 85 | { |
---|
| 86 | ::memset( m_referencePics, 0, sizeof(m_referencePics) ); |
---|
| 87 | ::memset( m_usedByCurrPic, 0, sizeof(m_usedByCurrPic) ); |
---|
| 88 | ::memset( m_refIdc, 0, sizeof(m_refIdc) ); |
---|
| 89 | } |
---|
| 90 | }; |
---|
| 91 | |
---|
| 92 | std::istringstream &operator>>(std::istringstream &in, GOPEntry &entry); //input |
---|
| 93 | //! \ingroup TLibEncoder |
---|
| 94 | //! \{ |
---|
| 95 | |
---|
| 96 | // ==================================================================================================================== |
---|
| 97 | // Class definition |
---|
| 98 | // ==================================================================================================================== |
---|
| 99 | |
---|
| 100 | /// encoder configuration class |
---|
| 101 | class TEncCfg |
---|
| 102 | { |
---|
| 103 | protected: |
---|
| 104 | //==== File I/O ======== |
---|
| 105 | Int m_iFrameRate; |
---|
| 106 | Int m_FrameSkip; |
---|
| 107 | Int m_iSourceWidth; |
---|
| 108 | Int m_iSourceHeight; |
---|
| 109 | Int m_conformanceMode; |
---|
| 110 | Window m_conformanceWindow; |
---|
| 111 | Int m_framesToBeEncoded; |
---|
| 112 | Double m_adLambdaModifier[ MAX_TLAYER ]; |
---|
| 113 | |
---|
| 114 | /* profile & level */ |
---|
| 115 | Profile::Name m_profile; |
---|
| 116 | Level::Tier m_levelTier; |
---|
| 117 | Level::Name m_level; |
---|
| 118 | #if L0046_CONSTRAINT_FLAGS |
---|
| 119 | Bool m_progressiveSourceFlag; |
---|
| 120 | Bool m_interlacedSourceFlag; |
---|
| 121 | Bool m_nonPackedConstraintFlag; |
---|
| 122 | Bool m_frameOnlyConstraintFlag; |
---|
| 123 | #endif |
---|
| 124 | |
---|
| 125 | //====== Coding Structure ======== |
---|
| 126 | UInt m_uiIntraPeriod; |
---|
| 127 | UInt m_uiDecodingRefreshType; ///< the type of decoding refresh employed for the random access. |
---|
| 128 | Int m_iGOPSize; |
---|
| 129 | GOPEntry m_GOPList[MAX_GOP]; |
---|
| 130 | Int m_extraRPSs; |
---|
| 131 | Int m_maxDecPicBuffering[MAX_TLAYER]; |
---|
| 132 | Int m_numReorderPics[MAX_TLAYER]; |
---|
| 133 | |
---|
| 134 | Int m_iQP; // if (AdaptiveQP == OFF) |
---|
| 135 | |
---|
| 136 | Int m_aiPad[2]; |
---|
| 137 | |
---|
| 138 | |
---|
| 139 | Int m_iMaxRefPicNum; ///< this is used to mimic the sliding mechanism used by the decoder |
---|
| 140 | // TODO: We need to have a common sliding mechanism used by both the encoder and decoder |
---|
| 141 | |
---|
| 142 | Int m_maxTempLayer; ///< Max temporal layer |
---|
| 143 | Bool m_useAMP; |
---|
[118] | 144 | #if VPS_EXTN_DIRECT_REF_LAYERS |
---|
| 145 | Int m_numDirectRefLayers; |
---|
| 146 | Int m_refLayerId[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 147 | #endif |
---|
[51] | 148 | //======= Transform ============= |
---|
| 149 | UInt m_uiQuadtreeTULog2MaxSize; |
---|
| 150 | UInt m_uiQuadtreeTULog2MinSize; |
---|
| 151 | UInt m_uiQuadtreeTUMaxDepthInter; |
---|
| 152 | UInt m_uiQuadtreeTUMaxDepthIntra; |
---|
| 153 | |
---|
| 154 | //====== Loop/Deblock Filter ======== |
---|
| 155 | Bool m_bLoopFilterDisable; |
---|
| 156 | Bool m_loopFilterOffsetInPPS; |
---|
| 157 | Int m_loopFilterBetaOffsetDiv2; |
---|
| 158 | Int m_loopFilterTcOffsetDiv2; |
---|
| 159 | Bool m_DeblockingFilterControlPresent; |
---|
| 160 | Bool m_bUseSAO; |
---|
| 161 | Int m_maxNumOffsetsPerPic; |
---|
| 162 | Bool m_saoLcuBoundary; |
---|
| 163 | Bool m_saoLcuBasedOptimization; |
---|
| 164 | |
---|
| 165 | //====== Lossless ======== |
---|
| 166 | Bool m_useLossless; |
---|
| 167 | //====== Motion search ======== |
---|
| 168 | Int m_iFastSearch; // 0:Full search 1:Diamond 2:PMVFAST |
---|
| 169 | Int m_iSearchRange; // 0:Full frame |
---|
| 170 | Int m_bipredSearchRange; |
---|
| 171 | |
---|
| 172 | //====== Quality control ======== |
---|
| 173 | Int m_iMaxDeltaQP; // Max. absolute delta QP (1:default) |
---|
| 174 | Int m_iMaxCuDQPDepth; // Max. depth for a minimum CuDQP (0:default) |
---|
| 175 | |
---|
| 176 | Int m_chromaCbQpOffset; // Chroma Cb QP Offset (0:default) |
---|
| 177 | Int m_chromaCrQpOffset; // Chroma Cr Qp Offset (0:default) |
---|
| 178 | |
---|
| 179 | #if ADAPTIVE_QP_SELECTION |
---|
| 180 | Bool m_bUseAdaptQpSelect; |
---|
| 181 | #endif |
---|
| 182 | |
---|
| 183 | Bool m_bUseAdaptiveQP; |
---|
| 184 | Int m_iQPAdaptationRange; |
---|
| 185 | |
---|
| 186 | //====== Tool list ======== |
---|
| 187 | Bool m_bUseSBACRD; |
---|
| 188 | Bool m_bUseASR; |
---|
| 189 | Bool m_bUseHADME; |
---|
| 190 | Bool m_bUseLComb; |
---|
| 191 | Bool m_useRDOQ; |
---|
| 192 | Bool m_useRDOQTS; |
---|
| 193 | #if L0232_RD_PENALTY |
---|
| 194 | UInt m_rdPenalty; |
---|
| 195 | #endif |
---|
| 196 | Bool m_bUseFastEnc; |
---|
| 197 | Bool m_bUseEarlyCU; |
---|
| 198 | Bool m_useFastDecisionForMerge; |
---|
| 199 | Bool m_bUseCbfFastMode; |
---|
| 200 | Bool m_useEarlySkipDetection; |
---|
| 201 | Bool m_useTransformSkip; |
---|
| 202 | Bool m_useTransformSkipFast; |
---|
| 203 | Int* m_aidQP; |
---|
| 204 | UInt m_uiDeltaQpRD; |
---|
| 205 | |
---|
| 206 | Bool m_bUseConstrainedIntraPred; |
---|
| 207 | Bool m_usePCM; |
---|
| 208 | UInt m_pcmLog2MaxSize; |
---|
| 209 | UInt m_uiPCMLog2MinSize; |
---|
| 210 | //====== Slice ======== |
---|
| 211 | Int m_sliceMode; |
---|
| 212 | Int m_sliceArgument; |
---|
| 213 | //====== Dependent Slice ======== |
---|
| 214 | Int m_sliceSegmentMode; |
---|
| 215 | Int m_sliceSegmentArgument; |
---|
| 216 | Bool m_bLFCrossSliceBoundaryFlag; |
---|
| 217 | |
---|
| 218 | Bool m_bPCMInputBitDepthFlag; |
---|
| 219 | UInt m_uiPCMBitDepthLuma; |
---|
| 220 | UInt m_uiPCMBitDepthChroma; |
---|
| 221 | Bool m_bPCMFilterDisableFlag; |
---|
| 222 | Bool m_loopFilterAcrossTilesEnabledFlag; |
---|
| 223 | Int m_iUniformSpacingIdr; |
---|
| 224 | Int m_iNumColumnsMinus1; |
---|
| 225 | UInt* m_puiColumnWidth; |
---|
| 226 | Int m_iNumRowsMinus1; |
---|
| 227 | UInt* m_puiRowHeight; |
---|
| 228 | |
---|
| 229 | Int m_iWaveFrontSynchro; |
---|
| 230 | Int m_iWaveFrontSubstreams; |
---|
| 231 | |
---|
| 232 | Int m_decodedPictureHashSEIEnabled; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message |
---|
| 233 | Int m_bufferingPeriodSEIEnabled; |
---|
| 234 | Int m_pictureTimingSEIEnabled; |
---|
| 235 | Int m_recoveryPointSEIEnabled; |
---|
| 236 | Int m_framePackingSEIEnabled; |
---|
| 237 | Int m_framePackingSEIType; |
---|
| 238 | Int m_framePackingSEIId; |
---|
| 239 | Int m_framePackingSEIQuincunx; |
---|
| 240 | Int m_framePackingSEIInterpretation; |
---|
| 241 | Int m_displayOrientationSEIAngle; |
---|
| 242 | Int m_temporalLevel0IndexSEIEnabled; |
---|
| 243 | Int m_gradualDecodingRefreshInfoEnabled; |
---|
| 244 | Int m_decodingUnitInfoSEIEnabled; |
---|
| 245 | //====== Weighted Prediction ======== |
---|
| 246 | Bool m_useWeightedPred; //< Use of Weighting Prediction (P_SLICE) |
---|
| 247 | Bool m_useWeightedBiPred; //< Use of Bi-directional Weighting Prediction (B_SLICE) |
---|
| 248 | UInt m_log2ParallelMergeLevelMinus2; ///< Parallel merge estimation region |
---|
| 249 | UInt m_maxNumMergeCand; ///< Maximum number of merge candidates |
---|
| 250 | Int m_useScalingListId; ///< Using quantization matrix i.e. 0=off, 1=default, 2=file. |
---|
| 251 | Char* m_scalingListFile; ///< quantization matrix file name |
---|
| 252 | Int m_TMVPModeId; |
---|
| 253 | Int m_signHideFlag; |
---|
| 254 | #if RATE_CONTROL_LAMBDA_DOMAIN |
---|
| 255 | Bool m_RCEnableRateControl; |
---|
| 256 | Int m_RCTargetBitrate; |
---|
| 257 | Bool m_RCKeepHierarchicalBit; |
---|
| 258 | Bool m_RCLCULevelRC; |
---|
| 259 | Bool m_RCUseLCUSeparateModel; |
---|
| 260 | Int m_RCInitialQP; |
---|
| 261 | Bool m_RCForceIntraQP; |
---|
| 262 | #else |
---|
| 263 | Bool m_enableRateCtrl; ///< Flag for using rate control algorithm |
---|
| 264 | Int m_targetBitrate; ///< target bitrate |
---|
| 265 | Int m_numLCUInUnit; ///< Total number of LCUs in a frame should be divided by the NumLCUInUnit |
---|
| 266 | #endif |
---|
| 267 | Bool m_TransquantBypassEnableFlag; ///< transquant_bypass_enable_flag setting in PPS. |
---|
| 268 | Bool m_CUTransquantBypassFlagValue; ///< if transquant_bypass_enable_flag, the fixed value to use for the per-CU cu_transquant_bypass_flag. |
---|
[124] | 269 | #if SVC_EXTENSION |
---|
[122] | 270 | static TComVPS m_cVPS; |
---|
[124] | 271 | #else |
---|
| 272 | TComVPS m_cVPS; |
---|
| 273 | #endif |
---|
[51] | 274 | Bool m_recalculateQPAccordingToLambda; ///< recalculate QP value according to the lambda value |
---|
| 275 | Int m_activeParameterSetsSEIEnabled; ///< enable active parameter set SEI message |
---|
| 276 | Bool m_vuiParametersPresentFlag; ///< enable generation of VUI parameters |
---|
| 277 | Bool m_aspectRatioInfoPresentFlag; ///< Signals whether aspect_ratio_idc is present |
---|
| 278 | Int m_aspectRatioIdc; ///< aspect_ratio_idc |
---|
| 279 | Int m_sarWidth; ///< horizontal size of the sample aspect ratio |
---|
| 280 | Int m_sarHeight; ///< vertical size of the sample aspect ratio |
---|
| 281 | Bool m_overscanInfoPresentFlag; ///< Signals whether overscan_appropriate_flag is present |
---|
| 282 | Bool m_overscanAppropriateFlag; ///< Indicates whether conformant decoded pictures are suitable for display using overscan |
---|
| 283 | Bool m_videoSignalTypePresentFlag; ///< Signals whether video_format, video_full_range_flag, and colour_description_present_flag are present |
---|
| 284 | Int m_videoFormat; ///< Indicates representation of pictures |
---|
| 285 | Bool m_videoFullRangeFlag; ///< Indicates the black level and range of luma and chroma signals |
---|
| 286 | Bool m_colourDescriptionPresentFlag; ///< Signals whether colour_primaries, transfer_characteristics and matrix_coefficients are present |
---|
| 287 | Int m_colourPrimaries; ///< Indicates chromaticity coordinates of the source primaries |
---|
| 288 | Int m_transferCharacteristics; ///< Indicates the opto-electronic transfer characteristics of the source |
---|
| 289 | Int m_matrixCoefficients; ///< Describes the matrix coefficients used in deriving luma and chroma from RGB primaries |
---|
| 290 | Bool m_chromaLocInfoPresentFlag; ///< Signals whether chroma_sample_loc_type_top_field and chroma_sample_loc_type_bottom_field are present |
---|
| 291 | Int m_chromaSampleLocTypeTopField; ///< Specifies the location of chroma samples for top field |
---|
| 292 | Int m_chromaSampleLocTypeBottomField; ///< Specifies the location of chroma samples for bottom field |
---|
| 293 | Bool m_neutralChromaIndicationFlag; ///< Indicates that the value of all decoded chroma samples is equal to 1<<(BitDepthCr-1) |
---|
| 294 | Window m_defaultDisplayWindow; ///< Represents the default display window parameters |
---|
| 295 | Bool m_frameFieldInfoPresentFlag; ///< Indicates that pic_struct and other field coding related values are present in picture timing SEI messages |
---|
| 296 | Bool m_pocProportionalToTimingFlag; ///< Indicates that the POC value is proportional to the output time w.r.t. first picture in CVS |
---|
| 297 | Int m_numTicksPocDiffOneMinus1; ///< Number of ticks minus 1 that for a POC difference of one |
---|
| 298 | Bool m_bitstreamRestrictionFlag; ///< Signals whether bitstream restriction parameters are present |
---|
| 299 | Bool m_tilesFixedStructureFlag; ///< Indicates that each active picture parameter set has the same values of the syntax elements related to tiles |
---|
| 300 | Bool m_motionVectorsOverPicBoundariesFlag; ///< Indicates that no samples outside the picture boundaries are used for inter prediction |
---|
| 301 | Int m_minSpatialSegmentationIdc; ///< Indicates the maximum size of the spatial segments in the pictures in the coded video sequence |
---|
| 302 | Int m_maxBytesPerPicDenom; ///< Indicates a number of bytes not exceeded by the sum of the sizes of the VCL NAL units associated with any coded picture |
---|
| 303 | Int m_maxBitsPerMinCuDenom; ///< Indicates an upper bound for the number of bits of coding_unit() data |
---|
| 304 | Int m_log2MaxMvLengthHorizontal; ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units |
---|
| 305 | Int m_log2MaxMvLengthVertical; ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units |
---|
| 306 | |
---|
| 307 | Bool m_useStrongIntraSmoothing; ///< enable the use of strong intra smoothing (bi_linear interpolation) for 32x32 blocks when reference samples are flat. |
---|
[54] | 308 | #if SVC_EXTENSION |
---|
| 309 | UInt m_layerId; |
---|
| 310 | UInt m_numLayer; |
---|
| 311 | #endif |
---|
| 312 | #if REF_IDX_FRAMEWORK |
---|
| 313 | Int m_elRapSliceBEnabled; |
---|
| 314 | #endif |
---|
[51] | 315 | |
---|
| 316 | public: |
---|
| 317 | TEncCfg() |
---|
| 318 | : m_puiColumnWidth() |
---|
| 319 | , m_puiRowHeight() |
---|
| 320 | {} |
---|
| 321 | |
---|
| 322 | virtual ~TEncCfg() |
---|
| 323 | { |
---|
| 324 | delete[] m_puiColumnWidth; |
---|
| 325 | delete[] m_puiRowHeight; |
---|
| 326 | } |
---|
| 327 | |
---|
| 328 | Void setProfile(Profile::Name profile) { m_profile = profile; } |
---|
| 329 | Void setLevel(Level::Tier tier, Level::Name level) { m_levelTier = tier; m_level = level; } |
---|
| 330 | |
---|
| 331 | Void setFrameRate ( Int i ) { m_iFrameRate = i; } |
---|
| 332 | Void setFrameSkip ( UInt i ) { m_FrameSkip = i; } |
---|
| 333 | Void setSourceWidth ( Int i ) { m_iSourceWidth = i; } |
---|
| 334 | Void setSourceHeight ( Int i ) { m_iSourceHeight = i; } |
---|
| 335 | |
---|
| 336 | Window &getConformanceWindow() { return m_conformanceWindow; } |
---|
| 337 | Void setConformanceWindow (Int confLeft, Int confRight, Int confTop, Int confBottom ) { m_conformanceWindow.setWindow (confLeft, confRight, confTop, confBottom); } |
---|
| 338 | |
---|
| 339 | Void setFramesToBeEncoded ( Int i ) { m_framesToBeEncoded = i; } |
---|
| 340 | |
---|
| 341 | //====== Coding Structure ======== |
---|
| 342 | Void setIntraPeriod ( Int i ) { m_uiIntraPeriod = (UInt)i; } |
---|
| 343 | Void setDecodingRefreshType ( Int i ) { m_uiDecodingRefreshType = (UInt)i; } |
---|
| 344 | Void setGOPSize ( Int i ) { m_iGOPSize = i; } |
---|
| 345 | Void setGopList ( GOPEntry* GOPList ) { for ( Int i = 0; i < MAX_GOP; i++ ) m_GOPList[i] = GOPList[i]; } |
---|
| 346 | Void setExtraRPSs ( Int i ) { m_extraRPSs = i; } |
---|
| 347 | GOPEntry getGOPEntry ( Int i ) { return m_GOPList[i]; } |
---|
| 348 | Void setMaxDecPicBuffering ( UInt u, UInt tlayer ) { m_maxDecPicBuffering[tlayer] = u; } |
---|
| 349 | Void setNumReorderPics ( Int i, UInt tlayer ) { m_numReorderPics[tlayer] = i; } |
---|
| 350 | |
---|
| 351 | Void setQP ( Int i ) { m_iQP = i; } |
---|
| 352 | |
---|
| 353 | Void setPad ( Int* iPad ) { for ( Int i = 0; i < 2; i++ ) m_aiPad[i] = iPad[i]; } |
---|
| 354 | |
---|
| 355 | Int getMaxRefPicNum () { return m_iMaxRefPicNum; } |
---|
| 356 | Void setMaxRefPicNum ( Int iMaxRefPicNum ) { m_iMaxRefPicNum = iMaxRefPicNum; } |
---|
| 357 | |
---|
| 358 | Bool getMaxTempLayer () { return m_maxTempLayer; } |
---|
| 359 | Void setMaxTempLayer ( Int maxTempLayer ) { m_maxTempLayer = maxTempLayer; } |
---|
[118] | 360 | #if VPS_EXTN_DIRECT_REF_LAYERS |
---|
| 361 | Int getNumDirectRefLayers () { return m_numDirectRefLayers; } |
---|
| 362 | Void setNumDirectRefLayers (Int num) { m_numDirectRefLayers = num; } |
---|
| 363 | |
---|
| 364 | Int getRefLayerId (Int i) { return m_refLayerId[i]; } |
---|
| 365 | Void setRefLayerId (Int i, Int refLayerId) { m_refLayerId[i] = refLayerId; } |
---|
| 366 | #endif |
---|
[51] | 367 | //======== Transform ============= |
---|
| 368 | Void setQuadtreeTULog2MaxSize ( UInt u ) { m_uiQuadtreeTULog2MaxSize = u; } |
---|
| 369 | Void setQuadtreeTULog2MinSize ( UInt u ) { m_uiQuadtreeTULog2MinSize = u; } |
---|
| 370 | Void setQuadtreeTUMaxDepthInter ( UInt u ) { m_uiQuadtreeTUMaxDepthInter = u; } |
---|
| 371 | Void setQuadtreeTUMaxDepthIntra ( UInt u ) { m_uiQuadtreeTUMaxDepthIntra = u; } |
---|
| 372 | |
---|
| 373 | Void setUseAMP( Bool b ) { m_useAMP = b; } |
---|
| 374 | |
---|
| 375 | //====== Loop/Deblock Filter ======== |
---|
| 376 | Void setLoopFilterDisable ( Bool b ) { m_bLoopFilterDisable = b; } |
---|
| 377 | Void setLoopFilterOffsetInPPS ( Bool b ) { m_loopFilterOffsetInPPS = b; } |
---|
| 378 | Void setLoopFilterBetaOffset ( Int i ) { m_loopFilterBetaOffsetDiv2 = i; } |
---|
| 379 | Void setLoopFilterTcOffset ( Int i ) { m_loopFilterTcOffsetDiv2 = i; } |
---|
| 380 | Void setDeblockingFilterControlPresent ( Bool b ) { m_DeblockingFilterControlPresent = b; } |
---|
| 381 | |
---|
| 382 | //====== Motion search ======== |
---|
| 383 | Void setFastSearch ( Int i ) { m_iFastSearch = i; } |
---|
| 384 | Void setSearchRange ( Int i ) { m_iSearchRange = i; } |
---|
| 385 | Void setBipredSearchRange ( Int i ) { m_bipredSearchRange = i; } |
---|
| 386 | |
---|
| 387 | //====== Quality control ======== |
---|
| 388 | Void setMaxDeltaQP ( Int i ) { m_iMaxDeltaQP = i; } |
---|
| 389 | Void setMaxCuDQPDepth ( Int i ) { m_iMaxCuDQPDepth = i; } |
---|
| 390 | |
---|
| 391 | Void setChromaCbQpOffset ( Int i ) { m_chromaCbQpOffset = i; } |
---|
| 392 | Void setChromaCrQpOffset ( Int i ) { m_chromaCrQpOffset = i; } |
---|
| 393 | |
---|
| 394 | #if ADAPTIVE_QP_SELECTION |
---|
| 395 | Void setUseAdaptQpSelect ( Bool i ) { m_bUseAdaptQpSelect = i; } |
---|
| 396 | Bool getUseAdaptQpSelect () { return m_bUseAdaptQpSelect; } |
---|
| 397 | #endif |
---|
| 398 | |
---|
| 399 | Void setUseAdaptiveQP ( Bool b ) { m_bUseAdaptiveQP = b; } |
---|
| 400 | Void setQPAdaptationRange ( Int i ) { m_iQPAdaptationRange = i; } |
---|
| 401 | |
---|
| 402 | //====== Lossless ======== |
---|
| 403 | Void setUseLossless (Bool b ) { m_useLossless = b; } |
---|
| 404 | //====== Sequence ======== |
---|
| 405 | Int getFrameRate () { return m_iFrameRate; } |
---|
| 406 | UInt getFrameSkip () { return m_FrameSkip; } |
---|
| 407 | Int getSourceWidth () { return m_iSourceWidth; } |
---|
| 408 | Int getSourceHeight () { return m_iSourceHeight; } |
---|
| 409 | Int getFramesToBeEncoded () { return m_framesToBeEncoded; } |
---|
| 410 | void setLambdaModifier ( UInt uiIndex, Double dValue ) { m_adLambdaModifier[ uiIndex ] = dValue; } |
---|
| 411 | Double getLambdaModifier ( UInt uiIndex ) const { return m_adLambdaModifier[ uiIndex ]; } |
---|
| 412 | |
---|
| 413 | //==== Coding Structure ======== |
---|
| 414 | UInt getIntraPeriod () { return m_uiIntraPeriod; } |
---|
| 415 | UInt getDecodingRefreshType () { return m_uiDecodingRefreshType; } |
---|
| 416 | Int getGOPSize () { return m_iGOPSize; } |
---|
| 417 | Int getMaxDecPicBuffering (UInt tlayer) { return m_maxDecPicBuffering[tlayer]; } |
---|
| 418 | Int getNumReorderPics (UInt tlayer) { return m_numReorderPics[tlayer]; } |
---|
| 419 | Int getQP () { return m_iQP; } |
---|
| 420 | |
---|
| 421 | Int getPad ( Int i ) { assert (i < 2 ); return m_aiPad[i]; } |
---|
| 422 | |
---|
| 423 | //======== Transform ============= |
---|
| 424 | UInt getQuadtreeTULog2MaxSize () const { return m_uiQuadtreeTULog2MaxSize; } |
---|
| 425 | UInt getQuadtreeTULog2MinSize () const { return m_uiQuadtreeTULog2MinSize; } |
---|
| 426 | UInt getQuadtreeTUMaxDepthInter () const { return m_uiQuadtreeTUMaxDepthInter; } |
---|
| 427 | UInt getQuadtreeTUMaxDepthIntra () const { return m_uiQuadtreeTUMaxDepthIntra; } |
---|
| 428 | |
---|
| 429 | //==== Loop/Deblock Filter ======== |
---|
| 430 | Bool getLoopFilterDisable () { return m_bLoopFilterDisable; } |
---|
| 431 | Bool getLoopFilterOffsetInPPS () { return m_loopFilterOffsetInPPS; } |
---|
| 432 | Int getLoopFilterBetaOffset () { return m_loopFilterBetaOffsetDiv2; } |
---|
| 433 | Int getLoopFilterTcOffset () { return m_loopFilterTcOffsetDiv2; } |
---|
| 434 | Bool getDeblockingFilterControlPresent() { return m_DeblockingFilterControlPresent; } |
---|
| 435 | |
---|
| 436 | //==== Motion search ======== |
---|
| 437 | Int getFastSearch () { return m_iFastSearch; } |
---|
| 438 | Int getSearchRange () { return m_iSearchRange; } |
---|
| 439 | |
---|
| 440 | //==== Quality control ======== |
---|
| 441 | Int getMaxDeltaQP () { return m_iMaxDeltaQP; } |
---|
| 442 | Int getMaxCuDQPDepth () { return m_iMaxCuDQPDepth; } |
---|
| 443 | Bool getUseAdaptiveQP () { return m_bUseAdaptiveQP; } |
---|
| 444 | Int getQPAdaptationRange () { return m_iQPAdaptationRange; } |
---|
| 445 | //====== Lossless ======== |
---|
| 446 | Bool getUseLossless () { return m_useLossless; } |
---|
| 447 | |
---|
| 448 | //==== Tool list ======== |
---|
| 449 | Void setUseSBACRD ( Bool b ) { m_bUseSBACRD = b; } |
---|
| 450 | Void setUseASR ( Bool b ) { m_bUseASR = b; } |
---|
| 451 | Void setUseHADME ( Bool b ) { m_bUseHADME = b; } |
---|
| 452 | Void setUseLComb ( Bool b ) { m_bUseLComb = b; } |
---|
| 453 | Void setUseRDOQ ( Bool b ) { m_useRDOQ = b; } |
---|
| 454 | Void setUseRDOQTS ( Bool b ) { m_useRDOQTS = b; } |
---|
| 455 | #if L0232_RD_PENALTY |
---|
| 456 | Void setRDpenalty ( UInt b ) { m_rdPenalty = b; } |
---|
| 457 | #endif |
---|
| 458 | Void setUseFastEnc ( Bool b ) { m_bUseFastEnc = b; } |
---|
| 459 | Void setUseEarlyCU ( Bool b ) { m_bUseEarlyCU = b; } |
---|
| 460 | Void setUseFastDecisionForMerge ( Bool b ) { m_useFastDecisionForMerge = b; } |
---|
| 461 | Void setUseCbfFastMode ( Bool b ) { m_bUseCbfFastMode = b; } |
---|
| 462 | Void setUseEarlySkipDetection ( Bool b ) { m_useEarlySkipDetection = b; } |
---|
| 463 | Void setUseConstrainedIntraPred ( Bool b ) { m_bUseConstrainedIntraPred = b; } |
---|
| 464 | Void setPCMInputBitDepthFlag ( Bool b ) { m_bPCMInputBitDepthFlag = b; } |
---|
| 465 | Void setPCMFilterDisableFlag ( Bool b ) { m_bPCMFilterDisableFlag = b; } |
---|
| 466 | Void setUsePCM ( Bool b ) { m_usePCM = b; } |
---|
| 467 | Void setPCMLog2MaxSize ( UInt u ) { m_pcmLog2MaxSize = u; } |
---|
| 468 | Void setPCMLog2MinSize ( UInt u ) { m_uiPCMLog2MinSize = u; } |
---|
| 469 | Void setdQPs ( Int* p ) { m_aidQP = p; } |
---|
| 470 | Void setDeltaQpRD ( UInt u ) {m_uiDeltaQpRD = u; } |
---|
| 471 | Bool getUseSBACRD () { return m_bUseSBACRD; } |
---|
| 472 | Bool getUseASR () { return m_bUseASR; } |
---|
| 473 | Bool getUseHADME () { return m_bUseHADME; } |
---|
| 474 | Bool getUseLComb () { return m_bUseLComb; } |
---|
| 475 | Bool getUseRDOQ () { return m_useRDOQ; } |
---|
| 476 | Bool getUseRDOQTS () { return m_useRDOQTS; } |
---|
| 477 | #if L0232_RD_PENALTY |
---|
| 478 | Int getRDpenalty () { return m_rdPenalty; } |
---|
| 479 | #endif |
---|
| 480 | Bool getUseFastEnc () { return m_bUseFastEnc; } |
---|
| 481 | Bool getUseEarlyCU () { return m_bUseEarlyCU; } |
---|
| 482 | Bool getUseFastDecisionForMerge () { return m_useFastDecisionForMerge; } |
---|
| 483 | Bool getUseCbfFastMode () { return m_bUseCbfFastMode; } |
---|
| 484 | Bool getUseEarlySkipDetection () { return m_useEarlySkipDetection; } |
---|
| 485 | Bool getUseConstrainedIntraPred () { return m_bUseConstrainedIntraPred; } |
---|
| 486 | Bool getPCMInputBitDepthFlag () { return m_bPCMInputBitDepthFlag; } |
---|
| 487 | Bool getPCMFilterDisableFlag () { return m_bPCMFilterDisableFlag; } |
---|
| 488 | Bool getUsePCM () { return m_usePCM; } |
---|
| 489 | UInt getPCMLog2MaxSize () { return m_pcmLog2MaxSize; } |
---|
| 490 | UInt getPCMLog2MinSize () { return m_uiPCMLog2MinSize; } |
---|
| 491 | |
---|
| 492 | Bool getUseTransformSkip () { return m_useTransformSkip; } |
---|
| 493 | Void setUseTransformSkip ( Bool b ) { m_useTransformSkip = b; } |
---|
| 494 | Bool getUseTransformSkipFast () { return m_useTransformSkipFast; } |
---|
| 495 | Void setUseTransformSkipFast ( Bool b ) { m_useTransformSkipFast = b; } |
---|
| 496 | Int* getdQPs () { return m_aidQP; } |
---|
| 497 | UInt getDeltaQpRD () { return m_uiDeltaQpRD; } |
---|
| 498 | |
---|
| 499 | //====== Slice ======== |
---|
| 500 | Void setSliceMode ( Int i ) { m_sliceMode = i; } |
---|
| 501 | Void setSliceArgument ( Int i ) { m_sliceArgument = i; } |
---|
| 502 | Int getSliceMode () { return m_sliceMode; } |
---|
| 503 | Int getSliceArgument () { return m_sliceArgument; } |
---|
| 504 | //====== Dependent Slice ======== |
---|
| 505 | Void setSliceSegmentMode ( Int i ) { m_sliceSegmentMode = i; } |
---|
| 506 | Void setSliceSegmentArgument ( Int i ) { m_sliceSegmentArgument = i; } |
---|
| 507 | Int getSliceSegmentMode () { return m_sliceSegmentMode; } |
---|
| 508 | Int getSliceSegmentArgument () { return m_sliceSegmentArgument;} |
---|
| 509 | Void setLFCrossSliceBoundaryFlag ( Bool bValue ) { m_bLFCrossSliceBoundaryFlag = bValue; } |
---|
| 510 | Bool getLFCrossSliceBoundaryFlag () { return m_bLFCrossSliceBoundaryFlag; } |
---|
| 511 | |
---|
| 512 | Void setUseSAO (Bool bVal) {m_bUseSAO = bVal;} |
---|
| 513 | Bool getUseSAO () {return m_bUseSAO;} |
---|
| 514 | Void setMaxNumOffsetsPerPic (Int iVal) { m_maxNumOffsetsPerPic = iVal; } |
---|
| 515 | Int getMaxNumOffsetsPerPic () { return m_maxNumOffsetsPerPic; } |
---|
| 516 | Void setSaoLcuBoundary (Bool val) { m_saoLcuBoundary = val; } |
---|
| 517 | Bool getSaoLcuBoundary () { return m_saoLcuBoundary; } |
---|
| 518 | Void setSaoLcuBasedOptimization (Bool val) { m_saoLcuBasedOptimization = val; } |
---|
| 519 | Bool getSaoLcuBasedOptimization () { return m_saoLcuBasedOptimization; } |
---|
| 520 | Void setLFCrossTileBoundaryFlag ( Bool val ) { m_loopFilterAcrossTilesEnabledFlag = val; } |
---|
| 521 | Bool getLFCrossTileBoundaryFlag () { return m_loopFilterAcrossTilesEnabledFlag; } |
---|
| 522 | Void setUniformSpacingIdr ( Int i ) { m_iUniformSpacingIdr = i; } |
---|
| 523 | Int getUniformSpacingIdr () { return m_iUniformSpacingIdr; } |
---|
| 524 | Void setNumColumnsMinus1 ( Int i ) { m_iNumColumnsMinus1 = i; } |
---|
| 525 | Int getNumColumnsMinus1 () { return m_iNumColumnsMinus1; } |
---|
| 526 | Void setColumnWidth ( UInt* columnWidth ) |
---|
| 527 | { |
---|
| 528 | if( m_iUniformSpacingIdr == 0 && m_iNumColumnsMinus1 > 0 ) |
---|
| 529 | { |
---|
| 530 | Int m_iWidthInCU = ( m_iSourceWidth%g_uiMaxCUWidth ) ? m_iSourceWidth/g_uiMaxCUWidth + 1 : m_iSourceWidth/g_uiMaxCUWidth; |
---|
| 531 | m_puiColumnWidth = new UInt[ m_iNumColumnsMinus1 ]; |
---|
| 532 | |
---|
| 533 | for(Int i=0; i<m_iNumColumnsMinus1; i++) |
---|
| 534 | { |
---|
| 535 | m_puiColumnWidth[i] = columnWidth[i]; |
---|
| 536 | printf("col: m_iWidthInCU= %4d i=%4d width= %4d\n",m_iWidthInCU,i,m_puiColumnWidth[i]); //AFU |
---|
| 537 | } |
---|
| 538 | } |
---|
| 539 | } |
---|
| 540 | UInt getColumnWidth ( UInt columnidx ) { return *( m_puiColumnWidth + columnidx ); } |
---|
| 541 | Void setNumRowsMinus1 ( Int i ) { m_iNumRowsMinus1 = i; } |
---|
| 542 | Int getNumRowsMinus1 () { return m_iNumRowsMinus1; } |
---|
| 543 | Void setRowHeight (UInt* rowHeight) |
---|
| 544 | { |
---|
| 545 | if( m_iUniformSpacingIdr == 0 && m_iNumRowsMinus1 > 0 ) |
---|
| 546 | { |
---|
| 547 | Int m_iHeightInCU = ( m_iSourceHeight%g_uiMaxCUHeight ) ? m_iSourceHeight/g_uiMaxCUHeight + 1 : m_iSourceHeight/g_uiMaxCUHeight; |
---|
| 548 | m_puiRowHeight = new UInt[ m_iNumRowsMinus1 ]; |
---|
| 549 | |
---|
| 550 | for(Int i=0; i<m_iNumRowsMinus1; i++) |
---|
| 551 | { |
---|
| 552 | m_puiRowHeight[i] = rowHeight[i]; |
---|
| 553 | printf("row: m_iHeightInCU=%4d i=%4d height=%4d\n",m_iHeightInCU,i,m_puiRowHeight[i]); //AFU |
---|
| 554 | } |
---|
| 555 | } |
---|
| 556 | } |
---|
| 557 | UInt getRowHeight ( UInt rowIdx ) { return *( m_puiRowHeight + rowIdx ); } |
---|
| 558 | Void xCheckGSParameters(); |
---|
| 559 | Void setWaveFrontSynchro(Int iWaveFrontSynchro) { m_iWaveFrontSynchro = iWaveFrontSynchro; } |
---|
| 560 | Int getWaveFrontsynchro() { return m_iWaveFrontSynchro; } |
---|
| 561 | Void setWaveFrontSubstreams(Int iWaveFrontSubstreams) { m_iWaveFrontSubstreams = iWaveFrontSubstreams; } |
---|
| 562 | Int getWaveFrontSubstreams() { return m_iWaveFrontSubstreams; } |
---|
| 563 | Void setDecodedPictureHashSEIEnabled(Int b) { m_decodedPictureHashSEIEnabled = b; } |
---|
| 564 | Int getDecodedPictureHashSEIEnabled() { return m_decodedPictureHashSEIEnabled; } |
---|
| 565 | Void setBufferingPeriodSEIEnabled(Int b) { m_bufferingPeriodSEIEnabled = b; } |
---|
| 566 | Int getBufferingPeriodSEIEnabled() { return m_bufferingPeriodSEIEnabled; } |
---|
| 567 | Void setPictureTimingSEIEnabled(Int b) { m_pictureTimingSEIEnabled = b; } |
---|
| 568 | Int getPictureTimingSEIEnabled() { return m_pictureTimingSEIEnabled; } |
---|
| 569 | Void setRecoveryPointSEIEnabled(Int b) { m_recoveryPointSEIEnabled = b; } |
---|
| 570 | Int getRecoveryPointSEIEnabled() { return m_recoveryPointSEIEnabled; } |
---|
| 571 | Void setFramePackingArrangementSEIEnabled(Int b) { m_framePackingSEIEnabled = b; } |
---|
| 572 | Int getFramePackingArrangementSEIEnabled() { return m_framePackingSEIEnabled; } |
---|
| 573 | Void setFramePackingArrangementSEIType(Int b) { m_framePackingSEIType = b; } |
---|
| 574 | Int getFramePackingArrangementSEIType() { return m_framePackingSEIType; } |
---|
| 575 | Void setFramePackingArrangementSEIId(Int b) { m_framePackingSEIId = b; } |
---|
| 576 | Int getFramePackingArrangementSEIId() { return m_framePackingSEIId; } |
---|
| 577 | Void setFramePackingArrangementSEIQuincunx(Int b) { m_framePackingSEIQuincunx = b; } |
---|
| 578 | Int getFramePackingArrangementSEIQuincunx() { return m_framePackingSEIQuincunx; } |
---|
| 579 | Void setFramePackingArrangementSEIInterpretation(Int b) { m_framePackingSEIInterpretation = b; } |
---|
| 580 | Int getFramePackingArrangementSEIInterpretation() { return m_framePackingSEIInterpretation; } |
---|
| 581 | Void setDisplayOrientationSEIAngle(Int b) { m_displayOrientationSEIAngle = b; } |
---|
| 582 | Int getDisplayOrientationSEIAngle() { return m_displayOrientationSEIAngle; } |
---|
| 583 | Void setTemporalLevel0IndexSEIEnabled(Int b) { m_temporalLevel0IndexSEIEnabled = b; } |
---|
| 584 | Int getTemporalLevel0IndexSEIEnabled() { return m_temporalLevel0IndexSEIEnabled; } |
---|
| 585 | Void setGradualDecodingRefreshInfoEnabled(Int b) { m_gradualDecodingRefreshInfoEnabled = b; } |
---|
| 586 | Int getGradualDecodingRefreshInfoEnabled() { return m_gradualDecodingRefreshInfoEnabled; } |
---|
| 587 | Void setDecodingUnitInfoSEIEnabled(Int b) { m_decodingUnitInfoSEIEnabled = b; } |
---|
| 588 | Int getDecodingUnitInfoSEIEnabled() { return m_decodingUnitInfoSEIEnabled; } |
---|
| 589 | Void setUseWP ( Bool b ) { m_useWeightedPred = b; } |
---|
| 590 | Void setWPBiPred ( Bool b ) { m_useWeightedBiPred = b; } |
---|
| 591 | Bool getUseWP () { return m_useWeightedPred; } |
---|
| 592 | Bool getWPBiPred () { return m_useWeightedBiPred; } |
---|
| 593 | Void setLog2ParallelMergeLevelMinus2 ( UInt u ) { m_log2ParallelMergeLevelMinus2 = u; } |
---|
| 594 | UInt getLog2ParallelMergeLevelMinus2 () { return m_log2ParallelMergeLevelMinus2; } |
---|
| 595 | Void setMaxNumMergeCand ( UInt u ) { m_maxNumMergeCand = u; } |
---|
| 596 | UInt getMaxNumMergeCand () { return m_maxNumMergeCand; } |
---|
| 597 | Void setUseScalingListId ( Int u ) { m_useScalingListId = u; } |
---|
| 598 | Int getUseScalingListId () { return m_useScalingListId; } |
---|
| 599 | Void setScalingListFile ( Char* pch ){ m_scalingListFile = pch; } |
---|
| 600 | Char* getScalingListFile () { return m_scalingListFile; } |
---|
| 601 | Void setTMVPModeId ( Int u ) { m_TMVPModeId = u; } |
---|
| 602 | Int getTMVPModeId () { return m_TMVPModeId; } |
---|
| 603 | Void setSignHideFlag( Int signHideFlag ) { m_signHideFlag = signHideFlag; } |
---|
| 604 | Int getSignHideFlag() { return m_signHideFlag; } |
---|
| 605 | #if RATE_CONTROL_LAMBDA_DOMAIN |
---|
| 606 | Bool getUseRateCtrl () { return m_RCEnableRateControl; } |
---|
| 607 | Void setUseRateCtrl ( Bool b ) { m_RCEnableRateControl = b; } |
---|
| 608 | Int getTargetBitrate () { return m_RCTargetBitrate; } |
---|
| 609 | Void setTargetBitrate ( Int bitrate ) { m_RCTargetBitrate = bitrate; } |
---|
| 610 | Bool getKeepHierBit () { return m_RCKeepHierarchicalBit; } |
---|
| 611 | Void setKeepHierBit ( Bool b ) { m_RCKeepHierarchicalBit = b; } |
---|
| 612 | Bool getLCULevelRC () { return m_RCLCULevelRC; } |
---|
| 613 | Void setLCULevelRC ( Bool b ) { m_RCLCULevelRC = b; } |
---|
| 614 | Bool getUseLCUSeparateModel () { return m_RCUseLCUSeparateModel; } |
---|
| 615 | Void setUseLCUSeparateModel ( Bool b ) { m_RCUseLCUSeparateModel = b; } |
---|
| 616 | Int getInitialQP () { return m_RCInitialQP; } |
---|
| 617 | Void setInitialQP ( Int QP ) { m_RCInitialQP = QP; } |
---|
| 618 | Bool getForceIntraQP () { return m_RCForceIntraQP; } |
---|
| 619 | Void setForceIntraQP ( Bool b ) { m_RCForceIntraQP = b; } |
---|
| 620 | #else |
---|
| 621 | Bool getUseRateCtrl () { return m_enableRateCtrl; } |
---|
| 622 | Void setUseRateCtrl (Bool flag) { m_enableRateCtrl = flag; } |
---|
| 623 | Int getTargetBitrate () { return m_targetBitrate; } |
---|
| 624 | Void setTargetBitrate (Int target) { m_targetBitrate = target; } |
---|
| 625 | Int getNumLCUInUnit () { return m_numLCUInUnit; } |
---|
| 626 | Void setNumLCUInUnit (Int numLCUs) { m_numLCUInUnit = numLCUs; } |
---|
| 627 | #endif |
---|
| 628 | Bool getTransquantBypassEnableFlag() { return m_TransquantBypassEnableFlag; } |
---|
| 629 | Void setTransquantBypassEnableFlag(Bool flag) { m_TransquantBypassEnableFlag = flag; } |
---|
| 630 | Bool getCUTransquantBypassFlagValue() { return m_CUTransquantBypassFlagValue; } |
---|
| 631 | Void setCUTransquantBypassFlagValue(Bool flag) { m_CUTransquantBypassFlagValue = flag; } |
---|
| 632 | Void setVPS(TComVPS *p) { m_cVPS = *p; } |
---|
| 633 | TComVPS *getVPS() { return &m_cVPS; } |
---|
| 634 | Void setUseRecalculateQPAccordingToLambda ( Bool b ) { m_recalculateQPAccordingToLambda = b; } |
---|
| 635 | Bool getUseRecalculateQPAccordingToLambda () { return m_recalculateQPAccordingToLambda; } |
---|
| 636 | |
---|
| 637 | Void setUseStrongIntraSmoothing ( Bool b ) { m_useStrongIntraSmoothing = b; } |
---|
| 638 | Bool getUseStrongIntraSmoothing () { return m_useStrongIntraSmoothing; } |
---|
| 639 | |
---|
| 640 | Void setActiveParameterSetsSEIEnabled ( Int b ) { m_activeParameterSetsSEIEnabled = b; } |
---|
| 641 | Int getActiveParameterSetsSEIEnabled () { return m_activeParameterSetsSEIEnabled; } |
---|
| 642 | Bool getVuiParametersPresentFlag() { return m_vuiParametersPresentFlag; } |
---|
| 643 | Void setVuiParametersPresentFlag(Bool i) { m_vuiParametersPresentFlag = i; } |
---|
| 644 | Bool getAspectRatioInfoPresentFlag() { return m_aspectRatioInfoPresentFlag; } |
---|
| 645 | Void setAspectRatioInfoPresentFlag(Bool i) { m_aspectRatioInfoPresentFlag = i; } |
---|
| 646 | Int getAspectRatioIdc() { return m_aspectRatioIdc; } |
---|
| 647 | Void setAspectRatioIdc(Int i) { m_aspectRatioIdc = i; } |
---|
| 648 | Int getSarWidth() { return m_sarWidth; } |
---|
| 649 | Void setSarWidth(Int i) { m_sarWidth = i; } |
---|
| 650 | Int getSarHeight() { return m_sarHeight; } |
---|
| 651 | Void setSarHeight(Int i) { m_sarHeight = i; } |
---|
| 652 | Bool getOverscanInfoPresentFlag() { return m_overscanInfoPresentFlag; } |
---|
| 653 | Void setOverscanInfoPresentFlag(Bool i) { m_overscanInfoPresentFlag = i; } |
---|
| 654 | Bool getOverscanAppropriateFlag() { return m_overscanAppropriateFlag; } |
---|
| 655 | Void setOverscanAppropriateFlag(Bool i) { m_overscanAppropriateFlag = i; } |
---|
| 656 | Bool getVideoSignalTypePresentFlag() { return m_videoSignalTypePresentFlag; } |
---|
| 657 | Void setVideoSignalTypePresentFlag(Bool i) { m_videoSignalTypePresentFlag = i; } |
---|
| 658 | Int getVideoFormat() { return m_videoFormat; } |
---|
| 659 | Void setVideoFormat(Int i) { m_videoFormat = i; } |
---|
| 660 | Bool getVideoFullRangeFlag() { return m_videoFullRangeFlag; } |
---|
| 661 | Void setVideoFullRangeFlag(Bool i) { m_videoFullRangeFlag = i; } |
---|
| 662 | Bool getColourDescriptionPresentFlag() { return m_colourDescriptionPresentFlag; } |
---|
| 663 | Void setColourDescriptionPresentFlag(Bool i) { m_colourDescriptionPresentFlag = i; } |
---|
| 664 | Int getColourPrimaries() { return m_colourPrimaries; } |
---|
| 665 | Void setColourPrimaries(Int i) { m_colourPrimaries = i; } |
---|
| 666 | Int getTransferCharacteristics() { return m_transferCharacteristics; } |
---|
| 667 | Void setTransferCharacteristics(Int i) { m_transferCharacteristics = i; } |
---|
| 668 | Int getMatrixCoefficients() { return m_matrixCoefficients; } |
---|
| 669 | Void setMatrixCoefficients(Int i) { m_matrixCoefficients = i; } |
---|
| 670 | Bool getChromaLocInfoPresentFlag() { return m_chromaLocInfoPresentFlag; } |
---|
| 671 | Void setChromaLocInfoPresentFlag(Bool i) { m_chromaLocInfoPresentFlag = i; } |
---|
| 672 | Int getChromaSampleLocTypeTopField() { return m_chromaSampleLocTypeTopField; } |
---|
| 673 | Void setChromaSampleLocTypeTopField(Int i) { m_chromaSampleLocTypeTopField = i; } |
---|
| 674 | Int getChromaSampleLocTypeBottomField() { return m_chromaSampleLocTypeBottomField; } |
---|
| 675 | Void setChromaSampleLocTypeBottomField(Int i) { m_chromaSampleLocTypeBottomField = i; } |
---|
| 676 | Bool getNeutralChromaIndicationFlag() { return m_neutralChromaIndicationFlag; } |
---|
| 677 | Void setNeutralChromaIndicationFlag(Bool i) { m_neutralChromaIndicationFlag = i; } |
---|
| 678 | Window &getDefaultDisplayWindow() { return m_defaultDisplayWindow; } |
---|
| 679 | Void setDefaultDisplayWindow (Int offsetLeft, Int offsetRight, Int offsetTop, Int offsetBottom ) { m_defaultDisplayWindow.setWindow (offsetLeft, offsetRight, offsetTop, offsetBottom); } |
---|
| 680 | Bool getFrameFieldInfoPresentFlag() { return m_frameFieldInfoPresentFlag; } |
---|
| 681 | Void setFrameFieldInfoPresentFlag(Bool i) { m_frameFieldInfoPresentFlag = i; } |
---|
| 682 | Bool getPocProportionalToTimingFlag() { return m_pocProportionalToTimingFlag; } |
---|
| 683 | Void setPocProportionalToTimingFlag(Bool x) { m_pocProportionalToTimingFlag = x; } |
---|
| 684 | Int getNumTicksPocDiffOneMinus1() { return m_numTicksPocDiffOneMinus1; } |
---|
| 685 | Void setNumTicksPocDiffOneMinus1(Int x) { m_numTicksPocDiffOneMinus1 = x; } |
---|
| 686 | Bool getBitstreamRestrictionFlag() { return m_bitstreamRestrictionFlag; } |
---|
| 687 | Void setBitstreamRestrictionFlag(Bool i) { m_bitstreamRestrictionFlag = i; } |
---|
| 688 | Bool getTilesFixedStructureFlag() { return m_tilesFixedStructureFlag; } |
---|
| 689 | Void setTilesFixedStructureFlag(Bool i) { m_tilesFixedStructureFlag = i; } |
---|
| 690 | Bool getMotionVectorsOverPicBoundariesFlag() { return m_motionVectorsOverPicBoundariesFlag; } |
---|
| 691 | Void setMotionVectorsOverPicBoundariesFlag(Bool i) { m_motionVectorsOverPicBoundariesFlag = i; } |
---|
| 692 | Int getMinSpatialSegmentationIdc() { return m_minSpatialSegmentationIdc; } |
---|
| 693 | Void setMinSpatialSegmentationIdc(Int i) { m_minSpatialSegmentationIdc = i; } |
---|
| 694 | Int getMaxBytesPerPicDenom() { return m_maxBytesPerPicDenom; } |
---|
| 695 | Void setMaxBytesPerPicDenom(Int i) { m_maxBytesPerPicDenom = i; } |
---|
| 696 | Int getMaxBitsPerMinCuDenom() { return m_maxBitsPerMinCuDenom; } |
---|
| 697 | Void setMaxBitsPerMinCuDenom(Int i) { m_maxBitsPerMinCuDenom = i; } |
---|
| 698 | Int getLog2MaxMvLengthHorizontal() { return m_log2MaxMvLengthHorizontal; } |
---|
| 699 | Void setLog2MaxMvLengthHorizontal(Int i) { m_log2MaxMvLengthHorizontal = i; } |
---|
| 700 | Int getLog2MaxMvLengthVertical() { return m_log2MaxMvLengthVertical; } |
---|
| 701 | Void setLog2MaxMvLengthVertical(Int i) { m_log2MaxMvLengthVertical = i; } |
---|
| 702 | |
---|
| 703 | #if L0046_CONSTRAINT_FLAGS |
---|
| 704 | Bool getProgressiveSourceFlag() const { return m_progressiveSourceFlag; } |
---|
| 705 | Void setProgressiveSourceFlag(Bool b) { m_progressiveSourceFlag = b; } |
---|
| 706 | |
---|
| 707 | Bool getInterlacedSourceFlag() const { return m_interlacedSourceFlag; } |
---|
| 708 | Void setInterlacedSourceFlag(Bool b) { m_interlacedSourceFlag = b; } |
---|
| 709 | |
---|
| 710 | Bool getNonPackedConstraintFlag() const { return m_nonPackedConstraintFlag; } |
---|
| 711 | Void setNonPackedConstraintFlag(Bool b) { m_nonPackedConstraintFlag = b; } |
---|
| 712 | |
---|
| 713 | Bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; } |
---|
| 714 | Void setFrameOnlyConstraintFlag(Bool b) { m_frameOnlyConstraintFlag = b; } |
---|
| 715 | #endif |
---|
[54] | 716 | |
---|
| 717 | #if SVC_EXTENSION |
---|
| 718 | UInt getLayerId () { return m_layerId; } |
---|
| 719 | Void setLayerId (UInt layer) { m_layerId = layer; } |
---|
| 720 | UInt getNumLayer () { return m_numLayer; } |
---|
| 721 | Void setNumLayer (UInt uiNum) { m_numLayer = uiNum; } |
---|
| 722 | Void setConformanceMode (Int mode) { m_conformanceMode = mode; } |
---|
| 723 | Void setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; } |
---|
| 724 | #endif |
---|
| 725 | #if REF_IDX_FRAMEWORK |
---|
| 726 | Void setElRapSliceTypeB(Int bEnabled) {m_elRapSliceBEnabled = bEnabled;} |
---|
| 727 | Int getElRapSliceTypeB() {return m_elRapSliceBEnabled;} |
---|
| 728 | #endif |
---|
[51] | 729 | }; |
---|
| 730 | |
---|
| 731 | //! \} |
---|
| 732 | |
---|
| 733 | #endif // !defined(AFX_TENCCFG_H__6B99B797_F4DA_4E46_8E78_7656339A6C41__INCLUDED_) |
---|