-
Notifications
You must be signed in to change notification settings - Fork 0
/
fft1def.h
364 lines (328 loc) · 10.2 KB
/
fft1def.h
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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
#define FFT1_CURMODE fft1_version[fft1mode][genparm[FIRST_FFT_VERNR]]
#define FFT1_BCKCURMODE fft1_back_version[ui.rx_rf_channels-1][genparm[FIRST_BCKFFT_VERNR]]
#define TXTEST_PEAK_REDRAW_COUNT 10
#define FFT1_NETSEND_MAXBUF 32
// Length of buffer indicators shown when "T" is pressed.
#define INDICATOR_SIZE 128
// Buffer pointers for the fft1 buffer.
// They all point to the same memory location but we change
// the data format during processing so it is convenient to have
// different pointers defined, one for each type.
#include <sys/time.h>
extern int fft1_liminfo_cnt;
extern int fft2_liminfo_cnt;
extern double diskread_block_counter;
extern double file_start_block;
extern double file_stop_block;
extern double fft1_show_time;
extern int change_fft1_flag;
extern int fft1_correlation_flag;
extern int yieldflag_timf2_fft1;
extern int yieldflag_wdsp_fft1;
extern int timf1_indicator_block;
extern int fft1_indicator_block;
extern int timf2_indicator_block;
extern int fft2n_indicator_block;
extern int timf3_indicator_block;
extern int indicator_first_pixel;
extern int fft3_indicator_block;
extern int baseb_indicator_block;
extern int daout_indicator_block;
extern int dabuf_indicator_block;
extern int indicator_ypix;
extern size_t *fft1_handle;
extern COSIN_TABLE *fft1tab;
extern COSIN_TABLE *fft1_backtab;
extern unsigned short int *fft1_permute;
extern float *fft1_window;
extern float *fft1_sumsq;
extern float *fft1_slowsum;
extern float *fft1_power;
extern float *fft1_powersum;
extern float *fft1_corrsum;
extern float *fft1_slowcorr;
extern TWOCHAN_POWER *fft1_xypower;
extern TWOCHAN_POWER *fft1_xysum;
extern float *fftw_tmp;
extern float *timf2_tmp;
extern float *fftf_tmp;
extern float *fftt_tmp;
extern char *rawsave_tmp;
extern char *rawsave_tmp_net;
extern char *rawsave_tmp_disk;
extern char *fft1_char;
extern short int *fft1_short_int;
extern int *fft1_int;
extern float *fft1_float;
extern float *fft1_foldcorr;
extern short int *fft1_spectrum;
extern short int *fft1_corr_spectrum;
extern float *fft1_filtercorr;
extern float *fft1_desired;
extern float *liminfo;
extern unsigned char *liminfo_wait;
extern float *liminfo_group_min;
extern short int *fft1_split_shi;
extern float *fft1_split_float;
extern MMX_COSIN_TABLE *fft1_mmxcosin;
extern float *fft1_inverted_window;
extern short int *fft1_inverted_mmxwin;
extern unsigned short int *fft1_back_scramble;
extern short int *fft1_backbuffer;
extern char *fft1_netsend_buffer;
extern short int *wg_waterf;
extern int wg_waterf_size;
extern int wg_waterf_ptr;
extern int local_wg_waterf_ptr;
extern WATERF_TIMES *wg_waterf_times;
extern int wg_waterf_ptr2;
extern int local_wg_yborder;
extern int fft1_waterfall_flag;
extern int ui_converter_direction;
extern double converter_offset_mhz;
extern int fft1_costab_size,fft1_permute_size,fft1_window_size;
extern int fft1_tmp_bytes;
extern int timf2pow_size;
extern int timf2pow_mask;
extern int fftn_tmp_bytes;
extern int timf3_totsiz;
extern float fft2_interleave_ratio, fftx_blocktime;
extern int max_wg_waterf_times;
extern float *wg_waterf_yfac;
extern float txtest_decayfac2;
extern float txtest_decayfac1;
extern int txtest_last_xpix;
extern int txtest_peak_redraw;
extern float txtest_saturated;
extern short int *txtest_ypeak;
extern short int *txtest_ypeak_decay;
extern short int *txtest_yavg;
extern float *txtest_power;
extern float *txtest_powersum;
extern short int *txtest_old_yavg;
extern short int *txtest_old_ypeak;
extern short int *txtest_old_ypeak_decay;
extern short int *fft1_old_spectrum;
extern float *txtest_peak_power;
extern float *txtest_peak_power_decay;
extern short int *rxin_isho;
extern int *rxin_int;
extern char *rxin_char;
extern float fft1_bandwidth;
extern float fft1_hz_per_point;
extern float fft1_filtercorr_start;
void fft1_buffer_pointers(void);
void init_foldcorr(void);
void set_fft1_endpoints(void);
void normalise_fft1_filtercorr(float *xyzq);
void finish_rx_read(void);
extern int fft1_n;
extern int fft1_size;
extern int fft1_block;
extern int fft1_mulblock;
extern int fft1_muln;
extern int fft1_blockbytes;
extern int fft1_mask;
extern int fft1_bytes;
extern int fft1_bufmask;
extern int fft1net_pa;
extern int fft1net_px;
extern int fft1net_size;
extern int fft1net_mask;
extern int fft1_pa;
extern int fft1_pb;
extern int fft1_px;
extern int fft1_na;
extern int fft1_nb;
extern int fft1_nc;
extern int fft1_nm;
extern int fft1_nx;
extern int fft1afc_flag;
extern int fft1_first_point;
extern int fft1_first_sym_point;
extern int fft1_first_sumsq_point;
extern int fft1_last_point;
extern int fft1_last_inband;
extern int fft1_first_inband;
extern int fft1_last_sym_point;
extern int fft1_last_sumsq_point;
extern int fft1back_lowgain_n;
extern int fft1_filtercorr_flag;
extern int fft1_calibrate_flag;
extern int fft1_lowlevel_points;
extern float fft1_lowlevel_fraction;
extern int ad_wts;
extern int max_fft1n;
extern int fft1n_mask;
extern float fft1_wtb;
extern float ad_wttim;
extern float fft1_wttim;
extern float timf2_wtb;
extern float timf2_wttim;
extern int ad_maxamp[];
extern int timf2_maxamp[];
extern int fft1_maxamp[];
extern float liminfo_amplitude_factor;
extern float fft1_desired_totsum;
extern int fft1_sumsq_tot;
extern int fft1_direction;
extern int fft1_filtercorr_direction;
extern int wg_xpix1;
extern int wg_waterfall_blank_points;
extern int no_of_fft1b;
extern int fft1_sumsq_mask;
extern int fft1_sumsq_bufsize;
extern int fft1_interleave_points;
extern float fft1_interleave_ratio;
extern int fft1_new_points;
extern float fft1_blocktime;
extern float fft1_noise_floor;
extern int fft1_sumsq_counter;
extern int liminfo_groups;
extern int liminfo_group_points;
extern int ad_bufmargin;
extern int max_fft1_sumsq;
extern int fft1_sumsq_pa;
extern int radar_fft1_sumsq_pa;
extern int fft1_sumsq_pwg;
extern int fft1_sumsq_recalc;
extern int fft1mode;
extern FILE *save_wr_file;
extern FILE *save_rd_file;
extern int save_init_flag;
extern int save_rw_bytes;
extern int diskwrite_flag;
extern int diskread_flag;
extern int fft1_version[4][MAX_FFT1_VERNR];
extern int fft1_back_version[2][MAX_FFT1_BCKVERNR];
extern FFT_SETUP_INFO fft_cntrl[MAX_FFT_VERSIONS];
extern int timf1_bytes;
extern int timf1_bytemask;
extern int timf1_neg;
extern int timf1_blockbytes;
extern int timf1_usebytes;
extern char *timf1_char;
extern int *timf1_int;
extern short int *timf1_short_int;
extern float *timf1_float;
extern int timf1p_pa;
extern int timf1p_px;
extern int timf1p_pb;
extern int timf1p_pc_net;
extern int timf1p_pc_disk;
extern int timf1p_sdr;
extern float timf1_sampling_speed;
extern short int *timf2_shi;
extern float *timf2_float;
extern float *timf2_blockpower;
extern int timf2_blockpower_block;
extern int timf2_blockpower_pa;
extern int timf2_blockpower_px;
extern int timf2_blockpower_size;
extern int timf2_blockpower_mask;
extern int timf2_pa;
extern int timf2_pb;
extern int timf2_pc;
extern int timf2_pn1;
extern int timf2_pn2;
extern int timf2_pt;
extern int timf2p_fit;
extern int timf2_px;
extern int timf2_mask;
extern int timf2_neg;
extern int timf2_size;
extern int timf2_input_block;
extern int timf2_output_block;
extern int timf2_display_counter;
extern int timf2_display_interval;
extern int timf2_display_maxpoint;
extern int timf2_ovfl;
extern int timf2_fitted_pulses;
extern int timf2_cleared_points;
extern int timf2_blanker_points;
extern int timf2_ymin[16];
extern int timf2_ymax[16];
extern int timf2_y0[16];
extern unsigned int *timf2_pwr_int;
extern float *timf2_pwr_float;
extern int timf2_hg_xmin;
extern int timf2_hg_xmax;
extern int timf2_hg_y[2];
extern int timf2_hg_yh;
extern int timf2_hg_x[2];
extern int timf2_hg_stux;
extern int timf2_hg_clex;
extern int timf2_hg_qex;
extern float timf2_hg_xfac;
extern float timf2_hg_xlog;
extern int overrun_limit;
extern int wg_last_point;
extern int wg_first_point;
extern short int *timf2pix;
extern float timf2_display_maxval_float;
extern float timf2_display_powermax_float;
extern unsigned int timf2_display_maxval_uint;
extern unsigned int timf2_display_powermax_uint;
extern double wg_waterf_zero_time;
extern int txtest_no_of_segs;
extern float txtest_pixinc;
extern int txtest_pntinc;
extern int txtest_first_xpix;
extern int txtest_spek_no;
extern int txtest_spek_p0;
extern int txtest_first_point;
extern int txtest_show_p0;
extern float txtest_yfac;
void simd1_16_win(int timf1p_ref, float *out);
void simd1_16_nowin(int timf1p_ref, float *out);
void simd1_32_win(int timf1p_ref, float *out);
void simd1_32_nowin(int timf1p_ref, float *out);
void simd1_16_win_real(int timf1p_ref, float *out);
void simd1_16_nowin_real(int timf1p_ref, float *out);
void simd1_32_win_real(int timf1p_ref, float *out);
void simd1_32_nowin_real(int timf1p_ref, float *out);
void fft1_update_liminfo(void);
void compress_rawdat_disk(void);
void compress_rawdat_net(void);
void expand_rawdat(void);
void fft1_approx_dif_two(void);
void fft1_approx_dif_one(void);
void fft1_approx_dit_one(void);
void fft1_approx_dit_two(void);
void fft1_reherm_dit_one(int timf1p_ref, float *out, float *tmp);
void fft1_reherm_dit_two(int timf1p_ref, float *out, float *tmp);
void fft1_complex_two(void);
void make_timf2(void);
void show_timf2(void);
void split_one(void);
void split_two(void);
void mmx_fft1back_two(void);
void mmx_fft1back_one(void);
void fft1back_one(void);
void fft1back_two(void);
void fft1back_fp_finish(void);
void fft1back_mmx_finish(void);
void fft1_mix1_fixed(void);
void fft1_mix1_afc(void);
void fft1_waterfall(void);
void read_rawdat(int debughelp);
void fft1_b(int timf1p_ref, float *out, float *tmp);
void fft1_c(void);
void make_filfunc_filename(char *s);
void make_iqcorr_filename(char *s);
void check_fft1_timing(void);
void make_wg_waterf_cfac(void);
void show_wg_buttons(int all);
void clear_around_wgbutt(int n);
void change_fft1avgnum(void);
void change_waterfall_avgnum(void);
void change_wg_waterfall_zero(void);
void change_wg_waterfall_gain(void);
void fft1_block_timing(void);
void update_fft1_slowsum(void);
void show_txtest_spectrum(void);
void resize_filtercorr_td_to_fd(int to_fd, int size_in, float *buf_in,
int n_out, int size_out, float *buf_out);
void convert_filtercorr_fd_to_td(int n, int siz, float *buf);
void resize_fft1_desired(int siz_in, float *buf_in,
int siz_out, float *buf_out);