1 /* ======================================================================= */
2 /* DSPF_sp_iir.h -- IIR Filter */
3 /* Optimized C Implementation (w/ Intrinsics) */
4 /* */
5 /* Rev 0.0.1 */
6 /* */
7 /* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ */
8 /* */
9 /* */
10 /* Redistribution and use in source and binary forms, with or without */
11 /* modification, are permitted provided that the following conditions */
12 /* are met: */
13 /* */
14 /* Redistributions of source code must retain the above copyright */
15 /* notice, this list of conditions and the following disclaimer. */
16 /* */
17 /* Redistributions in binary form must reproduce the above copyright */
18 /* notice, this list of conditions and the following disclaimer in the */
19 /* documentation and/or other materials provided with the */
20 /* distribution. */
21 /* */
22 /* Neither the name of Texas Instruments Incorporated nor the names of */
23 /* its contributors may be used to endorse or promote products derived */
24 /* from this software without specific prior written permission. */
25 /* */
26 /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
27 /* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
28 /* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
29 /* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
30 /* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
31 /* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
32 /* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
33 /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
34 /* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
35 /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
36 /* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
37 /* */
38 /* ======================================================================= */
40 #ifndef DSPF_SP_IIR_H_
41 #define DSPF_SP_IIR_H_
43 /** @ingroup FILTCONV */
44 /* @{ */
46 /** @defgroup DSPF_sp_iir */
47 /** @ingroup DSPF_sp_iir */
48 /* @{ */
50 /**
51 * The IIR performs an auto-regressive moving-average (ARMA) filter with 4
52 * auto-regressive filter coefficients and 5 moving-average filter coefficients
53 * for nr output samples. The output vector is stored in two locations. This
54 * routine is used as a high pass filter in the VSELP vocoder. The 4 values
55 * in the r1 vector store the initial values of the delays.
56 *
57 * @param y1[nr+4] Delay element values (i/p and o/p).
58 * @param x[nr] Pointer to the input array.
59 * @param y2[nr+4] Pointer to the output array.
60 * @param hb[5] Auto-regressive filter coefficients.
61 * @param ha[5] Moving average filter coefficients.
62 * @param nr Number of output samples.
63 *
64 * @par Algorithm:
65 * DSPF_sp_iir_cn.c is the natural C equivalent of the optimized
66 * linear assembly code without restrictions. Note that the linear
67 * assembly code is optimized and restrictions may apply.
68 *
69 * @par Assumptions:
71 * Extraneous loads are allowed in the program. <BR>
72 *
73 * @par Implementation Notes:
74 * @b Interruptibility: The code is interruptible.
75 * @b Endian Support: The code supports both big and little endian modes.
76 *
77 */
79 void DSPF_sp_iir (float* restrict y1,
80 const float* x,
81 float* restrict y2,
82 const float* hb,
83 const float* ha,
84 int nr);
86 void DSPF_sp_iir_opt (float *restrict y1,
87 const float * x,
88 float *restrict y2,
89 const float * hb,
90 const float * ha,
91 int nr);
93 #endif /* DSPF_SP_IIR_H_ */
95 /* ======================================================================= */
96 /* End of file: DSPF_sp_iir.h */
97 /* ----------------------------------------------------------------------- */
98 /* Copyright (c) 2011 Texas Instruments, Incorporated. */
99 /* All Rights Reserved. */
100 /* ======================================================================= */