📄 configfile.h
字号:
/*!
***********************************************************************
* \file
* configfile.h
* \brief
* Prototypes for configfile.c and definitions of used structures.
***********************************************************************
*/
#include "fmo.h"
#ifndef _CONFIGFILE_H_
#define _CONFIGFILE_H_
#define DEFAULTCONFIGFILENAME "encoder.cfg"
#define PROFILE_IDC 88
#define LEVEL_IDC 21
typedef struct {
char *TokenName;
void *Place;
int Type;
double Default;
int param_limits; //! 0: no limits, 1: both min and max, 2: only min (i.e. no negatives), 3: specialcase for QPs since min needs bitdepth_qp_scale
double min_limit;
double max_limit;
} Mapping;
InputParameters configinput;
#ifdef INCLUDED_BY_CONFIGFILE_C
Mapping Map[] = {
{"ProfileIDC", &configinput.ProfileIDC, 0, (double) PROFILE_IDC, 0, 0.0, 0.0 },
{"LevelIDC", &configinput.LevelIDC, 0, (double) LEVEL_IDC, 0, 0.0, 0.0 },
{"FrameRate", &configinput.FrameRate, 2, (double) INIT_FRAME_RATE, 1, 0.0, 100.0 },
{"IDRIntraEnable", &configinput.idr_enable, 0, 0.0, 1, 0.0, 1.0 },
{"StartFrame", &configinput.start_frame, 0, 0.0, 2, 0.0, 0.0 },
{"IntraPeriod", &configinput.intra_period, 0, 0.0, 2, 0.0, 0.0 },
{"EnableOpenGOP", &configinput.EnableOpenGOP, 0, 0.0, 1, 0.0, 1.0 },
{"FramesToBeEncoded", &configinput.no_frames, 0, 1.0, 2, 1.0, 0.0 },
{"QPISlice", &configinput.qp0, 0, 24.0, 3, (double) MIN_QP, (double) MAX_QP },
{"QPPSlice", &configinput.qpN, 0, 24.0, 3, (double) MIN_QP, (double) MAX_QP },
{"QPBSlice", &configinput.qpB, 0, 24.0, 3, (double) MIN_QP, (double) MAX_QP },
{"FrameSkip", &configinput.jumpd, 0, 0.0, 2, 0.0, 0.0 },
{"UseHadamard", &configinput.hadamard, 0, 0.0, 1, 0.0, 2.0 },
{"DisableSubpelME", &configinput.DisableSubpelME, 0, 0.0, 1, 0.0, 1.0 },
{"SearchRange", &configinput.search_range, 0, 16.0, 2, 0.0, 0.0 },
{"NumberReferenceFrames", &configinput.num_ref_frames, 0, 1.0, 1, 1.0, 16.0 },
{"PList0References", &configinput.P_List0_refs, 0, 0.0, 1, 0.0, 16.0 },
{"BList0References", &configinput.B_List0_refs, 0, 0.0, 1, 0.0, 16.0 },
{"BList1References", &configinput.B_List1_refs, 0, 1.0, 1, 0.0, 16.0 },
{"Log2MaxFNumMinus4", &configinput.Log2MaxFNumMinus4, 0, 0.0, 1, -1.0, 12.0 },
{"Log2MaxPOCLsbMinus4", &configinput.Log2MaxPOCLsbMinus4, 0, 2.0, 1, -1.0, 12.0 },
{"GenerateMultiplePPS", &configinput.GenerateMultiplePPS, 0, 0.0, 1, 0.0, 1.0 },
{"ResendPPS", &configinput.ResendPPS, 0, 0.0, 1, 0.0, 1.0 },
{"SourceWidth", &configinput.img_width, 0, 176.0, 2, 16.0, 0.0 },
{"SourceHeight", &configinput.img_height, 0, 144.0, 2, 16.0, 0.0 },
{"MbLineIntraUpdate", &configinput.intra_upd, 0, 0.0, 1, 0.0, 1.0 },
{"SliceMode", &configinput.slice_mode, 0, 0.0, 1, 0.0, 3.0 },
{"SliceArgument", &configinput.slice_argument, 0, 0.0, 2, 1.0, 1.0 },
{"UseConstrainedIntraPred", &configinput.UseConstrainedIntraPred, 0, 0.0, 1, 0.0, 1.0 },
{"InputFile", &configinput.infile, 1, 0.0, 0, 0.0, 0.0 },
{"InputHeaderLength", &configinput.infile_header, 0, 0.0, 2, 0.0, 1.0 },
{"OutputFile", &configinput.outfile, 1, 0.0, 0, 0.0, 0.0 },
{"ReconFile", &configinput.ReconFile, 1, 0.0, 0, 0.0, 0.0 },
{"TraceFile", &configinput.TraceFile, 1, 0.0, 0, 0.0, 0.0 },
{"DisposableP", &configinput.DisposableP, 0, 0.0, 1, 0.0, 1.0 },
{"DispPQPOffset", &configinput.DispPQPOffset, 0, 0.0, 0,-51.0, 51.0 },
{"NumberBFrames", &configinput.successive_Bframe, 0, 0.0, 2, 0.0, 0.0 },
{"BRefPicQPOffset", &configinput.qpBRSOffset, 0, 0.0, 0,-51.0, 51.0 },
{"DirectModeType", &configinput.direct_spatial_mv_pred_flag, 0, 0.0, 1, 0.0, 1.0 },
{"DirectInferenceFlag", &configinput.directInferenceFlag, 0, 0.0, 1, 0.0, 1.0 },
{"SPPicturePeriodicity", &configinput.sp_periodicity, 0, 0.0, 2, 0.0, 0.0 },
{"QPSPSlice", &configinput.qpsp, 0, 24.0, 3, (double) MIN_QP, (double) MAX_QP },
{"QPSP2Slice", &configinput.qpsp_pred, 0, 24.0, 3, (double) MIN_QP, (double) MAX_QP },
{"SI_FRAMES", &configinput.si_frame_indicator, 0, 0.0, 1, 0.0, 1.0 },
{"SP_output", &configinput.sp_output_indicator, 0, 0.0, 1, 0.0, 1.0 },
{"SP_output_name", &configinput.sp_output_filename, 1, 0.0, 0, 0.0, 0.0 },
{"SP2_FRAMES", &configinput.sp2_frame_indicator, 0, 0.0, 1, 0.0, 1.0 },
{"SP2_input_name1", &configinput.sp2_input_filename1, 1, 0.0, 0, 0.0, 0.0 },
{"SP2_input_name2", &configinput.sp2_input_filename2, 1, 0.0, 0, 0.0, 0.0 },
{"SymbolMode", &configinput.symbol_mode, 0, 0.0, 1, (double) UVLC, (double) CABAC },
{"OutFileMode", &configinput.of_mode, 0, 0.0, 1, 0.0, 1.0 },
{"PartitionMode", &configinput.partition_mode, 0, 0.0, 1, 0.0, 1.0 },
{"InterSearch16x16", &configinput.InterSearch16x16, 0, 1.0, 1, 0.0, 1.0 },
{"InterSearch16x8", &configinput.InterSearch16x8 , 0, 1.0, 1, 0.0, 1.0 },
{"InterSearch8x16", &configinput.InterSearch8x16, 0, 1.0, 1, 0.0, 1.0 },
{"InterSearch8x8", &configinput.InterSearch8x8 , 0, 1.0, 1, 0.0, 1.0 },
{"InterSearch8x4", &configinput.InterSearch8x4, 0, 1.0, 1, 0.0, 1.0 },
{"InterSearch4x8", &configinput.InterSearch4x8, 0, 1.0, 1, 0.0, 1.0 },
{"InterSearch4x4", &configinput.InterSearch4x4, 0, 1.0, 1, 0.0, 1.0 },
{"IntraDisableInterOnly", &configinput.IntraDisableInterOnly, 0, 0.0, 1, 0.0, 1.0 },
{"Intra4x4ParDisable", &configinput.Intra4x4ParDisable, 0, 0.0, 1, 0.0, 1.0 },
{"Intra4x4DiagDisable", &configinput.Intra4x4DiagDisable, 0, 0.0, 1, 0.0, 1.0 },
{"Intra4x4DirDisable", &configinput.Intra4x4DirDisable, 0, 0.0, 1, 0.0, 1.0 },
{"Intra16x16ParDisable", &configinput.Intra16x16ParDisable, 0, 0.0, 1, 0.0, 1.0 },
{"Intra16x16PlaneDisable", &configinput.Intra16x16PlaneDisable, 0, 0.0, 1, 0.0, 1.0 },
{"EnableIPCM", &configinput.EnableIPCM, 0, 1.0, 1, 0.0, 1.0 },
{"ChromaIntraDisable", &configinput.ChromaIntraDisable, 0, 0.0, 1, 0.0, 1.0 },
#ifdef _FULL_SEARCH_RANGE_
{"RestrictSearchRange", &configinput.full_search, 0, 2.0, 1, 0.0, 2.0 },
#endif
#ifdef _ADAPT_LAST_GROUP_
{"LastFrameNumber", &configinput.last_frame, 0, 0.0, 2, 0.0, 0.0 },
#endif
#ifdef _CHANGE_QP_
{"ChangeQPI", &configinput.qp02, 0, 24.0, 3, (double) MIN_QP, (double) MAX_QP },
{"ChangeQPP", &configinput.qpN2, 0, 24.0, 3, (double) MIN_QP, (double) MAX_QP },
{"ChangeQPB", &configinput.qpB2, 0, 24.0, 3, (double) MIN_QP, (double) MAX_QP },
{"ChangeQPBSRefOffset", &configinput.qpBRS2Offset, 0, 0.0, 1,-51.0, 51.0 },
{"ChangeQPStart", &configinput.qp2start, 0, 0.0, 2, 0.0, 0.0 },
#endif
{"RDOptimization", &configinput.rdopt, 0, 0.0, 1, 0.0, 2.0 },
{"DisableThresholding", &configinput.disthres, 0, 0.0, 1, 0.0, 1.0 },
{"DisableBSkipRDO", &configinput.nobskip, 0, 0.0, 1, 0.0, 1.0 },
{"LossRateA", &configinput.LossRateA, 0, 0.0, 2, 0.0, 0.0 },
{"LossRateB", &configinput.LossRateB, 0, 0.0, 2, 0.0, 0.0 },
{"LossRateC", &configinput.LossRateC, 0, 0.0, 2, 0.0, 0.0 },
{"NumberOfDecoders", &configinput.NoOfDecoders, 0, 0.0, 2, 0.0, 0.0 },
{"RestrictRefFrames", &configinput.RestrictRef , 0, 0.0, 1, 0.0, 1.0 },
#ifdef _LEAKYBUCKET_
{"NumberofLeakyBuckets", &configinput.NumberLeakyBuckets, 0, 2.0, 1, 2.0, 255.0 },
{"LeakyBucketRateFile", &configinput.LeakyBucketRateFile, 1, 0.0, 0, 0.0, 0.0 },
{"LeakyBucketParamFile", &configinput.LeakyBucketParamFile, 1, 0.0, 0, 0.0, 0.0 },
#endif
{"PicInterlace", &configinput.PicInterlace, 0, 0.0, 1, 0.0, 2.0 },
{"MbInterlace", &configinput.MbInterlace, 0, 0.0, 1, 0.0, 2.0 },
{"IntraBottom", &configinput.IntraBottom, 0, 0.0, 1, 0.0, 1.0 },
{"NumberFramesInEnhancementLayerSubSequence", &configinput.NumFramesInELSubSeq, 0, 0.0, 2, 0.0, 0.0 },
{"NumberOfFrameInSecondIGOP",&configinput.NumFrameIn2ndIGOP, 0, 0.0, 2, 0.0, 0.0 },
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -