Atmel Software Framework

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

Macros

#define DSP16_INTERPOLATION_KERNEL_X_FCT(x_num, data)
 
#define DSP16_INTERPOLATION_NO_LOOP_KERNEL_X_FCT(x_num, data)
 
#define DSP16_INTREPOLATION_FILTER(x_num, data)   sum += ph[(x_num+data)] * pvect2[-(x_num+data)];
 
#define DSP16_INTREPOLATION_FILTER_FUNCTION_NAME(x_num, data)   TPASTE2(dsp16_filt_interpolation_kernel_x, x_num),
 
#define DSP16_INTREPOLATION_NO_LOOP_FILTER_FUNCTION_NAME(x_num, data)   TPASTE2(dsp16_filt_interpolation_no_loop_kernel_x, x_num),
 
#define LOOP_UNROLL   6
 
#define LOOP_UNROLL_PLUS_ONE   7
 

Functions

void dsp16_filt_interpolation (dsp16_t *vect1, dsp16_t *vect2, int vect2_size, dsp16_t *h, int h_size, int interpolation_ratio)
 This function interpolates a vector. More...
 
static void dsp16_filt_interpolation_no_loop_kernel_x0 (dsp16_t *vect1, dsp16_t *vect2, int vect2_size, dsp16_t *h, int h_size, int interpolation_ratio)
 

#define DSP16_INTERPOLATION_KERNEL_X_FCT (   x_num,
  data 
)
Value:
static void TPASTE2(dsp16_filt_interpolation_kernel_x, x_num)(dsp16_t *vect1, dsp16_t *vect2, int vect2_size, dsp16_t *h, int h_size, int interpolation_ratio) \
{ \
S32 sum = 0; \
int i, k, n; \
int n_tap; \
dsp16_t *ph; \
dsp16_t *pvect1; \
dsp16_t *pvect2; \
\
pvect1 = vect1; \
n_tap = h_size / interpolation_ratio; \
for(n=0; n<vect2_size; n++) \
{ \
for(k=0; k<interpolation_ratio; k++) \
{ \
sum = 0; \
ph = &h[k*n_tap]; \
pvect2 = &vect2[n + n_tap - 1]; \
for(i=0; i<n_tap - LOOP_UNROLL + 1; i += LOOP_UNROLL) \
{ \
ph += LOOP_UNROLL; \
pvect2 -= LOOP_UNROLL; \
} \
*pvect1++ = sum >> DSP16_QB; \
} \
} \
}
#define DSP16_INTREPOLATION_FILTER(x_num, data)
Definition: dsp16_filt_interpolation.c:64
int i
Definition: jcmarker.c:150
int n
Definition: jdmarker.c:303
int32_t S32
32-bit signed integer.
Definition: compiler.h:224
#define LOOP_UNROLL
Definition: dsp16_filt_interpolation.c:55
A_ALIGNED dsp16_complex_t vect1[SIZE]
The output buffer.
Definition: examples/dsp16_complex_fft/complex_fft_example.c:96
dsp16_t__ dsp16_t
16-bit signed fixed point type optimized for 32-bit or lower microcontrollers
Definition: dsp_types.h:199
#define DSP16_QB
number of fractional bits
Definition: dsp_types.h:144
A_ALIGNED dsp16_t vect2[SIZE]
The input signal resulting from a multiplication between a cosine and a sine.
Definition: examples/dsp16_complex_fft/complex_fft_example.c:99
#define TPASTE2(a, b)
Definition: tpaste.h:68
MREPEAT(AVR32_INTC_NUM_INT_GRPS, DECL_INT_LINE_HANDLER_TABLE,~)
for(i=0;i< DCTSIZE2;i++)
Definition: jcmarker.c:156
#define DSP16_INTERPOLATION_NO_LOOP_KERNEL_X_FCT (   x_num,
  data 
)
Value:
static void TPASTE2(dsp16_filt_interpolation_no_loop_kernel_x, x_num)(dsp16_t *vect1, dsp16_t *vect2, int vect2_size, dsp16_t *h, int h_size, int interpolation_ratio) \
{ \
S32 sum = 0; \
int k, n; \
int n_tap; \
dsp16_t *ph; \
dsp16_t *pvect1; \
dsp16_t *pvect2; \
\
pvect1 = vect1; \
n_tap = h_size / interpolation_ratio; \
for(n=0; n<vect2_size; n++) \
{ \
pvect2 = &vect2[n + n_tap - 1]; \
for(k=0; k<interpolation_ratio; k++) \
{ \
sum = 0; \
ph = &h[k*n_tap]; \
*pvect1++ = sum >> DSP16_QB; \
} \
} \
}
#define DSP16_INTREPOLATION_FILTER(x_num, data)
Definition: dsp16_filt_interpolation.c:64
int n
Definition: jdmarker.c:303
int32_t S32
32-bit signed integer.
Definition: compiler.h:224
A_ALIGNED dsp16_complex_t vect1[SIZE]
The output buffer.
Definition: examples/dsp16_complex_fft/complex_fft_example.c:96
dsp16_t__ dsp16_t
16-bit signed fixed point type optimized for 32-bit or lower microcontrollers
Definition: dsp_types.h:199
#define DSP16_QB
number of fractional bits
Definition: dsp_types.h:144
A_ALIGNED dsp16_t vect2[SIZE]
The input signal resulting from a multiplication between a cosine and a sine.
Definition: examples/dsp16_complex_fft/complex_fft_example.c:99
#define TPASTE2(a, b)
Definition: tpaste.h:68
MREPEAT(AVR32_INTC_NUM_INT_GRPS, DECL_INT_LINE_HANDLER_TABLE,~)
for(i=0;i< DCTSIZE2;i++)
Definition: jcmarker.c:156
#define DSP16_INTREPOLATION_FILTER (   x_num,
  data 
)    sum += ph[(x_num+data)] * pvect2[-(x_num+data)];
#define DSP16_INTREPOLATION_FILTER_FUNCTION_NAME (   x_num,
  data 
)    TPASTE2(dsp16_filt_interpolation_kernel_x, x_num),
#define DSP16_INTREPOLATION_NO_LOOP_FILTER_FUNCTION_NAME (   x_num,
  data 
)    TPASTE2(dsp16_filt_interpolation_no_loop_kernel_x, x_num),
#define LOOP_UNROLL   6
#define LOOP_UNROLL_PLUS_ONE   7

static void dsp16_filt_interpolation_no_loop_kernel_x0 ( dsp16_t vect1,
dsp16_t vect2,
int  vect2_size,
dsp16_t h,
int  h_size,
int  interpolation_ratio 
)
static

References n, and vect1.