/* The copyright in this software is being made available under the BSD * License, included below. This software may be subject to other third party * and contributor rights, including patent rights, and no such rights are * granted under this license. * * Copyright (c) 2010-2013, ITU/ISO/IEC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ /** \file TEncCfg.h \brief encoder configuration class (header) */ #ifndef __TENCCFG__ #define __TENCCFG__ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "TLibCommon/CommonDef.h" #include "TLibCommon/TComSlice.h" #include #if H_3D #include "TAppCommon/TAppComCamPara.h" #include "TLibRenderer/TRenModSetupStrParser.h" #endif struct GOPEntry { Int m_POC; Int m_QPOffset; Double m_QPFactor; Int m_tcOffsetDiv2; Int m_betaOffsetDiv2; Int m_temporalId; Bool m_refPic; Int m_numRefPicsActive; Char m_sliceType; Int m_numRefPics; Int m_referencePics[MAX_NUM_REF_PICS]; Int m_usedByCurrPic[MAX_NUM_REF_PICS]; #if AUTO_INTER_RPS Int m_interRPSPrediction; #else Bool m_interRPSPrediction; #endif Int m_deltaRPS; Int m_numRefIdc; Int m_refIdc[MAX_NUM_REF_PICS+1]; #if H_MV Int m_numActiveRefLayerPics; Int m_interLayerPredLayerIdc [MAX_NUM_REF_PICS]; Int m_interViewRefPosL[2][MAX_NUM_REF_PICS]; #if !H_MV5 Int m_collocatedRefLayerIdx; #endif #endif GOPEntry() : m_POC(-1) , m_QPOffset(0) , m_QPFactor(0) , m_tcOffsetDiv2(0) , m_betaOffsetDiv2(0) , m_temporalId(0) , m_refPic(false) , m_numRefPicsActive(0) , m_sliceType('P') , m_numRefPics(0) , m_interRPSPrediction(false) , m_deltaRPS(0) , m_numRefIdc(0) #if H_MV , m_numActiveRefLayerPics(0) #if !H_MV5 , m_collocatedRefLayerIdx(-1) #endif #endif { ::memset( m_referencePics, 0, sizeof(m_referencePics) ); ::memset( m_usedByCurrPic, 0, sizeof(m_usedByCurrPic) ); ::memset( m_refIdc, 0, sizeof(m_refIdc) ); #if H_MV ::memset( m_interLayerPredLayerIdc, 0, sizeof(m_interLayerPredLayerIdc) ); ::memset( m_interViewRefPosL[0], -1, sizeof(m_interViewRefPosL[0]) ); ::memset( m_interViewRefPosL[1], -1, sizeof(m_interViewRefPosL[1]) ); #endif } }; std::istringstream &operator>>(std::istringstream &in, GOPEntry &entry); //input //! \ingroup TLibEncoder //! \{ // ==================================================================================================================== // Class definition // ==================================================================================================================== /// encoder configuration class class TEncCfg { protected: //==== File I/O ======== Int m_iFrameRate; Int m_FrameSkip; Int m_iSourceWidth; Int m_iSourceHeight; Int m_conformanceMode; Window m_conformanceWindow; Int m_framesToBeEncoded; Double m_adLambdaModifier[ MAX_TLAYER ]; /* profile & level */ Profile::Name m_profile; Level::Tier m_levelTier; Level::Name m_level; Bool m_progressiveSourceFlag; Bool m_interlacedSourceFlag; Bool m_nonPackedConstraintFlag; Bool m_frameOnlyConstraintFlag; //====== Coding Structure ======== UInt m_uiIntraPeriod; UInt m_uiDecodingRefreshType; ///< the type of decoding refresh employed for the random access. Int m_iGOPSize; #if H_MV GOPEntry m_GOPList[MAX_GOP+1]; #else GOPEntry m_GOPList[MAX_GOP]; #endif Int m_extraRPSs; Int m_maxDecPicBuffering[MAX_TLAYER]; Int m_numReorderPics[MAX_TLAYER]; Int m_iQP; // if (AdaptiveQP == OFF) Int m_aiPad[2]; Int m_iMaxRefPicNum; ///< this is used to mimic the sliding mechanism used by the decoder // TODO: We need to have a common sliding mechanism used by both the encoder and decoder Int m_maxTempLayer; ///< Max temporal layer Bool m_useAMP; //======= Transform ============= UInt m_uiQuadtreeTULog2MaxSize; UInt m_uiQuadtreeTULog2MinSize; UInt m_uiQuadtreeTUMaxDepthInter; UInt m_uiQuadtreeTUMaxDepthIntra; //====== Loop/Deblock Filter ======== Bool m_bLoopFilterDisable; Bool m_loopFilterOffsetInPPS; Int m_loopFilterBetaOffsetDiv2; Int m_loopFilterTcOffsetDiv2; Bool m_DeblockingFilterControlPresent; Bool m_DeblockingFilterMetric; Bool m_bUseSAO; Int m_maxNumOffsetsPerPic; Bool m_saoLcuBoundary; Bool m_saoLcuBasedOptimization; //====== Lossless ======== Bool m_useLossless; //====== Motion search ======== Int m_iFastSearch; // 0:Full search 1:Diamond 2:PMVFAST Int m_iSearchRange; // 0:Full frame Int m_bipredSearchRange; //====== Quality control ======== Int m_iMaxDeltaQP; // Max. absolute delta QP (1:default) Int m_iMaxCuDQPDepth; // Max. depth for a minimum CuDQP (0:default) Int m_chromaCbQpOffset; // Chroma Cb QP Offset (0:default) Int m_chromaCrQpOffset; // Chroma Cr Qp Offset (0:default) #if ADAPTIVE_QP_SELECTION Bool m_bUseAdaptQpSelect; #endif Bool m_bUseAdaptiveQP; Int m_iQPAdaptationRange; //====== Tool list ======== Bool m_bUseSBACRD; Bool m_bUseASR; Bool m_bUseHADME; Bool m_useRDOQ; Bool m_useRDOQTS; UInt m_rdPenalty; Bool m_bUseFastEnc; Bool m_bUseEarlyCU; Bool m_useFastDecisionForMerge; Bool m_bUseCbfFastMode; Bool m_useEarlySkipDetection; Bool m_useTransformSkip; Bool m_useTransformSkipFast; Int* m_aidQP; UInt m_uiDeltaQpRD; Bool m_bUseConstrainedIntraPred; Bool m_usePCM; UInt m_pcmLog2MaxSize; UInt m_uiPCMLog2MinSize; //====== Slice ======== Int m_sliceMode; Int m_sliceArgument; //====== Dependent Slice ======== Int m_sliceSegmentMode; Int m_sliceSegmentArgument; Bool m_bLFCrossSliceBoundaryFlag; Bool m_bPCMInputBitDepthFlag; UInt m_uiPCMBitDepthLuma; UInt m_uiPCMBitDepthChroma; Bool m_bPCMFilterDisableFlag; Bool m_loopFilterAcrossTilesEnabledFlag; Int m_iUniformSpacingIdr; Int m_iNumColumnsMinus1; UInt* m_puiColumnWidth; Int m_iNumRowsMinus1; UInt* m_puiRowHeight; Int m_iWaveFrontSynchro; Int m_iWaveFrontSubstreams; Int m_decodedPictureHashSEIEnabled; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message Int m_bufferingPeriodSEIEnabled; Int m_pictureTimingSEIEnabled; Int m_recoveryPointSEIEnabled; Bool m_toneMappingInfoSEIEnabled; Int m_toneMapId; Bool m_toneMapCancelFlag; Bool m_toneMapPersistenceFlag; Int m_codedDataBitDepth; Int m_targetBitDepth; Int m_modelId; Int m_minValue; Int m_maxValue; Int m_sigmoidMidpoint; Int m_sigmoidWidth; Int m_numPivots; Int m_cameraIsoSpeedIdc; Int m_cameraIsoSpeedValue; Int m_exposureCompensationValueSignFlag; Int m_exposureCompensationValueNumerator; Int m_exposureCompensationValueDenomIdc; Int m_refScreenLuminanceWhite; Int m_extendedRangeWhiteLevel; Int m_nominalBlackLevelLumaCodeValue; Int m_nominalWhiteLevelLumaCodeValue; Int m_extendedWhiteLevelLumaCodeValue; Int* m_startOfCodedInterval; Int* m_codedPivotValue; Int* m_targetPivotValue; Int m_framePackingSEIEnabled; Int m_framePackingSEIType; Int m_framePackingSEIId; Int m_framePackingSEIQuincunx; Int m_framePackingSEIInterpretation; Int m_displayOrientationSEIAngle; Int m_temporalLevel0IndexSEIEnabled; Int m_gradualDecodingRefreshInfoEnabled; Int m_decodingUnitInfoSEIEnabled; Int m_SOPDescriptionSEIEnabled; Int m_scalableNestingSEIEnabled; //====== Weighted Prediction ======== Bool m_useWeightedPred; //< Use of Weighting Prediction (P_SLICE) Bool m_useWeightedBiPred; //< Use of Bi-directional Weighting Prediction (B_SLICE) UInt m_log2ParallelMergeLevelMinus2; ///< Parallel merge estimation region UInt m_maxNumMergeCand; ///< Maximum number of merge candidates Int m_useScalingListId; ///< Using quantization matrix i.e. 0=off, 1=default, 2=file. Char* m_scalingListFile; ///< quantization matrix file name Int m_TMVPModeId; Int m_signHideFlag; #if RATE_CONTROL_LAMBDA_DOMAIN Bool m_RCEnableRateControl; Int m_RCTargetBitrate; #if M0036_RC_IMPROVEMENT Int m_RCKeepHierarchicalBit; #else Bool m_RCKeepHierarchicalBit; #endif Bool m_RCLCULevelRC; Bool m_RCUseLCUSeparateModel; Int m_RCInitialQP; Bool m_RCForceIntraQP; #else Bool m_enableRateCtrl; ///< Flag for using rate control algorithm Int m_targetBitrate; ///< target bitrate Int m_numLCUInUnit; ///< Total number of LCUs in a frame should be divided by the NumLCUInUnit #endif Bool m_TransquantBypassEnableFlag; ///< transquant_bypass_enable_flag setting in PPS. Bool m_CUTransquantBypassFlagValue; ///< if transquant_bypass_enable_flag, the fixed value to use for the per-CU cu_transquant_bypass_flag. #if H_MV TComVPS* m_cVPS; ///< pointer to VPS, same for all layers #else TComVPS m_cVPS; #endif Bool m_recalculateQPAccordingToLambda; ///< recalculate QP value according to the lambda value Int m_activeParameterSetsSEIEnabled; ///< enable active parameter set SEI message Bool m_vuiParametersPresentFlag; ///< enable generation of VUI parameters Bool m_aspectRatioInfoPresentFlag; ///< Signals whether aspect_ratio_idc is present Int m_aspectRatioIdc; ///< aspect_ratio_idc Int m_sarWidth; ///< horizontal size of the sample aspect ratio Int m_sarHeight; ///< vertical size of the sample aspect ratio Bool m_overscanInfoPresentFlag; ///< Signals whether overscan_appropriate_flag is present Bool m_overscanAppropriateFlag; ///< Indicates whether conformant decoded pictures are suitable for display using overscan Bool m_videoSignalTypePresentFlag; ///< Signals whether video_format, video_full_range_flag, and colour_description_present_flag are present Int m_videoFormat; ///< Indicates representation of pictures Bool m_videoFullRangeFlag; ///< Indicates the black level and range of luma and chroma signals Bool m_colourDescriptionPresentFlag; ///< Signals whether colour_primaries, transfer_characteristics and matrix_coefficients are present Int m_colourPrimaries; ///< Indicates chromaticity coordinates of the source primaries Int m_transferCharacteristics; ///< Indicates the opto-electronic transfer characteristics of the source Int m_matrixCoefficients; ///< Describes the matrix coefficients used in deriving luma and chroma from RGB primaries Bool m_chromaLocInfoPresentFlag; ///< Signals whether chroma_sample_loc_type_top_field and chroma_sample_loc_type_bottom_field are present Int m_chromaSampleLocTypeTopField; ///< Specifies the location of chroma samples for top field Int m_chromaSampleLocTypeBottomField; ///< Specifies the location of chroma samples for bottom field Bool m_neutralChromaIndicationFlag; ///< Indicates that the value of all decoded chroma samples is equal to 1<<(BitDepthCr-1) Window m_defaultDisplayWindow; ///< Represents the default display window parameters Bool m_frameFieldInfoPresentFlag; ///< Indicates that pic_struct and other field coding related values are present in picture timing SEI messages Bool m_pocProportionalToTimingFlag; ///< Indicates that the POC value is proportional to the output time w.r.t. first picture in CVS Int m_numTicksPocDiffOneMinus1; ///< Number of ticks minus 1 that for a POC difference of one Bool m_bitstreamRestrictionFlag; ///< Signals whether bitstream restriction parameters are present Bool m_tilesFixedStructureFlag; ///< Indicates that each active picture parameter set has the same values of the syntax elements related to tiles Bool m_motionVectorsOverPicBoundariesFlag; ///< Indicates that no samples outside the picture boundaries are used for inter prediction Int m_minSpatialSegmentationIdc; ///< Indicates the maximum size of the spatial segments in the pictures in the coded video sequence 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 Int m_maxBitsPerMinCuDenom; ///< Indicates an upper bound for the number of bits of coding_unit() data Int m_log2MaxMvLengthHorizontal; ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units Int m_log2MaxMvLengthVertical; ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units Bool m_useStrongIntraSmoothing; ///< enable the use of strong intra smoothing (bi_linear interpolation) for 32x32 blocks when reference samples are flat. #if H_MV Int m_layerId; Int m_layerIdInVps; Int m_viewId; #if H_MV5 Int m_viewIndex; #endif #endif #if H_3D #if !H_MV5 Int m_viewIndex; #endif Bool m_isDepth; //====== Camera Parameters ====== UInt m_uiCamParPrecision; Bool m_bCamParInSliceHeader; Int** m_aaiCodedScale; Int** m_aaiCodedOffset; TAppComCamPara* m_cameraParameters; #if H_3D_VSO //====== View Synthesis Optimization ====== TRenModSetupStrParser* m_renderModelParameters; Bool m_bUseVSO; Bool m_bForceLambdaScale; Bool m_bAllowNegDist; Double m_dLambdaScaleVSO; UInt m_uiVSOMode; // LGE_WVSO_A0119 Bool m_bUseWVSO; Int m_iVSOWeight; Int m_iVSDWeight; Int m_iDWeight; // SAIT_VSO_EST_A0033 Bool m_bUseEstimatedVSD; Double m_dDispCoeff; #endif #if H_3D_ARP UInt m_uiUseAdvResPred; UInt m_uiARPStepNum; #endif #if H_3D_IC Bool m_bUseIC; #endif #if LGE_INTER_SDC_E0156 bool m_bInterSDC; #endif //====== Depth Intra Modes ====== #if H_3D_DIM Bool m_useDMM; Bool m_useRBC; Bool m_useSDC; Bool m_useDLT; #endif #if H_3D_QTLPC Bool m_bUseQTL; Bool m_bUsePC; #endif #endif public: TEncCfg() : m_puiColumnWidth() , m_puiRowHeight() #if H_MV , m_layerId(-1) , m_layerIdInVps(-1) , m_viewId(-1) #if H_MV5 , m_viewIndex(-1) #endif #if H_3D #if !H_MV5 , m_viewIndex(-1) #endif , m_isDepth(false) , m_bUseVSO(false) #endif #endif {} virtual ~TEncCfg() { delete[] m_puiColumnWidth; delete[] m_puiRowHeight; } Void setProfile(Profile::Name profile) { m_profile = profile; } Void setLevel(Level::Tier tier, Level::Name level) { m_levelTier = tier; m_level = level; } Void setFrameRate ( Int i ) { m_iFrameRate = i; } Void setFrameSkip ( UInt i ) { m_FrameSkip = i; } Void setSourceWidth ( Int i ) { m_iSourceWidth = i; } Void setSourceHeight ( Int i ) { m_iSourceHeight = i; } Window &getConformanceWindow() { return m_conformanceWindow; } Void setConformanceWindow (Int confLeft, Int confRight, Int confTop, Int confBottom ) { m_conformanceWindow.setWindow (confLeft, confRight, confTop, confBottom); } Void setFramesToBeEncoded ( Int i ) { m_framesToBeEncoded = i; } #if H_MV Void setLayerId ( Int layerId ) { m_layerId = layerId; } Int getLayerId () { return m_layerId; } Int getLayerIdInVps () { return m_layerIdInVps; } Void setLayerIdInVps ( Int layerIdInVps) { m_layerIdInVps = layerIdInVps; } Void setViewId ( Int viewId ) { m_viewId = viewId; } Int getViewId () { return m_viewId; } #if H_MV5 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } Int getViewIndex () { return m_viewIndex; } #endif #if H_3D #if !H_MV5 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } Int getViewIndex () { return m_viewIndex; } #endif Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } Bool getIsDepth () { return m_isDepth; } #endif #endif //====== Coding Structure ======== Void setIntraPeriod ( Int i ) { m_uiIntraPeriod = (UInt)i; } Void setDecodingRefreshType ( Int i ) { m_uiDecodingRefreshType = (UInt)i; } Void setGOPSize ( Int i ) { m_iGOPSize = i; } #if H_MV Void setGopList ( GOPEntry* GOPList ) { for ( Int i = 0; i < MAX_GOP+1; i++ ) m_GOPList[i] = GOPList[i]; } #else Void setGopList ( GOPEntry* GOPList ) { for ( Int i = 0; i < MAX_GOP; i++ ) m_GOPList[i] = GOPList[i]; } #endif Void setExtraRPSs ( Int i ) { m_extraRPSs = i; } GOPEntry getGOPEntry ( Int i ) { return m_GOPList[i]; } Void setMaxDecPicBuffering ( UInt u, UInt tlayer ) { m_maxDecPicBuffering[tlayer] = u; } Void setNumReorderPics ( Int i, UInt tlayer ) { m_numReorderPics[tlayer] = i; } Void setQP ( Int i ) { m_iQP = i; } Void setPad ( Int* iPad ) { for ( Int i = 0; i < 2; i++ ) m_aiPad[i] = iPad[i]; } Int getMaxRefPicNum () { return m_iMaxRefPicNum; } Void setMaxRefPicNum ( Int iMaxRefPicNum ) { m_iMaxRefPicNum = iMaxRefPicNum; } Bool getMaxTempLayer () { return m_maxTempLayer; } Void setMaxTempLayer ( Int maxTempLayer ) { m_maxTempLayer = maxTempLayer; } #if H_3D_ARP UInt getUseAdvRP ( ) { return m_uiUseAdvResPred; } Void setUseAdvRP ( UInt u ) { m_uiUseAdvResPred = u; } UInt getARPStepNum () { return m_uiARPStepNum; } Void setARPStepNum ( UInt u ) { m_uiARPStepNum = u; } #endif #if H_3D_IC Void setUseIC ( Bool bVal ) { m_bUseIC = bVal; } Bool getUseIC () { return m_bUseIC; } #endif #if LGE_INTER_SDC_E0156 Void setInterSDCEnable ( Bool bVal ) { m_bInterSDC = bVal; } Bool getInterSDCEnable () { return m_bInterSDC; } #endif //======== Transform ============= Void setQuadtreeTULog2MaxSize ( UInt u ) { m_uiQuadtreeTULog2MaxSize = u; } Void setQuadtreeTULog2MinSize ( UInt u ) { m_uiQuadtreeTULog2MinSize = u; } Void setQuadtreeTUMaxDepthInter ( UInt u ) { m_uiQuadtreeTUMaxDepthInter = u; } Void setQuadtreeTUMaxDepthIntra ( UInt u ) { m_uiQuadtreeTUMaxDepthIntra = u; } Void setUseAMP( Bool b ) { m_useAMP = b; } //====== Loop/Deblock Filter ======== Void setLoopFilterDisable ( Bool b ) { m_bLoopFilterDisable = b; } Void setLoopFilterOffsetInPPS ( Bool b ) { m_loopFilterOffsetInPPS = b; } Void setLoopFilterBetaOffset ( Int i ) { m_loopFilterBetaOffsetDiv2 = i; } Void setLoopFilterTcOffset ( Int i ) { m_loopFilterTcOffsetDiv2 = i; } Void setDeblockingFilterControlPresent ( Bool b ) { m_DeblockingFilterControlPresent = b; } Void setDeblockingFilterMetric ( Bool b ) { m_DeblockingFilterMetric = b; } //====== Motion search ======== Void setFastSearch ( Int i ) { m_iFastSearch = i; } Void setSearchRange ( Int i ) { m_iSearchRange = i; } Void setBipredSearchRange ( Int i ) { m_bipredSearchRange = i; } //====== Quality control ======== Void setMaxDeltaQP ( Int i ) { m_iMaxDeltaQP = i; } Void setMaxCuDQPDepth ( Int i ) { m_iMaxCuDQPDepth = i; } Void setChromaCbQpOffset ( Int i ) { m_chromaCbQpOffset = i; } Void setChromaCrQpOffset ( Int i ) { m_chromaCrQpOffset = i; } #if ADAPTIVE_QP_SELECTION Void setUseAdaptQpSelect ( Bool i ) { m_bUseAdaptQpSelect = i; } Bool getUseAdaptQpSelect () { return m_bUseAdaptQpSelect; } #endif Void setUseAdaptiveQP ( Bool b ) { m_bUseAdaptiveQP = b; } Void setQPAdaptationRange ( Int i ) { m_iQPAdaptationRange = i; } //====== Lossless ======== Void setUseLossless (Bool b ) { m_useLossless = b; } //====== Sequence ======== Int getFrameRate () { return m_iFrameRate; } UInt getFrameSkip () { return m_FrameSkip; } Int getSourceWidth () { return m_iSourceWidth; } Int getSourceHeight () { return m_iSourceHeight; } Int getFramesToBeEncoded () { return m_framesToBeEncoded; } void setLambdaModifier ( UInt uiIndex, Double dValue ) { m_adLambdaModifier[ uiIndex ] = dValue; } Double getLambdaModifier ( UInt uiIndex ) const { return m_adLambdaModifier[ uiIndex ]; } //==== Coding Structure ======== UInt getIntraPeriod () { return m_uiIntraPeriod; } UInt getDecodingRefreshType () { return m_uiDecodingRefreshType; } Int getGOPSize () { return m_iGOPSize; } Int getMaxDecPicBuffering (UInt tlayer) { return m_maxDecPicBuffering[tlayer]; } Int getNumReorderPics (UInt tlayer) { return m_numReorderPics[tlayer]; } Int getQP () { return m_iQP; } Int getPad ( Int i ) { assert (i < 2 ); return m_aiPad[i]; } //======== Transform ============= UInt getQuadtreeTULog2MaxSize () const { return m_uiQuadtreeTULog2MaxSize; } UInt getQuadtreeTULog2MinSize () const { return m_uiQuadtreeTULog2MinSize; } UInt getQuadtreeTUMaxDepthInter () const { return m_uiQuadtreeTUMaxDepthInter; } UInt getQuadtreeTUMaxDepthIntra () const { return m_uiQuadtreeTUMaxDepthIntra; } //==== Loop/Deblock Filter ======== Bool getLoopFilterDisable () { return m_bLoopFilterDisable; } Bool getLoopFilterOffsetInPPS () { return m_loopFilterOffsetInPPS; } Int getLoopFilterBetaOffset () { return m_loopFilterBetaOffsetDiv2; } Int getLoopFilterTcOffset () { return m_loopFilterTcOffsetDiv2; } Bool getDeblockingFilterControlPresent() { return m_DeblockingFilterControlPresent; } Bool getDeblockingFilterMetric () { return m_DeblockingFilterMetric; } //==== Motion search ======== Int getFastSearch () { return m_iFastSearch; } Int getSearchRange () { return m_iSearchRange; } //==== Quality control ======== Int getMaxDeltaQP () { return m_iMaxDeltaQP; } Int getMaxCuDQPDepth () { return m_iMaxCuDQPDepth; } Bool getUseAdaptiveQP () { return m_bUseAdaptiveQP; } Int getQPAdaptationRange () { return m_iQPAdaptationRange; } //====== Lossless ======== Bool getUseLossless () { return m_useLossless; } //==== Tool list ======== Void setUseSBACRD ( Bool b ) { m_bUseSBACRD = b; } Void setUseASR ( Bool b ) { m_bUseASR = b; } Void setUseHADME ( Bool b ) { m_bUseHADME = b; } Void setUseRDOQ ( Bool b ) { m_useRDOQ = b; } Void setUseRDOQTS ( Bool b ) { m_useRDOQTS = b; } Void setRDpenalty ( UInt b ) { m_rdPenalty = b; } Void setUseFastEnc ( Bool b ) { m_bUseFastEnc = b; } Void setUseEarlyCU ( Bool b ) { m_bUseEarlyCU = b; } Void setUseFastDecisionForMerge ( Bool b ) { m_useFastDecisionForMerge = b; } Void setUseCbfFastMode ( Bool b ) { m_bUseCbfFastMode = b; } Void setUseEarlySkipDetection ( Bool b ) { m_useEarlySkipDetection = b; } Void setUseConstrainedIntraPred ( Bool b ) { m_bUseConstrainedIntraPred = b; } Void setPCMInputBitDepthFlag ( Bool b ) { m_bPCMInputBitDepthFlag = b; } Void setPCMFilterDisableFlag ( Bool b ) { m_bPCMFilterDisableFlag = b; } Void setUsePCM ( Bool b ) { m_usePCM = b; } Void setPCMLog2MaxSize ( UInt u ) { m_pcmLog2MaxSize = u; } Void setPCMLog2MinSize ( UInt u ) { m_uiPCMLog2MinSize = u; } Void setdQPs ( Int* p ) { m_aidQP = p; } Void setDeltaQpRD ( UInt u ) {m_uiDeltaQpRD = u; } Bool getUseSBACRD () { return m_bUseSBACRD; } Bool getUseASR () { return m_bUseASR; } Bool getUseHADME () { return m_bUseHADME; } Bool getUseRDOQ () { return m_useRDOQ; } Bool getUseRDOQTS () { return m_useRDOQTS; } Int getRDpenalty () { return m_rdPenalty; } Bool getUseFastEnc () { return m_bUseFastEnc; } Bool getUseEarlyCU () { return m_bUseEarlyCU; } Bool getUseFastDecisionForMerge () { return m_useFastDecisionForMerge; } Bool getUseCbfFastMode () { return m_bUseCbfFastMode; } Bool getUseEarlySkipDetection () { return m_useEarlySkipDetection; } Bool getUseConstrainedIntraPred () { return m_bUseConstrainedIntraPred; } Bool getPCMInputBitDepthFlag () { return m_bPCMInputBitDepthFlag; } Bool getPCMFilterDisableFlag () { return m_bPCMFilterDisableFlag; } Bool getUsePCM () { return m_usePCM; } UInt getPCMLog2MaxSize () { return m_pcmLog2MaxSize; } UInt getPCMLog2MinSize () { return m_uiPCMLog2MinSize; } Bool getUseTransformSkip () { return m_useTransformSkip; } Void setUseTransformSkip ( Bool b ) { m_useTransformSkip = b; } Bool getUseTransformSkipFast () { return m_useTransformSkipFast; } Void setUseTransformSkipFast ( Bool b ) { m_useTransformSkipFast = b; } Int* getdQPs () { return m_aidQP; } UInt getDeltaQpRD () { return m_uiDeltaQpRD; } //====== Slice ======== Void setSliceMode ( Int i ) { m_sliceMode = i; } Void setSliceArgument ( Int i ) { m_sliceArgument = i; } Int getSliceMode () { return m_sliceMode; } Int getSliceArgument () { return m_sliceArgument; } //====== Dependent Slice ======== Void setSliceSegmentMode ( Int i ) { m_sliceSegmentMode = i; } Void setSliceSegmentArgument ( Int i ) { m_sliceSegmentArgument = i; } Int getSliceSegmentMode () { return m_sliceSegmentMode; } Int getSliceSegmentArgument () { return m_sliceSegmentArgument;} Void setLFCrossSliceBoundaryFlag ( Bool bValue ) { m_bLFCrossSliceBoundaryFlag = bValue; } Bool getLFCrossSliceBoundaryFlag () { return m_bLFCrossSliceBoundaryFlag; } Void setUseSAO (Bool bVal) {m_bUseSAO = bVal;} Bool getUseSAO () {return m_bUseSAO;} Void setMaxNumOffsetsPerPic (Int iVal) { m_maxNumOffsetsPerPic = iVal; } Int getMaxNumOffsetsPerPic () { return m_maxNumOffsetsPerPic; } Void setSaoLcuBoundary (Bool val) { m_saoLcuBoundary = val; } Bool getSaoLcuBoundary () { return m_saoLcuBoundary; } Void setSaoLcuBasedOptimization (Bool val) { m_saoLcuBasedOptimization = val; } Bool getSaoLcuBasedOptimization () { return m_saoLcuBasedOptimization; } Void setLFCrossTileBoundaryFlag ( Bool val ) { m_loopFilterAcrossTilesEnabledFlag = val; } Bool getLFCrossTileBoundaryFlag () { return m_loopFilterAcrossTilesEnabledFlag; } Void setUniformSpacingIdr ( Int i ) { m_iUniformSpacingIdr = i; } Int getUniformSpacingIdr () { return m_iUniformSpacingIdr; } Void setNumColumnsMinus1 ( Int i ) { m_iNumColumnsMinus1 = i; } Int getNumColumnsMinus1 () { return m_iNumColumnsMinus1; } Void setColumnWidth ( UInt* columnWidth ) { if( m_iUniformSpacingIdr == 0 && m_iNumColumnsMinus1 > 0 ) { Int m_iWidthInCU = ( m_iSourceWidth%g_uiMaxCUWidth ) ? m_iSourceWidth/g_uiMaxCUWidth + 1 : m_iSourceWidth/g_uiMaxCUWidth; m_puiColumnWidth = new UInt[ m_iNumColumnsMinus1 ]; for(Int i=0; i 0 ) { Int m_iHeightInCU = ( m_iSourceHeight%g_uiMaxCUHeight ) ? m_iSourceHeight/g_uiMaxCUHeight + 1 : m_iSourceHeight/g_uiMaxCUHeight; m_puiRowHeight = new UInt[ m_iNumRowsMinus1 ]; for(Int i=0; i