Template
108 lines
8.5 KiB
C
108 lines
8.5 KiB
C
|
|
/*!
|
|
***********************************************************************
|
|
* \file
|
|
* configfile.h
|
|
* \brief
|
|
* Prototypes for configfile.c and definitions of used structures.
|
|
***********************************************************************
|
|
*/
|
|
|
|
#ifndef _CONFIGFILE_H_
|
|
#define _CONFIGFILE_H_
|
|
|
|
#define DEFAULTCONFIGFILENAME "decoder.cfg"
|
|
|
|
#include "config_common.h"
|
|
//#define PROFILE_IDC 88
|
|
//#define LEVEL_IDC 21
|
|
|
|
|
|
InputParameters cfgparams;
|
|
|
|
#ifdef INCLUDED_BY_CONFIGFILE_C
|
|
// Mapping_Map Syntax:
|
|
// {NAMEinConfigFile, &cfgparams.VariableName, Type, InitialValue, LimitType, MinLimit, MaxLimit, CharSize}
|
|
// Types : {0:int, 1:text, 2: double}
|
|
// LimitType: {0:none, 1:both, 2:minimum, 3: QP based}
|
|
// We could separate this based on types to make it more flexible and allow also defaults for text types.
|
|
Mapping Map[] = {
|
|
{"InputFile", &cfgparams.infile, 1, 0.0, 0, 0.0, 0.0, FILE_NAME_SIZE, },
|
|
{"OutputFile", &cfgparams.outfile, 1, 0.0, 0, 0.0, 0.0, FILE_NAME_SIZE, },
|
|
{"RefFile", &cfgparams.reffile, 1, 0.0, 0, 0.0, 0.0, FILE_NAME_SIZE, },
|
|
{"WriteUV", &cfgparams.write_uv, 0, 1.0, 1, 0.0, 1.0, },
|
|
{"FileFormat", &cfgparams.FileFormat, 0, 0.0, 1, 0.0, 1.0, },
|
|
{"RefOffset", &cfgparams.ref_offset, 0, 0.0, 1, 0.0, 256.0, },
|
|
{"POCScale", &cfgparams.poc_scale, 0, 2.0, 1, 1.0, 10.0, },
|
|
#ifdef _LEAKYBUCKET_
|
|
{"R_decoder", &cfgparams.R_decoder, 0, 500000.0, 2, 0.0, 0.0, },
|
|
{"B_decoder", &cfgparams.B_decoder, 0, 104000.0, 2, 0.0, 0.0, },
|
|
{"F_decoder", &cfgparams.F_decoder, 0, 73000.0, 2, 0.0, 0.0, },
|
|
{"LeakyBucketParamFile", &cfgparams.LeakyBucketParamFile, 1, 0.0, 0, 0.0, 0.0, FILE_NAME_SIZE, },
|
|
#endif
|
|
{"DisplayDecParams", &cfgparams.bDisplayDecParams, 0, 1.0, 1, 0.0, 1.0, },
|
|
|
|
|
|
{"RefPOCGap", &cfgparams.ref_poc_gap, 0, 2.0, 1, 0.0, 4.0, },
|
|
{"POCGap", &cfgparams.poc_gap, 0, 2.0, 1, 0.0, 4.0, },
|
|
{"Silent", &cfgparams.silent, 0, 0.0, 1, 0.0, 1.0, },
|
|
{"IntraProfileDeblocking", &cfgparams.intra_profile_deblocking, 0, 1.0, 1, 0.0, 1.0, },
|
|
{"DecFrmNum", &cfgparams.iDecFrmNum, 0, 0.0, 2, 0.0, 0.0, },
|
|
#if (MVC_EXTENSION_ENABLE)
|
|
{"DecodeAllLayers", &cfgparams.DecodeAllLayers, 0, 0.0, 1, 0.0, 1.0, },
|
|
#endif
|
|
{"DPBPLUS0", &cfgparams.dpb_plus[0], 0, 2.0, 1, -16.0, 16.0, },
|
|
{"DPBPLUS1", &cfgparams.dpb_plus[1], 0, 0.0, 1, -16.0, 16.0, },
|
|
|
|
//Error Concealment
|
|
{"ConcealMode", &cfgparams.conceal_mode, 0, 0.0, 1, 0.0, 22.0, },
|
|
|
|
|
|
|
|
// {NAMEinConfigFile, &cfgparams.VariableName, Type, InitialValue, LimitType, MinLimit, MaxLimit, CharSize}
|
|
|
|
//! Following parameters were edited by Joao Carreira
|
|
//! Parser
|
|
{"FrameSkip", &cfgparams.FrameSkip, 0, 0.0, 0, 0.0, 0.0, },
|
|
{"IDRPeriod", &cfgparams.IDR_Period, 0, 0.0, 0, 0.0, 0.0, },
|
|
{"GOPSize", &cfgparams.GOP_Size, 0, 0.0, 0, 0.0, 0.0, },
|
|
{"SearchModeRef", &cfgparams.search_mode_ref, 0, 1.0, 1, 0.0, 4.0, },
|
|
{"SearchModeNonRef", &cfgparams.search_mode_nonref, 0, 1.0, 1, 0.0, 4.0, },
|
|
{"ErrorPropagation", &cfgparams.error_prop, 0, 0.0, 1, 0.0, 1.0, },
|
|
{"DropNALU", &cfgparams.drop_nalu, 1, 0.0, 0, 0.0, 0.0, MAX_LOST_NALU, },
|
|
//! Stats
|
|
{"StatsFile", &cfgparams.statsfile, 1, 0.0, 0, 0.0, 0.0, FILE_NAME_SIZE, },
|
|
|
|
{"DisparityMethod", &cfgparams.DisparityMethod, 0, 0.0, 1, 0.0, 4.0, },
|
|
{"DisparityDirection", &cfgparams.DisparityDirection, 0, 0.0, 1, -1.0, 1.0, },
|
|
{"DisparityReference", &cfgparams.DisparityReference, 0, 0.0, 1, 0.0, 1.0, },
|
|
{"DisparityWindow", &cfgparams.DisparityWindow, 0, 1.0, 1, 1.0, 16.0, },
|
|
{"DisparityProjection", &cfgparams.DisparityProjection, 0, 0.0, 1, 0.0, 2.0, },
|
|
{"DispLoadFileName", &cfgparams.DispLoadFileName, 1, 0.0, 0, 0.0, 0.0, FILE_NAME_SIZE, },
|
|
{"Disparity4x4BlockSize", &cfgparams.Disparity4x4BlockSize, 0, 4.0, 1, 4.0, 256.0, },
|
|
{"MotionVectorCandidates", &cfgparams.MotionVectorCandidates, 0, 0.0, 1, 0.0, 5, },
|
|
{"MVConcealmentMode", &cfgparams.MVConcealmentMode, 0, 0.0, 1, 0.0, 4, },
|
|
{"TemporalThreshold", &cfgparams.TemporalThreshold, 0, 0.0, 1, 0.0, 100, },
|
|
{"SpatialThreshold", &cfgparams.SpatialThreshold, 0, 0.0, 1, 0.0, 100, },
|
|
|
|
//! NAL unit Parser parameters
|
|
{"NALUParser", &cfgparams.dump_nalu, 0, 0.0, 1, 0.0, 1.0, },
|
|
{"PredictionParser", &cfgparams.PredictionParser, 0, 0.0, 1, 0.0, 1.0, },
|
|
|
|
//! Transcode parameters
|
|
{"TranscodeFile", &cfgparams.TranscodeFile, 1, 0.0, 0, 0.0, 0.0, FILE_NAME_SIZE, },
|
|
|
|
{NULL, NULL, -1, 0.0, 0, 0.0, 0.0, },
|
|
|
|
};
|
|
#endif
|
|
|
|
#ifndef INCLUDED_BY_CONFIGFILE_C
|
|
extern Mapping Map[];
|
|
#endif
|
|
extern void JMDecHelpExit ();
|
|
extern void ParseCommand(InputParameters *p_Inp, int ac, char *av[]);
|
|
|
|
#endif
|
|
|