Relative functions:
Relative functions:
Relative functions:
Relative functions:
Relative functions:
Relative functions:
Relative functions:
Relative functions:
Relative functions:
Relative functions:
Relative functions:
Relative functions:
Relative functions:
Relative functions:
Relative functions:
Relative functions:
Relative functions:
Relative functions:
Relative functions:
Relative functions:
Functions | |
void | dsp16_vect_add (dsp16_t *vect1, dsp16_t *vect2, dsp16_t *vect3, int size) |
16-bit fixed point version of the vector additon function. | |
void | dsp16_vect_add_and_sat (dsp16_t *vect1, dsp16_t *vect2, dsp16_t *vect3, int size) |
16-bit fixed point version of the vector additon function. | |
void | dsp16_vect_complex_abs (dsp16_t *vect1, dsp16_complex_t *vect2, int size) |
16-bit fixed point version of the complex vector absolute function. | |
void | dsp16_vect_complex_add (dsp16_complex_t *vect1, dsp16_complex_t *vect2, dsp16_complex_t *vect3, int size) |
16-bit fixed point version of the complex vector additon function. | |
void | dsp16_vect_complex_conj (dsp16_complex_t *vect1, dsp16_complex_t *vect2, int size) |
16-bit fixed point version of the complex vector conjugate function. | |
void | dsp16_vect_complex_sub (dsp16_complex_t *vect1, dsp16_complex_t *vect2, dsp16_complex_t *vect3, int size) |
16-bit fixed point version of the complex vector subtraction function. | |
void | dsp16_vect_conv (dsp16_t *vect1, dsp16_t *vect2, int vect2_size, dsp16_t *vect3, int vect3_size) |
16-bit fixed point version of the Convolution. | |
void | dsp16_vect_convpart (dsp16_t *vect1, dsp16_t *vect2, int vect2_size, dsp16_t *vect3, int vect3_size) |
16-bit fixed point version of the Partial Convolution. | |
static void | dsp16_vect_copy (dsp16_t *vect1, dsp16_t *vect2, int size) |
16-bit fixed point version of the copy function. | |
void | dsp16_vect_dotdiv (dsp16_t *vect1, dsp16_t *vect2, dsp16_t *vect3, int size) |
16-bit fixed point version of the vector dot division function. | |
void | dsp16_vect_dotmul (dsp16_t *vect1, dsp16_t *vect2, dsp16_t *vect3, int size) |
16-bit fixed point version of the vector dot multiplication function. | |
void | dsp16_vect_intdiv (dsp16_t *vect1, dsp16_t *vect2, int size, int integer) |
16-bit fixed point version of the vector division with an integer. | |
void | dsp16_vect_intmul (dsp16_t *vect1, dsp16_t *vect2, int size, int integer) |
16-bit fixed point version of the vector multiplication with an integer. | |
dsp16_t | dsp16_vect_max (dsp16_t *vect1, int size) |
16-bit fixed point version of the vector maximum function. | |
dsp16_t | dsp16_vect_min (dsp16_t *vect1, int size) |
16-bit fixed point version of the vector minimum function. | |
void | dsp16_vect_neg (dsp16_t *vect1, dsp16_t *vect2, int size) |
16-bit fixed point version of the vector negate function. | |
void | dsp16_vect_pow (dsp16_t *vect1, dsp16_t *vect2, int size, dsp16_t real) |
16-bit fixed point version of the power function. | |
void | dsp16_vect_realadd (dsp16_t *vect1, dsp16_t *vect2, int size, dsp16_t real) |
16-bit fixed point version of the vector addition with a real number. | |
void | dsp16_vect_realdiv (dsp16_t *vect1, dsp16_t *vect2, int size, dsp16_t real) |
16-bit fixed point version of the vector division with a real number. | |
void | dsp16_vect_realmul (dsp16_t *vect1, dsp16_t *vect2, int size, dsp16_t real) |
16-bit fixed point version of the vector multiplication with a real number. | |
void | dsp16_vect_realsub (dsp16_t *vect1, dsp16_t *vect2, int size, dsp16_t real) |
16-bit fixed point version of the vector subtraction with a real number. | |
void | dsp16_vect_sub (dsp16_t *vect1, dsp16_t *vect2, dsp16_t *vect3, int size) |
16-bit fixed point version of the vector subtraction function. | |
static void | dsp16_vect_zeropad (dsp16_t *vect1, int size, int num_zero) |
16-bit fixed point version of the zero padding function. | |
void | dsp32_vect_add (dsp32_t *vect1, dsp32_t *vect2, dsp32_t *vect3, int size) |
32-bit fixed point version of the vector additon function. | |
void | dsp32_vect_add_and_sat (dsp32_t *vect1, dsp32_t *vect2, dsp32_t *vect3, int size) |
32-bit fixed point version of the vector additon function. | |
void | dsp32_vect_complex_abs (dsp32_t *vect1, dsp32_complex_t *vect2, int size) |
32-bit fixed point version of the complex vector absolute function. | |
void | dsp32_vect_complex_add (dsp32_complex_t *vect1, dsp32_complex_t *vect2, dsp32_complex_t *vect3, int size) |
32-bit fixed point version of the complex vector additon function. | |
void | dsp32_vect_complex_sub (dsp32_complex_t *vect1, dsp32_complex_t *vect2, dsp32_complex_t *vect3, int size) |
32-bit fixed point version of the complex vector subtraction function. | |
void | dsp32_vect_conv (dsp32_t *vect1, dsp32_t *vect2, int vect2_size, dsp32_t *vect3, int vect3_size) |
32-bit fixed point version of the Convolution. | |
void | dsp32_vect_convpart (dsp32_t *vect1, dsp32_t *vect2, int vect2_size, dsp32_t *vect3, int vect3_size) |
32-bit fixed point version of the Partial Convolution. | |
static void | dsp32_vect_copy (dsp32_t *vect1, dsp32_t *vect2, int size) |
32-bit fixed point version of the copy function. | |
void | dsp32_vect_dotdiv (dsp32_t *vect1, dsp32_t *vect2, dsp32_t *vect3, int size) |
32-bit fixed point version of the vector dot division function. | |
void | dsp32_vect_dotmul (dsp32_t *vect1, dsp32_t *vect2, dsp32_t *vect3, int size) |
32-bit fixed point version of the vector dot multiplication function. | |
void | dsp32_vect_intdiv (dsp32_t *vect1, dsp32_t *vect2, int size, int integer) |
32-bit fixed point version of the vector division with an integer. | |
void | dsp32_vect_intmul (dsp32_t *vect1, dsp32_t *vect2, int size, int integer) |
32-bit fixed point version of the vector multiplication with an integer. | |
dsp32_t | dsp32_vect_max (dsp32_t *vect1, int size) |
32-bit fixed point version of the vector maximum function. | |
dsp32_t | dsp32_vect_min (dsp32_t *vect1, int size) |
32-bit fixed point version of the vector minimum function. | |
void | dsp32_vect_neg (dsp32_t *vect1, dsp32_t *vect2, int size) |
32-bit fixed point version of the vector negate function. | |
void | dsp32_vect_pow (dsp32_t *vect1, dsp32_t *vect2, int size, dsp32_t real) |
32-bit fixed point version of the power function. | |
void | dsp32_vect_realadd (dsp32_t *vect1, dsp32_t *vect2, int size, dsp32_t real) |
32-bit fixed point version of the vector addition with a real number. | |
void | dsp32_vect_realdiv (dsp32_t *vect1, dsp32_t *vect2, int size, dsp32_t real) |
32-bit fixed point version of the vector division with a real number. | |
void | dsp32_vect_realmul (dsp32_t *vect1, dsp32_t *vect2, int size, dsp32_t real) |
32-bit fixed point version of the vector multiplication with a real number. | |
void | dsp32_vect_realsub (dsp32_t *vect1, dsp32_t *vect2, int size, dsp32_t real) |
32-bit fixed point version of the vector subtraction with a real number. | |
void | dsp32_vect_sub (dsp32_t *vect1, dsp32_t *vect2, dsp32_t *vect3, int size) |
32-bit fixed point version of the vector subtraction function. | |
static void | dsp32_vect_zeropad (dsp32_t *vect1, int size, int num_zero) |
32-bit fixed point version of the zero padding function. |
16-bit fixed point version of the vector additon function.
vect1 | A pointer on the 16-bit real vector that will recieved the result of the addition. | |
vect2 | A pointer on the 16-bit real vector that will be added with the other input vector (vect3). | |
vect3 | A pointer on the 16-bit real vector that will be added with the other input vector (vect2). | |
size | The size of the input buffers. |
Definition at line 71 of file vect_dsp16_add.c.
00072 { 00073 typedef void (*add_kernel_opti_t)(dsp16_t *, dsp16_t *, dsp16_t *); 00074 static const add_kernel_opti_t add_end_kernel_opti[4] = { 00075 dsp16_vect_add_kernel_x0, 00076 dsp16_vect_add_kernel_x1, 00077 dsp16_vect_add_kernel_x2, 00078 dsp16_vect_add_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 vect1[n] = vect2[n] + vect3[n]; 00085 vect1[n+1] = vect2[n+1] + vect3[n+1]; 00086 vect1[n+2] = vect2[n+2] + vect3[n+2]; 00087 vect1[n+3] = vect2[n+3] + vect3[n+3]; 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 add_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], &vect3[n]); 00092 }
16-bit fixed point version of the vector additon function.
vect1 | A pointer on the 16-bit real vector that will recieved the result of the addition. | |
vect2 | A pointer on the 16-bit real vector that will be added with the other input vector (vect3). | |
vect3 | A pointer on the 16-bit real vector that will be added with the other input vector (vect2). | |
size | The size of the input buffers. |
Definition at line 78 of file vect_dsp16_add_and_saturate.c.
References DSP16_ADDITION.
Referenced by dac_reload_callback().
00079 { 00080 typedef void (*add_kernel_opti_t)(dsp16_t *, dsp16_t *, dsp16_t *); 00081 static const add_kernel_opti_t add_end_kernel_opti[4] = { 00082 dsp16_vect_add_kernel_x0, 00083 dsp16_vect_add_kernel_x1, 00084 dsp16_vect_add_kernel_x2, 00085 dsp16_vect_add_kernel_x3 00086 }; 00087 int n; 00088 00089 for(n=0; n<size-3; n+=4) 00090 { 00091 DSP16_ADDITION(n, ""); 00092 DSP16_ADDITION(n+1, ""); 00093 DSP16_ADDITION(n+2, ""); 00094 DSP16_ADDITION(n+3, ""); 00095 } 00096 00097 // Jump on different functions depending on the length of the vectors to compute 00098 add_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], &vect3[n]); 00099 }
void dsp16_vect_complex_abs | ( | dsp16_t * | vect1, | |
dsp16_complex_t * | vect2, | |||
int | size | |||
) |
16-bit fixed point version of the complex vector absolute function.
vect1 | A pointer on the 16-bit real vector that will recieve the result. | |
vect2 | A pointer on the 16-bit complex vector that will be computed. | |
size | The size of the input buffer. |
Definition at line 79 of file vect_dsp16_complex_abs.c.
References DSP16_COMPLEX_ABS, and dsp16_vect_complex_abs_kernel_x0().
Referenced by dsp_calculate_fft().
00080 { 00081 typedef void (*complex_abs_kernel_opti_t)(dsp16_t *, dsp16_complex_t *); 00082 static const complex_abs_kernel_opti_t complex_abs_end_kernel_opti[4] = { 00083 dsp16_vect_complex_abs_kernel_x0, 00084 dsp16_vect_complex_abs_kernel_x1, 00085 dsp16_vect_complex_abs_kernel_x2, 00086 dsp16_vect_complex_abs_kernel_x3 00087 }; 00088 int n; 00089 S32 temp1, temp2; 00090 00091 for(n=0; n<size-3; n+=4) 00092 { 00093 DSP16_COMPLEX_ABS(n, ""); 00094 DSP16_COMPLEX_ABS(n+1, ""); 00095 DSP16_COMPLEX_ABS(n+2, ""); 00096 DSP16_COMPLEX_ABS(n+3, ""); 00097 } 00098 00099 // Jump on different functions depending on the length of the vectors to compute 00100 complex_abs_end_kernel_opti[size&0x3](&vect1[n], &vect2[n]); 00101 }
void dsp16_vect_complex_add | ( | dsp16_complex_t * | vect1, | |
dsp16_complex_t * | vect2, | |||
dsp16_complex_t * | vect3, | |||
int | size | |||
) |
16-bit fixed point version of the complex vector additon function.
vect1 | A pointer on the 16-bit complex vector that will recieved the result of the addition. | |
vect2 | A pointer on the 16-bit complex vector that will be added with the other input vector (vect3). | |
vect3 | A pointer on the 16-bit complex vector that will be added with the other input vector (vect2). | |
size | The size of the input buffers. |
Definition at line 72 of file vect_dsp16_complex_add.c.
References DSP16_COMPLEXADDITION.
00073 { 00074 typedef void (*complexadd_kernel_opti_t)(dsp16_complex_t *, dsp16_complex_t *, dsp16_complex_t *); 00075 static const complexadd_kernel_opti_t complexadd_end_kernel_opti[4] = { 00076 dsp16_vect_complexadd_kernel_x0, 00077 dsp16_vect_complexadd_kernel_x1, 00078 dsp16_vect_complexadd_kernel_x2, 00079 dsp16_vect_complexadd_kernel_x3 00080 }; 00081 int n; 00082 00083 for(n=0; n<size-3; n+=4) 00084 { 00085 DSP16_COMPLEXADDITION(n, ""); 00086 DSP16_COMPLEXADDITION(n+1, ""); 00087 DSP16_COMPLEXADDITION(n+2, ""); 00088 DSP16_COMPLEXADDITION(n+3, ""); 00089 } 00090 00091 // Jump on different functions depending on the length of the vectors to compute 00092 complexadd_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], &vect3[n]); 00093 }
void dsp16_vect_complex_conj | ( | dsp16_complex_t * | vect1, | |
dsp16_complex_t * | vect2, | |||
int | size | |||
) |
16-bit fixed point version of the complex vector conjugate function.
vect1 | A pointer on the 16-bit complex vector that will recieve the result. | |
vect2 | A pointer on the 16-bit complex vector that will be computed. | |
size | The size of the input buffer. |
Definition at line 77 of file vect_dsp16_complex_conj.c.
References DSP16_COMPLEXCONJUGATE, and dsp16_vect_complexconj_kernel_x0().
Referenced by dsp16_trans_complexifft().
00078 { 00079 typedef void (*complexconj_kernel_opti_t)(dsp16_complex_t *, dsp16_complex_t *); 00080 static const complexconj_kernel_opti_t complexconj_end_kernel_opti[4] = { 00081 dsp16_vect_complexconj_kernel_x0, 00082 dsp16_vect_complexconj_kernel_x1, 00083 dsp16_vect_complexconj_kernel_x2, 00084 dsp16_vect_complexconj_kernel_x3 00085 }; 00086 int n; 00087 00088 for(n=0; n<size-3; n+=4) 00089 { 00090 dsp16_t temp; 00091 00092 DSP16_COMPLEXCONJUGATE(n, ""); 00093 DSP16_COMPLEXCONJUGATE(n+1, ""); 00094 DSP16_COMPLEXCONJUGATE(n+2, ""); 00095 DSP16_COMPLEXCONJUGATE(n+3, ""); 00096 } 00097 00098 // Jump on different functions depending on the length of the vectors to compute 00099 complexconj_end_kernel_opti[size&0x3](&vect1[n], &vect2[n]); 00100 }
void dsp16_vect_complex_sub | ( | dsp16_complex_t * | vect1, | |
dsp16_complex_t * | vect2, | |||
dsp16_complex_t * | vect3, | |||
int | size | |||
) |
16-bit fixed point version of the complex vector subtraction function.
vect1 | A pointer on the 16-bit complex vector that will recieved the result of the subtraction. | |
vect2 | A pointer on the 16-bit complex vector that will be subtracted with the other input vector (vect3). | |
vect3 | A pointer on the 16-bit complex vector that will be subtracted with the other input vector (vect2). | |
size | The size of the input buffers. |
Definition at line 72 of file vect_dsp16_complex_sub.c.
References DSP16_COMPLEXSUBITION.
00073 { 00074 typedef void (*complexsub_kernel_opti_t)(dsp16_complex_t *, dsp16_complex_t *, dsp16_complex_t *); 00075 static const complexsub_kernel_opti_t complexsub_end_kernel_opti[4] = { 00076 dsp16_vect_complexsub_kernel_x0, 00077 dsp16_vect_complexsub_kernel_x1, 00078 dsp16_vect_complexsub_kernel_x2, 00079 dsp16_vect_complexsub_kernel_x3 00080 }; 00081 int n; 00082 00083 for(n=0; n<size-3; n+=4) 00084 { 00085 DSP16_COMPLEXSUBITION(n, ""); 00086 DSP16_COMPLEXSUBITION(n+1, ""); 00087 DSP16_COMPLEXSUBITION(n+2, ""); 00088 DSP16_COMPLEXSUBITION(n+3, ""); 00089 } 00090 00091 // Jump on different functions depending on the length of the vectors to compute 00092 complexsub_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], &vect3[n]); 00093 }
void dsp16_vect_conv | ( | dsp16_t * | vect1, | |
dsp16_t * | vect2, | |||
int | vect2_size, | |||
dsp16_t * | vect3, | |||
int | vect3_size | |||
) |
16-bit fixed point version of the Convolution.
vect1 | A pointer on a 16-bits fixed-point vector corresponding to the output buffer. | |
vect2 | A pointer on a 16-bits fixed-point vector of vect2_size elements corresponding to the first input buffer. | |
vect2_size | The length of the first input buffer (must be greater or equals to 8). | |
vect3 | A pointer on a 16-bits fixed-point vector of vect3_size elements corresponding to the second input buffer. | |
vect3_size | The length of the second input buffer (must be greater or equals to 8) |
Definition at line 52 of file vect_convolution.c.
References dsp16_vect_convpart(), dsp16_vect_copy(), and dsp16_vect_zeropad().
00053 { 00054 if (vect2_size >= vect3_size) 00055 { 00056 // Zero-pads the begining of the vector 00057 dsp16_vect_zeropad(vect1, vect3_size-1, vect3_size-1); 00058 // Copy the rest of the vector 00059 dsp16_vect_copy(&vect1[vect3_size-1], vect2, vect2_size); 00060 // Zero-pads the tail of the vector 00061 dsp16_vect_zeropad(&vect1[vect2_size+vect3_size-1], vect3_size-1, vect3_size-1); 00062 00063 dsp16_vect_convpart(vect1, vect1, vect2_size + 2*(vect3_size - 1), vect3, vect3_size); 00064 } 00065 else 00066 { 00067 // Zero-pads the begining of the vector 00068 dsp16_vect_zeropad(vect1, vect2_size-1, vect2_size-1); 00069 // Copy the rest of the vector 00070 dsp16_vect_copy(&vect1[vect2_size-1], vect3, vect3_size); 00071 // Zero-pads the tail of the vector 00072 dsp16_vect_zeropad(&vect1[vect3_size+vect2_size-1], vect2_size-1, vect2_size-1); 00073 00074 dsp16_vect_convpart(vect1, vect1, vect3_size + 2*(vect2_size - 1), vect2, vect2_size); 00075 } 00076 }
void dsp16_vect_convpart | ( | dsp16_t * | vect1, | |
dsp16_t * | vect2, | |||
int | vect2_size, | |||
dsp16_t * | vect3, | |||
int | vect3_size | |||
) |
16-bit fixed point version of the Partial Convolution.
vect1 | A pointer on a 16-bits fixed-point vector corresponding to the output buffer. | |
vect2 | A pointer on a 16-bits fixed-point vector of vect2_size elements corresponding to the first input buffer. | |
vect2_size | The length of the first input buffer (must be greater or equals to 4). | |
vect3 | A pointer on a 16-bits fixed-point vector of vect3_size elements corresponding to the second input buffer. | |
vect3_size | The length of the second input buffer (must be greater or equals to 8) |
Definition at line 93 of file vect_dsp16_convpart.c.
Referenced by dsp16_filt_fir(), and dsp16_vect_conv().
00094 { 00095 typedef void (*convpart_kernel_opti_t)(dsp16_t *, dsp16_t *, int, dsp16_t *, int); 00096 static const convpart_kernel_opti_t convpart_kernel_opti[8] = { 00097 dsp16_vect_convpart_kernel_x0, 00098 dsp16_vect_convpart_kernel_x1, 00099 dsp16_vect_convpart_kernel_x2, 00100 dsp16_vect_convpart_kernel_x3, 00101 dsp16_vect_convpart_kernel_x4, 00102 dsp16_vect_convpart_kernel_x5, 00103 dsp16_vect_convpart_kernel_x6, 00104 dsp16_vect_convpart_kernel_x7 00105 }; 00106 00107 // Jump on different functions depending on the length of the partial convolution to compute 00108 convpart_kernel_opti[vect3_size&0x7](vect1, vect2, vect2_size - vect3_size + 1, vect3, vect3_size); 00109 }
16-bit fixed point version of the copy function.
vect1 | A pointer on the 16 bits real vector that will recieve data. | |
vect2 | A pointer on the 16 bits real vector to be copied. | |
size | The size of those vectors. |
Definition at line 583 of file dsp_vectors.h.
Referenced by dsp16_resampling_compute(), dsp16_resampling_link(), and dsp16_vect_conv().
00583 { memcpy(vect1, vect2, size*sizeof(dsp16_t)); };
16-bit fixed point version of the vector dot division function.
vect1 | A pointer on the 16-bit real vector that will recieved the result of the dot division. | |
vect2 | A pointer on the 16-bit real vector that will be divided with the other input vector (vect3). | |
vect3 | A pointer on the 16-bit real vector that will be divided with the other input vector (vect2). | |
size | The size of the input buffers. |
Definition at line 71 of file vect_dsp16_dotdiv.c.
References DSP16_QB.
00072 { 00073 typedef void (*dotdiv_kernel_opti_t)(dsp16_t *, dsp16_t *, dsp16_t *); 00074 static const dotdiv_kernel_opti_t dotdiv_end_kernel_opti[4] = { 00075 dsp16_vect_dotdiv_kernel_x0, 00076 dsp16_vect_dotdiv_kernel_x1, 00077 dsp16_vect_dotdiv_kernel_x2, 00078 dsp16_vect_dotdiv_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 vect1[n] = (((S32) vect2[n]) << DSP16_QB) / vect3[n]; 00085 vect1[n+1] = (((S32) vect2[n+1]) << DSP16_QB) / vect3[n+1]; 00086 vect1[n+2] = (((S32) vect2[n+2]) << DSP16_QB) / vect3[n+2]; 00087 vect1[n+3] = (((S32) vect2[n+3]) << DSP16_QB) / vect3[n+3]; 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 dotdiv_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], &vect3[n]); 00092 }
16-bit fixed point version of the vector dot multiplication function.
vect1 | A pointer on the 16-bit real vector that will recieved the result of the dot multiplication. | |
vect2 | A pointer on the 16-bit real vector that will be multiplied with the other input vector (vect3). | |
vect3 | A pointer on the 16-bit real vector that will be multiplied with the other input vector (vect2). | |
size | The size of the input buffers. |
Definition at line 71 of file vect_dsp16_dotmul.c.
References DSP16_QB.
Referenced by dsp_calculate_fft().
00072 { 00073 typedef void (*dotmul_kernel_opti_t)(dsp16_t *, dsp16_t *, dsp16_t *); 00074 static const dotmul_kernel_opti_t dotmul_end_kernel_opti[4] = { 00075 dsp16_vect_dotmul_kernel_x0, 00076 dsp16_vect_dotmul_kernel_x1, 00077 dsp16_vect_dotmul_kernel_x2, 00078 dsp16_vect_dotmul_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 vect1[n] = ((S32) vect2[n] * (S32) vect3[n]) >> DSP16_QB; 00085 vect1[n+1] = ((S32) vect2[n+1] * (S32) vect3[n+1]) >> DSP16_QB; 00086 vect1[n+2] = ((S32) vect2[n+2] * (S32) vect3[n+2]) >> DSP16_QB; 00087 vect1[n+3] = ((S32) vect2[n+3] * (S32) vect3[n+3]) >> DSP16_QB; 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 dotmul_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], &vect3[n]); 00092 }
16-bit fixed point version of the vector division with an integer.
vect1 | A pointer on the 16-bit real vector that will recieved the result of the operation. | |
vect2 | A pointer on the 16-bit real vector that will be divided with the integer. | |
size | The size of the buffers. | |
integer | The integer to be divided with the vector (vect2). |
Definition at line 71 of file vect_dsp16_intdiv.c.
References DSP16_INTDIVISION.
00072 { 00073 typedef void (*intdiv_kernel_opti_t)(dsp16_t *, dsp16_t *, int); 00074 static const intdiv_kernel_opti_t intdiv_end_kernel_opti[4] = { 00075 dsp16_vect_intdiv_kernel_x0, 00076 dsp16_vect_intdiv_kernel_x1, 00077 dsp16_vect_intdiv_kernel_x2, 00078 dsp16_vect_intdiv_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 DSP16_INTDIVISION(n, ""); 00085 DSP16_INTDIVISION(n+1, ""); 00086 DSP16_INTDIVISION(n+2, ""); 00087 DSP16_INTDIVISION(n+3, ""); 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 intdiv_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], integer); 00092 }
16-bit fixed point version of the vector multiplication with an integer.
vect1 | A pointer on the 16-bit real vector that will recieved the result of the operation. | |
vect2 | A pointer on the 16-bit real vector that will be multiplied with the integer. | |
size | The size of the buffers. | |
integer | The integer to be multiplied with the vector (vect2). |
Definition at line 71 of file vect_dsp16_intmul.c.
References DSP16_INTMULTIPLICATION.
00072 { 00073 typedef void (*intmul_kernel_opti_t)(dsp16_t *, dsp16_t *, int); 00074 static const intmul_kernel_opti_t intmul_end_kernel_opti[4] = { 00075 dsp16_vect_intmul_kernel_x0, 00076 dsp16_vect_intmul_kernel_x1, 00077 dsp16_vect_intmul_kernel_x2, 00078 dsp16_vect_intmul_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 DSP16_INTMULTIPLICATION(n, ""); 00085 DSP16_INTMULTIPLICATION(n+1, ""); 00086 DSP16_INTMULTIPLICATION(n+2, ""); 00087 DSP16_INTMULTIPLICATION(n+3, ""); 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 intmul_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], integer); 00092 }
16-bit fixed point version of the vector maximum function.
vect1 | A pointer on the 16-bit real vector that is used to find its maximum. | |
size | The size of the input buffer. |
Definition at line 73 of file vect_dsp16_max.c.
References DSP16_MAXIMUM, DSP16_QA, DSP16_QB, and DSP_Q_MIN.
Referenced by dsp16_filt_lpfirdesign(), and dsp_calculate_fft().
00074 { 00075 typedef dsp16_t (*max_kernel_opti_t)(dsp16_t *, dsp16_t); 00076 static const max_kernel_opti_t max_end_kernel_opti[4] = { 00077 dsp16_vect_max_kernel_x0, 00078 dsp16_vect_max_kernel_x1, 00079 dsp16_vect_max_kernel_x2, 00080 dsp16_vect_max_kernel_x3 00081 }; 00082 int n; 00083 dsp16_t max = (dsp16_t) DSP_Q_MIN(DSP16_QA, DSP16_QB); 00084 00085 for(n=0; n<size-3; n+=4) 00086 { 00087 DSP16_MAXIMUM(n, "") 00088 DSP16_MAXIMUM(n+1, "") 00089 DSP16_MAXIMUM(n+2, "") 00090 DSP16_MAXIMUM(n+3, "") 00091 } 00092 00093 // Jump on different functions depending on the length of the vectors to compute 00094 return max_end_kernel_opti[size&0x3](&vect1[n], max); 00095 }
16-bit fixed point version of the vector minimum function.
vect1 | A pointer on the 16-bit real vector that is used to find its minimum. | |
size | The size of the input buffer. |
Definition at line 73 of file vect_dsp16_min.c.
References DSP16_MINIMUM, DSP16_QA, DSP16_QB, DSP_Q_MAX, and min().
Referenced by dsp16_filt_lpfirdesign().
00074 { 00075 typedef dsp16_t (*min_kernel_opti_t)(dsp16_t *, dsp16_t); 00076 static const min_kernel_opti_t min_end_kernel_opti[4] = { 00077 dsp16_vect_min_kernel_x0, 00078 dsp16_vect_min_kernel_x1, 00079 dsp16_vect_min_kernel_x2, 00080 dsp16_vect_min_kernel_x3 00081 }; 00082 int n; 00083 dsp16_t min = (dsp16_t) DSP_Q_MAX(DSP16_QA, DSP16_QB); 00084 00085 for(n=0; n<size-3; n+=4) 00086 { 00087 DSP16_MINIMUM(n, "") 00088 DSP16_MINIMUM(n+1, "") 00089 DSP16_MINIMUM(n+2, "") 00090 DSP16_MINIMUM(n+3, "") 00091 } 00092 00093 // Jump on different functions depending on the length of the vectors to compute 00094 return min_end_kernel_opti[size&0x3](&vect1[n], min); 00095 }
16-bit fixed point version of the vector negate function.
vect1 | A pointer on the 16-bit real vector that will recieve the result. | |
vect2 | A pointer on the 16-bit real vector that will be negate. | |
size | The size of the input buffer. |
Definition at line 71 of file vect_dsp16_neg.c.
References DSP16_NEGATE.
00072 { 00073 typedef void (*neg_kernel_opti_t)(dsp16_t *, dsp16_t *); 00074 static const neg_kernel_opti_t neg_end_kernel_opti[4] = { 00075 dsp16_vect_neg_kernel_x0, 00076 dsp16_vect_neg_kernel_x1, 00077 dsp16_vect_neg_kernel_x2, 00078 dsp16_vect_neg_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 DSP16_NEGATE(n, ""); 00085 DSP16_NEGATE(n+1, ""); 00086 DSP16_NEGATE(n+2, ""); 00087 DSP16_NEGATE(n+3, ""); 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 neg_end_kernel_opti[size&0x3](&vect1[n], &vect2[n]); 00092 }
16-bit fixed point version of the power function.
vect1 | A pointer on the 16-bit real vector that will recieved the result of the operation. | |
vect2 | A pointer on the 16-bit real vector that will be raised to the power 'real'. | |
size | The size of the buffers. | |
real | The real number used to raised to the power 'vect2'. |
Definition at line 71 of file vect_dsp16_pow.c.
References DSP16_POWER.
00072 { 00073 typedef void (*pow_kernel_opti_t)(dsp16_t *, dsp16_t *, dsp16_t); 00074 static const pow_kernel_opti_t pow_end_kernel_opti[4] = { 00075 dsp16_vect_pow_kernel_x0, 00076 dsp16_vect_pow_kernel_x1, 00077 dsp16_vect_pow_kernel_x2, 00078 dsp16_vect_pow_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 DSP16_POWER(n, ""); 00085 DSP16_POWER(n+1, ""); 00086 DSP16_POWER(n+2, ""); 00087 DSP16_POWER(n+3, ""); 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 pow_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], real); 00092 }
16-bit fixed point version of the vector addition with a real number.
vect1 | A pointer on the 16-bit real vector that will recieved the result of the operation. | |
vect2 | A pointer on the 16-bit real vector that will be added with the real number. | |
size | The size of the buffers. | |
real | The real number to be added with the vector (vect2). |
Definition at line 71 of file vect_dsp16_realadd.c.
References DSP16_REALADDITION.
00072 { 00073 typedef void (*realadd_kernel_opti_t)(dsp16_t *, dsp16_t *, dsp16_t); 00074 static const realadd_kernel_opti_t realadd_end_kernel_opti[4] = { 00075 dsp16_vect_realadd_kernel_x0, 00076 dsp16_vect_realadd_kernel_x1, 00077 dsp16_vect_realadd_kernel_x2, 00078 dsp16_vect_realadd_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 DSP16_REALADDITION(n, ""); 00085 DSP16_REALADDITION(n+1, ""); 00086 DSP16_REALADDITION(n+2, ""); 00087 DSP16_REALADDITION(n+3, ""); 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 realadd_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], real); 00092 }
16-bit fixed point version of the vector division with a real number.
vect1 | A pointer on the 16-bit real vector that will recieved the result of the operation. | |
vect2 | A pointer on the 16-bit real vector that will be divided with the real number. | |
size | The size of the buffers. | |
real | The real number to be divided with the vector (vect2). |
Definition at line 71 of file vect_dsp16_realdiv.c.
References DSP16_QB.
Referenced by dsp_calculate_fft().
00072 { 00073 typedef void (*realdiv_kernel_opti_t)(dsp16_t *, dsp16_t *, dsp16_t); 00074 static const realdiv_kernel_opti_t realdiv_end_kernel_opti[4] = { 00075 dsp16_vect_realdiv_kernel_x0, 00076 dsp16_vect_realdiv_kernel_x1, 00077 dsp16_vect_realdiv_kernel_x2, 00078 dsp16_vect_realdiv_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 vect1[n] = (((S32) vect2[n]) << DSP16_QB) / (S32) real; 00085 vect1[n+1] = (((S32) vect2[n+1]) << DSP16_QB) / (S32) real; 00086 vect1[n+2] = (((S32) vect2[n+2]) << DSP16_QB) / (S32) real; 00087 vect1[n+3] = (((S32) vect2[n+3]) << DSP16_QB) / (S32) real; 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 realdiv_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], real); 00092 }
16-bit fixed point version of the vector multiplication with a real number.
vect1 | A pointer on the 16-bit real vector that will recieved the result of the operation. | |
vect2 | A pointer on the 16-bit real vector that will be multiplied with the real number. | |
size | The size of the buffers. | |
real | The real number to be multiplied with the vector (vect2). |
Definition at line 71 of file vect_dsp16_realmul.c.
References DSP16_QB.
Referenced by dsp16_resampling_setup(), and generate_signal().
00072 { 00073 typedef void (*realmul_kernel_opti_t)(dsp16_t *, dsp16_t *, dsp16_t); 00074 static const realmul_kernel_opti_t realmul_end_kernel_opti[4] = { 00075 dsp16_vect_realmul_kernel_x0, 00076 dsp16_vect_realmul_kernel_x1, 00077 dsp16_vect_realmul_kernel_x2, 00078 dsp16_vect_realmul_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 vect1[n] = ((S32) vect2[n] * (S32) real) >> DSP16_QB; 00085 vect1[n+1] = ((S32) vect2[n+1] * (S32) real) >> DSP16_QB; 00086 vect1[n+2] = ((S32) vect2[n+2] * (S32) real) >> DSP16_QB; 00087 vect1[n+3] = ((S32) vect2[n+3] * (S32) real) >> DSP16_QB; 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 realmul_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], real); 00092 }
16-bit fixed point version of the vector subtraction with a real number.
vect1 | A pointer on the 16-bit real vector that will recieved the result of the operation. | |
vect2 | A pointer on the 16-bit real vector that will be subtracted with the real number. | |
size | The size of the buffers. | |
real | The real number to be subtracted with the vector (vect2). |
Definition at line 71 of file vect_dsp16_realsub.c.
References DSP16_REALSUBTRACTION.
00072 { 00073 typedef void (*realsub_kernel_opti_t)(dsp16_t *, dsp16_t *, dsp16_t); 00074 static const realsub_kernel_opti_t realsub_end_kernel_opti[4] = { 00075 dsp16_vect_realsub_kernel_x0, 00076 dsp16_vect_realsub_kernel_x1, 00077 dsp16_vect_realsub_kernel_x2, 00078 dsp16_vect_realsub_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 DSP16_REALSUBTRACTION(n, ""); 00085 DSP16_REALSUBTRACTION(n+1, ""); 00086 DSP16_REALSUBTRACTION(n+2, ""); 00087 DSP16_REALSUBTRACTION(n+3, ""); 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 realsub_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], real); 00092 }
16-bit fixed point version of the vector subtraction function.
vect1 | A pointer on the 16-bit real vector that will recieved the result of the subtraction. | |
vect2 | A pointer on the 16-bit real vector that will be subtracted with the other input vector (vect3). | |
vect3 | A pointer on the 16-bit real vector that will be subtracted with the other input vector (vect2). | |
size | The size of the input buffers. |
Definition at line 71 of file vect_dsp16_sub.c.
00072 { 00073 typedef void (*sub_kernel_opti_t)(dsp16_t *, dsp16_t *, dsp16_t *); 00074 static const sub_kernel_opti_t sub_end_kernel_opti[4] = { 00075 dsp16_vect_sub_kernel_x0, 00076 dsp16_vect_sub_kernel_x1, 00077 dsp16_vect_sub_kernel_x2, 00078 dsp16_vect_sub_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 vect1[n] = vect2[n] - vect3[n]; 00085 vect1[n+1] = vect2[n+1] - vect3[n+1]; 00086 vect1[n+2] = vect2[n+2] - vect3[n+2]; 00087 vect1[n+3] = vect2[n+3] - vect3[n+3]; 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 sub_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], &vect3[n]); 00092 }
static void dsp16_vect_zeropad | ( | dsp16_t * | vect1, | |
int | size, | |||
int | num_zero | |||
) | [inline, static] |
16-bit fixed point version of the zero padding function.
vect1 | A pointer on the 16 bits real vector that has to be padded with zeros. | |
size | The size of this vector. | |
num_zero | The number of zeros to pad at the end of the vector. |
Definition at line 555 of file dsp_vectors.h.
Referenced by dsp16_gen_dirac(), dsp16_resampling_setup(), and dsp16_vect_conv().
32-bit fixed point version of the vector additon function.
vect1 | A pointer on the 32-bit real vector that will recieved the result of the addition. | |
vect2 | A pointer on the 32-bit real vector that will be added with the other input vector (vect3). | |
vect3 | A pointer on the 32-bit real vector that will be added with the other input vector (vect2). | |
size | The size of the input buffers. |
Definition at line 73 of file vect_dsp32_add.c.
00074 { 00075 typedef void (*add_kernel_opti_t)(dsp32_t *, dsp32_t *, dsp32_t *); 00076 static const add_kernel_opti_t add_end_kernel_opti[4] = { 00077 dsp32_vect_add_kernel_x0, 00078 dsp32_vect_add_kernel_x1, 00079 dsp32_vect_add_kernel_x2, 00080 dsp32_vect_add_kernel_x3 00081 }; 00082 int n; 00083 00084 for(n=0; n<size-3; n+=4) 00085 { 00086 vect1[n] = vect2[n] + vect3[n]; 00087 vect1[n+1] = vect2[n+1] + vect3[n+1]; 00088 vect1[n+2] = vect2[n+2] + vect3[n+2]; 00089 vect1[n+3] = vect2[n+3] + vect3[n+3]; 00090 } 00091 00092 // Jump on different functions depending on the length of the vectors to compute 00093 add_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], &vect3[n]); 00094 }
32-bit fixed point version of the vector additon function.
vect1 | A pointer on the 32-bit real vector that will recieved the result of the addition. | |
vect2 | A pointer on the 32-bit real vector that will be added with the other input vector (vect3). | |
vect3 | A pointer on the 32-bit real vector that will be added with the other input vector (vect2). | |
size | The size of the input buffers. |
Definition at line 78 of file vect_dsp32_add_and_saturate.c.
References DSP32_ADDITION.
00079 { 00080 typedef void (*add_kernel_opti_t)(dsp32_t *, dsp32_t *, dsp32_t *); 00081 static const add_kernel_opti_t add_end_kernel_opti[4] = { 00082 dsp32_vect_add_kernel_x0, 00083 dsp32_vect_add_kernel_x1, 00084 dsp32_vect_add_kernel_x2, 00085 dsp32_vect_add_kernel_x3 00086 }; 00087 int n; 00088 00089 for(n=0; n<size-3; n+=4) 00090 { 00091 DSP32_ADDITION(n, ""); 00092 DSP32_ADDITION(n+1, ""); 00093 DSP32_ADDITION(n+2, ""); 00094 DSP32_ADDITION(n+3, ""); 00095 } 00096 00097 // Jump on different functions depending on the length of the vectors to compute 00098 add_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], &vect3[n]); 00099 }
void dsp32_vect_complex_abs | ( | dsp32_t * | vect1, | |
dsp32_complex_t * | vect2, | |||
int | size | |||
) |
32-bit fixed point version of the complex vector absolute function.
vect1 | A pointer on the 32-bit real vector that will recieve the result. | |
vect2 | A pointer on the 32-bit complex vector that will be computed. | |
size | The size of the input buffer. |
Definition at line 79 of file vect_dsp32_complex_abs.c.
References DSP32_COMPLEX_ABS, and dsp32_vect_complex_abs_kernel_x0().
00080 { 00081 typedef void (*complex_abs_kernel_opti_t)(dsp32_t *, dsp32_complex_t *); 00082 static const complex_abs_kernel_opti_t complex_abs_end_kernel_opti[4] = { 00083 dsp32_vect_complex_abs_kernel_x0, 00084 dsp32_vect_complex_abs_kernel_x1, 00085 dsp32_vect_complex_abs_kernel_x2, 00086 dsp32_vect_complex_abs_kernel_x3 00087 }; 00088 int n; 00089 S64 temp1, temp2; 00090 00091 for(n=0; n<size-3; n+=4) 00092 { 00093 DSP32_COMPLEX_ABS(n, ""); 00094 DSP32_COMPLEX_ABS(n+1, ""); 00095 DSP32_COMPLEX_ABS(n+2, ""); 00096 DSP32_COMPLEX_ABS(n+3, ""); 00097 } 00098 00099 // Jump on different functions depending on the length of the vectors to compute 00100 complex_abs_end_kernel_opti[size&0x3](&vect1[n], &vect2[n]); 00101 }
void dsp32_vect_complex_add | ( | dsp32_complex_t * | vect1, | |
dsp32_complex_t * | vect2, | |||
dsp32_complex_t * | vect3, | |||
int | size | |||
) |
32-bit fixed point version of the complex vector additon function.
vect1 | A pointer on the 32-bit complex vector that will recieved the result of the addition. | |
vect2 | A pointer on the 32-bit complex vector that will be added with the other input vector (vect3). | |
vect3 | A pointer on the 32-bit complex vector that will be added with the other input vector (vect2). | |
size | The size of the input buffers. |
Definition at line 72 of file vect_dsp32_complex_add.c.
References DSP32_COMPLEXADDITION.
00073 { 00074 typedef void (*complexadd_kernel_opti_t)(dsp32_complex_t *, dsp32_complex_t *, dsp32_complex_t *); 00075 static const complexadd_kernel_opti_t complexadd_end_kernel_opti[4] = { 00076 dsp32_vect_complexadd_kernel_x0, 00077 dsp32_vect_complexadd_kernel_x1, 00078 dsp32_vect_complexadd_kernel_x2, 00079 dsp32_vect_complexadd_kernel_x3 00080 }; 00081 int n; 00082 00083 for(n=0; n<size-3; n+=4) 00084 { 00085 DSP32_COMPLEXADDITION(n, ""); 00086 DSP32_COMPLEXADDITION(n+1, ""); 00087 DSP32_COMPLEXADDITION(n+2, ""); 00088 DSP32_COMPLEXADDITION(n+3, ""); 00089 } 00090 00091 // Jump on different functions depending on the length of the vectors to compute 00092 complexadd_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], &vect3[n]); 00093 }
void dsp32_vect_complex_sub | ( | dsp32_complex_t * | vect1, | |
dsp32_complex_t * | vect2, | |||
dsp32_complex_t * | vect3, | |||
int | size | |||
) |
32-bit fixed point version of the complex vector subtraction function.
vect1 | A pointer on the 32-bit complex vector that will recieved the result of the subtraction. | |
vect2 | A pointer on the 32-bit complex vector that will be subtracted with the other input vector (vect3). | |
vect3 | A pointer on the 32-bit complex vector that will be subtracted with the other input vector (vect2). | |
size | The size of the input buffers. |
Definition at line 72 of file vect_dsp32_complex_sub.c.
References DSP32_COMPLEXSUBITION.
00073 { 00074 typedef void (*complexsub_kernel_opti_t)(dsp32_complex_t *, dsp32_complex_t *, dsp32_complex_t *); 00075 static const complexsub_kernel_opti_t complexsub_end_kernel_opti[4] = { 00076 dsp32_vect_complexsub_kernel_x0, 00077 dsp32_vect_complexsub_kernel_x1, 00078 dsp32_vect_complexsub_kernel_x2, 00079 dsp32_vect_complexsub_kernel_x3 00080 }; 00081 int n; 00082 00083 for(n=0; n<size-3; n+=4) 00084 { 00085 DSP32_COMPLEXSUBITION(n, ""); 00086 DSP32_COMPLEXSUBITION(n+1, ""); 00087 DSP32_COMPLEXSUBITION(n+2, ""); 00088 DSP32_COMPLEXSUBITION(n+3, ""); 00089 } 00090 00091 // Jump on different functions depending on the length of the vectors to compute 00092 complexsub_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], &vect3[n]); 00093 }
void dsp32_vect_conv | ( | dsp32_t * | vect1, | |
dsp32_t * | vect2, | |||
int | vect2_size, | |||
dsp32_t * | vect3, | |||
int | vect3_size | |||
) |
32-bit fixed point version of the Convolution.
vect1 | A pointer on a 32-bits fixed-point vector corresponding to the output buffer. | |
vect2 | A pointer on a 32-bits fixed-point vector of vect2_size elements corresponding to the first input buffer. | |
vect2_size | The length of the first input buffer (must be greater or equals to 8). | |
vect3 | A pointer on a 32-bits fixed-point vector of vect3_size elements corresponding to the second input buffer. | |
vect3_size | The length of the second input buffer (must be greater or equals to 8) |
Definition at line 84 of file vect_convolution.c.
References dsp32_vect_convpart(), dsp32_vect_copy(), and dsp32_vect_zeropad().
00085 { 00086 if (vect2_size >= vect3_size) 00087 { 00088 // Zero-pads the begining of the vector 00089 dsp32_vect_zeropad(vect1, vect3_size-1, vect3_size-1); 00090 // Copy the rest of the vector 00091 dsp32_vect_copy(&vect1[vect3_size-1], vect2, vect2_size); 00092 // Zero-pads the tail of the vector 00093 dsp32_vect_zeropad(&vect1[vect2_size+vect3_size-1], vect3_size-1, vect3_size-1); 00094 00095 dsp32_vect_convpart(vect1, vect1, vect2_size + 2*(vect3_size - 1), vect3, vect3_size); 00096 } 00097 else 00098 { 00099 // Zero-pads the begining of the vector 00100 dsp32_vect_zeropad(vect1, vect2_size-1, vect2_size-1); 00101 // Copy the rest of the vector 00102 dsp32_vect_copy(&vect1[vect2_size-1], vect3, vect3_size); 00103 // Zero-pads the tail of the vector 00104 dsp32_vect_zeropad(&vect1[vect3_size+vect2_size-1], vect2_size-1, vect2_size-1); 00105 00106 dsp32_vect_convpart(vect1, vect1, vect3_size + 2*(vect2_size - 1), vect2, vect2_size); 00107 } 00108 }
void dsp32_vect_convpart | ( | dsp32_t * | vect1, | |
dsp32_t * | vect2, | |||
int | vect2_size, | |||
dsp32_t * | vect3, | |||
int | vect3_size | |||
) |
32-bit fixed point version of the Partial Convolution.
vect1 | A pointer on a 32-bits fixed-point vector corresponding to the output buffer. | |
vect2 | A pointer on a 32-bits fixed-point vector of vect2_size elements corresponding to the first input buffer. | |
vect2_size | The length of the first input buffer (must be greater or equals to 4). | |
vect3 | A pointer on a 32-bits fixed-point vector of vect3_size elements corresponding to the second input buffer. | |
vect3_size | The length of the second input buffer (must be greater or equals to 8) |
Definition at line 94 of file vect_dsp32_convpart.c.
Referenced by dsp32_filt_fir(), and dsp32_vect_conv().
00095 { 00096 typedef void (*convpart_kernel_opti_t)(dsp32_t *, dsp32_t *, int, dsp32_t *, int); 00097 static const convpart_kernel_opti_t convpart_kernel_opti[8] = { 00098 dsp32_vect_convpart_kernel_x0, 00099 dsp32_vect_convpart_kernel_x1, 00100 dsp32_vect_convpart_kernel_x2, 00101 dsp32_vect_convpart_kernel_x3, 00102 dsp32_vect_convpart_kernel_x4, 00103 dsp32_vect_convpart_kernel_x5, 00104 dsp32_vect_convpart_kernel_x6, 00105 dsp32_vect_convpart_kernel_x7 00106 }; 00107 00108 // Jump on different functions depending on the length of the partial convolution to compute 00109 convpart_kernel_opti[vect3_size&0x7](vect1, vect2, vect2_size - vect3_size + 1, vect3, vect3_size); 00110 }
32-bit fixed point version of the copy function.
vect1 | A pointer on the 32 bits real vector that will recieve data. | |
vect2 | A pointer on the 32 bits real vector to be copied. | |
size | The size of those vectors. |
Definition at line 590 of file dsp_vectors.h.
Referenced by dsp32_vect_conv().
00590 { memcpy(vect1, vect2, size*sizeof(dsp32_t)); };
32-bit fixed point version of the vector dot division function.
vect1 | A pointer on the 32-bit real vector that will recieved the result of the dot division. | |
vect2 | A pointer on the 32-bit real vector that will be divided with the other input vector (vect3). | |
vect3 | A pointer on the 32-bit real vector that will be divided with the other input vector (vect2). | |
size | The size of the input buffers. |
Definition at line 73 of file vect_dsp32_dotdiv.c.
References DSP32_QB.
00074 { 00075 typedef void (*dotdiv_kernel_opti_t)(dsp32_t *, dsp32_t *, dsp32_t *); 00076 static const dotdiv_kernel_opti_t dotdiv_end_kernel_opti[4] = { 00077 dsp32_vect_dotdiv_kernel_x0, 00078 dsp32_vect_dotdiv_kernel_x1, 00079 dsp32_vect_dotdiv_kernel_x2, 00080 dsp32_vect_dotdiv_kernel_x3 00081 }; 00082 int n; 00083 00084 for(n=0; n<size-3; n+=4) 00085 { 00086 vect1[n] = (((S64) vect2[n]) << DSP32_QB) / vect3[n]; 00087 vect1[n+1] = (((S64) vect2[n+1]) << DSP32_QB) / vect3[n+1]; 00088 vect1[n+2] = (((S64) vect2[n+2]) << DSP32_QB) / vect3[n+2]; 00089 vect1[n+3] = (((S64) vect2[n+3]) << DSP32_QB) / vect3[n+3]; 00090 } 00091 00092 // Jump on different functions depending on the length of the vectors to compute 00093 dotdiv_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], &vect3[n]); 00094 }
32-bit fixed point version of the vector dot multiplication function.
vect1 | A pointer on the 32-bit real vector that will recieved the result of the dot multiplication. | |
vect2 | A pointer on the 32-bit real vector that will be multiplied with the other input vector (vect3). | |
vect3 | A pointer on the 32-bit real vector that will be multiplied with the other input vector (vect2). | |
size | The size of the input buffers. |
Definition at line 73 of file vect_dsp32_dotmul.c.
References DSP32_QB.
00074 { 00075 typedef void (*dotmul_kernel_opti_t)(dsp32_t *, dsp32_t *, dsp32_t *); 00076 static const dotmul_kernel_opti_t dotmul_end_kernel_opti[4] = { 00077 dsp32_vect_dotmul_kernel_x0, 00078 dsp32_vect_dotmul_kernel_x1, 00079 dsp32_vect_dotmul_kernel_x2, 00080 dsp32_vect_dotmul_kernel_x3 00081 }; 00082 int n; 00083 00084 for(n=0; n<size-3; n+=4) 00085 { 00086 vect1[n] = ((S64) vect2[n] * (S64) vect3[n]) >> DSP32_QB; 00087 vect1[n+1] = ((S64) vect2[n+1] * (S64) vect3[n+1]) >> DSP32_QB; 00088 vect1[n+2] = ((S64) vect2[n+2] * (S64) vect3[n+2]) >> DSP32_QB; 00089 vect1[n+3] = ((S64) vect2[n+3] * (S64) vect3[n+3]) >> DSP32_QB; 00090 } 00091 00092 // Jump on different functions depending on the length of the vectors to compute 00093 dotmul_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], &vect3[n]); 00094 }
32-bit fixed point version of the vector division with an integer.
vect1 | A pointer on the 32-bit real vector that will recieved the result of the operation. | |
vect2 | A pointer on the 32-bit real vector that will be divided with the integer. | |
size | The size of the buffers. | |
integer | The integer to be divided with the vector (vect2). |
Definition at line 71 of file vect_dsp32_intdiv.c.
References DSP32_INTDIVISION.
00072 { 00073 typedef void (*intdiv_kernel_opti_t)(dsp32_t *, dsp32_t *, int); 00074 static const intdiv_kernel_opti_t intdiv_end_kernel_opti[4] = { 00075 dsp32_vect_intdiv_kernel_x0, 00076 dsp32_vect_intdiv_kernel_x1, 00077 dsp32_vect_intdiv_kernel_x2, 00078 dsp32_vect_intdiv_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 DSP32_INTDIVISION(n, ""); 00085 DSP32_INTDIVISION(n+1, ""); 00086 DSP32_INTDIVISION(n+2, ""); 00087 DSP32_INTDIVISION(n+3, ""); 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 intdiv_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], integer); 00092 }
32-bit fixed point version of the vector multiplication with an integer.
vect1 | A pointer on the 32-bit real vector that will recieved the result of the operation. | |
vect2 | A pointer on the 32-bit real vector that will be multiplied with the integer. | |
size | The size of the buffers. | |
integer | The integer to be multiplied with the vector (vect2). |
Definition at line 71 of file vect_dsp32_intmul.c.
References DSP32_INTMULTIPLICATION.
00072 { 00073 typedef void (*intmul_kernel_opti_t)(dsp32_t *, dsp32_t *, int); 00074 static const intmul_kernel_opti_t intmul_end_kernel_opti[4] = { 00075 dsp32_vect_intmul_kernel_x0, 00076 dsp32_vect_intmul_kernel_x1, 00077 dsp32_vect_intmul_kernel_x2, 00078 dsp32_vect_intmul_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 DSP32_INTMULTIPLICATION(n, ""); 00085 DSP32_INTMULTIPLICATION(n+1, ""); 00086 DSP32_INTMULTIPLICATION(n+2, ""); 00087 DSP32_INTMULTIPLICATION(n+3, ""); 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 intmul_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], integer); 00092 }
32-bit fixed point version of the vector maximum function.
vect1 | A pointer on the 32-bit real vector that is used to find its maximum. | |
size | The size of the input buffer. |
Definition at line 73 of file vect_dsp32_max.c.
References DSP32_MAXIMUM, DSP32_QA, DSP32_QB, and DSP_Q_MIN.
00074 { 00075 typedef dsp32_t (*max_kernel_opti_t)(dsp32_t *, dsp32_t); 00076 static const max_kernel_opti_t max_end_kernel_opti[4] = { 00077 dsp32_vect_max_kernel_x0, 00078 dsp32_vect_max_kernel_x1, 00079 dsp32_vect_max_kernel_x2, 00080 dsp32_vect_max_kernel_x3 00081 }; 00082 int n; 00083 dsp32_t max = (dsp32_t) DSP_Q_MIN(DSP32_QA, DSP32_QB); 00084 00085 for(n=0; n<size-3; n+=4) 00086 { 00087 DSP32_MAXIMUM(n, "") 00088 DSP32_MAXIMUM(n+1, "") 00089 DSP32_MAXIMUM(n+2, "") 00090 DSP32_MAXIMUM(n+3, "") 00091 } 00092 00093 // Jump on different functions depending on the length of the vectors to compute 00094 return max_end_kernel_opti[size&0x3](&vect1[n], max); 00095 }
32-bit fixed point version of the vector minimum function.
vect1 | A pointer on the 32-bit real vector that is used to find its minimum. | |
size | The size of the input buffer. |
Definition at line 73 of file vect_dsp32_min.c.
References DSP32_MINIMUM, DSP32_QA, DSP32_QB, DSP_Q_MAX, and min().
00074 { 00075 typedef dsp32_t (*min_kernel_opti_t)(dsp32_t *, dsp32_t); 00076 static const min_kernel_opti_t min_end_kernel_opti[4] = { 00077 dsp32_vect_min_kernel_x0, 00078 dsp32_vect_min_kernel_x1, 00079 dsp32_vect_min_kernel_x2, 00080 dsp32_vect_min_kernel_x3 00081 }; 00082 int n; 00083 dsp32_t min = (dsp32_t) DSP_Q_MAX(DSP32_QA, DSP32_QB); 00084 00085 for(n=0; n<size-3; n+=4) 00086 { 00087 DSP32_MINIMUM(n, "") 00088 DSP32_MINIMUM(n+1, "") 00089 DSP32_MINIMUM(n+2, "") 00090 DSP32_MINIMUM(n+3, "") 00091 } 00092 00093 // Jump on different functions depending on the length of the vectors to compute 00094 return min_end_kernel_opti[size&0x3](&vect1[n], min); 00095 }
32-bit fixed point version of the vector negate function.
vect1 | A pointer on the 32-bit real vector that will recieve the result. | |
vect2 | A pointer on the 32-bit real vector that will be negate. | |
size | The size of the input buffer. |
Definition at line 73 of file vect_dsp32_neg.c.
References DSP32_NEGATE.
00074 { 00075 typedef void (*neg_kernel_opti_t)(dsp32_t *, dsp32_t *); 00076 static const neg_kernel_opti_t neg_end_kernel_opti[4] = { 00077 dsp32_vect_neg_kernel_x0, 00078 dsp32_vect_neg_kernel_x1, 00079 dsp32_vect_neg_kernel_x2, 00080 dsp32_vect_neg_kernel_x3 00081 }; 00082 int n; 00083 00084 for(n=0; n<size-3; n+=4) 00085 { 00086 DSP32_NEGATE(n, ""); 00087 DSP32_NEGATE(n+1, ""); 00088 DSP32_NEGATE(n+2, ""); 00089 DSP32_NEGATE(n+3, ""); 00090 } 00091 00092 // Jump on different functions depending on the length of the vectors to compute 00093 neg_end_kernel_opti[size&0x3](&vect1[n], &vect2[n]); 00094 }
32-bit fixed point version of the power function.
vect1 | A pointer on the 32-bit real vector that will recieved the result of the operation. | |
vect2 | A pointer on the 32-bit real vector that will be raised to the power 'real'. | |
size | The size of the buffers. | |
real | The real number used to raised to the power 'vect2'. |
Definition at line 71 of file vect_dsp32_pow.c.
References DSP32_POWER.
00072 { 00073 typedef void (*pow_kernel_opti_t)(dsp32_t *, dsp32_t *, dsp32_t); 00074 static const pow_kernel_opti_t pow_end_kernel_opti[4] = { 00075 dsp32_vect_pow_kernel_x0, 00076 dsp32_vect_pow_kernel_x1, 00077 dsp32_vect_pow_kernel_x2, 00078 dsp32_vect_pow_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 DSP32_POWER(n, ""); 00085 DSP32_POWER(n+1, ""); 00086 DSP32_POWER(n+2, ""); 00087 DSP32_POWER(n+3, ""); 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 pow_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], real); 00092 }
32-bit fixed point version of the vector addition with a real number.
vect1 | A pointer on the 32-bit real vector that will recieved the result of the operation. | |
vect2 | A pointer on the 32-bit real vector that will be added with the real number. | |
size | The size of the buffers. | |
real | The real number to be added with the vector (vect2). |
Definition at line 71 of file vect_dsp32_realadd.c.
References DSP32_REALADDITION.
00072 { 00073 typedef void (*realadd_kernel_opti_t)(dsp32_t *, dsp32_t *, dsp32_t); 00074 static const realadd_kernel_opti_t realadd_end_kernel_opti[4] = { 00075 dsp32_vect_realadd_kernel_x0, 00076 dsp32_vect_realadd_kernel_x1, 00077 dsp32_vect_realadd_kernel_x2, 00078 dsp32_vect_realadd_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 DSP32_REALADDITION(n, ""); 00085 DSP32_REALADDITION(n+1, ""); 00086 DSP32_REALADDITION(n+2, ""); 00087 DSP32_REALADDITION(n+3, ""); 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 realadd_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], real); 00092 }
32-bit fixed point version of the vector division with a real number.
vect1 | A pointer on the 32-bit real vector that will recieved the result of the operation. | |
vect2 | A pointer on the 32-bit real vector that will be divided with the real number. | |
size | The size of the buffers. | |
real | The real number to be divided with the vector (vect2). |
Definition at line 71 of file vect_dsp32_realdiv.c.
References DSP32_QB.
00072 { 00073 typedef void (*realdiv_kernel_opti_t)(dsp32_t *, dsp32_t *, dsp32_t); 00074 static const realdiv_kernel_opti_t realdiv_end_kernel_opti[4] = { 00075 dsp32_vect_realdiv_kernel_x0, 00076 dsp32_vect_realdiv_kernel_x1, 00077 dsp32_vect_realdiv_kernel_x2, 00078 dsp32_vect_realdiv_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 vect1[n] = (((S64) vect2[n]) << DSP32_QB) / (S64) real; 00085 vect1[n+1] = (((S64) vect2[n+1]) << DSP32_QB) / (S64) real; 00086 vect1[n+2] = (((S64) vect2[n+2]) << DSP32_QB) / (S64) real; 00087 vect1[n+3] = (((S64) vect2[n+3]) << DSP32_QB) / (S64) real; 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 realdiv_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], real); 00092 }
32-bit fixed point version of the vector multiplication with a real number.
vect1 | A pointer on the 32-bit real vector that will recieved the result of the operation. | |
vect2 | A pointer on the 32-bit real vector that will be multiplied with the real number. | |
size | The size of the buffers. | |
real | The real number to be multiplied with the vector (vect2). |
Definition at line 71 of file vect_dsp32_realmul.c.
References DSP32_QB.
00072 { 00073 typedef void (*realmul_kernel_opti_t)(dsp32_t *, dsp32_t *, dsp32_t); 00074 static const realmul_kernel_opti_t realmul_end_kernel_opti[4] = { 00075 dsp32_vect_realmul_kernel_x0, 00076 dsp32_vect_realmul_kernel_x1, 00077 dsp32_vect_realmul_kernel_x2, 00078 dsp32_vect_realmul_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 vect1[n] = ((S64) vect2[n] * (S64) real) >> DSP32_QB; 00085 vect1[n+1] = ((S64) vect2[n+1] * (S64) real) >> DSP32_QB; 00086 vect1[n+2] = ((S64) vect2[n+2] * (S64) real) >> DSP32_QB; 00087 vect1[n+3] = ((S64) vect2[n+3] * (S64) real) >> DSP32_QB; 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 realmul_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], real); 00092 }
32-bit fixed point version of the vector subtraction with a real number.
vect1 | A pointer on the 32-bit real vector that will recieved the result of the operation. | |
vect2 | A pointer on the 32-bit real vector that will be subtracted with the real number. | |
size | The size of the buffers. | |
real | The real number to be subtracted with the vector (vect2). |
Definition at line 71 of file vect_dsp32_realsub.c.
References DSP32_REALSUBTRACTION.
00072 { 00073 typedef void (*realsub_kernel_opti_t)(dsp32_t *, dsp32_t *, dsp32_t); 00074 static const realsub_kernel_opti_t realsub_end_kernel_opti[4] = { 00075 dsp32_vect_realsub_kernel_x0, 00076 dsp32_vect_realsub_kernel_x1, 00077 dsp32_vect_realsub_kernel_x2, 00078 dsp32_vect_realsub_kernel_x3 00079 }; 00080 int n; 00081 00082 for(n=0; n<size-3; n+=4) 00083 { 00084 DSP32_REALSUBTRACTION(n, ""); 00085 DSP32_REALSUBTRACTION(n+1, ""); 00086 DSP32_REALSUBTRACTION(n+2, ""); 00087 DSP32_REALSUBTRACTION(n+3, ""); 00088 } 00089 00090 // Jump on different functions depending on the length of the vectors to compute 00091 realsub_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], real); 00092 }
32-bit fixed point version of the vector subtraction function.
vect1 | A pointer on the 32-bit real vector that will recieved the result of the subtraction. | |
vect2 | A pointer on the 32-bit real vector that will be subtracted with the other input vector (vect3). | |
vect3 | A pointer on the 32-bit real vector that will be subtracted with the other input vector (vect2). | |
size | The size of the input buffers. |
Definition at line 73 of file vect_dsp32_sub.c.
00074 { 00075 typedef void (*sub_kernel_opti_t)(dsp32_t *, dsp32_t *, dsp32_t *); 00076 static const sub_kernel_opti_t sub_end_kernel_opti[4] = { 00077 dsp32_vect_sub_kernel_x0, 00078 dsp32_vect_sub_kernel_x1, 00079 dsp32_vect_sub_kernel_x2, 00080 dsp32_vect_sub_kernel_x3 00081 }; 00082 int n; 00083 00084 for(n=0; n<size-3; n+=4) 00085 { 00086 vect1[n] = vect2[n] - vect3[n]; 00087 vect1[n+1] = vect2[n+1] - vect3[n+1]; 00088 vect1[n+2] = vect2[n+2] - vect3[n+2]; 00089 vect1[n+3] = vect2[n+3] - vect3[n+3]; 00090 } 00091 00092 // Jump on different functions depending on the length of the vectors to compute 00093 sub_end_kernel_opti[size&0x3](&vect1[n], &vect2[n], &vect3[n]); 00094 }
static void dsp32_vect_zeropad | ( | dsp32_t * | vect1, | |
int | size, | |||
int | num_zero | |||
) | [inline, static] |
32-bit fixed point version of the zero padding function.
vect1 | A pointer on the 32 bits real vector that has to be padded with zeros. | |
size | The size of this vector. | |
num_zero | The number of zeros to pad at the end of the vector. |
Definition at line 562 of file dsp_vectors.h.
Referenced by dsp32_gen_dirac(), and dsp32_vect_conv().