Atmel Software Framework

dsp16_resampling.c File Reference
#include "dsp.h"

Macros

#define DEFAULT_FILTER_FUNCTION   dsp16_filt_lpfirdesign_windowed_sinc
 
#define DEFAULT_WINDOW_FUNCTION   dsp16_win_hann
 
#define DSP16_RESAMPLING_FILTER(x_num, data)   sum += ph[(x_num+data)] * pvect2[-(x_num+data)];
 
#define DSP16_RESAMPLING_FUNCTION_NAME(x_num, data)   TPASTE2(dsp16_resampling_kernel_x, x_num),
 
#define DSP16_RESAMPLING_KERNEL_X_FCT(x_num, data)
 
#define DSP16_RESAMPLING_NO_LOOP_FUNCTION_NAME(x_num, data)   TPASTE2(dsp16_resampling_no_loop_kernel_x, x_num),
 
#define DSP16_RESAMPLING_NO_LOOP_KERNEL_X_FCT(x_num, data)
 
#define LOOP_UNROLL   6
 
#define LOOP_UNROLL_PLUS_ONE   7
 
#define NB_PTS_TO_INTERPOLATE   3
 

Functions

void dsp16_resampling_compute (dsp_resampling_t *dsp_resampling, dsp16_t *output, dsp16_t *input, int channel)
 The re-sampling computation function. More...
 
void dsp16_resampling_free (dsp_resampling_t *dsp_resampling, free_fct_t free_fct)
 Function used to free the previously allocated structure issued by the dsp16_resampling_setup function. More...
 
int dsp16_resampling_get_output_current_buffer_size (dsp_resampling_t *dsp_resampling)
 Returns the current length in sample of the output signal. More...
 
int dsp16_resampling_get_output_max_buffer_size (dsp_resampling_t *dsp_resampling)
 Returns the maximal length in sample of the output signal. More...
 
bool dsp16_resampling_link (dsp_resampling_t *dsp_resampling_output, dsp_resampling_t *dsp_resampling_input)
 Link a stream previously re-sampled using the dsp_resampling_input resampling structure with the new re-sampling structure dsp_resampling_output. This is used to keep the continuity with two pieces of a stream re-sampled using two different re-sampling parameters. More...
 
static int dsp16_resampling_no_loop_kernel_x0 (dsp16_t *vect1, dsp16_t *vect2, int vect2_size, dsp16_t *h, int n_tap, int interpolation_ratio, int decimation_ratio, int *pcounter, int *pn)
 
static void dsp16_resampling_polynomial_interpolation (dsp16_t y[4], dsp16_t output_y[NB_PTS_TO_INTERPOLATE])
 
dsp_resampling_tdsp16_resampling_setup (int input_sample_rate, int output_sample_rate, int buffer_size, int filter_order, int nb_channels, malloc_fct_t malloc_fct, dsp16_resampling_options_t *options)
 This function is the 16-bit signal resampling setup function. It has to be called only once at the initialization of the resampling process. More...
 
static int dsp_op_gcd (int m, int n)
 

#define DEFAULT_FILTER_FUNCTION   dsp16_filt_lpfirdesign_windowed_sinc

Referenced by dsp16_resampling_setup().

#define DEFAULT_WINDOW_FUNCTION   dsp16_win_hann

Referenced by dsp16_resampling_setup().

#define DSP16_RESAMPLING_FILTER (   x_num,
  data 
)    sum += ph[(x_num+data)] * pvect2[-(x_num+data)];
#define DSP16_RESAMPLING_FUNCTION_NAME (   x_num,
  data 
)    TPASTE2(dsp16_resampling_kernel_x, x_num),
#define DSP16_RESAMPLING_KERNEL_X_FCT (   x_num,
  data 
)
#define DSP16_RESAMPLING_NO_LOOP_FUNCTION_NAME (   x_num,
  data 
)    TPASTE2(dsp16_resampling_no_loop_kernel_x, x_num),
#define DSP16_RESAMPLING_NO_LOOP_KERNEL_X_FCT (   x_num,
  data 
)
#define LOOP_UNROLL   6
#define LOOP_UNROLL_PLUS_ONE   7
#define NB_PTS_TO_INTERPOLATE   3

static int dsp16_resampling_no_loop_kernel_x0 ( dsp16_t vect1,
dsp16_t vect2,
int  vect2_size,
dsp16_t h,
int  n_tap,
int  interpolation_ratio,
int  decimation_ratio,
int *  pcounter,
int *  pn 
)
static

References n, and vect1.

static void dsp16_resampling_polynomial_interpolation ( dsp16_t  y[4],
dsp16_t  output_y[NB_PTS_TO_INTERPOLATE] 
)
static

References i, NB_PTS_TO_INTERPOLATE, and x.

Referenced by dsp16_resampling_compute().

static int dsp_op_gcd ( int  m,
int  n 
)
static

References n, and temp.

Referenced by dsp16_resampling_setup().