/*
* Fir Filter Implemented by David Hladky
* 20.2.2016
*
*/
#include <stdint.h>
#define NUM_OF_TAPS 195

typedef struct
{
    float xn[NUM_OF_TAPS];
    uint16_t offset;
    uint16_t offset_read_delay;
    float *fir_buffer_address;
}FIR_XN_BUFFER;

typedef struct
{
    float new_y;
    float old_y;
}LINE_APPROX;

typedef struct
{
	float new_y;
	float old_y;
	float new_hilb;
	float old_hilb;
}LINE_HILB_APPROX;

// Definition of functions
void init_fir_buffer(FIR_XN_BUFFER *input_buffer, float *coefficents_buffer);
float fir_filter_float(FIR_XN_BUFFER *xn_buffer, float *xn_new);
void fir_Hilbert_filter_float(FIR_XN_BUFFER *xn_buffer, float *xn_new, float *y_hilb_output, float *y_delay_out);
void line_Hilbert_interpolation(LINE_HILB_APPROX *line, float *yn_new, float *y_hilb_new, float* output_buffer_y, float* output_buffer_hilb , uint16_t length);
void line_interpolation(LINE_APPROX *line, float *yn_new, float* output_buffer, uint16_t length);



