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