Changeset 56 in 3DVCSoftware for trunk/source/App/TAppEncoder/TAppEncCfg.h
- Timestamp:
- 11 May 2012, 21:20:17 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppEncoder/TAppEncCfg.h
r42 r56 2 2 * License, included below. This software may be subject to other third party 3 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 1,ISO/IEC6 * Copyright (c) 2010-2012, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 15 15 * this list of conditions and the following disclaimer in the documentation 16 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the I SO/IEC nor the names of its contributors may17 * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may 18 18 * be used to endorse or promote products derived from this software without 19 19 * specific prior written permission. … … 32 32 */ 33 33 34 35 36 34 /** \file TAppEncCfg.h 37 35 \brief Handle encoder configuration parameters (header) … … 41 39 #define __TAPPENCCFG__ 42 40 43 #include "../../Lib/TLibCommon/CommonDef.h" 44 #include "../../Lib/TLibCommon/TComMVDRefData.h" 45 #include "../../App/TAppCommon/TAppComCamPara.h" 46 #include "../../Lib/TLibRenderer/TRenTop.h" 47 #include "../../Lib/TLibRenderer/TRenModel.h" 48 #include "../../Lib/TLibRenderer/TRenModSetupStrParser.h" 49 50 #include <string> 41 #include "TLibCommon/CommonDef.h" 42 43 #include "TLibEncoder/TEncCfg.h" 44 #include "TAppCommon/TAppComCamPara.h" 45 #include "TLibRenderer/TRenTop.h" 46 #include "TLibRenderer/TRenModel.h" 47 #include "TLibRenderer/TRenModSetupStrParser.h" 48 49 #include <sstream> 51 50 #include <vector> 51 52 //! \ingroup TAppEncoder 53 //! \{ 52 54 53 55 // ==================================================================================================================== … … 60 62 protected: 61 63 // file I/O 62 char* m_pchBitstreamFile; ///< output bitstream file63 64 64 std::vector<char*> m_pchInputFileList; ///< source file names 65 65 std::vector<char*> m_pchDepthInputFileList; ///< source depth file names 66 66 std::vector<char*> m_pchReconFileList; ///< output reconstruction file names 67 67 std::vector<char*> m_pchDepthReconFileList; ///< output depth reconstruction file names 68 69 std::vector<char*> m_pchERRefFileList; ///< virtual external reference view files names 70 68 char* m_pchBitstreamFile; ///< output bitstream file 69 Double m_adLambdaModifier[ MAX_TLAYER ]; ///< Lambda modifier array for each temporal layer 71 70 // source specification 72 71 Int m_iFrameRate; ///< source frame-rates (Hz) … … 74 73 Int m_iSourceWidth; ///< source width in pixel 75 74 Int m_iSourceHeight; ///< source height in pixel 75 #if PIC_CROPPING 76 Int m_croppingMode; 77 Int m_cropLeft; 78 Int m_cropRight; 79 Int m_cropTop; 80 Int m_cropBottom; 81 #endif 76 82 Int m_iFrameToBeEncoded; ///< number of encoded frames 83 #if !PIC_CROPPING 77 84 Bool m_bUsePAD; ///< flag for using source padding 85 #endif 78 86 Int m_aiPad[2]; ///< number of padded pixels for width and height 79 80 Int m_iNumberOfViews; ///< number Views to Encode 81 Bool m_bUsingDepthMaps ; 82 83 #if FLEX_CODING_ORDER 84 char* m_pchMVCJointCodingOrder; ///< texture-depth coding order 85 Bool m_b3DVFlexOrder; ///< flexible coding order flag 86 #endif 87 88 87 88 Int m_iNumberOfViews; ///< number Views to Encode 89 Bool m_bUsingDepthMaps; 89 90 // coding structure 90 #if DCM_DECODING_REFRESH 91 Int m_iIntraPeriod; ///< period of I-slice (random access period) 91 92 Int m_iDecodingRefreshType; ///< random access type 92 #endif93 UInt m_uiCodedPictureStoreSize ;94 93 Int m_iGOPSize; ///< GOP size of hierarchical structure 95 Int m_iRateGOPSize; ///< GOP size for QP variance 96 #if !HHI_NO_LowDelayCoding 97 Bool m_bUseLDC; ///< flag for using low-delay coding mode 98 #endif 99 #if DCM_COMB_LIST 94 Int m_extraRPSs[MAX_VIEW_NUM]; 95 GOPEntryMvc m_GOPListsMvc[MAX_VIEW_NUM][MAX_GOP+1]; 96 #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER 97 Int m_numReorderPics[MAX_VIEW_NUM][MAX_TLAYER]; ///< total number of reorder pictures 98 Int m_maxDecPicBuffering[MAX_VIEW_NUM][MAX_TLAYER]; ///< total number of reference pictures needed for decoding 99 #else 100 Int m_numReorderFrames; ///< total number of reorder pictures 101 Int m_maxNumberOfReferencePictures; ///< total number of reference pictures needed for decoding 102 #endif 100 103 Bool m_bUseLComb; ///< flag for using combined reference list for uni-prediction in B-slices (JCTVC-D421) 101 104 Bool m_bLCMod; ///< flag for specifying whether the combined reference list for uni-prediction in B-slices is uploaded explicitly 102 #endif 103 std::string m_cInputFormatString ; // GOP string 105 Bool m_bDisInter4x4; 106 Bool m_enableNSQT; ///< flag for enabling NSQT 107 Bool m_enableAMP; 104 108 // coding quality 105 106 109 std::vector<Double> m_adQP; ///< QP value of key-picture (floating point) [0] video, [1] depth 107 std::vector<Int> m_aiQP; ///< QP value of key-picture (integer) 108 110 std::vector<Int> m_aiQP; ///< QP value of key-picture (integer) [0] video, [1] depth 109 111 Int m_aiTLayerQPOffset[MAX_TLAYER]; ///< QP offset corresponding to temporal layer depth 110 112 char* m_pchdQPFile; ///< QP offset for each slice (initialized from external file) 111 113 Int* m_aidQP; ///< array of slice QP values 114 Int* m_aidQPdepth; ///< array of depth slice QP values 112 115 Int m_iMaxDeltaQP; ///< max. |delta QP| 113 116 UInt m_uiDeltaQpRD; ///< dQP range for multi-pass slice QP optimization 117 Int m_iMaxCuDQPDepth; ///< Max. depth for a minimum CuDQPSize (0:default) 118 119 Int m_iChromaQpOffset; ///< ChromaQpOffset (0:default) 120 Int m_iChromaQpOffset2nd; ///< ChromaQpOffset2nd (0:default) 121 122 #if ADAPTIVE_QP_SELECTION 123 Bool m_bUseAdaptQpSelect; 124 #endif 125 126 Bool m_bUseAdaptiveQP; ///< Flag for enabling QP adaptation based on a psycho-visual model 127 Int m_iQPAdaptationRange; ///< dQP range by QP adaptation 128 129 #if H0566_TLA 130 Int m_maxTempLayer[MAX_VIEW_NUM]; ///< Max temporal layer 131 #else 132 Bool m_bTLayering; ///< indicates whether temporal IDs are set based on the hierarchical coding structure 133 Bool m_abTLayerSwitchingFlag[MAX_TLAYER]; ///< temporal layer switching flags corresponding to each temporal layer 134 #endif 114 135 115 136 // coding unit (CU) definition … … 117 138 UInt m_uiMaxCUHeight; ///< max. CU height in pixel 118 139 UInt m_uiMaxCUDepth; ///< max. CU depth 119 140 120 141 // transfom unit (TU) definition 121 142 UInt m_uiQuadtreeTULog2MaxSize; 122 143 UInt m_uiQuadtreeTULog2MinSize; 123 144 124 145 UInt m_uiQuadtreeTUMaxDepthInter; 125 146 UInt m_uiQuadtreeTUMaxDepthIntra; 126 147 127 148 // coding tools (bit-depth) 128 149 UInt m_uiInputBitDepth; ///< bit-depth of input file 129 150 UInt m_uiOutputBitDepth; ///< bit-depth of output file 130 #ifdef ENABLE_IBDI131 UInt m_uiBitIncrement; ///< bit-depth increment132 #endif133 151 UInt m_uiInternalBitDepth; ///< Internal bit-depth (BitDepth+BitIncrement) 134 152 135 #if MTK_SAO 153 // coding tools (PCM bit-depth) 154 Bool m_bPCMInputBitDepthFlag; ///< 0: PCM bit-depth is internal bit-depth. 1: PCM bit-depth is input bit-depth. 155 UInt m_uiPCMBitDepthLuma; ///< PCM bit-depth for luma 156 157 // coding tool (lossless) 158 #if LOSSLESS_CODING 159 Bool m_useLossless; ///< flag for using lossless coding 160 #endif 136 161 vector<Bool> m_abUseSAO; 137 #endif 138 162 #if SAO_UNIT_INTERLEAVING 163 Int m_maxNumOffsetsPerPic; ///< SAO maximun number of offset per picture 164 Bool m_saoInterleavingFlag; ///< SAO interleaving flag 165 #endif 139 166 // coding tools (loop filter) 140 167 vector<Bool> m_abUseALF; ///< flag for using adaptive loop filter [0] - video, [1] - depth 141 #ifdef MQT_ALF_NPASS 142 Int m_iALFEncodePassReduction; ///< ALF encoding pass, 0 = original 16-pass, 1 = 1-pass, 2 = 2-pass 168 Int m_iALFEncodePassReduction; //!< ALF encoding pass, 0 = original 16-pass, 1 = 1-pass, 2 = 2-pass 169 170 Int m_iALFMaxNumberFilters; ///< ALF Max Number Filters in one picture 171 #if LCU_SYNTAX_ALF 172 Bool m_bALFParamInSlice; 173 Bool m_bALFPicBasedEncode; 143 174 #endif 144 175 145 176 vector<Bool> m_abLoopFilterDisable; ///< flag for using deblocking filter filter [0] - video, [1] - depth 146 Int m_iLoopFilterAlphaC0Offset; ///< alpha offset for deblocking filter 147 Int m_iLoopFilterBetaOffset; ///< beta offset for deblocking filter 148 149 // coding tools (entropy coder) 150 Int m_iSymbolMode; ///< entropy coder mode, 0 = VLC, 1 = CABAC 151 152 // coding tools (inter - merge motion partitions) 153 Bool m_bUseMRG; ///< SOPH: flag for using motion partition Merge Mode 154 155 #if LM_CHROMA 177 Bool m_loopFilterOffsetInAPS; ///< offset for deblocking filter in 0 = slice header, 1 = APS 178 Int m_loopFilterBetaOffsetDiv2; ///< beta offset for deblocking filter 179 Int m_loopFilterTcOffsetDiv2; ///< tc offset for deblocking filter 180 #if DBL_CONTROL 181 Bool m_DeblockingFilterControlPresent; ///< deblocking filter control present flag in PPS 182 #endif 183 156 184 Bool m_bUseLMChroma; ///< JL: Chroma intra prediction based on luma signal 157 #endif 158 159 #if HHI_RMP_SWITCH 160 Bool m_bUseRMP; 161 #endif 185 186 // coding tools (PCM) 187 Bool m_usePCM; ///< flag for using IPCM 188 UInt m_pcmLog2MaxSize; ///< log2 of maximum PCM block size 189 UInt m_uiPCMLog2MinSize; ///< log2 of minimum PCM block size 190 Bool m_bPCMFilterDisableFlag; ///< PCM filter disable flag 162 191 163 192 // coding tools (encoder-only parameters) … … 165 194 Bool m_bUseASR; ///< flag for using adaptive motion search range 166 195 Bool m_bUseHADME; ///< flag for using HAD in sub-pel ME 167 196 vector<Bool> m_abUseRDOQ; ///< flag for using RD optimized quantization [0]-video, [1]-depth 168 197 Int m_iFastSearch; ///< ME mode, 0 = full, 1 = diamond, 2 = PMVFAST 169 198 Int m_iSearchRange; ///< ME search range 170 199 Int m_bipredSearchRange; ///< ME search range for bipred refinement 171 200 Bool m_bUseFastEnc; ///< flag for using fast encoder setting 201 #if HHI_INTERVIEW_SKIP 202 Bool m_bInterViewSkip; ///< usage of interview skip mode ( do not transmit residual) 203 #if HHI_INTERVIEW_SKIP_LAMBDA_SCALE 204 Double m_dInterViewSkipLambdaScale; ///< lambda scale for interview skip 205 #endif 206 #endif 207 Bool m_bUseEarlyCU; ///< flag for using Early CU setting 172 208 173 209 #if DEPTH_MAP_GENERATION … … 183 219 #endif 184 220 185 #if HHI_INTERVIEW_SKIP 186 UInt m_uiInterViewSkip; ///< usage of interview skip mode ( do not transmit residual) 187 #if HHI_INTERVIEW_SKIP_LAMBDA_SCALE 188 Double m_dInterViewSkipLambdaScale; ///< lambda scale for interview skip 189 #endif 190 #endif 221 #if FAST_DECISION_FOR_MRG_RD_COST 222 Bool m_useFastDecisionForMerge; ///< flag for using Fast Decision Merge RD-Cost 223 #endif 224 Bool m_bUseCbfFastMode; ///< flag for using Cbf Fast PU Mode Decision 225 Int m_iSliceMode; ///< 0: Disable all Recon slice limits, 1 : Maximum number of largest coding units per slice, 2: Maximum number of bytes in a slice 226 Int m_iSliceArgument; ///< If m_iSliceMode==1, m_iSliceArgument=max. # of largest coding units. If m_iSliceMode==2, m_iSliceArgument=max. # of bytes. 227 Int m_iEntropySliceMode; ///< 0: Disable all entropy slice limits, 1 : Maximum number of largest coding units per slice, 2: Constraint based entropy slice 228 Int m_iEntropySliceArgument;///< If m_iEntropySliceMode==1, m_iEntropySliceArgument=max. # of largest coding units. If m_iEntropySliceMode==2, m_iEntropySliceArgument=max. # of bins. 229 230 Int m_iSliceGranularity;///< 0: Slices always end at LCU borders. 1-3: slices may end at a depth of 1-3 below LCU level. 231 Bool m_bLFCrossSliceBoundaryFlag; ///< 0: Cross-slice-boundary in-loop filtering 1: non-cross-slice-boundary in-loop filtering 232 Int m_iTileBehaviorControlPresentFlag; //!< 1: tile behavior control parameters are in PPS 0: tile behavior control parameters are not in PPS 233 Bool m_bLFCrossTileBoundaryFlag; //!< 1: Cross-tile-boundary in-loop filtering 0: non-cross-tile-boundary in-loop filtering 234 Int m_iColumnRowInfoPresent; 235 Int m_iUniformSpacingIdr; 236 #if !REMOVE_TILE_DEPENDENCE 237 Int m_iTileBoundaryIndependenceIdr; 238 #endif 239 Int m_iNumColumnsMinus1; 240 char* m_pchColumnWidth; 241 Int m_iNumRowsMinus1; 242 char* m_pchRowHeight; 243 Int m_iTileLocationInSliceHeaderFlag; //< enable(1)/disable(0) transmitssion of tile location in slice header 244 Int m_iTileMarkerFlag; //< enable(1)/disable(0) transmitssion of light weight tile marker 245 Int m_iMaxTileMarkerEntryPoints; //< maximum number of tile markers allowed in a slice (controls degree of parallelism) 246 Double m_dMaxTileMarkerOffset; //< Calculated offset. Light weight tile markers will be transmitted for TileIdx= Offset, 2*Offset, 3*Offset ... 247 248 Int m_iWaveFrontSynchro; //< 0: no WPP. >= 1: WPP is enabled, the "Top right" from which inheritance occurs is this LCU offset in the line above the current. 249 Int m_iWaveFrontFlush; //< enable(1)/disable(0) the CABAC flush at the end of each line of LCUs. 250 Int m_iWaveFrontSubstreams; //< If iWaveFrontSynchro, this is the number of substreams per frame (dependent tiles) or per tile (independent tiles). 251 252 Bool m_bUseConstrainedIntraPred; ///< flag for using constrained intra prediction 253 254 bool m_pictureDigestEnabled; ///< enable(1)/disable(0) md5 computation and SEI signalling 255 256 // weighted prediction 257 Bool m_bUseWeightPred; ///< Use of explicit Weighting Prediction for P_SLICE 258 UInt m_uiBiPredIdc; ///< Use of Bi-Directional Weighting Prediction (B_SLICE): explicit(1) or implicit(2) 259 260 Bool m_enableTMVP; 261 #if MULTIBITS_DATA_HIDING 262 Int m_signHideFlag; 263 Int m_signHidingThreshold; 264 #endif 265 #if HHI_MPI 266 Bool m_bUseMVI; ///< flag for using Motion Vector Inheritance for depth map coding 267 #endif 268 269 Int m_useScalingListId; ///< using quantization matrix 270 char* m_scalingListFile; ///< quantization matrix file name 191 271 192 272 // camera parameter … … 196 276 197 277 Int m_iCodedCamParPrecision; ///< precision for coding of camera parameters 198 199 #if HHI_INTERVIEW_SKIP200 TRenTop m_cUsedPelsRenderer; ///< renderer for used pels map201 #endif202 278 203 279 #if HHI_VSO … … 211 287 Bool m_bAllowNegDist; ///< Allow negative distortion in VSO 212 288 #endif 213 UInt m_uiVSOMode; ///< Number of VSO Mode, 1 = , 2 = simple, org vs. ren, 3 = simple, ren vs. ren, 4 = full 214 Int m_iNumberOfExternalRefs; ///< number Virtual External Reference Views 215 std::vector< std::vector<Int> > m_aaiBaseViewRefInd; ///< View numbers of Base View References 216 std::vector< std::vector<Int> > m_aaiERViewRefInd; ///< View numbers of External ViewReferences 217 std::vector< std::vector<Int> > m_aaiERViewRefLutInd; ///< Indices of LUTs used for External View References 218 #endif 219 220 Int m_iSliceMode; ///< 0: Disable all Recon slice limits, 1 : Maximum number of largest coding units per slice, 2: Maximum number of bytes in a slice 221 Int m_iSliceArgument; ///< If m_iSliceMode==1, m_iSliceArgument=max. # of largest coding units. If m_iSliceMode==2, m_iSliceArgument=max. # of bytes. 222 Int m_iEntropySliceMode; ///< 0: Disable all entropy slice limits, 1 : Maximum number of largest coding units per slice, 2: Constraint based entropy slice 223 Int m_iEntropySliceArgument;///< If m_iEntropySliceMode==1, m_iEntropySliceArgument=max. # of largest coding units. If m_iEntropySliceMode==2, m_iEntropySliceArgument=max. # of bins. 224 225 #if MTK_NONCROSS_INLOOP_FILTER 226 Bool m_bLFCrossSliceBoundaryFlag; ///< 0: Cross-slice-boundary in-loop filtering 1: non-cross-slice-boundary in-loop filtering 227 #endif 228 #ifdef ROUNDING_CONTROL_BIPRED 229 Bool m_useRoundingControlBipred; 230 #endif 231 #if CONSTRAINED_INTRA_PRED 232 Bool m_bUseConstrainedIntraPred; ///< flag for using constrained intra prediction 233 #endif 289 UInt m_uiVSOMode; ///< Number of VSO Mode, 1 = , 2 = simple, org vs. ren, 3 = simple, ren vs. ren, 4 = full 290 #endif 291 292 // coding tools (depth intra modes) 234 293 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 235 Bool m_bUseDMM; 236 #endif 237 #if HHI_MPI 238 Bool m_bUseMVI; ///< flag for using Motion Vector Inheritance for depth map coding 239 #endif 240 241 PicOrderCnt m_iQpChangeFrame; 242 Int m_iQpChangeOffsetVideo; 243 Int m_iQpChangeOffsetDepth; 244 245 bool m_pictureDigestEnabled; ///< enable(1)/disable(0) md5 computation and SEI signalling 246 247 //====== Weighted Prediction ======== 248 #ifdef WEIGHT_PRED 249 Bool m_bUseWeightPred; ///< Use of explicit Weighting Prediction for P_SLICE 250 UInt m_uiBiPredIdc; ///< Use of Bi-Directional Weighting Prediction (B_SLICE): explicit(1) or implicit(2) 294 Bool m_bUseDMM; ///< flag for using DMM 251 295 #endif 252 296 … … 256 300 Void xPrintParameter (); ///< print configuration values 257 301 Void xPrintUsage (); ///< print usage 258 302 259 303 Void xCleanUpVectors (); ///< clean up vector sizes 260 304 Void xInitCameraPars (); ///< init camera parameters … … 265 309 Void xGetShiftParameter( UInt uiSourceView, UInt uiTargetView, bool bExternal, double& rdScale, double& rdOffset ); ///< Get one Shift Parameters 266 310 267 // util268 311 Void xAppendToFileNameEnd( Char* pchInputFileName, const Char* pchStringToAppend, Char* & rpchOutputFileName); 269 Bool xConfirmParameter(Bool bflag, const char* message); 270 312 313 Void xCheckCodingStructureMvc(); ///< validate and configure inter-view coding structure 271 314 272 315 template <class T> Void xCleanUpVector( std::vector<T>& rcVec, const T& rcInvalid ); 273 274 316 #if HHI_VSO 275 317 // Ren Model String … … 277 319 #endif 278 320 public: 279 280 321 TAppEncCfg(); 281 322 virtual ~TAppEncCfg(); 282 323 283 324 public: 284 325 Void create (); ///< create option handling class 285 326 Void destroy (); ///< destroy option handling class 286 327 Bool parseCfg ( Int argc, Char* argv[] ); ///< parse configuration file to fill member variables 287 328 288 329 };// END CLASS DEFINITION TAppEncCfg 289 330 331 //! \} 332 290 333 #endif // __TAPPENCCFG__ 291 334
Note: See TracChangeset for help on using the changeset viewer.