source: SHVCSoftware/branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCfg.h @ 514

Last change on this file since 514 was 512, checked in by nokia, 12 years ago

Add alt_output_layer_flag (JCTVC-O0153)

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