File: drccfg.h

package info (click to toggle)
drc 3.2.2~dfsg0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,548 kB
  • sloc: ansic: 13,575; cpp: 11,048; sh: 253; makefile: 41
file content (286 lines) | stat: -rw-r--r-- 7,172 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
/****************************************************************************

    DRC: Digital Room Correction
    Copyright (C) 2002-2017 Denis Sbragion

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

		You can contact the author on Internet at the following address:

				d.sbragion@neomerica.it

****************************************************************************/

/* Opzioni di configurazione DRC */

#ifndef DRCCfg_h
	#define DRCCfg_h

	/* Inclusioni */
	#include "drc.h"
	#include "cmdline.h"

	/* Posizione opzione directory base di configurazione
	nella lista parametri */
	#define BCBaseDirParmPos 0

	/* Struttura definizione configurazione */
	/* Prefissi variabili
		BC = Base Configuration
		HD = Homomorphic Deconvolution
		MP = Minimum phase frequency dependent windowing
		DL = Dip limiting stage
		EP = Excess phase frequency dependent windowing
		PC = Prefiltering completion stage
		IS = Inversion stage
		PT = Psychoacoustic target stage
		PL = Peak limiting stage
		RT = Ringing truncation stage
		PS = Postfiltering stage
		MC = Mic compensation stage
		MS = Minimum phase filter extraction stage
		TC = Test convolution stage
	*/
	typedef struct
		{
			/* Base configuration */
			char * BCBaseDir;
			char * BCInFile;
			char * BCInFileType;
			int BCSampleRate;
			char * BCImpulseCenterMode;
			int BCImpulseCenter;
			int BCInitWindow;
			int BCPreWindowLen;
			int BCPreWindowGap;
			DRCFloat BCNormFactor;
			char * BCNormType;

      /* Mic compensation stage */
			char * MCFilterType;
			char * MCInterpolationType;
			int MCMultExponent;
			int MCFilterLen;
			int MCNumPoints;
			char * MCPointsFile;
			char * MCMagType;
			int MCOutWindow;
			char * MCFilterFile;
			char * MCFilterFileType;
			DRCFloat MCNormFactor;
			char * MCNormType;
			char * MCOutFile;
			char * MCOutFileType;

			/* Base configuration dip limiting stage */
			char * BCDLType;
			DRCFloat BCDLMinGain;
			DRCFloat BCDLStart;
			DRCFloat BCDLStartFreq;
			DRCFloat BCDLEndFreq;
			int BCDLMultExponent;

			/* Homomorphic Deconvolution */
			int HDMultExponent;
			DRCFloat HDMPNormFactor;
			char * HDMPNormType;
			char * HDMPOutFile;
			char * HDMPOutFileType;
			DRCFloat HDEPNormFactor;
			char * HDEPNormType;
			char * HDEPOutFile;
			char * HDEPOutFileType;

			/* Minimum phase prefiltering stage */
			char * MPPrefilterType;
			char * MPPrefilterFctn;
			int MPWindowGap;
			int MPLowerWindow;
			int MPUpperWindow;
			DRCFloat MPStartFreq;
			DRCFloat MPEndFreq;
			DRCFloat MPWindowExponent;
			int MPFilterLen;
			DRCFloat MPFSharpness;
			int MPBandSplit;
			char * MPHDRecover;
			char * MPEPPreserve;
			int MPHDMultExponent;
			int MPPFFinalWindow;
			DRCFloat MPPFNormFactor;
			char * MPPFNormType;
			char * MPPFOutFile;
			char * MPPFOutFileType;

			/* Dip limiting stage */
			char * DLType;
			DRCFloat DLMinGain;
			DRCFloat DLStart;
			DRCFloat DLStartFreq;
			DRCFloat DLEndFreq;
			int DLMultExponent;

			/* Excess fase phase prefiltering stage */
			char * EPPrefilterType;
			char * EPPrefilterFctn;
			int EPWindowGap;
			int EPLowerWindow;
			int EPUpperWindow;
			DRCFloat EPStartFreq;
			DRCFloat EPEndFreq;
			DRCFloat EPWindowExponent;
			int EPFilterLen;
			DRCFloat EPFSharpness;
			int EPBandSplit;
			DRCFloat EPPFFlatGain;
			DRCFloat EPPFOGainFactor;
			char * EPPFFlatType;
			int EPPFFGMultExponent;
			int EPPFFinalWindow;
			DRCFloat EPPFNormFactor;
			char * EPPFNormType;
			char * EPPFOutFile;
			char * EPPFOutFileType;

			/* Prefiltering completion stage */
			int PCOutWindow;
			DRCFloat PCNormFactor;
			char * PCNormType;
			char * PCOutFile;
			char * PCOutFileType;

			/* Inversion stage */
			char * ISType;
			char * ISPETType;
			char * ISPrefilterFctn;
			int ISPELowerWindow;
			int ISPEUpperWindow;
			int ISPEStartFreq;
			int ISPEEndFreq;
			int ISPEFilterLen;
			DRCFloat ISPEFSharpness;
			int ISPEBandSplit;
			DRCFloat ISPEWindowExponent;
			DRCFloat ISPEOGainFactor;
			int ISSMPMultExponent;
			int ISOutWindow;
			DRCFloat ISNormFactor;
			char * ISNormType;
			char * ISOutFile;
			char * ISOutFileType;

			/* Psychoacoustic target stage */
			char * PTType;
			int PTReferenceWindow;
			char * PTDLType;
			DRCFloat PTDLMinGain;
			DRCFloat PTDLStart;
			DRCFloat PTDLStartFreq;
			DRCFloat PTDLEndFreq;
			int PTDLMultExponent;
			DRCFloat PTBandWidth;
			DRCFloat PTPeakDetectionStrength;
			int PTMultExponent;
			int PTFilterLen;
			char * PTFilterFile;
			char * PTFilterFileType;
			DRCFloat PTNormFactor;
			char * PTNormType;
			char * PTOutFile;
			char * PTOutFileType;
			int PTOutWindow;

			/* Peak limiting stage */
			char * PLType;
			DRCFloat PLMaxGain;
			DRCFloat PLStart;
			DRCFloat PLStartFreq;
			DRCFloat PLEndFreq;
			int PLMultExponent;
			int PLOutWindow;
			DRCFloat PLNormFactor;
			char * PLNormType;
			char * PLOutFile;
			char * PLOutFileType;

			/* Ringing truncation stage */
			char * RTType;
			char * RTPrefilterFctn;
			int RTWindowGap;
			int RTLowerWindow;
			int RTUpperWindow;
			DRCFloat RTStartFreq;
			DRCFloat RTEndFreq;
			DRCFloat RTWindowExponent;
			int RTFilterLen;
			DRCFloat RTFSharpness;
			int RTBandSplit;
			int RTOutWindow;
			DRCFloat RTNormFactor;
			char * RTNormType;
			char * RTOutFile;
			char * RTOutFileType;

			/* Target response stage */
			char * PSFilterType;
			char * PSInterpolationType;
			int PSMultExponent;
			int PSFilterLen;
			int PSNumPoints;
			char * PSPointsFile;
			char * PSMagType;
			int PSOutWindow;
			DRCFloat PSNormFactor;
			char * PSNormType;
			char * PSOutFile;
			char * PSOutFileType;

			/* Minimum phase filter extraction stage */
			int MSMultExponent;
			int MSOutWindow;
			int MSFilterDelay;
			DRCFloat MSNormFactor;
			char * MSNormType;
			char * MSOutFile;
			char * MSOutFileType;

			/* Test convolution stage */
			DRCFloat TCNormFactor;
			char * TCNormType;
			char * TCOutFile;
			char * TCOutFileType;
			char * TCOWFile;
			char * TCOWFileType;
			DRCFloat TCOWNormFactor;
			char * TCOWNormType;
			int TCOWSkip;
			int TCOWPrewindow;
			int TCOWLength;
		}
	CfgParmsType;

	/* Opzioni di configurazione */
	extern CfgParmsType Cfg;

	/* Definizione struttura file di configurazione */
	extern CfgParameter CfgParmsDef[];

	/* Controllo validit parametri di configurazione */
	int CheckDRCCfg(const CfgParmsType * DRCCfg);

	/* Impostazione directory base di lavoro */
	int SetupDRCCfgBaseDir(CfgParmsType * DRCCfg, const CfgParameter * CfgParmsDef,
		const CmdLineType * OptData);
#endif