2015-11-08 02:21:08 +08:00
|
|
|
#include <math.h>
|
|
|
|
#include "libcsdr.h"
|
|
|
|
#include "libcsdr_gpl.h"
|
|
|
|
|
|
|
|
typedef struct fastddc_s
|
|
|
|
{
|
|
|
|
int pre_decimation;
|
|
|
|
int post_decimation;
|
|
|
|
int taps_length;
|
2015-11-22 21:34:24 +08:00
|
|
|
int taps_min_length;
|
2015-11-08 02:21:08 +08:00
|
|
|
int overlap_length; //it is taps_length - 1
|
|
|
|
int fft_size;
|
|
|
|
int fft_inv_size;
|
|
|
|
int input_size;
|
2015-11-19 00:47:18 +08:00
|
|
|
int post_input_size;
|
2015-11-08 02:21:08 +08:00
|
|
|
float pre_shift;
|
|
|
|
int startbin; //for pre_shift
|
|
|
|
int v; //step for pre_shift
|
|
|
|
int offsetbin;
|
|
|
|
float post_shift;
|
|
|
|
int output_scrape;
|
2015-11-22 02:52:35 +08:00
|
|
|
int scrap;
|
|
|
|
shift_addition_data_t dsadata;
|
2015-11-08 02:21:08 +08:00
|
|
|
} fastddc_t;
|
|
|
|
|
|
|
|
int fastddc_init(fastddc_t* ddc, float transition_bw, int decimation, float shift_rate);
|
2015-11-18 04:54:06 +08:00
|
|
|
decimating_shift_addition_status_t fastddc_inv_cc(complexf* input, complexf* output, fastddc_t* ddc, FFT_PLAN_T* plan_inverse, complexf* taps_fft, decimating_shift_addition_status_t shift_stat);
|
2015-11-22 02:52:35 +08:00
|
|
|
void fastddc_print(fastddc_t* ddc, char* source);
|
2015-11-22 22:43:52 +08:00
|
|
|
void fft_swap_sides(complexf* io, int fft_size);
|