source: SHVCSoftware/branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h @ 1290

Last change on this file since 1290 was 1290, checked in by seregin, 10 years ago

port rev 4324 (g_uiMaxDepth, g_uiAddDepth)

  • Property svn:eol-style set to native
File size: 32.7 KB
RevLine 
[313]1/* The copyright in this software is being made available under the BSD
2 * License, included below. This software may be subject to other third party
3 * and contributor rights, including patent rights, and no such rights are
[1029]4 * granted under this license.
[313]5 *
[1259]6 * Copyright (c) 2010-2015, ITU/ISO/IEC
[313]7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are met:
11 *
12 *  * Redistributions of source code must retain the above copyright notice,
13 *    this list of conditions and the following disclaimer.
14 *  * Redistributions in binary form must reproduce the above copyright notice,
15 *    this list of conditions and the following disclaimer in the documentation
16 *    and/or other materials provided with the distribution.
17 *  * Neither the name of the ITU/ISO/IEC nor the names of its contributors may
18 *    be used to endorse or promote products derived from this software without
19 *    specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34/** \file     TAppEncCfg.h
35    \brief    Handle encoder configuration parameters (header)
36*/
37
38#ifndef __TAPPENCCFG__
39#define __TAPPENCCFG__
40
41#include "TLibCommon/CommonDef.h"
42
43#include "TLibEncoder/TEncCfg.h"
44#if SVC_EXTENSION
45#include "TAppEncLayerCfg.h"
46#endif
47#include <sstream>
[823]48#include <vector>
[313]49//! \ingroup TAppEncoder
50//! \{
51
52// ====================================================================================================================
53// Class definition
54// ====================================================================================================================
55
56/// encoder configuration class
57class TAppEncCfg
58{
59protected:
60  // file I/O
61#if SVC_EXTENSION
[442]62  TAppEncLayerCfg m_acLayerCfg [MAX_LAYERS];
[1057]63  Int       m_layerId;
[313]64  Int       m_numLayers;                                      ///< number of layers
65  Int       m_scalabilityMask[MAX_VPS_NUM_SCALABILITY_TYPES]; ///< scalability_mask
66  Char*     m_pBitstreamFile;                                 ///< output bitstream file
67  Double    m_adLambdaModifier[ MAX_TLAYER ];                 ///< Lambda modifier array for each temporal layer
68  // source specification
69  UInt      m_FrameSkip;                                      ///< number of skipped frames from the beginning
70  Int       m_framesToBeEncoded;                              ///< number of encoded frames
71#if AVC_BASE
[874]72  Int       m_nonHEVCBaseLayerFlag;                           ///< non HEVC BL
[313]73#endif
[442]74  Bool      m_maxTidRefPresentFlag; 
[1172]75
[815]76  Int       m_numLayerSets;
[1172]77  Int       m_numAddLayerSets;
[815]78  Int       m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1];
[1045]79  Int       m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_IDX_PLUS1];
[815]80  Int       m_numHighestLayerIdx[MAX_VPS_LAYER_SETS_PLUS1];
[1045]81  Int       m_highestLayerIdx[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_IDX_PLUS1];
[1172]82
[861]83  Int       m_defaultTargetOutputLayerIdc;
84  Int       m_numOutputLayerSets;
[1162]85  std::vector<Int>                m_outputLayerSetIdx;
[950]86  std::vector<Int>                m_numOutputLayersInOutputLayerSet;
[861]87  std::vector< std::vector<Int> > m_listOfOutputLayers;
[1029]88  Bool      m_isField;                                        ///< enable field coding
89  Bool      m_isTopFieldFirst;
[313]90#else
91  Char*     m_pchInputFile;                                   ///< source file name
92  Char*     m_pchBitstreamFile;                               ///< output bitstream file
93  Char*     m_pchReconFile;                                   ///< output reconstruction file
94  Double    m_adLambdaModifier[ MAX_TLAYER ];                 ///< Lambda modifier array for each temporal layer
95  // source specification
96  Int       m_iFrameRate;                                     ///< source frame-rates (Hz)
[1029]97  UInt      m_FrameSkip;                                   ///< number of skipped frames from the beginning
[313]98  Int       m_iSourceWidth;                                   ///< source width in pixel
[442]99  Int       m_iSourceHeight;                                  ///< source height in pixel (when interlaced = field height)
[1029]100
[442]101  Int       m_iSourceHeightOrg;                               ///< original source height in pixel (when interlaced = frame height)
[1029]102
103  Bool      m_isField;                                        ///< enable field coding
104  Bool      m_isTopFieldFirst;
105
[823]106  Int       m_conformanceWindowMode;
107  Int       m_confWinLeft;
108  Int       m_confWinRight;
109  Int       m_confWinTop;
110  Int       m_confWinBottom;
[313]111  Int       m_framesToBeEncoded;                              ///< number of encoded frames
112  Int       m_aiPad[2];                                       ///< number of padded pixels for width and height
113#endif 
[1029]114  InputColourSpaceConversion m_inputColourSpaceConvert;       ///< colour space conversion to apply to input video
115  Bool      m_snrInternalColourSpace;                       ///< if true, then no colour space conversion is applied for snr calculation, otherwise inverse of input is applied.
116  Bool      m_outputInternalColourSpace;                    ///< if true, then no colour space conversion is applied for reconstructed video, otherwise inverse of input is applied.
117#if !SVC_EXTENSION
[494]118  ChromaFormat m_InputChromaFormatIDC;
119#endif
[442]120
[1029]121  Bool      m_printMSEBasedSequencePSNR;
122  Bool      m_printFrameMSE;
123  Bool      m_printSequenceMSE;
124  Bool      m_cabacZeroWordPaddingEnabled;
125
[1182]126#if SVC_EXTENSION
[941]127  Int           m_numPTLInfo;
[951]128  Profile::Name m_profileList[MAX_NUM_LAYER_IDS + 1];
129  Level::Tier   m_levelTierList[MAX_NUM_LAYER_IDS + 1];
130  Level::Name   m_levelList[MAX_NUM_LAYER_IDS + 1];
131  Profile::Name m_profileCompatibility[MAX_NUM_LAYER_IDS + 1];
132  Bool          m_progressiveSourceFlagList[MAX_NUM_LAYER_IDS + 1];
133  Bool          m_interlacedSourceFlagList[MAX_NUM_LAYER_IDS + 1];
134  Bool          m_nonPackedConstraintFlagList[MAX_NUM_LAYER_IDS + 1];
135  Bool          m_frameOnlyConstraintFlagList[MAX_NUM_LAYER_IDS + 1];
[941]136
137  std::vector< std::vector<Int> > m_listOfLayerPTLofOlss;
[942]138#else
[1029]139  // profile/level
[942]140  Profile::Name m_profile;
141  Level::Tier   m_levelTier;
142  Level::Name   m_level;
[1029]143  UInt          m_bitDepthConstraint;
144  ChromaFormat  m_chromaFormatConstraint;
145  Bool          m_intraConstraintFlag;
146  Bool          m_lowerBitRateConstraintFlag;
[942]147  Bool m_progressiveSourceFlag;
148  Bool m_interlacedSourceFlag;
149  Bool m_nonPackedConstraintFlag;
150  Bool m_frameOnlyConstraintFlag;
[941]151#endif
[942]152
[313]153  // coding structure
154#if !SVC_EXTENSION
155  Int       m_iIntraPeriod;                                   ///< period of I-slice (random access period)
156#endif
157  Int       m_iDecodingRefreshType;                           ///< random access type
158  Int       m_iGOPSize;                                       ///< GOP size of hierarchical structure
[815]159
[1211]160#if SVC_EXTENSION
[815]161  Int       m_extraRPSs[MAX_LAYERS];                          ///< extra RPSs added to handle CRA
162  GOPEntry  m_EhGOPList[MAX_LAYERS][MAX_GOP];                 ///< the enhancement layer coding structure entries from the config file
163  Int       m_inheritCodingStruct[MAX_LAYERS];
[1211]164  Int       m_EhMaxTempLayer[MAX_LAYERS];                    ///< Max temporal layer
165#else
166  Int       m_extraRPSs;                                      ///< extra RPSs added to handle CRA
[815]167#endif
168
[1211]169  GOPEntry  m_GOPList[MAX_GOP];                               ///< the coding structure entries from the config file
170
[313]171  Int       m_numReorderPics[MAX_TLAYER];                     ///< total number of reorder pictures
172  Int       m_maxDecPicBuffering[MAX_TLAYER];                 ///< total number of pictures in the decoded picture buffer
[1029]173  Bool      m_useCrossComponentPrediction;                    ///< flag enabling the use of cross-component prediction
174  Bool      m_reconBasedCrossCPredictionEstimate;             ///< causes the alpha calculation in encoder search to be based on the decoded residual rather than the pre-transform encoder-side residual
175  UInt      m_saoOffsetBitShift[MAX_NUM_CHANNEL_TYPE];        ///< number of bits for the upward bit shift operation on the decoded SAO offsets
[313]176  Bool      m_useTransformSkip;                               ///< flag for enabling intra transform skipping
177  Bool      m_useTransformSkipFast;                           ///< flag for enabling fast intra transform skipping
[1029]178  UInt      m_transformSkipLog2MaxSize;                       ///< transform-skip maximum size (minimum of 2)
179  Bool      m_useResidualRotation;                            ///< control flag for transform-skip/transquant-bypass residual rotation
180  Bool      m_useSingleSignificanceMapContext;                ///< control flag for transform-skip/transquant-bypass single significance map context
181  Bool      m_useResidualDPCM[NUMBER_OF_RDPCM_SIGNALLING_MODES];///< control flags for residual DPCM
[313]182  Bool      m_enableAMP;
[1029]183  Bool      m_useGolombRiceParameterAdaptation;               ///< control flag for Golomb-Rice parameter adaptation over each slice
184  Bool      m_alignCABACBeforeBypass;
185
[313]186  // coding quality
187#if !SVC_EXTENSION
188  Double    m_fQP;                                            ///< QP value of key-picture (floating point)
189  Int       m_iQP;                                            ///< QP value of key-picture (integer)
190  Char*     m_pchdQPFile;                                     ///< QP offset for each slice (initialized from external file)
191  Int*      m_aidQP;                                          ///< array of slice QP values
192#endif
193  Int       m_iMaxDeltaQP;                                    ///< max. |delta QP|
194  UInt      m_uiDeltaQpRD;                                    ///< dQP range for multi-pass slice QP optimization
[1235]195#if !SVC_EXTENSION
[313]196  Int       m_iMaxCuDQPDepth;                                 ///< Max. depth for a minimum CuDQPSize (0:default)
[1235]197#endif
[1029]198  Int       m_maxCUChromaQpAdjustmentDepth;
[313]199
[1029]200  Int       m_cbQpOffset;                                     ///< Chroma Cb QP Offset (0:default)
[313]201  Int       m_crQpOffset;                                     ///< Chroma Cr QP Offset (0:default)
202
203#if ADAPTIVE_QP_SELECTION
204  Bool      m_bUseAdaptQpSelect;
205#endif
[1029]206  TComSEIMasteringDisplay m_masteringDisplay;
[313]207
208  Bool      m_bUseAdaptiveQP;                                 ///< Flag for enabling QP adaptation based on a psycho-visual model
209  Int       m_iQPAdaptationRange;                             ///< dQP range by QP adaptation
[1029]210
[313]211  Int       m_maxTempLayer;                                  ///< Max temporal layer
212
213  // coding unit (CU) definition
[1029]214  // TODO: Remove MaxCUWidth/MaxCUHeight and replace with MaxCUSize.
[1235]215#if !SVC_EXTENSION
[313]216  UInt      m_uiMaxCUWidth;                                   ///< max. CU width in pixel
217  UInt      m_uiMaxCUHeight;                                  ///< max. CU height in pixel
[1290]218  UInt      m_uiMaxCUDepth;                                   ///< max. CU depth (as specified by command line)
219  UInt      m_uiMaxTotalCUDepth;                              ///< max. total CU depth - includes depth of transform-block structure
220  UInt      m_uiLog2DiffMaxMinCodingBlockSize;                ///< difference between largest and smallest CU depth
[1029]221
[313]222  // transfom unit (TU) definition
223  UInt      m_uiQuadtreeTULog2MaxSize;
224  UInt      m_uiQuadtreeTULog2MinSize;
[1029]225
[313]226  UInt      m_uiQuadtreeTUMaxDepthInter;
227  UInt      m_uiQuadtreeTUMaxDepthIntra;
[494]228#endif
[313]229 
230  // coding tools (bit-depth)
[1200]231#if !SVC_EXTENSION
[1029]232  Int       m_inputBitDepth   [MAX_NUM_CHANNEL_TYPE];         ///< bit-depth of input file
233  Int       m_outputBitDepth  [MAX_NUM_CHANNEL_TYPE];         ///< bit-depth of output file
234  Int       m_MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE];      ///< bit-depth of input samples after MSB extension
235  Int       m_internalBitDepth[MAX_NUM_CHANNEL_TYPE];         ///< bit-depth codec operates at (input/output files will be converted)
236  Bool      m_useExtendedPrecision;
237  Bool      m_useHighPrecisionPredictionWeighting;
[1200]238
[1029]239  //coding tools (chroma format)
[494]240  ChromaFormat m_chromaFormatIDC;
241#endif
[313]242
243  // coding tools (PCM bit-depth)
244  Bool      m_bPCMInputBitDepthFlag;                          ///< 0: PCM bit-depth is internal bit-depth. 1: PCM bit-depth is input bit-depth.
245
[595]246  // coding tool (SAO)
[1029]247  Bool      m_bUseSAO;
[313]248  Int       m_maxNumOffsetsPerPic;                            ///< SAO maximun number of offset per picture
[1029]249  Bool      m_saoCtuBoundary;                                 ///< SAO parameter estimation using non-deblocked pixels for CTU bottom and right boundary areas
[313]250  // coding tools (loop filter)
251  Bool      m_bLoopFilterDisable;                             ///< flag for using deblocking filter
252  Bool      m_loopFilterOffsetInPPS;                         ///< offset for deblocking filter in 0 = slice header, 1 = PPS
253  Int       m_loopFilterBetaOffsetDiv2;                     ///< beta offset for deblocking filter
254  Int       m_loopFilterTcOffsetDiv2;                       ///< tc offset for deblocking filter
255  Bool      m_DeblockingFilterControlPresent;                 ///< deblocking filter control present flag in PPS
256  Bool      m_DeblockingFilterMetric;                         ///< blockiness metric in encoder
[1029]257
[313]258  // coding tools (PCM)
259  Bool      m_usePCM;                                         ///< flag for using IPCM
260  UInt      m_pcmLog2MaxSize;                                 ///< log2 of maximum PCM block size
261  UInt      m_uiPCMLog2MinSize;                               ///< log2 of minimum PCM block size
262  Bool      m_bPCMFilterDisableFlag;                          ///< PCM filter disable flag
[1029]263  Bool      m_enableIntraReferenceSmoothing;                  ///< flag for enabling(default)/disabling intra reference smoothing/filtering
[313]264
265  // coding tools (encoder-only parameters)
266  Bool      m_bUseASR;                                        ///< flag for using adaptive motion search range
267  Bool      m_bUseHADME;                                      ///< flag for using HAD in sub-pel ME
268  Bool      m_useRDOQ;                                       ///< flag for using RD optimized quantization
269  Bool      m_useRDOQTS;                                     ///< flag for using RD optimized quantization for transform skip
[1029]270  Int       m_rdPenalty;                                      ///< RD-penalty for 32x32 TU for intra in non-intra slices (0: no RD-penalty, 1: RD-penalty, 2: maximum RD-penalty)
[313]271  Int       m_iFastSearch;                                    ///< ME mode, 0 = full, 1 = diamond, 2 = PMVFAST
272  Int       m_iSearchRange;                                   ///< ME search range
273  Int       m_bipredSearchRange;                              ///< ME search range for bipred refinement
274  Bool      m_bUseFastEnc;                                    ///< flag for using fast encoder setting
275  Bool      m_bUseEarlyCU;                                    ///< flag for using Early CU setting
[1029]276  Bool      m_useFastDecisionForMerge;                        ///< flag for using Fast Decision Merge RD-Cost
[313]277  Bool      m_bUseCbfFastMode;                              ///< flag for using Cbf Fast PU Mode Decision
278  Bool      m_useEarlySkipDetection;                         ///< flag for using Early SKIP Detection
[1029]279  Int       m_sliceMode;                                     ///< 0: no slice limits, 1 : max number of CTBs per slice, 2: max number of bytes per slice,
[313]280                                                             ///< 3: max number of tiles per slice
281  Int       m_sliceArgument;                                 ///< argument according to selected slice mode
[1029]282  Int       m_sliceSegmentMode;                              ///< 0: no slice segment limits, 1 : max number of CTBs per slice segment, 2: max number of bytes per slice segment,
[313]283                                                             ///< 3: max number of tiles per slice segment
284  Int       m_sliceSegmentArgument;                          ///< argument according to selected slice segment mode
285
286  Bool      m_bLFCrossSliceBoundaryFlag;  ///< 1: filter across slice boundaries 0: do not filter across slice boundaries
287  Bool      m_bLFCrossTileBoundaryFlag;   ///< 1: filter across tile boundaries  0: do not filter across tile boundaries
[823]288  Bool      m_tileUniformSpacingFlag;
289  Int       m_numTileColumnsMinus1;
290  Int       m_numTileRowsMinus1;
291  std::vector<Int> m_tileColumnWidth;
292  std::vector<Int> m_tileRowHeight;
[1235]293
[875]294#if !SVC_EXTENSION
[313]295  Int       m_iWaveFrontSynchro; //< 0: no WPP. >= 1: WPP is enabled, the "Top right" from which inheritance occurs is this LCU offset in the line above the current.
296#endif
[1235]297
[313]298  Bool      m_bUseConstrainedIntraPred;                       ///< flag for using constrained intra prediction
[1029]299
[313]300  Int       m_decodedPictureHashSEIEnabled;                    ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message
301  Int       m_recoveryPointSEIEnabled;
302  Int       m_bufferingPeriodSEIEnabled;
303  Int       m_pictureTimingSEIEnabled;
304  Bool      m_toneMappingInfoSEIEnabled;
[1029]305  Bool      m_chromaSamplingFilterSEIenabled;
306  Int       m_chromaSamplingHorFilterIdc;
307  Int       m_chromaSamplingVerFilterIdc;
[313]308  Int       m_toneMapId;
309  Bool      m_toneMapCancelFlag;
310  Bool      m_toneMapPersistenceFlag;
311  Int       m_toneMapCodedDataBitDepth;
312  Int       m_toneMapTargetBitDepth;
[1029]313  Int       m_toneMapModelId;
[313]314  Int       m_toneMapMinValue;
315  Int       m_toneMapMaxValue;
316  Int       m_sigmoidMidpoint;
317  Int       m_sigmoidWidth;
318  Int       m_numPivots;
319  Int       m_cameraIsoSpeedIdc;
320  Int       m_cameraIsoSpeedValue;
[713]321  Int       m_exposureIndexIdc;
322  Int       m_exposureIndexValue;
[1230]323  Bool      m_exposureCompensationValueSignFlag;
[313]324  Int       m_exposureCompensationValueNumerator;
325  Int       m_exposureCompensationValueDenomIdc;
326  Int       m_refScreenLuminanceWhite;
327  Int       m_extendedRangeWhiteLevel;
328  Int       m_nominalBlackLevelLumaCodeValue;
329  Int       m_nominalWhiteLevelLumaCodeValue;
330  Int       m_extendedWhiteLevelLumaCodeValue;
331  Int*      m_startOfCodedInterval;
332  Int*      m_codedPivotValue;
333  Int*      m_targetPivotValue;
334  Int       m_framePackingSEIEnabled;
335  Int       m_framePackingSEIType;
336  Int       m_framePackingSEIId;
337  Int       m_framePackingSEIQuincunx;
338  Int       m_framePackingSEIInterpretation;
[1029]339  Int       m_segmentedRectFramePackingSEIEnabled;
340  Bool      m_segmentedRectFramePackingSEICancel;
341  Int       m_segmentedRectFramePackingSEIType;
342  Bool      m_segmentedRectFramePackingSEIPersistence;
[313]343  Int       m_displayOrientationSEIAngle;
344  Int       m_temporalLevel0IndexSEIEnabled;
345  Int       m_gradualDecodingRefreshInfoEnabled;
[1029]346  Int       m_noDisplaySEITLayer;
[313]347  Int       m_decodingUnitInfoSEIEnabled;
348  Int       m_SOPDescriptionSEIEnabled;
349  Int       m_scalableNestingSEIEnabled;
[1029]350  Bool      m_tmctsSEIEnabled;
351  Bool      m_timeCodeSEIEnabled;
352  Int       m_timeCodeSEINumTs;
353  TComSEITimeSet m_timeSetArray[MAX_TIMECODE_SEI_SETS];
354  Bool      m_kneeSEIEnabled;
355  Int       m_kneeSEIId;
356  Bool      m_kneeSEICancelFlag;
357  Bool      m_kneeSEIPersistenceFlag;
358  Int       m_kneeSEIInputDrange;
359  Int       m_kneeSEIInputDispLuminance;
360  Int       m_kneeSEIOutputDrange;
361  Int       m_kneeSEIOutputDispLuminance;
362  Int       m_kneeSEINumKneePointsMinus1;
363  Int*      m_kneeSEIInputKneePoint;
364  Int*      m_kneeSEIOutputKneePoint;
[313]365  // weighted prediction
366  Bool      m_useWeightedPred;                    ///< Use of weighted prediction in P slices
367  Bool      m_useWeightedBiPred;                  ///< Use of bi-directional weighted prediction in B slices
[1029]368
[313]369  UInt      m_log2ParallelMergeLevel;                         ///< Parallel merge estimation region
370  UInt      m_maxNumMergeCand;                                ///< Max number of merge candidates
371
372  Int       m_TMVPModeId;
[1230]373  Bool      m_signHideFlag;
[313]374#if !RC_SHVC_HARMONIZATION
375  Bool      m_RCEnableRateControl;                ///< enable rate control or not
376  Int       m_RCTargetBitrate;                    ///< target bitrate when rate control is enabled
377  Int       m_RCKeepHierarchicalBit;              ///< 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation
[1029]378  Bool      m_RCLCULevelRC;                       ///< true: LCU level rate control; false: picture level rate control NOTE: code-tidy - rename to m_RCCtuLevelRC
379  Bool      m_RCUseLCUSeparateModel;              ///< use separate R-lambda model at LCU level                        NOTE: code-tidy - rename to m_RCUseCtuSeparateModel
[313]380  Int       m_RCInitialQP;                        ///< inital QP for rate control
381  Bool      m_RCForceIntraQP;                     ///< force all intra picture to use initial QP or not
382#endif
[1029]383  ScalingListMode m_useScalingListId;                         ///< using quantization matrix
[313]384  Char*     m_scalingListFile;                                ///< quantization matrix file name
385
386  Bool      m_TransquantBypassEnableFlag;                     ///< transquant_bypass_enable_flag setting in PPS.
[595]387  Bool      m_CUTransquantBypassFlagForce;                    ///< if transquant_bypass_enable_flag, then, if true, all CU transquant bypass flags will be set to true.
[1029]388  CostMode  m_costMode;                                       ///< Cost mode to use
[313]389
390  Bool      m_recalculateQPAccordingToLambda;                 ///< recalculate QP value according to the lambda value
391  Bool      m_useStrongIntraSmoothing;                        ///< enable strong intra smoothing for 32x32 blocks where the reference samples are flat
392  Int       m_activeParameterSetsSEIEnabled;
393
394  Bool      m_vuiParametersPresentFlag;                       ///< enable generation of VUI parameters
395  Bool      m_aspectRatioInfoPresentFlag;                     ///< Signals whether aspect_ratio_idc is present
396  Int       m_aspectRatioIdc;                                 ///< aspect_ratio_idc
397  Int       m_sarWidth;                                       ///< horizontal size of the sample aspect ratio
398  Int       m_sarHeight;                                      ///< vertical size of the sample aspect ratio
399  Bool      m_overscanInfoPresentFlag;                        ///< Signals whether overscan_appropriate_flag is present
400  Bool      m_overscanAppropriateFlag;                        ///< Indicates whether conformant decoded pictures are suitable for display using overscan
401  Bool      m_videoSignalTypePresentFlag;                     ///< Signals whether video_format, video_full_range_flag, and colour_description_present_flag are present
402  Int       m_videoFormat;                                    ///< Indicates representation of pictures
403  Bool      m_videoFullRangeFlag;                             ///< Indicates the black level and range of luma and chroma signals
404  Bool      m_colourDescriptionPresentFlag;                   ///< Signals whether colour_primaries, transfer_characteristics and matrix_coefficients are present
405  Int       m_colourPrimaries;                                ///< Indicates chromaticity coordinates of the source primaries
406  Int       m_transferCharacteristics;                        ///< Indicates the opto-electronic transfer characteristics of the source
407  Int       m_matrixCoefficients;                             ///< Describes the matrix coefficients used in deriving luma and chroma from RGB primaries
408  Bool      m_chromaLocInfoPresentFlag;                       ///< Signals whether chroma_sample_loc_type_top_field and chroma_sample_loc_type_bottom_field are present
409  Int       m_chromaSampleLocTypeTopField;                    ///< Specifies the location of chroma samples for top field
410  Int       m_chromaSampleLocTypeBottomField;                 ///< Specifies the location of chroma samples for bottom field
411  Bool      m_neutralChromaIndicationFlag;                    ///< Indicates that the value of all decoded chroma samples is equal to 1<<(BitDepthCr-1)
412  Bool      m_defaultDisplayWindowFlag;                       ///< Indicates the presence of the default window parameters
413  Int       m_defDispWinLeftOffset;                           ///< Specifies the left offset from the conformance window of the default window
414  Int       m_defDispWinRightOffset;                          ///< Specifies the right offset from the conformance window of the default window
415  Int       m_defDispWinTopOffset;                            ///< Specifies the top offset from the conformance window of the default window
416  Int       m_defDispWinBottomOffset;                         ///< Specifies the bottom offset from the conformance window of the default window
417  Bool      m_frameFieldInfoPresentFlag;                      ///< Indicates that pic_struct values are present in picture timing SEI messages
418  Bool      m_pocProportionalToTimingFlag;                    ///< Indicates that the POC value is proportional to the output time w.r.t. first picture in CVS
419  Int       m_numTicksPocDiffOneMinus1;                       ///< Number of ticks minus 1 that for a POC difference of one
420  Bool      m_bitstreamRestrictionFlag;                       ///< Signals whether bitstream restriction parameters are present
421  Bool      m_tilesFixedStructureFlag;                        ///< Indicates that each active picture parameter set has the same values of the syntax elements related to tiles
422  Bool      m_motionVectorsOverPicBoundariesFlag;             ///< Indicates that no samples outside the picture boundaries are used for inter prediction
423  Int       m_minSpatialSegmentationIdc;                      ///< Indicates the maximum size of the spatial segments in the pictures in the coded video sequence
424  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
425  Int       m_maxBitsPerMinCuDenom;                           ///< Indicates an upper bound for the number of bits of coding_unit() data
426  Int       m_log2MaxMvLengthHorizontal;                      ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units
427  Int       m_log2MaxMvLengthVertical;                        ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units
[1029]428
429#if LAYERS_NOT_PRESENT_SEI
430  Int       m_layersNotPresentSEIEnabled;
431#endif
[1037]432#if P0123_ALPHA_CHANNEL_SEI
433  Bool      m_alphaSEIEnabled;
434  Bool      m_alphaCancelFlag;
435  Int       m_alphaUseIdc;
436  Int       m_alphaBitDepthMinus8;
437  Int       m_alphaTransparentValue;
438  Int       m_alphaOpaqueValue;
439  Bool      m_alphaIncrementFlag;
440  Bool      m_alphaClipFlag;
441  Bool      m_alphaClipTypeFlag;
442#endif
[1029]443#if SVC_EXTENSION
444#if FAST_INTRA_SHVC
445  Bool      m_useFastIntraScalable;                          ///< flag for using Fast Intra Decision for Scalable HEVC
446#endif
447#if Q0189_TMVP_CONSTRAINTS
448  Int       m_TMVPConstraintsSEIEnabled;
449#endif
[540]450  Bool      m_altOutputLayerFlag;                             ///< Specifies the value of alt_output_laye_flag in VPS extension
[313]451  Int       m_elRapSliceBEnabled;
452#endif
[856]453#if Q0074_COLOUR_REMAPPING_SEI
454#if !SVC_EXTENSION
[1089]455  string    m_colourRemapSEIFileRoot;
[856]456#endif
457#endif
[313]458  // internal member functions
[1235]459#if SVC_EXTENSION
[494]460  Void  xSetGlobal      (UInt layerId);                       ///< set global variables
[1235]461  Void  xCheckParameter (UInt layerIdx);                       ///< check validity of configuration values per layer
[494]462#else
[313]463  Void  xSetGlobal      ();                                   ///< set global variables
464  Void  xCheckParameter ();                                   ///< check validity of configuration values
[1029]465#endif
[313]466  Void  xPrintParameter ();                                   ///< print configuration values
467  Void  xPrintUsage     ();                                   ///< print usage
[815]468#if SVC_EXTENSION
[313]469  Int       m_adaptiveResolutionChange;                       ///< Indicate adaptive resolution change frame
[540]470  Bool      m_skipPictureAtArcSwitch;                         ///< Indicates that when ARC up-switching is performed the higher layer picture is a skip picture
[1203]471
[442]472  RepFormatCfg m_repFormatCfg[16];                            ///< Rep_format structures
473#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
474  Bool      m_interLayerConstrainedTileSetsSEIEnabled;
475  UInt      m_ilNumSetsInMessage;
476  Bool      m_skippedTileSetPresentFlag;
477  UInt      m_topLeftTileIndex[1024];
478  UInt      m_bottomRightTileIndex[1024];
479  UInt      m_ilcIdc[1024];
480#endif
[588]481  Bool      m_crossLayerPictureTypeAlignFlag;
482  Bool      m_crossLayerIrapAlignFlag;
[912]483#if Q0096_OVERLAY_SEI
484  Bool                                m_overlaySEIEnabled;
485  Bool                                m_overlayInfoCancelFlag;
486  UInt                                m_overlayContentAuxIdMinus128;
487  UInt                                m_overlayLabelAuxIdMinus128;
488  UInt                                m_overlayAlphaAuxIdMinus128;
489  UInt                                m_overlayElementLabelValueLengthMinus8;
490  UInt                                m_numOverlaysMinus1;
491  std::vector<UInt>                   m_overlayIdx; 
492  std::vector<Bool>                   m_overlayLanguagePresentFlag;
493  std::vector<UInt>                   m_overlayContentLayerId;
494  std::vector<Bool>                   m_overlayLabelPresentFlag;
495  std::vector<UInt>                   m_overlayLabelLayerId;
496  std::vector<Bool>                   m_overlayAlphaPresentFlag;
497  std::vector<UInt>                   m_overlayAlphaLayerId;
498  std::vector<UInt>                   m_numOverlayElementsMinus1;
499  std::vector< std::vector<UInt> >    m_overlayElementLabelMin;
500  std::vector< std::vector<UInt> >    m_overlayElementLabelMax;
501  std::vector<string>                 m_overlayLanguage; 
502  std::vector<string>                 m_overlayName; 
503  std::vector< std::vector<string> >  m_overlayElementName; 
504  Bool                                m_overlayInfoPersistenceFlag;
505#endif
[644]506  Bool      m_crossLayerAlignedIdrOnlyFlag;
[588]507  Bool      m_crossLayerBLAFlag;
508  Bool      m_useInterLayerWeightedPred;
[1212]509#if CGS_3D_ASYMLUT
[1150]510  Int       m_nCGSFlag;
511  Int       m_nCGSMaxOctantDepth;
512  Int       m_nCGSMaxYPartNumLog2;
513  Int       m_nCGSLUTBit;
514  Int       m_nCGSAdaptiveChroma;
[877]515#if R0179_ENC_OPT_3DLUT_SIZE
[1150]516  Int       m_nCGSLutSizeRDO;
[877]517#endif
[825]518#endif
[815]519#endif //SVC_EXTENSION
[313]520public:
521  TAppEncCfg();
522  virtual ~TAppEncCfg();
[1029]523
[313]524public:
525  Void  create    ();                                         ///< create option handling class
526  Void  destroy   ();                                         ///< destroy option handling class
527  Bool  parseCfg  ( Int argc, Char* argv[] );                 ///< parse configuration file to fill member variables
528 
529#if SVC_EXTENSION
[1235]530  Int  getNumFrameToBeEncoded()                               { return m_framesToBeEncoded;                          }
531  Int  getNumLayer()                                          { return m_numLayers;                                  }
532  Int  getGOPSize()                                           { return m_iGOPSize;                                   }
[1200]533
[1235]534  RepFormatCfg* getRepFormatCfg(Int i)                        { return &m_repFormatCfg[i];                           }
535  Bool getUsePCM()                                            { return m_usePCM;                                     }
536  UInt getPCMLog2MinSize  ()                                  { return  m_uiPCMLog2MinSize;                          }
[1200]537
[1235]538  UInt getInternalBitDepth(Int iLayer, ChannelType type)      { return m_acLayerCfg[iLayer].m_internalBitDepth[type];}
539  Bool getPCMInputBitDepthFlag()                              { return m_bPCMInputBitDepthFlag;                      }
540
541  Int  getDecodingRefreshType()                               { return m_iDecodingRefreshType;                       }
542  Int  getWaveFrontSynchro(Int layerIdx)                      { return m_acLayerCfg[layerIdx].m_waveFrontSynchro;    }
[313]543  Void getDirFilename(string& filename, string& dir, const string path);
[1162]544
[861]545  Bool scanStringToArray(string const cfgString, Int const numEntries, const char* logString, Int * const returnArray);
546  Bool scanStringToArray(string const cfgString, Int const numEntries, const char* logString, std::vector<Int> &  returnVector);
547  Void cfgStringToArray(Int **arr, string const cfgString, Int const numEntries, const char* logString);
[1005]548  Bool scanStringToArrayNumEntries(string const cfgString, Int &numEntries, const char* logString, Int * const returnArray);
549  Bool scanStringToArrayNumEntries(string const cfgString, Int &numEntries, const char* logString, std::vector<Int> &  returnVector);
550  Void cfgStringToArrayNumEntries(Int **arr, string const cfgString, Int &numEntries, const char* logString);
[442]551#endif
[313]552};// END CLASS DEFINITION TAppEncCfg
553
554//! \}
555
556#endif // __TAPPENCCFG__
557
Note: See TracBrowser for help on using the repository browser.