[191] | 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 | Bool m_progressiveSourceFlag; |
---|
| 119 | Bool m_interlacedSourceFlag; |
---|
| 120 | Bool m_nonPackedConstraintFlag; |
---|
| 121 | Bool m_frameOnlyConstraintFlag; |
---|
| 122 | |
---|
| 123 | //====== Coding Structure ======== |
---|
| 124 | UInt m_uiIntraPeriod; |
---|
| 125 | UInt m_uiDecodingRefreshType; ///< the type of decoding refresh employed for the random access. |
---|
| 126 | Int m_iGOPSize; |
---|
| 127 | GOPEntry m_GOPList[MAX_GOP]; |
---|
| 128 | Int m_extraRPSs; |
---|
| 129 | Int m_maxDecPicBuffering[MAX_TLAYER]; |
---|
| 130 | Int m_numReorderPics[MAX_TLAYER]; |
---|
| 131 | |
---|
| 132 | Int m_iQP; // if (AdaptiveQP == OFF) |
---|
| 133 | |
---|
| 134 | Int m_aiPad[2]; |
---|
| 135 | |
---|
| 136 | |
---|
| 137 | Int m_iMaxRefPicNum; ///< this is used to mimic the sliding mechanism used by the decoder |
---|
| 138 | // TODO: We need to have a common sliding mechanism used by both the encoder and decoder |
---|
| 139 | |
---|
| 140 | Int m_maxTempLayer; ///< Max temporal layer |
---|
| 141 | Bool m_useAMP; |
---|
| 142 | #if VPS_EXTN_DIRECT_REF_LAYERS |
---|
| 143 | Int m_numDirectRefLayers; |
---|
| 144 | Int m_refLayerId[MAX_VPS_LAYER_ID_PLUS1]; |
---|
[282] | 145 | |
---|
| 146 | Int m_numActiveRefLayers; |
---|
| 147 | Int m_predLayerId[MAX_VPS_LAYER_ID_PLUS1]; |
---|
[290] | 148 | #if M0457_PREDICTION_INDICATIONS |
---|
| 149 | Int m_numSamplePredRefLayers; |
---|
| 150 | Int m_samplePredRefLayerId[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 151 | Int m_numMotionPredRefLayers; |
---|
| 152 | Int m_motionPredRefLayerId[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 153 | Bool m_samplePredEnabledFlag[MAX_VPS_LAYER_ID_PLUS1]; |
---|
| 154 | Bool m_motionPredEnabledFlag[MAX_VPS_LAYER_ID_PLUS1]; |
---|
[191] | 155 | #endif |
---|
[290] | 156 | #endif |
---|
[191] | 157 | //======= Transform ============= |
---|
| 158 | UInt m_uiQuadtreeTULog2MaxSize; |
---|
| 159 | UInt m_uiQuadtreeTULog2MinSize; |
---|
| 160 | UInt m_uiQuadtreeTUMaxDepthInter; |
---|
| 161 | UInt m_uiQuadtreeTUMaxDepthIntra; |
---|
| 162 | |
---|
| 163 | //====== Loop/Deblock Filter ======== |
---|
| 164 | Bool m_bLoopFilterDisable; |
---|
| 165 | Bool m_loopFilterOffsetInPPS; |
---|
| 166 | Int m_loopFilterBetaOffsetDiv2; |
---|
| 167 | Int m_loopFilterTcOffsetDiv2; |
---|
| 168 | Bool m_DeblockingFilterControlPresent; |
---|
| 169 | Bool m_DeblockingFilterMetric; |
---|
| 170 | Bool m_bUseSAO; |
---|
| 171 | Int m_maxNumOffsetsPerPic; |
---|
| 172 | Bool m_saoLcuBoundary; |
---|
| 173 | Bool m_saoLcuBasedOptimization; |
---|
| 174 | |
---|
| 175 | //====== Lossless ======== |
---|
| 176 | Bool m_useLossless; |
---|
| 177 | //====== Motion search ======== |
---|
| 178 | Int m_iFastSearch; // 0:Full search 1:Diamond 2:PMVFAST |
---|
| 179 | Int m_iSearchRange; // 0:Full frame |
---|
| 180 | Int m_bipredSearchRange; |
---|
| 181 | |
---|
| 182 | //====== Quality control ======== |
---|
| 183 | Int m_iMaxDeltaQP; // Max. absolute delta QP (1:default) |
---|
| 184 | Int m_iMaxCuDQPDepth; // Max. depth for a minimum CuDQP (0:default) |
---|
| 185 | |
---|
| 186 | Int m_chromaCbQpOffset; // Chroma Cb QP Offset (0:default) |
---|
| 187 | Int m_chromaCrQpOffset; // Chroma Cr Qp Offset (0:default) |
---|
| 188 | |
---|
| 189 | #if ADAPTIVE_QP_SELECTION |
---|
| 190 | Bool m_bUseAdaptQpSelect; |
---|
| 191 | #endif |
---|
| 192 | |
---|
| 193 | Bool m_bUseAdaptiveQP; |
---|
| 194 | Int m_iQPAdaptationRange; |
---|
| 195 | |
---|
| 196 | //====== Tool list ======== |
---|
| 197 | Bool m_bUseSBACRD; |
---|
| 198 | Bool m_bUseASR; |
---|
| 199 | Bool m_bUseHADME; |
---|
| 200 | Bool m_useRDOQ; |
---|
| 201 | Bool m_useRDOQTS; |
---|
| 202 | UInt m_rdPenalty; |
---|
| 203 | Bool m_bUseFastEnc; |
---|
| 204 | Bool m_bUseEarlyCU; |
---|
| 205 | Bool m_useFastDecisionForMerge; |
---|
| 206 | Bool m_bUseCbfFastMode; |
---|
| 207 | Bool m_useEarlySkipDetection; |
---|
[212] | 208 | #if FAST_INTRA_SHVC |
---|
| 209 | Bool m_useFastIntraScalable; |
---|
| 210 | #endif |
---|
[191] | 211 | Bool m_useTransformSkip; |
---|
| 212 | Bool m_useTransformSkipFast; |
---|
| 213 | Int* m_aidQP; |
---|
| 214 | UInt m_uiDeltaQpRD; |
---|
| 215 | |
---|
| 216 | Bool m_bUseConstrainedIntraPred; |
---|
| 217 | Bool m_usePCM; |
---|
| 218 | UInt m_pcmLog2MaxSize; |
---|
| 219 | UInt m_uiPCMLog2MinSize; |
---|
| 220 | //====== Slice ======== |
---|
| 221 | Int m_sliceMode; |
---|
| 222 | Int m_sliceArgument; |
---|
| 223 | //====== Dependent Slice ======== |
---|
| 224 | Int m_sliceSegmentMode; |
---|
| 225 | Int m_sliceSegmentArgument; |
---|
| 226 | Bool m_bLFCrossSliceBoundaryFlag; |
---|
| 227 | |
---|
| 228 | Bool m_bPCMInputBitDepthFlag; |
---|
| 229 | UInt m_uiPCMBitDepthLuma; |
---|
| 230 | UInt m_uiPCMBitDepthChroma; |
---|
| 231 | Bool m_bPCMFilterDisableFlag; |
---|
| 232 | Bool m_loopFilterAcrossTilesEnabledFlag; |
---|
| 233 | Int m_iUniformSpacingIdr; |
---|
| 234 | Int m_iNumColumnsMinus1; |
---|
| 235 | UInt* m_puiColumnWidth; |
---|
| 236 | Int m_iNumRowsMinus1; |
---|
| 237 | UInt* m_puiRowHeight; |
---|
| 238 | |
---|
| 239 | Int m_iWaveFrontSynchro; |
---|
| 240 | Int m_iWaveFrontSubstreams; |
---|
| 241 | |
---|
| 242 | Int m_decodedPictureHashSEIEnabled; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message |
---|
| 243 | Int m_bufferingPeriodSEIEnabled; |
---|
| 244 | Int m_pictureTimingSEIEnabled; |
---|
| 245 | Int m_recoveryPointSEIEnabled; |
---|
| 246 | Bool m_toneMappingInfoSEIEnabled; |
---|
| 247 | Int m_toneMapId; |
---|
| 248 | Bool m_toneMapCancelFlag; |
---|
| 249 | Bool m_toneMapPersistenceFlag; |
---|
| 250 | Int m_codedDataBitDepth; |
---|
| 251 | Int m_targetBitDepth; |
---|
| 252 | Int m_modelId; |
---|
| 253 | Int m_minValue; |
---|
| 254 | Int m_maxValue; |
---|
| 255 | Int m_sigmoidMidpoint; |
---|
| 256 | Int m_sigmoidWidth; |
---|
| 257 | Int m_numPivots; |
---|
| 258 | Int m_cameraIsoSpeedIdc; |
---|
| 259 | Int m_cameraIsoSpeedValue; |
---|
| 260 | Int m_exposureCompensationValueSignFlag; |
---|
| 261 | Int m_exposureCompensationValueNumerator; |
---|
| 262 | Int m_exposureCompensationValueDenomIdc; |
---|
| 263 | Int m_refScreenLuminanceWhite; |
---|
| 264 | Int m_extendedRangeWhiteLevel; |
---|
| 265 | Int m_nominalBlackLevelLumaCodeValue; |
---|
| 266 | Int m_nominalWhiteLevelLumaCodeValue; |
---|
| 267 | Int m_extendedWhiteLevelLumaCodeValue; |
---|
| 268 | Int* m_startOfCodedInterval; |
---|
| 269 | Int* m_codedPivotValue; |
---|
| 270 | Int* m_targetPivotValue; |
---|
| 271 | Int m_framePackingSEIEnabled; |
---|
| 272 | Int m_framePackingSEIType; |
---|
| 273 | Int m_framePackingSEIId; |
---|
| 274 | Int m_framePackingSEIQuincunx; |
---|
| 275 | Int m_framePackingSEIInterpretation; |
---|
| 276 | Int m_displayOrientationSEIAngle; |
---|
| 277 | Int m_temporalLevel0IndexSEIEnabled; |
---|
| 278 | Int m_gradualDecodingRefreshInfoEnabled; |
---|
| 279 | Int m_decodingUnitInfoSEIEnabled; |
---|
[292] | 280 | #if M0043_LAYERS_PRESENT_SEI |
---|
| 281 | Int m_layersPresentSEIEnabled; |
---|
| 282 | #endif |
---|
[191] | 283 | Int m_SOPDescriptionSEIEnabled; |
---|
| 284 | Int m_scalableNestingSEIEnabled; |
---|
| 285 | //====== Weighted Prediction ======== |
---|
| 286 | Bool m_useWeightedPred; //< Use of Weighting Prediction (P_SLICE) |
---|
| 287 | Bool m_useWeightedBiPred; //< Use of Bi-directional Weighting Prediction (B_SLICE) |
---|
| 288 | UInt m_log2ParallelMergeLevelMinus2; ///< Parallel merge estimation region |
---|
| 289 | UInt m_maxNumMergeCand; ///< Maximum number of merge candidates |
---|
| 290 | Int m_useScalingListId; ///< Using quantization matrix i.e. 0=off, 1=default, 2=file. |
---|
| 291 | Char* m_scalingListFile; ///< quantization matrix file name |
---|
| 292 | Int m_TMVPModeId; |
---|
| 293 | Int m_signHideFlag; |
---|
| 294 | #if RATE_CONTROL_LAMBDA_DOMAIN |
---|
| 295 | Bool m_RCEnableRateControl; |
---|
| 296 | Int m_RCTargetBitrate; |
---|
[302] | 297 | #if M0036_RC_IMPROVEMENT |
---|
| 298 | Int m_RCKeepHierarchicalBit; |
---|
| 299 | #else |
---|
[191] | 300 | Bool m_RCKeepHierarchicalBit; |
---|
[302] | 301 | #endif |
---|
[191] | 302 | Bool m_RCLCULevelRC; |
---|
| 303 | Bool m_RCUseLCUSeparateModel; |
---|
| 304 | Int m_RCInitialQP; |
---|
| 305 | Bool m_RCForceIntraQP; |
---|
| 306 | #else |
---|
| 307 | Bool m_enableRateCtrl; ///< Flag for using rate control algorithm |
---|
| 308 | Int m_targetBitrate; ///< target bitrate |
---|
| 309 | Int m_numLCUInUnit; ///< Total number of LCUs in a frame should be divided by the NumLCUInUnit |
---|
| 310 | #endif |
---|
| 311 | Bool m_TransquantBypassEnableFlag; ///< transquant_bypass_enable_flag setting in PPS. |
---|
| 312 | Bool m_CUTransquantBypassFlagValue; ///< if transquant_bypass_enable_flag, the fixed value to use for the per-CU cu_transquant_bypass_flag. |
---|
| 313 | #if SVC_EXTENSION |
---|
| 314 | static TComVPS m_cVPS; |
---|
| 315 | #else |
---|
| 316 | TComVPS m_cVPS; |
---|
| 317 | #endif |
---|
| 318 | Bool m_recalculateQPAccordingToLambda; ///< recalculate QP value according to the lambda value |
---|
| 319 | Int m_activeParameterSetsSEIEnabled; ///< enable active parameter set SEI message |
---|
| 320 | Bool m_vuiParametersPresentFlag; ///< enable generation of VUI parameters |
---|
| 321 | Bool m_aspectRatioInfoPresentFlag; ///< Signals whether aspect_ratio_idc is present |
---|
| 322 | Int m_aspectRatioIdc; ///< aspect_ratio_idc |
---|
| 323 | Int m_sarWidth; ///< horizontal size of the sample aspect ratio |
---|
| 324 | Int m_sarHeight; ///< vertical size of the sample aspect ratio |
---|
| 325 | Bool m_overscanInfoPresentFlag; ///< Signals whether overscan_appropriate_flag is present |
---|
| 326 | Bool m_overscanAppropriateFlag; ///< Indicates whether conformant decoded pictures are suitable for display using overscan |
---|
| 327 | Bool m_videoSignalTypePresentFlag; ///< Signals whether video_format, video_full_range_flag, and colour_description_present_flag are present |
---|
| 328 | Int m_videoFormat; ///< Indicates representation of pictures |
---|
| 329 | Bool m_videoFullRangeFlag; ///< Indicates the black level and range of luma and chroma signals |
---|
| 330 | Bool m_colourDescriptionPresentFlag; ///< Signals whether colour_primaries, transfer_characteristics and matrix_coefficients are present |
---|
| 331 | Int m_colourPrimaries; ///< Indicates chromaticity coordinates of the source primaries |
---|
| 332 | Int m_transferCharacteristics; ///< Indicates the opto-electronic transfer characteristics of the source |
---|
| 333 | Int m_matrixCoefficients; ///< Describes the matrix coefficients used in deriving luma and chroma from RGB primaries |
---|
| 334 | Bool m_chromaLocInfoPresentFlag; ///< Signals whether chroma_sample_loc_type_top_field and chroma_sample_loc_type_bottom_field are present |
---|
| 335 | Int m_chromaSampleLocTypeTopField; ///< Specifies the location of chroma samples for top field |
---|
| 336 | Int m_chromaSampleLocTypeBottomField; ///< Specifies the location of chroma samples for bottom field |
---|
| 337 | Bool m_neutralChromaIndicationFlag; ///< Indicates that the value of all decoded chroma samples is equal to 1<<(BitDepthCr-1) |
---|
| 338 | Window m_defaultDisplayWindow; ///< Represents the default display window parameters |
---|
| 339 | Bool m_frameFieldInfoPresentFlag; ///< Indicates that pic_struct and other field coding related values are present in picture timing SEI messages |
---|
| 340 | Bool m_pocProportionalToTimingFlag; ///< Indicates that the POC value is proportional to the output time w.r.t. first picture in CVS |
---|
| 341 | Int m_numTicksPocDiffOneMinus1; ///< Number of ticks minus 1 that for a POC difference of one |
---|
| 342 | Bool m_bitstreamRestrictionFlag; ///< Signals whether bitstream restriction parameters are present |
---|
| 343 | Bool m_tilesFixedStructureFlag; ///< Indicates that each active picture parameter set has the same values of the syntax elements related to tiles |
---|
| 344 | Bool m_motionVectorsOverPicBoundariesFlag; ///< Indicates that no samples outside the picture boundaries are used for inter prediction |
---|
| 345 | Int m_minSpatialSegmentationIdc; ///< Indicates the maximum size of the spatial segments in the pictures in the coded video sequence |
---|
| 346 | 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 |
---|
| 347 | Int m_maxBitsPerMinCuDenom; ///< Indicates an upper bound for the number of bits of coding_unit() data |
---|
| 348 | Int m_log2MaxMvLengthHorizontal; ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units |
---|
| 349 | Int m_log2MaxMvLengthVertical; ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units |
---|
| 350 | |
---|
| 351 | Bool m_useStrongIntraSmoothing; ///< enable the use of strong intra smoothing (bi_linear interpolation) for 32x32 blocks when reference samples are flat. |
---|
| 352 | #if SVC_EXTENSION |
---|
| 353 | UInt m_layerId; |
---|
| 354 | UInt m_numLayer; |
---|
| 355 | #endif |
---|
| 356 | #if REF_IDX_FRAMEWORK |
---|
| 357 | Int m_elRapSliceBEnabled; |
---|
| 358 | #endif |
---|
[296] | 359 | #if M0040_ADAPTIVE_RESOLUTION_CHANGE |
---|
| 360 | Int m_adaptiveResolutionChange; |
---|
| 361 | #endif |
---|
[191] | 362 | |
---|
| 363 | public: |
---|
| 364 | TEncCfg() |
---|
| 365 | : m_puiColumnWidth() |
---|
| 366 | , m_puiRowHeight() |
---|
| 367 | {} |
---|
| 368 | |
---|
| 369 | virtual ~TEncCfg() |
---|
| 370 | { |
---|
| 371 | delete[] m_puiColumnWidth; |
---|
| 372 | delete[] m_puiRowHeight; |
---|
| 373 | } |
---|
| 374 | |
---|
| 375 | Void setProfile(Profile::Name profile) { m_profile = profile; } |
---|
| 376 | Void setLevel(Level::Tier tier, Level::Name level) { m_levelTier = tier; m_level = level; } |
---|
| 377 | |
---|
| 378 | Void setFrameRate ( Int i ) { m_iFrameRate = i; } |
---|
| 379 | Void setFrameSkip ( UInt i ) { m_FrameSkip = i; } |
---|
| 380 | Void setSourceWidth ( Int i ) { m_iSourceWidth = i; } |
---|
| 381 | Void setSourceHeight ( Int i ) { m_iSourceHeight = i; } |
---|
| 382 | |
---|
| 383 | Window &getConformanceWindow() { return m_conformanceWindow; } |
---|
| 384 | Void setConformanceWindow (Int confLeft, Int confRight, Int confTop, Int confBottom ) { m_conformanceWindow.setWindow (confLeft, confRight, confTop, confBottom); } |
---|
| 385 | |
---|
| 386 | Void setFramesToBeEncoded ( Int i ) { m_framesToBeEncoded = i; } |
---|
| 387 | |
---|
| 388 | //====== Coding Structure ======== |
---|
| 389 | Void setIntraPeriod ( Int i ) { m_uiIntraPeriod = (UInt)i; } |
---|
| 390 | Void setDecodingRefreshType ( Int i ) { m_uiDecodingRefreshType = (UInt)i; } |
---|
| 391 | Void setGOPSize ( Int i ) { m_iGOPSize = i; } |
---|
| 392 | Void setGopList ( GOPEntry* GOPList ) { for ( Int i = 0; i < MAX_GOP; i++ ) m_GOPList[i] = GOPList[i]; } |
---|
| 393 | Void setExtraRPSs ( Int i ) { m_extraRPSs = i; } |
---|
| 394 | GOPEntry getGOPEntry ( Int i ) { return m_GOPList[i]; } |
---|
| 395 | Void setMaxDecPicBuffering ( UInt u, UInt tlayer ) { m_maxDecPicBuffering[tlayer] = u; } |
---|
| 396 | Void setNumReorderPics ( Int i, UInt tlayer ) { m_numReorderPics[tlayer] = i; } |
---|
| 397 | |
---|
| 398 | Void setQP ( Int i ) { m_iQP = i; } |
---|
| 399 | |
---|
| 400 | Void setPad ( Int* iPad ) { for ( Int i = 0; i < 2; i++ ) m_aiPad[i] = iPad[i]; } |
---|
| 401 | |
---|
| 402 | Int getMaxRefPicNum () { return m_iMaxRefPicNum; } |
---|
| 403 | Void setMaxRefPicNum ( Int iMaxRefPicNum ) { m_iMaxRefPicNum = iMaxRefPicNum; } |
---|
| 404 | |
---|
| 405 | Bool getMaxTempLayer () { return m_maxTempLayer; } |
---|
| 406 | Void setMaxTempLayer ( Int maxTempLayer ) { m_maxTempLayer = maxTempLayer; } |
---|
| 407 | #if VPS_EXTN_DIRECT_REF_LAYERS |
---|
| 408 | Int getNumDirectRefLayers () { return m_numDirectRefLayers; } |
---|
| 409 | Void setNumDirectRefLayers (Int num) { m_numDirectRefLayers = num; } |
---|
| 410 | |
---|
| 411 | Int getRefLayerId (Int i) { return m_refLayerId[i]; } |
---|
| 412 | Void setRefLayerId (Int i, Int refLayerId) { m_refLayerId[i] = refLayerId; } |
---|
[282] | 413 | |
---|
| 414 | Int getNumActiveRefLayers () { return m_numActiveRefLayers; } |
---|
| 415 | Void setNumActiveRefLayers (Int num) { m_numActiveRefLayers = num; } |
---|
| 416 | |
---|
| 417 | Int getPredLayerId (Int i) { return m_predLayerId[i]; } |
---|
| 418 | Void setPredLayerId (Int i, Int refLayerId) { m_predLayerId[i] = refLayerId; } |
---|
[290] | 419 | |
---|
| 420 | #if M0457_PREDICTION_INDICATIONS |
---|
| 421 | Int getNumSamplePredRefLayers () { return m_numSamplePredRefLayers; } |
---|
| 422 | Void setNumSamplePredRefLayers (Int num) { m_numSamplePredRefLayers = num; } |
---|
| 423 | |
---|
| 424 | Int getSamplePredRefLayerId (Int i) { return m_samplePredRefLayerId[i]; } |
---|
| 425 | Void setSamplePredRefLayerId (Int i, Int refLayerId) { m_samplePredRefLayerId[i] = refLayerId; } |
---|
| 426 | |
---|
| 427 | Int getNumMotionPredRefLayers () { return m_numMotionPredRefLayers; } |
---|
| 428 | Void setNumMotionPredRefLayers (Int num) { m_numMotionPredRefLayers = num; } |
---|
| 429 | |
---|
| 430 | Int getMotionPredRefLayerId (Int i) { return m_motionPredRefLayerId[i]; } |
---|
| 431 | Void setMotionPredRefLayerId (Int i, Int refLayerId) { m_motionPredRefLayerId[i] = refLayerId; } |
---|
| 432 | |
---|
| 433 | Bool getSamplePredEnabledFlag (Int i) { return m_samplePredEnabledFlag[i]; } |
---|
| 434 | Void setSamplePredEnabledFlag (Int i,Bool flag) { m_samplePredEnabledFlag[i] = flag; } |
---|
| 435 | |
---|
| 436 | Bool getMotionPredEnabledFlag (Int i) { return m_motionPredEnabledFlag[i]; } |
---|
| 437 | Void setMotionPredEnabledFlag (Int i,Bool flag) { m_motionPredEnabledFlag[i] = flag; } |
---|
[191] | 438 | #endif |
---|
[290] | 439 | #endif |
---|
[191] | 440 | //======== Transform ============= |
---|
| 441 | Void setQuadtreeTULog2MaxSize ( UInt u ) { m_uiQuadtreeTULog2MaxSize = u; } |
---|
| 442 | Void setQuadtreeTULog2MinSize ( UInt u ) { m_uiQuadtreeTULog2MinSize = u; } |
---|
| 443 | Void setQuadtreeTUMaxDepthInter ( UInt u ) { m_uiQuadtreeTUMaxDepthInter = u; } |
---|
| 444 | Void setQuadtreeTUMaxDepthIntra ( UInt u ) { m_uiQuadtreeTUMaxDepthIntra = u; } |
---|
| 445 | |
---|
| 446 | Void setUseAMP( Bool b ) { m_useAMP = b; } |
---|
| 447 | |
---|
| 448 | //====== Loop/Deblock Filter ======== |
---|
| 449 | Void setLoopFilterDisable ( Bool b ) { m_bLoopFilterDisable = b; } |
---|
| 450 | Void setLoopFilterOffsetInPPS ( Bool b ) { m_loopFilterOffsetInPPS = b; } |
---|
| 451 | Void setLoopFilterBetaOffset ( Int i ) { m_loopFilterBetaOffsetDiv2 = i; } |
---|
| 452 | Void setLoopFilterTcOffset ( Int i ) { m_loopFilterTcOffsetDiv2 = i; } |
---|
| 453 | Void setDeblockingFilterControlPresent ( Bool b ) { m_DeblockingFilterControlPresent = b; } |
---|
| 454 | Void setDeblockingFilterMetric ( Bool b ) { m_DeblockingFilterMetric = b; } |
---|
| 455 | |
---|
| 456 | //====== Motion search ======== |
---|
| 457 | Void setFastSearch ( Int i ) { m_iFastSearch = i; } |
---|
| 458 | Void setSearchRange ( Int i ) { m_iSearchRange = i; } |
---|
| 459 | Void setBipredSearchRange ( Int i ) { m_bipredSearchRange = i; } |
---|
| 460 | |
---|
| 461 | //====== Quality control ======== |
---|
| 462 | Void setMaxDeltaQP ( Int i ) { m_iMaxDeltaQP = i; } |
---|
| 463 | Void setMaxCuDQPDepth ( Int i ) { m_iMaxCuDQPDepth = i; } |
---|
| 464 | |
---|
| 465 | Void setChromaCbQpOffset ( Int i ) { m_chromaCbQpOffset = i; } |
---|
| 466 | Void setChromaCrQpOffset ( Int i ) { m_chromaCrQpOffset = i; } |
---|
| 467 | |
---|
| 468 | #if ADAPTIVE_QP_SELECTION |
---|
| 469 | Void setUseAdaptQpSelect ( Bool i ) { m_bUseAdaptQpSelect = i; } |
---|
| 470 | Bool getUseAdaptQpSelect () { return m_bUseAdaptQpSelect; } |
---|
| 471 | #endif |
---|
| 472 | |
---|
| 473 | Void setUseAdaptiveQP ( Bool b ) { m_bUseAdaptiveQP = b; } |
---|
| 474 | Void setQPAdaptationRange ( Int i ) { m_iQPAdaptationRange = i; } |
---|
| 475 | |
---|
| 476 | //====== Lossless ======== |
---|
| 477 | Void setUseLossless (Bool b ) { m_useLossless = b; } |
---|
| 478 | //====== Sequence ======== |
---|
| 479 | Int getFrameRate () { return m_iFrameRate; } |
---|
| 480 | UInt getFrameSkip () { return m_FrameSkip; } |
---|
| 481 | Int getSourceWidth () { return m_iSourceWidth; } |
---|
| 482 | Int getSourceHeight () { return m_iSourceHeight; } |
---|
| 483 | Int getFramesToBeEncoded () { return m_framesToBeEncoded; } |
---|
| 484 | void setLambdaModifier ( UInt uiIndex, Double dValue ) { m_adLambdaModifier[ uiIndex ] = dValue; } |
---|
| 485 | Double getLambdaModifier ( UInt uiIndex ) const { return m_adLambdaModifier[ uiIndex ]; } |
---|
| 486 | |
---|
| 487 | //==== Coding Structure ======== |
---|
| 488 | UInt getIntraPeriod () { return m_uiIntraPeriod; } |
---|
| 489 | UInt getDecodingRefreshType () { return m_uiDecodingRefreshType; } |
---|
| 490 | Int getGOPSize () { return m_iGOPSize; } |
---|
| 491 | Int getMaxDecPicBuffering (UInt tlayer) { return m_maxDecPicBuffering[tlayer]; } |
---|
| 492 | Int getNumReorderPics (UInt tlayer) { return m_numReorderPics[tlayer]; } |
---|
| 493 | Int getQP () { return m_iQP; } |
---|
| 494 | |
---|
| 495 | Int getPad ( Int i ) { assert (i < 2 ); return m_aiPad[i]; } |
---|
| 496 | |
---|
| 497 | //======== Transform ============= |
---|
| 498 | UInt getQuadtreeTULog2MaxSize () const { return m_uiQuadtreeTULog2MaxSize; } |
---|
| 499 | UInt getQuadtreeTULog2MinSize () const { return m_uiQuadtreeTULog2MinSize; } |
---|
| 500 | UInt getQuadtreeTUMaxDepthInter () const { return m_uiQuadtreeTUMaxDepthInter; } |
---|
| 501 | UInt getQuadtreeTUMaxDepthIntra () const { return m_uiQuadtreeTUMaxDepthIntra; } |
---|
| 502 | |
---|
| 503 | //==== Loop/Deblock Filter ======== |
---|
| 504 | Bool getLoopFilterDisable () { return m_bLoopFilterDisable; } |
---|
| 505 | Bool getLoopFilterOffsetInPPS () { return m_loopFilterOffsetInPPS; } |
---|
| 506 | Int getLoopFilterBetaOffset () { return m_loopFilterBetaOffsetDiv2; } |
---|
| 507 | Int getLoopFilterTcOffset () { return m_loopFilterTcOffsetDiv2; } |
---|
| 508 | Bool getDeblockingFilterControlPresent() { return m_DeblockingFilterControlPresent; } |
---|
| 509 | Bool getDeblockingFilterMetric () { return m_DeblockingFilterMetric; } |
---|
| 510 | |
---|
| 511 | //==== Motion search ======== |
---|
| 512 | Int getFastSearch () { return m_iFastSearch; } |
---|
| 513 | Int getSearchRange () { return m_iSearchRange; } |
---|
| 514 | |
---|
| 515 | //==== Quality control ======== |
---|
| 516 | Int getMaxDeltaQP () { return m_iMaxDeltaQP; } |
---|
| 517 | Int getMaxCuDQPDepth () { return m_iMaxCuDQPDepth; } |
---|
| 518 | Bool getUseAdaptiveQP () { return m_bUseAdaptiveQP; } |
---|
| 519 | Int getQPAdaptationRange () { return m_iQPAdaptationRange; } |
---|
| 520 | //====== Lossless ======== |
---|
| 521 | Bool getUseLossless () { return m_useLossless; } |
---|
| 522 | |
---|
| 523 | //==== Tool list ======== |
---|
| 524 | Void setUseSBACRD ( Bool b ) { m_bUseSBACRD = b; } |
---|
| 525 | Void setUseASR ( Bool b ) { m_bUseASR = b; } |
---|
| 526 | Void setUseHADME ( Bool b ) { m_bUseHADME = b; } |
---|
| 527 | Void setUseRDOQ ( Bool b ) { m_useRDOQ = b; } |
---|
| 528 | Void setUseRDOQTS ( Bool b ) { m_useRDOQTS = b; } |
---|
| 529 | Void setRDpenalty ( UInt b ) { m_rdPenalty = b; } |
---|
| 530 | Void setUseFastEnc ( Bool b ) { m_bUseFastEnc = b; } |
---|
| 531 | Void setUseEarlyCU ( Bool b ) { m_bUseEarlyCU = b; } |
---|
| 532 | Void setUseFastDecisionForMerge ( Bool b ) { m_useFastDecisionForMerge = b; } |
---|
| 533 | Void setUseCbfFastMode ( Bool b ) { m_bUseCbfFastMode = b; } |
---|
| 534 | Void setUseEarlySkipDetection ( Bool b ) { m_useEarlySkipDetection = b; } |
---|
[212] | 535 | #if FAST_INTRA_SHVC |
---|
| 536 | Void setUseFastIntraScalable ( Bool b ) { m_useFastIntraScalable = b; } |
---|
| 537 | #endif |
---|
[191] | 538 | Void setUseConstrainedIntraPred ( Bool b ) { m_bUseConstrainedIntraPred = b; } |
---|
| 539 | Void setPCMInputBitDepthFlag ( Bool b ) { m_bPCMInputBitDepthFlag = b; } |
---|
| 540 | Void setPCMFilterDisableFlag ( Bool b ) { m_bPCMFilterDisableFlag = b; } |
---|
| 541 | Void setUsePCM ( Bool b ) { m_usePCM = b; } |
---|
| 542 | Void setPCMLog2MaxSize ( UInt u ) { m_pcmLog2MaxSize = u; } |
---|
| 543 | Void setPCMLog2MinSize ( UInt u ) { m_uiPCMLog2MinSize = u; } |
---|
| 544 | Void setdQPs ( Int* p ) { m_aidQP = p; } |
---|
| 545 | Void setDeltaQpRD ( UInt u ) {m_uiDeltaQpRD = u; } |
---|
| 546 | Bool getUseSBACRD () { return m_bUseSBACRD; } |
---|
| 547 | Bool getUseASR () { return m_bUseASR; } |
---|
| 548 | Bool getUseHADME () { return m_bUseHADME; } |
---|
| 549 | Bool getUseRDOQ () { return m_useRDOQ; } |
---|
| 550 | Bool getUseRDOQTS () { return m_useRDOQTS; } |
---|
| 551 | Int getRDpenalty () { return m_rdPenalty; } |
---|
| 552 | Bool getUseFastEnc () { return m_bUseFastEnc; } |
---|
| 553 | Bool getUseEarlyCU () { return m_bUseEarlyCU; } |
---|
| 554 | Bool getUseFastDecisionForMerge () { return m_useFastDecisionForMerge; } |
---|
| 555 | Bool getUseCbfFastMode () { return m_bUseCbfFastMode; } |
---|
| 556 | Bool getUseEarlySkipDetection () { return m_useEarlySkipDetection; } |
---|
[212] | 557 | #if FAST_INTRA_SHVC |
---|
| 558 | Bool getUseFastIntraScalable () { return m_useFastIntraScalable; } |
---|
| 559 | #endif |
---|
[191] | 560 | Bool getUseConstrainedIntraPred () { return m_bUseConstrainedIntraPred; } |
---|
| 561 | Bool getPCMInputBitDepthFlag () { return m_bPCMInputBitDepthFlag; } |
---|
| 562 | Bool getPCMFilterDisableFlag () { return m_bPCMFilterDisableFlag; } |
---|
| 563 | Bool getUsePCM () { return m_usePCM; } |
---|
| 564 | UInt getPCMLog2MaxSize () { return m_pcmLog2MaxSize; } |
---|
| 565 | UInt getPCMLog2MinSize () { return m_uiPCMLog2MinSize; } |
---|
| 566 | |
---|
| 567 | Bool getUseTransformSkip () { return m_useTransformSkip; } |
---|
| 568 | Void setUseTransformSkip ( Bool b ) { m_useTransformSkip = b; } |
---|
| 569 | Bool getUseTransformSkipFast () { return m_useTransformSkipFast; } |
---|
| 570 | Void setUseTransformSkipFast ( Bool b ) { m_useTransformSkipFast = b; } |
---|
| 571 | Int* getdQPs () { return m_aidQP; } |
---|
| 572 | UInt getDeltaQpRD () { return m_uiDeltaQpRD; } |
---|
| 573 | |
---|
| 574 | //====== Slice ======== |
---|
| 575 | Void setSliceMode ( Int i ) { m_sliceMode = i; } |
---|
| 576 | Void setSliceArgument ( Int i ) { m_sliceArgument = i; } |
---|
| 577 | Int getSliceMode () { return m_sliceMode; } |
---|
| 578 | Int getSliceArgument () { return m_sliceArgument; } |
---|
| 579 | //====== Dependent Slice ======== |
---|
| 580 | Void setSliceSegmentMode ( Int i ) { m_sliceSegmentMode = i; } |
---|
| 581 | Void setSliceSegmentArgument ( Int i ) { m_sliceSegmentArgument = i; } |
---|
| 582 | Int getSliceSegmentMode () { return m_sliceSegmentMode; } |
---|
| 583 | Int getSliceSegmentArgument () { return m_sliceSegmentArgument;} |
---|
| 584 | Void setLFCrossSliceBoundaryFlag ( Bool bValue ) { m_bLFCrossSliceBoundaryFlag = bValue; } |
---|
| 585 | Bool getLFCrossSliceBoundaryFlag () { return m_bLFCrossSliceBoundaryFlag; } |
---|
| 586 | |
---|
| 587 | Void setUseSAO (Bool bVal) {m_bUseSAO = bVal;} |
---|
| 588 | Bool getUseSAO () {return m_bUseSAO;} |
---|
| 589 | Void setMaxNumOffsetsPerPic (Int iVal) { m_maxNumOffsetsPerPic = iVal; } |
---|
| 590 | Int getMaxNumOffsetsPerPic () { return m_maxNumOffsetsPerPic; } |
---|
| 591 | Void setSaoLcuBoundary (Bool val) { m_saoLcuBoundary = val; } |
---|
| 592 | Bool getSaoLcuBoundary () { return m_saoLcuBoundary; } |
---|
| 593 | Void setSaoLcuBasedOptimization (Bool val) { m_saoLcuBasedOptimization = val; } |
---|
| 594 | Bool getSaoLcuBasedOptimization () { return m_saoLcuBasedOptimization; } |
---|
| 595 | Void setLFCrossTileBoundaryFlag ( Bool val ) { m_loopFilterAcrossTilesEnabledFlag = val; } |
---|
| 596 | Bool getLFCrossTileBoundaryFlag () { return m_loopFilterAcrossTilesEnabledFlag; } |
---|
| 597 | Void setUniformSpacingIdr ( Int i ) { m_iUniformSpacingIdr = i; } |
---|
| 598 | Int getUniformSpacingIdr () { return m_iUniformSpacingIdr; } |
---|
| 599 | Void setNumColumnsMinus1 ( Int i ) { m_iNumColumnsMinus1 = i; } |
---|
| 600 | Int getNumColumnsMinus1 () { return m_iNumColumnsMinus1; } |
---|
| 601 | Void setColumnWidth ( UInt* columnWidth ) |
---|
| 602 | { |
---|
| 603 | if( m_iUniformSpacingIdr == 0 && m_iNumColumnsMinus1 > 0 ) |
---|
| 604 | { |
---|
| 605 | Int m_iWidthInCU = ( m_iSourceWidth%g_uiMaxCUWidth ) ? m_iSourceWidth/g_uiMaxCUWidth + 1 : m_iSourceWidth/g_uiMaxCUWidth; |
---|
| 606 | m_puiColumnWidth = new UInt[ m_iNumColumnsMinus1 ]; |
---|
| 607 | |
---|
| 608 | for(Int i=0; i<m_iNumColumnsMinus1; i++) |
---|
| 609 | { |
---|
| 610 | m_puiColumnWidth[i] = columnWidth[i]; |
---|
| 611 | printf("col: m_iWidthInCU= %4d i=%4d width= %4d\n",m_iWidthInCU,i,m_puiColumnWidth[i]); //AFU |
---|
| 612 | } |
---|
| 613 | } |
---|
| 614 | } |
---|
| 615 | UInt getColumnWidth ( UInt columnidx ) { return *( m_puiColumnWidth + columnidx ); } |
---|
| 616 | Void setNumRowsMinus1 ( Int i ) { m_iNumRowsMinus1 = i; } |
---|
| 617 | Int getNumRowsMinus1 () { return m_iNumRowsMinus1; } |
---|
| 618 | Void setRowHeight (UInt* rowHeight) |
---|
| 619 | { |
---|
| 620 | if( m_iUniformSpacingIdr == 0 && m_iNumRowsMinus1 > 0 ) |
---|
| 621 | { |
---|
| 622 | Int m_iHeightInCU = ( m_iSourceHeight%g_uiMaxCUHeight ) ? m_iSourceHeight/g_uiMaxCUHeight + 1 : m_iSourceHeight/g_uiMaxCUHeight; |
---|
| 623 | m_puiRowHeight = new UInt[ m_iNumRowsMinus1 ]; |
---|
| 624 | |
---|
| 625 | for(Int i=0; i<m_iNumRowsMinus1; i++) |
---|
| 626 | { |
---|
| 627 | m_puiRowHeight[i] = rowHeight[i]; |
---|
| 628 | printf("row: m_iHeightInCU=%4d i=%4d height=%4d\n",m_iHeightInCU,i,m_puiRowHeight[i]); //AFU |
---|
| 629 | } |
---|
| 630 | } |
---|
| 631 | } |
---|
| 632 | UInt getRowHeight ( UInt rowIdx ) { return *( m_puiRowHeight + rowIdx ); } |
---|
| 633 | Void xCheckGSParameters(); |
---|
| 634 | Void setWaveFrontSynchro(Int iWaveFrontSynchro) { m_iWaveFrontSynchro = iWaveFrontSynchro; } |
---|
| 635 | Int getWaveFrontsynchro() { return m_iWaveFrontSynchro; } |
---|
| 636 | Void setWaveFrontSubstreams(Int iWaveFrontSubstreams) { m_iWaveFrontSubstreams = iWaveFrontSubstreams; } |
---|
| 637 | Int getWaveFrontSubstreams() { return m_iWaveFrontSubstreams; } |
---|
| 638 | Void setDecodedPictureHashSEIEnabled(Int b) { m_decodedPictureHashSEIEnabled = b; } |
---|
| 639 | Int getDecodedPictureHashSEIEnabled() { return m_decodedPictureHashSEIEnabled; } |
---|
| 640 | Void setBufferingPeriodSEIEnabled(Int b) { m_bufferingPeriodSEIEnabled = b; } |
---|
| 641 | Int getBufferingPeriodSEIEnabled() { return m_bufferingPeriodSEIEnabled; } |
---|
| 642 | Void setPictureTimingSEIEnabled(Int b) { m_pictureTimingSEIEnabled = b; } |
---|
| 643 | Int getPictureTimingSEIEnabled() { return m_pictureTimingSEIEnabled; } |
---|
| 644 | Void setRecoveryPointSEIEnabled(Int b) { m_recoveryPointSEIEnabled = b; } |
---|
| 645 | Int getRecoveryPointSEIEnabled() { return m_recoveryPointSEIEnabled; } |
---|
| 646 | Void setToneMappingInfoSEIEnabled(Bool b) { m_toneMappingInfoSEIEnabled = b; } |
---|
| 647 | Bool getToneMappingInfoSEIEnabled() { return m_toneMappingInfoSEIEnabled; } |
---|
| 648 | Void setTMISEIToneMapId(Int b) { m_toneMapId = b; } |
---|
| 649 | Int getTMISEIToneMapId() { return m_toneMapId; } |
---|
| 650 | Void setTMISEIToneMapCancelFlag(Bool b) { m_toneMapCancelFlag=b; } |
---|
| 651 | Bool getTMISEIToneMapCancelFlag() { return m_toneMapCancelFlag; } |
---|
| 652 | Void setTMISEIToneMapPersistenceFlag(Bool b) { m_toneMapPersistenceFlag = b; } |
---|
| 653 | Bool getTMISEIToneMapPersistenceFlag() { return m_toneMapPersistenceFlag; } |
---|
| 654 | Void setTMISEICodedDataBitDepth(Int b) { m_codedDataBitDepth = b; } |
---|
| 655 | Int getTMISEICodedDataBitDepth() { return m_codedDataBitDepth; } |
---|
| 656 | Void setTMISEITargetBitDepth(Int b) { m_targetBitDepth = b; } |
---|
| 657 | Int getTMISEITargetBitDepth() { return m_targetBitDepth; } |
---|
| 658 | Void setTMISEIModelID(Int b) { m_modelId = b; } |
---|
| 659 | Int getTMISEIModelID() { return m_modelId; } |
---|
| 660 | Void setTMISEIMinValue(Int b) { m_minValue = b; } |
---|
| 661 | Int getTMISEIMinValue() { return m_minValue; } |
---|
| 662 | Void setTMISEIMaxValue(Int b) { m_maxValue = b; } |
---|
| 663 | Int getTMISEIMaxValue() { return m_maxValue; } |
---|
| 664 | Void setTMISEISigmoidMidpoint(Int b) { m_sigmoidMidpoint = b; } |
---|
| 665 | Int getTMISEISigmoidMidpoint() { return m_sigmoidMidpoint; } |
---|
| 666 | Void setTMISEISigmoidWidth(Int b) { m_sigmoidWidth = b; } |
---|
| 667 | Int getTMISEISigmoidWidth() { return m_sigmoidWidth; } |
---|
| 668 | Void setTMISEIStartOfCodedInterva( Int* p ) { m_startOfCodedInterval = p; } |
---|
| 669 | Int* getTMISEIStartOfCodedInterva() { return m_startOfCodedInterval; } |
---|
| 670 | Void setTMISEINumPivots(Int b) { m_numPivots = b; } |
---|
| 671 | Int getTMISEINumPivots() { return m_numPivots; } |
---|
| 672 | Void setTMISEICodedPivotValue( Int* p ) { m_codedPivotValue = p; } |
---|
| 673 | Int* getTMISEICodedPivotValue() { return m_codedPivotValue; } |
---|
| 674 | Void setTMISEITargetPivotValue( Int* p ) { m_targetPivotValue = p; } |
---|
| 675 | Int* getTMISEITargetPivotValue() { return m_targetPivotValue; } |
---|
| 676 | Void setTMISEICameraIsoSpeedIdc(Int b) { m_cameraIsoSpeedIdc = b; } |
---|
| 677 | Int getTMISEICameraIsoSpeedIdc() { return m_cameraIsoSpeedIdc; } |
---|
| 678 | Void setTMISEICameraIsoSpeedValue(Int b) { m_cameraIsoSpeedValue = b; } |
---|
| 679 | Int getTMISEICameraIsoSpeedValue() { return m_cameraIsoSpeedValue; } |
---|
| 680 | Void setTMISEIExposureCompensationValueSignFlag(Int b) { m_exposureCompensationValueSignFlag = b; } |
---|
| 681 | Int getTMISEIExposureCompensationValueSignFlag() { return m_exposureCompensationValueSignFlag; } |
---|
| 682 | Void setTMISEIExposureCompensationValueNumerator(Int b) { m_exposureCompensationValueNumerator = b; } |
---|
| 683 | Int getTMISEIExposureCompensationValueNumerator() { return m_exposureCompensationValueNumerator; } |
---|
| 684 | Void setTMISEIExposureCompensationValueDenomIdc(Int b) { m_exposureCompensationValueDenomIdc =b; } |
---|
| 685 | Int getTMISEIExposureCompensationValueDenomIdc() { return m_exposureCompensationValueDenomIdc; } |
---|
| 686 | Void setTMISEIRefScreenLuminanceWhite(Int b) { m_refScreenLuminanceWhite = b; } |
---|
| 687 | Int getTMISEIRefScreenLuminanceWhite() { return m_refScreenLuminanceWhite; } |
---|
| 688 | Void setTMISEIExtendedRangeWhiteLevel(Int b) { m_extendedRangeWhiteLevel = b; } |
---|
| 689 | Int getTMISEIExtendedRangeWhiteLevel() { return m_extendedRangeWhiteLevel; } |
---|
| 690 | Void setTMISEINominalBlackLevelLumaCodeValue(Int b) { m_nominalBlackLevelLumaCodeValue = b; } |
---|
| 691 | Int getTMISEINominalBlackLevelLumaCodeValue() { return m_nominalBlackLevelLumaCodeValue; } |
---|
| 692 | Void setTMISEINominalWhiteLevelLumaCodeValue(Int b) { m_nominalWhiteLevelLumaCodeValue = b; } |
---|
| 693 | Int getTMISEINominalWhiteLevelLumaCodeValue() { return m_nominalWhiteLevelLumaCodeValue; } |
---|
| 694 | Void setTMISEIExtendedWhiteLevelLumaCodeValue(Int b) { m_extendedWhiteLevelLumaCodeValue =b; } |
---|
| 695 | Int getTMISEIExtendedWhiteLevelLumaCodeValue() { return m_extendedWhiteLevelLumaCodeValue; } |
---|
| 696 | Void setFramePackingArrangementSEIEnabled(Int b) { m_framePackingSEIEnabled = b; } |
---|
| 697 | Int getFramePackingArrangementSEIEnabled() { return m_framePackingSEIEnabled; } |
---|
| 698 | Void setFramePackingArrangementSEIType(Int b) { m_framePackingSEIType = b; } |
---|
| 699 | Int getFramePackingArrangementSEIType() { return m_framePackingSEIType; } |
---|
| 700 | Void setFramePackingArrangementSEIId(Int b) { m_framePackingSEIId = b; } |
---|
| 701 | Int getFramePackingArrangementSEIId() { return m_framePackingSEIId; } |
---|
| 702 | Void setFramePackingArrangementSEIQuincunx(Int b) { m_framePackingSEIQuincunx = b; } |
---|
| 703 | Int getFramePackingArrangementSEIQuincunx() { return m_framePackingSEIQuincunx; } |
---|
| 704 | Void setFramePackingArrangementSEIInterpretation(Int b) { m_framePackingSEIInterpretation = b; } |
---|
| 705 | Int getFramePackingArrangementSEIInterpretation() { return m_framePackingSEIInterpretation; } |
---|
| 706 | Void setDisplayOrientationSEIAngle(Int b) { m_displayOrientationSEIAngle = b; } |
---|
| 707 | Int getDisplayOrientationSEIAngle() { return m_displayOrientationSEIAngle; } |
---|
| 708 | Void setTemporalLevel0IndexSEIEnabled(Int b) { m_temporalLevel0IndexSEIEnabled = b; } |
---|
| 709 | Int getTemporalLevel0IndexSEIEnabled() { return m_temporalLevel0IndexSEIEnabled; } |
---|
| 710 | Void setGradualDecodingRefreshInfoEnabled(Int b) { m_gradualDecodingRefreshInfoEnabled = b; } |
---|
| 711 | Int getGradualDecodingRefreshInfoEnabled() { return m_gradualDecodingRefreshInfoEnabled; } |
---|
| 712 | Void setDecodingUnitInfoSEIEnabled(Int b) { m_decodingUnitInfoSEIEnabled = b; } |
---|
| 713 | Int getDecodingUnitInfoSEIEnabled() { return m_decodingUnitInfoSEIEnabled; } |
---|
[292] | 714 | #if M0043_LAYERS_PRESENT_SEI |
---|
| 715 | Void setLayersPresentSEIEnabled(Int b) { m_layersPresentSEIEnabled = b; } |
---|
| 716 | Int getLayersPresentSEIEnabled() { return m_layersPresentSEIEnabled; } |
---|
| 717 | #endif |
---|
[191] | 718 | Void setSOPDescriptionSEIEnabled(Int b) { m_SOPDescriptionSEIEnabled = b; } |
---|
| 719 | Int getSOPDescriptionSEIEnabled() { return m_SOPDescriptionSEIEnabled; } |
---|
| 720 | Void setScalableNestingSEIEnabled(Int b) { m_scalableNestingSEIEnabled = b; } |
---|
| 721 | Int getScalableNestingSEIEnabled() { return m_scalableNestingSEIEnabled; } |
---|
| 722 | Void setUseWP ( Bool b ) { m_useWeightedPred = b; } |
---|
| 723 | Void setWPBiPred ( Bool b ) { m_useWeightedBiPred = b; } |
---|
| 724 | Bool getUseWP () { return m_useWeightedPred; } |
---|
| 725 | Bool getWPBiPred () { return m_useWeightedBiPred; } |
---|
| 726 | Void setLog2ParallelMergeLevelMinus2 ( UInt u ) { m_log2ParallelMergeLevelMinus2 = u; } |
---|
| 727 | UInt getLog2ParallelMergeLevelMinus2 () { return m_log2ParallelMergeLevelMinus2; } |
---|
| 728 | Void setMaxNumMergeCand ( UInt u ) { m_maxNumMergeCand = u; } |
---|
| 729 | UInt getMaxNumMergeCand () { return m_maxNumMergeCand; } |
---|
| 730 | Void setUseScalingListId ( Int u ) { m_useScalingListId = u; } |
---|
| 731 | Int getUseScalingListId () { return m_useScalingListId; } |
---|
| 732 | Void setScalingListFile ( Char* pch ){ m_scalingListFile = pch; } |
---|
| 733 | Char* getScalingListFile () { return m_scalingListFile; } |
---|
| 734 | Void setTMVPModeId ( Int u ) { m_TMVPModeId = u; } |
---|
| 735 | Int getTMVPModeId () { return m_TMVPModeId; } |
---|
| 736 | Void setSignHideFlag( Int signHideFlag ) { m_signHideFlag = signHideFlag; } |
---|
| 737 | Int getSignHideFlag() { return m_signHideFlag; } |
---|
| 738 | #if RATE_CONTROL_LAMBDA_DOMAIN |
---|
| 739 | Bool getUseRateCtrl () { return m_RCEnableRateControl; } |
---|
| 740 | Void setUseRateCtrl ( Bool b ) { m_RCEnableRateControl = b; } |
---|
| 741 | Int getTargetBitrate () { return m_RCTargetBitrate; } |
---|
| 742 | Void setTargetBitrate ( Int bitrate ) { m_RCTargetBitrate = bitrate; } |
---|
[302] | 743 | #if M0036_RC_IMPROVEMENT |
---|
| 744 | Int getKeepHierBit () { return m_RCKeepHierarchicalBit; } |
---|
| 745 | Void setKeepHierBit ( Int i ) { m_RCKeepHierarchicalBit = i; } |
---|
| 746 | #else |
---|
[191] | 747 | Bool getKeepHierBit () { return m_RCKeepHierarchicalBit; } |
---|
| 748 | Void setKeepHierBit ( Bool b ) { m_RCKeepHierarchicalBit = b; } |
---|
[302] | 749 | #endif |
---|
[191] | 750 | Bool getLCULevelRC () { return m_RCLCULevelRC; } |
---|
| 751 | Void setLCULevelRC ( Bool b ) { m_RCLCULevelRC = b; } |
---|
| 752 | Bool getUseLCUSeparateModel () { return m_RCUseLCUSeparateModel; } |
---|
| 753 | Void setUseLCUSeparateModel ( Bool b ) { m_RCUseLCUSeparateModel = b; } |
---|
| 754 | Int getInitialQP () { return m_RCInitialQP; } |
---|
| 755 | Void setInitialQP ( Int QP ) { m_RCInitialQP = QP; } |
---|
| 756 | Bool getForceIntraQP () { return m_RCForceIntraQP; } |
---|
| 757 | Void setForceIntraQP ( Bool b ) { m_RCForceIntraQP = b; } |
---|
| 758 | #else |
---|
| 759 | Bool getUseRateCtrl () { return m_enableRateCtrl; } |
---|
| 760 | Void setUseRateCtrl (Bool flag) { m_enableRateCtrl = flag; } |
---|
| 761 | Int getTargetBitrate () { return m_targetBitrate; } |
---|
| 762 | Void setTargetBitrate (Int target) { m_targetBitrate = target; } |
---|
| 763 | Int getNumLCUInUnit () { return m_numLCUInUnit; } |
---|
| 764 | Void setNumLCUInUnit (Int numLCUs) { m_numLCUInUnit = numLCUs; } |
---|
| 765 | #endif |
---|
| 766 | Bool getTransquantBypassEnableFlag() { return m_TransquantBypassEnableFlag; } |
---|
| 767 | Void setTransquantBypassEnableFlag(Bool flag) { m_TransquantBypassEnableFlag = flag; } |
---|
| 768 | Bool getCUTransquantBypassFlagValue() { return m_CUTransquantBypassFlagValue; } |
---|
| 769 | Void setCUTransquantBypassFlagValue(Bool flag) { m_CUTransquantBypassFlagValue = flag; } |
---|
| 770 | Void setVPS(TComVPS *p) { m_cVPS = *p; } |
---|
| 771 | TComVPS *getVPS() { return &m_cVPS; } |
---|
| 772 | Void setUseRecalculateQPAccordingToLambda ( Bool b ) { m_recalculateQPAccordingToLambda = b; } |
---|
| 773 | Bool getUseRecalculateQPAccordingToLambda () { return m_recalculateQPAccordingToLambda; } |
---|
| 774 | |
---|
| 775 | Void setUseStrongIntraSmoothing ( Bool b ) { m_useStrongIntraSmoothing = b; } |
---|
| 776 | Bool getUseStrongIntraSmoothing () { return m_useStrongIntraSmoothing; } |
---|
| 777 | |
---|
| 778 | Void setActiveParameterSetsSEIEnabled ( Int b ) { m_activeParameterSetsSEIEnabled = b; } |
---|
| 779 | Int getActiveParameterSetsSEIEnabled () { return m_activeParameterSetsSEIEnabled; } |
---|
| 780 | Bool getVuiParametersPresentFlag() { return m_vuiParametersPresentFlag; } |
---|
| 781 | Void setVuiParametersPresentFlag(Bool i) { m_vuiParametersPresentFlag = i; } |
---|
| 782 | Bool getAspectRatioInfoPresentFlag() { return m_aspectRatioInfoPresentFlag; } |
---|
| 783 | Void setAspectRatioInfoPresentFlag(Bool i) { m_aspectRatioInfoPresentFlag = i; } |
---|
| 784 | Int getAspectRatioIdc() { return m_aspectRatioIdc; } |
---|
| 785 | Void setAspectRatioIdc(Int i) { m_aspectRatioIdc = i; } |
---|
| 786 | Int getSarWidth() { return m_sarWidth; } |
---|
| 787 | Void setSarWidth(Int i) { m_sarWidth = i; } |
---|
| 788 | Int getSarHeight() { return m_sarHeight; } |
---|
| 789 | Void setSarHeight(Int i) { m_sarHeight = i; } |
---|
| 790 | Bool getOverscanInfoPresentFlag() { return m_overscanInfoPresentFlag; } |
---|
| 791 | Void setOverscanInfoPresentFlag(Bool i) { m_overscanInfoPresentFlag = i; } |
---|
| 792 | Bool getOverscanAppropriateFlag() { return m_overscanAppropriateFlag; } |
---|
| 793 | Void setOverscanAppropriateFlag(Bool i) { m_overscanAppropriateFlag = i; } |
---|
| 794 | Bool getVideoSignalTypePresentFlag() { return m_videoSignalTypePresentFlag; } |
---|
| 795 | Void setVideoSignalTypePresentFlag(Bool i) { m_videoSignalTypePresentFlag = i; } |
---|
| 796 | Int getVideoFormat() { return m_videoFormat; } |
---|
| 797 | Void setVideoFormat(Int i) { m_videoFormat = i; } |
---|
| 798 | Bool getVideoFullRangeFlag() { return m_videoFullRangeFlag; } |
---|
| 799 | Void setVideoFullRangeFlag(Bool i) { m_videoFullRangeFlag = i; } |
---|
| 800 | Bool getColourDescriptionPresentFlag() { return m_colourDescriptionPresentFlag; } |
---|
| 801 | Void setColourDescriptionPresentFlag(Bool i) { m_colourDescriptionPresentFlag = i; } |
---|
| 802 | Int getColourPrimaries() { return m_colourPrimaries; } |
---|
| 803 | Void setColourPrimaries(Int i) { m_colourPrimaries = i; } |
---|
| 804 | Int getTransferCharacteristics() { return m_transferCharacteristics; } |
---|
| 805 | Void setTransferCharacteristics(Int i) { m_transferCharacteristics = i; } |
---|
| 806 | Int getMatrixCoefficients() { return m_matrixCoefficients; } |
---|
| 807 | Void setMatrixCoefficients(Int i) { m_matrixCoefficients = i; } |
---|
| 808 | Bool getChromaLocInfoPresentFlag() { return m_chromaLocInfoPresentFlag; } |
---|
| 809 | Void setChromaLocInfoPresentFlag(Bool i) { m_chromaLocInfoPresentFlag = i; } |
---|
| 810 | Int getChromaSampleLocTypeTopField() { return m_chromaSampleLocTypeTopField; } |
---|
| 811 | Void setChromaSampleLocTypeTopField(Int i) { m_chromaSampleLocTypeTopField = i; } |
---|
| 812 | Int getChromaSampleLocTypeBottomField() { return m_chromaSampleLocTypeBottomField; } |
---|
| 813 | Void setChromaSampleLocTypeBottomField(Int i) { m_chromaSampleLocTypeBottomField = i; } |
---|
| 814 | Bool getNeutralChromaIndicationFlag() { return m_neutralChromaIndicationFlag; } |
---|
| 815 | Void setNeutralChromaIndicationFlag(Bool i) { m_neutralChromaIndicationFlag = i; } |
---|
| 816 | Window &getDefaultDisplayWindow() { return m_defaultDisplayWindow; } |
---|
| 817 | Void setDefaultDisplayWindow (Int offsetLeft, Int offsetRight, Int offsetTop, Int offsetBottom ) { m_defaultDisplayWindow.setWindow (offsetLeft, offsetRight, offsetTop, offsetBottom); } |
---|
| 818 | Bool getFrameFieldInfoPresentFlag() { return m_frameFieldInfoPresentFlag; } |
---|
| 819 | Void setFrameFieldInfoPresentFlag(Bool i) { m_frameFieldInfoPresentFlag = i; } |
---|
| 820 | Bool getPocProportionalToTimingFlag() { return m_pocProportionalToTimingFlag; } |
---|
| 821 | Void setPocProportionalToTimingFlag(Bool x) { m_pocProportionalToTimingFlag = x; } |
---|
| 822 | Int getNumTicksPocDiffOneMinus1() { return m_numTicksPocDiffOneMinus1; } |
---|
| 823 | Void setNumTicksPocDiffOneMinus1(Int x) { m_numTicksPocDiffOneMinus1 = x; } |
---|
| 824 | Bool getBitstreamRestrictionFlag() { return m_bitstreamRestrictionFlag; } |
---|
| 825 | Void setBitstreamRestrictionFlag(Bool i) { m_bitstreamRestrictionFlag = i; } |
---|
| 826 | Bool getTilesFixedStructureFlag() { return m_tilesFixedStructureFlag; } |
---|
| 827 | Void setTilesFixedStructureFlag(Bool i) { m_tilesFixedStructureFlag = i; } |
---|
| 828 | Bool getMotionVectorsOverPicBoundariesFlag() { return m_motionVectorsOverPicBoundariesFlag; } |
---|
| 829 | Void setMotionVectorsOverPicBoundariesFlag(Bool i) { m_motionVectorsOverPicBoundariesFlag = i; } |
---|
| 830 | Int getMinSpatialSegmentationIdc() { return m_minSpatialSegmentationIdc; } |
---|
| 831 | Void setMinSpatialSegmentationIdc(Int i) { m_minSpatialSegmentationIdc = i; } |
---|
| 832 | Int getMaxBytesPerPicDenom() { return m_maxBytesPerPicDenom; } |
---|
| 833 | Void setMaxBytesPerPicDenom(Int i) { m_maxBytesPerPicDenom = i; } |
---|
| 834 | Int getMaxBitsPerMinCuDenom() { return m_maxBitsPerMinCuDenom; } |
---|
| 835 | Void setMaxBitsPerMinCuDenom(Int i) { m_maxBitsPerMinCuDenom = i; } |
---|
| 836 | Int getLog2MaxMvLengthHorizontal() { return m_log2MaxMvLengthHorizontal; } |
---|
| 837 | Void setLog2MaxMvLengthHorizontal(Int i) { m_log2MaxMvLengthHorizontal = i; } |
---|
| 838 | Int getLog2MaxMvLengthVertical() { return m_log2MaxMvLengthVertical; } |
---|
| 839 | Void setLog2MaxMvLengthVertical(Int i) { m_log2MaxMvLengthVertical = i; } |
---|
| 840 | |
---|
| 841 | Bool getProgressiveSourceFlag() const { return m_progressiveSourceFlag; } |
---|
| 842 | Void setProgressiveSourceFlag(Bool b) { m_progressiveSourceFlag = b; } |
---|
| 843 | |
---|
| 844 | Bool getInterlacedSourceFlag() const { return m_interlacedSourceFlag; } |
---|
| 845 | Void setInterlacedSourceFlag(Bool b) { m_interlacedSourceFlag = b; } |
---|
| 846 | |
---|
| 847 | Bool getNonPackedConstraintFlag() const { return m_nonPackedConstraintFlag; } |
---|
| 848 | Void setNonPackedConstraintFlag(Bool b) { m_nonPackedConstraintFlag = b; } |
---|
| 849 | |
---|
| 850 | Bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; } |
---|
| 851 | Void setFrameOnlyConstraintFlag(Bool b) { m_frameOnlyConstraintFlag = b; } |
---|
| 852 | |
---|
| 853 | #if SVC_EXTENSION |
---|
| 854 | UInt getLayerId () { return m_layerId; } |
---|
| 855 | Void setLayerId (UInt layer) { m_layerId = layer; } |
---|
| 856 | UInt getNumLayer () { return m_numLayer; } |
---|
| 857 | Void setNumLayer (UInt uiNum) { m_numLayer = uiNum; } |
---|
| 858 | Void setConformanceMode (Int mode) { m_conformanceMode = mode; } |
---|
| 859 | Void setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; } |
---|
| 860 | #endif |
---|
| 861 | #if REF_IDX_FRAMEWORK |
---|
| 862 | Void setElRapSliceTypeB(Int bEnabled) {m_elRapSliceBEnabled = bEnabled;} |
---|
| 863 | Int getElRapSliceTypeB() {return m_elRapSliceBEnabled;} |
---|
| 864 | #endif |
---|
[296] | 865 | #if M0040_ADAPTIVE_RESOLUTION_CHANGE |
---|
| 866 | Void setAdaptiveResolutionChange(Int x) { m_adaptiveResolutionChange = x; } |
---|
| 867 | Int getAdaptiveResolutionChange() { return m_adaptiveResolutionChange; } |
---|
| 868 | #endif |
---|
[191] | 869 | }; |
---|
| 870 | |
---|
| 871 | //! \} |
---|
| 872 | |
---|
| 873 | #endif // !defined(AFX_TENCCFG_H__6B99B797_F4DA_4E46_8E78_7656339A6C41__INCLUDED_) |
---|