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