没用过这个,找到一些关于blackfin对cfir的介绍,看是否有用:
void cfir_fr16(const complex_fract16 input[],
complex_fract16 output[],
cfir_state_fr16 *filter_state);
int k; /* Number of coefficients */
complex_fract16 *h; /* Filter coefficients */
complex_fract16 *d; /* Start of delay line */
complex_fract16 *p; /* Read/write pointer */
The characteristics of the filter (passband, stopband, and so on) depend upon the number of complex filter coefficients and their values. A pointer to the coefficients should be stored in filter_state->h, and filter_state->k should be set to the number of coefficients. The function assumes that the coefficients are stored in the normal order, thus filter_state->h[0] contains the first filter coefficient and filter_state->h[k-1] contains the last coefficient.
Each filter should have its own delay line, which is a vector of type complex_fract16 and whose length is equal to the number of coefficients. The vector should be cleared to zero before calling the function for the first time and should not otherwise be modified by the user program. The structure member filter_state->d should be set to the start of the delay line, and the function uses filter_state->p to keep track of its current position within the vector.
where: x = input
y = output
h = array of coefficients
k = number of coefficients
i = {0, 1, ..., length-1}