b luo / mbed-dev

Fork of mbed-dev by mbed official

Committer:
<>
Date:
Fri Sep 02 15:07:44 2016 +0100
Revision:
144:ef7eb2e8f9f7
Parent:
0:9b334a45a8ff
This updates the lib to the mbed lib v125

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 144:ef7eb2e8f9f7 1 /* ----------------------------------------------------------------------
<> 144:ef7eb2e8f9f7 2 * Copyright (C) 2010-2013 ARM Limited. All rights reserved.
<> 144:ef7eb2e8f9f7 3 *
<> 144:ef7eb2e8f9f7 4 * $Date: 17. January 2013
<> 144:ef7eb2e8f9f7 5 * $Revision: V1.4.1
<> 144:ef7eb2e8f9f7 6 *
<> 144:ef7eb2e8f9f7 7 * Project: CMSIS DSP Library
<> 144:ef7eb2e8f9f7 8 * Title: arm_math.h
<> 144:ef7eb2e8f9f7 9 *
<> 144:ef7eb2e8f9f7 10 * Description: Public header file for CMSIS DSP Library
<> 144:ef7eb2e8f9f7 11 *
<> 144:ef7eb2e8f9f7 12 * Target Processor: Cortex-M4/Cortex-M3/Cortex-M0
<> 144:ef7eb2e8f9f7 13 *
<> 144:ef7eb2e8f9f7 14 * Redistribution and use in source and binary forms, with or without
<> 144:ef7eb2e8f9f7 15 * modification, are permitted provided that the following conditions
<> 144:ef7eb2e8f9f7 16 * are met:
<> 144:ef7eb2e8f9f7 17 * - Redistributions of source code must retain the above copyright
<> 144:ef7eb2e8f9f7 18 * notice, this list of conditions and the following disclaimer.
<> 144:ef7eb2e8f9f7 19 * - Redistributions in binary form must reproduce the above copyright
<> 144:ef7eb2e8f9f7 20 * notice, this list of conditions and the following disclaimer in
<> 144:ef7eb2e8f9f7 21 * the documentation and/or other materials provided with the
<> 144:ef7eb2e8f9f7 22 * distribution.
<> 144:ef7eb2e8f9f7 23 * - Neither the name of ARM LIMITED nor the names of its contributors
<> 144:ef7eb2e8f9f7 24 * may be used to endorse or promote products derived from this
<> 144:ef7eb2e8f9f7 25 * software without specific prior written permission.
<> 144:ef7eb2e8f9f7 26 *
<> 144:ef7eb2e8f9f7 27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
<> 144:ef7eb2e8f9f7 28 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
<> 144:ef7eb2e8f9f7 29 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
<> 144:ef7eb2e8f9f7 30 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
<> 144:ef7eb2e8f9f7 31 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
<> 144:ef7eb2e8f9f7 32 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
<> 144:ef7eb2e8f9f7 33 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
<> 144:ef7eb2e8f9f7 34 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
<> 144:ef7eb2e8f9f7 35 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
<> 144:ef7eb2e8f9f7 36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
<> 144:ef7eb2e8f9f7 37 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
<> 144:ef7eb2e8f9f7 38 * POSSIBILITY OF SUCH DAMAGE.
<> 144:ef7eb2e8f9f7 39 * -------------------------------------------------------------------- */
<> 144:ef7eb2e8f9f7 40
<> 144:ef7eb2e8f9f7 41 /**
<> 144:ef7eb2e8f9f7 42 \mainpage CMSIS DSP Software Library
<> 144:ef7eb2e8f9f7 43 *
<> 144:ef7eb2e8f9f7 44 * <b>Introduction</b>
<> 144:ef7eb2e8f9f7 45 *
<> 144:ef7eb2e8f9f7 46 * This user manual describes the CMSIS DSP software library,
<> 144:ef7eb2e8f9f7 47 * a suite of common signal processing functions for use on Cortex-M processor based devices.
<> 144:ef7eb2e8f9f7 48 *
<> 144:ef7eb2e8f9f7 49 * The library is divided into a number of functions each covering a specific category:
<> 144:ef7eb2e8f9f7 50 * - Basic math functions
<> 144:ef7eb2e8f9f7 51 * - Fast math functions
<> 144:ef7eb2e8f9f7 52 * - Complex math functions
<> 144:ef7eb2e8f9f7 53 * - Filters
<> 144:ef7eb2e8f9f7 54 * - Matrix functions
<> 144:ef7eb2e8f9f7 55 * - Transforms
<> 144:ef7eb2e8f9f7 56 * - Motor control functions
<> 144:ef7eb2e8f9f7 57 * - Statistical functions
<> 144:ef7eb2e8f9f7 58 * - Support functions
<> 144:ef7eb2e8f9f7 59 * - Interpolation functions
<> 144:ef7eb2e8f9f7 60 *
<> 144:ef7eb2e8f9f7 61 * The library has separate functions for operating on 8-bit integers, 16-bit integers,
<> 144:ef7eb2e8f9f7 62 * 32-bit integer and 32-bit floating-point values.
<> 144:ef7eb2e8f9f7 63 *
<> 144:ef7eb2e8f9f7 64 * <b>Using the Library</b>
<> 144:ef7eb2e8f9f7 65 *
<> 144:ef7eb2e8f9f7 66 * The library installer contains prebuilt versions of the libraries in the <code>Lib</code> folder.
<> 144:ef7eb2e8f9f7 67 * - arm_cortexM4lf_math.lib (Little endian and Floating Point Unit on Cortex-M4)
<> 144:ef7eb2e8f9f7 68 * - arm_cortexM4bf_math.lib (Big endian and Floating Point Unit on Cortex-M4)
<> 144:ef7eb2e8f9f7 69 * - arm_cortexM4l_math.lib (Little endian on Cortex-M4)
<> 144:ef7eb2e8f9f7 70 * - arm_cortexM4b_math.lib (Big endian on Cortex-M4)
<> 144:ef7eb2e8f9f7 71 * - arm_cortexM3l_math.lib (Little endian on Cortex-M3)
<> 144:ef7eb2e8f9f7 72 * - arm_cortexM3b_math.lib (Big endian on Cortex-M3)
<> 144:ef7eb2e8f9f7 73 * - arm_cortexM0l_math.lib (Little endian on Cortex-M0)
<> 144:ef7eb2e8f9f7 74 * - arm_cortexM0b_math.lib (Big endian on Cortex-M3)
<> 144:ef7eb2e8f9f7 75 *
<> 144:ef7eb2e8f9f7 76 * The library functions are declared in the public file <code>arm_math.h</code> which is placed in the <code>Include</code> folder.
<> 144:ef7eb2e8f9f7 77 * Simply include this file and link the appropriate library in the application and begin calling the library functions. The Library supports single
<> 144:ef7eb2e8f9f7 78 * public header file <code> arm_math.h</code> for Cortex-M4/M3/M0 with little endian and big endian. Same header file will be used for floating point unit(FPU) variants.
<> 144:ef7eb2e8f9f7 79 * Define the appropriate pre processor MACRO ARM_MATH_CM4 or ARM_MATH_CM3 or
<> 144:ef7eb2e8f9f7 80 * ARM_MATH_CM0 or ARM_MATH_CM0PLUS depending on the target processor in the application.
<> 144:ef7eb2e8f9f7 81 *
<> 144:ef7eb2e8f9f7 82 * <b>Examples</b>
<> 144:ef7eb2e8f9f7 83 *
<> 144:ef7eb2e8f9f7 84 * The library ships with a number of examples which demonstrate how to use the library functions.
<> 144:ef7eb2e8f9f7 85 *
<> 144:ef7eb2e8f9f7 86 * <b>Toolchain Support</b>
<> 144:ef7eb2e8f9f7 87 *
<> 144:ef7eb2e8f9f7 88 * The library has been developed and tested with MDK-ARM version 4.60.
<> 144:ef7eb2e8f9f7 89 * The library is being tested in GCC and IAR toolchains and updates on this activity will be made available shortly.
<> 144:ef7eb2e8f9f7 90 *
<> 144:ef7eb2e8f9f7 91 * <b>Building the Library</b>
<> 144:ef7eb2e8f9f7 92 *
<> 144:ef7eb2e8f9f7 93 * The library installer contains project files to re build libraries on MDK Tool chain in the <code>CMSIS\\DSP_Lib\\Source\\ARM</code> folder.
<> 144:ef7eb2e8f9f7 94 * - arm_cortexM0b_math.uvproj
<> 144:ef7eb2e8f9f7 95 * - arm_cortexM0l_math.uvproj
<> 144:ef7eb2e8f9f7 96 * - arm_cortexM3b_math.uvproj
<> 144:ef7eb2e8f9f7 97 * - arm_cortexM3l_math.uvproj
<> 144:ef7eb2e8f9f7 98 * - arm_cortexM4b_math.uvproj
<> 144:ef7eb2e8f9f7 99 * - arm_cortexM4l_math.uvproj
<> 144:ef7eb2e8f9f7 100 * - arm_cortexM4bf_math.uvproj
<> 144:ef7eb2e8f9f7 101 * - arm_cortexM4lf_math.uvproj
<> 144:ef7eb2e8f9f7 102 *
<> 144:ef7eb2e8f9f7 103 *
<> 144:ef7eb2e8f9f7 104 * The project can be built by opening the appropriate project in MDK-ARM 4.60 chain and defining the optional pre processor MACROs detailed above.
<> 144:ef7eb2e8f9f7 105 *
<> 144:ef7eb2e8f9f7 106 * <b>Pre-processor Macros</b>
<> 144:ef7eb2e8f9f7 107 *
<> 144:ef7eb2e8f9f7 108 * Each library project have differant pre-processor macros.
<> 144:ef7eb2e8f9f7 109 *
<> 144:ef7eb2e8f9f7 110 * - UNALIGNED_SUPPORT_DISABLE:
<> 144:ef7eb2e8f9f7 111 *
<> 144:ef7eb2e8f9f7 112 * Define macro UNALIGNED_SUPPORT_DISABLE, If the silicon does not support unaligned memory access
<> 144:ef7eb2e8f9f7 113 *
<> 144:ef7eb2e8f9f7 114 * - ARM_MATH_BIG_ENDIAN:
<> 144:ef7eb2e8f9f7 115 *
<> 144:ef7eb2e8f9f7 116 * Define macro ARM_MATH_BIG_ENDIAN to build the library for big endian targets. By default library builds for little endian targets.
<> 144:ef7eb2e8f9f7 117 *
<> 144:ef7eb2e8f9f7 118 * - ARM_MATH_MATRIX_CHECK:
<> 144:ef7eb2e8f9f7 119 *
<> 144:ef7eb2e8f9f7 120 * Define macro ARM_MATH_MATRIX_CHECK for checking on the input and output sizes of matrices
<> 144:ef7eb2e8f9f7 121 *
<> 144:ef7eb2e8f9f7 122 * - ARM_MATH_ROUNDING:
<> 144:ef7eb2e8f9f7 123 *
<> 144:ef7eb2e8f9f7 124 * Define macro ARM_MATH_ROUNDING for rounding on support functions
<> 144:ef7eb2e8f9f7 125 *
<> 144:ef7eb2e8f9f7 126 * - ARM_MATH_CMx:
<> 144:ef7eb2e8f9f7 127 *
<> 144:ef7eb2e8f9f7 128 * Define macro ARM_MATH_CM4 for building the library on Cortex-M4 target, ARM_MATH_CM3 for building library on Cortex-M3 target
<> 144:ef7eb2e8f9f7 129 * and ARM_MATH_CM0 for building library on cortex-M0 target, ARM_MATH_CM0PLUS for building library on cortex-M0+ target.
<> 144:ef7eb2e8f9f7 130 *
<> 144:ef7eb2e8f9f7 131 * - __FPU_PRESENT:
<> 144:ef7eb2e8f9f7 132 *
<> 144:ef7eb2e8f9f7 133 * Initialize macro __FPU_PRESENT = 1 when building on FPU supported Targets. Enable this macro for M4bf and M4lf libraries
<> 144:ef7eb2e8f9f7 134 *
<> 144:ef7eb2e8f9f7 135 * <b>Copyright Notice</b>
<> 144:ef7eb2e8f9f7 136 *
<> 144:ef7eb2e8f9f7 137 * Copyright (C) 2010-2013 ARM Limited. All rights reserved.
<> 144:ef7eb2e8f9f7 138 */
<> 144:ef7eb2e8f9f7 139
<> 144:ef7eb2e8f9f7 140
<> 144:ef7eb2e8f9f7 141 /**
<> 144:ef7eb2e8f9f7 142 * @defgroup groupMath Basic Math Functions
<> 144:ef7eb2e8f9f7 143 */
<> 144:ef7eb2e8f9f7 144
<> 144:ef7eb2e8f9f7 145 /**
<> 144:ef7eb2e8f9f7 146 * @defgroup groupFastMath Fast Math Functions
<> 144:ef7eb2e8f9f7 147 * This set of functions provides a fast approximation to sine, cosine, and square root.
<> 144:ef7eb2e8f9f7 148 * As compared to most of the other functions in the CMSIS math library, the fast math functions
<> 144:ef7eb2e8f9f7 149 * operate on individual values and not arrays.
<> 144:ef7eb2e8f9f7 150 * There are separate functions for Q15, Q31, and floating-point data.
<> 144:ef7eb2e8f9f7 151 *
<> 144:ef7eb2e8f9f7 152 */
<> 144:ef7eb2e8f9f7 153
<> 144:ef7eb2e8f9f7 154 /**
<> 144:ef7eb2e8f9f7 155 * @defgroup groupCmplxMath Complex Math Functions
<> 144:ef7eb2e8f9f7 156 * This set of functions operates on complex data vectors.
<> 144:ef7eb2e8f9f7 157 * The data in the complex arrays is stored in an interleaved fashion
<> 144:ef7eb2e8f9f7 158 * (real, imag, real, imag, ...).
<> 144:ef7eb2e8f9f7 159 * In the API functions, the number of samples in a complex array refers
<> 144:ef7eb2e8f9f7 160 * to the number of complex values; the array contains twice this number of
<> 144:ef7eb2e8f9f7 161 * real values.
<> 144:ef7eb2e8f9f7 162 */
<> 144:ef7eb2e8f9f7 163
<> 144:ef7eb2e8f9f7 164 /**
<> 144:ef7eb2e8f9f7 165 * @defgroup groupFilters Filtering Functions
<> 144:ef7eb2e8f9f7 166 */
<> 144:ef7eb2e8f9f7 167
<> 144:ef7eb2e8f9f7 168 /**
<> 144:ef7eb2e8f9f7 169 * @defgroup groupMatrix Matrix Functions
<> 144:ef7eb2e8f9f7 170 *
<> 144:ef7eb2e8f9f7 171 * This set of functions provides basic matrix math operations.
<> 144:ef7eb2e8f9f7 172 * The functions operate on matrix data structures. For example,
<> 144:ef7eb2e8f9f7 173 * the type
<> 144:ef7eb2e8f9f7 174 * definition for the floating-point matrix structure is shown
<> 144:ef7eb2e8f9f7 175 * below:
<> 144:ef7eb2e8f9f7 176 * <pre>
<> 144:ef7eb2e8f9f7 177 * typedef struct
<> 144:ef7eb2e8f9f7 178 * {
<> 144:ef7eb2e8f9f7 179 * uint16_t numRows; // number of rows of the matrix.
<> 144:ef7eb2e8f9f7 180 * uint16_t numCols; // number of columns of the matrix.
<> 144:ef7eb2e8f9f7 181 * float32_t *pData; // points to the data of the matrix.
<> 144:ef7eb2e8f9f7 182 * } arm_matrix_instance_f32;
<> 144:ef7eb2e8f9f7 183 * </pre>
<> 144:ef7eb2e8f9f7 184 * There are similar definitions for Q15 and Q31 data types.
<> 144:ef7eb2e8f9f7 185 *
<> 144:ef7eb2e8f9f7 186 * The structure specifies the size of the matrix and then points to
<> 144:ef7eb2e8f9f7 187 * an array of data. The array is of size <code>numRows X numCols</code>
<> 144:ef7eb2e8f9f7 188 * and the values are arranged in row order. That is, the
<> 144:ef7eb2e8f9f7 189 * matrix element (i, j) is stored at:
<> 144:ef7eb2e8f9f7 190 * <pre>
<> 144:ef7eb2e8f9f7 191 * pData[i*numCols + j]
<> 144:ef7eb2e8f9f7 192 * </pre>
<> 144:ef7eb2e8f9f7 193 *
<> 144:ef7eb2e8f9f7 194 * \par Init Functions
<> 144:ef7eb2e8f9f7 195 * There is an associated initialization function for each type of matrix
<> 144:ef7eb2e8f9f7 196 * data structure.
<> 144:ef7eb2e8f9f7 197 * The initialization function sets the values of the internal structure fields.
<> 144:ef7eb2e8f9f7 198 * Refer to the function <code>arm_mat_init_f32()</code>, <code>arm_mat_init_q31()</code>
<> 144:ef7eb2e8f9f7 199 * and <code>arm_mat_init_q15()</code> for floating-point, Q31 and Q15 types, respectively.
<> 144:ef7eb2e8f9f7 200 *
<> 144:ef7eb2e8f9f7 201 * \par
<> 144:ef7eb2e8f9f7 202 * Use of the initialization function is optional. However, if initialization function is used
<> 144:ef7eb2e8f9f7 203 * then the instance structure cannot be placed into a const data section.
<> 144:ef7eb2e8f9f7 204 * To place the instance structure in a const data
<> 144:ef7eb2e8f9f7 205 * section, manually initialize the data structure. For example:
<> 144:ef7eb2e8f9f7 206 * <pre>
<> 144:ef7eb2e8f9f7 207 * <code>arm_matrix_instance_f32 S = {nRows, nColumns, pData};</code>
<> 144:ef7eb2e8f9f7 208 * <code>arm_matrix_instance_q31 S = {nRows, nColumns, pData};</code>
<> 144:ef7eb2e8f9f7 209 * <code>arm_matrix_instance_q15 S = {nRows, nColumns, pData};</code>
<> 144:ef7eb2e8f9f7 210 * </pre>
<> 144:ef7eb2e8f9f7 211 * where <code>nRows</code> specifies the number of rows, <code>nColumns</code>
<> 144:ef7eb2e8f9f7 212 * specifies the number of columns, and <code>pData</code> points to the
<> 144:ef7eb2e8f9f7 213 * data array.
<> 144:ef7eb2e8f9f7 214 *
<> 144:ef7eb2e8f9f7 215 * \par Size Checking
<> 144:ef7eb2e8f9f7 216 * By default all of the matrix functions perform size checking on the input and
<> 144:ef7eb2e8f9f7 217 * output matrices. For example, the matrix addition function verifies that the
<> 144:ef7eb2e8f9f7 218 * two input matrices and the output matrix all have the same number of rows and
<> 144:ef7eb2e8f9f7 219 * columns. If the size check fails the functions return:
<> 144:ef7eb2e8f9f7 220 * <pre>
<> 144:ef7eb2e8f9f7 221 * ARM_MATH_SIZE_MISMATCH
<> 144:ef7eb2e8f9f7 222 * </pre>
<> 144:ef7eb2e8f9f7 223 * Otherwise the functions return
<> 144:ef7eb2e8f9f7 224 * <pre>
<> 144:ef7eb2e8f9f7 225 * ARM_MATH_SUCCESS
<> 144:ef7eb2e8f9f7 226 * </pre>
<> 144:ef7eb2e8f9f7 227 * There is some overhead associated with this matrix size checking.
<> 144:ef7eb2e8f9f7 228 * The matrix size checking is enabled via the \#define
<> 144:ef7eb2e8f9f7 229 * <pre>
<> 144:ef7eb2e8f9f7 230 * ARM_MATH_MATRIX_CHECK
<> 144:ef7eb2e8f9f7 231 * </pre>
<> 144:ef7eb2e8f9f7 232 * within the library project settings. By default this macro is defined
<> 144:ef7eb2e8f9f7 233 * and size checking is enabled. By changing the project settings and
<> 144:ef7eb2e8f9f7 234 * undefining this macro size checking is eliminated and the functions
<> 144:ef7eb2e8f9f7 235 * run a bit faster. With size checking disabled the functions always
<> 144:ef7eb2e8f9f7 236 * return <code>ARM_MATH_SUCCESS</code>.
<> 144:ef7eb2e8f9f7 237 */
<> 144:ef7eb2e8f9f7 238
<> 144:ef7eb2e8f9f7 239 /**
<> 144:ef7eb2e8f9f7 240 * @defgroup groupTransforms Transform Functions
<> 144:ef7eb2e8f9f7 241 */
<> 144:ef7eb2e8f9f7 242
<> 144:ef7eb2e8f9f7 243 /**
<> 144:ef7eb2e8f9f7 244 * @defgroup groupController Controller Functions
<> 144:ef7eb2e8f9f7 245 */
<> 144:ef7eb2e8f9f7 246
<> 144:ef7eb2e8f9f7 247 /**
<> 144:ef7eb2e8f9f7 248 * @defgroup groupStats Statistics Functions
<> 144:ef7eb2e8f9f7 249 */
<> 144:ef7eb2e8f9f7 250 /**
<> 144:ef7eb2e8f9f7 251 * @defgroup groupSupport Support Functions
<> 144:ef7eb2e8f9f7 252 */
<> 144:ef7eb2e8f9f7 253
<> 144:ef7eb2e8f9f7 254 /**
<> 144:ef7eb2e8f9f7 255 * @defgroup groupInterpolation Interpolation Functions
<> 144:ef7eb2e8f9f7 256 * These functions perform 1- and 2-dimensional interpolation of data.
<> 144:ef7eb2e8f9f7 257 * Linear interpolation is used for 1-dimensional data and
<> 144:ef7eb2e8f9f7 258 * bilinear interpolation is used for 2-dimensional data.
<> 144:ef7eb2e8f9f7 259 */
<> 144:ef7eb2e8f9f7 260
<> 144:ef7eb2e8f9f7 261 /**
<> 144:ef7eb2e8f9f7 262 * @defgroup groupExamples Examples
<> 144:ef7eb2e8f9f7 263 */
<> 144:ef7eb2e8f9f7 264 #ifndef _ARM_MATH_H
<> 144:ef7eb2e8f9f7 265 #define _ARM_MATH_H
<> 144:ef7eb2e8f9f7 266
<> 144:ef7eb2e8f9f7 267 #define __CMSIS_GENERIC /* disable NVIC and Systick functions */
<> 144:ef7eb2e8f9f7 268
<> 144:ef7eb2e8f9f7 269 #if defined (ARM_MATH_CM4)
<> 144:ef7eb2e8f9f7 270 #include "core_cm4.h"
<> 144:ef7eb2e8f9f7 271 #elif defined (ARM_MATH_CM3)
<> 144:ef7eb2e8f9f7 272 #include "core_cm3.h"
<> 144:ef7eb2e8f9f7 273 #elif defined (ARM_MATH_CM0)
<> 144:ef7eb2e8f9f7 274 #include "core_cm0.h"
<> 144:ef7eb2e8f9f7 275 #define ARM_MATH_CM0_FAMILY
<> 144:ef7eb2e8f9f7 276 #elif defined (ARM_MATH_CM0PLUS)
<> 144:ef7eb2e8f9f7 277 #include "core_cm0plus.h"
<> 144:ef7eb2e8f9f7 278 #define ARM_MATH_CM0_FAMILY
<> 144:ef7eb2e8f9f7 279 #else
<> 144:ef7eb2e8f9f7 280 #include "ARMCM4.h"
<> 144:ef7eb2e8f9f7 281 #warning "Define either ARM_MATH_CM4 OR ARM_MATH_CM3...By Default building on ARM_MATH_CM4....."
<> 144:ef7eb2e8f9f7 282 #endif
<> 144:ef7eb2e8f9f7 283
<> 144:ef7eb2e8f9f7 284 #undef __CMSIS_GENERIC /* enable NVIC and Systick functions */
<> 144:ef7eb2e8f9f7 285 #include "string.h"
<> 144:ef7eb2e8f9f7 286 #include "math.h"
<> 144:ef7eb2e8f9f7 287 #ifdef __cplusplus
<> 144:ef7eb2e8f9f7 288 extern "C"
<> 144:ef7eb2e8f9f7 289 {
<> 144:ef7eb2e8f9f7 290 #endif
<> 144:ef7eb2e8f9f7 291
<> 144:ef7eb2e8f9f7 292
<> 144:ef7eb2e8f9f7 293 /**
<> 144:ef7eb2e8f9f7 294 * @brief Macros required for reciprocal calculation in Normalized LMS
<> 144:ef7eb2e8f9f7 295 */
<> 144:ef7eb2e8f9f7 296
<> 144:ef7eb2e8f9f7 297 #define DELTA_Q31 (0x100)
<> 144:ef7eb2e8f9f7 298 #define DELTA_Q15 0x5
<> 144:ef7eb2e8f9f7 299 #define INDEX_MASK 0x0000003F
<> 144:ef7eb2e8f9f7 300 #ifndef PI
<> 144:ef7eb2e8f9f7 301 #define PI 3.14159265358979f
<> 144:ef7eb2e8f9f7 302 #endif
<> 144:ef7eb2e8f9f7 303
<> 144:ef7eb2e8f9f7 304 /**
<> 144:ef7eb2e8f9f7 305 * @brief Macros required for SINE and COSINE Fast math approximations
<> 144:ef7eb2e8f9f7 306 */
<> 144:ef7eb2e8f9f7 307
<> 144:ef7eb2e8f9f7 308 #define TABLE_SIZE 256
<> 144:ef7eb2e8f9f7 309 #define TABLE_SPACING_Q31 0x800000
<> 144:ef7eb2e8f9f7 310 #define TABLE_SPACING_Q15 0x80
<> 144:ef7eb2e8f9f7 311
<> 144:ef7eb2e8f9f7 312 /**
<> 144:ef7eb2e8f9f7 313 * @brief Macros required for SINE and COSINE Controller functions
<> 144:ef7eb2e8f9f7 314 */
<> 144:ef7eb2e8f9f7 315 /* 1.31(q31) Fixed value of 2/360 */
<> 144:ef7eb2e8f9f7 316 /* -1 to +1 is divided into 360 values so total spacing is (2/360) */
<> 144:ef7eb2e8f9f7 317 #define INPUT_SPACING 0xB60B61
<> 144:ef7eb2e8f9f7 318
<> 144:ef7eb2e8f9f7 319 /**
<> 144:ef7eb2e8f9f7 320 * @brief Macro for Unaligned Support
<> 144:ef7eb2e8f9f7 321 */
<> 144:ef7eb2e8f9f7 322 #ifndef UNALIGNED_SUPPORT_DISABLE
<> 144:ef7eb2e8f9f7 323 #define ALIGN4
<> 144:ef7eb2e8f9f7 324 #else
<> 144:ef7eb2e8f9f7 325 #if defined (__GNUC__)
<> 144:ef7eb2e8f9f7 326 #define ALIGN4 __attribute__((aligned(4)))
<> 144:ef7eb2e8f9f7 327 #else
<> 144:ef7eb2e8f9f7 328 #define ALIGN4 __align(4)
<> 144:ef7eb2e8f9f7 329 #endif
<> 144:ef7eb2e8f9f7 330 #endif /* #ifndef UNALIGNED_SUPPORT_DISABLE */
<> 144:ef7eb2e8f9f7 331
<> 144:ef7eb2e8f9f7 332 /**
<> 144:ef7eb2e8f9f7 333 * @brief Error status returned by some functions in the library.
<> 144:ef7eb2e8f9f7 334 */
<> 144:ef7eb2e8f9f7 335
<> 144:ef7eb2e8f9f7 336 typedef enum
<> 144:ef7eb2e8f9f7 337 {
<> 144:ef7eb2e8f9f7 338 ARM_MATH_SUCCESS = 0, /**< No error */
<> 144:ef7eb2e8f9f7 339 ARM_MATH_ARGUMENT_ERROR = -1, /**< One or more arguments are incorrect */
<> 144:ef7eb2e8f9f7 340 ARM_MATH_LENGTH_ERROR = -2, /**< Length of data buffer is incorrect */
<> 144:ef7eb2e8f9f7 341 ARM_MATH_SIZE_MISMATCH = -3, /**< Size of matrices is not compatible with the operation. */
<> 144:ef7eb2e8f9f7 342 ARM_MATH_NANINF = -4, /**< Not-a-number (NaN) or infinity is generated */
<> 144:ef7eb2e8f9f7 343 ARM_MATH_SINGULAR = -5, /**< Generated by matrix inversion if the input matrix is singular and cannot be inverted. */
<> 144:ef7eb2e8f9f7 344 ARM_MATH_TEST_FAILURE = -6 /**< Test Failed */
<> 144:ef7eb2e8f9f7 345 } arm_status;
<> 144:ef7eb2e8f9f7 346
<> 144:ef7eb2e8f9f7 347 /**
<> 144:ef7eb2e8f9f7 348 * @brief 8-bit fractional data type in 1.7 format.
<> 144:ef7eb2e8f9f7 349 */
<> 144:ef7eb2e8f9f7 350 typedef int8_t q7_t;
<> 144:ef7eb2e8f9f7 351
<> 144:ef7eb2e8f9f7 352 /**
<> 144:ef7eb2e8f9f7 353 * @brief 16-bit fractional data type in 1.15 format.
<> 144:ef7eb2e8f9f7 354 */
<> 144:ef7eb2e8f9f7 355 typedef int16_t q15_t;
<> 144:ef7eb2e8f9f7 356
<> 144:ef7eb2e8f9f7 357 /**
<> 144:ef7eb2e8f9f7 358 * @brief 32-bit fractional data type in 1.31 format.
<> 144:ef7eb2e8f9f7 359 */
<> 144:ef7eb2e8f9f7 360 typedef int32_t q31_t;
<> 144:ef7eb2e8f9f7 361
<> 144:ef7eb2e8f9f7 362 /**
<> 144:ef7eb2e8f9f7 363 * @brief 64-bit fractional data type in 1.63 format.
<> 144:ef7eb2e8f9f7 364 */
<> 144:ef7eb2e8f9f7 365 typedef int64_t q63_t;
<> 144:ef7eb2e8f9f7 366
<> 144:ef7eb2e8f9f7 367 /**
<> 144:ef7eb2e8f9f7 368 * @brief 32-bit floating-point type definition.
<> 144:ef7eb2e8f9f7 369 */
<> 144:ef7eb2e8f9f7 370 typedef float float32_t;
<> 144:ef7eb2e8f9f7 371
<> 144:ef7eb2e8f9f7 372 /**
<> 144:ef7eb2e8f9f7 373 * @brief 64-bit floating-point type definition.
<> 144:ef7eb2e8f9f7 374 */
<> 144:ef7eb2e8f9f7 375 typedef double float64_t;
<> 144:ef7eb2e8f9f7 376
<> 144:ef7eb2e8f9f7 377 /**
<> 144:ef7eb2e8f9f7 378 * @brief definition to read/write two 16 bit values.
<> 144:ef7eb2e8f9f7 379 */
<> 144:ef7eb2e8f9f7 380 #if defined __CC_ARM
<> 144:ef7eb2e8f9f7 381 #define __SIMD32_TYPE int32_t __packed
<> 144:ef7eb2e8f9f7 382 #define CMSIS_UNUSED __attribute__((unused))
<> 144:ef7eb2e8f9f7 383 #elif defined __ICCARM__
<> 144:ef7eb2e8f9f7 384 #define CMSIS_UNUSED
<> 144:ef7eb2e8f9f7 385 #define __SIMD32_TYPE int32_t __packed
<> 144:ef7eb2e8f9f7 386 #elif defined __GNUC__
<> 144:ef7eb2e8f9f7 387 #define __SIMD32_TYPE int32_t
<> 144:ef7eb2e8f9f7 388 #define CMSIS_UNUSED __attribute__((unused))
<> 144:ef7eb2e8f9f7 389 #else
<> 144:ef7eb2e8f9f7 390 #error Unknown compiler
<> 144:ef7eb2e8f9f7 391 #endif
<> 144:ef7eb2e8f9f7 392
<> 144:ef7eb2e8f9f7 393 #define __SIMD32(addr) (*(__SIMD32_TYPE **) & (addr))
<> 144:ef7eb2e8f9f7 394 #define __SIMD32_CONST(addr) ((__SIMD32_TYPE *)(addr))
<> 144:ef7eb2e8f9f7 395
<> 144:ef7eb2e8f9f7 396 #define _SIMD32_OFFSET(addr) (*(__SIMD32_TYPE *) (addr))
<> 144:ef7eb2e8f9f7 397
<> 144:ef7eb2e8f9f7 398 #define __SIMD64(addr) (*(int64_t **) & (addr))
<> 144:ef7eb2e8f9f7 399
<> 144:ef7eb2e8f9f7 400 #if defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY)
<> 144:ef7eb2e8f9f7 401 /**
<> 144:ef7eb2e8f9f7 402 * @brief definition to pack two 16 bit values.
<> 144:ef7eb2e8f9f7 403 */
<> 144:ef7eb2e8f9f7 404 #define __PKHBT(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0x0000FFFF) | \
<> 144:ef7eb2e8f9f7 405 (((int32_t)(ARG2) << ARG3) & (int32_t)0xFFFF0000) )
<> 144:ef7eb2e8f9f7 406 #define __PKHTB(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0xFFFF0000) | \
<> 144:ef7eb2e8f9f7 407 (((int32_t)(ARG2) >> ARG3) & (int32_t)0x0000FFFF) )
<> 144:ef7eb2e8f9f7 408
<> 144:ef7eb2e8f9f7 409 #endif
<> 144:ef7eb2e8f9f7 410
<> 144:ef7eb2e8f9f7 411
<> 144:ef7eb2e8f9f7 412 /**
<> 144:ef7eb2e8f9f7 413 * @brief definition to pack four 8 bit values.
<> 144:ef7eb2e8f9f7 414 */
<> 144:ef7eb2e8f9f7 415 #ifndef ARM_MATH_BIG_ENDIAN
<> 144:ef7eb2e8f9f7 416
<> 144:ef7eb2e8f9f7 417 #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v0) << 0) & (int32_t)0x000000FF) | \
<> 144:ef7eb2e8f9f7 418 (((int32_t)(v1) << 8) & (int32_t)0x0000FF00) | \
<> 144:ef7eb2e8f9f7 419 (((int32_t)(v2) << 16) & (int32_t)0x00FF0000) | \
<> 144:ef7eb2e8f9f7 420 (((int32_t)(v3) << 24) & (int32_t)0xFF000000) )
<> 144:ef7eb2e8f9f7 421 #else
<> 144:ef7eb2e8f9f7 422
<> 144:ef7eb2e8f9f7 423 #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v3) << 0) & (int32_t)0x000000FF) | \
<> 144:ef7eb2e8f9f7 424 (((int32_t)(v2) << 8) & (int32_t)0x0000FF00) | \
<> 144:ef7eb2e8f9f7 425 (((int32_t)(v1) << 16) & (int32_t)0x00FF0000) | \
<> 144:ef7eb2e8f9f7 426 (((int32_t)(v0) << 24) & (int32_t)0xFF000000) )
<> 144:ef7eb2e8f9f7 427
<> 144:ef7eb2e8f9f7 428 #endif
<> 144:ef7eb2e8f9f7 429
<> 144:ef7eb2e8f9f7 430
<> 144:ef7eb2e8f9f7 431 /**
<> 144:ef7eb2e8f9f7 432 * @brief Clips Q63 to Q31 values.
<> 144:ef7eb2e8f9f7 433 */
<> 144:ef7eb2e8f9f7 434 static __INLINE q31_t clip_q63_to_q31(
<> 144:ef7eb2e8f9f7 435 q63_t x)
<> 144:ef7eb2e8f9f7 436 {
<> 144:ef7eb2e8f9f7 437 return ((q31_t) (x >> 32) != ((q31_t) x >> 31)) ?
<> 144:ef7eb2e8f9f7 438 ((0x7FFFFFFF ^ ((q31_t) (x >> 63)))) : (q31_t) x;
<> 144:ef7eb2e8f9f7 439 }
<> 144:ef7eb2e8f9f7 440
<> 144:ef7eb2e8f9f7 441 /**
<> 144:ef7eb2e8f9f7 442 * @brief Clips Q63 to Q15 values.
<> 144:ef7eb2e8f9f7 443 */
<> 144:ef7eb2e8f9f7 444 static __INLINE q15_t clip_q63_to_q15(
<> 144:ef7eb2e8f9f7 445 q63_t x)
<> 144:ef7eb2e8f9f7 446 {
<> 144:ef7eb2e8f9f7 447 return ((q31_t) (x >> 32) != ((q31_t) x >> 31)) ?
<> 144:ef7eb2e8f9f7 448 ((0x7FFF ^ ((q15_t) (x >> 63)))) : (q15_t) (x >> 15);
<> 144:ef7eb2e8f9f7 449 }
<> 144:ef7eb2e8f9f7 450
<> 144:ef7eb2e8f9f7 451 /**
<> 144:ef7eb2e8f9f7 452 * @brief Clips Q31 to Q7 values.
<> 144:ef7eb2e8f9f7 453 */
<> 144:ef7eb2e8f9f7 454 static __INLINE q7_t clip_q31_to_q7(
<> 144:ef7eb2e8f9f7 455 q31_t x)
<> 144:ef7eb2e8f9f7 456 {
<> 144:ef7eb2e8f9f7 457 return ((q31_t) (x >> 24) != ((q31_t) x >> 23)) ?
<> 144:ef7eb2e8f9f7 458 ((0x7F ^ ((q7_t) (x >> 31)))) : (q7_t) x;
<> 144:ef7eb2e8f9f7 459 }
<> 144:ef7eb2e8f9f7 460
<> 144:ef7eb2e8f9f7 461 /**
<> 144:ef7eb2e8f9f7 462 * @brief Clips Q31 to Q15 values.
<> 144:ef7eb2e8f9f7 463 */
<> 144:ef7eb2e8f9f7 464 static __INLINE q15_t clip_q31_to_q15(
<> 144:ef7eb2e8f9f7 465 q31_t x)
<> 144:ef7eb2e8f9f7 466 {
<> 144:ef7eb2e8f9f7 467 return ((q31_t) (x >> 16) != ((q31_t) x >> 15)) ?
<> 144:ef7eb2e8f9f7 468 ((0x7FFF ^ ((q15_t) (x >> 31)))) : (q15_t) x;
<> 144:ef7eb2e8f9f7 469 }
<> 144:ef7eb2e8f9f7 470
<> 144:ef7eb2e8f9f7 471 /**
<> 144:ef7eb2e8f9f7 472 * @brief Multiplies 32 X 64 and returns 32 bit result in 2.30 format.
<> 144:ef7eb2e8f9f7 473 */
<> 144:ef7eb2e8f9f7 474
<> 144:ef7eb2e8f9f7 475 static __INLINE q63_t mult32x64(
<> 144:ef7eb2e8f9f7 476 q63_t x,
<> 144:ef7eb2e8f9f7 477 q31_t y)
<> 144:ef7eb2e8f9f7 478 {
<> 144:ef7eb2e8f9f7 479 return ((((q63_t) (x & 0x00000000FFFFFFFF) * y) >> 32) +
<> 144:ef7eb2e8f9f7 480 (((q63_t) (x >> 32) * y)));
<> 144:ef7eb2e8f9f7 481 }
<> 144:ef7eb2e8f9f7 482
<> 144:ef7eb2e8f9f7 483
<> 144:ef7eb2e8f9f7 484 #if defined (ARM_MATH_CM0_FAMILY) && defined ( __CC_ARM )
<> 144:ef7eb2e8f9f7 485 #define __CLZ __clz
<> 144:ef7eb2e8f9f7 486 #endif
<> 144:ef7eb2e8f9f7 487
<> 144:ef7eb2e8f9f7 488 #if defined (ARM_MATH_CM0_FAMILY) && ((defined (__ICCARM__)) ||(defined (__GNUC__)) || defined (__TASKING__) ) && !defined (__CC_ARM)
<> 144:ef7eb2e8f9f7 489
<> 144:ef7eb2e8f9f7 490 static __INLINE uint32_t __CLZ(
<> 144:ef7eb2e8f9f7 491 q31_t data);
<> 144:ef7eb2e8f9f7 492
<> 144:ef7eb2e8f9f7 493
<> 144:ef7eb2e8f9f7 494 static __INLINE uint32_t __CLZ(
<> 144:ef7eb2e8f9f7 495 q31_t data)
<> 144:ef7eb2e8f9f7 496 {
<> 144:ef7eb2e8f9f7 497 uint32_t count = 0;
<> 144:ef7eb2e8f9f7 498 uint32_t mask = 0x80000000;
<> 144:ef7eb2e8f9f7 499
<> 144:ef7eb2e8f9f7 500 while((data & mask) == 0)
<> 144:ef7eb2e8f9f7 501 {
<> 144:ef7eb2e8f9f7 502 count += 1u;
<> 144:ef7eb2e8f9f7 503 mask = mask >> 1u;
<> 144:ef7eb2e8f9f7 504 }
<> 144:ef7eb2e8f9f7 505
<> 144:ef7eb2e8f9f7 506 return (count);
<> 144:ef7eb2e8f9f7 507
<> 144:ef7eb2e8f9f7 508 }
<> 144:ef7eb2e8f9f7 509
<> 144:ef7eb2e8f9f7 510 #endif
<> 144:ef7eb2e8f9f7 511
<> 144:ef7eb2e8f9f7 512 /**
<> 144:ef7eb2e8f9f7 513 * @brief Function to Calculates 1/in (reciprocal) value of Q31 Data type.
<> 144:ef7eb2e8f9f7 514 */
<> 144:ef7eb2e8f9f7 515
<> 144:ef7eb2e8f9f7 516 static __INLINE uint32_t arm_recip_q31(
<> 144:ef7eb2e8f9f7 517 q31_t in,
<> 144:ef7eb2e8f9f7 518 q31_t * dst,
<> 144:ef7eb2e8f9f7 519 q31_t * pRecipTable)
<> 144:ef7eb2e8f9f7 520 {
<> 144:ef7eb2e8f9f7 521
<> 144:ef7eb2e8f9f7 522 uint32_t out, tempVal;
<> 144:ef7eb2e8f9f7 523 uint32_t index, i;
<> 144:ef7eb2e8f9f7 524 uint32_t signBits;
<> 144:ef7eb2e8f9f7 525
<> 144:ef7eb2e8f9f7 526 if(in > 0)
<> 144:ef7eb2e8f9f7 527 {
<> 144:ef7eb2e8f9f7 528 signBits = __CLZ(in) - 1;
<> 144:ef7eb2e8f9f7 529 }
<> 144:ef7eb2e8f9f7 530 else
<> 144:ef7eb2e8f9f7 531 {
<> 144:ef7eb2e8f9f7 532 signBits = __CLZ(-in) - 1;
<> 144:ef7eb2e8f9f7 533 }
<> 144:ef7eb2e8f9f7 534
<> 144:ef7eb2e8f9f7 535 /* Convert input sample to 1.31 format */
<> 144:ef7eb2e8f9f7 536 in = in << signBits;
<> 144:ef7eb2e8f9f7 537
<> 144:ef7eb2e8f9f7 538 /* calculation of index for initial approximated Val */
<> 144:ef7eb2e8f9f7 539 index = (uint32_t) (in >> 24u);
<> 144:ef7eb2e8f9f7 540 index = (index & INDEX_MASK);
<> 144:ef7eb2e8f9f7 541
<> 144:ef7eb2e8f9f7 542 /* 1.31 with exp 1 */
<> 144:ef7eb2e8f9f7 543 out = pRecipTable[index];
<> 144:ef7eb2e8f9f7 544
<> 144:ef7eb2e8f9f7 545 /* calculation of reciprocal value */
<> 144:ef7eb2e8f9f7 546 /* running approximation for two iterations */
<> 144:ef7eb2e8f9f7 547 for (i = 0u; i < 2u; i++)
<> 144:ef7eb2e8f9f7 548 {
<> 144:ef7eb2e8f9f7 549 tempVal = (q31_t) (((q63_t) in * out) >> 31u);
<> 144:ef7eb2e8f9f7 550 tempVal = 0x7FFFFFFF - tempVal;
<> 144:ef7eb2e8f9f7 551 /* 1.31 with exp 1 */
<> 144:ef7eb2e8f9f7 552 //out = (q31_t) (((q63_t) out * tempVal) >> 30u);
<> 144:ef7eb2e8f9f7 553 out = (q31_t) clip_q63_to_q31(((q63_t) out * tempVal) >> 30u);
<> 144:ef7eb2e8f9f7 554 }
<> 144:ef7eb2e8f9f7 555
<> 144:ef7eb2e8f9f7 556 /* write output */
<> 144:ef7eb2e8f9f7 557 *dst = out;
<> 144:ef7eb2e8f9f7 558
<> 144:ef7eb2e8f9f7 559 /* return num of signbits of out = 1/in value */
<> 144:ef7eb2e8f9f7 560 return (signBits + 1u);
<> 144:ef7eb2e8f9f7 561
<> 144:ef7eb2e8f9f7 562 }
<> 144:ef7eb2e8f9f7 563
<> 144:ef7eb2e8f9f7 564 /**
<> 144:ef7eb2e8f9f7 565 * @brief Function to Calculates 1/in (reciprocal) value of Q15 Data type.
<> 144:ef7eb2e8f9f7 566 */
<> 144:ef7eb2e8f9f7 567 static __INLINE uint32_t arm_recip_q15(
<> 144:ef7eb2e8f9f7 568 q15_t in,
<> 144:ef7eb2e8f9f7 569 q15_t * dst,
<> 144:ef7eb2e8f9f7 570 q15_t * pRecipTable)
<> 144:ef7eb2e8f9f7 571 {
<> 144:ef7eb2e8f9f7 572
<> 144:ef7eb2e8f9f7 573 uint32_t out = 0, tempVal = 0;
<> 144:ef7eb2e8f9f7 574 uint32_t index = 0, i = 0;
<> 144:ef7eb2e8f9f7 575 uint32_t signBits = 0;
<> 144:ef7eb2e8f9f7 576
<> 144:ef7eb2e8f9f7 577 if(in > 0)
<> 144:ef7eb2e8f9f7 578 {
<> 144:ef7eb2e8f9f7 579 signBits = __CLZ(in) - 17;
<> 144:ef7eb2e8f9f7 580 }
<> 144:ef7eb2e8f9f7 581 else
<> 144:ef7eb2e8f9f7 582 {
<> 144:ef7eb2e8f9f7 583 signBits = __CLZ(-in) - 17;
<> 144:ef7eb2e8f9f7 584 }
<> 144:ef7eb2e8f9f7 585
<> 144:ef7eb2e8f9f7 586 /* Convert input sample to 1.15 format */
<> 144:ef7eb2e8f9f7 587 in = in << signBits;
<> 144:ef7eb2e8f9f7 588
<> 144:ef7eb2e8f9f7 589 /* calculation of index for initial approximated Val */
<> 144:ef7eb2e8f9f7 590 index = in >> 8;
<> 144:ef7eb2e8f9f7 591 index = (index & INDEX_MASK);
<> 144:ef7eb2e8f9f7 592
<> 144:ef7eb2e8f9f7 593 /* 1.15 with exp 1 */
<> 144:ef7eb2e8f9f7 594 out = pRecipTable[index];
<> 144:ef7eb2e8f9f7 595
<> 144:ef7eb2e8f9f7 596 /* calculation of reciprocal value */
<> 144:ef7eb2e8f9f7 597 /* running approximation for two iterations */
<> 144:ef7eb2e8f9f7 598 for (i = 0; i < 2; i++)
<> 144:ef7eb2e8f9f7 599 {
<> 144:ef7eb2e8f9f7 600 tempVal = (q15_t) (((q31_t) in * out) >> 15);
<> 144:ef7eb2e8f9f7 601 tempVal = 0x7FFF - tempVal;
<> 144:ef7eb2e8f9f7 602 /* 1.15 with exp 1 */
<> 144:ef7eb2e8f9f7 603 out = (q15_t) (((q31_t) out * tempVal) >> 14);
<> 144:ef7eb2e8f9f7 604 }
<> 144:ef7eb2e8f9f7 605
<> 144:ef7eb2e8f9f7 606 /* write output */
<> 144:ef7eb2e8f9f7 607 *dst = out;
<> 144:ef7eb2e8f9f7 608
<> 144:ef7eb2e8f9f7 609 /* return num of signbits of out = 1/in value */
<> 144:ef7eb2e8f9f7 610 return (signBits + 1);
<> 144:ef7eb2e8f9f7 611
<> 144:ef7eb2e8f9f7 612 }
<> 144:ef7eb2e8f9f7 613
<> 144:ef7eb2e8f9f7 614
<> 144:ef7eb2e8f9f7 615 /*
<> 144:ef7eb2e8f9f7 616 * @brief C custom defined intrinisic function for only M0 processors
<> 144:ef7eb2e8f9f7 617 */
<> 144:ef7eb2e8f9f7 618 #if defined(ARM_MATH_CM0_FAMILY)
<> 144:ef7eb2e8f9f7 619
<> 144:ef7eb2e8f9f7 620 static __INLINE q31_t __SSAT(
<> 144:ef7eb2e8f9f7 621 q31_t x,
<> 144:ef7eb2e8f9f7 622 uint32_t y)
<> 144:ef7eb2e8f9f7 623 {
<> 144:ef7eb2e8f9f7 624 int32_t posMax, negMin;
<> 144:ef7eb2e8f9f7 625 uint32_t i;
<> 144:ef7eb2e8f9f7 626
<> 144:ef7eb2e8f9f7 627 posMax = 1;
<> 144:ef7eb2e8f9f7 628 for (i = 0; i < (y - 1); i++)
<> 144:ef7eb2e8f9f7 629 {
<> 144:ef7eb2e8f9f7 630 posMax = posMax * 2;
<> 144:ef7eb2e8f9f7 631 }
<> 144:ef7eb2e8f9f7 632
<> 144:ef7eb2e8f9f7 633 if(x > 0)
<> 144:ef7eb2e8f9f7 634 {
<> 144:ef7eb2e8f9f7 635 posMax = (posMax - 1);
<> 144:ef7eb2e8f9f7 636
<> 144:ef7eb2e8f9f7 637 if(x > posMax)
<> 144:ef7eb2e8f9f7 638 {
<> 144:ef7eb2e8f9f7 639 x = posMax;
<> 144:ef7eb2e8f9f7 640 }
<> 144:ef7eb2e8f9f7 641 }
<> 144:ef7eb2e8f9f7 642 else
<> 144:ef7eb2e8f9f7 643 {
<> 144:ef7eb2e8f9f7 644 negMin = -posMax;
<> 144:ef7eb2e8f9f7 645
<> 144:ef7eb2e8f9f7 646 if(x < negMin)
<> 144:ef7eb2e8f9f7 647 {
<> 144:ef7eb2e8f9f7 648 x = negMin;
<> 144:ef7eb2e8f9f7 649 }
<> 144:ef7eb2e8f9f7 650 }
<> 144:ef7eb2e8f9f7 651 return (x);
<> 144:ef7eb2e8f9f7 652
<> 144:ef7eb2e8f9f7 653
<> 144:ef7eb2e8f9f7 654 }
<> 144:ef7eb2e8f9f7 655
<> 144:ef7eb2e8f9f7 656 #endif /* end of ARM_MATH_CM0_FAMILY */
<> 144:ef7eb2e8f9f7 657
<> 144:ef7eb2e8f9f7 658
<> 144:ef7eb2e8f9f7 659
<> 144:ef7eb2e8f9f7 660 /*
<> 144:ef7eb2e8f9f7 661 * @brief C custom defined intrinsic function for M3 and M0 processors
<> 144:ef7eb2e8f9f7 662 */
<> 144:ef7eb2e8f9f7 663 #if defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY)
<> 144:ef7eb2e8f9f7 664
<> 144:ef7eb2e8f9f7 665 /*
<> 144:ef7eb2e8f9f7 666 * @brief C custom defined QADD8 for M3 and M0 processors
<> 144:ef7eb2e8f9f7 667 */
<> 144:ef7eb2e8f9f7 668 static __INLINE q31_t __QADD8(
<> 144:ef7eb2e8f9f7 669 q31_t x,
<> 144:ef7eb2e8f9f7 670 q31_t y)
<> 144:ef7eb2e8f9f7 671 {
<> 144:ef7eb2e8f9f7 672
<> 144:ef7eb2e8f9f7 673 q31_t sum;
<> 144:ef7eb2e8f9f7 674 q7_t r, s, t, u;
<> 144:ef7eb2e8f9f7 675
<> 144:ef7eb2e8f9f7 676 r = (q7_t) x;
<> 144:ef7eb2e8f9f7 677 s = (q7_t) y;
<> 144:ef7eb2e8f9f7 678
<> 144:ef7eb2e8f9f7 679 r = __SSAT((q31_t) (r + s), 8);
<> 144:ef7eb2e8f9f7 680 s = __SSAT(((q31_t) (((x << 16) >> 24) + ((y << 16) >> 24))), 8);
<> 144:ef7eb2e8f9f7 681 t = __SSAT(((q31_t) (((x << 8) >> 24) + ((y << 8) >> 24))), 8);
<> 144:ef7eb2e8f9f7 682 u = __SSAT(((q31_t) ((x >> 24) + (y >> 24))), 8);
<> 144:ef7eb2e8f9f7 683
<> 144:ef7eb2e8f9f7 684 sum =
<> 144:ef7eb2e8f9f7 685 (((q31_t) u << 24) & 0xFF000000) | (((q31_t) t << 16) & 0x00FF0000) |
<> 144:ef7eb2e8f9f7 686 (((q31_t) s << 8) & 0x0000FF00) | (r & 0x000000FF);
<> 144:ef7eb2e8f9f7 687
<> 144:ef7eb2e8f9f7 688 return sum;
<> 144:ef7eb2e8f9f7 689
<> 144:ef7eb2e8f9f7 690 }
<> 144:ef7eb2e8f9f7 691
<> 144:ef7eb2e8f9f7 692 /*
<> 144:ef7eb2e8f9f7 693 * @brief C custom defined QSUB8 for M3 and M0 processors
<> 144:ef7eb2e8f9f7 694 */
<> 144:ef7eb2e8f9f7 695 static __INLINE q31_t __QSUB8(
<> 144:ef7eb2e8f9f7 696 q31_t x,
<> 144:ef7eb2e8f9f7 697 q31_t y)
<> 144:ef7eb2e8f9f7 698 {
<> 144:ef7eb2e8f9f7 699
<> 144:ef7eb2e8f9f7 700 q31_t sum;
<> 144:ef7eb2e8f9f7 701 q31_t r, s, t, u;
<> 144:ef7eb2e8f9f7 702
<> 144:ef7eb2e8f9f7 703 r = (q7_t) x;
<> 144:ef7eb2e8f9f7 704 s = (q7_t) y;
<> 144:ef7eb2e8f9f7 705
<> 144:ef7eb2e8f9f7 706 r = __SSAT((r - s), 8);
<> 144:ef7eb2e8f9f7 707 s = __SSAT(((q31_t) (((x << 16) >> 24) - ((y << 16) >> 24))), 8) << 8;
<> 144:ef7eb2e8f9f7 708 t = __SSAT(((q31_t) (((x << 8) >> 24) - ((y << 8) >> 24))), 8) << 16;
<> 144:ef7eb2e8f9f7 709 u = __SSAT(((q31_t) ((x >> 24) - (y >> 24))), 8) << 24;
<> 144:ef7eb2e8f9f7 710
<> 144:ef7eb2e8f9f7 711 sum =
<> 144:ef7eb2e8f9f7 712 (u & 0xFF000000) | (t & 0x00FF0000) | (s & 0x0000FF00) | (r &
<> 144:ef7eb2e8f9f7 713 0x000000FF);
<> 144:ef7eb2e8f9f7 714
<> 144:ef7eb2e8f9f7 715 return sum;
<> 144:ef7eb2e8f9f7 716 }
<> 144:ef7eb2e8f9f7 717
<> 144:ef7eb2e8f9f7 718 /*
<> 144:ef7eb2e8f9f7 719 * @brief C custom defined QADD16 for M3 and M0 processors
<> 144:ef7eb2e8f9f7 720 */
<> 144:ef7eb2e8f9f7 721
<> 144:ef7eb2e8f9f7 722 /*
<> 144:ef7eb2e8f9f7 723 * @brief C custom defined QADD16 for M3 and M0 processors
<> 144:ef7eb2e8f9f7 724 */
<> 144:ef7eb2e8f9f7 725 static __INLINE q31_t __QADD16(
<> 144:ef7eb2e8f9f7 726 q31_t x,
<> 144:ef7eb2e8f9f7 727 q31_t y)
<> 144:ef7eb2e8f9f7 728 {
<> 144:ef7eb2e8f9f7 729
<> 144:ef7eb2e8f9f7 730 q31_t sum;
<> 144:ef7eb2e8f9f7 731 q31_t r, s;
<> 144:ef7eb2e8f9f7 732
<> 144:ef7eb2e8f9f7 733 r = (short) x;
<> 144:ef7eb2e8f9f7 734 s = (short) y;
<> 144:ef7eb2e8f9f7 735
<> 144:ef7eb2e8f9f7 736 r = __SSAT(r + s, 16);
<> 144:ef7eb2e8f9f7 737 s = __SSAT(((q31_t) ((x >> 16) + (y >> 16))), 16) << 16;
<> 144:ef7eb2e8f9f7 738
<> 144:ef7eb2e8f9f7 739 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 144:ef7eb2e8f9f7 740
<> 144:ef7eb2e8f9f7 741 return sum;
<> 144:ef7eb2e8f9f7 742
<> 144:ef7eb2e8f9f7 743 }
<> 144:ef7eb2e8f9f7 744
<> 144:ef7eb2e8f9f7 745 /*
<> 144:ef7eb2e8f9f7 746 * @brief C custom defined SHADD16 for M3 and M0 processors
<> 144:ef7eb2e8f9f7 747 */
<> 144:ef7eb2e8f9f7 748 static __INLINE q31_t __SHADD16(
<> 144:ef7eb2e8f9f7 749 q31_t x,
<> 144:ef7eb2e8f9f7 750 q31_t y)
<> 144:ef7eb2e8f9f7 751 {
<> 144:ef7eb2e8f9f7 752
<> 144:ef7eb2e8f9f7 753 q31_t sum;
<> 144:ef7eb2e8f9f7 754 q31_t r, s;
<> 144:ef7eb2e8f9f7 755
<> 144:ef7eb2e8f9f7 756 r = (short) x;
<> 144:ef7eb2e8f9f7 757 s = (short) y;
<> 144:ef7eb2e8f9f7 758
<> 144:ef7eb2e8f9f7 759 r = ((r >> 1) + (s >> 1));
<> 144:ef7eb2e8f9f7 760 s = ((q31_t) ((x >> 17) + (y >> 17))) << 16;
<> 144:ef7eb2e8f9f7 761
<> 144:ef7eb2e8f9f7 762 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 144:ef7eb2e8f9f7 763
<> 144:ef7eb2e8f9f7 764 return sum;
<> 144:ef7eb2e8f9f7 765
<> 144:ef7eb2e8f9f7 766 }
<> 144:ef7eb2e8f9f7 767
<> 144:ef7eb2e8f9f7 768 /*
<> 144:ef7eb2e8f9f7 769 * @brief C custom defined QSUB16 for M3 and M0 processors
<> 144:ef7eb2e8f9f7 770 */
<> 144:ef7eb2e8f9f7 771 static __INLINE q31_t __QSUB16(
<> 144:ef7eb2e8f9f7 772 q31_t x,
<> 144:ef7eb2e8f9f7 773 q31_t y)
<> 144:ef7eb2e8f9f7 774 {
<> 144:ef7eb2e8f9f7 775
<> 144:ef7eb2e8f9f7 776 q31_t sum;
<> 144:ef7eb2e8f9f7 777 q31_t r, s;
<> 144:ef7eb2e8f9f7 778
<> 144:ef7eb2e8f9f7 779 r = (short) x;
<> 144:ef7eb2e8f9f7 780 s = (short) y;
<> 144:ef7eb2e8f9f7 781
<> 144:ef7eb2e8f9f7 782 r = __SSAT(r - s, 16);
<> 144:ef7eb2e8f9f7 783 s = __SSAT(((q31_t) ((x >> 16) - (y >> 16))), 16) << 16;
<> 144:ef7eb2e8f9f7 784
<> 144:ef7eb2e8f9f7 785 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 144:ef7eb2e8f9f7 786
<> 144:ef7eb2e8f9f7 787 return sum;
<> 144:ef7eb2e8f9f7 788 }
<> 144:ef7eb2e8f9f7 789
<> 144:ef7eb2e8f9f7 790 /*
<> 144:ef7eb2e8f9f7 791 * @brief C custom defined SHSUB16 for M3 and M0 processors
<> 144:ef7eb2e8f9f7 792 */
<> 144:ef7eb2e8f9f7 793 static __INLINE q31_t __SHSUB16(
<> 144:ef7eb2e8f9f7 794 q31_t x,
<> 144:ef7eb2e8f9f7 795 q31_t y)
<> 144:ef7eb2e8f9f7 796 {
<> 144:ef7eb2e8f9f7 797
<> 144:ef7eb2e8f9f7 798 q31_t diff;
<> 144:ef7eb2e8f9f7 799 q31_t r, s;
<> 144:ef7eb2e8f9f7 800
<> 144:ef7eb2e8f9f7 801 r = (short) x;
<> 144:ef7eb2e8f9f7 802 s = (short) y;
<> 144:ef7eb2e8f9f7 803
<> 144:ef7eb2e8f9f7 804 r = ((r >> 1) - (s >> 1));
<> 144:ef7eb2e8f9f7 805 s = (((x >> 17) - (y >> 17)) << 16);
<> 144:ef7eb2e8f9f7 806
<> 144:ef7eb2e8f9f7 807 diff = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 144:ef7eb2e8f9f7 808
<> 144:ef7eb2e8f9f7 809 return diff;
<> 144:ef7eb2e8f9f7 810 }
<> 144:ef7eb2e8f9f7 811
<> 144:ef7eb2e8f9f7 812 /*
<> 144:ef7eb2e8f9f7 813 * @brief C custom defined QASX for M3 and M0 processors
<> 144:ef7eb2e8f9f7 814 */
<> 144:ef7eb2e8f9f7 815 static __INLINE q31_t __QASX(
<> 144:ef7eb2e8f9f7 816 q31_t x,
<> 144:ef7eb2e8f9f7 817 q31_t y)
<> 144:ef7eb2e8f9f7 818 {
<> 144:ef7eb2e8f9f7 819
<> 144:ef7eb2e8f9f7 820 q31_t sum = 0;
<> 144:ef7eb2e8f9f7 821
<> 144:ef7eb2e8f9f7 822 sum =
<> 144:ef7eb2e8f9f7 823 ((sum +
<> 144:ef7eb2e8f9f7 824 clip_q31_to_q15((q31_t) ((short) (x >> 16) + (short) y))) << 16) +
<> 144:ef7eb2e8f9f7 825 clip_q31_to_q15((q31_t) ((short) x - (short) (y >> 16)));
<> 144:ef7eb2e8f9f7 826
<> 144:ef7eb2e8f9f7 827 return sum;
<> 144:ef7eb2e8f9f7 828 }
<> 144:ef7eb2e8f9f7 829
<> 144:ef7eb2e8f9f7 830 /*
<> 144:ef7eb2e8f9f7 831 * @brief C custom defined SHASX for M3 and M0 processors
<> 144:ef7eb2e8f9f7 832 */
<> 144:ef7eb2e8f9f7 833 static __INLINE q31_t __SHASX(
<> 144:ef7eb2e8f9f7 834 q31_t x,
<> 144:ef7eb2e8f9f7 835 q31_t y)
<> 144:ef7eb2e8f9f7 836 {
<> 144:ef7eb2e8f9f7 837
<> 144:ef7eb2e8f9f7 838 q31_t sum;
<> 144:ef7eb2e8f9f7 839 q31_t r, s;
<> 144:ef7eb2e8f9f7 840
<> 144:ef7eb2e8f9f7 841 r = (short) x;
<> 144:ef7eb2e8f9f7 842 s = (short) y;
<> 144:ef7eb2e8f9f7 843
<> 144:ef7eb2e8f9f7 844 r = ((r >> 1) - (y >> 17));
<> 144:ef7eb2e8f9f7 845 s = (((x >> 17) + (s >> 1)) << 16);
<> 144:ef7eb2e8f9f7 846
<> 144:ef7eb2e8f9f7 847 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 144:ef7eb2e8f9f7 848
<> 144:ef7eb2e8f9f7 849 return sum;
<> 144:ef7eb2e8f9f7 850 }
<> 144:ef7eb2e8f9f7 851
<> 144:ef7eb2e8f9f7 852
<> 144:ef7eb2e8f9f7 853 /*
<> 144:ef7eb2e8f9f7 854 * @brief C custom defined QSAX for M3 and M0 processors
<> 144:ef7eb2e8f9f7 855 */
<> 144:ef7eb2e8f9f7 856 static __INLINE q31_t __QSAX(
<> 144:ef7eb2e8f9f7 857 q31_t x,
<> 144:ef7eb2e8f9f7 858 q31_t y)
<> 144:ef7eb2e8f9f7 859 {
<> 144:ef7eb2e8f9f7 860
<> 144:ef7eb2e8f9f7 861 q31_t sum = 0;
<> 144:ef7eb2e8f9f7 862
<> 144:ef7eb2e8f9f7 863 sum =
<> 144:ef7eb2e8f9f7 864 ((sum +
<> 144:ef7eb2e8f9f7 865 clip_q31_to_q15((q31_t) ((short) (x >> 16) - (short) y))) << 16) +
<> 144:ef7eb2e8f9f7 866 clip_q31_to_q15((q31_t) ((short) x + (short) (y >> 16)));
<> 144:ef7eb2e8f9f7 867
<> 144:ef7eb2e8f9f7 868 return sum;
<> 144:ef7eb2e8f9f7 869 }
<> 144:ef7eb2e8f9f7 870
<> 144:ef7eb2e8f9f7 871 /*
<> 144:ef7eb2e8f9f7 872 * @brief C custom defined SHSAX for M3 and M0 processors
<> 144:ef7eb2e8f9f7 873 */
<> 144:ef7eb2e8f9f7 874 static __INLINE q31_t __SHSAX(
<> 144:ef7eb2e8f9f7 875 q31_t x,
<> 144:ef7eb2e8f9f7 876 q31_t y)
<> 144:ef7eb2e8f9f7 877 {
<> 144:ef7eb2e8f9f7 878
<> 144:ef7eb2e8f9f7 879 q31_t sum;
<> 144:ef7eb2e8f9f7 880 q31_t r, s;
<> 144:ef7eb2e8f9f7 881
<> 144:ef7eb2e8f9f7 882 r = (short) x;
<> 144:ef7eb2e8f9f7 883 s = (short) y;
<> 144:ef7eb2e8f9f7 884
<> 144:ef7eb2e8f9f7 885 r = ((r >> 1) + (y >> 17));
<> 144:ef7eb2e8f9f7 886 s = (((x >> 17) - (s >> 1)) << 16);
<> 144:ef7eb2e8f9f7 887
<> 144:ef7eb2e8f9f7 888 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 144:ef7eb2e8f9f7 889
<> 144:ef7eb2e8f9f7 890 return sum;
<> 144:ef7eb2e8f9f7 891 }
<> 144:ef7eb2e8f9f7 892
<> 144:ef7eb2e8f9f7 893 /*
<> 144:ef7eb2e8f9f7 894 * @brief C custom defined SMUSDX for M3 and M0 processors
<> 144:ef7eb2e8f9f7 895 */
<> 144:ef7eb2e8f9f7 896 static __INLINE q31_t __SMUSDX(
<> 144:ef7eb2e8f9f7 897 q31_t x,
<> 144:ef7eb2e8f9f7 898 q31_t y)
<> 144:ef7eb2e8f9f7 899 {
<> 144:ef7eb2e8f9f7 900
<> 144:ef7eb2e8f9f7 901 return ((q31_t) (((short) x * (short) (y >> 16)) -
<> 144:ef7eb2e8f9f7 902 ((short) (x >> 16) * (short) y)));
<> 144:ef7eb2e8f9f7 903 }
<> 144:ef7eb2e8f9f7 904
<> 144:ef7eb2e8f9f7 905 /*
<> 144:ef7eb2e8f9f7 906 * @brief C custom defined SMUADX for M3 and M0 processors
<> 144:ef7eb2e8f9f7 907 */
<> 144:ef7eb2e8f9f7 908 static __INLINE q31_t __SMUADX(
<> 144:ef7eb2e8f9f7 909 q31_t x,
<> 144:ef7eb2e8f9f7 910 q31_t y)
<> 144:ef7eb2e8f9f7 911 {
<> 144:ef7eb2e8f9f7 912
<> 144:ef7eb2e8f9f7 913 return ((q31_t) (((short) x * (short) (y >> 16)) +
<> 144:ef7eb2e8f9f7 914 ((short) (x >> 16) * (short) y)));
<> 144:ef7eb2e8f9f7 915 }
<> 144:ef7eb2e8f9f7 916
<> 144:ef7eb2e8f9f7 917 /*
<> 144:ef7eb2e8f9f7 918 * @brief C custom defined QADD for M3 and M0 processors
<> 144:ef7eb2e8f9f7 919 */
<> 144:ef7eb2e8f9f7 920 static __INLINE q31_t __QADD(
<> 144:ef7eb2e8f9f7 921 q31_t x,
<> 144:ef7eb2e8f9f7 922 q31_t y)
<> 144:ef7eb2e8f9f7 923 {
<> 144:ef7eb2e8f9f7 924 return clip_q63_to_q31((q63_t) x + y);
<> 144:ef7eb2e8f9f7 925 }
<> 144:ef7eb2e8f9f7 926
<> 144:ef7eb2e8f9f7 927 /*
<> 144:ef7eb2e8f9f7 928 * @brief C custom defined QSUB for M3 and M0 processors
<> 144:ef7eb2e8f9f7 929 */
<> 144:ef7eb2e8f9f7 930 static __INLINE q31_t __QSUB(
<> 144:ef7eb2e8f9f7 931 q31_t x,
<> 144:ef7eb2e8f9f7 932 q31_t y)
<> 144:ef7eb2e8f9f7 933 {
<> 144:ef7eb2e8f9f7 934 return clip_q63_to_q31((q63_t) x - y);
<> 144:ef7eb2e8f9f7 935 }
<> 144:ef7eb2e8f9f7 936
<> 144:ef7eb2e8f9f7 937 /*
<> 144:ef7eb2e8f9f7 938 * @brief C custom defined SMLAD for M3 and M0 processors
<> 144:ef7eb2e8f9f7 939 */
<> 144:ef7eb2e8f9f7 940 static __INLINE q31_t __SMLAD(
<> 144:ef7eb2e8f9f7 941 q31_t x,
<> 144:ef7eb2e8f9f7 942 q31_t y,
<> 144:ef7eb2e8f9f7 943 q31_t sum)
<> 144:ef7eb2e8f9f7 944 {
<> 144:ef7eb2e8f9f7 945
<> 144:ef7eb2e8f9f7 946 return (sum + ((short) (x >> 16) * (short) (y >> 16)) +
<> 144:ef7eb2e8f9f7 947 ((short) x * (short) y));
<> 144:ef7eb2e8f9f7 948 }
<> 144:ef7eb2e8f9f7 949
<> 144:ef7eb2e8f9f7 950 /*
<> 144:ef7eb2e8f9f7 951 * @brief C custom defined SMLADX for M3 and M0 processors
<> 144:ef7eb2e8f9f7 952 */
<> 144:ef7eb2e8f9f7 953 static __INLINE q31_t __SMLADX(
<> 144:ef7eb2e8f9f7 954 q31_t x,
<> 144:ef7eb2e8f9f7 955 q31_t y,
<> 144:ef7eb2e8f9f7 956 q31_t sum)
<> 144:ef7eb2e8f9f7 957 {
<> 144:ef7eb2e8f9f7 958
<> 144:ef7eb2e8f9f7 959 return (sum + ((short) (x >> 16) * (short) (y)) +
<> 144:ef7eb2e8f9f7 960 ((short) x * (short) (y >> 16)));
<> 144:ef7eb2e8f9f7 961 }
<> 144:ef7eb2e8f9f7 962
<> 144:ef7eb2e8f9f7 963 /*
<> 144:ef7eb2e8f9f7 964 * @brief C custom defined SMLSDX for M3 and M0 processors
<> 144:ef7eb2e8f9f7 965 */
<> 144:ef7eb2e8f9f7 966 static __INLINE q31_t __SMLSDX(
<> 144:ef7eb2e8f9f7 967 q31_t x,
<> 144:ef7eb2e8f9f7 968 q31_t y,
<> 144:ef7eb2e8f9f7 969 q31_t sum)
<> 144:ef7eb2e8f9f7 970 {
<> 144:ef7eb2e8f9f7 971
<> 144:ef7eb2e8f9f7 972 return (sum - ((short) (x >> 16) * (short) (y)) +
<> 144:ef7eb2e8f9f7 973 ((short) x * (short) (y >> 16)));
<> 144:ef7eb2e8f9f7 974 }
<> 144:ef7eb2e8f9f7 975
<> 144:ef7eb2e8f9f7 976 /*
<> 144:ef7eb2e8f9f7 977 * @brief C custom defined SMLALD for M3 and M0 processors
<> 144:ef7eb2e8f9f7 978 */
<> 144:ef7eb2e8f9f7 979 static __INLINE q63_t __SMLALD(
<> 144:ef7eb2e8f9f7 980 q31_t x,
<> 144:ef7eb2e8f9f7 981 q31_t y,
<> 144:ef7eb2e8f9f7 982 q63_t sum)
<> 144:ef7eb2e8f9f7 983 {
<> 144:ef7eb2e8f9f7 984
<> 144:ef7eb2e8f9f7 985 return (sum + ((short) (x >> 16) * (short) (y >> 16)) +
<> 144:ef7eb2e8f9f7 986 ((short) x * (short) y));
<> 144:ef7eb2e8f9f7 987 }
<> 144:ef7eb2e8f9f7 988
<> 144:ef7eb2e8f9f7 989 /*
<> 144:ef7eb2e8f9f7 990 * @brief C custom defined SMLALDX for M3 and M0 processors
<> 144:ef7eb2e8f9f7 991 */
<> 144:ef7eb2e8f9f7 992 static __INLINE q63_t __SMLALDX(
<> 144:ef7eb2e8f9f7 993 q31_t x,
<> 144:ef7eb2e8f9f7 994 q31_t y,
<> 144:ef7eb2e8f9f7 995 q63_t sum)
<> 144:ef7eb2e8f9f7 996 {
<> 144:ef7eb2e8f9f7 997
<> 144:ef7eb2e8f9f7 998 return (sum + ((short) (x >> 16) * (short) y)) +
<> 144:ef7eb2e8f9f7 999 ((short) x * (short) (y >> 16));
<> 144:ef7eb2e8f9f7 1000 }
<> 144:ef7eb2e8f9f7 1001
<> 144:ef7eb2e8f9f7 1002 /*
<> 144:ef7eb2e8f9f7 1003 * @brief C custom defined SMUAD for M3 and M0 processors
<> 144:ef7eb2e8f9f7 1004 */
<> 144:ef7eb2e8f9f7 1005 static __INLINE q31_t __SMUAD(
<> 144:ef7eb2e8f9f7 1006 q31_t x,
<> 144:ef7eb2e8f9f7 1007 q31_t y)
<> 144:ef7eb2e8f9f7 1008 {
<> 144:ef7eb2e8f9f7 1009
<> 144:ef7eb2e8f9f7 1010 return (((x >> 16) * (y >> 16)) +
<> 144:ef7eb2e8f9f7 1011 (((x << 16) >> 16) * ((y << 16) >> 16)));
<> 144:ef7eb2e8f9f7 1012 }
<> 144:ef7eb2e8f9f7 1013
<> 144:ef7eb2e8f9f7 1014 /*
<> 144:ef7eb2e8f9f7 1015 * @brief C custom defined SMUSD for M3 and M0 processors
<> 144:ef7eb2e8f9f7 1016 */
<> 144:ef7eb2e8f9f7 1017 static __INLINE q31_t __SMUSD(
<> 144:ef7eb2e8f9f7 1018 q31_t x,
<> 144:ef7eb2e8f9f7 1019 q31_t y)
<> 144:ef7eb2e8f9f7 1020 {
<> 144:ef7eb2e8f9f7 1021
<> 144:ef7eb2e8f9f7 1022 return (-((x >> 16) * (y >> 16)) +
<> 144:ef7eb2e8f9f7 1023 (((x << 16) >> 16) * ((y << 16) >> 16)));
<> 144:ef7eb2e8f9f7 1024 }
<> 144:ef7eb2e8f9f7 1025
<> 144:ef7eb2e8f9f7 1026
<> 144:ef7eb2e8f9f7 1027 /*
<> 144:ef7eb2e8f9f7 1028 * @brief C custom defined SXTB16 for M3 and M0 processors
<> 144:ef7eb2e8f9f7 1029 */
<> 144:ef7eb2e8f9f7 1030 static __INLINE q31_t __SXTB16(
<> 144:ef7eb2e8f9f7 1031 q31_t x)
<> 144:ef7eb2e8f9f7 1032 {
<> 144:ef7eb2e8f9f7 1033
<> 144:ef7eb2e8f9f7 1034 return ((((x << 24) >> 24) & 0x0000FFFF) |
<> 144:ef7eb2e8f9f7 1035 (((x << 8) >> 8) & 0xFFFF0000));
<> 144:ef7eb2e8f9f7 1036 }
<> 144:ef7eb2e8f9f7 1037
<> 144:ef7eb2e8f9f7 1038
<> 144:ef7eb2e8f9f7 1039 #endif /* defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY) */
<> 144:ef7eb2e8f9f7 1040
<> 144:ef7eb2e8f9f7 1041
<> 144:ef7eb2e8f9f7 1042 /**
<> 144:ef7eb2e8f9f7 1043 * @brief Instance structure for the Q7 FIR filter.
<> 144:ef7eb2e8f9f7 1044 */
<> 144:ef7eb2e8f9f7 1045 typedef struct
<> 144:ef7eb2e8f9f7 1046 {
<> 144:ef7eb2e8f9f7 1047 uint16_t numTaps; /**< number of filter coefficients in the filter. */
<> 144:ef7eb2e8f9f7 1048 q7_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 144:ef7eb2e8f9f7 1049 q7_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 144:ef7eb2e8f9f7 1050 } arm_fir_instance_q7;
<> 144:ef7eb2e8f9f7 1051
<> 144:ef7eb2e8f9f7 1052 /**
<> 144:ef7eb2e8f9f7 1053 * @brief Instance structure for the Q15 FIR filter.
<> 144:ef7eb2e8f9f7 1054 */
<> 144:ef7eb2e8f9f7 1055 typedef struct
<> 144:ef7eb2e8f9f7 1056 {
<> 144:ef7eb2e8f9f7 1057 uint16_t numTaps; /**< number of filter coefficients in the filter. */
<> 144:ef7eb2e8f9f7 1058 q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 144:ef7eb2e8f9f7 1059 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 144:ef7eb2e8f9f7 1060 } arm_fir_instance_q15;
<> 144:ef7eb2e8f9f7 1061
<> 144:ef7eb2e8f9f7 1062 /**
<> 144:ef7eb2e8f9f7 1063 * @brief Instance structure for the Q31 FIR filter.
<> 144:ef7eb2e8f9f7 1064 */
<> 144:ef7eb2e8f9f7 1065 typedef struct
<> 144:ef7eb2e8f9f7 1066 {
<> 144:ef7eb2e8f9f7 1067 uint16_t numTaps; /**< number of filter coefficients in the filter. */
<> 144:ef7eb2e8f9f7 1068 q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 144:ef7eb2e8f9f7 1069 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 144:ef7eb2e8f9f7 1070 } arm_fir_instance_q31;
<> 144:ef7eb2e8f9f7 1071
<> 144:ef7eb2e8f9f7 1072 /**
<> 144:ef7eb2e8f9f7 1073 * @brief Instance structure for the floating-point FIR filter.
<> 144:ef7eb2e8f9f7 1074 */
<> 144:ef7eb2e8f9f7 1075 typedef struct
<> 144:ef7eb2e8f9f7 1076 {
<> 144:ef7eb2e8f9f7 1077 uint16_t numTaps; /**< number of filter coefficients in the filter. */
<> 144:ef7eb2e8f9f7 1078 float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 144:ef7eb2e8f9f7 1079 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 144:ef7eb2e8f9f7 1080 } arm_fir_instance_f32;
<> 144:ef7eb2e8f9f7 1081
<> 144:ef7eb2e8f9f7 1082
<> 144:ef7eb2e8f9f7 1083 /**
<> 144:ef7eb2e8f9f7 1084 * @brief Processing function for the Q7 FIR filter.
<> 144:ef7eb2e8f9f7 1085 * @param[in] *S points to an instance of the Q7 FIR filter structure.
<> 144:ef7eb2e8f9f7 1086 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 1087 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 1088 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 1089 * @return none.
<> 144:ef7eb2e8f9f7 1090 */
<> 144:ef7eb2e8f9f7 1091 void arm_fir_q7(
<> 144:ef7eb2e8f9f7 1092 const arm_fir_instance_q7 * S,
<> 144:ef7eb2e8f9f7 1093 q7_t * pSrc,
<> 144:ef7eb2e8f9f7 1094 q7_t * pDst,
<> 144:ef7eb2e8f9f7 1095 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1096
<> 144:ef7eb2e8f9f7 1097
<> 144:ef7eb2e8f9f7 1098 /**
<> 144:ef7eb2e8f9f7 1099 * @brief Initialization function for the Q7 FIR filter.
<> 144:ef7eb2e8f9f7 1100 * @param[in,out] *S points to an instance of the Q7 FIR structure.
<> 144:ef7eb2e8f9f7 1101 * @param[in] numTaps Number of filter coefficients in the filter.
<> 144:ef7eb2e8f9f7 1102 * @param[in] *pCoeffs points to the filter coefficients.
<> 144:ef7eb2e8f9f7 1103 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 1104 * @param[in] blockSize number of samples that are processed.
<> 144:ef7eb2e8f9f7 1105 * @return none
<> 144:ef7eb2e8f9f7 1106 */
<> 144:ef7eb2e8f9f7 1107 void arm_fir_init_q7(
<> 144:ef7eb2e8f9f7 1108 arm_fir_instance_q7 * S,
<> 144:ef7eb2e8f9f7 1109 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 1110 q7_t * pCoeffs,
<> 144:ef7eb2e8f9f7 1111 q7_t * pState,
<> 144:ef7eb2e8f9f7 1112 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1113
<> 144:ef7eb2e8f9f7 1114
<> 144:ef7eb2e8f9f7 1115 /**
<> 144:ef7eb2e8f9f7 1116 * @brief Processing function for the Q15 FIR filter.
<> 144:ef7eb2e8f9f7 1117 * @param[in] *S points to an instance of the Q15 FIR structure.
<> 144:ef7eb2e8f9f7 1118 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 1119 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 1120 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 1121 * @return none.
<> 144:ef7eb2e8f9f7 1122 */
<> 144:ef7eb2e8f9f7 1123 void arm_fir_q15(
<> 144:ef7eb2e8f9f7 1124 const arm_fir_instance_q15 * S,
<> 144:ef7eb2e8f9f7 1125 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 1126 q15_t * pDst,
<> 144:ef7eb2e8f9f7 1127 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1128
<> 144:ef7eb2e8f9f7 1129 /**
<> 144:ef7eb2e8f9f7 1130 * @brief Processing function for the fast Q15 FIR filter for Cortex-M3 and Cortex-M4.
<> 144:ef7eb2e8f9f7 1131 * @param[in] *S points to an instance of the Q15 FIR filter structure.
<> 144:ef7eb2e8f9f7 1132 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 1133 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 1134 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 1135 * @return none.
<> 144:ef7eb2e8f9f7 1136 */
<> 144:ef7eb2e8f9f7 1137 void arm_fir_fast_q15(
<> 144:ef7eb2e8f9f7 1138 const arm_fir_instance_q15 * S,
<> 144:ef7eb2e8f9f7 1139 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 1140 q15_t * pDst,
<> 144:ef7eb2e8f9f7 1141 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1142
<> 144:ef7eb2e8f9f7 1143 /**
<> 144:ef7eb2e8f9f7 1144 * @brief Initialization function for the Q15 FIR filter.
<> 144:ef7eb2e8f9f7 1145 * @param[in,out] *S points to an instance of the Q15 FIR filter structure.
<> 144:ef7eb2e8f9f7 1146 * @param[in] numTaps Number of filter coefficients in the filter. Must be even and greater than or equal to 4.
<> 144:ef7eb2e8f9f7 1147 * @param[in] *pCoeffs points to the filter coefficients.
<> 144:ef7eb2e8f9f7 1148 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 1149 * @param[in] blockSize number of samples that are processed at a time.
<> 144:ef7eb2e8f9f7 1150 * @return The function returns ARM_MATH_SUCCESS if initialization was successful or ARM_MATH_ARGUMENT_ERROR if
<> 144:ef7eb2e8f9f7 1151 * <code>numTaps</code> is not a supported value.
<> 144:ef7eb2e8f9f7 1152 */
<> 144:ef7eb2e8f9f7 1153
<> 144:ef7eb2e8f9f7 1154 arm_status arm_fir_init_q15(
<> 144:ef7eb2e8f9f7 1155 arm_fir_instance_q15 * S,
<> 144:ef7eb2e8f9f7 1156 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 1157 q15_t * pCoeffs,
<> 144:ef7eb2e8f9f7 1158 q15_t * pState,
<> 144:ef7eb2e8f9f7 1159 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1160
<> 144:ef7eb2e8f9f7 1161 /**
<> 144:ef7eb2e8f9f7 1162 * @brief Processing function for the Q31 FIR filter.
<> 144:ef7eb2e8f9f7 1163 * @param[in] *S points to an instance of the Q31 FIR filter structure.
<> 144:ef7eb2e8f9f7 1164 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 1165 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 1166 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 1167 * @return none.
<> 144:ef7eb2e8f9f7 1168 */
<> 144:ef7eb2e8f9f7 1169 void arm_fir_q31(
<> 144:ef7eb2e8f9f7 1170 const arm_fir_instance_q31 * S,
<> 144:ef7eb2e8f9f7 1171 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 1172 q31_t * pDst,
<> 144:ef7eb2e8f9f7 1173 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1174
<> 144:ef7eb2e8f9f7 1175 /**
<> 144:ef7eb2e8f9f7 1176 * @brief Processing function for the fast Q31 FIR filter for Cortex-M3 and Cortex-M4.
<> 144:ef7eb2e8f9f7 1177 * @param[in] *S points to an instance of the Q31 FIR structure.
<> 144:ef7eb2e8f9f7 1178 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 1179 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 1180 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 1181 * @return none.
<> 144:ef7eb2e8f9f7 1182 */
<> 144:ef7eb2e8f9f7 1183 void arm_fir_fast_q31(
<> 144:ef7eb2e8f9f7 1184 const arm_fir_instance_q31 * S,
<> 144:ef7eb2e8f9f7 1185 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 1186 q31_t * pDst,
<> 144:ef7eb2e8f9f7 1187 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1188
<> 144:ef7eb2e8f9f7 1189 /**
<> 144:ef7eb2e8f9f7 1190 * @brief Initialization function for the Q31 FIR filter.
<> 144:ef7eb2e8f9f7 1191 * @param[in,out] *S points to an instance of the Q31 FIR structure.
<> 144:ef7eb2e8f9f7 1192 * @param[in] numTaps Number of filter coefficients in the filter.
<> 144:ef7eb2e8f9f7 1193 * @param[in] *pCoeffs points to the filter coefficients.
<> 144:ef7eb2e8f9f7 1194 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 1195 * @param[in] blockSize number of samples that are processed at a time.
<> 144:ef7eb2e8f9f7 1196 * @return none.
<> 144:ef7eb2e8f9f7 1197 */
<> 144:ef7eb2e8f9f7 1198 void arm_fir_init_q31(
<> 144:ef7eb2e8f9f7 1199 arm_fir_instance_q31 * S,
<> 144:ef7eb2e8f9f7 1200 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 1201 q31_t * pCoeffs,
<> 144:ef7eb2e8f9f7 1202 q31_t * pState,
<> 144:ef7eb2e8f9f7 1203 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1204
<> 144:ef7eb2e8f9f7 1205 /**
<> 144:ef7eb2e8f9f7 1206 * @brief Processing function for the floating-point FIR filter.
<> 144:ef7eb2e8f9f7 1207 * @param[in] *S points to an instance of the floating-point FIR structure.
<> 144:ef7eb2e8f9f7 1208 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 1209 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 1210 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 1211 * @return none.
<> 144:ef7eb2e8f9f7 1212 */
<> 144:ef7eb2e8f9f7 1213 void arm_fir_f32(
<> 144:ef7eb2e8f9f7 1214 const arm_fir_instance_f32 * S,
<> 144:ef7eb2e8f9f7 1215 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 1216 float32_t * pDst,
<> 144:ef7eb2e8f9f7 1217 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1218
<> 144:ef7eb2e8f9f7 1219 /**
<> 144:ef7eb2e8f9f7 1220 * @brief Initialization function for the floating-point FIR filter.
<> 144:ef7eb2e8f9f7 1221 * @param[in,out] *S points to an instance of the floating-point FIR filter structure.
<> 144:ef7eb2e8f9f7 1222 * @param[in] numTaps Number of filter coefficients in the filter.
<> 144:ef7eb2e8f9f7 1223 * @param[in] *pCoeffs points to the filter coefficients.
<> 144:ef7eb2e8f9f7 1224 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 1225 * @param[in] blockSize number of samples that are processed at a time.
<> 144:ef7eb2e8f9f7 1226 * @return none.
<> 144:ef7eb2e8f9f7 1227 */
<> 144:ef7eb2e8f9f7 1228 void arm_fir_init_f32(
<> 144:ef7eb2e8f9f7 1229 arm_fir_instance_f32 * S,
<> 144:ef7eb2e8f9f7 1230 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 1231 float32_t * pCoeffs,
<> 144:ef7eb2e8f9f7 1232 float32_t * pState,
<> 144:ef7eb2e8f9f7 1233 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1234
<> 144:ef7eb2e8f9f7 1235
<> 144:ef7eb2e8f9f7 1236 /**
<> 144:ef7eb2e8f9f7 1237 * @brief Instance structure for the Q15 Biquad cascade filter.
<> 144:ef7eb2e8f9f7 1238 */
<> 144:ef7eb2e8f9f7 1239 typedef struct
<> 144:ef7eb2e8f9f7 1240 {
<> 144:ef7eb2e8f9f7 1241 int8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 144:ef7eb2e8f9f7 1242 q15_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
<> 144:ef7eb2e8f9f7 1243 q15_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
<> 144:ef7eb2e8f9f7 1244 int8_t postShift; /**< Additional shift, in bits, applied to each output sample. */
<> 144:ef7eb2e8f9f7 1245
<> 144:ef7eb2e8f9f7 1246 } arm_biquad_casd_df1_inst_q15;
<> 144:ef7eb2e8f9f7 1247
<> 144:ef7eb2e8f9f7 1248
<> 144:ef7eb2e8f9f7 1249 /**
<> 144:ef7eb2e8f9f7 1250 * @brief Instance structure for the Q31 Biquad cascade filter.
<> 144:ef7eb2e8f9f7 1251 */
<> 144:ef7eb2e8f9f7 1252 typedef struct
<> 144:ef7eb2e8f9f7 1253 {
<> 144:ef7eb2e8f9f7 1254 uint32_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 144:ef7eb2e8f9f7 1255 q31_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
<> 144:ef7eb2e8f9f7 1256 q31_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
<> 144:ef7eb2e8f9f7 1257 uint8_t postShift; /**< Additional shift, in bits, applied to each output sample. */
<> 144:ef7eb2e8f9f7 1258
<> 144:ef7eb2e8f9f7 1259 } arm_biquad_casd_df1_inst_q31;
<> 144:ef7eb2e8f9f7 1260
<> 144:ef7eb2e8f9f7 1261 /**
<> 144:ef7eb2e8f9f7 1262 * @brief Instance structure for the floating-point Biquad cascade filter.
<> 144:ef7eb2e8f9f7 1263 */
<> 144:ef7eb2e8f9f7 1264 typedef struct
<> 144:ef7eb2e8f9f7 1265 {
<> 144:ef7eb2e8f9f7 1266 uint32_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 144:ef7eb2e8f9f7 1267 float32_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
<> 144:ef7eb2e8f9f7 1268 float32_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
<> 144:ef7eb2e8f9f7 1269
<> 144:ef7eb2e8f9f7 1270
<> 144:ef7eb2e8f9f7 1271 } arm_biquad_casd_df1_inst_f32;
<> 144:ef7eb2e8f9f7 1272
<> 144:ef7eb2e8f9f7 1273
<> 144:ef7eb2e8f9f7 1274
<> 144:ef7eb2e8f9f7 1275 /**
<> 144:ef7eb2e8f9f7 1276 * @brief Processing function for the Q15 Biquad cascade filter.
<> 144:ef7eb2e8f9f7 1277 * @param[in] *S points to an instance of the Q15 Biquad cascade structure.
<> 144:ef7eb2e8f9f7 1278 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 1279 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 1280 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 1281 * @return none.
<> 144:ef7eb2e8f9f7 1282 */
<> 144:ef7eb2e8f9f7 1283
<> 144:ef7eb2e8f9f7 1284 void arm_biquad_cascade_df1_q15(
<> 144:ef7eb2e8f9f7 1285 const arm_biquad_casd_df1_inst_q15 * S,
<> 144:ef7eb2e8f9f7 1286 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 1287 q15_t * pDst,
<> 144:ef7eb2e8f9f7 1288 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1289
<> 144:ef7eb2e8f9f7 1290 /**
<> 144:ef7eb2e8f9f7 1291 * @brief Initialization function for the Q15 Biquad cascade filter.
<> 144:ef7eb2e8f9f7 1292 * @param[in,out] *S points to an instance of the Q15 Biquad cascade structure.
<> 144:ef7eb2e8f9f7 1293 * @param[in] numStages number of 2nd order stages in the filter.
<> 144:ef7eb2e8f9f7 1294 * @param[in] *pCoeffs points to the filter coefficients.
<> 144:ef7eb2e8f9f7 1295 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 1296 * @param[in] postShift Shift to be applied to the output. Varies according to the coefficients format
<> 144:ef7eb2e8f9f7 1297 * @return none
<> 144:ef7eb2e8f9f7 1298 */
<> 144:ef7eb2e8f9f7 1299
<> 144:ef7eb2e8f9f7 1300 void arm_biquad_cascade_df1_init_q15(
<> 144:ef7eb2e8f9f7 1301 arm_biquad_casd_df1_inst_q15 * S,
<> 144:ef7eb2e8f9f7 1302 uint8_t numStages,
<> 144:ef7eb2e8f9f7 1303 q15_t * pCoeffs,
<> 144:ef7eb2e8f9f7 1304 q15_t * pState,
<> 144:ef7eb2e8f9f7 1305 int8_t postShift);
<> 144:ef7eb2e8f9f7 1306
<> 144:ef7eb2e8f9f7 1307
<> 144:ef7eb2e8f9f7 1308 /**
<> 144:ef7eb2e8f9f7 1309 * @brief Fast but less precise processing function for the Q15 Biquad cascade filter for Cortex-M3 and Cortex-M4.
<> 144:ef7eb2e8f9f7 1310 * @param[in] *S points to an instance of the Q15 Biquad cascade structure.
<> 144:ef7eb2e8f9f7 1311 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 1312 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 1313 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 1314 * @return none.
<> 144:ef7eb2e8f9f7 1315 */
<> 144:ef7eb2e8f9f7 1316
<> 144:ef7eb2e8f9f7 1317 void arm_biquad_cascade_df1_fast_q15(
<> 144:ef7eb2e8f9f7 1318 const arm_biquad_casd_df1_inst_q15 * S,
<> 144:ef7eb2e8f9f7 1319 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 1320 q15_t * pDst,
<> 144:ef7eb2e8f9f7 1321 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1322
<> 144:ef7eb2e8f9f7 1323
<> 144:ef7eb2e8f9f7 1324 /**
<> 144:ef7eb2e8f9f7 1325 * @brief Processing function for the Q31 Biquad cascade filter
<> 144:ef7eb2e8f9f7 1326 * @param[in] *S points to an instance of the Q31 Biquad cascade structure.
<> 144:ef7eb2e8f9f7 1327 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 1328 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 1329 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 1330 * @return none.
<> 144:ef7eb2e8f9f7 1331 */
<> 144:ef7eb2e8f9f7 1332
<> 144:ef7eb2e8f9f7 1333 void arm_biquad_cascade_df1_q31(
<> 144:ef7eb2e8f9f7 1334 const arm_biquad_casd_df1_inst_q31 * S,
<> 144:ef7eb2e8f9f7 1335 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 1336 q31_t * pDst,
<> 144:ef7eb2e8f9f7 1337 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1338
<> 144:ef7eb2e8f9f7 1339 /**
<> 144:ef7eb2e8f9f7 1340 * @brief Fast but less precise processing function for the Q31 Biquad cascade filter for Cortex-M3 and Cortex-M4.
<> 144:ef7eb2e8f9f7 1341 * @param[in] *S points to an instance of the Q31 Biquad cascade structure.
<> 144:ef7eb2e8f9f7 1342 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 1343 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 1344 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 1345 * @return none.
<> 144:ef7eb2e8f9f7 1346 */
<> 144:ef7eb2e8f9f7 1347
<> 144:ef7eb2e8f9f7 1348 void arm_biquad_cascade_df1_fast_q31(
<> 144:ef7eb2e8f9f7 1349 const arm_biquad_casd_df1_inst_q31 * S,
<> 144:ef7eb2e8f9f7 1350 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 1351 q31_t * pDst,
<> 144:ef7eb2e8f9f7 1352 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1353
<> 144:ef7eb2e8f9f7 1354 /**
<> 144:ef7eb2e8f9f7 1355 * @brief Initialization function for the Q31 Biquad cascade filter.
<> 144:ef7eb2e8f9f7 1356 * @param[in,out] *S points to an instance of the Q31 Biquad cascade structure.
<> 144:ef7eb2e8f9f7 1357 * @param[in] numStages number of 2nd order stages in the filter.
<> 144:ef7eb2e8f9f7 1358 * @param[in] *pCoeffs points to the filter coefficients.
<> 144:ef7eb2e8f9f7 1359 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 1360 * @param[in] postShift Shift to be applied to the output. Varies according to the coefficients format
<> 144:ef7eb2e8f9f7 1361 * @return none
<> 144:ef7eb2e8f9f7 1362 */
<> 144:ef7eb2e8f9f7 1363
<> 144:ef7eb2e8f9f7 1364 void arm_biquad_cascade_df1_init_q31(
<> 144:ef7eb2e8f9f7 1365 arm_biquad_casd_df1_inst_q31 * S,
<> 144:ef7eb2e8f9f7 1366 uint8_t numStages,
<> 144:ef7eb2e8f9f7 1367 q31_t * pCoeffs,
<> 144:ef7eb2e8f9f7 1368 q31_t * pState,
<> 144:ef7eb2e8f9f7 1369 int8_t postShift);
<> 144:ef7eb2e8f9f7 1370
<> 144:ef7eb2e8f9f7 1371 /**
<> 144:ef7eb2e8f9f7 1372 * @brief Processing function for the floating-point Biquad cascade filter.
<> 144:ef7eb2e8f9f7 1373 * @param[in] *S points to an instance of the floating-point Biquad cascade structure.
<> 144:ef7eb2e8f9f7 1374 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 1375 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 1376 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 1377 * @return none.
<> 144:ef7eb2e8f9f7 1378 */
<> 144:ef7eb2e8f9f7 1379
<> 144:ef7eb2e8f9f7 1380 void arm_biquad_cascade_df1_f32(
<> 144:ef7eb2e8f9f7 1381 const arm_biquad_casd_df1_inst_f32 * S,
<> 144:ef7eb2e8f9f7 1382 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 1383 float32_t * pDst,
<> 144:ef7eb2e8f9f7 1384 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1385
<> 144:ef7eb2e8f9f7 1386 /**
<> 144:ef7eb2e8f9f7 1387 * @brief Initialization function for the floating-point Biquad cascade filter.
<> 144:ef7eb2e8f9f7 1388 * @param[in,out] *S points to an instance of the floating-point Biquad cascade structure.
<> 144:ef7eb2e8f9f7 1389 * @param[in] numStages number of 2nd order stages in the filter.
<> 144:ef7eb2e8f9f7 1390 * @param[in] *pCoeffs points to the filter coefficients.
<> 144:ef7eb2e8f9f7 1391 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 1392 * @return none
<> 144:ef7eb2e8f9f7 1393 */
<> 144:ef7eb2e8f9f7 1394
<> 144:ef7eb2e8f9f7 1395 void arm_biquad_cascade_df1_init_f32(
<> 144:ef7eb2e8f9f7 1396 arm_biquad_casd_df1_inst_f32 * S,
<> 144:ef7eb2e8f9f7 1397 uint8_t numStages,
<> 144:ef7eb2e8f9f7 1398 float32_t * pCoeffs,
<> 144:ef7eb2e8f9f7 1399 float32_t * pState);
<> 144:ef7eb2e8f9f7 1400
<> 144:ef7eb2e8f9f7 1401
<> 144:ef7eb2e8f9f7 1402 /**
<> 144:ef7eb2e8f9f7 1403 * @brief Instance structure for the floating-point matrix structure.
<> 144:ef7eb2e8f9f7 1404 */
<> 144:ef7eb2e8f9f7 1405
<> 144:ef7eb2e8f9f7 1406 typedef struct
<> 144:ef7eb2e8f9f7 1407 {
<> 144:ef7eb2e8f9f7 1408 uint16_t numRows; /**< number of rows of the matrix. */
<> 144:ef7eb2e8f9f7 1409 uint16_t numCols; /**< number of columns of the matrix. */
<> 144:ef7eb2e8f9f7 1410 float32_t *pData; /**< points to the data of the matrix. */
<> 144:ef7eb2e8f9f7 1411 } arm_matrix_instance_f32;
<> 144:ef7eb2e8f9f7 1412
<> 144:ef7eb2e8f9f7 1413 /**
<> 144:ef7eb2e8f9f7 1414 * @brief Instance structure for the Q15 matrix structure.
<> 144:ef7eb2e8f9f7 1415 */
<> 144:ef7eb2e8f9f7 1416
<> 144:ef7eb2e8f9f7 1417 typedef struct
<> 144:ef7eb2e8f9f7 1418 {
<> 144:ef7eb2e8f9f7 1419 uint16_t numRows; /**< number of rows of the matrix. */
<> 144:ef7eb2e8f9f7 1420 uint16_t numCols; /**< number of columns of the matrix. */
<> 144:ef7eb2e8f9f7 1421 q15_t *pData; /**< points to the data of the matrix. */
<> 144:ef7eb2e8f9f7 1422
<> 144:ef7eb2e8f9f7 1423 } arm_matrix_instance_q15;
<> 144:ef7eb2e8f9f7 1424
<> 144:ef7eb2e8f9f7 1425 /**
<> 144:ef7eb2e8f9f7 1426 * @brief Instance structure for the Q31 matrix structure.
<> 144:ef7eb2e8f9f7 1427 */
<> 144:ef7eb2e8f9f7 1428
<> 144:ef7eb2e8f9f7 1429 typedef struct
<> 144:ef7eb2e8f9f7 1430 {
<> 144:ef7eb2e8f9f7 1431 uint16_t numRows; /**< number of rows of the matrix. */
<> 144:ef7eb2e8f9f7 1432 uint16_t numCols; /**< number of columns of the matrix. */
<> 144:ef7eb2e8f9f7 1433 q31_t *pData; /**< points to the data of the matrix. */
<> 144:ef7eb2e8f9f7 1434
<> 144:ef7eb2e8f9f7 1435 } arm_matrix_instance_q31;
<> 144:ef7eb2e8f9f7 1436
<> 144:ef7eb2e8f9f7 1437
<> 144:ef7eb2e8f9f7 1438
<> 144:ef7eb2e8f9f7 1439 /**
<> 144:ef7eb2e8f9f7 1440 * @brief Floating-point matrix addition.
<> 144:ef7eb2e8f9f7 1441 * @param[in] *pSrcA points to the first input matrix structure
<> 144:ef7eb2e8f9f7 1442 * @param[in] *pSrcB points to the second input matrix structure
<> 144:ef7eb2e8f9f7 1443 * @param[out] *pDst points to output matrix structure
<> 144:ef7eb2e8f9f7 1444 * @return The function returns either
<> 144:ef7eb2e8f9f7 1445 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 144:ef7eb2e8f9f7 1446 */
<> 144:ef7eb2e8f9f7 1447
<> 144:ef7eb2e8f9f7 1448 arm_status arm_mat_add_f32(
<> 144:ef7eb2e8f9f7 1449 const arm_matrix_instance_f32 * pSrcA,
<> 144:ef7eb2e8f9f7 1450 const arm_matrix_instance_f32 * pSrcB,
<> 144:ef7eb2e8f9f7 1451 arm_matrix_instance_f32 * pDst);
<> 144:ef7eb2e8f9f7 1452
<> 144:ef7eb2e8f9f7 1453 /**
<> 144:ef7eb2e8f9f7 1454 * @brief Q15 matrix addition.
<> 144:ef7eb2e8f9f7 1455 * @param[in] *pSrcA points to the first input matrix structure
<> 144:ef7eb2e8f9f7 1456 * @param[in] *pSrcB points to the second input matrix structure
<> 144:ef7eb2e8f9f7 1457 * @param[out] *pDst points to output matrix structure
<> 144:ef7eb2e8f9f7 1458 * @return The function returns either
<> 144:ef7eb2e8f9f7 1459 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 144:ef7eb2e8f9f7 1460 */
<> 144:ef7eb2e8f9f7 1461
<> 144:ef7eb2e8f9f7 1462 arm_status arm_mat_add_q15(
<> 144:ef7eb2e8f9f7 1463 const arm_matrix_instance_q15 * pSrcA,
<> 144:ef7eb2e8f9f7 1464 const arm_matrix_instance_q15 * pSrcB,
<> 144:ef7eb2e8f9f7 1465 arm_matrix_instance_q15 * pDst);
<> 144:ef7eb2e8f9f7 1466
<> 144:ef7eb2e8f9f7 1467 /**
<> 144:ef7eb2e8f9f7 1468 * @brief Q31 matrix addition.
<> 144:ef7eb2e8f9f7 1469 * @param[in] *pSrcA points to the first input matrix structure
<> 144:ef7eb2e8f9f7 1470 * @param[in] *pSrcB points to the second input matrix structure
<> 144:ef7eb2e8f9f7 1471 * @param[out] *pDst points to output matrix structure
<> 144:ef7eb2e8f9f7 1472 * @return The function returns either
<> 144:ef7eb2e8f9f7 1473 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 144:ef7eb2e8f9f7 1474 */
<> 144:ef7eb2e8f9f7 1475
<> 144:ef7eb2e8f9f7 1476 arm_status arm_mat_add_q31(
<> 144:ef7eb2e8f9f7 1477 const arm_matrix_instance_q31 * pSrcA,
<> 144:ef7eb2e8f9f7 1478 const arm_matrix_instance_q31 * pSrcB,
<> 144:ef7eb2e8f9f7 1479 arm_matrix_instance_q31 * pDst);
<> 144:ef7eb2e8f9f7 1480
<> 144:ef7eb2e8f9f7 1481
<> 144:ef7eb2e8f9f7 1482 /**
<> 144:ef7eb2e8f9f7 1483 * @brief Floating-point matrix transpose.
<> 144:ef7eb2e8f9f7 1484 * @param[in] *pSrc points to the input matrix
<> 144:ef7eb2e8f9f7 1485 * @param[out] *pDst points to the output matrix
<> 144:ef7eb2e8f9f7 1486 * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code>
<> 144:ef7eb2e8f9f7 1487 * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 144:ef7eb2e8f9f7 1488 */
<> 144:ef7eb2e8f9f7 1489
<> 144:ef7eb2e8f9f7 1490 arm_status arm_mat_trans_f32(
<> 144:ef7eb2e8f9f7 1491 const arm_matrix_instance_f32 * pSrc,
<> 144:ef7eb2e8f9f7 1492 arm_matrix_instance_f32 * pDst);
<> 144:ef7eb2e8f9f7 1493
<> 144:ef7eb2e8f9f7 1494
<> 144:ef7eb2e8f9f7 1495 /**
<> 144:ef7eb2e8f9f7 1496 * @brief Q15 matrix transpose.
<> 144:ef7eb2e8f9f7 1497 * @param[in] *pSrc points to the input matrix
<> 144:ef7eb2e8f9f7 1498 * @param[out] *pDst points to the output matrix
<> 144:ef7eb2e8f9f7 1499 * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code>
<> 144:ef7eb2e8f9f7 1500 * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 144:ef7eb2e8f9f7 1501 */
<> 144:ef7eb2e8f9f7 1502
<> 144:ef7eb2e8f9f7 1503 arm_status arm_mat_trans_q15(
<> 144:ef7eb2e8f9f7 1504 const arm_matrix_instance_q15 * pSrc,
<> 144:ef7eb2e8f9f7 1505 arm_matrix_instance_q15 * pDst);
<> 144:ef7eb2e8f9f7 1506
<> 144:ef7eb2e8f9f7 1507 /**
<> 144:ef7eb2e8f9f7 1508 * @brief Q31 matrix transpose.
<> 144:ef7eb2e8f9f7 1509 * @param[in] *pSrc points to the input matrix
<> 144:ef7eb2e8f9f7 1510 * @param[out] *pDst points to the output matrix
<> 144:ef7eb2e8f9f7 1511 * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code>
<> 144:ef7eb2e8f9f7 1512 * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 144:ef7eb2e8f9f7 1513 */
<> 144:ef7eb2e8f9f7 1514
<> 144:ef7eb2e8f9f7 1515 arm_status arm_mat_trans_q31(
<> 144:ef7eb2e8f9f7 1516 const arm_matrix_instance_q31 * pSrc,
<> 144:ef7eb2e8f9f7 1517 arm_matrix_instance_q31 * pDst);
<> 144:ef7eb2e8f9f7 1518
<> 144:ef7eb2e8f9f7 1519
<> 144:ef7eb2e8f9f7 1520 /**
<> 144:ef7eb2e8f9f7 1521 * @brief Floating-point matrix multiplication
<> 144:ef7eb2e8f9f7 1522 * @param[in] *pSrcA points to the first input matrix structure
<> 144:ef7eb2e8f9f7 1523 * @param[in] *pSrcB points to the second input matrix structure
<> 144:ef7eb2e8f9f7 1524 * @param[out] *pDst points to output matrix structure
<> 144:ef7eb2e8f9f7 1525 * @return The function returns either
<> 144:ef7eb2e8f9f7 1526 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 144:ef7eb2e8f9f7 1527 */
<> 144:ef7eb2e8f9f7 1528
<> 144:ef7eb2e8f9f7 1529 arm_status arm_mat_mult_f32(
<> 144:ef7eb2e8f9f7 1530 const arm_matrix_instance_f32 * pSrcA,
<> 144:ef7eb2e8f9f7 1531 const arm_matrix_instance_f32 * pSrcB,
<> 144:ef7eb2e8f9f7 1532 arm_matrix_instance_f32 * pDst);
<> 144:ef7eb2e8f9f7 1533
<> 144:ef7eb2e8f9f7 1534 /**
<> 144:ef7eb2e8f9f7 1535 * @brief Q15 matrix multiplication
<> 144:ef7eb2e8f9f7 1536 * @param[in] *pSrcA points to the first input matrix structure
<> 144:ef7eb2e8f9f7 1537 * @param[in] *pSrcB points to the second input matrix structure
<> 144:ef7eb2e8f9f7 1538 * @param[out] *pDst points to output matrix structure
<> 144:ef7eb2e8f9f7 1539 * @param[in] *pState points to the array for storing intermediate results
<> 144:ef7eb2e8f9f7 1540 * @return The function returns either
<> 144:ef7eb2e8f9f7 1541 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 144:ef7eb2e8f9f7 1542 */
<> 144:ef7eb2e8f9f7 1543
<> 144:ef7eb2e8f9f7 1544 arm_status arm_mat_mult_q15(
<> 144:ef7eb2e8f9f7 1545 const arm_matrix_instance_q15 * pSrcA,
<> 144:ef7eb2e8f9f7 1546 const arm_matrix_instance_q15 * pSrcB,
<> 144:ef7eb2e8f9f7 1547 arm_matrix_instance_q15 * pDst,
<> 144:ef7eb2e8f9f7 1548 q15_t * pState);
<> 144:ef7eb2e8f9f7 1549
<> 144:ef7eb2e8f9f7 1550 /**
<> 144:ef7eb2e8f9f7 1551 * @brief Q15 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4
<> 144:ef7eb2e8f9f7 1552 * @param[in] *pSrcA points to the first input matrix structure
<> 144:ef7eb2e8f9f7 1553 * @param[in] *pSrcB points to the second input matrix structure
<> 144:ef7eb2e8f9f7 1554 * @param[out] *pDst points to output matrix structure
<> 144:ef7eb2e8f9f7 1555 * @param[in] *pState points to the array for storing intermediate results
<> 144:ef7eb2e8f9f7 1556 * @return The function returns either
<> 144:ef7eb2e8f9f7 1557 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 144:ef7eb2e8f9f7 1558 */
<> 144:ef7eb2e8f9f7 1559
<> 144:ef7eb2e8f9f7 1560 arm_status arm_mat_mult_fast_q15(
<> 144:ef7eb2e8f9f7 1561 const arm_matrix_instance_q15 * pSrcA,
<> 144:ef7eb2e8f9f7 1562 const arm_matrix_instance_q15 * pSrcB,
<> 144:ef7eb2e8f9f7 1563 arm_matrix_instance_q15 * pDst,
<> 144:ef7eb2e8f9f7 1564 q15_t * pState);
<> 144:ef7eb2e8f9f7 1565
<> 144:ef7eb2e8f9f7 1566 /**
<> 144:ef7eb2e8f9f7 1567 * @brief Q31 matrix multiplication
<> 144:ef7eb2e8f9f7 1568 * @param[in] *pSrcA points to the first input matrix structure
<> 144:ef7eb2e8f9f7 1569 * @param[in] *pSrcB points to the second input matrix structure
<> 144:ef7eb2e8f9f7 1570 * @param[out] *pDst points to output matrix structure
<> 144:ef7eb2e8f9f7 1571 * @return The function returns either
<> 144:ef7eb2e8f9f7 1572 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 144:ef7eb2e8f9f7 1573 */
<> 144:ef7eb2e8f9f7 1574
<> 144:ef7eb2e8f9f7 1575 arm_status arm_mat_mult_q31(
<> 144:ef7eb2e8f9f7 1576 const arm_matrix_instance_q31 * pSrcA,
<> 144:ef7eb2e8f9f7 1577 const arm_matrix_instance_q31 * pSrcB,
<> 144:ef7eb2e8f9f7 1578 arm_matrix_instance_q31 * pDst);
<> 144:ef7eb2e8f9f7 1579
<> 144:ef7eb2e8f9f7 1580 /**
<> 144:ef7eb2e8f9f7 1581 * @brief Q31 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4
<> 144:ef7eb2e8f9f7 1582 * @param[in] *pSrcA points to the first input matrix structure
<> 144:ef7eb2e8f9f7 1583 * @param[in] *pSrcB points to the second input matrix structure
<> 144:ef7eb2e8f9f7 1584 * @param[out] *pDst points to output matrix structure
<> 144:ef7eb2e8f9f7 1585 * @return The function returns either
<> 144:ef7eb2e8f9f7 1586 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 144:ef7eb2e8f9f7 1587 */
<> 144:ef7eb2e8f9f7 1588
<> 144:ef7eb2e8f9f7 1589 arm_status arm_mat_mult_fast_q31(
<> 144:ef7eb2e8f9f7 1590 const arm_matrix_instance_q31 * pSrcA,
<> 144:ef7eb2e8f9f7 1591 const arm_matrix_instance_q31 * pSrcB,
<> 144:ef7eb2e8f9f7 1592 arm_matrix_instance_q31 * pDst);
<> 144:ef7eb2e8f9f7 1593
<> 144:ef7eb2e8f9f7 1594
<> 144:ef7eb2e8f9f7 1595 /**
<> 144:ef7eb2e8f9f7 1596 * @brief Floating-point matrix subtraction
<> 144:ef7eb2e8f9f7 1597 * @param[in] *pSrcA points to the first input matrix structure
<> 144:ef7eb2e8f9f7 1598 * @param[in] *pSrcB points to the second input matrix structure
<> 144:ef7eb2e8f9f7 1599 * @param[out] *pDst points to output matrix structure
<> 144:ef7eb2e8f9f7 1600 * @return The function returns either
<> 144:ef7eb2e8f9f7 1601 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 144:ef7eb2e8f9f7 1602 */
<> 144:ef7eb2e8f9f7 1603
<> 144:ef7eb2e8f9f7 1604 arm_status arm_mat_sub_f32(
<> 144:ef7eb2e8f9f7 1605 const arm_matrix_instance_f32 * pSrcA,
<> 144:ef7eb2e8f9f7 1606 const arm_matrix_instance_f32 * pSrcB,
<> 144:ef7eb2e8f9f7 1607 arm_matrix_instance_f32 * pDst);
<> 144:ef7eb2e8f9f7 1608
<> 144:ef7eb2e8f9f7 1609 /**
<> 144:ef7eb2e8f9f7 1610 * @brief Q15 matrix subtraction
<> 144:ef7eb2e8f9f7 1611 * @param[in] *pSrcA points to the first input matrix structure
<> 144:ef7eb2e8f9f7 1612 * @param[in] *pSrcB points to the second input matrix structure
<> 144:ef7eb2e8f9f7 1613 * @param[out] *pDst points to output matrix structure
<> 144:ef7eb2e8f9f7 1614 * @return The function returns either
<> 144:ef7eb2e8f9f7 1615 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 144:ef7eb2e8f9f7 1616 */
<> 144:ef7eb2e8f9f7 1617
<> 144:ef7eb2e8f9f7 1618 arm_status arm_mat_sub_q15(
<> 144:ef7eb2e8f9f7 1619 const arm_matrix_instance_q15 * pSrcA,
<> 144:ef7eb2e8f9f7 1620 const arm_matrix_instance_q15 * pSrcB,
<> 144:ef7eb2e8f9f7 1621 arm_matrix_instance_q15 * pDst);
<> 144:ef7eb2e8f9f7 1622
<> 144:ef7eb2e8f9f7 1623 /**
<> 144:ef7eb2e8f9f7 1624 * @brief Q31 matrix subtraction
<> 144:ef7eb2e8f9f7 1625 * @param[in] *pSrcA points to the first input matrix structure
<> 144:ef7eb2e8f9f7 1626 * @param[in] *pSrcB points to the second input matrix structure
<> 144:ef7eb2e8f9f7 1627 * @param[out] *pDst points to output matrix structure
<> 144:ef7eb2e8f9f7 1628 * @return The function returns either
<> 144:ef7eb2e8f9f7 1629 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 144:ef7eb2e8f9f7 1630 */
<> 144:ef7eb2e8f9f7 1631
<> 144:ef7eb2e8f9f7 1632 arm_status arm_mat_sub_q31(
<> 144:ef7eb2e8f9f7 1633 const arm_matrix_instance_q31 * pSrcA,
<> 144:ef7eb2e8f9f7 1634 const arm_matrix_instance_q31 * pSrcB,
<> 144:ef7eb2e8f9f7 1635 arm_matrix_instance_q31 * pDst);
<> 144:ef7eb2e8f9f7 1636
<> 144:ef7eb2e8f9f7 1637 /**
<> 144:ef7eb2e8f9f7 1638 * @brief Floating-point matrix scaling.
<> 144:ef7eb2e8f9f7 1639 * @param[in] *pSrc points to the input matrix
<> 144:ef7eb2e8f9f7 1640 * @param[in] scale scale factor
<> 144:ef7eb2e8f9f7 1641 * @param[out] *pDst points to the output matrix
<> 144:ef7eb2e8f9f7 1642 * @return The function returns either
<> 144:ef7eb2e8f9f7 1643 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 144:ef7eb2e8f9f7 1644 */
<> 144:ef7eb2e8f9f7 1645
<> 144:ef7eb2e8f9f7 1646 arm_status arm_mat_scale_f32(
<> 144:ef7eb2e8f9f7 1647 const arm_matrix_instance_f32 * pSrc,
<> 144:ef7eb2e8f9f7 1648 float32_t scale,
<> 144:ef7eb2e8f9f7 1649 arm_matrix_instance_f32 * pDst);
<> 144:ef7eb2e8f9f7 1650
<> 144:ef7eb2e8f9f7 1651 /**
<> 144:ef7eb2e8f9f7 1652 * @brief Q15 matrix scaling.
<> 144:ef7eb2e8f9f7 1653 * @param[in] *pSrc points to input matrix
<> 144:ef7eb2e8f9f7 1654 * @param[in] scaleFract fractional portion of the scale factor
<> 144:ef7eb2e8f9f7 1655 * @param[in] shift number of bits to shift the result by
<> 144:ef7eb2e8f9f7 1656 * @param[out] *pDst points to output matrix
<> 144:ef7eb2e8f9f7 1657 * @return The function returns either
<> 144:ef7eb2e8f9f7 1658 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 144:ef7eb2e8f9f7 1659 */
<> 144:ef7eb2e8f9f7 1660
<> 144:ef7eb2e8f9f7 1661 arm_status arm_mat_scale_q15(
<> 144:ef7eb2e8f9f7 1662 const arm_matrix_instance_q15 * pSrc,
<> 144:ef7eb2e8f9f7 1663 q15_t scaleFract,
<> 144:ef7eb2e8f9f7 1664 int32_t shift,
<> 144:ef7eb2e8f9f7 1665 arm_matrix_instance_q15 * pDst);
<> 144:ef7eb2e8f9f7 1666
<> 144:ef7eb2e8f9f7 1667 /**
<> 144:ef7eb2e8f9f7 1668 * @brief Q31 matrix scaling.
<> 144:ef7eb2e8f9f7 1669 * @param[in] *pSrc points to input matrix
<> 144:ef7eb2e8f9f7 1670 * @param[in] scaleFract fractional portion of the scale factor
<> 144:ef7eb2e8f9f7 1671 * @param[in] shift number of bits to shift the result by
<> 144:ef7eb2e8f9f7 1672 * @param[out] *pDst points to output matrix structure
<> 144:ef7eb2e8f9f7 1673 * @return The function returns either
<> 144:ef7eb2e8f9f7 1674 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 144:ef7eb2e8f9f7 1675 */
<> 144:ef7eb2e8f9f7 1676
<> 144:ef7eb2e8f9f7 1677 arm_status arm_mat_scale_q31(
<> 144:ef7eb2e8f9f7 1678 const arm_matrix_instance_q31 * pSrc,
<> 144:ef7eb2e8f9f7 1679 q31_t scaleFract,
<> 144:ef7eb2e8f9f7 1680 int32_t shift,
<> 144:ef7eb2e8f9f7 1681 arm_matrix_instance_q31 * pDst);
<> 144:ef7eb2e8f9f7 1682
<> 144:ef7eb2e8f9f7 1683
<> 144:ef7eb2e8f9f7 1684 /**
<> 144:ef7eb2e8f9f7 1685 * @brief Q31 matrix initialization.
<> 144:ef7eb2e8f9f7 1686 * @param[in,out] *S points to an instance of the floating-point matrix structure.
<> 144:ef7eb2e8f9f7 1687 * @param[in] nRows number of rows in the matrix.
<> 144:ef7eb2e8f9f7 1688 * @param[in] nColumns number of columns in the matrix.
<> 144:ef7eb2e8f9f7 1689 * @param[in] *pData points to the matrix data array.
<> 144:ef7eb2e8f9f7 1690 * @return none
<> 144:ef7eb2e8f9f7 1691 */
<> 144:ef7eb2e8f9f7 1692
<> 144:ef7eb2e8f9f7 1693 void arm_mat_init_q31(
<> 144:ef7eb2e8f9f7 1694 arm_matrix_instance_q31 * S,
<> 144:ef7eb2e8f9f7 1695 uint16_t nRows,
<> 144:ef7eb2e8f9f7 1696 uint16_t nColumns,
<> 144:ef7eb2e8f9f7 1697 q31_t * pData);
<> 144:ef7eb2e8f9f7 1698
<> 144:ef7eb2e8f9f7 1699 /**
<> 144:ef7eb2e8f9f7 1700 * @brief Q15 matrix initialization.
<> 144:ef7eb2e8f9f7 1701 * @param[in,out] *S points to an instance of the floating-point matrix structure.
<> 144:ef7eb2e8f9f7 1702 * @param[in] nRows number of rows in the matrix.
<> 144:ef7eb2e8f9f7 1703 * @param[in] nColumns number of columns in the matrix.
<> 144:ef7eb2e8f9f7 1704 * @param[in] *pData points to the matrix data array.
<> 144:ef7eb2e8f9f7 1705 * @return none
<> 144:ef7eb2e8f9f7 1706 */
<> 144:ef7eb2e8f9f7 1707
<> 144:ef7eb2e8f9f7 1708 void arm_mat_init_q15(
<> 144:ef7eb2e8f9f7 1709 arm_matrix_instance_q15 * S,
<> 144:ef7eb2e8f9f7 1710 uint16_t nRows,
<> 144:ef7eb2e8f9f7 1711 uint16_t nColumns,
<> 144:ef7eb2e8f9f7 1712 q15_t * pData);
<> 144:ef7eb2e8f9f7 1713
<> 144:ef7eb2e8f9f7 1714 /**
<> 144:ef7eb2e8f9f7 1715 * @brief Floating-point matrix initialization.
<> 144:ef7eb2e8f9f7 1716 * @param[in,out] *S points to an instance of the floating-point matrix structure.
<> 144:ef7eb2e8f9f7 1717 * @param[in] nRows number of rows in the matrix.
<> 144:ef7eb2e8f9f7 1718 * @param[in] nColumns number of columns in the matrix.
<> 144:ef7eb2e8f9f7 1719 * @param[in] *pData points to the matrix data array.
<> 144:ef7eb2e8f9f7 1720 * @return none
<> 144:ef7eb2e8f9f7 1721 */
<> 144:ef7eb2e8f9f7 1722
<> 144:ef7eb2e8f9f7 1723 void arm_mat_init_f32(
<> 144:ef7eb2e8f9f7 1724 arm_matrix_instance_f32 * S,
<> 144:ef7eb2e8f9f7 1725 uint16_t nRows,
<> 144:ef7eb2e8f9f7 1726 uint16_t nColumns,
<> 144:ef7eb2e8f9f7 1727 float32_t * pData);
<> 144:ef7eb2e8f9f7 1728
<> 144:ef7eb2e8f9f7 1729
<> 144:ef7eb2e8f9f7 1730
<> 144:ef7eb2e8f9f7 1731 /**
<> 144:ef7eb2e8f9f7 1732 * @brief Instance structure for the Q15 PID Control.
<> 144:ef7eb2e8f9f7 1733 */
<> 144:ef7eb2e8f9f7 1734 typedef struct
<> 144:ef7eb2e8f9f7 1735 {
<> 144:ef7eb2e8f9f7 1736 q15_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
<> 144:ef7eb2e8f9f7 1737 #ifdef ARM_MATH_CM0_FAMILY
<> 144:ef7eb2e8f9f7 1738 q15_t A1;
<> 144:ef7eb2e8f9f7 1739 q15_t A2;
<> 144:ef7eb2e8f9f7 1740 #else
<> 144:ef7eb2e8f9f7 1741 q31_t A1; /**< The derived gain A1 = -Kp - 2Kd | Kd.*/
<> 144:ef7eb2e8f9f7 1742 #endif
<> 144:ef7eb2e8f9f7 1743 q15_t state[3]; /**< The state array of length 3. */
<> 144:ef7eb2e8f9f7 1744 q15_t Kp; /**< The proportional gain. */
<> 144:ef7eb2e8f9f7 1745 q15_t Ki; /**< The integral gain. */
<> 144:ef7eb2e8f9f7 1746 q15_t Kd; /**< The derivative gain. */
<> 144:ef7eb2e8f9f7 1747 } arm_pid_instance_q15;
<> 144:ef7eb2e8f9f7 1748
<> 144:ef7eb2e8f9f7 1749 /**
<> 144:ef7eb2e8f9f7 1750 * @brief Instance structure for the Q31 PID Control.
<> 144:ef7eb2e8f9f7 1751 */
<> 144:ef7eb2e8f9f7 1752 typedef struct
<> 144:ef7eb2e8f9f7 1753 {
<> 144:ef7eb2e8f9f7 1754 q31_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
<> 144:ef7eb2e8f9f7 1755 q31_t A1; /**< The derived gain, A1 = -Kp - 2Kd. */
<> 144:ef7eb2e8f9f7 1756 q31_t A2; /**< The derived gain, A2 = Kd . */
<> 144:ef7eb2e8f9f7 1757 q31_t state[3]; /**< The state array of length 3. */
<> 144:ef7eb2e8f9f7 1758 q31_t Kp; /**< The proportional gain. */
<> 144:ef7eb2e8f9f7 1759 q31_t Ki; /**< The integral gain. */
<> 144:ef7eb2e8f9f7 1760 q31_t Kd; /**< The derivative gain. */
<> 144:ef7eb2e8f9f7 1761
<> 144:ef7eb2e8f9f7 1762 } arm_pid_instance_q31;
<> 144:ef7eb2e8f9f7 1763
<> 144:ef7eb2e8f9f7 1764 /**
<> 144:ef7eb2e8f9f7 1765 * @brief Instance structure for the floating-point PID Control.
<> 144:ef7eb2e8f9f7 1766 */
<> 144:ef7eb2e8f9f7 1767 typedef struct
<> 144:ef7eb2e8f9f7 1768 {
<> 144:ef7eb2e8f9f7 1769 float32_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
<> 144:ef7eb2e8f9f7 1770 float32_t A1; /**< The derived gain, A1 = -Kp - 2Kd. */
<> 144:ef7eb2e8f9f7 1771 float32_t A2; /**< The derived gain, A2 = Kd . */
<> 144:ef7eb2e8f9f7 1772 float32_t state[3]; /**< The state array of length 3. */
<> 144:ef7eb2e8f9f7 1773 float32_t Kp; /**< The proportional gain. */
<> 144:ef7eb2e8f9f7 1774 float32_t Ki; /**< The integral gain. */
<> 144:ef7eb2e8f9f7 1775 float32_t Kd; /**< The derivative gain. */
<> 144:ef7eb2e8f9f7 1776 } arm_pid_instance_f32;
<> 144:ef7eb2e8f9f7 1777
<> 144:ef7eb2e8f9f7 1778
<> 144:ef7eb2e8f9f7 1779
<> 144:ef7eb2e8f9f7 1780 /**
<> 144:ef7eb2e8f9f7 1781 * @brief Initialization function for the floating-point PID Control.
<> 144:ef7eb2e8f9f7 1782 * @param[in,out] *S points to an instance of the PID structure.
<> 144:ef7eb2e8f9f7 1783 * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state.
<> 144:ef7eb2e8f9f7 1784 * @return none.
<> 144:ef7eb2e8f9f7 1785 */
<> 144:ef7eb2e8f9f7 1786 void arm_pid_init_f32(
<> 144:ef7eb2e8f9f7 1787 arm_pid_instance_f32 * S,
<> 144:ef7eb2e8f9f7 1788 int32_t resetStateFlag);
<> 144:ef7eb2e8f9f7 1789
<> 144:ef7eb2e8f9f7 1790 /**
<> 144:ef7eb2e8f9f7 1791 * @brief Reset function for the floating-point PID Control.
<> 144:ef7eb2e8f9f7 1792 * @param[in,out] *S is an instance of the floating-point PID Control structure
<> 144:ef7eb2e8f9f7 1793 * @return none
<> 144:ef7eb2e8f9f7 1794 */
<> 144:ef7eb2e8f9f7 1795 void arm_pid_reset_f32(
<> 144:ef7eb2e8f9f7 1796 arm_pid_instance_f32 * S);
<> 144:ef7eb2e8f9f7 1797
<> 144:ef7eb2e8f9f7 1798
<> 144:ef7eb2e8f9f7 1799 /**
<> 144:ef7eb2e8f9f7 1800 * @brief Initialization function for the Q31 PID Control.
<> 144:ef7eb2e8f9f7 1801 * @param[in,out] *S points to an instance of the Q15 PID structure.
<> 144:ef7eb2e8f9f7 1802 * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state.
<> 144:ef7eb2e8f9f7 1803 * @return none.
<> 144:ef7eb2e8f9f7 1804 */
<> 144:ef7eb2e8f9f7 1805 void arm_pid_init_q31(
<> 144:ef7eb2e8f9f7 1806 arm_pid_instance_q31 * S,
<> 144:ef7eb2e8f9f7 1807 int32_t resetStateFlag);
<> 144:ef7eb2e8f9f7 1808
<> 144:ef7eb2e8f9f7 1809
<> 144:ef7eb2e8f9f7 1810 /**
<> 144:ef7eb2e8f9f7 1811 * @brief Reset function for the Q31 PID Control.
<> 144:ef7eb2e8f9f7 1812 * @param[in,out] *S points to an instance of the Q31 PID Control structure
<> 144:ef7eb2e8f9f7 1813 * @return none
<> 144:ef7eb2e8f9f7 1814 */
<> 144:ef7eb2e8f9f7 1815
<> 144:ef7eb2e8f9f7 1816 void arm_pid_reset_q31(
<> 144:ef7eb2e8f9f7 1817 arm_pid_instance_q31 * S);
<> 144:ef7eb2e8f9f7 1818
<> 144:ef7eb2e8f9f7 1819 /**
<> 144:ef7eb2e8f9f7 1820 * @brief Initialization function for the Q15 PID Control.
<> 144:ef7eb2e8f9f7 1821 * @param[in,out] *S points to an instance of the Q15 PID structure.
<> 144:ef7eb2e8f9f7 1822 * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state.
<> 144:ef7eb2e8f9f7 1823 * @return none.
<> 144:ef7eb2e8f9f7 1824 */
<> 144:ef7eb2e8f9f7 1825 void arm_pid_init_q15(
<> 144:ef7eb2e8f9f7 1826 arm_pid_instance_q15 * S,
<> 144:ef7eb2e8f9f7 1827 int32_t resetStateFlag);
<> 144:ef7eb2e8f9f7 1828
<> 144:ef7eb2e8f9f7 1829 /**
<> 144:ef7eb2e8f9f7 1830 * @brief Reset function for the Q15 PID Control.
<> 144:ef7eb2e8f9f7 1831 * @param[in,out] *S points to an instance of the q15 PID Control structure
<> 144:ef7eb2e8f9f7 1832 * @return none
<> 144:ef7eb2e8f9f7 1833 */
<> 144:ef7eb2e8f9f7 1834 void arm_pid_reset_q15(
<> 144:ef7eb2e8f9f7 1835 arm_pid_instance_q15 * S);
<> 144:ef7eb2e8f9f7 1836
<> 144:ef7eb2e8f9f7 1837
<> 144:ef7eb2e8f9f7 1838 /**
<> 144:ef7eb2e8f9f7 1839 * @brief Instance structure for the floating-point Linear Interpolate function.
<> 144:ef7eb2e8f9f7 1840 */
<> 144:ef7eb2e8f9f7 1841 typedef struct
<> 144:ef7eb2e8f9f7 1842 {
<> 144:ef7eb2e8f9f7 1843 uint32_t nValues; /**< nValues */
<> 144:ef7eb2e8f9f7 1844 float32_t x1; /**< x1 */
<> 144:ef7eb2e8f9f7 1845 float32_t xSpacing; /**< xSpacing */
<> 144:ef7eb2e8f9f7 1846 float32_t *pYData; /**< pointer to the table of Y values */
<> 144:ef7eb2e8f9f7 1847 } arm_linear_interp_instance_f32;
<> 144:ef7eb2e8f9f7 1848
<> 144:ef7eb2e8f9f7 1849 /**
<> 144:ef7eb2e8f9f7 1850 * @brief Instance structure for the floating-point bilinear interpolation function.
<> 144:ef7eb2e8f9f7 1851 */
<> 144:ef7eb2e8f9f7 1852
<> 144:ef7eb2e8f9f7 1853 typedef struct
<> 144:ef7eb2e8f9f7 1854 {
<> 144:ef7eb2e8f9f7 1855 uint16_t numRows; /**< number of rows in the data table. */
<> 144:ef7eb2e8f9f7 1856 uint16_t numCols; /**< number of columns in the data table. */
<> 144:ef7eb2e8f9f7 1857 float32_t *pData; /**< points to the data table. */
<> 144:ef7eb2e8f9f7 1858 } arm_bilinear_interp_instance_f32;
<> 144:ef7eb2e8f9f7 1859
<> 144:ef7eb2e8f9f7 1860 /**
<> 144:ef7eb2e8f9f7 1861 * @brief Instance structure for the Q31 bilinear interpolation function.
<> 144:ef7eb2e8f9f7 1862 */
<> 144:ef7eb2e8f9f7 1863
<> 144:ef7eb2e8f9f7 1864 typedef struct
<> 144:ef7eb2e8f9f7 1865 {
<> 144:ef7eb2e8f9f7 1866 uint16_t numRows; /**< number of rows in the data table. */
<> 144:ef7eb2e8f9f7 1867 uint16_t numCols; /**< number of columns in the data table. */
<> 144:ef7eb2e8f9f7 1868 q31_t *pData; /**< points to the data table. */
<> 144:ef7eb2e8f9f7 1869 } arm_bilinear_interp_instance_q31;
<> 144:ef7eb2e8f9f7 1870
<> 144:ef7eb2e8f9f7 1871 /**
<> 144:ef7eb2e8f9f7 1872 * @brief Instance structure for the Q15 bilinear interpolation function.
<> 144:ef7eb2e8f9f7 1873 */
<> 144:ef7eb2e8f9f7 1874
<> 144:ef7eb2e8f9f7 1875 typedef struct
<> 144:ef7eb2e8f9f7 1876 {
<> 144:ef7eb2e8f9f7 1877 uint16_t numRows; /**< number of rows in the data table. */
<> 144:ef7eb2e8f9f7 1878 uint16_t numCols; /**< number of columns in the data table. */
<> 144:ef7eb2e8f9f7 1879 q15_t *pData; /**< points to the data table. */
<> 144:ef7eb2e8f9f7 1880 } arm_bilinear_interp_instance_q15;
<> 144:ef7eb2e8f9f7 1881
<> 144:ef7eb2e8f9f7 1882 /**
<> 144:ef7eb2e8f9f7 1883 * @brief Instance structure for the Q15 bilinear interpolation function.
<> 144:ef7eb2e8f9f7 1884 */
<> 144:ef7eb2e8f9f7 1885
<> 144:ef7eb2e8f9f7 1886 typedef struct
<> 144:ef7eb2e8f9f7 1887 {
<> 144:ef7eb2e8f9f7 1888 uint16_t numRows; /**< number of rows in the data table. */
<> 144:ef7eb2e8f9f7 1889 uint16_t numCols; /**< number of columns in the data table. */
<> 144:ef7eb2e8f9f7 1890 q7_t *pData; /**< points to the data table. */
<> 144:ef7eb2e8f9f7 1891 } arm_bilinear_interp_instance_q7;
<> 144:ef7eb2e8f9f7 1892
<> 144:ef7eb2e8f9f7 1893
<> 144:ef7eb2e8f9f7 1894 /**
<> 144:ef7eb2e8f9f7 1895 * @brief Q7 vector multiplication.
<> 144:ef7eb2e8f9f7 1896 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 1897 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 1898 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 1899 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 1900 * @return none.
<> 144:ef7eb2e8f9f7 1901 */
<> 144:ef7eb2e8f9f7 1902
<> 144:ef7eb2e8f9f7 1903 void arm_mult_q7(
<> 144:ef7eb2e8f9f7 1904 q7_t * pSrcA,
<> 144:ef7eb2e8f9f7 1905 q7_t * pSrcB,
<> 144:ef7eb2e8f9f7 1906 q7_t * pDst,
<> 144:ef7eb2e8f9f7 1907 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1908
<> 144:ef7eb2e8f9f7 1909 /**
<> 144:ef7eb2e8f9f7 1910 * @brief Q15 vector multiplication.
<> 144:ef7eb2e8f9f7 1911 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 1912 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 1913 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 1914 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 1915 * @return none.
<> 144:ef7eb2e8f9f7 1916 */
<> 144:ef7eb2e8f9f7 1917
<> 144:ef7eb2e8f9f7 1918 void arm_mult_q15(
<> 144:ef7eb2e8f9f7 1919 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 1920 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 1921 q15_t * pDst,
<> 144:ef7eb2e8f9f7 1922 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1923
<> 144:ef7eb2e8f9f7 1924 /**
<> 144:ef7eb2e8f9f7 1925 * @brief Q31 vector multiplication.
<> 144:ef7eb2e8f9f7 1926 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 1927 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 1928 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 1929 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 1930 * @return none.
<> 144:ef7eb2e8f9f7 1931 */
<> 144:ef7eb2e8f9f7 1932
<> 144:ef7eb2e8f9f7 1933 void arm_mult_q31(
<> 144:ef7eb2e8f9f7 1934 q31_t * pSrcA,
<> 144:ef7eb2e8f9f7 1935 q31_t * pSrcB,
<> 144:ef7eb2e8f9f7 1936 q31_t * pDst,
<> 144:ef7eb2e8f9f7 1937 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1938
<> 144:ef7eb2e8f9f7 1939 /**
<> 144:ef7eb2e8f9f7 1940 * @brief Floating-point vector multiplication.
<> 144:ef7eb2e8f9f7 1941 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 1942 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 1943 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 1944 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 1945 * @return none.
<> 144:ef7eb2e8f9f7 1946 */
<> 144:ef7eb2e8f9f7 1947
<> 144:ef7eb2e8f9f7 1948 void arm_mult_f32(
<> 144:ef7eb2e8f9f7 1949 float32_t * pSrcA,
<> 144:ef7eb2e8f9f7 1950 float32_t * pSrcB,
<> 144:ef7eb2e8f9f7 1951 float32_t * pDst,
<> 144:ef7eb2e8f9f7 1952 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 1953
<> 144:ef7eb2e8f9f7 1954
<> 144:ef7eb2e8f9f7 1955
<> 144:ef7eb2e8f9f7 1956
<> 144:ef7eb2e8f9f7 1957
<> 144:ef7eb2e8f9f7 1958
<> 144:ef7eb2e8f9f7 1959 /**
<> 144:ef7eb2e8f9f7 1960 * @brief Instance structure for the Q15 CFFT/CIFFT function.
<> 144:ef7eb2e8f9f7 1961 */
<> 144:ef7eb2e8f9f7 1962
<> 144:ef7eb2e8f9f7 1963 typedef struct
<> 144:ef7eb2e8f9f7 1964 {
<> 144:ef7eb2e8f9f7 1965 uint16_t fftLen; /**< length of the FFT. */
<> 144:ef7eb2e8f9f7 1966 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 144:ef7eb2e8f9f7 1967 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 144:ef7eb2e8f9f7 1968 q15_t *pTwiddle; /**< points to the Sin twiddle factor table. */
<> 144:ef7eb2e8f9f7 1969 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 144:ef7eb2e8f9f7 1970 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 144:ef7eb2e8f9f7 1971 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 144:ef7eb2e8f9f7 1972 } arm_cfft_radix2_instance_q15;
<> 144:ef7eb2e8f9f7 1973
<> 144:ef7eb2e8f9f7 1974 arm_status arm_cfft_radix2_init_q15(
<> 144:ef7eb2e8f9f7 1975 arm_cfft_radix2_instance_q15 * S,
<> 144:ef7eb2e8f9f7 1976 uint16_t fftLen,
<> 144:ef7eb2e8f9f7 1977 uint8_t ifftFlag,
<> 144:ef7eb2e8f9f7 1978 uint8_t bitReverseFlag);
<> 144:ef7eb2e8f9f7 1979
<> 144:ef7eb2e8f9f7 1980 void arm_cfft_radix2_q15(
<> 144:ef7eb2e8f9f7 1981 const arm_cfft_radix2_instance_q15 * S,
<> 144:ef7eb2e8f9f7 1982 q15_t * pSrc);
<> 144:ef7eb2e8f9f7 1983
<> 144:ef7eb2e8f9f7 1984
<> 144:ef7eb2e8f9f7 1985
<> 144:ef7eb2e8f9f7 1986 /**
<> 144:ef7eb2e8f9f7 1987 * @brief Instance structure for the Q15 CFFT/CIFFT function.
<> 144:ef7eb2e8f9f7 1988 */
<> 144:ef7eb2e8f9f7 1989
<> 144:ef7eb2e8f9f7 1990 typedef struct
<> 144:ef7eb2e8f9f7 1991 {
<> 144:ef7eb2e8f9f7 1992 uint16_t fftLen; /**< length of the FFT. */
<> 144:ef7eb2e8f9f7 1993 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 144:ef7eb2e8f9f7 1994 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 144:ef7eb2e8f9f7 1995 q15_t *pTwiddle; /**< points to the twiddle factor table. */
<> 144:ef7eb2e8f9f7 1996 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 144:ef7eb2e8f9f7 1997 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 144:ef7eb2e8f9f7 1998 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 144:ef7eb2e8f9f7 1999 } arm_cfft_radix4_instance_q15;
<> 144:ef7eb2e8f9f7 2000
<> 144:ef7eb2e8f9f7 2001 arm_status arm_cfft_radix4_init_q15(
<> 144:ef7eb2e8f9f7 2002 arm_cfft_radix4_instance_q15 * S,
<> 144:ef7eb2e8f9f7 2003 uint16_t fftLen,
<> 144:ef7eb2e8f9f7 2004 uint8_t ifftFlag,
<> 144:ef7eb2e8f9f7 2005 uint8_t bitReverseFlag);
<> 144:ef7eb2e8f9f7 2006
<> 144:ef7eb2e8f9f7 2007 void arm_cfft_radix4_q15(
<> 144:ef7eb2e8f9f7 2008 const arm_cfft_radix4_instance_q15 * S,
<> 144:ef7eb2e8f9f7 2009 q15_t * pSrc);
<> 144:ef7eb2e8f9f7 2010
<> 144:ef7eb2e8f9f7 2011 /**
<> 144:ef7eb2e8f9f7 2012 * @brief Instance structure for the Radix-2 Q31 CFFT/CIFFT function.
<> 144:ef7eb2e8f9f7 2013 */
<> 144:ef7eb2e8f9f7 2014
<> 144:ef7eb2e8f9f7 2015 typedef struct
<> 144:ef7eb2e8f9f7 2016 {
<> 144:ef7eb2e8f9f7 2017 uint16_t fftLen; /**< length of the FFT. */
<> 144:ef7eb2e8f9f7 2018 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 144:ef7eb2e8f9f7 2019 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 144:ef7eb2e8f9f7 2020 q31_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 144:ef7eb2e8f9f7 2021 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 144:ef7eb2e8f9f7 2022 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 144:ef7eb2e8f9f7 2023 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 144:ef7eb2e8f9f7 2024 } arm_cfft_radix2_instance_q31;
<> 144:ef7eb2e8f9f7 2025
<> 144:ef7eb2e8f9f7 2026 arm_status arm_cfft_radix2_init_q31(
<> 144:ef7eb2e8f9f7 2027 arm_cfft_radix2_instance_q31 * S,
<> 144:ef7eb2e8f9f7 2028 uint16_t fftLen,
<> 144:ef7eb2e8f9f7 2029 uint8_t ifftFlag,
<> 144:ef7eb2e8f9f7 2030 uint8_t bitReverseFlag);
<> 144:ef7eb2e8f9f7 2031
<> 144:ef7eb2e8f9f7 2032 void arm_cfft_radix2_q31(
<> 144:ef7eb2e8f9f7 2033 const arm_cfft_radix2_instance_q31 * S,
<> 144:ef7eb2e8f9f7 2034 q31_t * pSrc);
<> 144:ef7eb2e8f9f7 2035
<> 144:ef7eb2e8f9f7 2036 /**
<> 144:ef7eb2e8f9f7 2037 * @brief Instance structure for the Q31 CFFT/CIFFT function.
<> 144:ef7eb2e8f9f7 2038 */
<> 144:ef7eb2e8f9f7 2039
<> 144:ef7eb2e8f9f7 2040 typedef struct
<> 144:ef7eb2e8f9f7 2041 {
<> 144:ef7eb2e8f9f7 2042 uint16_t fftLen; /**< length of the FFT. */
<> 144:ef7eb2e8f9f7 2043 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 144:ef7eb2e8f9f7 2044 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 144:ef7eb2e8f9f7 2045 q31_t *pTwiddle; /**< points to the twiddle factor table. */
<> 144:ef7eb2e8f9f7 2046 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 144:ef7eb2e8f9f7 2047 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 144:ef7eb2e8f9f7 2048 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 144:ef7eb2e8f9f7 2049 } arm_cfft_radix4_instance_q31;
<> 144:ef7eb2e8f9f7 2050
<> 144:ef7eb2e8f9f7 2051
<> 144:ef7eb2e8f9f7 2052 void arm_cfft_radix4_q31(
<> 144:ef7eb2e8f9f7 2053 const arm_cfft_radix4_instance_q31 * S,
<> 144:ef7eb2e8f9f7 2054 q31_t * pSrc);
<> 144:ef7eb2e8f9f7 2055
<> 144:ef7eb2e8f9f7 2056 arm_status arm_cfft_radix4_init_q31(
<> 144:ef7eb2e8f9f7 2057 arm_cfft_radix4_instance_q31 * S,
<> 144:ef7eb2e8f9f7 2058 uint16_t fftLen,
<> 144:ef7eb2e8f9f7 2059 uint8_t ifftFlag,
<> 144:ef7eb2e8f9f7 2060 uint8_t bitReverseFlag);
<> 144:ef7eb2e8f9f7 2061
<> 144:ef7eb2e8f9f7 2062 /**
<> 144:ef7eb2e8f9f7 2063 * @brief Instance structure for the floating-point CFFT/CIFFT function.
<> 144:ef7eb2e8f9f7 2064 */
<> 144:ef7eb2e8f9f7 2065
<> 144:ef7eb2e8f9f7 2066 typedef struct
<> 144:ef7eb2e8f9f7 2067 {
<> 144:ef7eb2e8f9f7 2068 uint16_t fftLen; /**< length of the FFT. */
<> 144:ef7eb2e8f9f7 2069 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 144:ef7eb2e8f9f7 2070 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 144:ef7eb2e8f9f7 2071 float32_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 144:ef7eb2e8f9f7 2072 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 144:ef7eb2e8f9f7 2073 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 144:ef7eb2e8f9f7 2074 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 144:ef7eb2e8f9f7 2075 float32_t onebyfftLen; /**< value of 1/fftLen. */
<> 144:ef7eb2e8f9f7 2076 } arm_cfft_radix2_instance_f32;
<> 144:ef7eb2e8f9f7 2077
<> 144:ef7eb2e8f9f7 2078 /* Deprecated */
<> 144:ef7eb2e8f9f7 2079 arm_status arm_cfft_radix2_init_f32(
<> 144:ef7eb2e8f9f7 2080 arm_cfft_radix2_instance_f32 * S,
<> 144:ef7eb2e8f9f7 2081 uint16_t fftLen,
<> 144:ef7eb2e8f9f7 2082 uint8_t ifftFlag,
<> 144:ef7eb2e8f9f7 2083 uint8_t bitReverseFlag);
<> 144:ef7eb2e8f9f7 2084
<> 144:ef7eb2e8f9f7 2085 /* Deprecated */
<> 144:ef7eb2e8f9f7 2086 void arm_cfft_radix2_f32(
<> 144:ef7eb2e8f9f7 2087 const arm_cfft_radix2_instance_f32 * S,
<> 144:ef7eb2e8f9f7 2088 float32_t * pSrc);
<> 144:ef7eb2e8f9f7 2089
<> 144:ef7eb2e8f9f7 2090 /**
<> 144:ef7eb2e8f9f7 2091 * @brief Instance structure for the floating-point CFFT/CIFFT function.
<> 144:ef7eb2e8f9f7 2092 */
<> 144:ef7eb2e8f9f7 2093
<> 144:ef7eb2e8f9f7 2094 typedef struct
<> 144:ef7eb2e8f9f7 2095 {
<> 144:ef7eb2e8f9f7 2096 uint16_t fftLen; /**< length of the FFT. */
<> 144:ef7eb2e8f9f7 2097 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 144:ef7eb2e8f9f7 2098 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 144:ef7eb2e8f9f7 2099 float32_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 144:ef7eb2e8f9f7 2100 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 144:ef7eb2e8f9f7 2101 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 144:ef7eb2e8f9f7 2102 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 144:ef7eb2e8f9f7 2103 float32_t onebyfftLen; /**< value of 1/fftLen. */
<> 144:ef7eb2e8f9f7 2104 } arm_cfft_radix4_instance_f32;
<> 144:ef7eb2e8f9f7 2105
<> 144:ef7eb2e8f9f7 2106 /* Deprecated */
<> 144:ef7eb2e8f9f7 2107 arm_status arm_cfft_radix4_init_f32(
<> 144:ef7eb2e8f9f7 2108 arm_cfft_radix4_instance_f32 * S,
<> 144:ef7eb2e8f9f7 2109 uint16_t fftLen,
<> 144:ef7eb2e8f9f7 2110 uint8_t ifftFlag,
<> 144:ef7eb2e8f9f7 2111 uint8_t bitReverseFlag);
<> 144:ef7eb2e8f9f7 2112
<> 144:ef7eb2e8f9f7 2113 /* Deprecated */
<> 144:ef7eb2e8f9f7 2114 void arm_cfft_radix4_f32(
<> 144:ef7eb2e8f9f7 2115 const arm_cfft_radix4_instance_f32 * S,
<> 144:ef7eb2e8f9f7 2116 float32_t * pSrc);
<> 144:ef7eb2e8f9f7 2117
<> 144:ef7eb2e8f9f7 2118 /**
<> 144:ef7eb2e8f9f7 2119 * @brief Instance structure for the floating-point CFFT/CIFFT function.
<> 144:ef7eb2e8f9f7 2120 */
<> 144:ef7eb2e8f9f7 2121
<> 144:ef7eb2e8f9f7 2122 typedef struct
<> 144:ef7eb2e8f9f7 2123 {
<> 144:ef7eb2e8f9f7 2124 uint16_t fftLen; /**< length of the FFT. */
<> 144:ef7eb2e8f9f7 2125 const float32_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 144:ef7eb2e8f9f7 2126 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 144:ef7eb2e8f9f7 2127 uint16_t bitRevLength; /**< bit reversal table length. */
<> 144:ef7eb2e8f9f7 2128 } arm_cfft_instance_f32;
<> 144:ef7eb2e8f9f7 2129
<> 144:ef7eb2e8f9f7 2130 void arm_cfft_f32(
<> 144:ef7eb2e8f9f7 2131 const arm_cfft_instance_f32 * S,
<> 144:ef7eb2e8f9f7 2132 float32_t * p1,
<> 144:ef7eb2e8f9f7 2133 uint8_t ifftFlag,
<> 144:ef7eb2e8f9f7 2134 uint8_t bitReverseFlag);
<> 144:ef7eb2e8f9f7 2135
<> 144:ef7eb2e8f9f7 2136 /**
<> 144:ef7eb2e8f9f7 2137 * @brief Instance structure for the Q15 RFFT/RIFFT function.
<> 144:ef7eb2e8f9f7 2138 */
<> 144:ef7eb2e8f9f7 2139
<> 144:ef7eb2e8f9f7 2140 typedef struct
<> 144:ef7eb2e8f9f7 2141 {
<> 144:ef7eb2e8f9f7 2142 uint32_t fftLenReal; /**< length of the real FFT. */
<> 144:ef7eb2e8f9f7 2143 uint32_t fftLenBy2; /**< length of the complex FFT. */
<> 144:ef7eb2e8f9f7 2144 uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
<> 144:ef7eb2e8f9f7 2145 uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
<> 144:ef7eb2e8f9f7 2146 uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 144:ef7eb2e8f9f7 2147 q15_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
<> 144:ef7eb2e8f9f7 2148 q15_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
<> 144:ef7eb2e8f9f7 2149 arm_cfft_radix4_instance_q15 *pCfft; /**< points to the complex FFT instance. */
<> 144:ef7eb2e8f9f7 2150 } arm_rfft_instance_q15;
<> 144:ef7eb2e8f9f7 2151
<> 144:ef7eb2e8f9f7 2152 arm_status arm_rfft_init_q15(
<> 144:ef7eb2e8f9f7 2153 arm_rfft_instance_q15 * S,
<> 144:ef7eb2e8f9f7 2154 arm_cfft_radix4_instance_q15 * S_CFFT,
<> 144:ef7eb2e8f9f7 2155 uint32_t fftLenReal,
<> 144:ef7eb2e8f9f7 2156 uint32_t ifftFlagR,
<> 144:ef7eb2e8f9f7 2157 uint32_t bitReverseFlag);
<> 144:ef7eb2e8f9f7 2158
<> 144:ef7eb2e8f9f7 2159 void arm_rfft_q15(
<> 144:ef7eb2e8f9f7 2160 const arm_rfft_instance_q15 * S,
<> 144:ef7eb2e8f9f7 2161 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 2162 q15_t * pDst);
<> 144:ef7eb2e8f9f7 2163
<> 144:ef7eb2e8f9f7 2164 /**
<> 144:ef7eb2e8f9f7 2165 * @brief Instance structure for the Q31 RFFT/RIFFT function.
<> 144:ef7eb2e8f9f7 2166 */
<> 144:ef7eb2e8f9f7 2167
<> 144:ef7eb2e8f9f7 2168 typedef struct
<> 144:ef7eb2e8f9f7 2169 {
<> 144:ef7eb2e8f9f7 2170 uint32_t fftLenReal; /**< length of the real FFT. */
<> 144:ef7eb2e8f9f7 2171 uint32_t fftLenBy2; /**< length of the complex FFT. */
<> 144:ef7eb2e8f9f7 2172 uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
<> 144:ef7eb2e8f9f7 2173 uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
<> 144:ef7eb2e8f9f7 2174 uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 144:ef7eb2e8f9f7 2175 q31_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
<> 144:ef7eb2e8f9f7 2176 q31_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
<> 144:ef7eb2e8f9f7 2177 arm_cfft_radix4_instance_q31 *pCfft; /**< points to the complex FFT instance. */
<> 144:ef7eb2e8f9f7 2178 } arm_rfft_instance_q31;
<> 144:ef7eb2e8f9f7 2179
<> 144:ef7eb2e8f9f7 2180 arm_status arm_rfft_init_q31(
<> 144:ef7eb2e8f9f7 2181 arm_rfft_instance_q31 * S,
<> 144:ef7eb2e8f9f7 2182 arm_cfft_radix4_instance_q31 * S_CFFT,
<> 144:ef7eb2e8f9f7 2183 uint32_t fftLenReal,
<> 144:ef7eb2e8f9f7 2184 uint32_t ifftFlagR,
<> 144:ef7eb2e8f9f7 2185 uint32_t bitReverseFlag);
<> 144:ef7eb2e8f9f7 2186
<> 144:ef7eb2e8f9f7 2187 void arm_rfft_q31(
<> 144:ef7eb2e8f9f7 2188 const arm_rfft_instance_q31 * S,
<> 144:ef7eb2e8f9f7 2189 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 2190 q31_t * pDst);
<> 144:ef7eb2e8f9f7 2191
<> 144:ef7eb2e8f9f7 2192 /**
<> 144:ef7eb2e8f9f7 2193 * @brief Instance structure for the floating-point RFFT/RIFFT function.
<> 144:ef7eb2e8f9f7 2194 */
<> 144:ef7eb2e8f9f7 2195
<> 144:ef7eb2e8f9f7 2196 typedef struct
<> 144:ef7eb2e8f9f7 2197 {
<> 144:ef7eb2e8f9f7 2198 uint32_t fftLenReal; /**< length of the real FFT. */
<> 144:ef7eb2e8f9f7 2199 uint16_t fftLenBy2; /**< length of the complex FFT. */
<> 144:ef7eb2e8f9f7 2200 uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
<> 144:ef7eb2e8f9f7 2201 uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
<> 144:ef7eb2e8f9f7 2202 uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 144:ef7eb2e8f9f7 2203 float32_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
<> 144:ef7eb2e8f9f7 2204 float32_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
<> 144:ef7eb2e8f9f7 2205 arm_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */
<> 144:ef7eb2e8f9f7 2206 } arm_rfft_instance_f32;
<> 144:ef7eb2e8f9f7 2207
<> 144:ef7eb2e8f9f7 2208 arm_status arm_rfft_init_f32(
<> 144:ef7eb2e8f9f7 2209 arm_rfft_instance_f32 * S,
<> 144:ef7eb2e8f9f7 2210 arm_cfft_radix4_instance_f32 * S_CFFT,
<> 144:ef7eb2e8f9f7 2211 uint32_t fftLenReal,
<> 144:ef7eb2e8f9f7 2212 uint32_t ifftFlagR,
<> 144:ef7eb2e8f9f7 2213 uint32_t bitReverseFlag);
<> 144:ef7eb2e8f9f7 2214
<> 144:ef7eb2e8f9f7 2215 void arm_rfft_f32(
<> 144:ef7eb2e8f9f7 2216 const arm_rfft_instance_f32 * S,
<> 144:ef7eb2e8f9f7 2217 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 2218 float32_t * pDst);
<> 144:ef7eb2e8f9f7 2219
<> 144:ef7eb2e8f9f7 2220 /**
<> 144:ef7eb2e8f9f7 2221 * @brief Instance structure for the floating-point RFFT/RIFFT function.
<> 144:ef7eb2e8f9f7 2222 */
<> 144:ef7eb2e8f9f7 2223
<> 144:ef7eb2e8f9f7 2224 typedef struct
<> 144:ef7eb2e8f9f7 2225 {
<> 144:ef7eb2e8f9f7 2226 arm_cfft_instance_f32 Sint; /**< Internal CFFT structure. */
<> 144:ef7eb2e8f9f7 2227 uint16_t fftLenRFFT; /**< length of the real sequence */
<> 144:ef7eb2e8f9f7 2228 float32_t * pTwiddleRFFT; /**< Twiddle factors real stage */
<> 144:ef7eb2e8f9f7 2229 } arm_rfft_fast_instance_f32 ;
<> 144:ef7eb2e8f9f7 2230
<> 144:ef7eb2e8f9f7 2231 arm_status arm_rfft_fast_init_f32 (
<> 144:ef7eb2e8f9f7 2232 arm_rfft_fast_instance_f32 * S,
<> 144:ef7eb2e8f9f7 2233 uint16_t fftLen);
<> 144:ef7eb2e8f9f7 2234
<> 144:ef7eb2e8f9f7 2235 void arm_rfft_fast_f32(
<> 144:ef7eb2e8f9f7 2236 arm_rfft_fast_instance_f32 * S,
<> 144:ef7eb2e8f9f7 2237 float32_t * p, float32_t * pOut,
<> 144:ef7eb2e8f9f7 2238 uint8_t ifftFlag);
<> 144:ef7eb2e8f9f7 2239
<> 144:ef7eb2e8f9f7 2240 /**
<> 144:ef7eb2e8f9f7 2241 * @brief Instance structure for the floating-point DCT4/IDCT4 function.
<> 144:ef7eb2e8f9f7 2242 */
<> 144:ef7eb2e8f9f7 2243
<> 144:ef7eb2e8f9f7 2244 typedef struct
<> 144:ef7eb2e8f9f7 2245 {
<> 144:ef7eb2e8f9f7 2246 uint16_t N; /**< length of the DCT4. */
<> 144:ef7eb2e8f9f7 2247 uint16_t Nby2; /**< half of the length of the DCT4. */
<> 144:ef7eb2e8f9f7 2248 float32_t normalize; /**< normalizing factor. */
<> 144:ef7eb2e8f9f7 2249 float32_t *pTwiddle; /**< points to the twiddle factor table. */
<> 144:ef7eb2e8f9f7 2250 float32_t *pCosFactor; /**< points to the cosFactor table. */
<> 144:ef7eb2e8f9f7 2251 arm_rfft_instance_f32 *pRfft; /**< points to the real FFT instance. */
<> 144:ef7eb2e8f9f7 2252 arm_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */
<> 144:ef7eb2e8f9f7 2253 } arm_dct4_instance_f32;
<> 144:ef7eb2e8f9f7 2254
<> 144:ef7eb2e8f9f7 2255 /**
<> 144:ef7eb2e8f9f7 2256 * @brief Initialization function for the floating-point DCT4/IDCT4.
<> 144:ef7eb2e8f9f7 2257 * @param[in,out] *S points to an instance of floating-point DCT4/IDCT4 structure.
<> 144:ef7eb2e8f9f7 2258 * @param[in] *S_RFFT points to an instance of floating-point RFFT/RIFFT structure.
<> 144:ef7eb2e8f9f7 2259 * @param[in] *S_CFFT points to an instance of floating-point CFFT/CIFFT structure.
<> 144:ef7eb2e8f9f7 2260 * @param[in] N length of the DCT4.
<> 144:ef7eb2e8f9f7 2261 * @param[in] Nby2 half of the length of the DCT4.
<> 144:ef7eb2e8f9f7 2262 * @param[in] normalize normalizing factor.
<> 144:ef7eb2e8f9f7 2263 * @return arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>fftLenReal</code> is not a supported transform length.
<> 144:ef7eb2e8f9f7 2264 */
<> 144:ef7eb2e8f9f7 2265
<> 144:ef7eb2e8f9f7 2266 arm_status arm_dct4_init_f32(
<> 144:ef7eb2e8f9f7 2267 arm_dct4_instance_f32 * S,
<> 144:ef7eb2e8f9f7 2268 arm_rfft_instance_f32 * S_RFFT,
<> 144:ef7eb2e8f9f7 2269 arm_cfft_radix4_instance_f32 * S_CFFT,
<> 144:ef7eb2e8f9f7 2270 uint16_t N,
<> 144:ef7eb2e8f9f7 2271 uint16_t Nby2,
<> 144:ef7eb2e8f9f7 2272 float32_t normalize);
<> 144:ef7eb2e8f9f7 2273
<> 144:ef7eb2e8f9f7 2274 /**
<> 144:ef7eb2e8f9f7 2275 * @brief Processing function for the floating-point DCT4/IDCT4.
<> 144:ef7eb2e8f9f7 2276 * @param[in] *S points to an instance of the floating-point DCT4/IDCT4 structure.
<> 144:ef7eb2e8f9f7 2277 * @param[in] *pState points to state buffer.
<> 144:ef7eb2e8f9f7 2278 * @param[in,out] *pInlineBuffer points to the in-place input and output buffer.
<> 144:ef7eb2e8f9f7 2279 * @return none.
<> 144:ef7eb2e8f9f7 2280 */
<> 144:ef7eb2e8f9f7 2281
<> 144:ef7eb2e8f9f7 2282 void arm_dct4_f32(
<> 144:ef7eb2e8f9f7 2283 const arm_dct4_instance_f32 * S,
<> 144:ef7eb2e8f9f7 2284 float32_t * pState,
<> 144:ef7eb2e8f9f7 2285 float32_t * pInlineBuffer);
<> 144:ef7eb2e8f9f7 2286
<> 144:ef7eb2e8f9f7 2287 /**
<> 144:ef7eb2e8f9f7 2288 * @brief Instance structure for the Q31 DCT4/IDCT4 function.
<> 144:ef7eb2e8f9f7 2289 */
<> 144:ef7eb2e8f9f7 2290
<> 144:ef7eb2e8f9f7 2291 typedef struct
<> 144:ef7eb2e8f9f7 2292 {
<> 144:ef7eb2e8f9f7 2293 uint16_t N; /**< length of the DCT4. */
<> 144:ef7eb2e8f9f7 2294 uint16_t Nby2; /**< half of the length of the DCT4. */
<> 144:ef7eb2e8f9f7 2295 q31_t normalize; /**< normalizing factor. */
<> 144:ef7eb2e8f9f7 2296 q31_t *pTwiddle; /**< points to the twiddle factor table. */
<> 144:ef7eb2e8f9f7 2297 q31_t *pCosFactor; /**< points to the cosFactor table. */
<> 144:ef7eb2e8f9f7 2298 arm_rfft_instance_q31 *pRfft; /**< points to the real FFT instance. */
<> 144:ef7eb2e8f9f7 2299 arm_cfft_radix4_instance_q31 *pCfft; /**< points to the complex FFT instance. */
<> 144:ef7eb2e8f9f7 2300 } arm_dct4_instance_q31;
<> 144:ef7eb2e8f9f7 2301
<> 144:ef7eb2e8f9f7 2302 /**
<> 144:ef7eb2e8f9f7 2303 * @brief Initialization function for the Q31 DCT4/IDCT4.
<> 144:ef7eb2e8f9f7 2304 * @param[in,out] *S points to an instance of Q31 DCT4/IDCT4 structure.
<> 144:ef7eb2e8f9f7 2305 * @param[in] *S_RFFT points to an instance of Q31 RFFT/RIFFT structure
<> 144:ef7eb2e8f9f7 2306 * @param[in] *S_CFFT points to an instance of Q31 CFFT/CIFFT structure
<> 144:ef7eb2e8f9f7 2307 * @param[in] N length of the DCT4.
<> 144:ef7eb2e8f9f7 2308 * @param[in] Nby2 half of the length of the DCT4.
<> 144:ef7eb2e8f9f7 2309 * @param[in] normalize normalizing factor.
<> 144:ef7eb2e8f9f7 2310 * @return arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>N</code> is not a supported transform length.
<> 144:ef7eb2e8f9f7 2311 */
<> 144:ef7eb2e8f9f7 2312
<> 144:ef7eb2e8f9f7 2313 arm_status arm_dct4_init_q31(
<> 144:ef7eb2e8f9f7 2314 arm_dct4_instance_q31 * S,
<> 144:ef7eb2e8f9f7 2315 arm_rfft_instance_q31 * S_RFFT,
<> 144:ef7eb2e8f9f7 2316 arm_cfft_radix4_instance_q31 * S_CFFT,
<> 144:ef7eb2e8f9f7 2317 uint16_t N,
<> 144:ef7eb2e8f9f7 2318 uint16_t Nby2,
<> 144:ef7eb2e8f9f7 2319 q31_t normalize);
<> 144:ef7eb2e8f9f7 2320
<> 144:ef7eb2e8f9f7 2321 /**
<> 144:ef7eb2e8f9f7 2322 * @brief Processing function for the Q31 DCT4/IDCT4.
<> 144:ef7eb2e8f9f7 2323 * @param[in] *S points to an instance of the Q31 DCT4 structure.
<> 144:ef7eb2e8f9f7 2324 * @param[in] *pState points to state buffer.
<> 144:ef7eb2e8f9f7 2325 * @param[in,out] *pInlineBuffer points to the in-place input and output buffer.
<> 144:ef7eb2e8f9f7 2326 * @return none.
<> 144:ef7eb2e8f9f7 2327 */
<> 144:ef7eb2e8f9f7 2328
<> 144:ef7eb2e8f9f7 2329 void arm_dct4_q31(
<> 144:ef7eb2e8f9f7 2330 const arm_dct4_instance_q31 * S,
<> 144:ef7eb2e8f9f7 2331 q31_t * pState,
<> 144:ef7eb2e8f9f7 2332 q31_t * pInlineBuffer);
<> 144:ef7eb2e8f9f7 2333
<> 144:ef7eb2e8f9f7 2334 /**
<> 144:ef7eb2e8f9f7 2335 * @brief Instance structure for the Q15 DCT4/IDCT4 function.
<> 144:ef7eb2e8f9f7 2336 */
<> 144:ef7eb2e8f9f7 2337
<> 144:ef7eb2e8f9f7 2338 typedef struct
<> 144:ef7eb2e8f9f7 2339 {
<> 144:ef7eb2e8f9f7 2340 uint16_t N; /**< length of the DCT4. */
<> 144:ef7eb2e8f9f7 2341 uint16_t Nby2; /**< half of the length of the DCT4. */
<> 144:ef7eb2e8f9f7 2342 q15_t normalize; /**< normalizing factor. */
<> 144:ef7eb2e8f9f7 2343 q15_t *pTwiddle; /**< points to the twiddle factor table. */
<> 144:ef7eb2e8f9f7 2344 q15_t *pCosFactor; /**< points to the cosFactor table. */
<> 144:ef7eb2e8f9f7 2345 arm_rfft_instance_q15 *pRfft; /**< points to the real FFT instance. */
<> 144:ef7eb2e8f9f7 2346 arm_cfft_radix4_instance_q15 *pCfft; /**< points to the complex FFT instance. */
<> 144:ef7eb2e8f9f7 2347 } arm_dct4_instance_q15;
<> 144:ef7eb2e8f9f7 2348
<> 144:ef7eb2e8f9f7 2349 /**
<> 144:ef7eb2e8f9f7 2350 * @brief Initialization function for the Q15 DCT4/IDCT4.
<> 144:ef7eb2e8f9f7 2351 * @param[in,out] *S points to an instance of Q15 DCT4/IDCT4 structure.
<> 144:ef7eb2e8f9f7 2352 * @param[in] *S_RFFT points to an instance of Q15 RFFT/RIFFT structure.
<> 144:ef7eb2e8f9f7 2353 * @param[in] *S_CFFT points to an instance of Q15 CFFT/CIFFT structure.
<> 144:ef7eb2e8f9f7 2354 * @param[in] N length of the DCT4.
<> 144:ef7eb2e8f9f7 2355 * @param[in] Nby2 half of the length of the DCT4.
<> 144:ef7eb2e8f9f7 2356 * @param[in] normalize normalizing factor.
<> 144:ef7eb2e8f9f7 2357 * @return arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>N</code> is not a supported transform length.
<> 144:ef7eb2e8f9f7 2358 */
<> 144:ef7eb2e8f9f7 2359
<> 144:ef7eb2e8f9f7 2360 arm_status arm_dct4_init_q15(
<> 144:ef7eb2e8f9f7 2361 arm_dct4_instance_q15 * S,
<> 144:ef7eb2e8f9f7 2362 arm_rfft_instance_q15 * S_RFFT,
<> 144:ef7eb2e8f9f7 2363 arm_cfft_radix4_instance_q15 * S_CFFT,
<> 144:ef7eb2e8f9f7 2364 uint16_t N,
<> 144:ef7eb2e8f9f7 2365 uint16_t Nby2,
<> 144:ef7eb2e8f9f7 2366 q15_t normalize);
<> 144:ef7eb2e8f9f7 2367
<> 144:ef7eb2e8f9f7 2368 /**
<> 144:ef7eb2e8f9f7 2369 * @brief Processing function for the Q15 DCT4/IDCT4.
<> 144:ef7eb2e8f9f7 2370 * @param[in] *S points to an instance of the Q15 DCT4 structure.
<> 144:ef7eb2e8f9f7 2371 * @param[in] *pState points to state buffer.
<> 144:ef7eb2e8f9f7 2372 * @param[in,out] *pInlineBuffer points to the in-place input and output buffer.
<> 144:ef7eb2e8f9f7 2373 * @return none.
<> 144:ef7eb2e8f9f7 2374 */
<> 144:ef7eb2e8f9f7 2375
<> 144:ef7eb2e8f9f7 2376 void arm_dct4_q15(
<> 144:ef7eb2e8f9f7 2377 const arm_dct4_instance_q15 * S,
<> 144:ef7eb2e8f9f7 2378 q15_t * pState,
<> 144:ef7eb2e8f9f7 2379 q15_t * pInlineBuffer);
<> 144:ef7eb2e8f9f7 2380
<> 144:ef7eb2e8f9f7 2381 /**
<> 144:ef7eb2e8f9f7 2382 * @brief Floating-point vector addition.
<> 144:ef7eb2e8f9f7 2383 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 2384 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 2385 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2386 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 2387 * @return none.
<> 144:ef7eb2e8f9f7 2388 */
<> 144:ef7eb2e8f9f7 2389
<> 144:ef7eb2e8f9f7 2390 void arm_add_f32(
<> 144:ef7eb2e8f9f7 2391 float32_t * pSrcA,
<> 144:ef7eb2e8f9f7 2392 float32_t * pSrcB,
<> 144:ef7eb2e8f9f7 2393 float32_t * pDst,
<> 144:ef7eb2e8f9f7 2394 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2395
<> 144:ef7eb2e8f9f7 2396 /**
<> 144:ef7eb2e8f9f7 2397 * @brief Q7 vector addition.
<> 144:ef7eb2e8f9f7 2398 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 2399 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 2400 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2401 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 2402 * @return none.
<> 144:ef7eb2e8f9f7 2403 */
<> 144:ef7eb2e8f9f7 2404
<> 144:ef7eb2e8f9f7 2405 void arm_add_q7(
<> 144:ef7eb2e8f9f7 2406 q7_t * pSrcA,
<> 144:ef7eb2e8f9f7 2407 q7_t * pSrcB,
<> 144:ef7eb2e8f9f7 2408 q7_t * pDst,
<> 144:ef7eb2e8f9f7 2409 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2410
<> 144:ef7eb2e8f9f7 2411 /**
<> 144:ef7eb2e8f9f7 2412 * @brief Q15 vector addition.
<> 144:ef7eb2e8f9f7 2413 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 2414 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 2415 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2416 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 2417 * @return none.
<> 144:ef7eb2e8f9f7 2418 */
<> 144:ef7eb2e8f9f7 2419
<> 144:ef7eb2e8f9f7 2420 void arm_add_q15(
<> 144:ef7eb2e8f9f7 2421 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 2422 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 2423 q15_t * pDst,
<> 144:ef7eb2e8f9f7 2424 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2425
<> 144:ef7eb2e8f9f7 2426 /**
<> 144:ef7eb2e8f9f7 2427 * @brief Q31 vector addition.
<> 144:ef7eb2e8f9f7 2428 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 2429 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 2430 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2431 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 2432 * @return none.
<> 144:ef7eb2e8f9f7 2433 */
<> 144:ef7eb2e8f9f7 2434
<> 144:ef7eb2e8f9f7 2435 void arm_add_q31(
<> 144:ef7eb2e8f9f7 2436 q31_t * pSrcA,
<> 144:ef7eb2e8f9f7 2437 q31_t * pSrcB,
<> 144:ef7eb2e8f9f7 2438 q31_t * pDst,
<> 144:ef7eb2e8f9f7 2439 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2440
<> 144:ef7eb2e8f9f7 2441 /**
<> 144:ef7eb2e8f9f7 2442 * @brief Floating-point vector subtraction.
<> 144:ef7eb2e8f9f7 2443 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 2444 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 2445 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2446 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 2447 * @return none.
<> 144:ef7eb2e8f9f7 2448 */
<> 144:ef7eb2e8f9f7 2449
<> 144:ef7eb2e8f9f7 2450 void arm_sub_f32(
<> 144:ef7eb2e8f9f7 2451 float32_t * pSrcA,
<> 144:ef7eb2e8f9f7 2452 float32_t * pSrcB,
<> 144:ef7eb2e8f9f7 2453 float32_t * pDst,
<> 144:ef7eb2e8f9f7 2454 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2455
<> 144:ef7eb2e8f9f7 2456 /**
<> 144:ef7eb2e8f9f7 2457 * @brief Q7 vector subtraction.
<> 144:ef7eb2e8f9f7 2458 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 2459 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 2460 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2461 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 2462 * @return none.
<> 144:ef7eb2e8f9f7 2463 */
<> 144:ef7eb2e8f9f7 2464
<> 144:ef7eb2e8f9f7 2465 void arm_sub_q7(
<> 144:ef7eb2e8f9f7 2466 q7_t * pSrcA,
<> 144:ef7eb2e8f9f7 2467 q7_t * pSrcB,
<> 144:ef7eb2e8f9f7 2468 q7_t * pDst,
<> 144:ef7eb2e8f9f7 2469 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2470
<> 144:ef7eb2e8f9f7 2471 /**
<> 144:ef7eb2e8f9f7 2472 * @brief Q15 vector subtraction.
<> 144:ef7eb2e8f9f7 2473 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 2474 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 2475 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2476 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 2477 * @return none.
<> 144:ef7eb2e8f9f7 2478 */
<> 144:ef7eb2e8f9f7 2479
<> 144:ef7eb2e8f9f7 2480 void arm_sub_q15(
<> 144:ef7eb2e8f9f7 2481 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 2482 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 2483 q15_t * pDst,
<> 144:ef7eb2e8f9f7 2484 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2485
<> 144:ef7eb2e8f9f7 2486 /**
<> 144:ef7eb2e8f9f7 2487 * @brief Q31 vector subtraction.
<> 144:ef7eb2e8f9f7 2488 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 2489 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 2490 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2491 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 2492 * @return none.
<> 144:ef7eb2e8f9f7 2493 */
<> 144:ef7eb2e8f9f7 2494
<> 144:ef7eb2e8f9f7 2495 void arm_sub_q31(
<> 144:ef7eb2e8f9f7 2496 q31_t * pSrcA,
<> 144:ef7eb2e8f9f7 2497 q31_t * pSrcB,
<> 144:ef7eb2e8f9f7 2498 q31_t * pDst,
<> 144:ef7eb2e8f9f7 2499 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2500
<> 144:ef7eb2e8f9f7 2501 /**
<> 144:ef7eb2e8f9f7 2502 * @brief Multiplies a floating-point vector by a scalar.
<> 144:ef7eb2e8f9f7 2503 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 2504 * @param[in] scale scale factor to be applied
<> 144:ef7eb2e8f9f7 2505 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2506 * @param[in] blockSize number of samples in the vector
<> 144:ef7eb2e8f9f7 2507 * @return none.
<> 144:ef7eb2e8f9f7 2508 */
<> 144:ef7eb2e8f9f7 2509
<> 144:ef7eb2e8f9f7 2510 void arm_scale_f32(
<> 144:ef7eb2e8f9f7 2511 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 2512 float32_t scale,
<> 144:ef7eb2e8f9f7 2513 float32_t * pDst,
<> 144:ef7eb2e8f9f7 2514 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2515
<> 144:ef7eb2e8f9f7 2516 /**
<> 144:ef7eb2e8f9f7 2517 * @brief Multiplies a Q7 vector by a scalar.
<> 144:ef7eb2e8f9f7 2518 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 2519 * @param[in] scaleFract fractional portion of the scale value
<> 144:ef7eb2e8f9f7 2520 * @param[in] shift number of bits to shift the result by
<> 144:ef7eb2e8f9f7 2521 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2522 * @param[in] blockSize number of samples in the vector
<> 144:ef7eb2e8f9f7 2523 * @return none.
<> 144:ef7eb2e8f9f7 2524 */
<> 144:ef7eb2e8f9f7 2525
<> 144:ef7eb2e8f9f7 2526 void arm_scale_q7(
<> 144:ef7eb2e8f9f7 2527 q7_t * pSrc,
<> 144:ef7eb2e8f9f7 2528 q7_t scaleFract,
<> 144:ef7eb2e8f9f7 2529 int8_t shift,
<> 144:ef7eb2e8f9f7 2530 q7_t * pDst,
<> 144:ef7eb2e8f9f7 2531 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2532
<> 144:ef7eb2e8f9f7 2533 /**
<> 144:ef7eb2e8f9f7 2534 * @brief Multiplies a Q15 vector by a scalar.
<> 144:ef7eb2e8f9f7 2535 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 2536 * @param[in] scaleFract fractional portion of the scale value
<> 144:ef7eb2e8f9f7 2537 * @param[in] shift number of bits to shift the result by
<> 144:ef7eb2e8f9f7 2538 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2539 * @param[in] blockSize number of samples in the vector
<> 144:ef7eb2e8f9f7 2540 * @return none.
<> 144:ef7eb2e8f9f7 2541 */
<> 144:ef7eb2e8f9f7 2542
<> 144:ef7eb2e8f9f7 2543 void arm_scale_q15(
<> 144:ef7eb2e8f9f7 2544 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 2545 q15_t scaleFract,
<> 144:ef7eb2e8f9f7 2546 int8_t shift,
<> 144:ef7eb2e8f9f7 2547 q15_t * pDst,
<> 144:ef7eb2e8f9f7 2548 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2549
<> 144:ef7eb2e8f9f7 2550 /**
<> 144:ef7eb2e8f9f7 2551 * @brief Multiplies a Q31 vector by a scalar.
<> 144:ef7eb2e8f9f7 2552 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 2553 * @param[in] scaleFract fractional portion of the scale value
<> 144:ef7eb2e8f9f7 2554 * @param[in] shift number of bits to shift the result by
<> 144:ef7eb2e8f9f7 2555 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2556 * @param[in] blockSize number of samples in the vector
<> 144:ef7eb2e8f9f7 2557 * @return none.
<> 144:ef7eb2e8f9f7 2558 */
<> 144:ef7eb2e8f9f7 2559
<> 144:ef7eb2e8f9f7 2560 void arm_scale_q31(
<> 144:ef7eb2e8f9f7 2561 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 2562 q31_t scaleFract,
<> 144:ef7eb2e8f9f7 2563 int8_t shift,
<> 144:ef7eb2e8f9f7 2564 q31_t * pDst,
<> 144:ef7eb2e8f9f7 2565 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2566
<> 144:ef7eb2e8f9f7 2567 /**
<> 144:ef7eb2e8f9f7 2568 * @brief Q7 vector absolute value.
<> 144:ef7eb2e8f9f7 2569 * @param[in] *pSrc points to the input buffer
<> 144:ef7eb2e8f9f7 2570 * @param[out] *pDst points to the output buffer
<> 144:ef7eb2e8f9f7 2571 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 2572 * @return none.
<> 144:ef7eb2e8f9f7 2573 */
<> 144:ef7eb2e8f9f7 2574
<> 144:ef7eb2e8f9f7 2575 void arm_abs_q7(
<> 144:ef7eb2e8f9f7 2576 q7_t * pSrc,
<> 144:ef7eb2e8f9f7 2577 q7_t * pDst,
<> 144:ef7eb2e8f9f7 2578 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2579
<> 144:ef7eb2e8f9f7 2580 /**
<> 144:ef7eb2e8f9f7 2581 * @brief Floating-point vector absolute value.
<> 144:ef7eb2e8f9f7 2582 * @param[in] *pSrc points to the input buffer
<> 144:ef7eb2e8f9f7 2583 * @param[out] *pDst points to the output buffer
<> 144:ef7eb2e8f9f7 2584 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 2585 * @return none.
<> 144:ef7eb2e8f9f7 2586 */
<> 144:ef7eb2e8f9f7 2587
<> 144:ef7eb2e8f9f7 2588 void arm_abs_f32(
<> 144:ef7eb2e8f9f7 2589 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 2590 float32_t * pDst,
<> 144:ef7eb2e8f9f7 2591 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2592
<> 144:ef7eb2e8f9f7 2593 /**
<> 144:ef7eb2e8f9f7 2594 * @brief Q15 vector absolute value.
<> 144:ef7eb2e8f9f7 2595 * @param[in] *pSrc points to the input buffer
<> 144:ef7eb2e8f9f7 2596 * @param[out] *pDst points to the output buffer
<> 144:ef7eb2e8f9f7 2597 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 2598 * @return none.
<> 144:ef7eb2e8f9f7 2599 */
<> 144:ef7eb2e8f9f7 2600
<> 144:ef7eb2e8f9f7 2601 void arm_abs_q15(
<> 144:ef7eb2e8f9f7 2602 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 2603 q15_t * pDst,
<> 144:ef7eb2e8f9f7 2604 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2605
<> 144:ef7eb2e8f9f7 2606 /**
<> 144:ef7eb2e8f9f7 2607 * @brief Q31 vector absolute value.
<> 144:ef7eb2e8f9f7 2608 * @param[in] *pSrc points to the input buffer
<> 144:ef7eb2e8f9f7 2609 * @param[out] *pDst points to the output buffer
<> 144:ef7eb2e8f9f7 2610 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 2611 * @return none.
<> 144:ef7eb2e8f9f7 2612 */
<> 144:ef7eb2e8f9f7 2613
<> 144:ef7eb2e8f9f7 2614 void arm_abs_q31(
<> 144:ef7eb2e8f9f7 2615 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 2616 q31_t * pDst,
<> 144:ef7eb2e8f9f7 2617 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2618
<> 144:ef7eb2e8f9f7 2619 /**
<> 144:ef7eb2e8f9f7 2620 * @brief Dot product of floating-point vectors.
<> 144:ef7eb2e8f9f7 2621 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 2622 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 2623 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 2624 * @param[out] *result output result returned here
<> 144:ef7eb2e8f9f7 2625 * @return none.
<> 144:ef7eb2e8f9f7 2626 */
<> 144:ef7eb2e8f9f7 2627
<> 144:ef7eb2e8f9f7 2628 void arm_dot_prod_f32(
<> 144:ef7eb2e8f9f7 2629 float32_t * pSrcA,
<> 144:ef7eb2e8f9f7 2630 float32_t * pSrcB,
<> 144:ef7eb2e8f9f7 2631 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 2632 float32_t * result);
<> 144:ef7eb2e8f9f7 2633
<> 144:ef7eb2e8f9f7 2634 /**
<> 144:ef7eb2e8f9f7 2635 * @brief Dot product of Q7 vectors.
<> 144:ef7eb2e8f9f7 2636 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 2637 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 2638 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 2639 * @param[out] *result output result returned here
<> 144:ef7eb2e8f9f7 2640 * @return none.
<> 144:ef7eb2e8f9f7 2641 */
<> 144:ef7eb2e8f9f7 2642
<> 144:ef7eb2e8f9f7 2643 void arm_dot_prod_q7(
<> 144:ef7eb2e8f9f7 2644 q7_t * pSrcA,
<> 144:ef7eb2e8f9f7 2645 q7_t * pSrcB,
<> 144:ef7eb2e8f9f7 2646 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 2647 q31_t * result);
<> 144:ef7eb2e8f9f7 2648
<> 144:ef7eb2e8f9f7 2649 /**
<> 144:ef7eb2e8f9f7 2650 * @brief Dot product of Q15 vectors.
<> 144:ef7eb2e8f9f7 2651 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 2652 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 2653 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 2654 * @param[out] *result output result returned here
<> 144:ef7eb2e8f9f7 2655 * @return none.
<> 144:ef7eb2e8f9f7 2656 */
<> 144:ef7eb2e8f9f7 2657
<> 144:ef7eb2e8f9f7 2658 void arm_dot_prod_q15(
<> 144:ef7eb2e8f9f7 2659 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 2660 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 2661 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 2662 q63_t * result);
<> 144:ef7eb2e8f9f7 2663
<> 144:ef7eb2e8f9f7 2664 /**
<> 144:ef7eb2e8f9f7 2665 * @brief Dot product of Q31 vectors.
<> 144:ef7eb2e8f9f7 2666 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 2667 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 2668 * @param[in] blockSize number of samples in each vector
<> 144:ef7eb2e8f9f7 2669 * @param[out] *result output result returned here
<> 144:ef7eb2e8f9f7 2670 * @return none.
<> 144:ef7eb2e8f9f7 2671 */
<> 144:ef7eb2e8f9f7 2672
<> 144:ef7eb2e8f9f7 2673 void arm_dot_prod_q31(
<> 144:ef7eb2e8f9f7 2674 q31_t * pSrcA,
<> 144:ef7eb2e8f9f7 2675 q31_t * pSrcB,
<> 144:ef7eb2e8f9f7 2676 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 2677 q63_t * result);
<> 144:ef7eb2e8f9f7 2678
<> 144:ef7eb2e8f9f7 2679 /**
<> 144:ef7eb2e8f9f7 2680 * @brief Shifts the elements of a Q7 vector a specified number of bits.
<> 144:ef7eb2e8f9f7 2681 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 2682 * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right.
<> 144:ef7eb2e8f9f7 2683 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2684 * @param[in] blockSize number of samples in the vector
<> 144:ef7eb2e8f9f7 2685 * @return none.
<> 144:ef7eb2e8f9f7 2686 */
<> 144:ef7eb2e8f9f7 2687
<> 144:ef7eb2e8f9f7 2688 void arm_shift_q7(
<> 144:ef7eb2e8f9f7 2689 q7_t * pSrc,
<> 144:ef7eb2e8f9f7 2690 int8_t shiftBits,
<> 144:ef7eb2e8f9f7 2691 q7_t * pDst,
<> 144:ef7eb2e8f9f7 2692 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2693
<> 144:ef7eb2e8f9f7 2694 /**
<> 144:ef7eb2e8f9f7 2695 * @brief Shifts the elements of a Q15 vector a specified number of bits.
<> 144:ef7eb2e8f9f7 2696 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 2697 * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right.
<> 144:ef7eb2e8f9f7 2698 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2699 * @param[in] blockSize number of samples in the vector
<> 144:ef7eb2e8f9f7 2700 * @return none.
<> 144:ef7eb2e8f9f7 2701 */
<> 144:ef7eb2e8f9f7 2702
<> 144:ef7eb2e8f9f7 2703 void arm_shift_q15(
<> 144:ef7eb2e8f9f7 2704 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 2705 int8_t shiftBits,
<> 144:ef7eb2e8f9f7 2706 q15_t * pDst,
<> 144:ef7eb2e8f9f7 2707 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2708
<> 144:ef7eb2e8f9f7 2709 /**
<> 144:ef7eb2e8f9f7 2710 * @brief Shifts the elements of a Q31 vector a specified number of bits.
<> 144:ef7eb2e8f9f7 2711 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 2712 * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right.
<> 144:ef7eb2e8f9f7 2713 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2714 * @param[in] blockSize number of samples in the vector
<> 144:ef7eb2e8f9f7 2715 * @return none.
<> 144:ef7eb2e8f9f7 2716 */
<> 144:ef7eb2e8f9f7 2717
<> 144:ef7eb2e8f9f7 2718 void arm_shift_q31(
<> 144:ef7eb2e8f9f7 2719 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 2720 int8_t shiftBits,
<> 144:ef7eb2e8f9f7 2721 q31_t * pDst,
<> 144:ef7eb2e8f9f7 2722 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2723
<> 144:ef7eb2e8f9f7 2724 /**
<> 144:ef7eb2e8f9f7 2725 * @brief Adds a constant offset to a floating-point vector.
<> 144:ef7eb2e8f9f7 2726 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 2727 * @param[in] offset is the offset to be added
<> 144:ef7eb2e8f9f7 2728 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2729 * @param[in] blockSize number of samples in the vector
<> 144:ef7eb2e8f9f7 2730 * @return none.
<> 144:ef7eb2e8f9f7 2731 */
<> 144:ef7eb2e8f9f7 2732
<> 144:ef7eb2e8f9f7 2733 void arm_offset_f32(
<> 144:ef7eb2e8f9f7 2734 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 2735 float32_t offset,
<> 144:ef7eb2e8f9f7 2736 float32_t * pDst,
<> 144:ef7eb2e8f9f7 2737 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2738
<> 144:ef7eb2e8f9f7 2739 /**
<> 144:ef7eb2e8f9f7 2740 * @brief Adds a constant offset to a Q7 vector.
<> 144:ef7eb2e8f9f7 2741 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 2742 * @param[in] offset is the offset to be added
<> 144:ef7eb2e8f9f7 2743 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2744 * @param[in] blockSize number of samples in the vector
<> 144:ef7eb2e8f9f7 2745 * @return none.
<> 144:ef7eb2e8f9f7 2746 */
<> 144:ef7eb2e8f9f7 2747
<> 144:ef7eb2e8f9f7 2748 void arm_offset_q7(
<> 144:ef7eb2e8f9f7 2749 q7_t * pSrc,
<> 144:ef7eb2e8f9f7 2750 q7_t offset,
<> 144:ef7eb2e8f9f7 2751 q7_t * pDst,
<> 144:ef7eb2e8f9f7 2752 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2753
<> 144:ef7eb2e8f9f7 2754 /**
<> 144:ef7eb2e8f9f7 2755 * @brief Adds a constant offset to a Q15 vector.
<> 144:ef7eb2e8f9f7 2756 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 2757 * @param[in] offset is the offset to be added
<> 144:ef7eb2e8f9f7 2758 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2759 * @param[in] blockSize number of samples in the vector
<> 144:ef7eb2e8f9f7 2760 * @return none.
<> 144:ef7eb2e8f9f7 2761 */
<> 144:ef7eb2e8f9f7 2762
<> 144:ef7eb2e8f9f7 2763 void arm_offset_q15(
<> 144:ef7eb2e8f9f7 2764 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 2765 q15_t offset,
<> 144:ef7eb2e8f9f7 2766 q15_t * pDst,
<> 144:ef7eb2e8f9f7 2767 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2768
<> 144:ef7eb2e8f9f7 2769 /**
<> 144:ef7eb2e8f9f7 2770 * @brief Adds a constant offset to a Q31 vector.
<> 144:ef7eb2e8f9f7 2771 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 2772 * @param[in] offset is the offset to be added
<> 144:ef7eb2e8f9f7 2773 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2774 * @param[in] blockSize number of samples in the vector
<> 144:ef7eb2e8f9f7 2775 * @return none.
<> 144:ef7eb2e8f9f7 2776 */
<> 144:ef7eb2e8f9f7 2777
<> 144:ef7eb2e8f9f7 2778 void arm_offset_q31(
<> 144:ef7eb2e8f9f7 2779 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 2780 q31_t offset,
<> 144:ef7eb2e8f9f7 2781 q31_t * pDst,
<> 144:ef7eb2e8f9f7 2782 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2783
<> 144:ef7eb2e8f9f7 2784 /**
<> 144:ef7eb2e8f9f7 2785 * @brief Negates the elements of a floating-point vector.
<> 144:ef7eb2e8f9f7 2786 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 2787 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2788 * @param[in] blockSize number of samples in the vector
<> 144:ef7eb2e8f9f7 2789 * @return none.
<> 144:ef7eb2e8f9f7 2790 */
<> 144:ef7eb2e8f9f7 2791
<> 144:ef7eb2e8f9f7 2792 void arm_negate_f32(
<> 144:ef7eb2e8f9f7 2793 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 2794 float32_t * pDst,
<> 144:ef7eb2e8f9f7 2795 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2796
<> 144:ef7eb2e8f9f7 2797 /**
<> 144:ef7eb2e8f9f7 2798 * @brief Negates the elements of a Q7 vector.
<> 144:ef7eb2e8f9f7 2799 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 2800 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2801 * @param[in] blockSize number of samples in the vector
<> 144:ef7eb2e8f9f7 2802 * @return none.
<> 144:ef7eb2e8f9f7 2803 */
<> 144:ef7eb2e8f9f7 2804
<> 144:ef7eb2e8f9f7 2805 void arm_negate_q7(
<> 144:ef7eb2e8f9f7 2806 q7_t * pSrc,
<> 144:ef7eb2e8f9f7 2807 q7_t * pDst,
<> 144:ef7eb2e8f9f7 2808 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2809
<> 144:ef7eb2e8f9f7 2810 /**
<> 144:ef7eb2e8f9f7 2811 * @brief Negates the elements of a Q15 vector.
<> 144:ef7eb2e8f9f7 2812 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 2813 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2814 * @param[in] blockSize number of samples in the vector
<> 144:ef7eb2e8f9f7 2815 * @return none.
<> 144:ef7eb2e8f9f7 2816 */
<> 144:ef7eb2e8f9f7 2817
<> 144:ef7eb2e8f9f7 2818 void arm_negate_q15(
<> 144:ef7eb2e8f9f7 2819 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 2820 q15_t * pDst,
<> 144:ef7eb2e8f9f7 2821 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2822
<> 144:ef7eb2e8f9f7 2823 /**
<> 144:ef7eb2e8f9f7 2824 * @brief Negates the elements of a Q31 vector.
<> 144:ef7eb2e8f9f7 2825 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 2826 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 2827 * @param[in] blockSize number of samples in the vector
<> 144:ef7eb2e8f9f7 2828 * @return none.
<> 144:ef7eb2e8f9f7 2829 */
<> 144:ef7eb2e8f9f7 2830
<> 144:ef7eb2e8f9f7 2831 void arm_negate_q31(
<> 144:ef7eb2e8f9f7 2832 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 2833 q31_t * pDst,
<> 144:ef7eb2e8f9f7 2834 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2835 /**
<> 144:ef7eb2e8f9f7 2836 * @brief Copies the elements of a floating-point vector.
<> 144:ef7eb2e8f9f7 2837 * @param[in] *pSrc input pointer
<> 144:ef7eb2e8f9f7 2838 * @param[out] *pDst output pointer
<> 144:ef7eb2e8f9f7 2839 * @param[in] blockSize number of samples to process
<> 144:ef7eb2e8f9f7 2840 * @return none.
<> 144:ef7eb2e8f9f7 2841 */
<> 144:ef7eb2e8f9f7 2842 void arm_copy_f32(
<> 144:ef7eb2e8f9f7 2843 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 2844 float32_t * pDst,
<> 144:ef7eb2e8f9f7 2845 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2846
<> 144:ef7eb2e8f9f7 2847 /**
<> 144:ef7eb2e8f9f7 2848 * @brief Copies the elements of a Q7 vector.
<> 144:ef7eb2e8f9f7 2849 * @param[in] *pSrc input pointer
<> 144:ef7eb2e8f9f7 2850 * @param[out] *pDst output pointer
<> 144:ef7eb2e8f9f7 2851 * @param[in] blockSize number of samples to process
<> 144:ef7eb2e8f9f7 2852 * @return none.
<> 144:ef7eb2e8f9f7 2853 */
<> 144:ef7eb2e8f9f7 2854 void arm_copy_q7(
<> 144:ef7eb2e8f9f7 2855 q7_t * pSrc,
<> 144:ef7eb2e8f9f7 2856 q7_t * pDst,
<> 144:ef7eb2e8f9f7 2857 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2858
<> 144:ef7eb2e8f9f7 2859 /**
<> 144:ef7eb2e8f9f7 2860 * @brief Copies the elements of a Q15 vector.
<> 144:ef7eb2e8f9f7 2861 * @param[in] *pSrc input pointer
<> 144:ef7eb2e8f9f7 2862 * @param[out] *pDst output pointer
<> 144:ef7eb2e8f9f7 2863 * @param[in] blockSize number of samples to process
<> 144:ef7eb2e8f9f7 2864 * @return none.
<> 144:ef7eb2e8f9f7 2865 */
<> 144:ef7eb2e8f9f7 2866 void arm_copy_q15(
<> 144:ef7eb2e8f9f7 2867 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 2868 q15_t * pDst,
<> 144:ef7eb2e8f9f7 2869 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2870
<> 144:ef7eb2e8f9f7 2871 /**
<> 144:ef7eb2e8f9f7 2872 * @brief Copies the elements of a Q31 vector.
<> 144:ef7eb2e8f9f7 2873 * @param[in] *pSrc input pointer
<> 144:ef7eb2e8f9f7 2874 * @param[out] *pDst output pointer
<> 144:ef7eb2e8f9f7 2875 * @param[in] blockSize number of samples to process
<> 144:ef7eb2e8f9f7 2876 * @return none.
<> 144:ef7eb2e8f9f7 2877 */
<> 144:ef7eb2e8f9f7 2878 void arm_copy_q31(
<> 144:ef7eb2e8f9f7 2879 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 2880 q31_t * pDst,
<> 144:ef7eb2e8f9f7 2881 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2882 /**
<> 144:ef7eb2e8f9f7 2883 * @brief Fills a constant value into a floating-point vector.
<> 144:ef7eb2e8f9f7 2884 * @param[in] value input value to be filled
<> 144:ef7eb2e8f9f7 2885 * @param[out] *pDst output pointer
<> 144:ef7eb2e8f9f7 2886 * @param[in] blockSize number of samples to process
<> 144:ef7eb2e8f9f7 2887 * @return none.
<> 144:ef7eb2e8f9f7 2888 */
<> 144:ef7eb2e8f9f7 2889 void arm_fill_f32(
<> 144:ef7eb2e8f9f7 2890 float32_t value,
<> 144:ef7eb2e8f9f7 2891 float32_t * pDst,
<> 144:ef7eb2e8f9f7 2892 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2893
<> 144:ef7eb2e8f9f7 2894 /**
<> 144:ef7eb2e8f9f7 2895 * @brief Fills a constant value into a Q7 vector.
<> 144:ef7eb2e8f9f7 2896 * @param[in] value input value to be filled
<> 144:ef7eb2e8f9f7 2897 * @param[out] *pDst output pointer
<> 144:ef7eb2e8f9f7 2898 * @param[in] blockSize number of samples to process
<> 144:ef7eb2e8f9f7 2899 * @return none.
<> 144:ef7eb2e8f9f7 2900 */
<> 144:ef7eb2e8f9f7 2901 void arm_fill_q7(
<> 144:ef7eb2e8f9f7 2902 q7_t value,
<> 144:ef7eb2e8f9f7 2903 q7_t * pDst,
<> 144:ef7eb2e8f9f7 2904 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2905
<> 144:ef7eb2e8f9f7 2906 /**
<> 144:ef7eb2e8f9f7 2907 * @brief Fills a constant value into a Q15 vector.
<> 144:ef7eb2e8f9f7 2908 * @param[in] value input value to be filled
<> 144:ef7eb2e8f9f7 2909 * @param[out] *pDst output pointer
<> 144:ef7eb2e8f9f7 2910 * @param[in] blockSize number of samples to process
<> 144:ef7eb2e8f9f7 2911 * @return none.
<> 144:ef7eb2e8f9f7 2912 */
<> 144:ef7eb2e8f9f7 2913 void arm_fill_q15(
<> 144:ef7eb2e8f9f7 2914 q15_t value,
<> 144:ef7eb2e8f9f7 2915 q15_t * pDst,
<> 144:ef7eb2e8f9f7 2916 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2917
<> 144:ef7eb2e8f9f7 2918 /**
<> 144:ef7eb2e8f9f7 2919 * @brief Fills a constant value into a Q31 vector.
<> 144:ef7eb2e8f9f7 2920 * @param[in] value input value to be filled
<> 144:ef7eb2e8f9f7 2921 * @param[out] *pDst output pointer
<> 144:ef7eb2e8f9f7 2922 * @param[in] blockSize number of samples to process
<> 144:ef7eb2e8f9f7 2923 * @return none.
<> 144:ef7eb2e8f9f7 2924 */
<> 144:ef7eb2e8f9f7 2925 void arm_fill_q31(
<> 144:ef7eb2e8f9f7 2926 q31_t value,
<> 144:ef7eb2e8f9f7 2927 q31_t * pDst,
<> 144:ef7eb2e8f9f7 2928 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 2929
<> 144:ef7eb2e8f9f7 2930 /**
<> 144:ef7eb2e8f9f7 2931 * @brief Convolution of floating-point sequences.
<> 144:ef7eb2e8f9f7 2932 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 2933 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 2934 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 2935 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 2936 * @param[out] *pDst points to the location where the output result is written. Length srcALen+srcBLen-1.
<> 144:ef7eb2e8f9f7 2937 * @return none.
<> 144:ef7eb2e8f9f7 2938 */
<> 144:ef7eb2e8f9f7 2939
<> 144:ef7eb2e8f9f7 2940 void arm_conv_f32(
<> 144:ef7eb2e8f9f7 2941 float32_t * pSrcA,
<> 144:ef7eb2e8f9f7 2942 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 2943 float32_t * pSrcB,
<> 144:ef7eb2e8f9f7 2944 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 2945 float32_t * pDst);
<> 144:ef7eb2e8f9f7 2946
<> 144:ef7eb2e8f9f7 2947
<> 144:ef7eb2e8f9f7 2948 /**
<> 144:ef7eb2e8f9f7 2949 * @brief Convolution of Q15 sequences.
<> 144:ef7eb2e8f9f7 2950 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 2951 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 2952 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 2953 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 2954 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 144:ef7eb2e8f9f7 2955 * @param[in] *pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 144:ef7eb2e8f9f7 2956 * @param[in] *pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
<> 144:ef7eb2e8f9f7 2957 * @return none.
<> 144:ef7eb2e8f9f7 2958 */
<> 144:ef7eb2e8f9f7 2959
<> 144:ef7eb2e8f9f7 2960
<> 144:ef7eb2e8f9f7 2961 void arm_conv_opt_q15(
<> 144:ef7eb2e8f9f7 2962 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 2963 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 2964 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 2965 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 2966 q15_t * pDst,
<> 144:ef7eb2e8f9f7 2967 q15_t * pScratch1,
<> 144:ef7eb2e8f9f7 2968 q15_t * pScratch2);
<> 144:ef7eb2e8f9f7 2969
<> 144:ef7eb2e8f9f7 2970
<> 144:ef7eb2e8f9f7 2971 /**
<> 144:ef7eb2e8f9f7 2972 * @brief Convolution of Q15 sequences.
<> 144:ef7eb2e8f9f7 2973 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 2974 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 2975 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 2976 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 2977 * @param[out] *pDst points to the location where the output result is written. Length srcALen+srcBLen-1.
<> 144:ef7eb2e8f9f7 2978 * @return none.
<> 144:ef7eb2e8f9f7 2979 */
<> 144:ef7eb2e8f9f7 2980
<> 144:ef7eb2e8f9f7 2981 void arm_conv_q15(
<> 144:ef7eb2e8f9f7 2982 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 2983 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 2984 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 2985 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 2986 q15_t * pDst);
<> 144:ef7eb2e8f9f7 2987
<> 144:ef7eb2e8f9f7 2988 /**
<> 144:ef7eb2e8f9f7 2989 * @brief Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 144:ef7eb2e8f9f7 2990 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 2991 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 2992 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 2993 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 2994 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 144:ef7eb2e8f9f7 2995 * @return none.
<> 144:ef7eb2e8f9f7 2996 */
<> 144:ef7eb2e8f9f7 2997
<> 144:ef7eb2e8f9f7 2998 void arm_conv_fast_q15(
<> 144:ef7eb2e8f9f7 2999 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 3000 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 3001 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 3002 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 3003 q15_t * pDst);
<> 144:ef7eb2e8f9f7 3004
<> 144:ef7eb2e8f9f7 3005 /**
<> 144:ef7eb2e8f9f7 3006 * @brief Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 144:ef7eb2e8f9f7 3007 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 3008 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 3009 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 3010 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 3011 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 144:ef7eb2e8f9f7 3012 * @param[in] *pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 144:ef7eb2e8f9f7 3013 * @param[in] *pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
<> 144:ef7eb2e8f9f7 3014 * @return none.
<> 144:ef7eb2e8f9f7 3015 */
<> 144:ef7eb2e8f9f7 3016
<> 144:ef7eb2e8f9f7 3017 void arm_conv_fast_opt_q15(
<> 144:ef7eb2e8f9f7 3018 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 3019 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 3020 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 3021 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 3022 q15_t * pDst,
<> 144:ef7eb2e8f9f7 3023 q15_t * pScratch1,
<> 144:ef7eb2e8f9f7 3024 q15_t * pScratch2);
<> 144:ef7eb2e8f9f7 3025
<> 144:ef7eb2e8f9f7 3026
<> 144:ef7eb2e8f9f7 3027
<> 144:ef7eb2e8f9f7 3028 /**
<> 144:ef7eb2e8f9f7 3029 * @brief Convolution of Q31 sequences.
<> 144:ef7eb2e8f9f7 3030 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 3031 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 3032 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 3033 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 3034 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 144:ef7eb2e8f9f7 3035 * @return none.
<> 144:ef7eb2e8f9f7 3036 */
<> 144:ef7eb2e8f9f7 3037
<> 144:ef7eb2e8f9f7 3038 void arm_conv_q31(
<> 144:ef7eb2e8f9f7 3039 q31_t * pSrcA,
<> 144:ef7eb2e8f9f7 3040 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 3041 q31_t * pSrcB,
<> 144:ef7eb2e8f9f7 3042 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 3043 q31_t * pDst);
<> 144:ef7eb2e8f9f7 3044
<> 144:ef7eb2e8f9f7 3045 /**
<> 144:ef7eb2e8f9f7 3046 * @brief Convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 144:ef7eb2e8f9f7 3047 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 3048 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 3049 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 3050 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 3051 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 144:ef7eb2e8f9f7 3052 * @return none.
<> 144:ef7eb2e8f9f7 3053 */
<> 144:ef7eb2e8f9f7 3054
<> 144:ef7eb2e8f9f7 3055 void arm_conv_fast_q31(
<> 144:ef7eb2e8f9f7 3056 q31_t * pSrcA,
<> 144:ef7eb2e8f9f7 3057 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 3058 q31_t * pSrcB,
<> 144:ef7eb2e8f9f7 3059 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 3060 q31_t * pDst);
<> 144:ef7eb2e8f9f7 3061
<> 144:ef7eb2e8f9f7 3062
<> 144:ef7eb2e8f9f7 3063 /**
<> 144:ef7eb2e8f9f7 3064 * @brief Convolution of Q7 sequences.
<> 144:ef7eb2e8f9f7 3065 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 3066 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 3067 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 3068 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 3069 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 144:ef7eb2e8f9f7 3070 * @param[in] *pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 144:ef7eb2e8f9f7 3071 * @param[in] *pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen).
<> 144:ef7eb2e8f9f7 3072 * @return none.
<> 144:ef7eb2e8f9f7 3073 */
<> 144:ef7eb2e8f9f7 3074
<> 144:ef7eb2e8f9f7 3075 void arm_conv_opt_q7(
<> 144:ef7eb2e8f9f7 3076 q7_t * pSrcA,
<> 144:ef7eb2e8f9f7 3077 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 3078 q7_t * pSrcB,
<> 144:ef7eb2e8f9f7 3079 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 3080 q7_t * pDst,
<> 144:ef7eb2e8f9f7 3081 q15_t * pScratch1,
<> 144:ef7eb2e8f9f7 3082 q15_t * pScratch2);
<> 144:ef7eb2e8f9f7 3083
<> 144:ef7eb2e8f9f7 3084
<> 144:ef7eb2e8f9f7 3085
<> 144:ef7eb2e8f9f7 3086 /**
<> 144:ef7eb2e8f9f7 3087 * @brief Convolution of Q7 sequences.
<> 144:ef7eb2e8f9f7 3088 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 3089 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 3090 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 3091 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 3092 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 144:ef7eb2e8f9f7 3093 * @return none.
<> 144:ef7eb2e8f9f7 3094 */
<> 144:ef7eb2e8f9f7 3095
<> 144:ef7eb2e8f9f7 3096 void arm_conv_q7(
<> 144:ef7eb2e8f9f7 3097 q7_t * pSrcA,
<> 144:ef7eb2e8f9f7 3098 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 3099 q7_t * pSrcB,
<> 144:ef7eb2e8f9f7 3100 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 3101 q7_t * pDst);
<> 144:ef7eb2e8f9f7 3102
<> 144:ef7eb2e8f9f7 3103
<> 144:ef7eb2e8f9f7 3104 /**
<> 144:ef7eb2e8f9f7 3105 * @brief Partial convolution of floating-point sequences.
<> 144:ef7eb2e8f9f7 3106 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 3107 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 3108 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 3109 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 3110 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3111 * @param[in] firstIndex is the first output sample to start with.
<> 144:ef7eb2e8f9f7 3112 * @param[in] numPoints is the number of output points to be computed.
<> 144:ef7eb2e8f9f7 3113 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 144:ef7eb2e8f9f7 3114 */
<> 144:ef7eb2e8f9f7 3115
<> 144:ef7eb2e8f9f7 3116 arm_status arm_conv_partial_f32(
<> 144:ef7eb2e8f9f7 3117 float32_t * pSrcA,
<> 144:ef7eb2e8f9f7 3118 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 3119 float32_t * pSrcB,
<> 144:ef7eb2e8f9f7 3120 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 3121 float32_t * pDst,
<> 144:ef7eb2e8f9f7 3122 uint32_t firstIndex,
<> 144:ef7eb2e8f9f7 3123 uint32_t numPoints);
<> 144:ef7eb2e8f9f7 3124
<> 144:ef7eb2e8f9f7 3125 /**
<> 144:ef7eb2e8f9f7 3126 * @brief Partial convolution of Q15 sequences.
<> 144:ef7eb2e8f9f7 3127 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 3128 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 3129 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 3130 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 3131 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3132 * @param[in] firstIndex is the first output sample to start with.
<> 144:ef7eb2e8f9f7 3133 * @param[in] numPoints is the number of output points to be computed.
<> 144:ef7eb2e8f9f7 3134 * @param[in] * pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 144:ef7eb2e8f9f7 3135 * @param[in] * pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
<> 144:ef7eb2e8f9f7 3136 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 144:ef7eb2e8f9f7 3137 */
<> 144:ef7eb2e8f9f7 3138
<> 144:ef7eb2e8f9f7 3139 arm_status arm_conv_partial_opt_q15(
<> 144:ef7eb2e8f9f7 3140 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 3141 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 3142 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 3143 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 3144 q15_t * pDst,
<> 144:ef7eb2e8f9f7 3145 uint32_t firstIndex,
<> 144:ef7eb2e8f9f7 3146 uint32_t numPoints,
<> 144:ef7eb2e8f9f7 3147 q15_t * pScratch1,
<> 144:ef7eb2e8f9f7 3148 q15_t * pScratch2);
<> 144:ef7eb2e8f9f7 3149
<> 144:ef7eb2e8f9f7 3150
<> 144:ef7eb2e8f9f7 3151 /**
<> 144:ef7eb2e8f9f7 3152 * @brief Partial convolution of Q15 sequences.
<> 144:ef7eb2e8f9f7 3153 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 3154 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 3155 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 3156 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 3157 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3158 * @param[in] firstIndex is the first output sample to start with.
<> 144:ef7eb2e8f9f7 3159 * @param[in] numPoints is the number of output points to be computed.
<> 144:ef7eb2e8f9f7 3160 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 144:ef7eb2e8f9f7 3161 */
<> 144:ef7eb2e8f9f7 3162
<> 144:ef7eb2e8f9f7 3163 arm_status arm_conv_partial_q15(
<> 144:ef7eb2e8f9f7 3164 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 3165 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 3166 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 3167 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 3168 q15_t * pDst,
<> 144:ef7eb2e8f9f7 3169 uint32_t firstIndex,
<> 144:ef7eb2e8f9f7 3170 uint32_t numPoints);
<> 144:ef7eb2e8f9f7 3171
<> 144:ef7eb2e8f9f7 3172 /**
<> 144:ef7eb2e8f9f7 3173 * @brief Partial convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 144:ef7eb2e8f9f7 3174 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 3175 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 3176 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 3177 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 3178 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3179 * @param[in] firstIndex is the first output sample to start with.
<> 144:ef7eb2e8f9f7 3180 * @param[in] numPoints is the number of output points to be computed.
<> 144:ef7eb2e8f9f7 3181 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 144:ef7eb2e8f9f7 3182 */
<> 144:ef7eb2e8f9f7 3183
<> 144:ef7eb2e8f9f7 3184 arm_status arm_conv_partial_fast_q15(
<> 144:ef7eb2e8f9f7 3185 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 3186 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 3187 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 3188 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 3189 q15_t * pDst,
<> 144:ef7eb2e8f9f7 3190 uint32_t firstIndex,
<> 144:ef7eb2e8f9f7 3191 uint32_t numPoints);
<> 144:ef7eb2e8f9f7 3192
<> 144:ef7eb2e8f9f7 3193
<> 144:ef7eb2e8f9f7 3194 /**
<> 144:ef7eb2e8f9f7 3195 * @brief Partial convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 144:ef7eb2e8f9f7 3196 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 3197 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 3198 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 3199 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 3200 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3201 * @param[in] firstIndex is the first output sample to start with.
<> 144:ef7eb2e8f9f7 3202 * @param[in] numPoints is the number of output points to be computed.
<> 144:ef7eb2e8f9f7 3203 * @param[in] * pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 144:ef7eb2e8f9f7 3204 * @param[in] * pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
<> 144:ef7eb2e8f9f7 3205 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 144:ef7eb2e8f9f7 3206 */
<> 144:ef7eb2e8f9f7 3207
<> 144:ef7eb2e8f9f7 3208 arm_status arm_conv_partial_fast_opt_q15(
<> 144:ef7eb2e8f9f7 3209 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 3210 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 3211 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 3212 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 3213 q15_t * pDst,
<> 144:ef7eb2e8f9f7 3214 uint32_t firstIndex,
<> 144:ef7eb2e8f9f7 3215 uint32_t numPoints,
<> 144:ef7eb2e8f9f7 3216 q15_t * pScratch1,
<> 144:ef7eb2e8f9f7 3217 q15_t * pScratch2);
<> 144:ef7eb2e8f9f7 3218
<> 144:ef7eb2e8f9f7 3219
<> 144:ef7eb2e8f9f7 3220 /**
<> 144:ef7eb2e8f9f7 3221 * @brief Partial convolution of Q31 sequences.
<> 144:ef7eb2e8f9f7 3222 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 3223 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 3224 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 3225 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 3226 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3227 * @param[in] firstIndex is the first output sample to start with.
<> 144:ef7eb2e8f9f7 3228 * @param[in] numPoints is the number of output points to be computed.
<> 144:ef7eb2e8f9f7 3229 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 144:ef7eb2e8f9f7 3230 */
<> 144:ef7eb2e8f9f7 3231
<> 144:ef7eb2e8f9f7 3232 arm_status arm_conv_partial_q31(
<> 144:ef7eb2e8f9f7 3233 q31_t * pSrcA,
<> 144:ef7eb2e8f9f7 3234 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 3235 q31_t * pSrcB,
<> 144:ef7eb2e8f9f7 3236 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 3237 q31_t * pDst,
<> 144:ef7eb2e8f9f7 3238 uint32_t firstIndex,
<> 144:ef7eb2e8f9f7 3239 uint32_t numPoints);
<> 144:ef7eb2e8f9f7 3240
<> 144:ef7eb2e8f9f7 3241
<> 144:ef7eb2e8f9f7 3242 /**
<> 144:ef7eb2e8f9f7 3243 * @brief Partial convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 144:ef7eb2e8f9f7 3244 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 3245 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 3246 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 3247 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 3248 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3249 * @param[in] firstIndex is the first output sample to start with.
<> 144:ef7eb2e8f9f7 3250 * @param[in] numPoints is the number of output points to be computed.
<> 144:ef7eb2e8f9f7 3251 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 144:ef7eb2e8f9f7 3252 */
<> 144:ef7eb2e8f9f7 3253
<> 144:ef7eb2e8f9f7 3254 arm_status arm_conv_partial_fast_q31(
<> 144:ef7eb2e8f9f7 3255 q31_t * pSrcA,
<> 144:ef7eb2e8f9f7 3256 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 3257 q31_t * pSrcB,
<> 144:ef7eb2e8f9f7 3258 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 3259 q31_t * pDst,
<> 144:ef7eb2e8f9f7 3260 uint32_t firstIndex,
<> 144:ef7eb2e8f9f7 3261 uint32_t numPoints);
<> 144:ef7eb2e8f9f7 3262
<> 144:ef7eb2e8f9f7 3263
<> 144:ef7eb2e8f9f7 3264 /**
<> 144:ef7eb2e8f9f7 3265 * @brief Partial convolution of Q7 sequences
<> 144:ef7eb2e8f9f7 3266 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 3267 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 3268 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 3269 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 3270 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3271 * @param[in] firstIndex is the first output sample to start with.
<> 144:ef7eb2e8f9f7 3272 * @param[in] numPoints is the number of output points to be computed.
<> 144:ef7eb2e8f9f7 3273 * @param[in] *pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 144:ef7eb2e8f9f7 3274 * @param[in] *pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen).
<> 144:ef7eb2e8f9f7 3275 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 144:ef7eb2e8f9f7 3276 */
<> 144:ef7eb2e8f9f7 3277
<> 144:ef7eb2e8f9f7 3278 arm_status arm_conv_partial_opt_q7(
<> 144:ef7eb2e8f9f7 3279 q7_t * pSrcA,
<> 144:ef7eb2e8f9f7 3280 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 3281 q7_t * pSrcB,
<> 144:ef7eb2e8f9f7 3282 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 3283 q7_t * pDst,
<> 144:ef7eb2e8f9f7 3284 uint32_t firstIndex,
<> 144:ef7eb2e8f9f7 3285 uint32_t numPoints,
<> 144:ef7eb2e8f9f7 3286 q15_t * pScratch1,
<> 144:ef7eb2e8f9f7 3287 q15_t * pScratch2);
<> 144:ef7eb2e8f9f7 3288
<> 144:ef7eb2e8f9f7 3289
<> 144:ef7eb2e8f9f7 3290 /**
<> 144:ef7eb2e8f9f7 3291 * @brief Partial convolution of Q7 sequences.
<> 144:ef7eb2e8f9f7 3292 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 3293 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 3294 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 3295 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 3296 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3297 * @param[in] firstIndex is the first output sample to start with.
<> 144:ef7eb2e8f9f7 3298 * @param[in] numPoints is the number of output points to be computed.
<> 144:ef7eb2e8f9f7 3299 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 144:ef7eb2e8f9f7 3300 */
<> 144:ef7eb2e8f9f7 3301
<> 144:ef7eb2e8f9f7 3302 arm_status arm_conv_partial_q7(
<> 144:ef7eb2e8f9f7 3303 q7_t * pSrcA,
<> 144:ef7eb2e8f9f7 3304 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 3305 q7_t * pSrcB,
<> 144:ef7eb2e8f9f7 3306 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 3307 q7_t * pDst,
<> 144:ef7eb2e8f9f7 3308 uint32_t firstIndex,
<> 144:ef7eb2e8f9f7 3309 uint32_t numPoints);
<> 144:ef7eb2e8f9f7 3310
<> 144:ef7eb2e8f9f7 3311
<> 144:ef7eb2e8f9f7 3312
<> 144:ef7eb2e8f9f7 3313 /**
<> 144:ef7eb2e8f9f7 3314 * @brief Instance structure for the Q15 FIR decimator.
<> 144:ef7eb2e8f9f7 3315 */
<> 144:ef7eb2e8f9f7 3316
<> 144:ef7eb2e8f9f7 3317 typedef struct
<> 144:ef7eb2e8f9f7 3318 {
<> 144:ef7eb2e8f9f7 3319 uint8_t M; /**< decimation factor. */
<> 144:ef7eb2e8f9f7 3320 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 144:ef7eb2e8f9f7 3321 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 144:ef7eb2e8f9f7 3322 q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 144:ef7eb2e8f9f7 3323 } arm_fir_decimate_instance_q15;
<> 144:ef7eb2e8f9f7 3324
<> 144:ef7eb2e8f9f7 3325 /**
<> 144:ef7eb2e8f9f7 3326 * @brief Instance structure for the Q31 FIR decimator.
<> 144:ef7eb2e8f9f7 3327 */
<> 144:ef7eb2e8f9f7 3328
<> 144:ef7eb2e8f9f7 3329 typedef struct
<> 144:ef7eb2e8f9f7 3330 {
<> 144:ef7eb2e8f9f7 3331 uint8_t M; /**< decimation factor. */
<> 144:ef7eb2e8f9f7 3332 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 144:ef7eb2e8f9f7 3333 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 144:ef7eb2e8f9f7 3334 q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 144:ef7eb2e8f9f7 3335
<> 144:ef7eb2e8f9f7 3336 } arm_fir_decimate_instance_q31;
<> 144:ef7eb2e8f9f7 3337
<> 144:ef7eb2e8f9f7 3338 /**
<> 144:ef7eb2e8f9f7 3339 * @brief Instance structure for the floating-point FIR decimator.
<> 144:ef7eb2e8f9f7 3340 */
<> 144:ef7eb2e8f9f7 3341
<> 144:ef7eb2e8f9f7 3342 typedef struct
<> 144:ef7eb2e8f9f7 3343 {
<> 144:ef7eb2e8f9f7 3344 uint8_t M; /**< decimation factor. */
<> 144:ef7eb2e8f9f7 3345 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 144:ef7eb2e8f9f7 3346 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 144:ef7eb2e8f9f7 3347 float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 144:ef7eb2e8f9f7 3348
<> 144:ef7eb2e8f9f7 3349 } arm_fir_decimate_instance_f32;
<> 144:ef7eb2e8f9f7 3350
<> 144:ef7eb2e8f9f7 3351
<> 144:ef7eb2e8f9f7 3352
<> 144:ef7eb2e8f9f7 3353 /**
<> 144:ef7eb2e8f9f7 3354 * @brief Processing function for the floating-point FIR decimator.
<> 144:ef7eb2e8f9f7 3355 * @param[in] *S points to an instance of the floating-point FIR decimator structure.
<> 144:ef7eb2e8f9f7 3356 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 3357 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3358 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 3359 * @return none
<> 144:ef7eb2e8f9f7 3360 */
<> 144:ef7eb2e8f9f7 3361
<> 144:ef7eb2e8f9f7 3362 void arm_fir_decimate_f32(
<> 144:ef7eb2e8f9f7 3363 const arm_fir_decimate_instance_f32 * S,
<> 144:ef7eb2e8f9f7 3364 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 3365 float32_t * pDst,
<> 144:ef7eb2e8f9f7 3366 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3367
<> 144:ef7eb2e8f9f7 3368
<> 144:ef7eb2e8f9f7 3369 /**
<> 144:ef7eb2e8f9f7 3370 * @brief Initialization function for the floating-point FIR decimator.
<> 144:ef7eb2e8f9f7 3371 * @param[in,out] *S points to an instance of the floating-point FIR decimator structure.
<> 144:ef7eb2e8f9f7 3372 * @param[in] numTaps number of coefficients in the filter.
<> 144:ef7eb2e8f9f7 3373 * @param[in] M decimation factor.
<> 144:ef7eb2e8f9f7 3374 * @param[in] *pCoeffs points to the filter coefficients.
<> 144:ef7eb2e8f9f7 3375 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 3376 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 3377 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 144:ef7eb2e8f9f7 3378 * <code>blockSize</code> is not a multiple of <code>M</code>.
<> 144:ef7eb2e8f9f7 3379 */
<> 144:ef7eb2e8f9f7 3380
<> 144:ef7eb2e8f9f7 3381 arm_status arm_fir_decimate_init_f32(
<> 144:ef7eb2e8f9f7 3382 arm_fir_decimate_instance_f32 * S,
<> 144:ef7eb2e8f9f7 3383 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 3384 uint8_t M,
<> 144:ef7eb2e8f9f7 3385 float32_t * pCoeffs,
<> 144:ef7eb2e8f9f7 3386 float32_t * pState,
<> 144:ef7eb2e8f9f7 3387 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3388
<> 144:ef7eb2e8f9f7 3389 /**
<> 144:ef7eb2e8f9f7 3390 * @brief Processing function for the Q15 FIR decimator.
<> 144:ef7eb2e8f9f7 3391 * @param[in] *S points to an instance of the Q15 FIR decimator structure.
<> 144:ef7eb2e8f9f7 3392 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 3393 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3394 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 3395 * @return none
<> 144:ef7eb2e8f9f7 3396 */
<> 144:ef7eb2e8f9f7 3397
<> 144:ef7eb2e8f9f7 3398 void arm_fir_decimate_q15(
<> 144:ef7eb2e8f9f7 3399 const arm_fir_decimate_instance_q15 * S,
<> 144:ef7eb2e8f9f7 3400 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 3401 q15_t * pDst,
<> 144:ef7eb2e8f9f7 3402 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3403
<> 144:ef7eb2e8f9f7 3404 /**
<> 144:ef7eb2e8f9f7 3405 * @brief Processing function for the Q15 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
<> 144:ef7eb2e8f9f7 3406 * @param[in] *S points to an instance of the Q15 FIR decimator structure.
<> 144:ef7eb2e8f9f7 3407 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 3408 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3409 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 3410 * @return none
<> 144:ef7eb2e8f9f7 3411 */
<> 144:ef7eb2e8f9f7 3412
<> 144:ef7eb2e8f9f7 3413 void arm_fir_decimate_fast_q15(
<> 144:ef7eb2e8f9f7 3414 const arm_fir_decimate_instance_q15 * S,
<> 144:ef7eb2e8f9f7 3415 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 3416 q15_t * pDst,
<> 144:ef7eb2e8f9f7 3417 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3418
<> 144:ef7eb2e8f9f7 3419
<> 144:ef7eb2e8f9f7 3420
<> 144:ef7eb2e8f9f7 3421 /**
<> 144:ef7eb2e8f9f7 3422 * @brief Initialization function for the Q15 FIR decimator.
<> 144:ef7eb2e8f9f7 3423 * @param[in,out] *S points to an instance of the Q15 FIR decimator structure.
<> 144:ef7eb2e8f9f7 3424 * @param[in] numTaps number of coefficients in the filter.
<> 144:ef7eb2e8f9f7 3425 * @param[in] M decimation factor.
<> 144:ef7eb2e8f9f7 3426 * @param[in] *pCoeffs points to the filter coefficients.
<> 144:ef7eb2e8f9f7 3427 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 3428 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 3429 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 144:ef7eb2e8f9f7 3430 * <code>blockSize</code> is not a multiple of <code>M</code>.
<> 144:ef7eb2e8f9f7 3431 */
<> 144:ef7eb2e8f9f7 3432
<> 144:ef7eb2e8f9f7 3433 arm_status arm_fir_decimate_init_q15(
<> 144:ef7eb2e8f9f7 3434 arm_fir_decimate_instance_q15 * S,
<> 144:ef7eb2e8f9f7 3435 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 3436 uint8_t M,
<> 144:ef7eb2e8f9f7 3437 q15_t * pCoeffs,
<> 144:ef7eb2e8f9f7 3438 q15_t * pState,
<> 144:ef7eb2e8f9f7 3439 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3440
<> 144:ef7eb2e8f9f7 3441 /**
<> 144:ef7eb2e8f9f7 3442 * @brief Processing function for the Q31 FIR decimator.
<> 144:ef7eb2e8f9f7 3443 * @param[in] *S points to an instance of the Q31 FIR decimator structure.
<> 144:ef7eb2e8f9f7 3444 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 3445 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3446 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 3447 * @return none
<> 144:ef7eb2e8f9f7 3448 */
<> 144:ef7eb2e8f9f7 3449
<> 144:ef7eb2e8f9f7 3450 void arm_fir_decimate_q31(
<> 144:ef7eb2e8f9f7 3451 const arm_fir_decimate_instance_q31 * S,
<> 144:ef7eb2e8f9f7 3452 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 3453 q31_t * pDst,
<> 144:ef7eb2e8f9f7 3454 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3455
<> 144:ef7eb2e8f9f7 3456 /**
<> 144:ef7eb2e8f9f7 3457 * @brief Processing function for the Q31 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
<> 144:ef7eb2e8f9f7 3458 * @param[in] *S points to an instance of the Q31 FIR decimator structure.
<> 144:ef7eb2e8f9f7 3459 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 3460 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3461 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 3462 * @return none
<> 144:ef7eb2e8f9f7 3463 */
<> 144:ef7eb2e8f9f7 3464
<> 144:ef7eb2e8f9f7 3465 void arm_fir_decimate_fast_q31(
<> 144:ef7eb2e8f9f7 3466 arm_fir_decimate_instance_q31 * S,
<> 144:ef7eb2e8f9f7 3467 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 3468 q31_t * pDst,
<> 144:ef7eb2e8f9f7 3469 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3470
<> 144:ef7eb2e8f9f7 3471
<> 144:ef7eb2e8f9f7 3472 /**
<> 144:ef7eb2e8f9f7 3473 * @brief Initialization function for the Q31 FIR decimator.
<> 144:ef7eb2e8f9f7 3474 * @param[in,out] *S points to an instance of the Q31 FIR decimator structure.
<> 144:ef7eb2e8f9f7 3475 * @param[in] numTaps number of coefficients in the filter.
<> 144:ef7eb2e8f9f7 3476 * @param[in] M decimation factor.
<> 144:ef7eb2e8f9f7 3477 * @param[in] *pCoeffs points to the filter coefficients.
<> 144:ef7eb2e8f9f7 3478 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 3479 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 3480 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 144:ef7eb2e8f9f7 3481 * <code>blockSize</code> is not a multiple of <code>M</code>.
<> 144:ef7eb2e8f9f7 3482 */
<> 144:ef7eb2e8f9f7 3483
<> 144:ef7eb2e8f9f7 3484 arm_status arm_fir_decimate_init_q31(
<> 144:ef7eb2e8f9f7 3485 arm_fir_decimate_instance_q31 * S,
<> 144:ef7eb2e8f9f7 3486 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 3487 uint8_t M,
<> 144:ef7eb2e8f9f7 3488 q31_t * pCoeffs,
<> 144:ef7eb2e8f9f7 3489 q31_t * pState,
<> 144:ef7eb2e8f9f7 3490 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3491
<> 144:ef7eb2e8f9f7 3492
<> 144:ef7eb2e8f9f7 3493
<> 144:ef7eb2e8f9f7 3494 /**
<> 144:ef7eb2e8f9f7 3495 * @brief Instance structure for the Q15 FIR interpolator.
<> 144:ef7eb2e8f9f7 3496 */
<> 144:ef7eb2e8f9f7 3497
<> 144:ef7eb2e8f9f7 3498 typedef struct
<> 144:ef7eb2e8f9f7 3499 {
<> 144:ef7eb2e8f9f7 3500 uint8_t L; /**< upsample factor. */
<> 144:ef7eb2e8f9f7 3501 uint16_t phaseLength; /**< length of each polyphase filter component. */
<> 144:ef7eb2e8f9f7 3502 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
<> 144:ef7eb2e8f9f7 3503 q15_t *pState; /**< points to the state variable array. The array is of length blockSize+phaseLength-1. */
<> 144:ef7eb2e8f9f7 3504 } arm_fir_interpolate_instance_q15;
<> 144:ef7eb2e8f9f7 3505
<> 144:ef7eb2e8f9f7 3506 /**
<> 144:ef7eb2e8f9f7 3507 * @brief Instance structure for the Q31 FIR interpolator.
<> 144:ef7eb2e8f9f7 3508 */
<> 144:ef7eb2e8f9f7 3509
<> 144:ef7eb2e8f9f7 3510 typedef struct
<> 144:ef7eb2e8f9f7 3511 {
<> 144:ef7eb2e8f9f7 3512 uint8_t L; /**< upsample factor. */
<> 144:ef7eb2e8f9f7 3513 uint16_t phaseLength; /**< length of each polyphase filter component. */
<> 144:ef7eb2e8f9f7 3514 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
<> 144:ef7eb2e8f9f7 3515 q31_t *pState; /**< points to the state variable array. The array is of length blockSize+phaseLength-1. */
<> 144:ef7eb2e8f9f7 3516 } arm_fir_interpolate_instance_q31;
<> 144:ef7eb2e8f9f7 3517
<> 144:ef7eb2e8f9f7 3518 /**
<> 144:ef7eb2e8f9f7 3519 * @brief Instance structure for the floating-point FIR interpolator.
<> 144:ef7eb2e8f9f7 3520 */
<> 144:ef7eb2e8f9f7 3521
<> 144:ef7eb2e8f9f7 3522 typedef struct
<> 144:ef7eb2e8f9f7 3523 {
<> 144:ef7eb2e8f9f7 3524 uint8_t L; /**< upsample factor. */
<> 144:ef7eb2e8f9f7 3525 uint16_t phaseLength; /**< length of each polyphase filter component. */
<> 144:ef7eb2e8f9f7 3526 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
<> 144:ef7eb2e8f9f7 3527 float32_t *pState; /**< points to the state variable array. The array is of length phaseLength+numTaps-1. */
<> 144:ef7eb2e8f9f7 3528 } arm_fir_interpolate_instance_f32;
<> 144:ef7eb2e8f9f7 3529
<> 144:ef7eb2e8f9f7 3530
<> 144:ef7eb2e8f9f7 3531 /**
<> 144:ef7eb2e8f9f7 3532 * @brief Processing function for the Q15 FIR interpolator.
<> 144:ef7eb2e8f9f7 3533 * @param[in] *S points to an instance of the Q15 FIR interpolator structure.
<> 144:ef7eb2e8f9f7 3534 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 3535 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 3536 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 3537 * @return none.
<> 144:ef7eb2e8f9f7 3538 */
<> 144:ef7eb2e8f9f7 3539
<> 144:ef7eb2e8f9f7 3540 void arm_fir_interpolate_q15(
<> 144:ef7eb2e8f9f7 3541 const arm_fir_interpolate_instance_q15 * S,
<> 144:ef7eb2e8f9f7 3542 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 3543 q15_t * pDst,
<> 144:ef7eb2e8f9f7 3544 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3545
<> 144:ef7eb2e8f9f7 3546
<> 144:ef7eb2e8f9f7 3547 /**
<> 144:ef7eb2e8f9f7 3548 * @brief Initialization function for the Q15 FIR interpolator.
<> 144:ef7eb2e8f9f7 3549 * @param[in,out] *S points to an instance of the Q15 FIR interpolator structure.
<> 144:ef7eb2e8f9f7 3550 * @param[in] L upsample factor.
<> 144:ef7eb2e8f9f7 3551 * @param[in] numTaps number of filter coefficients in the filter.
<> 144:ef7eb2e8f9f7 3552 * @param[in] *pCoeffs points to the filter coefficient buffer.
<> 144:ef7eb2e8f9f7 3553 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 3554 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 3555 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 144:ef7eb2e8f9f7 3556 * the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</code>.
<> 144:ef7eb2e8f9f7 3557 */
<> 144:ef7eb2e8f9f7 3558
<> 144:ef7eb2e8f9f7 3559 arm_status arm_fir_interpolate_init_q15(
<> 144:ef7eb2e8f9f7 3560 arm_fir_interpolate_instance_q15 * S,
<> 144:ef7eb2e8f9f7 3561 uint8_t L,
<> 144:ef7eb2e8f9f7 3562 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 3563 q15_t * pCoeffs,
<> 144:ef7eb2e8f9f7 3564 q15_t * pState,
<> 144:ef7eb2e8f9f7 3565 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3566
<> 144:ef7eb2e8f9f7 3567 /**
<> 144:ef7eb2e8f9f7 3568 * @brief Processing function for the Q31 FIR interpolator.
<> 144:ef7eb2e8f9f7 3569 * @param[in] *S points to an instance of the Q15 FIR interpolator structure.
<> 144:ef7eb2e8f9f7 3570 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 3571 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 3572 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 3573 * @return none.
<> 144:ef7eb2e8f9f7 3574 */
<> 144:ef7eb2e8f9f7 3575
<> 144:ef7eb2e8f9f7 3576 void arm_fir_interpolate_q31(
<> 144:ef7eb2e8f9f7 3577 const arm_fir_interpolate_instance_q31 * S,
<> 144:ef7eb2e8f9f7 3578 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 3579 q31_t * pDst,
<> 144:ef7eb2e8f9f7 3580 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3581
<> 144:ef7eb2e8f9f7 3582 /**
<> 144:ef7eb2e8f9f7 3583 * @brief Initialization function for the Q31 FIR interpolator.
<> 144:ef7eb2e8f9f7 3584 * @param[in,out] *S points to an instance of the Q31 FIR interpolator structure.
<> 144:ef7eb2e8f9f7 3585 * @param[in] L upsample factor.
<> 144:ef7eb2e8f9f7 3586 * @param[in] numTaps number of filter coefficients in the filter.
<> 144:ef7eb2e8f9f7 3587 * @param[in] *pCoeffs points to the filter coefficient buffer.
<> 144:ef7eb2e8f9f7 3588 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 3589 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 3590 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 144:ef7eb2e8f9f7 3591 * the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</code>.
<> 144:ef7eb2e8f9f7 3592 */
<> 144:ef7eb2e8f9f7 3593
<> 144:ef7eb2e8f9f7 3594 arm_status arm_fir_interpolate_init_q31(
<> 144:ef7eb2e8f9f7 3595 arm_fir_interpolate_instance_q31 * S,
<> 144:ef7eb2e8f9f7 3596 uint8_t L,
<> 144:ef7eb2e8f9f7 3597 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 3598 q31_t * pCoeffs,
<> 144:ef7eb2e8f9f7 3599 q31_t * pState,
<> 144:ef7eb2e8f9f7 3600 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3601
<> 144:ef7eb2e8f9f7 3602
<> 144:ef7eb2e8f9f7 3603 /**
<> 144:ef7eb2e8f9f7 3604 * @brief Processing function for the floating-point FIR interpolator.
<> 144:ef7eb2e8f9f7 3605 * @param[in] *S points to an instance of the floating-point FIR interpolator structure.
<> 144:ef7eb2e8f9f7 3606 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 3607 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 3608 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 3609 * @return none.
<> 144:ef7eb2e8f9f7 3610 */
<> 144:ef7eb2e8f9f7 3611
<> 144:ef7eb2e8f9f7 3612 void arm_fir_interpolate_f32(
<> 144:ef7eb2e8f9f7 3613 const arm_fir_interpolate_instance_f32 * S,
<> 144:ef7eb2e8f9f7 3614 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 3615 float32_t * pDst,
<> 144:ef7eb2e8f9f7 3616 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3617
<> 144:ef7eb2e8f9f7 3618 /**
<> 144:ef7eb2e8f9f7 3619 * @brief Initialization function for the floating-point FIR interpolator.
<> 144:ef7eb2e8f9f7 3620 * @param[in,out] *S points to an instance of the floating-point FIR interpolator structure.
<> 144:ef7eb2e8f9f7 3621 * @param[in] L upsample factor.
<> 144:ef7eb2e8f9f7 3622 * @param[in] numTaps number of filter coefficients in the filter.
<> 144:ef7eb2e8f9f7 3623 * @param[in] *pCoeffs points to the filter coefficient buffer.
<> 144:ef7eb2e8f9f7 3624 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 3625 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 3626 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 144:ef7eb2e8f9f7 3627 * the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</code>.
<> 144:ef7eb2e8f9f7 3628 */
<> 144:ef7eb2e8f9f7 3629
<> 144:ef7eb2e8f9f7 3630 arm_status arm_fir_interpolate_init_f32(
<> 144:ef7eb2e8f9f7 3631 arm_fir_interpolate_instance_f32 * S,
<> 144:ef7eb2e8f9f7 3632 uint8_t L,
<> 144:ef7eb2e8f9f7 3633 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 3634 float32_t * pCoeffs,
<> 144:ef7eb2e8f9f7 3635 float32_t * pState,
<> 144:ef7eb2e8f9f7 3636 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3637
<> 144:ef7eb2e8f9f7 3638 /**
<> 144:ef7eb2e8f9f7 3639 * @brief Instance structure for the high precision Q31 Biquad cascade filter.
<> 144:ef7eb2e8f9f7 3640 */
<> 144:ef7eb2e8f9f7 3641
<> 144:ef7eb2e8f9f7 3642 typedef struct
<> 144:ef7eb2e8f9f7 3643 {
<> 144:ef7eb2e8f9f7 3644 uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 144:ef7eb2e8f9f7 3645 q63_t *pState; /**< points to the array of state coefficients. The array is of length 4*numStages. */
<> 144:ef7eb2e8f9f7 3646 q31_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
<> 144:ef7eb2e8f9f7 3647 uint8_t postShift; /**< additional shift, in bits, applied to each output sample. */
<> 144:ef7eb2e8f9f7 3648
<> 144:ef7eb2e8f9f7 3649 } arm_biquad_cas_df1_32x64_ins_q31;
<> 144:ef7eb2e8f9f7 3650
<> 144:ef7eb2e8f9f7 3651
<> 144:ef7eb2e8f9f7 3652 /**
<> 144:ef7eb2e8f9f7 3653 * @param[in] *S points to an instance of the high precision Q31 Biquad cascade filter structure.
<> 144:ef7eb2e8f9f7 3654 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 3655 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3656 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 3657 * @return none.
<> 144:ef7eb2e8f9f7 3658 */
<> 144:ef7eb2e8f9f7 3659
<> 144:ef7eb2e8f9f7 3660 void arm_biquad_cas_df1_32x64_q31(
<> 144:ef7eb2e8f9f7 3661 const arm_biquad_cas_df1_32x64_ins_q31 * S,
<> 144:ef7eb2e8f9f7 3662 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 3663 q31_t * pDst,
<> 144:ef7eb2e8f9f7 3664 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3665
<> 144:ef7eb2e8f9f7 3666
<> 144:ef7eb2e8f9f7 3667 /**
<> 144:ef7eb2e8f9f7 3668 * @param[in,out] *S points to an instance of the high precision Q31 Biquad cascade filter structure.
<> 144:ef7eb2e8f9f7 3669 * @param[in] numStages number of 2nd order stages in the filter.
<> 144:ef7eb2e8f9f7 3670 * @param[in] *pCoeffs points to the filter coefficients.
<> 144:ef7eb2e8f9f7 3671 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 3672 * @param[in] postShift shift to be applied to the output. Varies according to the coefficients format
<> 144:ef7eb2e8f9f7 3673 * @return none
<> 144:ef7eb2e8f9f7 3674 */
<> 144:ef7eb2e8f9f7 3675
<> 144:ef7eb2e8f9f7 3676 void arm_biquad_cas_df1_32x64_init_q31(
<> 144:ef7eb2e8f9f7 3677 arm_biquad_cas_df1_32x64_ins_q31 * S,
<> 144:ef7eb2e8f9f7 3678 uint8_t numStages,
<> 144:ef7eb2e8f9f7 3679 q31_t * pCoeffs,
<> 144:ef7eb2e8f9f7 3680 q63_t * pState,
<> 144:ef7eb2e8f9f7 3681 uint8_t postShift);
<> 144:ef7eb2e8f9f7 3682
<> 144:ef7eb2e8f9f7 3683
<> 144:ef7eb2e8f9f7 3684
<> 144:ef7eb2e8f9f7 3685 /**
<> 144:ef7eb2e8f9f7 3686 * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
<> 144:ef7eb2e8f9f7 3687 */
<> 144:ef7eb2e8f9f7 3688
<> 144:ef7eb2e8f9f7 3689 typedef struct
<> 144:ef7eb2e8f9f7 3690 {
<> 144:ef7eb2e8f9f7 3691 uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 144:ef7eb2e8f9f7 3692 float32_t *pState; /**< points to the array of state coefficients. The array is of length 2*numStages. */
<> 144:ef7eb2e8f9f7 3693 float32_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
<> 144:ef7eb2e8f9f7 3694 } arm_biquad_cascade_df2T_instance_f32;
<> 144:ef7eb2e8f9f7 3695
<> 144:ef7eb2e8f9f7 3696
<> 144:ef7eb2e8f9f7 3697 /**
<> 144:ef7eb2e8f9f7 3698 * @brief Processing function for the floating-point transposed direct form II Biquad cascade filter.
<> 144:ef7eb2e8f9f7 3699 * @param[in] *S points to an instance of the filter data structure.
<> 144:ef7eb2e8f9f7 3700 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 3701 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3702 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 3703 * @return none.
<> 144:ef7eb2e8f9f7 3704 */
<> 144:ef7eb2e8f9f7 3705
<> 144:ef7eb2e8f9f7 3706 void arm_biquad_cascade_df2T_f32(
<> 144:ef7eb2e8f9f7 3707 const arm_biquad_cascade_df2T_instance_f32 * S,
<> 144:ef7eb2e8f9f7 3708 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 3709 float32_t * pDst,
<> 144:ef7eb2e8f9f7 3710 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3711
<> 144:ef7eb2e8f9f7 3712
<> 144:ef7eb2e8f9f7 3713 /**
<> 144:ef7eb2e8f9f7 3714 * @brief Initialization function for the floating-point transposed direct form II Biquad cascade filter.
<> 144:ef7eb2e8f9f7 3715 * @param[in,out] *S points to an instance of the filter data structure.
<> 144:ef7eb2e8f9f7 3716 * @param[in] numStages number of 2nd order stages in the filter.
<> 144:ef7eb2e8f9f7 3717 * @param[in] *pCoeffs points to the filter coefficients.
<> 144:ef7eb2e8f9f7 3718 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 3719 * @return none
<> 144:ef7eb2e8f9f7 3720 */
<> 144:ef7eb2e8f9f7 3721
<> 144:ef7eb2e8f9f7 3722 void arm_biquad_cascade_df2T_init_f32(
<> 144:ef7eb2e8f9f7 3723 arm_biquad_cascade_df2T_instance_f32 * S,
<> 144:ef7eb2e8f9f7 3724 uint8_t numStages,
<> 144:ef7eb2e8f9f7 3725 float32_t * pCoeffs,
<> 144:ef7eb2e8f9f7 3726 float32_t * pState);
<> 144:ef7eb2e8f9f7 3727
<> 144:ef7eb2e8f9f7 3728
<> 144:ef7eb2e8f9f7 3729
<> 144:ef7eb2e8f9f7 3730 /**
<> 144:ef7eb2e8f9f7 3731 * @brief Instance structure for the Q15 FIR lattice filter.
<> 144:ef7eb2e8f9f7 3732 */
<> 144:ef7eb2e8f9f7 3733
<> 144:ef7eb2e8f9f7 3734 typedef struct
<> 144:ef7eb2e8f9f7 3735 {
<> 144:ef7eb2e8f9f7 3736 uint16_t numStages; /**< number of filter stages. */
<> 144:ef7eb2e8f9f7 3737 q15_t *pState; /**< points to the state variable array. The array is of length numStages. */
<> 144:ef7eb2e8f9f7 3738 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
<> 144:ef7eb2e8f9f7 3739 } arm_fir_lattice_instance_q15;
<> 144:ef7eb2e8f9f7 3740
<> 144:ef7eb2e8f9f7 3741 /**
<> 144:ef7eb2e8f9f7 3742 * @brief Instance structure for the Q31 FIR lattice filter.
<> 144:ef7eb2e8f9f7 3743 */
<> 144:ef7eb2e8f9f7 3744
<> 144:ef7eb2e8f9f7 3745 typedef struct
<> 144:ef7eb2e8f9f7 3746 {
<> 144:ef7eb2e8f9f7 3747 uint16_t numStages; /**< number of filter stages. */
<> 144:ef7eb2e8f9f7 3748 q31_t *pState; /**< points to the state variable array. The array is of length numStages. */
<> 144:ef7eb2e8f9f7 3749 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
<> 144:ef7eb2e8f9f7 3750 } arm_fir_lattice_instance_q31;
<> 144:ef7eb2e8f9f7 3751
<> 144:ef7eb2e8f9f7 3752 /**
<> 144:ef7eb2e8f9f7 3753 * @brief Instance structure for the floating-point FIR lattice filter.
<> 144:ef7eb2e8f9f7 3754 */
<> 144:ef7eb2e8f9f7 3755
<> 144:ef7eb2e8f9f7 3756 typedef struct
<> 144:ef7eb2e8f9f7 3757 {
<> 144:ef7eb2e8f9f7 3758 uint16_t numStages; /**< number of filter stages. */
<> 144:ef7eb2e8f9f7 3759 float32_t *pState; /**< points to the state variable array. The array is of length numStages. */
<> 144:ef7eb2e8f9f7 3760 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
<> 144:ef7eb2e8f9f7 3761 } arm_fir_lattice_instance_f32;
<> 144:ef7eb2e8f9f7 3762
<> 144:ef7eb2e8f9f7 3763 /**
<> 144:ef7eb2e8f9f7 3764 * @brief Initialization function for the Q15 FIR lattice filter.
<> 144:ef7eb2e8f9f7 3765 * @param[in] *S points to an instance of the Q15 FIR lattice structure.
<> 144:ef7eb2e8f9f7 3766 * @param[in] numStages number of filter stages.
<> 144:ef7eb2e8f9f7 3767 * @param[in] *pCoeffs points to the coefficient buffer. The array is of length numStages.
<> 144:ef7eb2e8f9f7 3768 * @param[in] *pState points to the state buffer. The array is of length numStages.
<> 144:ef7eb2e8f9f7 3769 * @return none.
<> 144:ef7eb2e8f9f7 3770 */
<> 144:ef7eb2e8f9f7 3771
<> 144:ef7eb2e8f9f7 3772 void arm_fir_lattice_init_q15(
<> 144:ef7eb2e8f9f7 3773 arm_fir_lattice_instance_q15 * S,
<> 144:ef7eb2e8f9f7 3774 uint16_t numStages,
<> 144:ef7eb2e8f9f7 3775 q15_t * pCoeffs,
<> 144:ef7eb2e8f9f7 3776 q15_t * pState);
<> 144:ef7eb2e8f9f7 3777
<> 144:ef7eb2e8f9f7 3778
<> 144:ef7eb2e8f9f7 3779 /**
<> 144:ef7eb2e8f9f7 3780 * @brief Processing function for the Q15 FIR lattice filter.
<> 144:ef7eb2e8f9f7 3781 * @param[in] *S points to an instance of the Q15 FIR lattice structure.
<> 144:ef7eb2e8f9f7 3782 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 3783 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 3784 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 3785 * @return none.
<> 144:ef7eb2e8f9f7 3786 */
<> 144:ef7eb2e8f9f7 3787 void arm_fir_lattice_q15(
<> 144:ef7eb2e8f9f7 3788 const arm_fir_lattice_instance_q15 * S,
<> 144:ef7eb2e8f9f7 3789 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 3790 q15_t * pDst,
<> 144:ef7eb2e8f9f7 3791 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3792
<> 144:ef7eb2e8f9f7 3793 /**
<> 144:ef7eb2e8f9f7 3794 * @brief Initialization function for the Q31 FIR lattice filter.
<> 144:ef7eb2e8f9f7 3795 * @param[in] *S points to an instance of the Q31 FIR lattice structure.
<> 144:ef7eb2e8f9f7 3796 * @param[in] numStages number of filter stages.
<> 144:ef7eb2e8f9f7 3797 * @param[in] *pCoeffs points to the coefficient buffer. The array is of length numStages.
<> 144:ef7eb2e8f9f7 3798 * @param[in] *pState points to the state buffer. The array is of length numStages.
<> 144:ef7eb2e8f9f7 3799 * @return none.
<> 144:ef7eb2e8f9f7 3800 */
<> 144:ef7eb2e8f9f7 3801
<> 144:ef7eb2e8f9f7 3802 void arm_fir_lattice_init_q31(
<> 144:ef7eb2e8f9f7 3803 arm_fir_lattice_instance_q31 * S,
<> 144:ef7eb2e8f9f7 3804 uint16_t numStages,
<> 144:ef7eb2e8f9f7 3805 q31_t * pCoeffs,
<> 144:ef7eb2e8f9f7 3806 q31_t * pState);
<> 144:ef7eb2e8f9f7 3807
<> 144:ef7eb2e8f9f7 3808
<> 144:ef7eb2e8f9f7 3809 /**
<> 144:ef7eb2e8f9f7 3810 * @brief Processing function for the Q31 FIR lattice filter.
<> 144:ef7eb2e8f9f7 3811 * @param[in] *S points to an instance of the Q31 FIR lattice structure.
<> 144:ef7eb2e8f9f7 3812 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 3813 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3814 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 3815 * @return none.
<> 144:ef7eb2e8f9f7 3816 */
<> 144:ef7eb2e8f9f7 3817
<> 144:ef7eb2e8f9f7 3818 void arm_fir_lattice_q31(
<> 144:ef7eb2e8f9f7 3819 const arm_fir_lattice_instance_q31 * S,
<> 144:ef7eb2e8f9f7 3820 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 3821 q31_t * pDst,
<> 144:ef7eb2e8f9f7 3822 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3823
<> 144:ef7eb2e8f9f7 3824 /**
<> 144:ef7eb2e8f9f7 3825 * @brief Initialization function for the floating-point FIR lattice filter.
<> 144:ef7eb2e8f9f7 3826 * @param[in] *S points to an instance of the floating-point FIR lattice structure.
<> 144:ef7eb2e8f9f7 3827 * @param[in] numStages number of filter stages.
<> 144:ef7eb2e8f9f7 3828 * @param[in] *pCoeffs points to the coefficient buffer. The array is of length numStages.
<> 144:ef7eb2e8f9f7 3829 * @param[in] *pState points to the state buffer. The array is of length numStages.
<> 144:ef7eb2e8f9f7 3830 * @return none.
<> 144:ef7eb2e8f9f7 3831 */
<> 144:ef7eb2e8f9f7 3832
<> 144:ef7eb2e8f9f7 3833 void arm_fir_lattice_init_f32(
<> 144:ef7eb2e8f9f7 3834 arm_fir_lattice_instance_f32 * S,
<> 144:ef7eb2e8f9f7 3835 uint16_t numStages,
<> 144:ef7eb2e8f9f7 3836 float32_t * pCoeffs,
<> 144:ef7eb2e8f9f7 3837 float32_t * pState);
<> 144:ef7eb2e8f9f7 3838
<> 144:ef7eb2e8f9f7 3839 /**
<> 144:ef7eb2e8f9f7 3840 * @brief Processing function for the floating-point FIR lattice filter.
<> 144:ef7eb2e8f9f7 3841 * @param[in] *S points to an instance of the floating-point FIR lattice structure.
<> 144:ef7eb2e8f9f7 3842 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 3843 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 3844 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 3845 * @return none.
<> 144:ef7eb2e8f9f7 3846 */
<> 144:ef7eb2e8f9f7 3847
<> 144:ef7eb2e8f9f7 3848 void arm_fir_lattice_f32(
<> 144:ef7eb2e8f9f7 3849 const arm_fir_lattice_instance_f32 * S,
<> 144:ef7eb2e8f9f7 3850 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 3851 float32_t * pDst,
<> 144:ef7eb2e8f9f7 3852 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3853
<> 144:ef7eb2e8f9f7 3854 /**
<> 144:ef7eb2e8f9f7 3855 * @brief Instance structure for the Q15 IIR lattice filter.
<> 144:ef7eb2e8f9f7 3856 */
<> 144:ef7eb2e8f9f7 3857 typedef struct
<> 144:ef7eb2e8f9f7 3858 {
<> 144:ef7eb2e8f9f7 3859 uint16_t numStages; /**< number of stages in the filter. */
<> 144:ef7eb2e8f9f7 3860 q15_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
<> 144:ef7eb2e8f9f7 3861 q15_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
<> 144:ef7eb2e8f9f7 3862 q15_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
<> 144:ef7eb2e8f9f7 3863 } arm_iir_lattice_instance_q15;
<> 144:ef7eb2e8f9f7 3864
<> 144:ef7eb2e8f9f7 3865 /**
<> 144:ef7eb2e8f9f7 3866 * @brief Instance structure for the Q31 IIR lattice filter.
<> 144:ef7eb2e8f9f7 3867 */
<> 144:ef7eb2e8f9f7 3868 typedef struct
<> 144:ef7eb2e8f9f7 3869 {
<> 144:ef7eb2e8f9f7 3870 uint16_t numStages; /**< number of stages in the filter. */
<> 144:ef7eb2e8f9f7 3871 q31_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
<> 144:ef7eb2e8f9f7 3872 q31_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
<> 144:ef7eb2e8f9f7 3873 q31_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
<> 144:ef7eb2e8f9f7 3874 } arm_iir_lattice_instance_q31;
<> 144:ef7eb2e8f9f7 3875
<> 144:ef7eb2e8f9f7 3876 /**
<> 144:ef7eb2e8f9f7 3877 * @brief Instance structure for the floating-point IIR lattice filter.
<> 144:ef7eb2e8f9f7 3878 */
<> 144:ef7eb2e8f9f7 3879 typedef struct
<> 144:ef7eb2e8f9f7 3880 {
<> 144:ef7eb2e8f9f7 3881 uint16_t numStages; /**< number of stages in the filter. */
<> 144:ef7eb2e8f9f7 3882 float32_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
<> 144:ef7eb2e8f9f7 3883 float32_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
<> 144:ef7eb2e8f9f7 3884 float32_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
<> 144:ef7eb2e8f9f7 3885 } arm_iir_lattice_instance_f32;
<> 144:ef7eb2e8f9f7 3886
<> 144:ef7eb2e8f9f7 3887 /**
<> 144:ef7eb2e8f9f7 3888 * @brief Processing function for the floating-point IIR lattice filter.
<> 144:ef7eb2e8f9f7 3889 * @param[in] *S points to an instance of the floating-point IIR lattice structure.
<> 144:ef7eb2e8f9f7 3890 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 3891 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 3892 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 3893 * @return none.
<> 144:ef7eb2e8f9f7 3894 */
<> 144:ef7eb2e8f9f7 3895
<> 144:ef7eb2e8f9f7 3896 void arm_iir_lattice_f32(
<> 144:ef7eb2e8f9f7 3897 const arm_iir_lattice_instance_f32 * S,
<> 144:ef7eb2e8f9f7 3898 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 3899 float32_t * pDst,
<> 144:ef7eb2e8f9f7 3900 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3901
<> 144:ef7eb2e8f9f7 3902 /**
<> 144:ef7eb2e8f9f7 3903 * @brief Initialization function for the floating-point IIR lattice filter.
<> 144:ef7eb2e8f9f7 3904 * @param[in] *S points to an instance of the floating-point IIR lattice structure.
<> 144:ef7eb2e8f9f7 3905 * @param[in] numStages number of stages in the filter.
<> 144:ef7eb2e8f9f7 3906 * @param[in] *pkCoeffs points to the reflection coefficient buffer. The array is of length numStages.
<> 144:ef7eb2e8f9f7 3907 * @param[in] *pvCoeffs points to the ladder coefficient buffer. The array is of length numStages+1.
<> 144:ef7eb2e8f9f7 3908 * @param[in] *pState points to the state buffer. The array is of length numStages+blockSize-1.
<> 144:ef7eb2e8f9f7 3909 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 3910 * @return none.
<> 144:ef7eb2e8f9f7 3911 */
<> 144:ef7eb2e8f9f7 3912
<> 144:ef7eb2e8f9f7 3913 void arm_iir_lattice_init_f32(
<> 144:ef7eb2e8f9f7 3914 arm_iir_lattice_instance_f32 * S,
<> 144:ef7eb2e8f9f7 3915 uint16_t numStages,
<> 144:ef7eb2e8f9f7 3916 float32_t * pkCoeffs,
<> 144:ef7eb2e8f9f7 3917 float32_t * pvCoeffs,
<> 144:ef7eb2e8f9f7 3918 float32_t * pState,
<> 144:ef7eb2e8f9f7 3919 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3920
<> 144:ef7eb2e8f9f7 3921
<> 144:ef7eb2e8f9f7 3922 /**
<> 144:ef7eb2e8f9f7 3923 * @brief Processing function for the Q31 IIR lattice filter.
<> 144:ef7eb2e8f9f7 3924 * @param[in] *S points to an instance of the Q31 IIR lattice structure.
<> 144:ef7eb2e8f9f7 3925 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 3926 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 3927 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 3928 * @return none.
<> 144:ef7eb2e8f9f7 3929 */
<> 144:ef7eb2e8f9f7 3930
<> 144:ef7eb2e8f9f7 3931 void arm_iir_lattice_q31(
<> 144:ef7eb2e8f9f7 3932 const arm_iir_lattice_instance_q31 * S,
<> 144:ef7eb2e8f9f7 3933 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 3934 q31_t * pDst,
<> 144:ef7eb2e8f9f7 3935 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3936
<> 144:ef7eb2e8f9f7 3937
<> 144:ef7eb2e8f9f7 3938 /**
<> 144:ef7eb2e8f9f7 3939 * @brief Initialization function for the Q31 IIR lattice filter.
<> 144:ef7eb2e8f9f7 3940 * @param[in] *S points to an instance of the Q31 IIR lattice structure.
<> 144:ef7eb2e8f9f7 3941 * @param[in] numStages number of stages in the filter.
<> 144:ef7eb2e8f9f7 3942 * @param[in] *pkCoeffs points to the reflection coefficient buffer. The array is of length numStages.
<> 144:ef7eb2e8f9f7 3943 * @param[in] *pvCoeffs points to the ladder coefficient buffer. The array is of length numStages+1.
<> 144:ef7eb2e8f9f7 3944 * @param[in] *pState points to the state buffer. The array is of length numStages+blockSize.
<> 144:ef7eb2e8f9f7 3945 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 3946 * @return none.
<> 144:ef7eb2e8f9f7 3947 */
<> 144:ef7eb2e8f9f7 3948
<> 144:ef7eb2e8f9f7 3949 void arm_iir_lattice_init_q31(
<> 144:ef7eb2e8f9f7 3950 arm_iir_lattice_instance_q31 * S,
<> 144:ef7eb2e8f9f7 3951 uint16_t numStages,
<> 144:ef7eb2e8f9f7 3952 q31_t * pkCoeffs,
<> 144:ef7eb2e8f9f7 3953 q31_t * pvCoeffs,
<> 144:ef7eb2e8f9f7 3954 q31_t * pState,
<> 144:ef7eb2e8f9f7 3955 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3956
<> 144:ef7eb2e8f9f7 3957
<> 144:ef7eb2e8f9f7 3958 /**
<> 144:ef7eb2e8f9f7 3959 * @brief Processing function for the Q15 IIR lattice filter.
<> 144:ef7eb2e8f9f7 3960 * @param[in] *S points to an instance of the Q15 IIR lattice structure.
<> 144:ef7eb2e8f9f7 3961 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 3962 * @param[out] *pDst points to the block of output data.
<> 144:ef7eb2e8f9f7 3963 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 3964 * @return none.
<> 144:ef7eb2e8f9f7 3965 */
<> 144:ef7eb2e8f9f7 3966
<> 144:ef7eb2e8f9f7 3967 void arm_iir_lattice_q15(
<> 144:ef7eb2e8f9f7 3968 const arm_iir_lattice_instance_q15 * S,
<> 144:ef7eb2e8f9f7 3969 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 3970 q15_t * pDst,
<> 144:ef7eb2e8f9f7 3971 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3972
<> 144:ef7eb2e8f9f7 3973
<> 144:ef7eb2e8f9f7 3974 /**
<> 144:ef7eb2e8f9f7 3975 * @brief Initialization function for the Q15 IIR lattice filter.
<> 144:ef7eb2e8f9f7 3976 * @param[in] *S points to an instance of the fixed-point Q15 IIR lattice structure.
<> 144:ef7eb2e8f9f7 3977 * @param[in] numStages number of stages in the filter.
<> 144:ef7eb2e8f9f7 3978 * @param[in] *pkCoeffs points to reflection coefficient buffer. The array is of length numStages.
<> 144:ef7eb2e8f9f7 3979 * @param[in] *pvCoeffs points to ladder coefficient buffer. The array is of length numStages+1.
<> 144:ef7eb2e8f9f7 3980 * @param[in] *pState points to state buffer. The array is of length numStages+blockSize.
<> 144:ef7eb2e8f9f7 3981 * @param[in] blockSize number of samples to process per call.
<> 144:ef7eb2e8f9f7 3982 * @return none.
<> 144:ef7eb2e8f9f7 3983 */
<> 144:ef7eb2e8f9f7 3984
<> 144:ef7eb2e8f9f7 3985 void arm_iir_lattice_init_q15(
<> 144:ef7eb2e8f9f7 3986 arm_iir_lattice_instance_q15 * S,
<> 144:ef7eb2e8f9f7 3987 uint16_t numStages,
<> 144:ef7eb2e8f9f7 3988 q15_t * pkCoeffs,
<> 144:ef7eb2e8f9f7 3989 q15_t * pvCoeffs,
<> 144:ef7eb2e8f9f7 3990 q15_t * pState,
<> 144:ef7eb2e8f9f7 3991 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 3992
<> 144:ef7eb2e8f9f7 3993 /**
<> 144:ef7eb2e8f9f7 3994 * @brief Instance structure for the floating-point LMS filter.
<> 144:ef7eb2e8f9f7 3995 */
<> 144:ef7eb2e8f9f7 3996
<> 144:ef7eb2e8f9f7 3997 typedef struct
<> 144:ef7eb2e8f9f7 3998 {
<> 144:ef7eb2e8f9f7 3999 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 144:ef7eb2e8f9f7 4000 float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 144:ef7eb2e8f9f7 4001 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 144:ef7eb2e8f9f7 4002 float32_t mu; /**< step size that controls filter coefficient updates. */
<> 144:ef7eb2e8f9f7 4003 } arm_lms_instance_f32;
<> 144:ef7eb2e8f9f7 4004
<> 144:ef7eb2e8f9f7 4005 /**
<> 144:ef7eb2e8f9f7 4006 * @brief Processing function for floating-point LMS filter.
<> 144:ef7eb2e8f9f7 4007 * @param[in] *S points to an instance of the floating-point LMS filter structure.
<> 144:ef7eb2e8f9f7 4008 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 4009 * @param[in] *pRef points to the block of reference data.
<> 144:ef7eb2e8f9f7 4010 * @param[out] *pOut points to the block of output data.
<> 144:ef7eb2e8f9f7 4011 * @param[out] *pErr points to the block of error data.
<> 144:ef7eb2e8f9f7 4012 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 4013 * @return none.
<> 144:ef7eb2e8f9f7 4014 */
<> 144:ef7eb2e8f9f7 4015
<> 144:ef7eb2e8f9f7 4016 void arm_lms_f32(
<> 144:ef7eb2e8f9f7 4017 const arm_lms_instance_f32 * S,
<> 144:ef7eb2e8f9f7 4018 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 4019 float32_t * pRef,
<> 144:ef7eb2e8f9f7 4020 float32_t * pOut,
<> 144:ef7eb2e8f9f7 4021 float32_t * pErr,
<> 144:ef7eb2e8f9f7 4022 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 4023
<> 144:ef7eb2e8f9f7 4024 /**
<> 144:ef7eb2e8f9f7 4025 * @brief Initialization function for floating-point LMS filter.
<> 144:ef7eb2e8f9f7 4026 * @param[in] *S points to an instance of the floating-point LMS filter structure.
<> 144:ef7eb2e8f9f7 4027 * @param[in] numTaps number of filter coefficients.
<> 144:ef7eb2e8f9f7 4028 * @param[in] *pCoeffs points to the coefficient buffer.
<> 144:ef7eb2e8f9f7 4029 * @param[in] *pState points to state buffer.
<> 144:ef7eb2e8f9f7 4030 * @param[in] mu step size that controls filter coefficient updates.
<> 144:ef7eb2e8f9f7 4031 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 4032 * @return none.
<> 144:ef7eb2e8f9f7 4033 */
<> 144:ef7eb2e8f9f7 4034
<> 144:ef7eb2e8f9f7 4035 void arm_lms_init_f32(
<> 144:ef7eb2e8f9f7 4036 arm_lms_instance_f32 * S,
<> 144:ef7eb2e8f9f7 4037 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 4038 float32_t * pCoeffs,
<> 144:ef7eb2e8f9f7 4039 float32_t * pState,
<> 144:ef7eb2e8f9f7 4040 float32_t mu,
<> 144:ef7eb2e8f9f7 4041 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 4042
<> 144:ef7eb2e8f9f7 4043 /**
<> 144:ef7eb2e8f9f7 4044 * @brief Instance structure for the Q15 LMS filter.
<> 144:ef7eb2e8f9f7 4045 */
<> 144:ef7eb2e8f9f7 4046
<> 144:ef7eb2e8f9f7 4047 typedef struct
<> 144:ef7eb2e8f9f7 4048 {
<> 144:ef7eb2e8f9f7 4049 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 144:ef7eb2e8f9f7 4050 q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 144:ef7eb2e8f9f7 4051 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 144:ef7eb2e8f9f7 4052 q15_t mu; /**< step size that controls filter coefficient updates. */
<> 144:ef7eb2e8f9f7 4053 uint32_t postShift; /**< bit shift applied to coefficients. */
<> 144:ef7eb2e8f9f7 4054 } arm_lms_instance_q15;
<> 144:ef7eb2e8f9f7 4055
<> 144:ef7eb2e8f9f7 4056
<> 144:ef7eb2e8f9f7 4057 /**
<> 144:ef7eb2e8f9f7 4058 * @brief Initialization function for the Q15 LMS filter.
<> 144:ef7eb2e8f9f7 4059 * @param[in] *S points to an instance of the Q15 LMS filter structure.
<> 144:ef7eb2e8f9f7 4060 * @param[in] numTaps number of filter coefficients.
<> 144:ef7eb2e8f9f7 4061 * @param[in] *pCoeffs points to the coefficient buffer.
<> 144:ef7eb2e8f9f7 4062 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 4063 * @param[in] mu step size that controls filter coefficient updates.
<> 144:ef7eb2e8f9f7 4064 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 4065 * @param[in] postShift bit shift applied to coefficients.
<> 144:ef7eb2e8f9f7 4066 * @return none.
<> 144:ef7eb2e8f9f7 4067 */
<> 144:ef7eb2e8f9f7 4068
<> 144:ef7eb2e8f9f7 4069 void arm_lms_init_q15(
<> 144:ef7eb2e8f9f7 4070 arm_lms_instance_q15 * S,
<> 144:ef7eb2e8f9f7 4071 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 4072 q15_t * pCoeffs,
<> 144:ef7eb2e8f9f7 4073 q15_t * pState,
<> 144:ef7eb2e8f9f7 4074 q15_t mu,
<> 144:ef7eb2e8f9f7 4075 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 4076 uint32_t postShift);
<> 144:ef7eb2e8f9f7 4077
<> 144:ef7eb2e8f9f7 4078 /**
<> 144:ef7eb2e8f9f7 4079 * @brief Processing function for Q15 LMS filter.
<> 144:ef7eb2e8f9f7 4080 * @param[in] *S points to an instance of the Q15 LMS filter structure.
<> 144:ef7eb2e8f9f7 4081 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 4082 * @param[in] *pRef points to the block of reference data.
<> 144:ef7eb2e8f9f7 4083 * @param[out] *pOut points to the block of output data.
<> 144:ef7eb2e8f9f7 4084 * @param[out] *pErr points to the block of error data.
<> 144:ef7eb2e8f9f7 4085 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 4086 * @return none.
<> 144:ef7eb2e8f9f7 4087 */
<> 144:ef7eb2e8f9f7 4088
<> 144:ef7eb2e8f9f7 4089 void arm_lms_q15(
<> 144:ef7eb2e8f9f7 4090 const arm_lms_instance_q15 * S,
<> 144:ef7eb2e8f9f7 4091 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 4092 q15_t * pRef,
<> 144:ef7eb2e8f9f7 4093 q15_t * pOut,
<> 144:ef7eb2e8f9f7 4094 q15_t * pErr,
<> 144:ef7eb2e8f9f7 4095 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 4096
<> 144:ef7eb2e8f9f7 4097
<> 144:ef7eb2e8f9f7 4098 /**
<> 144:ef7eb2e8f9f7 4099 * @brief Instance structure for the Q31 LMS filter.
<> 144:ef7eb2e8f9f7 4100 */
<> 144:ef7eb2e8f9f7 4101
<> 144:ef7eb2e8f9f7 4102 typedef struct
<> 144:ef7eb2e8f9f7 4103 {
<> 144:ef7eb2e8f9f7 4104 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 144:ef7eb2e8f9f7 4105 q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 144:ef7eb2e8f9f7 4106 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 144:ef7eb2e8f9f7 4107 q31_t mu; /**< step size that controls filter coefficient updates. */
<> 144:ef7eb2e8f9f7 4108 uint32_t postShift; /**< bit shift applied to coefficients. */
<> 144:ef7eb2e8f9f7 4109
<> 144:ef7eb2e8f9f7 4110 } arm_lms_instance_q31;
<> 144:ef7eb2e8f9f7 4111
<> 144:ef7eb2e8f9f7 4112 /**
<> 144:ef7eb2e8f9f7 4113 * @brief Processing function for Q31 LMS filter.
<> 144:ef7eb2e8f9f7 4114 * @param[in] *S points to an instance of the Q15 LMS filter structure.
<> 144:ef7eb2e8f9f7 4115 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 4116 * @param[in] *pRef points to the block of reference data.
<> 144:ef7eb2e8f9f7 4117 * @param[out] *pOut points to the block of output data.
<> 144:ef7eb2e8f9f7 4118 * @param[out] *pErr points to the block of error data.
<> 144:ef7eb2e8f9f7 4119 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 4120 * @return none.
<> 144:ef7eb2e8f9f7 4121 */
<> 144:ef7eb2e8f9f7 4122
<> 144:ef7eb2e8f9f7 4123 void arm_lms_q31(
<> 144:ef7eb2e8f9f7 4124 const arm_lms_instance_q31 * S,
<> 144:ef7eb2e8f9f7 4125 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 4126 q31_t * pRef,
<> 144:ef7eb2e8f9f7 4127 q31_t * pOut,
<> 144:ef7eb2e8f9f7 4128 q31_t * pErr,
<> 144:ef7eb2e8f9f7 4129 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 4130
<> 144:ef7eb2e8f9f7 4131 /**
<> 144:ef7eb2e8f9f7 4132 * @brief Initialization function for Q31 LMS filter.
<> 144:ef7eb2e8f9f7 4133 * @param[in] *S points to an instance of the Q31 LMS filter structure.
<> 144:ef7eb2e8f9f7 4134 * @param[in] numTaps number of filter coefficients.
<> 144:ef7eb2e8f9f7 4135 * @param[in] *pCoeffs points to coefficient buffer.
<> 144:ef7eb2e8f9f7 4136 * @param[in] *pState points to state buffer.
<> 144:ef7eb2e8f9f7 4137 * @param[in] mu step size that controls filter coefficient updates.
<> 144:ef7eb2e8f9f7 4138 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 4139 * @param[in] postShift bit shift applied to coefficients.
<> 144:ef7eb2e8f9f7 4140 * @return none.
<> 144:ef7eb2e8f9f7 4141 */
<> 144:ef7eb2e8f9f7 4142
<> 144:ef7eb2e8f9f7 4143 void arm_lms_init_q31(
<> 144:ef7eb2e8f9f7 4144 arm_lms_instance_q31 * S,
<> 144:ef7eb2e8f9f7 4145 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 4146 q31_t * pCoeffs,
<> 144:ef7eb2e8f9f7 4147 q31_t * pState,
<> 144:ef7eb2e8f9f7 4148 q31_t mu,
<> 144:ef7eb2e8f9f7 4149 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 4150 uint32_t postShift);
<> 144:ef7eb2e8f9f7 4151
<> 144:ef7eb2e8f9f7 4152 /**
<> 144:ef7eb2e8f9f7 4153 * @brief Instance structure for the floating-point normalized LMS filter.
<> 144:ef7eb2e8f9f7 4154 */
<> 144:ef7eb2e8f9f7 4155
<> 144:ef7eb2e8f9f7 4156 typedef struct
<> 144:ef7eb2e8f9f7 4157 {
<> 144:ef7eb2e8f9f7 4158 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 144:ef7eb2e8f9f7 4159 float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 144:ef7eb2e8f9f7 4160 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 144:ef7eb2e8f9f7 4161 float32_t mu; /**< step size that control filter coefficient updates. */
<> 144:ef7eb2e8f9f7 4162 float32_t energy; /**< saves previous frame energy. */
<> 144:ef7eb2e8f9f7 4163 float32_t x0; /**< saves previous input sample. */
<> 144:ef7eb2e8f9f7 4164 } arm_lms_norm_instance_f32;
<> 144:ef7eb2e8f9f7 4165
<> 144:ef7eb2e8f9f7 4166 /**
<> 144:ef7eb2e8f9f7 4167 * @brief Processing function for floating-point normalized LMS filter.
<> 144:ef7eb2e8f9f7 4168 * @param[in] *S points to an instance of the floating-point normalized LMS filter structure.
<> 144:ef7eb2e8f9f7 4169 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 4170 * @param[in] *pRef points to the block of reference data.
<> 144:ef7eb2e8f9f7 4171 * @param[out] *pOut points to the block of output data.
<> 144:ef7eb2e8f9f7 4172 * @param[out] *pErr points to the block of error data.
<> 144:ef7eb2e8f9f7 4173 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 4174 * @return none.
<> 144:ef7eb2e8f9f7 4175 */
<> 144:ef7eb2e8f9f7 4176
<> 144:ef7eb2e8f9f7 4177 void arm_lms_norm_f32(
<> 144:ef7eb2e8f9f7 4178 arm_lms_norm_instance_f32 * S,
<> 144:ef7eb2e8f9f7 4179 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 4180 float32_t * pRef,
<> 144:ef7eb2e8f9f7 4181 float32_t * pOut,
<> 144:ef7eb2e8f9f7 4182 float32_t * pErr,
<> 144:ef7eb2e8f9f7 4183 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 4184
<> 144:ef7eb2e8f9f7 4185 /**
<> 144:ef7eb2e8f9f7 4186 * @brief Initialization function for floating-point normalized LMS filter.
<> 144:ef7eb2e8f9f7 4187 * @param[in] *S points to an instance of the floating-point LMS filter structure.
<> 144:ef7eb2e8f9f7 4188 * @param[in] numTaps number of filter coefficients.
<> 144:ef7eb2e8f9f7 4189 * @param[in] *pCoeffs points to coefficient buffer.
<> 144:ef7eb2e8f9f7 4190 * @param[in] *pState points to state buffer.
<> 144:ef7eb2e8f9f7 4191 * @param[in] mu step size that controls filter coefficient updates.
<> 144:ef7eb2e8f9f7 4192 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 4193 * @return none.
<> 144:ef7eb2e8f9f7 4194 */
<> 144:ef7eb2e8f9f7 4195
<> 144:ef7eb2e8f9f7 4196 void arm_lms_norm_init_f32(
<> 144:ef7eb2e8f9f7 4197 arm_lms_norm_instance_f32 * S,
<> 144:ef7eb2e8f9f7 4198 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 4199 float32_t * pCoeffs,
<> 144:ef7eb2e8f9f7 4200 float32_t * pState,
<> 144:ef7eb2e8f9f7 4201 float32_t mu,
<> 144:ef7eb2e8f9f7 4202 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 4203
<> 144:ef7eb2e8f9f7 4204
<> 144:ef7eb2e8f9f7 4205 /**
<> 144:ef7eb2e8f9f7 4206 * @brief Instance structure for the Q31 normalized LMS filter.
<> 144:ef7eb2e8f9f7 4207 */
<> 144:ef7eb2e8f9f7 4208 typedef struct
<> 144:ef7eb2e8f9f7 4209 {
<> 144:ef7eb2e8f9f7 4210 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 144:ef7eb2e8f9f7 4211 q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 144:ef7eb2e8f9f7 4212 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 144:ef7eb2e8f9f7 4213 q31_t mu; /**< step size that controls filter coefficient updates. */
<> 144:ef7eb2e8f9f7 4214 uint8_t postShift; /**< bit shift applied to coefficients. */
<> 144:ef7eb2e8f9f7 4215 q31_t *recipTable; /**< points to the reciprocal initial value table. */
<> 144:ef7eb2e8f9f7 4216 q31_t energy; /**< saves previous frame energy. */
<> 144:ef7eb2e8f9f7 4217 q31_t x0; /**< saves previous input sample. */
<> 144:ef7eb2e8f9f7 4218 } arm_lms_norm_instance_q31;
<> 144:ef7eb2e8f9f7 4219
<> 144:ef7eb2e8f9f7 4220 /**
<> 144:ef7eb2e8f9f7 4221 * @brief Processing function for Q31 normalized LMS filter.
<> 144:ef7eb2e8f9f7 4222 * @param[in] *S points to an instance of the Q31 normalized LMS filter structure.
<> 144:ef7eb2e8f9f7 4223 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 4224 * @param[in] *pRef points to the block of reference data.
<> 144:ef7eb2e8f9f7 4225 * @param[out] *pOut points to the block of output data.
<> 144:ef7eb2e8f9f7 4226 * @param[out] *pErr points to the block of error data.
<> 144:ef7eb2e8f9f7 4227 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 4228 * @return none.
<> 144:ef7eb2e8f9f7 4229 */
<> 144:ef7eb2e8f9f7 4230
<> 144:ef7eb2e8f9f7 4231 void arm_lms_norm_q31(
<> 144:ef7eb2e8f9f7 4232 arm_lms_norm_instance_q31 * S,
<> 144:ef7eb2e8f9f7 4233 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 4234 q31_t * pRef,
<> 144:ef7eb2e8f9f7 4235 q31_t * pOut,
<> 144:ef7eb2e8f9f7 4236 q31_t * pErr,
<> 144:ef7eb2e8f9f7 4237 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 4238
<> 144:ef7eb2e8f9f7 4239 /**
<> 144:ef7eb2e8f9f7 4240 * @brief Initialization function for Q31 normalized LMS filter.
<> 144:ef7eb2e8f9f7 4241 * @param[in] *S points to an instance of the Q31 normalized LMS filter structure.
<> 144:ef7eb2e8f9f7 4242 * @param[in] numTaps number of filter coefficients.
<> 144:ef7eb2e8f9f7 4243 * @param[in] *pCoeffs points to coefficient buffer.
<> 144:ef7eb2e8f9f7 4244 * @param[in] *pState points to state buffer.
<> 144:ef7eb2e8f9f7 4245 * @param[in] mu step size that controls filter coefficient updates.
<> 144:ef7eb2e8f9f7 4246 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 4247 * @param[in] postShift bit shift applied to coefficients.
<> 144:ef7eb2e8f9f7 4248 * @return none.
<> 144:ef7eb2e8f9f7 4249 */
<> 144:ef7eb2e8f9f7 4250
<> 144:ef7eb2e8f9f7 4251 void arm_lms_norm_init_q31(
<> 144:ef7eb2e8f9f7 4252 arm_lms_norm_instance_q31 * S,
<> 144:ef7eb2e8f9f7 4253 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 4254 q31_t * pCoeffs,
<> 144:ef7eb2e8f9f7 4255 q31_t * pState,
<> 144:ef7eb2e8f9f7 4256 q31_t mu,
<> 144:ef7eb2e8f9f7 4257 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 4258 uint8_t postShift);
<> 144:ef7eb2e8f9f7 4259
<> 144:ef7eb2e8f9f7 4260 /**
<> 144:ef7eb2e8f9f7 4261 * @brief Instance structure for the Q15 normalized LMS filter.
<> 144:ef7eb2e8f9f7 4262 */
<> 144:ef7eb2e8f9f7 4263
<> 144:ef7eb2e8f9f7 4264 typedef struct
<> 144:ef7eb2e8f9f7 4265 {
<> 144:ef7eb2e8f9f7 4266 uint16_t numTaps; /**< Number of coefficients in the filter. */
<> 144:ef7eb2e8f9f7 4267 q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 144:ef7eb2e8f9f7 4268 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 144:ef7eb2e8f9f7 4269 q15_t mu; /**< step size that controls filter coefficient updates. */
<> 144:ef7eb2e8f9f7 4270 uint8_t postShift; /**< bit shift applied to coefficients. */
<> 144:ef7eb2e8f9f7 4271 q15_t *recipTable; /**< Points to the reciprocal initial value table. */
<> 144:ef7eb2e8f9f7 4272 q15_t energy; /**< saves previous frame energy. */
<> 144:ef7eb2e8f9f7 4273 q15_t x0; /**< saves previous input sample. */
<> 144:ef7eb2e8f9f7 4274 } arm_lms_norm_instance_q15;
<> 144:ef7eb2e8f9f7 4275
<> 144:ef7eb2e8f9f7 4276 /**
<> 144:ef7eb2e8f9f7 4277 * @brief Processing function for Q15 normalized LMS filter.
<> 144:ef7eb2e8f9f7 4278 * @param[in] *S points to an instance of the Q15 normalized LMS filter structure.
<> 144:ef7eb2e8f9f7 4279 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 4280 * @param[in] *pRef points to the block of reference data.
<> 144:ef7eb2e8f9f7 4281 * @param[out] *pOut points to the block of output data.
<> 144:ef7eb2e8f9f7 4282 * @param[out] *pErr points to the block of error data.
<> 144:ef7eb2e8f9f7 4283 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 4284 * @return none.
<> 144:ef7eb2e8f9f7 4285 */
<> 144:ef7eb2e8f9f7 4286
<> 144:ef7eb2e8f9f7 4287 void arm_lms_norm_q15(
<> 144:ef7eb2e8f9f7 4288 arm_lms_norm_instance_q15 * S,
<> 144:ef7eb2e8f9f7 4289 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 4290 q15_t * pRef,
<> 144:ef7eb2e8f9f7 4291 q15_t * pOut,
<> 144:ef7eb2e8f9f7 4292 q15_t * pErr,
<> 144:ef7eb2e8f9f7 4293 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 4294
<> 144:ef7eb2e8f9f7 4295
<> 144:ef7eb2e8f9f7 4296 /**
<> 144:ef7eb2e8f9f7 4297 * @brief Initialization function for Q15 normalized LMS filter.
<> 144:ef7eb2e8f9f7 4298 * @param[in] *S points to an instance of the Q15 normalized LMS filter structure.
<> 144:ef7eb2e8f9f7 4299 * @param[in] numTaps number of filter coefficients.
<> 144:ef7eb2e8f9f7 4300 * @param[in] *pCoeffs points to coefficient buffer.
<> 144:ef7eb2e8f9f7 4301 * @param[in] *pState points to state buffer.
<> 144:ef7eb2e8f9f7 4302 * @param[in] mu step size that controls filter coefficient updates.
<> 144:ef7eb2e8f9f7 4303 * @param[in] blockSize number of samples to process.
<> 144:ef7eb2e8f9f7 4304 * @param[in] postShift bit shift applied to coefficients.
<> 144:ef7eb2e8f9f7 4305 * @return none.
<> 144:ef7eb2e8f9f7 4306 */
<> 144:ef7eb2e8f9f7 4307
<> 144:ef7eb2e8f9f7 4308 void arm_lms_norm_init_q15(
<> 144:ef7eb2e8f9f7 4309 arm_lms_norm_instance_q15 * S,
<> 144:ef7eb2e8f9f7 4310 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 4311 q15_t * pCoeffs,
<> 144:ef7eb2e8f9f7 4312 q15_t * pState,
<> 144:ef7eb2e8f9f7 4313 q15_t mu,
<> 144:ef7eb2e8f9f7 4314 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 4315 uint8_t postShift);
<> 144:ef7eb2e8f9f7 4316
<> 144:ef7eb2e8f9f7 4317 /**
<> 144:ef7eb2e8f9f7 4318 * @brief Correlation of floating-point sequences.
<> 144:ef7eb2e8f9f7 4319 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 4320 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 4321 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 4322 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 4323 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 144:ef7eb2e8f9f7 4324 * @return none.
<> 144:ef7eb2e8f9f7 4325 */
<> 144:ef7eb2e8f9f7 4326
<> 144:ef7eb2e8f9f7 4327 void arm_correlate_f32(
<> 144:ef7eb2e8f9f7 4328 float32_t * pSrcA,
<> 144:ef7eb2e8f9f7 4329 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 4330 float32_t * pSrcB,
<> 144:ef7eb2e8f9f7 4331 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 4332 float32_t * pDst);
<> 144:ef7eb2e8f9f7 4333
<> 144:ef7eb2e8f9f7 4334
<> 144:ef7eb2e8f9f7 4335 /**
<> 144:ef7eb2e8f9f7 4336 * @brief Correlation of Q15 sequences
<> 144:ef7eb2e8f9f7 4337 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 4338 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 4339 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 4340 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 4341 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 144:ef7eb2e8f9f7 4342 * @param[in] *pScratch points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 144:ef7eb2e8f9f7 4343 * @return none.
<> 144:ef7eb2e8f9f7 4344 */
<> 144:ef7eb2e8f9f7 4345 void arm_correlate_opt_q15(
<> 144:ef7eb2e8f9f7 4346 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 4347 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 4348 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 4349 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 4350 q15_t * pDst,
<> 144:ef7eb2e8f9f7 4351 q15_t * pScratch);
<> 144:ef7eb2e8f9f7 4352
<> 144:ef7eb2e8f9f7 4353
<> 144:ef7eb2e8f9f7 4354 /**
<> 144:ef7eb2e8f9f7 4355 * @brief Correlation of Q15 sequences.
<> 144:ef7eb2e8f9f7 4356 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 4357 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 4358 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 4359 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 4360 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 144:ef7eb2e8f9f7 4361 * @return none.
<> 144:ef7eb2e8f9f7 4362 */
<> 144:ef7eb2e8f9f7 4363
<> 144:ef7eb2e8f9f7 4364 void arm_correlate_q15(
<> 144:ef7eb2e8f9f7 4365 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 4366 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 4367 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 4368 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 4369 q15_t * pDst);
<> 144:ef7eb2e8f9f7 4370
<> 144:ef7eb2e8f9f7 4371 /**
<> 144:ef7eb2e8f9f7 4372 * @brief Correlation of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
<> 144:ef7eb2e8f9f7 4373 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 4374 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 4375 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 4376 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 4377 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 144:ef7eb2e8f9f7 4378 * @return none.
<> 144:ef7eb2e8f9f7 4379 */
<> 144:ef7eb2e8f9f7 4380
<> 144:ef7eb2e8f9f7 4381 void arm_correlate_fast_q15(
<> 144:ef7eb2e8f9f7 4382 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 4383 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 4384 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 4385 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 4386 q15_t * pDst);
<> 144:ef7eb2e8f9f7 4387
<> 144:ef7eb2e8f9f7 4388
<> 144:ef7eb2e8f9f7 4389
<> 144:ef7eb2e8f9f7 4390 /**
<> 144:ef7eb2e8f9f7 4391 * @brief Correlation of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
<> 144:ef7eb2e8f9f7 4392 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 4393 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 4394 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 4395 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 4396 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 144:ef7eb2e8f9f7 4397 * @param[in] *pScratch points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 144:ef7eb2e8f9f7 4398 * @return none.
<> 144:ef7eb2e8f9f7 4399 */
<> 144:ef7eb2e8f9f7 4400
<> 144:ef7eb2e8f9f7 4401 void arm_correlate_fast_opt_q15(
<> 144:ef7eb2e8f9f7 4402 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 4403 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 4404 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 4405 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 4406 q15_t * pDst,
<> 144:ef7eb2e8f9f7 4407 q15_t * pScratch);
<> 144:ef7eb2e8f9f7 4408
<> 144:ef7eb2e8f9f7 4409 /**
<> 144:ef7eb2e8f9f7 4410 * @brief Correlation of Q31 sequences.
<> 144:ef7eb2e8f9f7 4411 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 4412 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 4413 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 4414 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 4415 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 144:ef7eb2e8f9f7 4416 * @return none.
<> 144:ef7eb2e8f9f7 4417 */
<> 144:ef7eb2e8f9f7 4418
<> 144:ef7eb2e8f9f7 4419 void arm_correlate_q31(
<> 144:ef7eb2e8f9f7 4420 q31_t * pSrcA,
<> 144:ef7eb2e8f9f7 4421 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 4422 q31_t * pSrcB,
<> 144:ef7eb2e8f9f7 4423 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 4424 q31_t * pDst);
<> 144:ef7eb2e8f9f7 4425
<> 144:ef7eb2e8f9f7 4426 /**
<> 144:ef7eb2e8f9f7 4427 * @brief Correlation of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 144:ef7eb2e8f9f7 4428 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 4429 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 4430 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 4431 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 4432 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 144:ef7eb2e8f9f7 4433 * @return none.
<> 144:ef7eb2e8f9f7 4434 */
<> 144:ef7eb2e8f9f7 4435
<> 144:ef7eb2e8f9f7 4436 void arm_correlate_fast_q31(
<> 144:ef7eb2e8f9f7 4437 q31_t * pSrcA,
<> 144:ef7eb2e8f9f7 4438 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 4439 q31_t * pSrcB,
<> 144:ef7eb2e8f9f7 4440 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 4441 q31_t * pDst);
<> 144:ef7eb2e8f9f7 4442
<> 144:ef7eb2e8f9f7 4443
<> 144:ef7eb2e8f9f7 4444
<> 144:ef7eb2e8f9f7 4445 /**
<> 144:ef7eb2e8f9f7 4446 * @brief Correlation of Q7 sequences.
<> 144:ef7eb2e8f9f7 4447 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 4448 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 4449 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 4450 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 4451 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 144:ef7eb2e8f9f7 4452 * @param[in] *pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 144:ef7eb2e8f9f7 4453 * @param[in] *pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen).
<> 144:ef7eb2e8f9f7 4454 * @return none.
<> 144:ef7eb2e8f9f7 4455 */
<> 144:ef7eb2e8f9f7 4456
<> 144:ef7eb2e8f9f7 4457 void arm_correlate_opt_q7(
<> 144:ef7eb2e8f9f7 4458 q7_t * pSrcA,
<> 144:ef7eb2e8f9f7 4459 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 4460 q7_t * pSrcB,
<> 144:ef7eb2e8f9f7 4461 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 4462 q7_t * pDst,
<> 144:ef7eb2e8f9f7 4463 q15_t * pScratch1,
<> 144:ef7eb2e8f9f7 4464 q15_t * pScratch2);
<> 144:ef7eb2e8f9f7 4465
<> 144:ef7eb2e8f9f7 4466
<> 144:ef7eb2e8f9f7 4467 /**
<> 144:ef7eb2e8f9f7 4468 * @brief Correlation of Q7 sequences.
<> 144:ef7eb2e8f9f7 4469 * @param[in] *pSrcA points to the first input sequence.
<> 144:ef7eb2e8f9f7 4470 * @param[in] srcALen length of the first input sequence.
<> 144:ef7eb2e8f9f7 4471 * @param[in] *pSrcB points to the second input sequence.
<> 144:ef7eb2e8f9f7 4472 * @param[in] srcBLen length of the second input sequence.
<> 144:ef7eb2e8f9f7 4473 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 144:ef7eb2e8f9f7 4474 * @return none.
<> 144:ef7eb2e8f9f7 4475 */
<> 144:ef7eb2e8f9f7 4476
<> 144:ef7eb2e8f9f7 4477 void arm_correlate_q7(
<> 144:ef7eb2e8f9f7 4478 q7_t * pSrcA,
<> 144:ef7eb2e8f9f7 4479 uint32_t srcALen,
<> 144:ef7eb2e8f9f7 4480 q7_t * pSrcB,
<> 144:ef7eb2e8f9f7 4481 uint32_t srcBLen,
<> 144:ef7eb2e8f9f7 4482 q7_t * pDst);
<> 144:ef7eb2e8f9f7 4483
<> 144:ef7eb2e8f9f7 4484
<> 144:ef7eb2e8f9f7 4485 /**
<> 144:ef7eb2e8f9f7 4486 * @brief Instance structure for the floating-point sparse FIR filter.
<> 144:ef7eb2e8f9f7 4487 */
<> 144:ef7eb2e8f9f7 4488 typedef struct
<> 144:ef7eb2e8f9f7 4489 {
<> 144:ef7eb2e8f9f7 4490 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 144:ef7eb2e8f9f7 4491 uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
<> 144:ef7eb2e8f9f7 4492 float32_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
<> 144:ef7eb2e8f9f7 4493 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 144:ef7eb2e8f9f7 4494 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
<> 144:ef7eb2e8f9f7 4495 int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
<> 144:ef7eb2e8f9f7 4496 } arm_fir_sparse_instance_f32;
<> 144:ef7eb2e8f9f7 4497
<> 144:ef7eb2e8f9f7 4498 /**
<> 144:ef7eb2e8f9f7 4499 * @brief Instance structure for the Q31 sparse FIR filter.
<> 144:ef7eb2e8f9f7 4500 */
<> 144:ef7eb2e8f9f7 4501
<> 144:ef7eb2e8f9f7 4502 typedef struct
<> 144:ef7eb2e8f9f7 4503 {
<> 144:ef7eb2e8f9f7 4504 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 144:ef7eb2e8f9f7 4505 uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
<> 144:ef7eb2e8f9f7 4506 q31_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
<> 144:ef7eb2e8f9f7 4507 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 144:ef7eb2e8f9f7 4508 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
<> 144:ef7eb2e8f9f7 4509 int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
<> 144:ef7eb2e8f9f7 4510 } arm_fir_sparse_instance_q31;
<> 144:ef7eb2e8f9f7 4511
<> 144:ef7eb2e8f9f7 4512 /**
<> 144:ef7eb2e8f9f7 4513 * @brief Instance structure for the Q15 sparse FIR filter.
<> 144:ef7eb2e8f9f7 4514 */
<> 144:ef7eb2e8f9f7 4515
<> 144:ef7eb2e8f9f7 4516 typedef struct
<> 144:ef7eb2e8f9f7 4517 {
<> 144:ef7eb2e8f9f7 4518 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 144:ef7eb2e8f9f7 4519 uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
<> 144:ef7eb2e8f9f7 4520 q15_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
<> 144:ef7eb2e8f9f7 4521 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 144:ef7eb2e8f9f7 4522 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
<> 144:ef7eb2e8f9f7 4523 int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
<> 144:ef7eb2e8f9f7 4524 } arm_fir_sparse_instance_q15;
<> 144:ef7eb2e8f9f7 4525
<> 144:ef7eb2e8f9f7 4526 /**
<> 144:ef7eb2e8f9f7 4527 * @brief Instance structure for the Q7 sparse FIR filter.
<> 144:ef7eb2e8f9f7 4528 */
<> 144:ef7eb2e8f9f7 4529
<> 144:ef7eb2e8f9f7 4530 typedef struct
<> 144:ef7eb2e8f9f7 4531 {
<> 144:ef7eb2e8f9f7 4532 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 144:ef7eb2e8f9f7 4533 uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
<> 144:ef7eb2e8f9f7 4534 q7_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
<> 144:ef7eb2e8f9f7 4535 q7_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 144:ef7eb2e8f9f7 4536 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
<> 144:ef7eb2e8f9f7 4537 int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
<> 144:ef7eb2e8f9f7 4538 } arm_fir_sparse_instance_q7;
<> 144:ef7eb2e8f9f7 4539
<> 144:ef7eb2e8f9f7 4540 /**
<> 144:ef7eb2e8f9f7 4541 * @brief Processing function for the floating-point sparse FIR filter.
<> 144:ef7eb2e8f9f7 4542 * @param[in] *S points to an instance of the floating-point sparse FIR structure.
<> 144:ef7eb2e8f9f7 4543 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 4544 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 4545 * @param[in] *pScratchIn points to a temporary buffer of size blockSize.
<> 144:ef7eb2e8f9f7 4546 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 4547 * @return none.
<> 144:ef7eb2e8f9f7 4548 */
<> 144:ef7eb2e8f9f7 4549
<> 144:ef7eb2e8f9f7 4550 void arm_fir_sparse_f32(
<> 144:ef7eb2e8f9f7 4551 arm_fir_sparse_instance_f32 * S,
<> 144:ef7eb2e8f9f7 4552 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 4553 float32_t * pDst,
<> 144:ef7eb2e8f9f7 4554 float32_t * pScratchIn,
<> 144:ef7eb2e8f9f7 4555 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 4556
<> 144:ef7eb2e8f9f7 4557 /**
<> 144:ef7eb2e8f9f7 4558 * @brief Initialization function for the floating-point sparse FIR filter.
<> 144:ef7eb2e8f9f7 4559 * @param[in,out] *S points to an instance of the floating-point sparse FIR structure.
<> 144:ef7eb2e8f9f7 4560 * @param[in] numTaps number of nonzero coefficients in the filter.
<> 144:ef7eb2e8f9f7 4561 * @param[in] *pCoeffs points to the array of filter coefficients.
<> 144:ef7eb2e8f9f7 4562 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 4563 * @param[in] *pTapDelay points to the array of offset times.
<> 144:ef7eb2e8f9f7 4564 * @param[in] maxDelay maximum offset time supported.
<> 144:ef7eb2e8f9f7 4565 * @param[in] blockSize number of samples that will be processed per block.
<> 144:ef7eb2e8f9f7 4566 * @return none
<> 144:ef7eb2e8f9f7 4567 */
<> 144:ef7eb2e8f9f7 4568
<> 144:ef7eb2e8f9f7 4569 void arm_fir_sparse_init_f32(
<> 144:ef7eb2e8f9f7 4570 arm_fir_sparse_instance_f32 * S,
<> 144:ef7eb2e8f9f7 4571 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 4572 float32_t * pCoeffs,
<> 144:ef7eb2e8f9f7 4573 float32_t * pState,
<> 144:ef7eb2e8f9f7 4574 int32_t * pTapDelay,
<> 144:ef7eb2e8f9f7 4575 uint16_t maxDelay,
<> 144:ef7eb2e8f9f7 4576 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 4577
<> 144:ef7eb2e8f9f7 4578 /**
<> 144:ef7eb2e8f9f7 4579 * @brief Processing function for the Q31 sparse FIR filter.
<> 144:ef7eb2e8f9f7 4580 * @param[in] *S points to an instance of the Q31 sparse FIR structure.
<> 144:ef7eb2e8f9f7 4581 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 4582 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 4583 * @param[in] *pScratchIn points to a temporary buffer of size blockSize.
<> 144:ef7eb2e8f9f7 4584 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 4585 * @return none.
<> 144:ef7eb2e8f9f7 4586 */
<> 144:ef7eb2e8f9f7 4587
<> 144:ef7eb2e8f9f7 4588 void arm_fir_sparse_q31(
<> 144:ef7eb2e8f9f7 4589 arm_fir_sparse_instance_q31 * S,
<> 144:ef7eb2e8f9f7 4590 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 4591 q31_t * pDst,
<> 144:ef7eb2e8f9f7 4592 q31_t * pScratchIn,
<> 144:ef7eb2e8f9f7 4593 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 4594
<> 144:ef7eb2e8f9f7 4595 /**
<> 144:ef7eb2e8f9f7 4596 * @brief Initialization function for the Q31 sparse FIR filter.
<> 144:ef7eb2e8f9f7 4597 * @param[in,out] *S points to an instance of the Q31 sparse FIR structure.
<> 144:ef7eb2e8f9f7 4598 * @param[in] numTaps number of nonzero coefficients in the filter.
<> 144:ef7eb2e8f9f7 4599 * @param[in] *pCoeffs points to the array of filter coefficients.
<> 144:ef7eb2e8f9f7 4600 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 4601 * @param[in] *pTapDelay points to the array of offset times.
<> 144:ef7eb2e8f9f7 4602 * @param[in] maxDelay maximum offset time supported.
<> 144:ef7eb2e8f9f7 4603 * @param[in] blockSize number of samples that will be processed per block.
<> 144:ef7eb2e8f9f7 4604 * @return none
<> 144:ef7eb2e8f9f7 4605 */
<> 144:ef7eb2e8f9f7 4606
<> 144:ef7eb2e8f9f7 4607 void arm_fir_sparse_init_q31(
<> 144:ef7eb2e8f9f7 4608 arm_fir_sparse_instance_q31 * S,
<> 144:ef7eb2e8f9f7 4609 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 4610 q31_t * pCoeffs,
<> 144:ef7eb2e8f9f7 4611 q31_t * pState,
<> 144:ef7eb2e8f9f7 4612 int32_t * pTapDelay,
<> 144:ef7eb2e8f9f7 4613 uint16_t maxDelay,
<> 144:ef7eb2e8f9f7 4614 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 4615
<> 144:ef7eb2e8f9f7 4616 /**
<> 144:ef7eb2e8f9f7 4617 * @brief Processing function for the Q15 sparse FIR filter.
<> 144:ef7eb2e8f9f7 4618 * @param[in] *S points to an instance of the Q15 sparse FIR structure.
<> 144:ef7eb2e8f9f7 4619 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 4620 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 4621 * @param[in] *pScratchIn points to a temporary buffer of size blockSize.
<> 144:ef7eb2e8f9f7 4622 * @param[in] *pScratchOut points to a temporary buffer of size blockSize.
<> 144:ef7eb2e8f9f7 4623 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 4624 * @return none.
<> 144:ef7eb2e8f9f7 4625 */
<> 144:ef7eb2e8f9f7 4626
<> 144:ef7eb2e8f9f7 4627 void arm_fir_sparse_q15(
<> 144:ef7eb2e8f9f7 4628 arm_fir_sparse_instance_q15 * S,
<> 144:ef7eb2e8f9f7 4629 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 4630 q15_t * pDst,
<> 144:ef7eb2e8f9f7 4631 q15_t * pScratchIn,
<> 144:ef7eb2e8f9f7 4632 q31_t * pScratchOut,
<> 144:ef7eb2e8f9f7 4633 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 4634
<> 144:ef7eb2e8f9f7 4635
<> 144:ef7eb2e8f9f7 4636 /**
<> 144:ef7eb2e8f9f7 4637 * @brief Initialization function for the Q15 sparse FIR filter.
<> 144:ef7eb2e8f9f7 4638 * @param[in,out] *S points to an instance of the Q15 sparse FIR structure.
<> 144:ef7eb2e8f9f7 4639 * @param[in] numTaps number of nonzero coefficients in the filter.
<> 144:ef7eb2e8f9f7 4640 * @param[in] *pCoeffs points to the array of filter coefficients.
<> 144:ef7eb2e8f9f7 4641 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 4642 * @param[in] *pTapDelay points to the array of offset times.
<> 144:ef7eb2e8f9f7 4643 * @param[in] maxDelay maximum offset time supported.
<> 144:ef7eb2e8f9f7 4644 * @param[in] blockSize number of samples that will be processed per block.
<> 144:ef7eb2e8f9f7 4645 * @return none
<> 144:ef7eb2e8f9f7 4646 */
<> 144:ef7eb2e8f9f7 4647
<> 144:ef7eb2e8f9f7 4648 void arm_fir_sparse_init_q15(
<> 144:ef7eb2e8f9f7 4649 arm_fir_sparse_instance_q15 * S,
<> 144:ef7eb2e8f9f7 4650 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 4651 q15_t * pCoeffs,
<> 144:ef7eb2e8f9f7 4652 q15_t * pState,
<> 144:ef7eb2e8f9f7 4653 int32_t * pTapDelay,
<> 144:ef7eb2e8f9f7 4654 uint16_t maxDelay,
<> 144:ef7eb2e8f9f7 4655 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 4656
<> 144:ef7eb2e8f9f7 4657 /**
<> 144:ef7eb2e8f9f7 4658 * @brief Processing function for the Q7 sparse FIR filter.
<> 144:ef7eb2e8f9f7 4659 * @param[in] *S points to an instance of the Q7 sparse FIR structure.
<> 144:ef7eb2e8f9f7 4660 * @param[in] *pSrc points to the block of input data.
<> 144:ef7eb2e8f9f7 4661 * @param[out] *pDst points to the block of output data
<> 144:ef7eb2e8f9f7 4662 * @param[in] *pScratchIn points to a temporary buffer of size blockSize.
<> 144:ef7eb2e8f9f7 4663 * @param[in] *pScratchOut points to a temporary buffer of size blockSize.
<> 144:ef7eb2e8f9f7 4664 * @param[in] blockSize number of input samples to process per call.
<> 144:ef7eb2e8f9f7 4665 * @return none.
<> 144:ef7eb2e8f9f7 4666 */
<> 144:ef7eb2e8f9f7 4667
<> 144:ef7eb2e8f9f7 4668 void arm_fir_sparse_q7(
<> 144:ef7eb2e8f9f7 4669 arm_fir_sparse_instance_q7 * S,
<> 144:ef7eb2e8f9f7 4670 q7_t * pSrc,
<> 144:ef7eb2e8f9f7 4671 q7_t * pDst,
<> 144:ef7eb2e8f9f7 4672 q7_t * pScratchIn,
<> 144:ef7eb2e8f9f7 4673 q31_t * pScratchOut,
<> 144:ef7eb2e8f9f7 4674 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 4675
<> 144:ef7eb2e8f9f7 4676 /**
<> 144:ef7eb2e8f9f7 4677 * @brief Initialization function for the Q7 sparse FIR filter.
<> 144:ef7eb2e8f9f7 4678 * @param[in,out] *S points to an instance of the Q7 sparse FIR structure.
<> 144:ef7eb2e8f9f7 4679 * @param[in] numTaps number of nonzero coefficients in the filter.
<> 144:ef7eb2e8f9f7 4680 * @param[in] *pCoeffs points to the array of filter coefficients.
<> 144:ef7eb2e8f9f7 4681 * @param[in] *pState points to the state buffer.
<> 144:ef7eb2e8f9f7 4682 * @param[in] *pTapDelay points to the array of offset times.
<> 144:ef7eb2e8f9f7 4683 * @param[in] maxDelay maximum offset time supported.
<> 144:ef7eb2e8f9f7 4684 * @param[in] blockSize number of samples that will be processed per block.
<> 144:ef7eb2e8f9f7 4685 * @return none
<> 144:ef7eb2e8f9f7 4686 */
<> 144:ef7eb2e8f9f7 4687
<> 144:ef7eb2e8f9f7 4688 void arm_fir_sparse_init_q7(
<> 144:ef7eb2e8f9f7 4689 arm_fir_sparse_instance_q7 * S,
<> 144:ef7eb2e8f9f7 4690 uint16_t numTaps,
<> 144:ef7eb2e8f9f7 4691 q7_t * pCoeffs,
<> 144:ef7eb2e8f9f7 4692 q7_t * pState,
<> 144:ef7eb2e8f9f7 4693 int32_t * pTapDelay,
<> 144:ef7eb2e8f9f7 4694 uint16_t maxDelay,
<> 144:ef7eb2e8f9f7 4695 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 4696
<> 144:ef7eb2e8f9f7 4697
<> 144:ef7eb2e8f9f7 4698 /*
<> 144:ef7eb2e8f9f7 4699 * @brief Floating-point sin_cos function.
<> 144:ef7eb2e8f9f7 4700 * @param[in] theta input value in degrees
<> 144:ef7eb2e8f9f7 4701 * @param[out] *pSinVal points to the processed sine output.
<> 144:ef7eb2e8f9f7 4702 * @param[out] *pCosVal points to the processed cos output.
<> 144:ef7eb2e8f9f7 4703 * @return none.
<> 144:ef7eb2e8f9f7 4704 */
<> 144:ef7eb2e8f9f7 4705
<> 144:ef7eb2e8f9f7 4706 void arm_sin_cos_f32(
<> 144:ef7eb2e8f9f7 4707 float32_t theta,
<> 144:ef7eb2e8f9f7 4708 float32_t * pSinVal,
<> 144:ef7eb2e8f9f7 4709 float32_t * pCcosVal);
<> 144:ef7eb2e8f9f7 4710
<> 144:ef7eb2e8f9f7 4711 /*
<> 144:ef7eb2e8f9f7 4712 * @brief Q31 sin_cos function.
<> 144:ef7eb2e8f9f7 4713 * @param[in] theta scaled input value in degrees
<> 144:ef7eb2e8f9f7 4714 * @param[out] *pSinVal points to the processed sine output.
<> 144:ef7eb2e8f9f7 4715 * @param[out] *pCosVal points to the processed cosine output.
<> 144:ef7eb2e8f9f7 4716 * @return none.
<> 144:ef7eb2e8f9f7 4717 */
<> 144:ef7eb2e8f9f7 4718
<> 144:ef7eb2e8f9f7 4719 void arm_sin_cos_q31(
<> 144:ef7eb2e8f9f7 4720 q31_t theta,
<> 144:ef7eb2e8f9f7 4721 q31_t * pSinVal,
<> 144:ef7eb2e8f9f7 4722 q31_t * pCosVal);
<> 144:ef7eb2e8f9f7 4723
<> 144:ef7eb2e8f9f7 4724
<> 144:ef7eb2e8f9f7 4725 /**
<> 144:ef7eb2e8f9f7 4726 * @brief Floating-point complex conjugate.
<> 144:ef7eb2e8f9f7 4727 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 4728 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 4729 * @param[in] numSamples number of complex samples in each vector
<> 144:ef7eb2e8f9f7 4730 * @return none.
<> 144:ef7eb2e8f9f7 4731 */
<> 144:ef7eb2e8f9f7 4732
<> 144:ef7eb2e8f9f7 4733 void arm_cmplx_conj_f32(
<> 144:ef7eb2e8f9f7 4734 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 4735 float32_t * pDst,
<> 144:ef7eb2e8f9f7 4736 uint32_t numSamples);
<> 144:ef7eb2e8f9f7 4737
<> 144:ef7eb2e8f9f7 4738 /**
<> 144:ef7eb2e8f9f7 4739 * @brief Q31 complex conjugate.
<> 144:ef7eb2e8f9f7 4740 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 4741 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 4742 * @param[in] numSamples number of complex samples in each vector
<> 144:ef7eb2e8f9f7 4743 * @return none.
<> 144:ef7eb2e8f9f7 4744 */
<> 144:ef7eb2e8f9f7 4745
<> 144:ef7eb2e8f9f7 4746 void arm_cmplx_conj_q31(
<> 144:ef7eb2e8f9f7 4747 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 4748 q31_t * pDst,
<> 144:ef7eb2e8f9f7 4749 uint32_t numSamples);
<> 144:ef7eb2e8f9f7 4750
<> 144:ef7eb2e8f9f7 4751 /**
<> 144:ef7eb2e8f9f7 4752 * @brief Q15 complex conjugate.
<> 144:ef7eb2e8f9f7 4753 * @param[in] *pSrc points to the input vector
<> 144:ef7eb2e8f9f7 4754 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 4755 * @param[in] numSamples number of complex samples in each vector
<> 144:ef7eb2e8f9f7 4756 * @return none.
<> 144:ef7eb2e8f9f7 4757 */
<> 144:ef7eb2e8f9f7 4758
<> 144:ef7eb2e8f9f7 4759 void arm_cmplx_conj_q15(
<> 144:ef7eb2e8f9f7 4760 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 4761 q15_t * pDst,
<> 144:ef7eb2e8f9f7 4762 uint32_t numSamples);
<> 144:ef7eb2e8f9f7 4763
<> 144:ef7eb2e8f9f7 4764
<> 144:ef7eb2e8f9f7 4765
<> 144:ef7eb2e8f9f7 4766 /**
<> 144:ef7eb2e8f9f7 4767 * @brief Floating-point complex magnitude squared
<> 144:ef7eb2e8f9f7 4768 * @param[in] *pSrc points to the complex input vector
<> 144:ef7eb2e8f9f7 4769 * @param[out] *pDst points to the real output vector
<> 144:ef7eb2e8f9f7 4770 * @param[in] numSamples number of complex samples in the input vector
<> 144:ef7eb2e8f9f7 4771 * @return none.
<> 144:ef7eb2e8f9f7 4772 */
<> 144:ef7eb2e8f9f7 4773
<> 144:ef7eb2e8f9f7 4774 void arm_cmplx_mag_squared_f32(
<> 144:ef7eb2e8f9f7 4775 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 4776 float32_t * pDst,
<> 144:ef7eb2e8f9f7 4777 uint32_t numSamples);
<> 144:ef7eb2e8f9f7 4778
<> 144:ef7eb2e8f9f7 4779 /**
<> 144:ef7eb2e8f9f7 4780 * @brief Q31 complex magnitude squared
<> 144:ef7eb2e8f9f7 4781 * @param[in] *pSrc points to the complex input vector
<> 144:ef7eb2e8f9f7 4782 * @param[out] *pDst points to the real output vector
<> 144:ef7eb2e8f9f7 4783 * @param[in] numSamples number of complex samples in the input vector
<> 144:ef7eb2e8f9f7 4784 * @return none.
<> 144:ef7eb2e8f9f7 4785 */
<> 144:ef7eb2e8f9f7 4786
<> 144:ef7eb2e8f9f7 4787 void arm_cmplx_mag_squared_q31(
<> 144:ef7eb2e8f9f7 4788 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 4789 q31_t * pDst,
<> 144:ef7eb2e8f9f7 4790 uint32_t numSamples);
<> 144:ef7eb2e8f9f7 4791
<> 144:ef7eb2e8f9f7 4792 /**
<> 144:ef7eb2e8f9f7 4793 * @brief Q15 complex magnitude squared
<> 144:ef7eb2e8f9f7 4794 * @param[in] *pSrc points to the complex input vector
<> 144:ef7eb2e8f9f7 4795 * @param[out] *pDst points to the real output vector
<> 144:ef7eb2e8f9f7 4796 * @param[in] numSamples number of complex samples in the input vector
<> 144:ef7eb2e8f9f7 4797 * @return none.
<> 144:ef7eb2e8f9f7 4798 */
<> 144:ef7eb2e8f9f7 4799
<> 144:ef7eb2e8f9f7 4800 void arm_cmplx_mag_squared_q15(
<> 144:ef7eb2e8f9f7 4801 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 4802 q15_t * pDst,
<> 144:ef7eb2e8f9f7 4803 uint32_t numSamples);
<> 144:ef7eb2e8f9f7 4804
<> 144:ef7eb2e8f9f7 4805
<> 144:ef7eb2e8f9f7 4806 /**
<> 144:ef7eb2e8f9f7 4807 * @ingroup groupController
<> 144:ef7eb2e8f9f7 4808 */
<> 144:ef7eb2e8f9f7 4809
<> 144:ef7eb2e8f9f7 4810 /**
<> 144:ef7eb2e8f9f7 4811 * @defgroup PID PID Motor Control
<> 144:ef7eb2e8f9f7 4812 *
<> 144:ef7eb2e8f9f7 4813 * A Proportional Integral Derivative (PID) controller is a generic feedback control
<> 144:ef7eb2e8f9f7 4814 * loop mechanism widely used in industrial control systems.
<> 144:ef7eb2e8f9f7 4815 * A PID controller is the most commonly used type of feedback controller.
<> 144:ef7eb2e8f9f7 4816 *
<> 144:ef7eb2e8f9f7 4817 * This set of functions implements (PID) controllers
<> 144:ef7eb2e8f9f7 4818 * for Q15, Q31, and floating-point data types. The functions operate on a single sample
<> 144:ef7eb2e8f9f7 4819 * of data and each call to the function returns a single processed value.
<> 144:ef7eb2e8f9f7 4820 * <code>S</code> points to an instance of the PID control data structure. <code>in</code>
<> 144:ef7eb2e8f9f7 4821 * is the input sample value. The functions return the output value.
<> 144:ef7eb2e8f9f7 4822 *
<> 144:ef7eb2e8f9f7 4823 * \par Algorithm:
<> 144:ef7eb2e8f9f7 4824 * <pre>
<> 144:ef7eb2e8f9f7 4825 * y[n] = y[n-1] + A0 * x[n] + A1 * x[n-1] + A2 * x[n-2]
<> 144:ef7eb2e8f9f7 4826 * A0 = Kp + Ki + Kd
<> 144:ef7eb2e8f9f7 4827 * A1 = (-Kp ) - (2 * Kd )
<> 144:ef7eb2e8f9f7 4828 * A2 = Kd </pre>
<> 144:ef7eb2e8f9f7 4829 *
<> 144:ef7eb2e8f9f7 4830 * \par
<> 144:ef7eb2e8f9f7 4831 * where \c Kp is proportional constant, \c Ki is Integral constant and \c Kd is Derivative constant
<> 144:ef7eb2e8f9f7 4832 *
<> 144:ef7eb2e8f9f7 4833 * \par
<> 144:ef7eb2e8f9f7 4834 * \image html PID.gif "Proportional Integral Derivative Controller"
<> 144:ef7eb2e8f9f7 4835 *
<> 144:ef7eb2e8f9f7 4836 * \par
<> 144:ef7eb2e8f9f7 4837 * The PID controller calculates an "error" value as the difference between
<> 144:ef7eb2e8f9f7 4838 * the measured output and the reference input.
<> 144:ef7eb2e8f9f7 4839 * The controller attempts to minimize the error by adjusting the process control inputs.
<> 144:ef7eb2e8f9f7 4840 * The proportional value determines the reaction to the current error,
<> 144:ef7eb2e8f9f7 4841 * the integral value determines the reaction based on the sum of recent errors,
<> 144:ef7eb2e8f9f7 4842 * and the derivative value determines the reaction based on the rate at which the error has been changing.
<> 144:ef7eb2e8f9f7 4843 *
<> 144:ef7eb2e8f9f7 4844 * \par Instance Structure
<> 144:ef7eb2e8f9f7 4845 * The Gains A0, A1, A2 and state variables for a PID controller are stored together in an instance data structure.
<> 144:ef7eb2e8f9f7 4846 * A separate instance structure must be defined for each PID Controller.
<> 144:ef7eb2e8f9f7 4847 * There are separate instance structure declarations for each of the 3 supported data types.
<> 144:ef7eb2e8f9f7 4848 *
<> 144:ef7eb2e8f9f7 4849 * \par Reset Functions
<> 144:ef7eb2e8f9f7 4850 * There is also an associated reset function for each data type which clears the state array.
<> 144:ef7eb2e8f9f7 4851 *
<> 144:ef7eb2e8f9f7 4852 * \par Initialization Functions
<> 144:ef7eb2e8f9f7 4853 * There is also an associated initialization function for each data type.
<> 144:ef7eb2e8f9f7 4854 * The initialization function performs the following operations:
<> 144:ef7eb2e8f9f7 4855 * - Initializes the Gains A0, A1, A2 from Kp,Ki, Kd gains.
<> 144:ef7eb2e8f9f7 4856 * - Zeros out the values in the state buffer.
<> 144:ef7eb2e8f9f7 4857 *
<> 144:ef7eb2e8f9f7 4858 * \par
<> 144:ef7eb2e8f9f7 4859 * Instance structure cannot be placed into a const data section and it is recommended to use the initialization function.
<> 144:ef7eb2e8f9f7 4860 *
<> 144:ef7eb2e8f9f7 4861 * \par Fixed-Point Behavior
<> 144:ef7eb2e8f9f7 4862 * Care must be taken when using the fixed-point versions of the PID Controller functions.
<> 144:ef7eb2e8f9f7 4863 * In particular, the overflow and saturation behavior of the accumulator used in each function must be considered.
<> 144:ef7eb2e8f9f7 4864 * Refer to the function specific documentation below for usage guidelines.
<> 144:ef7eb2e8f9f7 4865 */
<> 144:ef7eb2e8f9f7 4866
<> 144:ef7eb2e8f9f7 4867 /**
<> 144:ef7eb2e8f9f7 4868 * @addtogroup PID
<> 144:ef7eb2e8f9f7 4869 * @{
<> 144:ef7eb2e8f9f7 4870 */
<> 144:ef7eb2e8f9f7 4871
<> 144:ef7eb2e8f9f7 4872 /**
<> 144:ef7eb2e8f9f7 4873 * @brief Process function for the floating-point PID Control.
<> 144:ef7eb2e8f9f7 4874 * @param[in,out] *S is an instance of the floating-point PID Control structure
<> 144:ef7eb2e8f9f7 4875 * @param[in] in input sample to process
<> 144:ef7eb2e8f9f7 4876 * @return out processed output sample.
<> 144:ef7eb2e8f9f7 4877 */
<> 144:ef7eb2e8f9f7 4878
<> 144:ef7eb2e8f9f7 4879
<> 144:ef7eb2e8f9f7 4880 static __INLINE float32_t arm_pid_f32(
<> 144:ef7eb2e8f9f7 4881 arm_pid_instance_f32 * S,
<> 144:ef7eb2e8f9f7 4882 float32_t in)
<> 144:ef7eb2e8f9f7 4883 {
<> 144:ef7eb2e8f9f7 4884 float32_t out;
<> 144:ef7eb2e8f9f7 4885
<> 144:ef7eb2e8f9f7 4886 /* y[n] = y[n-1] + A0 * x[n] + A1 * x[n-1] + A2 * x[n-2] */
<> 144:ef7eb2e8f9f7 4887 out = (S->A0 * in) +
<> 144:ef7eb2e8f9f7 4888 (S->A1 * S->state[0]) + (S->A2 * S->state[1]) + (S->state[2]);
<> 144:ef7eb2e8f9f7 4889
<> 144:ef7eb2e8f9f7 4890 /* Update state */
<> 144:ef7eb2e8f9f7 4891 S->state[1] = S->state[0];
<> 144:ef7eb2e8f9f7 4892 S->state[0] = in;
<> 144:ef7eb2e8f9f7 4893 S->state[2] = out;
<> 144:ef7eb2e8f9f7 4894
<> 144:ef7eb2e8f9f7 4895 /* return to application */
<> 144:ef7eb2e8f9f7 4896 return (out);
<> 144:ef7eb2e8f9f7 4897
<> 144:ef7eb2e8f9f7 4898 }
<> 144:ef7eb2e8f9f7 4899
<> 144:ef7eb2e8f9f7 4900 /**
<> 144:ef7eb2e8f9f7 4901 * @brief Process function for the Q31 PID Control.
<> 144:ef7eb2e8f9f7 4902 * @param[in,out] *S points to an instance of the Q31 PID Control structure
<> 144:ef7eb2e8f9f7 4903 * @param[in] in input sample to process
<> 144:ef7eb2e8f9f7 4904 * @return out processed output sample.
<> 144:ef7eb2e8f9f7 4905 *
<> 144:ef7eb2e8f9f7 4906 * <b>Scaling and Overflow Behavior:</b>
<> 144:ef7eb2e8f9f7 4907 * \par
<> 144:ef7eb2e8f9f7 4908 * The function is implemented using an internal 64-bit accumulator.
<> 144:ef7eb2e8f9f7 4909 * The accumulator has a 2.62 format and maintains full precision of the intermediate multiplication results but provides only a single guard bit.
<> 144:ef7eb2e8f9f7 4910 * Thus, if the accumulator result overflows it wraps around rather than clip.
<> 144:ef7eb2e8f9f7 4911 * In order to avoid overflows completely the input signal must be scaled down by 2 bits as there are four additions.
<> 144:ef7eb2e8f9f7 4912 * After all multiply-accumulates are performed, the 2.62 accumulator is truncated to 1.32 format and then saturated to 1.31 format.
<> 144:ef7eb2e8f9f7 4913 */
<> 144:ef7eb2e8f9f7 4914
<> 144:ef7eb2e8f9f7 4915 static __INLINE q31_t arm_pid_q31(
<> 144:ef7eb2e8f9f7 4916 arm_pid_instance_q31 * S,
<> 144:ef7eb2e8f9f7 4917 q31_t in)
<> 144:ef7eb2e8f9f7 4918 {
<> 144:ef7eb2e8f9f7 4919 q63_t acc;
<> 144:ef7eb2e8f9f7 4920 q31_t out;
<> 144:ef7eb2e8f9f7 4921
<> 144:ef7eb2e8f9f7 4922 /* acc = A0 * x[n] */
<> 144:ef7eb2e8f9f7 4923 acc = (q63_t) S->A0 * in;
<> 144:ef7eb2e8f9f7 4924
<> 144:ef7eb2e8f9f7 4925 /* acc += A1 * x[n-1] */
<> 144:ef7eb2e8f9f7 4926 acc += (q63_t) S->A1 * S->state[0];
<> 144:ef7eb2e8f9f7 4927
<> 144:ef7eb2e8f9f7 4928 /* acc += A2 * x[n-2] */
<> 144:ef7eb2e8f9f7 4929 acc += (q63_t) S->A2 * S->state[1];
<> 144:ef7eb2e8f9f7 4930
<> 144:ef7eb2e8f9f7 4931 /* convert output to 1.31 format to add y[n-1] */
<> 144:ef7eb2e8f9f7 4932 out = (q31_t) (acc >> 31u);
<> 144:ef7eb2e8f9f7 4933
<> 144:ef7eb2e8f9f7 4934 /* out += y[n-1] */
<> 144:ef7eb2e8f9f7 4935 out += S->state[2];
<> 144:ef7eb2e8f9f7 4936
<> 144:ef7eb2e8f9f7 4937 /* Update state */
<> 144:ef7eb2e8f9f7 4938 S->state[1] = S->state[0];
<> 144:ef7eb2e8f9f7 4939 S->state[0] = in;
<> 144:ef7eb2e8f9f7 4940 S->state[2] = out;
<> 144:ef7eb2e8f9f7 4941
<> 144:ef7eb2e8f9f7 4942 /* return to application */
<> 144:ef7eb2e8f9f7 4943 return (out);
<> 144:ef7eb2e8f9f7 4944
<> 144:ef7eb2e8f9f7 4945 }
<> 144:ef7eb2e8f9f7 4946
<> 144:ef7eb2e8f9f7 4947 /**
<> 144:ef7eb2e8f9f7 4948 * @brief Process function for the Q15 PID Control.
<> 144:ef7eb2e8f9f7 4949 * @param[in,out] *S points to an instance of the Q15 PID Control structure
<> 144:ef7eb2e8f9f7 4950 * @param[in] in input sample to process
<> 144:ef7eb2e8f9f7 4951 * @return out processed output sample.
<> 144:ef7eb2e8f9f7 4952 *
<> 144:ef7eb2e8f9f7 4953 * <b>Scaling and Overflow Behavior:</b>
<> 144:ef7eb2e8f9f7 4954 * \par
<> 144:ef7eb2e8f9f7 4955 * The function is implemented using a 64-bit internal accumulator.
<> 144:ef7eb2e8f9f7 4956 * Both Gains and state variables are represented in 1.15 format and multiplications yield a 2.30 result.
<> 144:ef7eb2e8f9f7 4957 * The 2.30 intermediate results are accumulated in a 64-bit accumulator in 34.30 format.
<> 144:ef7eb2e8f9f7 4958 * There is no risk of internal overflow with this approach and the full precision of intermediate multiplications is preserved.
<> 144:ef7eb2e8f9f7 4959 * After all additions have been performed, the accumulator is truncated to 34.15 format by discarding low 15 bits.
<> 144:ef7eb2e8f9f7 4960 * Lastly, the accumulator is saturated to yield a result in 1.15 format.
<> 144:ef7eb2e8f9f7 4961 */
<> 144:ef7eb2e8f9f7 4962
<> 144:ef7eb2e8f9f7 4963 static __INLINE q15_t arm_pid_q15(
<> 144:ef7eb2e8f9f7 4964 arm_pid_instance_q15 * S,
<> 144:ef7eb2e8f9f7 4965 q15_t in)
<> 144:ef7eb2e8f9f7 4966 {
<> 144:ef7eb2e8f9f7 4967 q63_t acc;
<> 144:ef7eb2e8f9f7 4968 q15_t out;
<> 144:ef7eb2e8f9f7 4969
<> 144:ef7eb2e8f9f7 4970 #ifndef ARM_MATH_CM0_FAMILY
<> 144:ef7eb2e8f9f7 4971 __SIMD32_TYPE *vstate;
<> 144:ef7eb2e8f9f7 4972
<> 144:ef7eb2e8f9f7 4973 /* Implementation of PID controller */
<> 144:ef7eb2e8f9f7 4974
<> 144:ef7eb2e8f9f7 4975 /* acc = A0 * x[n] */
<> 144:ef7eb2e8f9f7 4976 acc = (q31_t) __SMUAD(S->A0, in);
<> 144:ef7eb2e8f9f7 4977
<> 144:ef7eb2e8f9f7 4978 /* acc += A1 * x[n-1] + A2 * x[n-2] */
<> 144:ef7eb2e8f9f7 4979 vstate = __SIMD32_CONST(S->state);
<> 144:ef7eb2e8f9f7 4980 acc = __SMLALD(S->A1, (q31_t) *vstate, acc);
<> 144:ef7eb2e8f9f7 4981
<> 144:ef7eb2e8f9f7 4982 #else
<> 144:ef7eb2e8f9f7 4983 /* acc = A0 * x[n] */
<> 144:ef7eb2e8f9f7 4984 acc = ((q31_t) S->A0) * in;
<> 144:ef7eb2e8f9f7 4985
<> 144:ef7eb2e8f9f7 4986 /* acc += A1 * x[n-1] + A2 * x[n-2] */
<> 144:ef7eb2e8f9f7 4987 acc += (q31_t) S->A1 * S->state[0];
<> 144:ef7eb2e8f9f7 4988 acc += (q31_t) S->A2 * S->state[1];
<> 144:ef7eb2e8f9f7 4989
<> 144:ef7eb2e8f9f7 4990 #endif
<> 144:ef7eb2e8f9f7 4991
<> 144:ef7eb2e8f9f7 4992 /* acc += y[n-1] */
<> 144:ef7eb2e8f9f7 4993 acc += (q31_t) S->state[2] << 15;
<> 144:ef7eb2e8f9f7 4994
<> 144:ef7eb2e8f9f7 4995 /* saturate the output */
<> 144:ef7eb2e8f9f7 4996 out = (q15_t) (__SSAT((acc >> 15), 16));
<> 144:ef7eb2e8f9f7 4997
<> 144:ef7eb2e8f9f7 4998 /* Update state */
<> 144:ef7eb2e8f9f7 4999 S->state[1] = S->state[0];
<> 144:ef7eb2e8f9f7 5000 S->state[0] = in;
<> 144:ef7eb2e8f9f7 5001 S->state[2] = out;
<> 144:ef7eb2e8f9f7 5002
<> 144:ef7eb2e8f9f7 5003 /* return to application */
<> 144:ef7eb2e8f9f7 5004 return (out);
<> 144:ef7eb2e8f9f7 5005
<> 144:ef7eb2e8f9f7 5006 }
<> 144:ef7eb2e8f9f7 5007
<> 144:ef7eb2e8f9f7 5008 /**
<> 144:ef7eb2e8f9f7 5009 * @} end of PID group
<> 144:ef7eb2e8f9f7 5010 */
<> 144:ef7eb2e8f9f7 5011
<> 144:ef7eb2e8f9f7 5012
<> 144:ef7eb2e8f9f7 5013 /**
<> 144:ef7eb2e8f9f7 5014 * @brief Floating-point matrix inverse.
<> 144:ef7eb2e8f9f7 5015 * @param[in] *src points to the instance of the input floating-point matrix structure.
<> 144:ef7eb2e8f9f7 5016 * @param[out] *dst points to the instance of the output floating-point matrix structure.
<> 144:ef7eb2e8f9f7 5017 * @return The function returns ARM_MATH_SIZE_MISMATCH, if the dimensions do not match.
<> 144:ef7eb2e8f9f7 5018 * If the input matrix is singular (does not have an inverse), then the algorithm terminates and returns error status ARM_MATH_SINGULAR.
<> 144:ef7eb2e8f9f7 5019 */
<> 144:ef7eb2e8f9f7 5020
<> 144:ef7eb2e8f9f7 5021 arm_status arm_mat_inverse_f32(
<> 144:ef7eb2e8f9f7 5022 const arm_matrix_instance_f32 * src,
<> 144:ef7eb2e8f9f7 5023 arm_matrix_instance_f32 * dst);
<> 144:ef7eb2e8f9f7 5024
<> 144:ef7eb2e8f9f7 5025
<> 144:ef7eb2e8f9f7 5026
<> 144:ef7eb2e8f9f7 5027 /**
<> 144:ef7eb2e8f9f7 5028 * @ingroup groupController
<> 144:ef7eb2e8f9f7 5029 */
<> 144:ef7eb2e8f9f7 5030
<> 144:ef7eb2e8f9f7 5031
<> 144:ef7eb2e8f9f7 5032 /**
<> 144:ef7eb2e8f9f7 5033 * @defgroup clarke Vector Clarke Transform
<> 144:ef7eb2e8f9f7 5034 * Forward Clarke transform converts the instantaneous stator phases into a two-coordinate time invariant vector.
<> 144:ef7eb2e8f9f7 5035 * Generally the Clarke transform uses three-phase currents <code>Ia, Ib and Ic</code> to calculate currents
<> 144:ef7eb2e8f9f7 5036 * in the two-phase orthogonal stator axis <code>Ialpha</code> and <code>Ibeta</code>.
<> 144:ef7eb2e8f9f7 5037 * When <code>Ialpha</code> is superposed with <code>Ia</code> as shown in the figure below
<> 144:ef7eb2e8f9f7 5038 * \image html clarke.gif Stator current space vector and its components in (a,b).
<> 144:ef7eb2e8f9f7 5039 * and <code>Ia + Ib + Ic = 0</code>, in this condition <code>Ialpha</code> and <code>Ibeta</code>
<> 144:ef7eb2e8f9f7 5040 * can be calculated using only <code>Ia</code> and <code>Ib</code>.
<> 144:ef7eb2e8f9f7 5041 *
<> 144:ef7eb2e8f9f7 5042 * The function operates on a single sample of data and each call to the function returns the processed output.
<> 144:ef7eb2e8f9f7 5043 * The library provides separate functions for Q31 and floating-point data types.
<> 144:ef7eb2e8f9f7 5044 * \par Algorithm
<> 144:ef7eb2e8f9f7 5045 * \image html clarkeFormula.gif
<> 144:ef7eb2e8f9f7 5046 * where <code>Ia</code> and <code>Ib</code> are the instantaneous stator phases and
<> 144:ef7eb2e8f9f7 5047 * <code>pIalpha</code> and <code>pIbeta</code> are the two coordinates of time invariant vector.
<> 144:ef7eb2e8f9f7 5048 * \par Fixed-Point Behavior
<> 144:ef7eb2e8f9f7 5049 * Care must be taken when using the Q31 version of the Clarke transform.
<> 144:ef7eb2e8f9f7 5050 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
<> 144:ef7eb2e8f9f7 5051 * Refer to the function specific documentation below for usage guidelines.
<> 144:ef7eb2e8f9f7 5052 */
<> 144:ef7eb2e8f9f7 5053
<> 144:ef7eb2e8f9f7 5054 /**
<> 144:ef7eb2e8f9f7 5055 * @addtogroup clarke
<> 144:ef7eb2e8f9f7 5056 * @{
<> 144:ef7eb2e8f9f7 5057 */
<> 144:ef7eb2e8f9f7 5058
<> 144:ef7eb2e8f9f7 5059 /**
<> 144:ef7eb2e8f9f7 5060 *
<> 144:ef7eb2e8f9f7 5061 * @brief Floating-point Clarke transform
<> 144:ef7eb2e8f9f7 5062 * @param[in] Ia input three-phase coordinate <code>a</code>
<> 144:ef7eb2e8f9f7 5063 * @param[in] Ib input three-phase coordinate <code>b</code>
<> 144:ef7eb2e8f9f7 5064 * @param[out] *pIalpha points to output two-phase orthogonal vector axis alpha
<> 144:ef7eb2e8f9f7 5065 * @param[out] *pIbeta points to output two-phase orthogonal vector axis beta
<> 144:ef7eb2e8f9f7 5066 * @return none.
<> 144:ef7eb2e8f9f7 5067 */
<> 144:ef7eb2e8f9f7 5068
<> 144:ef7eb2e8f9f7 5069 static __INLINE void arm_clarke_f32(
<> 144:ef7eb2e8f9f7 5070 float32_t Ia,
<> 144:ef7eb2e8f9f7 5071 float32_t Ib,
<> 144:ef7eb2e8f9f7 5072 float32_t * pIalpha,
<> 144:ef7eb2e8f9f7 5073 float32_t * pIbeta)
<> 144:ef7eb2e8f9f7 5074 {
<> 144:ef7eb2e8f9f7 5075 /* Calculate pIalpha using the equation, pIalpha = Ia */
<> 144:ef7eb2e8f9f7 5076 *pIalpha = Ia;
<> 144:ef7eb2e8f9f7 5077
<> 144:ef7eb2e8f9f7 5078 /* Calculate pIbeta using the equation, pIbeta = (1/sqrt(3)) * Ia + (2/sqrt(3)) * Ib */
<> 144:ef7eb2e8f9f7 5079 *pIbeta =
<> 144:ef7eb2e8f9f7 5080 ((float32_t) 0.57735026919 * Ia + (float32_t) 1.15470053838 * Ib);
<> 144:ef7eb2e8f9f7 5081
<> 144:ef7eb2e8f9f7 5082 }
<> 144:ef7eb2e8f9f7 5083
<> 144:ef7eb2e8f9f7 5084 /**
<> 144:ef7eb2e8f9f7 5085 * @brief Clarke transform for Q31 version
<> 144:ef7eb2e8f9f7 5086 * @param[in] Ia input three-phase coordinate <code>a</code>
<> 144:ef7eb2e8f9f7 5087 * @param[in] Ib input three-phase coordinate <code>b</code>
<> 144:ef7eb2e8f9f7 5088 * @param[out] *pIalpha points to output two-phase orthogonal vector axis alpha
<> 144:ef7eb2e8f9f7 5089 * @param[out] *pIbeta points to output two-phase orthogonal vector axis beta
<> 144:ef7eb2e8f9f7 5090 * @return none.
<> 144:ef7eb2e8f9f7 5091 *
<> 144:ef7eb2e8f9f7 5092 * <b>Scaling and Overflow Behavior:</b>
<> 144:ef7eb2e8f9f7 5093 * \par
<> 144:ef7eb2e8f9f7 5094 * The function is implemented using an internal 32-bit accumulator.
<> 144:ef7eb2e8f9f7 5095 * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
<> 144:ef7eb2e8f9f7 5096 * There is saturation on the addition, hence there is no risk of overflow.
<> 144:ef7eb2e8f9f7 5097 */
<> 144:ef7eb2e8f9f7 5098
<> 144:ef7eb2e8f9f7 5099 static __INLINE void arm_clarke_q31(
<> 144:ef7eb2e8f9f7 5100 q31_t Ia,
<> 144:ef7eb2e8f9f7 5101 q31_t Ib,
<> 144:ef7eb2e8f9f7 5102 q31_t * pIalpha,
<> 144:ef7eb2e8f9f7 5103 q31_t * pIbeta)
<> 144:ef7eb2e8f9f7 5104 {
<> 144:ef7eb2e8f9f7 5105 q31_t product1, product2; /* Temporary variables used to store intermediate results */
<> 144:ef7eb2e8f9f7 5106
<> 144:ef7eb2e8f9f7 5107 /* Calculating pIalpha from Ia by equation pIalpha = Ia */
<> 144:ef7eb2e8f9f7 5108 *pIalpha = Ia;
<> 144:ef7eb2e8f9f7 5109
<> 144:ef7eb2e8f9f7 5110 /* Intermediate product is calculated by (1/(sqrt(3)) * Ia) */
<> 144:ef7eb2e8f9f7 5111 product1 = (q31_t) (((q63_t) Ia * 0x24F34E8B) >> 30);
<> 144:ef7eb2e8f9f7 5112
<> 144:ef7eb2e8f9f7 5113 /* Intermediate product is calculated by (2/sqrt(3) * Ib) */
<> 144:ef7eb2e8f9f7 5114 product2 = (q31_t) (((q63_t) Ib * 0x49E69D16) >> 30);
<> 144:ef7eb2e8f9f7 5115
<> 144:ef7eb2e8f9f7 5116 /* pIbeta is calculated by adding the intermediate products */
<> 144:ef7eb2e8f9f7 5117 *pIbeta = __QADD(product1, product2);
<> 144:ef7eb2e8f9f7 5118 }
<> 144:ef7eb2e8f9f7 5119
<> 144:ef7eb2e8f9f7 5120 /**
<> 144:ef7eb2e8f9f7 5121 * @} end of clarke group
<> 144:ef7eb2e8f9f7 5122 */
<> 144:ef7eb2e8f9f7 5123
<> 144:ef7eb2e8f9f7 5124 /**
<> 144:ef7eb2e8f9f7 5125 * @brief Converts the elements of the Q7 vector to Q31 vector.
<> 144:ef7eb2e8f9f7 5126 * @param[in] *pSrc input pointer
<> 144:ef7eb2e8f9f7 5127 * @param[out] *pDst output pointer
<> 144:ef7eb2e8f9f7 5128 * @param[in] blockSize number of samples to process
<> 144:ef7eb2e8f9f7 5129 * @return none.
<> 144:ef7eb2e8f9f7 5130 */
<> 144:ef7eb2e8f9f7 5131 void arm_q7_to_q31(
<> 144:ef7eb2e8f9f7 5132 q7_t * pSrc,
<> 144:ef7eb2e8f9f7 5133 q31_t * pDst,
<> 144:ef7eb2e8f9f7 5134 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 5135
<> 144:ef7eb2e8f9f7 5136
<> 144:ef7eb2e8f9f7 5137
<> 144:ef7eb2e8f9f7 5138
<> 144:ef7eb2e8f9f7 5139 /**
<> 144:ef7eb2e8f9f7 5140 * @ingroup groupController
<> 144:ef7eb2e8f9f7 5141 */
<> 144:ef7eb2e8f9f7 5142
<> 144:ef7eb2e8f9f7 5143 /**
<> 144:ef7eb2e8f9f7 5144 * @defgroup inv_clarke Vector Inverse Clarke Transform
<> 144:ef7eb2e8f9f7 5145 * Inverse Clarke transform converts the two-coordinate time invariant vector into instantaneous stator phases.
<> 144:ef7eb2e8f9f7 5146 *
<> 144:ef7eb2e8f9f7 5147 * The function operates on a single sample of data and each call to the function returns the processed output.
<> 144:ef7eb2e8f9f7 5148 * The library provides separate functions for Q31 and floating-point data types.
<> 144:ef7eb2e8f9f7 5149 * \par Algorithm
<> 144:ef7eb2e8f9f7 5150 * \image html clarkeInvFormula.gif
<> 144:ef7eb2e8f9f7 5151 * where <code>pIa</code> and <code>pIb</code> are the instantaneous stator phases and
<> 144:ef7eb2e8f9f7 5152 * <code>Ialpha</code> and <code>Ibeta</code> are the two coordinates of time invariant vector.
<> 144:ef7eb2e8f9f7 5153 * \par Fixed-Point Behavior
<> 144:ef7eb2e8f9f7 5154 * Care must be taken when using the Q31 version of the Clarke transform.
<> 144:ef7eb2e8f9f7 5155 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
<> 144:ef7eb2e8f9f7 5156 * Refer to the function specific documentation below for usage guidelines.
<> 144:ef7eb2e8f9f7 5157 */
<> 144:ef7eb2e8f9f7 5158
<> 144:ef7eb2e8f9f7 5159 /**
<> 144:ef7eb2e8f9f7 5160 * @addtogroup inv_clarke
<> 144:ef7eb2e8f9f7 5161 * @{
<> 144:ef7eb2e8f9f7 5162 */
<> 144:ef7eb2e8f9f7 5163
<> 144:ef7eb2e8f9f7 5164 /**
<> 144:ef7eb2e8f9f7 5165 * @brief Floating-point Inverse Clarke transform
<> 144:ef7eb2e8f9f7 5166 * @param[in] Ialpha input two-phase orthogonal vector axis alpha
<> 144:ef7eb2e8f9f7 5167 * @param[in] Ibeta input two-phase orthogonal vector axis beta
<> 144:ef7eb2e8f9f7 5168 * @param[out] *pIa points to output three-phase coordinate <code>a</code>
<> 144:ef7eb2e8f9f7 5169 * @param[out] *pIb points to output three-phase coordinate <code>b</code>
<> 144:ef7eb2e8f9f7 5170 * @return none.
<> 144:ef7eb2e8f9f7 5171 */
<> 144:ef7eb2e8f9f7 5172
<> 144:ef7eb2e8f9f7 5173
<> 144:ef7eb2e8f9f7 5174 static __INLINE void arm_inv_clarke_f32(
<> 144:ef7eb2e8f9f7 5175 float32_t Ialpha,
<> 144:ef7eb2e8f9f7 5176 float32_t Ibeta,
<> 144:ef7eb2e8f9f7 5177 float32_t * pIa,
<> 144:ef7eb2e8f9f7 5178 float32_t * pIb)
<> 144:ef7eb2e8f9f7 5179 {
<> 144:ef7eb2e8f9f7 5180 /* Calculating pIa from Ialpha by equation pIa = Ialpha */
<> 144:ef7eb2e8f9f7 5181 *pIa = Ialpha;
<> 144:ef7eb2e8f9f7 5182
<> 144:ef7eb2e8f9f7 5183 /* Calculating pIb from Ialpha and Ibeta by equation pIb = -(1/2) * Ialpha + (sqrt(3)/2) * Ibeta */
<> 144:ef7eb2e8f9f7 5184 *pIb = -0.5 * Ialpha + (float32_t) 0.8660254039 *Ibeta;
<> 144:ef7eb2e8f9f7 5185
<> 144:ef7eb2e8f9f7 5186 }
<> 144:ef7eb2e8f9f7 5187
<> 144:ef7eb2e8f9f7 5188 /**
<> 144:ef7eb2e8f9f7 5189 * @brief Inverse Clarke transform for Q31 version
<> 144:ef7eb2e8f9f7 5190 * @param[in] Ialpha input two-phase orthogonal vector axis alpha
<> 144:ef7eb2e8f9f7 5191 * @param[in] Ibeta input two-phase orthogonal vector axis beta
<> 144:ef7eb2e8f9f7 5192 * @param[out] *pIa points to output three-phase coordinate <code>a</code>
<> 144:ef7eb2e8f9f7 5193 * @param[out] *pIb points to output three-phase coordinate <code>b</code>
<> 144:ef7eb2e8f9f7 5194 * @return none.
<> 144:ef7eb2e8f9f7 5195 *
<> 144:ef7eb2e8f9f7 5196 * <b>Scaling and Overflow Behavior:</b>
<> 144:ef7eb2e8f9f7 5197 * \par
<> 144:ef7eb2e8f9f7 5198 * The function is implemented using an internal 32-bit accumulator.
<> 144:ef7eb2e8f9f7 5199 * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
<> 144:ef7eb2e8f9f7 5200 * There is saturation on the subtraction, hence there is no risk of overflow.
<> 144:ef7eb2e8f9f7 5201 */
<> 144:ef7eb2e8f9f7 5202
<> 144:ef7eb2e8f9f7 5203 static __INLINE void arm_inv_clarke_q31(
<> 144:ef7eb2e8f9f7 5204 q31_t Ialpha,
<> 144:ef7eb2e8f9f7 5205 q31_t Ibeta,
<> 144:ef7eb2e8f9f7 5206 q31_t * pIa,
<> 144:ef7eb2e8f9f7 5207 q31_t * pIb)
<> 144:ef7eb2e8f9f7 5208 {
<> 144:ef7eb2e8f9f7 5209 q31_t product1, product2; /* Temporary variables used to store intermediate results */
<> 144:ef7eb2e8f9f7 5210
<> 144:ef7eb2e8f9f7 5211 /* Calculating pIa from Ialpha by equation pIa = Ialpha */
<> 144:ef7eb2e8f9f7 5212 *pIa = Ialpha;
<> 144:ef7eb2e8f9f7 5213
<> 144:ef7eb2e8f9f7 5214 /* Intermediate product is calculated by (1/(2*sqrt(3)) * Ia) */
<> 144:ef7eb2e8f9f7 5215 product1 = (q31_t) (((q63_t) (Ialpha) * (0x40000000)) >> 31);
<> 144:ef7eb2e8f9f7 5216
<> 144:ef7eb2e8f9f7 5217 /* Intermediate product is calculated by (1/sqrt(3) * pIb) */
<> 144:ef7eb2e8f9f7 5218 product2 = (q31_t) (((q63_t) (Ibeta) * (0x6ED9EBA1)) >> 31);
<> 144:ef7eb2e8f9f7 5219
<> 144:ef7eb2e8f9f7 5220 /* pIb is calculated by subtracting the products */
<> 144:ef7eb2e8f9f7 5221 *pIb = __QSUB(product2, product1);
<> 144:ef7eb2e8f9f7 5222
<> 144:ef7eb2e8f9f7 5223 }
<> 144:ef7eb2e8f9f7 5224
<> 144:ef7eb2e8f9f7 5225 /**
<> 144:ef7eb2e8f9f7 5226 * @} end of inv_clarke group
<> 144:ef7eb2e8f9f7 5227 */
<> 144:ef7eb2e8f9f7 5228
<> 144:ef7eb2e8f9f7 5229 /**
<> 144:ef7eb2e8f9f7 5230 * @brief Converts the elements of the Q7 vector to Q15 vector.
<> 144:ef7eb2e8f9f7 5231 * @param[in] *pSrc input pointer
<> 144:ef7eb2e8f9f7 5232 * @param[out] *pDst output pointer
<> 144:ef7eb2e8f9f7 5233 * @param[in] blockSize number of samples to process
<> 144:ef7eb2e8f9f7 5234 * @return none.
<> 144:ef7eb2e8f9f7 5235 */
<> 144:ef7eb2e8f9f7 5236 void arm_q7_to_q15(
<> 144:ef7eb2e8f9f7 5237 q7_t * pSrc,
<> 144:ef7eb2e8f9f7 5238 q15_t * pDst,
<> 144:ef7eb2e8f9f7 5239 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 5240
<> 144:ef7eb2e8f9f7 5241
<> 144:ef7eb2e8f9f7 5242
<> 144:ef7eb2e8f9f7 5243 /**
<> 144:ef7eb2e8f9f7 5244 * @ingroup groupController
<> 144:ef7eb2e8f9f7 5245 */
<> 144:ef7eb2e8f9f7 5246
<> 144:ef7eb2e8f9f7 5247 /**
<> 144:ef7eb2e8f9f7 5248 * @defgroup park Vector Park Transform
<> 144:ef7eb2e8f9f7 5249 *
<> 144:ef7eb2e8f9f7 5250 * Forward Park transform converts the input two-coordinate vector to flux and torque components.
<> 144:ef7eb2e8f9f7 5251 * The Park transform can be used to realize the transformation of the <code>Ialpha</code> and the <code>Ibeta</code> currents
<> 144:ef7eb2e8f9f7 5252 * from the stationary to the moving reference frame and control the spatial relationship between
<> 144:ef7eb2e8f9f7 5253 * the stator vector current and rotor flux vector.
<> 144:ef7eb2e8f9f7 5254 * If we consider the d axis aligned with the rotor flux, the diagram below shows the
<> 144:ef7eb2e8f9f7 5255 * current vector and the relationship from the two reference frames:
<> 144:ef7eb2e8f9f7 5256 * \image html park.gif "Stator current space vector and its component in (a,b) and in the d,q rotating reference frame"
<> 144:ef7eb2e8f9f7 5257 *
<> 144:ef7eb2e8f9f7 5258 * The function operates on a single sample of data and each call to the function returns the processed output.
<> 144:ef7eb2e8f9f7 5259 * The library provides separate functions for Q31 and floating-point data types.
<> 144:ef7eb2e8f9f7 5260 * \par Algorithm
<> 144:ef7eb2e8f9f7 5261 * \image html parkFormula.gif
<> 144:ef7eb2e8f9f7 5262 * where <code>Ialpha</code> and <code>Ibeta</code> are the stator vector components,
<> 144:ef7eb2e8f9f7 5263 * <code>pId</code> and <code>pIq</code> are rotor vector components and <code>cosVal</code> and <code>sinVal</code> are the
<> 144:ef7eb2e8f9f7 5264 * cosine and sine values of theta (rotor flux position).
<> 144:ef7eb2e8f9f7 5265 * \par Fixed-Point Behavior
<> 144:ef7eb2e8f9f7 5266 * Care must be taken when using the Q31 version of the Park transform.
<> 144:ef7eb2e8f9f7 5267 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
<> 144:ef7eb2e8f9f7 5268 * Refer to the function specific documentation below for usage guidelines.
<> 144:ef7eb2e8f9f7 5269 */
<> 144:ef7eb2e8f9f7 5270
<> 144:ef7eb2e8f9f7 5271 /**
<> 144:ef7eb2e8f9f7 5272 * @addtogroup park
<> 144:ef7eb2e8f9f7 5273 * @{
<> 144:ef7eb2e8f9f7 5274 */
<> 144:ef7eb2e8f9f7 5275
<> 144:ef7eb2e8f9f7 5276 /**
<> 144:ef7eb2e8f9f7 5277 * @brief Floating-point Park transform
<> 144:ef7eb2e8f9f7 5278 * @param[in] Ialpha input two-phase vector coordinate alpha
<> 144:ef7eb2e8f9f7 5279 * @param[in] Ibeta input two-phase vector coordinate beta
<> 144:ef7eb2e8f9f7 5280 * @param[out] *pId points to output rotor reference frame d
<> 144:ef7eb2e8f9f7 5281 * @param[out] *pIq points to output rotor reference frame q
<> 144:ef7eb2e8f9f7 5282 * @param[in] sinVal sine value of rotation angle theta
<> 144:ef7eb2e8f9f7 5283 * @param[in] cosVal cosine value of rotation angle theta
<> 144:ef7eb2e8f9f7 5284 * @return none.
<> 144:ef7eb2e8f9f7 5285 *
<> 144:ef7eb2e8f9f7 5286 * The function implements the forward Park transform.
<> 144:ef7eb2e8f9f7 5287 *
<> 144:ef7eb2e8f9f7 5288 */
<> 144:ef7eb2e8f9f7 5289
<> 144:ef7eb2e8f9f7 5290 static __INLINE void arm_park_f32(
<> 144:ef7eb2e8f9f7 5291 float32_t Ialpha,
<> 144:ef7eb2e8f9f7 5292 float32_t Ibeta,
<> 144:ef7eb2e8f9f7 5293 float32_t * pId,
<> 144:ef7eb2e8f9f7 5294 float32_t * pIq,
<> 144:ef7eb2e8f9f7 5295 float32_t sinVal,
<> 144:ef7eb2e8f9f7 5296 float32_t cosVal)
<> 144:ef7eb2e8f9f7 5297 {
<> 144:ef7eb2e8f9f7 5298 /* Calculate pId using the equation, pId = Ialpha * cosVal + Ibeta * sinVal */
<> 144:ef7eb2e8f9f7 5299 *pId = Ialpha * cosVal + Ibeta * sinVal;
<> 144:ef7eb2e8f9f7 5300
<> 144:ef7eb2e8f9f7 5301 /* Calculate pIq using the equation, pIq = - Ialpha * sinVal + Ibeta * cosVal */
<> 144:ef7eb2e8f9f7 5302 *pIq = -Ialpha * sinVal + Ibeta * cosVal;
<> 144:ef7eb2e8f9f7 5303
<> 144:ef7eb2e8f9f7 5304 }
<> 144:ef7eb2e8f9f7 5305
<> 144:ef7eb2e8f9f7 5306 /**
<> 144:ef7eb2e8f9f7 5307 * @brief Park transform for Q31 version
<> 144:ef7eb2e8f9f7 5308 * @param[in] Ialpha input two-phase vector coordinate alpha
<> 144:ef7eb2e8f9f7 5309 * @param[in] Ibeta input two-phase vector coordinate beta
<> 144:ef7eb2e8f9f7 5310 * @param[out] *pId points to output rotor reference frame d
<> 144:ef7eb2e8f9f7 5311 * @param[out] *pIq points to output rotor reference frame q
<> 144:ef7eb2e8f9f7 5312 * @param[in] sinVal sine value of rotation angle theta
<> 144:ef7eb2e8f9f7 5313 * @param[in] cosVal cosine value of rotation angle theta
<> 144:ef7eb2e8f9f7 5314 * @return none.
<> 144:ef7eb2e8f9f7 5315 *
<> 144:ef7eb2e8f9f7 5316 * <b>Scaling and Overflow Behavior:</b>
<> 144:ef7eb2e8f9f7 5317 * \par
<> 144:ef7eb2e8f9f7 5318 * The function is implemented using an internal 32-bit accumulator.
<> 144:ef7eb2e8f9f7 5319 * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
<> 144:ef7eb2e8f9f7 5320 * There is saturation on the addition and subtraction, hence there is no risk of overflow.
<> 144:ef7eb2e8f9f7 5321 */
<> 144:ef7eb2e8f9f7 5322
<> 144:ef7eb2e8f9f7 5323
<> 144:ef7eb2e8f9f7 5324 static __INLINE void arm_park_q31(
<> 144:ef7eb2e8f9f7 5325 q31_t Ialpha,
<> 144:ef7eb2e8f9f7 5326 q31_t Ibeta,
<> 144:ef7eb2e8f9f7 5327 q31_t * pId,
<> 144:ef7eb2e8f9f7 5328 q31_t * pIq,
<> 144:ef7eb2e8f9f7 5329 q31_t sinVal,
<> 144:ef7eb2e8f9f7 5330 q31_t cosVal)
<> 144:ef7eb2e8f9f7 5331 {
<> 144:ef7eb2e8f9f7 5332 q31_t product1, product2; /* Temporary variables used to store intermediate results */
<> 144:ef7eb2e8f9f7 5333 q31_t product3, product4; /* Temporary variables used to store intermediate results */
<> 144:ef7eb2e8f9f7 5334
<> 144:ef7eb2e8f9f7 5335 /* Intermediate product is calculated by (Ialpha * cosVal) */
<> 144:ef7eb2e8f9f7 5336 product1 = (q31_t) (((q63_t) (Ialpha) * (cosVal)) >> 31);
<> 144:ef7eb2e8f9f7 5337
<> 144:ef7eb2e8f9f7 5338 /* Intermediate product is calculated by (Ibeta * sinVal) */
<> 144:ef7eb2e8f9f7 5339 product2 = (q31_t) (((q63_t) (Ibeta) * (sinVal)) >> 31);
<> 144:ef7eb2e8f9f7 5340
<> 144:ef7eb2e8f9f7 5341
<> 144:ef7eb2e8f9f7 5342 /* Intermediate product is calculated by (Ialpha * sinVal) */
<> 144:ef7eb2e8f9f7 5343 product3 = (q31_t) (((q63_t) (Ialpha) * (sinVal)) >> 31);
<> 144:ef7eb2e8f9f7 5344
<> 144:ef7eb2e8f9f7 5345 /* Intermediate product is calculated by (Ibeta * cosVal) */
<> 144:ef7eb2e8f9f7 5346 product4 = (q31_t) (((q63_t) (Ibeta) * (cosVal)) >> 31);
<> 144:ef7eb2e8f9f7 5347
<> 144:ef7eb2e8f9f7 5348 /* Calculate pId by adding the two intermediate products 1 and 2 */
<> 144:ef7eb2e8f9f7 5349 *pId = __QADD(product1, product2);
<> 144:ef7eb2e8f9f7 5350
<> 144:ef7eb2e8f9f7 5351 /* Calculate pIq by subtracting the two intermediate products 3 from 4 */
<> 144:ef7eb2e8f9f7 5352 *pIq = __QSUB(product4, product3);
<> 144:ef7eb2e8f9f7 5353 }
<> 144:ef7eb2e8f9f7 5354
<> 144:ef7eb2e8f9f7 5355 /**
<> 144:ef7eb2e8f9f7 5356 * @} end of park group
<> 144:ef7eb2e8f9f7 5357 */
<> 144:ef7eb2e8f9f7 5358
<> 144:ef7eb2e8f9f7 5359 /**
<> 144:ef7eb2e8f9f7 5360 * @brief Converts the elements of the Q7 vector to floating-point vector.
<> 144:ef7eb2e8f9f7 5361 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 5362 * @param[out] *pDst is output pointer
<> 144:ef7eb2e8f9f7 5363 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 5364 * @return none.
<> 144:ef7eb2e8f9f7 5365 */
<> 144:ef7eb2e8f9f7 5366 void arm_q7_to_float(
<> 144:ef7eb2e8f9f7 5367 q7_t * pSrc,
<> 144:ef7eb2e8f9f7 5368 float32_t * pDst,
<> 144:ef7eb2e8f9f7 5369 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 5370
<> 144:ef7eb2e8f9f7 5371
<> 144:ef7eb2e8f9f7 5372 /**
<> 144:ef7eb2e8f9f7 5373 * @ingroup groupController
<> 144:ef7eb2e8f9f7 5374 */
<> 144:ef7eb2e8f9f7 5375
<> 144:ef7eb2e8f9f7 5376 /**
<> 144:ef7eb2e8f9f7 5377 * @defgroup inv_park Vector Inverse Park transform
<> 144:ef7eb2e8f9f7 5378 * Inverse Park transform converts the input flux and torque components to two-coordinate vector.
<> 144:ef7eb2e8f9f7 5379 *
<> 144:ef7eb2e8f9f7 5380 * The function operates on a single sample of data and each call to the function returns the processed output.
<> 144:ef7eb2e8f9f7 5381 * The library provides separate functions for Q31 and floating-point data types.
<> 144:ef7eb2e8f9f7 5382 * \par Algorithm
<> 144:ef7eb2e8f9f7 5383 * \image html parkInvFormula.gif
<> 144:ef7eb2e8f9f7 5384 * where <code>pIalpha</code> and <code>pIbeta</code> are the stator vector components,
<> 144:ef7eb2e8f9f7 5385 * <code>Id</code> and <code>Iq</code> are rotor vector components and <code>cosVal</code> and <code>sinVal</code> are the
<> 144:ef7eb2e8f9f7 5386 * cosine and sine values of theta (rotor flux position).
<> 144:ef7eb2e8f9f7 5387 * \par Fixed-Point Behavior
<> 144:ef7eb2e8f9f7 5388 * Care must be taken when using the Q31 version of the Park transform.
<> 144:ef7eb2e8f9f7 5389 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
<> 144:ef7eb2e8f9f7 5390 * Refer to the function specific documentation below for usage guidelines.
<> 144:ef7eb2e8f9f7 5391 */
<> 144:ef7eb2e8f9f7 5392
<> 144:ef7eb2e8f9f7 5393 /**
<> 144:ef7eb2e8f9f7 5394 * @addtogroup inv_park
<> 144:ef7eb2e8f9f7 5395 * @{
<> 144:ef7eb2e8f9f7 5396 */
<> 144:ef7eb2e8f9f7 5397
<> 144:ef7eb2e8f9f7 5398 /**
<> 144:ef7eb2e8f9f7 5399 * @brief Floating-point Inverse Park transform
<> 144:ef7eb2e8f9f7 5400 * @param[in] Id input coordinate of rotor reference frame d
<> 144:ef7eb2e8f9f7 5401 * @param[in] Iq input coordinate of rotor reference frame q
<> 144:ef7eb2e8f9f7 5402 * @param[out] *pIalpha points to output two-phase orthogonal vector axis alpha
<> 144:ef7eb2e8f9f7 5403 * @param[out] *pIbeta points to output two-phase orthogonal vector axis beta
<> 144:ef7eb2e8f9f7 5404 * @param[in] sinVal sine value of rotation angle theta
<> 144:ef7eb2e8f9f7 5405 * @param[in] cosVal cosine value of rotation angle theta
<> 144:ef7eb2e8f9f7 5406 * @return none.
<> 144:ef7eb2e8f9f7 5407 */
<> 144:ef7eb2e8f9f7 5408
<> 144:ef7eb2e8f9f7 5409 static __INLINE void arm_inv_park_f32(
<> 144:ef7eb2e8f9f7 5410 float32_t Id,
<> 144:ef7eb2e8f9f7 5411 float32_t Iq,
<> 144:ef7eb2e8f9f7 5412 float32_t * pIalpha,
<> 144:ef7eb2e8f9f7 5413 float32_t * pIbeta,
<> 144:ef7eb2e8f9f7 5414 float32_t sinVal,
<> 144:ef7eb2e8f9f7 5415 float32_t cosVal)
<> 144:ef7eb2e8f9f7 5416 {
<> 144:ef7eb2e8f9f7 5417 /* Calculate pIalpha using the equation, pIalpha = Id * cosVal - Iq * sinVal */
<> 144:ef7eb2e8f9f7 5418 *pIalpha = Id * cosVal - Iq * sinVal;
<> 144:ef7eb2e8f9f7 5419
<> 144:ef7eb2e8f9f7 5420 /* Calculate pIbeta using the equation, pIbeta = Id * sinVal + Iq * cosVal */
<> 144:ef7eb2e8f9f7 5421 *pIbeta = Id * sinVal + Iq * cosVal;
<> 144:ef7eb2e8f9f7 5422
<> 144:ef7eb2e8f9f7 5423 }
<> 144:ef7eb2e8f9f7 5424
<> 144:ef7eb2e8f9f7 5425
<> 144:ef7eb2e8f9f7 5426 /**
<> 144:ef7eb2e8f9f7 5427 * @brief Inverse Park transform for Q31 version
<> 144:ef7eb2e8f9f7 5428 * @param[in] Id input coordinate of rotor reference frame d
<> 144:ef7eb2e8f9f7 5429 * @param[in] Iq input coordinate of rotor reference frame q
<> 144:ef7eb2e8f9f7 5430 * @param[out] *pIalpha points to output two-phase orthogonal vector axis alpha
<> 144:ef7eb2e8f9f7 5431 * @param[out] *pIbeta points to output two-phase orthogonal vector axis beta
<> 144:ef7eb2e8f9f7 5432 * @param[in] sinVal sine value of rotation angle theta
<> 144:ef7eb2e8f9f7 5433 * @param[in] cosVal cosine value of rotation angle theta
<> 144:ef7eb2e8f9f7 5434 * @return none.
<> 144:ef7eb2e8f9f7 5435 *
<> 144:ef7eb2e8f9f7 5436 * <b>Scaling and Overflow Behavior:</b>
<> 144:ef7eb2e8f9f7 5437 * \par
<> 144:ef7eb2e8f9f7 5438 * The function is implemented using an internal 32-bit accumulator.
<> 144:ef7eb2e8f9f7 5439 * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
<> 144:ef7eb2e8f9f7 5440 * There is saturation on the addition, hence there is no risk of overflow.
<> 144:ef7eb2e8f9f7 5441 */
<> 144:ef7eb2e8f9f7 5442
<> 144:ef7eb2e8f9f7 5443
<> 144:ef7eb2e8f9f7 5444 static __INLINE void arm_inv_park_q31(
<> 144:ef7eb2e8f9f7 5445 q31_t Id,
<> 144:ef7eb2e8f9f7 5446 q31_t Iq,
<> 144:ef7eb2e8f9f7 5447 q31_t * pIalpha,
<> 144:ef7eb2e8f9f7 5448 q31_t * pIbeta,
<> 144:ef7eb2e8f9f7 5449 q31_t sinVal,
<> 144:ef7eb2e8f9f7 5450 q31_t cosVal)
<> 144:ef7eb2e8f9f7 5451 {
<> 144:ef7eb2e8f9f7 5452 q31_t product1, product2; /* Temporary variables used to store intermediate results */
<> 144:ef7eb2e8f9f7 5453 q31_t product3, product4; /* Temporary variables used to store intermediate results */
<> 144:ef7eb2e8f9f7 5454
<> 144:ef7eb2e8f9f7 5455 /* Intermediate product is calculated by (Id * cosVal) */
<> 144:ef7eb2e8f9f7 5456 product1 = (q31_t) (((q63_t) (Id) * (cosVal)) >> 31);
<> 144:ef7eb2e8f9f7 5457
<> 144:ef7eb2e8f9f7 5458 /* Intermediate product is calculated by (Iq * sinVal) */
<> 144:ef7eb2e8f9f7 5459 product2 = (q31_t) (((q63_t) (Iq) * (sinVal)) >> 31);
<> 144:ef7eb2e8f9f7 5460
<> 144:ef7eb2e8f9f7 5461
<> 144:ef7eb2e8f9f7 5462 /* Intermediate product is calculated by (Id * sinVal) */
<> 144:ef7eb2e8f9f7 5463 product3 = (q31_t) (((q63_t) (Id) * (sinVal)) >> 31);
<> 144:ef7eb2e8f9f7 5464
<> 144:ef7eb2e8f9f7 5465 /* Intermediate product is calculated by (Iq * cosVal) */
<> 144:ef7eb2e8f9f7 5466 product4 = (q31_t) (((q63_t) (Iq) * (cosVal)) >> 31);
<> 144:ef7eb2e8f9f7 5467
<> 144:ef7eb2e8f9f7 5468 /* Calculate pIalpha by using the two intermediate products 1 and 2 */
<> 144:ef7eb2e8f9f7 5469 *pIalpha = __QSUB(product1, product2);
<> 144:ef7eb2e8f9f7 5470
<> 144:ef7eb2e8f9f7 5471 /* Calculate pIbeta by using the two intermediate products 3 and 4 */
<> 144:ef7eb2e8f9f7 5472 *pIbeta = __QADD(product4, product3);
<> 144:ef7eb2e8f9f7 5473
<> 144:ef7eb2e8f9f7 5474 }
<> 144:ef7eb2e8f9f7 5475
<> 144:ef7eb2e8f9f7 5476 /**
<> 144:ef7eb2e8f9f7 5477 * @} end of Inverse park group
<> 144:ef7eb2e8f9f7 5478 */
<> 144:ef7eb2e8f9f7 5479
<> 144:ef7eb2e8f9f7 5480
<> 144:ef7eb2e8f9f7 5481 /**
<> 144:ef7eb2e8f9f7 5482 * @brief Converts the elements of the Q31 vector to floating-point vector.
<> 144:ef7eb2e8f9f7 5483 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 5484 * @param[out] *pDst is output pointer
<> 144:ef7eb2e8f9f7 5485 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 5486 * @return none.
<> 144:ef7eb2e8f9f7 5487 */
<> 144:ef7eb2e8f9f7 5488 void arm_q31_to_float(
<> 144:ef7eb2e8f9f7 5489 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 5490 float32_t * pDst,
<> 144:ef7eb2e8f9f7 5491 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 5492
<> 144:ef7eb2e8f9f7 5493 /**
<> 144:ef7eb2e8f9f7 5494 * @ingroup groupInterpolation
<> 144:ef7eb2e8f9f7 5495 */
<> 144:ef7eb2e8f9f7 5496
<> 144:ef7eb2e8f9f7 5497 /**
<> 144:ef7eb2e8f9f7 5498 * @defgroup LinearInterpolate Linear Interpolation
<> 144:ef7eb2e8f9f7 5499 *
<> 144:ef7eb2e8f9f7 5500 * Linear interpolation is a method of curve fitting using linear polynomials.
<> 144:ef7eb2e8f9f7 5501 * Linear interpolation works by effectively drawing a straight line between two neighboring samples and returning the appropriate point along that line
<> 144:ef7eb2e8f9f7 5502 *
<> 144:ef7eb2e8f9f7 5503 * \par
<> 144:ef7eb2e8f9f7 5504 * \image html LinearInterp.gif "Linear interpolation"
<> 144:ef7eb2e8f9f7 5505 *
<> 144:ef7eb2e8f9f7 5506 * \par
<> 144:ef7eb2e8f9f7 5507 * A Linear Interpolate function calculates an output value(y), for the input(x)
<> 144:ef7eb2e8f9f7 5508 * using linear interpolation of the input values x0, x1( nearest input values) and the output values y0 and y1(nearest output values)
<> 144:ef7eb2e8f9f7 5509 *
<> 144:ef7eb2e8f9f7 5510 * \par Algorithm:
<> 144:ef7eb2e8f9f7 5511 * <pre>
<> 144:ef7eb2e8f9f7 5512 * y = y0 + (x - x0) * ((y1 - y0)/(x1-x0))
<> 144:ef7eb2e8f9f7 5513 * where x0, x1 are nearest values of input x
<> 144:ef7eb2e8f9f7 5514 * y0, y1 are nearest values to output y
<> 144:ef7eb2e8f9f7 5515 * </pre>
<> 144:ef7eb2e8f9f7 5516 *
<> 144:ef7eb2e8f9f7 5517 * \par
<> 144:ef7eb2e8f9f7 5518 * This set of functions implements Linear interpolation process
<> 144:ef7eb2e8f9f7 5519 * for Q7, Q15, Q31, and floating-point data types. The functions operate on a single
<> 144:ef7eb2e8f9f7 5520 * sample of data and each call to the function returns a single processed value.
<> 144:ef7eb2e8f9f7 5521 * <code>S</code> points to an instance of the Linear Interpolate function data structure.
<> 144:ef7eb2e8f9f7 5522 * <code>x</code> is the input sample value. The functions returns the output value.
<> 144:ef7eb2e8f9f7 5523 *
<> 144:ef7eb2e8f9f7 5524 * \par
<> 144:ef7eb2e8f9f7 5525 * if x is outside of the table boundary, Linear interpolation returns first value of the table
<> 144:ef7eb2e8f9f7 5526 * if x is below input range and returns last value of table if x is above range.
<> 144:ef7eb2e8f9f7 5527 */
<> 144:ef7eb2e8f9f7 5528
<> 144:ef7eb2e8f9f7 5529 /**
<> 144:ef7eb2e8f9f7 5530 * @addtogroup LinearInterpolate
<> 144:ef7eb2e8f9f7 5531 * @{
<> 144:ef7eb2e8f9f7 5532 */
<> 144:ef7eb2e8f9f7 5533
<> 144:ef7eb2e8f9f7 5534 /**
<> 144:ef7eb2e8f9f7 5535 * @brief Process function for the floating-point Linear Interpolation Function.
<> 144:ef7eb2e8f9f7 5536 * @param[in,out] *S is an instance of the floating-point Linear Interpolation structure
<> 144:ef7eb2e8f9f7 5537 * @param[in] x input sample to process
<> 144:ef7eb2e8f9f7 5538 * @return y processed output sample.
<> 144:ef7eb2e8f9f7 5539 *
<> 144:ef7eb2e8f9f7 5540 */
<> 144:ef7eb2e8f9f7 5541
<> 144:ef7eb2e8f9f7 5542 static __INLINE float32_t arm_linear_interp_f32(
<> 144:ef7eb2e8f9f7 5543 arm_linear_interp_instance_f32 * S,
<> 144:ef7eb2e8f9f7 5544 float32_t x)
<> 144:ef7eb2e8f9f7 5545 {
<> 144:ef7eb2e8f9f7 5546
<> 144:ef7eb2e8f9f7 5547 float32_t y;
<> 144:ef7eb2e8f9f7 5548 float32_t x0, x1; /* Nearest input values */
<> 144:ef7eb2e8f9f7 5549 float32_t y0, y1; /* Nearest output values */
<> 144:ef7eb2e8f9f7 5550 float32_t xSpacing = S->xSpacing; /* spacing between input values */
<> 144:ef7eb2e8f9f7 5551 int32_t i; /* Index variable */
<> 144:ef7eb2e8f9f7 5552 float32_t *pYData = S->pYData; /* pointer to output table */
<> 144:ef7eb2e8f9f7 5553
<> 144:ef7eb2e8f9f7 5554 /* Calculation of index */
<> 144:ef7eb2e8f9f7 5555 i = (int32_t) ((x - S->x1) / xSpacing);
<> 144:ef7eb2e8f9f7 5556
<> 144:ef7eb2e8f9f7 5557 if(i < 0)
<> 144:ef7eb2e8f9f7 5558 {
<> 144:ef7eb2e8f9f7 5559 /* Iniatilize output for below specified range as least output value of table */
<> 144:ef7eb2e8f9f7 5560 y = pYData[0];
<> 144:ef7eb2e8f9f7 5561 }
<> 144:ef7eb2e8f9f7 5562 else if((uint32_t)i >= S->nValues)
<> 144:ef7eb2e8f9f7 5563 {
<> 144:ef7eb2e8f9f7 5564 /* Iniatilize output for above specified range as last output value of table */
<> 144:ef7eb2e8f9f7 5565 y = pYData[S->nValues - 1];
<> 144:ef7eb2e8f9f7 5566 }
<> 144:ef7eb2e8f9f7 5567 else
<> 144:ef7eb2e8f9f7 5568 {
<> 144:ef7eb2e8f9f7 5569 /* Calculation of nearest input values */
<> 144:ef7eb2e8f9f7 5570 x0 = S->x1 + i * xSpacing;
<> 144:ef7eb2e8f9f7 5571 x1 = S->x1 + (i + 1) * xSpacing;
<> 144:ef7eb2e8f9f7 5572
<> 144:ef7eb2e8f9f7 5573 /* Read of nearest output values */
<> 144:ef7eb2e8f9f7 5574 y0 = pYData[i];
<> 144:ef7eb2e8f9f7 5575 y1 = pYData[i + 1];
<> 144:ef7eb2e8f9f7 5576
<> 144:ef7eb2e8f9f7 5577 /* Calculation of output */
<> 144:ef7eb2e8f9f7 5578 y = y0 + (x - x0) * ((y1 - y0) / (x1 - x0));
<> 144:ef7eb2e8f9f7 5579
<> 144:ef7eb2e8f9f7 5580 }
<> 144:ef7eb2e8f9f7 5581
<> 144:ef7eb2e8f9f7 5582 /* returns output value */
<> 144:ef7eb2e8f9f7 5583 return (y);
<> 144:ef7eb2e8f9f7 5584 }
<> 144:ef7eb2e8f9f7 5585
<> 144:ef7eb2e8f9f7 5586 /**
<> 144:ef7eb2e8f9f7 5587 *
<> 144:ef7eb2e8f9f7 5588 * @brief Process function for the Q31 Linear Interpolation Function.
<> 144:ef7eb2e8f9f7 5589 * @param[in] *pYData pointer to Q31 Linear Interpolation table
<> 144:ef7eb2e8f9f7 5590 * @param[in] x input sample to process
<> 144:ef7eb2e8f9f7 5591 * @param[in] nValues number of table values
<> 144:ef7eb2e8f9f7 5592 * @return y processed output sample.
<> 144:ef7eb2e8f9f7 5593 *
<> 144:ef7eb2e8f9f7 5594 * \par
<> 144:ef7eb2e8f9f7 5595 * Input sample <code>x</code> is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part.
<> 144:ef7eb2e8f9f7 5596 * This function can support maximum of table size 2^12.
<> 144:ef7eb2e8f9f7 5597 *
<> 144:ef7eb2e8f9f7 5598 */
<> 144:ef7eb2e8f9f7 5599
<> 144:ef7eb2e8f9f7 5600
<> 144:ef7eb2e8f9f7 5601 static __INLINE q31_t arm_linear_interp_q31(
<> 144:ef7eb2e8f9f7 5602 q31_t * pYData,
<> 144:ef7eb2e8f9f7 5603 q31_t x,
<> 144:ef7eb2e8f9f7 5604 uint32_t nValues)
<> 144:ef7eb2e8f9f7 5605 {
<> 144:ef7eb2e8f9f7 5606 q31_t y; /* output */
<> 144:ef7eb2e8f9f7 5607 q31_t y0, y1; /* Nearest output values */
<> 144:ef7eb2e8f9f7 5608 q31_t fract; /* fractional part */
<> 144:ef7eb2e8f9f7 5609 int32_t index; /* Index to read nearest output values */
<> 144:ef7eb2e8f9f7 5610
<> 144:ef7eb2e8f9f7 5611 /* Input is in 12.20 format */
<> 144:ef7eb2e8f9f7 5612 /* 12 bits for the table index */
<> 144:ef7eb2e8f9f7 5613 /* Index value calculation */
<> 144:ef7eb2e8f9f7 5614 index = ((x & 0xFFF00000) >> 20);
<> 144:ef7eb2e8f9f7 5615
<> 144:ef7eb2e8f9f7 5616 if(index >= (int32_t)(nValues - 1))
<> 144:ef7eb2e8f9f7 5617 {
<> 144:ef7eb2e8f9f7 5618 return (pYData[nValues - 1]);
<> 144:ef7eb2e8f9f7 5619 }
<> 144:ef7eb2e8f9f7 5620 else if(index < 0)
<> 144:ef7eb2e8f9f7 5621 {
<> 144:ef7eb2e8f9f7 5622 return (pYData[0]);
<> 144:ef7eb2e8f9f7 5623 }
<> 144:ef7eb2e8f9f7 5624 else
<> 144:ef7eb2e8f9f7 5625 {
<> 144:ef7eb2e8f9f7 5626
<> 144:ef7eb2e8f9f7 5627 /* 20 bits for the fractional part */
<> 144:ef7eb2e8f9f7 5628 /* shift left by 11 to keep fract in 1.31 format */
<> 144:ef7eb2e8f9f7 5629 fract = (x & 0x000FFFFF) << 11;
<> 144:ef7eb2e8f9f7 5630
<> 144:ef7eb2e8f9f7 5631 /* Read two nearest output values from the index in 1.31(q31) format */
<> 144:ef7eb2e8f9f7 5632 y0 = pYData[index];
<> 144:ef7eb2e8f9f7 5633 y1 = pYData[index + 1u];
<> 144:ef7eb2e8f9f7 5634
<> 144:ef7eb2e8f9f7 5635 /* Calculation of y0 * (1-fract) and y is in 2.30 format */
<> 144:ef7eb2e8f9f7 5636 y = ((q31_t) ((q63_t) y0 * (0x7FFFFFFF - fract) >> 32));
<> 144:ef7eb2e8f9f7 5637
<> 144:ef7eb2e8f9f7 5638 /* Calculation of y0 * (1-fract) + y1 *fract and y is in 2.30 format */
<> 144:ef7eb2e8f9f7 5639 y += ((q31_t) (((q63_t) y1 * fract) >> 32));
<> 144:ef7eb2e8f9f7 5640
<> 144:ef7eb2e8f9f7 5641 /* Convert y to 1.31 format */
<> 144:ef7eb2e8f9f7 5642 return (y << 1u);
<> 144:ef7eb2e8f9f7 5643
<> 144:ef7eb2e8f9f7 5644 }
<> 144:ef7eb2e8f9f7 5645
<> 144:ef7eb2e8f9f7 5646 }
<> 144:ef7eb2e8f9f7 5647
<> 144:ef7eb2e8f9f7 5648 /**
<> 144:ef7eb2e8f9f7 5649 *
<> 144:ef7eb2e8f9f7 5650 * @brief Process function for the Q15 Linear Interpolation Function.
<> 144:ef7eb2e8f9f7 5651 * @param[in] *pYData pointer to Q15 Linear Interpolation table
<> 144:ef7eb2e8f9f7 5652 * @param[in] x input sample to process
<> 144:ef7eb2e8f9f7 5653 * @param[in] nValues number of table values
<> 144:ef7eb2e8f9f7 5654 * @return y processed output sample.
<> 144:ef7eb2e8f9f7 5655 *
<> 144:ef7eb2e8f9f7 5656 * \par
<> 144:ef7eb2e8f9f7 5657 * Input sample <code>x</code> is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part.
<> 144:ef7eb2e8f9f7 5658 * This function can support maximum of table size 2^12.
<> 144:ef7eb2e8f9f7 5659 *
<> 144:ef7eb2e8f9f7 5660 */
<> 144:ef7eb2e8f9f7 5661
<> 144:ef7eb2e8f9f7 5662
<> 144:ef7eb2e8f9f7 5663 static __INLINE q15_t arm_linear_interp_q15(
<> 144:ef7eb2e8f9f7 5664 q15_t * pYData,
<> 144:ef7eb2e8f9f7 5665 q31_t x,
<> 144:ef7eb2e8f9f7 5666 uint32_t nValues)
<> 144:ef7eb2e8f9f7 5667 {
<> 144:ef7eb2e8f9f7 5668 q63_t y; /* output */
<> 144:ef7eb2e8f9f7 5669 q15_t y0, y1; /* Nearest output values */
<> 144:ef7eb2e8f9f7 5670 q31_t fract; /* fractional part */
<> 144:ef7eb2e8f9f7 5671 int32_t index; /* Index to read nearest output values */
<> 144:ef7eb2e8f9f7 5672
<> 144:ef7eb2e8f9f7 5673 /* Input is in 12.20 format */
<> 144:ef7eb2e8f9f7 5674 /* 12 bits for the table index */
<> 144:ef7eb2e8f9f7 5675 /* Index value calculation */
<> 144:ef7eb2e8f9f7 5676 index = ((x & 0xFFF00000) >> 20u);
<> 144:ef7eb2e8f9f7 5677
<> 144:ef7eb2e8f9f7 5678 if(index >= (int32_t)(nValues - 1))
<> 144:ef7eb2e8f9f7 5679 {
<> 144:ef7eb2e8f9f7 5680 return (pYData[nValues - 1]);
<> 144:ef7eb2e8f9f7 5681 }
<> 144:ef7eb2e8f9f7 5682 else if(index < 0)
<> 144:ef7eb2e8f9f7 5683 {
<> 144:ef7eb2e8f9f7 5684 return (pYData[0]);
<> 144:ef7eb2e8f9f7 5685 }
<> 144:ef7eb2e8f9f7 5686 else
<> 144:ef7eb2e8f9f7 5687 {
<> 144:ef7eb2e8f9f7 5688 /* 20 bits for the fractional part */
<> 144:ef7eb2e8f9f7 5689 /* fract is in 12.20 format */
<> 144:ef7eb2e8f9f7 5690 fract = (x & 0x000FFFFF);
<> 144:ef7eb2e8f9f7 5691
<> 144:ef7eb2e8f9f7 5692 /* Read two nearest output values from the index */
<> 144:ef7eb2e8f9f7 5693 y0 = pYData[index];
<> 144:ef7eb2e8f9f7 5694 y1 = pYData[index + 1u];
<> 144:ef7eb2e8f9f7 5695
<> 144:ef7eb2e8f9f7 5696 /* Calculation of y0 * (1-fract) and y is in 13.35 format */
<> 144:ef7eb2e8f9f7 5697 y = ((q63_t) y0 * (0xFFFFF - fract));
<> 144:ef7eb2e8f9f7 5698
<> 144:ef7eb2e8f9f7 5699 /* Calculation of (y0 * (1-fract) + y1 * fract) and y is in 13.35 format */
<> 144:ef7eb2e8f9f7 5700 y += ((q63_t) y1 * (fract));
<> 144:ef7eb2e8f9f7 5701
<> 144:ef7eb2e8f9f7 5702 /* convert y to 1.15 format */
<> 144:ef7eb2e8f9f7 5703 return (y >> 20);
<> 144:ef7eb2e8f9f7 5704 }
<> 144:ef7eb2e8f9f7 5705
<> 144:ef7eb2e8f9f7 5706
<> 144:ef7eb2e8f9f7 5707 }
<> 144:ef7eb2e8f9f7 5708
<> 144:ef7eb2e8f9f7 5709 /**
<> 144:ef7eb2e8f9f7 5710 *
<> 144:ef7eb2e8f9f7 5711 * @brief Process function for the Q7 Linear Interpolation Function.
<> 144:ef7eb2e8f9f7 5712 * @param[in] *pYData pointer to Q7 Linear Interpolation table
<> 144:ef7eb2e8f9f7 5713 * @param[in] x input sample to process
<> 144:ef7eb2e8f9f7 5714 * @param[in] nValues number of table values
<> 144:ef7eb2e8f9f7 5715 * @return y processed output sample.
<> 144:ef7eb2e8f9f7 5716 *
<> 144:ef7eb2e8f9f7 5717 * \par
<> 144:ef7eb2e8f9f7 5718 * Input sample <code>x</code> is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part.
<> 144:ef7eb2e8f9f7 5719 * This function can support maximum of table size 2^12.
<> 144:ef7eb2e8f9f7 5720 */
<> 144:ef7eb2e8f9f7 5721
<> 144:ef7eb2e8f9f7 5722
<> 144:ef7eb2e8f9f7 5723 static __INLINE q7_t arm_linear_interp_q7(
<> 144:ef7eb2e8f9f7 5724 q7_t * pYData,
<> 144:ef7eb2e8f9f7 5725 q31_t x,
<> 144:ef7eb2e8f9f7 5726 uint32_t nValues)
<> 144:ef7eb2e8f9f7 5727 {
<> 144:ef7eb2e8f9f7 5728 q31_t y; /* output */
<> 144:ef7eb2e8f9f7 5729 q7_t y0, y1; /* Nearest output values */
<> 144:ef7eb2e8f9f7 5730 q31_t fract; /* fractional part */
<> 144:ef7eb2e8f9f7 5731 uint32_t index; /* Index to read nearest output values */
<> 144:ef7eb2e8f9f7 5732
<> 144:ef7eb2e8f9f7 5733 /* Input is in 12.20 format */
<> 144:ef7eb2e8f9f7 5734 /* 12 bits for the table index */
<> 144:ef7eb2e8f9f7 5735 /* Index value calculation */
<> 144:ef7eb2e8f9f7 5736 if (x < 0)
<> 144:ef7eb2e8f9f7 5737 {
<> 144:ef7eb2e8f9f7 5738 return (pYData[0]);
<> 144:ef7eb2e8f9f7 5739 }
<> 144:ef7eb2e8f9f7 5740 index = (x >> 20) & 0xfff;
<> 144:ef7eb2e8f9f7 5741
<> 144:ef7eb2e8f9f7 5742
<> 144:ef7eb2e8f9f7 5743 if(index >= (nValues - 1))
<> 144:ef7eb2e8f9f7 5744 {
<> 144:ef7eb2e8f9f7 5745 return (pYData[nValues - 1]);
<> 144:ef7eb2e8f9f7 5746 }
<> 144:ef7eb2e8f9f7 5747 else
<> 144:ef7eb2e8f9f7 5748 {
<> 144:ef7eb2e8f9f7 5749
<> 144:ef7eb2e8f9f7 5750 /* 20 bits for the fractional part */
<> 144:ef7eb2e8f9f7 5751 /* fract is in 12.20 format */
<> 144:ef7eb2e8f9f7 5752 fract = (x & 0x000FFFFF);
<> 144:ef7eb2e8f9f7 5753
<> 144:ef7eb2e8f9f7 5754 /* Read two nearest output values from the index and are in 1.7(q7) format */
<> 144:ef7eb2e8f9f7 5755 y0 = pYData[index];
<> 144:ef7eb2e8f9f7 5756 y1 = pYData[index + 1u];
<> 144:ef7eb2e8f9f7 5757
<> 144:ef7eb2e8f9f7 5758 /* Calculation of y0 * (1-fract ) and y is in 13.27(q27) format */
<> 144:ef7eb2e8f9f7 5759 y = ((y0 * (0xFFFFF - fract)));
<> 144:ef7eb2e8f9f7 5760
<> 144:ef7eb2e8f9f7 5761 /* Calculation of y1 * fract + y0 * (1-fract) and y is in 13.27(q27) format */
<> 144:ef7eb2e8f9f7 5762 y += (y1 * fract);
<> 144:ef7eb2e8f9f7 5763
<> 144:ef7eb2e8f9f7 5764 /* convert y to 1.7(q7) format */
<> 144:ef7eb2e8f9f7 5765 return (y >> 20u);
<> 144:ef7eb2e8f9f7 5766
<> 144:ef7eb2e8f9f7 5767 }
<> 144:ef7eb2e8f9f7 5768
<> 144:ef7eb2e8f9f7 5769 }
<> 144:ef7eb2e8f9f7 5770 /**
<> 144:ef7eb2e8f9f7 5771 * @} end of LinearInterpolate group
<> 144:ef7eb2e8f9f7 5772 */
<> 144:ef7eb2e8f9f7 5773
<> 144:ef7eb2e8f9f7 5774 /**
<> 144:ef7eb2e8f9f7 5775 * @brief Fast approximation to the trigonometric sine function for floating-point data.
<> 144:ef7eb2e8f9f7 5776 * @param[in] x input value in radians.
<> 144:ef7eb2e8f9f7 5777 * @return sin(x).
<> 144:ef7eb2e8f9f7 5778 */
<> 144:ef7eb2e8f9f7 5779
<> 144:ef7eb2e8f9f7 5780 float32_t arm_sin_f32(
<> 144:ef7eb2e8f9f7 5781 float32_t x);
<> 144:ef7eb2e8f9f7 5782
<> 144:ef7eb2e8f9f7 5783 /**
<> 144:ef7eb2e8f9f7 5784 * @brief Fast approximation to the trigonometric sine function for Q31 data.
<> 144:ef7eb2e8f9f7 5785 * @param[in] x Scaled input value in radians.
<> 144:ef7eb2e8f9f7 5786 * @return sin(x).
<> 144:ef7eb2e8f9f7 5787 */
<> 144:ef7eb2e8f9f7 5788
<> 144:ef7eb2e8f9f7 5789 q31_t arm_sin_q31(
<> 144:ef7eb2e8f9f7 5790 q31_t x);
<> 144:ef7eb2e8f9f7 5791
<> 144:ef7eb2e8f9f7 5792 /**
<> 144:ef7eb2e8f9f7 5793 * @brief Fast approximation to the trigonometric sine function for Q15 data.
<> 144:ef7eb2e8f9f7 5794 * @param[in] x Scaled input value in radians.
<> 144:ef7eb2e8f9f7 5795 * @return sin(x).
<> 144:ef7eb2e8f9f7 5796 */
<> 144:ef7eb2e8f9f7 5797
<> 144:ef7eb2e8f9f7 5798 q15_t arm_sin_q15(
<> 144:ef7eb2e8f9f7 5799 q15_t x);
<> 144:ef7eb2e8f9f7 5800
<> 144:ef7eb2e8f9f7 5801 /**
<> 144:ef7eb2e8f9f7 5802 * @brief Fast approximation to the trigonometric cosine function for floating-point data.
<> 144:ef7eb2e8f9f7 5803 * @param[in] x input value in radians.
<> 144:ef7eb2e8f9f7 5804 * @return cos(x).
<> 144:ef7eb2e8f9f7 5805 */
<> 144:ef7eb2e8f9f7 5806
<> 144:ef7eb2e8f9f7 5807 float32_t arm_cos_f32(
<> 144:ef7eb2e8f9f7 5808 float32_t x);
<> 144:ef7eb2e8f9f7 5809
<> 144:ef7eb2e8f9f7 5810 /**
<> 144:ef7eb2e8f9f7 5811 * @brief Fast approximation to the trigonometric cosine function for Q31 data.
<> 144:ef7eb2e8f9f7 5812 * @param[in] x Scaled input value in radians.
<> 144:ef7eb2e8f9f7 5813 * @return cos(x).
<> 144:ef7eb2e8f9f7 5814 */
<> 144:ef7eb2e8f9f7 5815
<> 144:ef7eb2e8f9f7 5816 q31_t arm_cos_q31(
<> 144:ef7eb2e8f9f7 5817 q31_t x);
<> 144:ef7eb2e8f9f7 5818
<> 144:ef7eb2e8f9f7 5819 /**
<> 144:ef7eb2e8f9f7 5820 * @brief Fast approximation to the trigonometric cosine function for Q15 data.
<> 144:ef7eb2e8f9f7 5821 * @param[in] x Scaled input value in radians.
<> 144:ef7eb2e8f9f7 5822 * @return cos(x).
<> 144:ef7eb2e8f9f7 5823 */
<> 144:ef7eb2e8f9f7 5824
<> 144:ef7eb2e8f9f7 5825 q15_t arm_cos_q15(
<> 144:ef7eb2e8f9f7 5826 q15_t x);
<> 144:ef7eb2e8f9f7 5827
<> 144:ef7eb2e8f9f7 5828
<> 144:ef7eb2e8f9f7 5829 /**
<> 144:ef7eb2e8f9f7 5830 * @ingroup groupFastMath
<> 144:ef7eb2e8f9f7 5831 */
<> 144:ef7eb2e8f9f7 5832
<> 144:ef7eb2e8f9f7 5833
<> 144:ef7eb2e8f9f7 5834 /**
<> 144:ef7eb2e8f9f7 5835 * @defgroup SQRT Square Root
<> 144:ef7eb2e8f9f7 5836 *
<> 144:ef7eb2e8f9f7 5837 * Computes the square root of a number.
<> 144:ef7eb2e8f9f7 5838 * There are separate functions for Q15, Q31, and floating-point data types.
<> 144:ef7eb2e8f9f7 5839 * The square root function is computed using the Newton-Raphson algorithm.
<> 144:ef7eb2e8f9f7 5840 * This is an iterative algorithm of the form:
<> 144:ef7eb2e8f9f7 5841 * <pre>
<> 144:ef7eb2e8f9f7 5842 * x1 = x0 - f(x0)/f'(x0)
<> 144:ef7eb2e8f9f7 5843 * </pre>
<> 144:ef7eb2e8f9f7 5844 * where <code>x1</code> is the current estimate,
<> 144:ef7eb2e8f9f7 5845 * <code>x0</code> is the previous estimate, and
<> 144:ef7eb2e8f9f7 5846 * <code>f'(x0)</code> is the derivative of <code>f()</code> evaluated at <code>x0</code>.
<> 144:ef7eb2e8f9f7 5847 * For the square root function, the algorithm reduces to:
<> 144:ef7eb2e8f9f7 5848 * <pre>
<> 144:ef7eb2e8f9f7 5849 * x0 = in/2 [initial guess]
<> 144:ef7eb2e8f9f7 5850 * x1 = 1/2 * ( x0 + in / x0) [each iteration]
<> 144:ef7eb2e8f9f7 5851 * </pre>
<> 144:ef7eb2e8f9f7 5852 */
<> 144:ef7eb2e8f9f7 5853
<> 144:ef7eb2e8f9f7 5854
<> 144:ef7eb2e8f9f7 5855 /**
<> 144:ef7eb2e8f9f7 5856 * @addtogroup SQRT
<> 144:ef7eb2e8f9f7 5857 * @{
<> 144:ef7eb2e8f9f7 5858 */
<> 144:ef7eb2e8f9f7 5859
<> 144:ef7eb2e8f9f7 5860 /**
<> 144:ef7eb2e8f9f7 5861 * @brief Floating-point square root function.
<> 144:ef7eb2e8f9f7 5862 * @param[in] in input value.
<> 144:ef7eb2e8f9f7 5863 * @param[out] *pOut square root of input value.
<> 144:ef7eb2e8f9f7 5864 * @return The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUMENT_ERROR if
<> 144:ef7eb2e8f9f7 5865 * <code>in</code> is negative value and returns zero output for negative values.
<> 144:ef7eb2e8f9f7 5866 */
<> 144:ef7eb2e8f9f7 5867
<> 144:ef7eb2e8f9f7 5868 static __INLINE arm_status arm_sqrt_f32(
<> 144:ef7eb2e8f9f7 5869 float32_t in,
<> 144:ef7eb2e8f9f7 5870 float32_t * pOut)
<> 144:ef7eb2e8f9f7 5871 {
<> 144:ef7eb2e8f9f7 5872 if(in > 0)
<> 144:ef7eb2e8f9f7 5873 {
<> 144:ef7eb2e8f9f7 5874
<> 144:ef7eb2e8f9f7 5875 // #if __FPU_USED
<> 144:ef7eb2e8f9f7 5876 #if (__FPU_USED == 1) && defined ( __CC_ARM )
<> 144:ef7eb2e8f9f7 5877 *pOut = __sqrtf(in);
<> 144:ef7eb2e8f9f7 5878 #else
<> 144:ef7eb2e8f9f7 5879 *pOut = sqrtf(in);
<> 144:ef7eb2e8f9f7 5880 #endif
<> 144:ef7eb2e8f9f7 5881
<> 144:ef7eb2e8f9f7 5882 return (ARM_MATH_SUCCESS);
<> 144:ef7eb2e8f9f7 5883 }
<> 144:ef7eb2e8f9f7 5884 else
<> 144:ef7eb2e8f9f7 5885 {
<> 144:ef7eb2e8f9f7 5886 *pOut = 0.0f;
<> 144:ef7eb2e8f9f7 5887 return (ARM_MATH_ARGUMENT_ERROR);
<> 144:ef7eb2e8f9f7 5888 }
<> 144:ef7eb2e8f9f7 5889
<> 144:ef7eb2e8f9f7 5890 }
<> 144:ef7eb2e8f9f7 5891
<> 144:ef7eb2e8f9f7 5892
<> 144:ef7eb2e8f9f7 5893 /**
<> 144:ef7eb2e8f9f7 5894 * @brief Q31 square root function.
<> 144:ef7eb2e8f9f7 5895 * @param[in] in input value. The range of the input value is [0 +1) or 0x00000000 to 0x7FFFFFFF.
<> 144:ef7eb2e8f9f7 5896 * @param[out] *pOut square root of input value.
<> 144:ef7eb2e8f9f7 5897 * @return The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUMENT_ERROR if
<> 144:ef7eb2e8f9f7 5898 * <code>in</code> is negative value and returns zero output for negative values.
<> 144:ef7eb2e8f9f7 5899 */
<> 144:ef7eb2e8f9f7 5900 arm_status arm_sqrt_q31(
<> 144:ef7eb2e8f9f7 5901 q31_t in,
<> 144:ef7eb2e8f9f7 5902 q31_t * pOut);
<> 144:ef7eb2e8f9f7 5903
<> 144:ef7eb2e8f9f7 5904 /**
<> 144:ef7eb2e8f9f7 5905 * @brief Q15 square root function.
<> 144:ef7eb2e8f9f7 5906 * @param[in] in input value. The range of the input value is [0 +1) or 0x0000 to 0x7FFF.
<> 144:ef7eb2e8f9f7 5907 * @param[out] *pOut square root of input value.
<> 144:ef7eb2e8f9f7 5908 * @return The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUMENT_ERROR if
<> 144:ef7eb2e8f9f7 5909 * <code>in</code> is negative value and returns zero output for negative values.
<> 144:ef7eb2e8f9f7 5910 */
<> 144:ef7eb2e8f9f7 5911 arm_status arm_sqrt_q15(
<> 144:ef7eb2e8f9f7 5912 q15_t in,
<> 144:ef7eb2e8f9f7 5913 q15_t * pOut);
<> 144:ef7eb2e8f9f7 5914
<> 144:ef7eb2e8f9f7 5915 /**
<> 144:ef7eb2e8f9f7 5916 * @} end of SQRT group
<> 144:ef7eb2e8f9f7 5917 */
<> 144:ef7eb2e8f9f7 5918
<> 144:ef7eb2e8f9f7 5919
<> 144:ef7eb2e8f9f7 5920
<> 144:ef7eb2e8f9f7 5921
<> 144:ef7eb2e8f9f7 5922
<> 144:ef7eb2e8f9f7 5923
<> 144:ef7eb2e8f9f7 5924 /**
<> 144:ef7eb2e8f9f7 5925 * @brief floating-point Circular write function.
<> 144:ef7eb2e8f9f7 5926 */
<> 144:ef7eb2e8f9f7 5927
<> 144:ef7eb2e8f9f7 5928 static __INLINE void arm_circularWrite_f32(
<> 144:ef7eb2e8f9f7 5929 int32_t * circBuffer,
<> 144:ef7eb2e8f9f7 5930 int32_t L,
<> 144:ef7eb2e8f9f7 5931 uint16_t * writeOffset,
<> 144:ef7eb2e8f9f7 5932 int32_t bufferInc,
<> 144:ef7eb2e8f9f7 5933 const int32_t * src,
<> 144:ef7eb2e8f9f7 5934 int32_t srcInc,
<> 144:ef7eb2e8f9f7 5935 uint32_t blockSize)
<> 144:ef7eb2e8f9f7 5936 {
<> 144:ef7eb2e8f9f7 5937 uint32_t i = 0u;
<> 144:ef7eb2e8f9f7 5938 int32_t wOffset;
<> 144:ef7eb2e8f9f7 5939
<> 144:ef7eb2e8f9f7 5940 /* Copy the value of Index pointer that points
<> 144:ef7eb2e8f9f7 5941 * to the current location where the input samples to be copied */
<> 144:ef7eb2e8f9f7 5942 wOffset = *writeOffset;
<> 144:ef7eb2e8f9f7 5943
<> 144:ef7eb2e8f9f7 5944 /* Loop over the blockSize */
<> 144:ef7eb2e8f9f7 5945 i = blockSize;
<> 144:ef7eb2e8f9f7 5946
<> 144:ef7eb2e8f9f7 5947 while(i > 0u)
<> 144:ef7eb2e8f9f7 5948 {
<> 144:ef7eb2e8f9f7 5949 /* copy the input sample to the circular buffer */
<> 144:ef7eb2e8f9f7 5950 circBuffer[wOffset] = *src;
<> 144:ef7eb2e8f9f7 5951
<> 144:ef7eb2e8f9f7 5952 /* Update the input pointer */
<> 144:ef7eb2e8f9f7 5953 src += srcInc;
<> 144:ef7eb2e8f9f7 5954
<> 144:ef7eb2e8f9f7 5955 /* Circularly update wOffset. Watch out for positive and negative value */
<> 144:ef7eb2e8f9f7 5956 wOffset += bufferInc;
<> 144:ef7eb2e8f9f7 5957 if(wOffset >= L)
<> 144:ef7eb2e8f9f7 5958 wOffset -= L;
<> 144:ef7eb2e8f9f7 5959
<> 144:ef7eb2e8f9f7 5960 /* Decrement the loop counter */
<> 144:ef7eb2e8f9f7 5961 i--;
<> 144:ef7eb2e8f9f7 5962 }
<> 144:ef7eb2e8f9f7 5963
<> 144:ef7eb2e8f9f7 5964 /* Update the index pointer */
<> 144:ef7eb2e8f9f7 5965 *writeOffset = wOffset;
<> 144:ef7eb2e8f9f7 5966 }
<> 144:ef7eb2e8f9f7 5967
<> 144:ef7eb2e8f9f7 5968
<> 144:ef7eb2e8f9f7 5969
<> 144:ef7eb2e8f9f7 5970 /**
<> 144:ef7eb2e8f9f7 5971 * @brief floating-point Circular Read function.
<> 144:ef7eb2e8f9f7 5972 */
<> 144:ef7eb2e8f9f7 5973 static __INLINE void arm_circularRead_f32(
<> 144:ef7eb2e8f9f7 5974 int32_t * circBuffer,
<> 144:ef7eb2e8f9f7 5975 int32_t L,
<> 144:ef7eb2e8f9f7 5976 int32_t * readOffset,
<> 144:ef7eb2e8f9f7 5977 int32_t bufferInc,
<> 144:ef7eb2e8f9f7 5978 int32_t * dst,
<> 144:ef7eb2e8f9f7 5979 int32_t * dst_base,
<> 144:ef7eb2e8f9f7 5980 int32_t dst_length,
<> 144:ef7eb2e8f9f7 5981 int32_t dstInc,
<> 144:ef7eb2e8f9f7 5982 uint32_t blockSize)
<> 144:ef7eb2e8f9f7 5983 {
<> 144:ef7eb2e8f9f7 5984 uint32_t i = 0u;
<> 144:ef7eb2e8f9f7 5985 int32_t rOffset, dst_end;
<> 144:ef7eb2e8f9f7 5986
<> 144:ef7eb2e8f9f7 5987 /* Copy the value of Index pointer that points
<> 144:ef7eb2e8f9f7 5988 * to the current location from where the input samples to be read */
<> 144:ef7eb2e8f9f7 5989 rOffset = *readOffset;
<> 144:ef7eb2e8f9f7 5990 dst_end = (int32_t) (dst_base + dst_length);
<> 144:ef7eb2e8f9f7 5991
<> 144:ef7eb2e8f9f7 5992 /* Loop over the blockSize */
<> 144:ef7eb2e8f9f7 5993 i = blockSize;
<> 144:ef7eb2e8f9f7 5994
<> 144:ef7eb2e8f9f7 5995 while(i > 0u)
<> 144:ef7eb2e8f9f7 5996 {
<> 144:ef7eb2e8f9f7 5997 /* copy the sample from the circular buffer to the destination buffer */
<> 144:ef7eb2e8f9f7 5998 *dst = circBuffer[rOffset];
<> 144:ef7eb2e8f9f7 5999
<> 144:ef7eb2e8f9f7 6000 /* Update the input pointer */
<> 144:ef7eb2e8f9f7 6001 dst += dstInc;
<> 144:ef7eb2e8f9f7 6002
<> 144:ef7eb2e8f9f7 6003 if(dst == (int32_t *) dst_end)
<> 144:ef7eb2e8f9f7 6004 {
<> 144:ef7eb2e8f9f7 6005 dst = dst_base;
<> 144:ef7eb2e8f9f7 6006 }
<> 144:ef7eb2e8f9f7 6007
<> 144:ef7eb2e8f9f7 6008 /* Circularly update rOffset. Watch out for positive and negative value */
<> 144:ef7eb2e8f9f7 6009 rOffset += bufferInc;
<> 144:ef7eb2e8f9f7 6010
<> 144:ef7eb2e8f9f7 6011 if(rOffset >= L)
<> 144:ef7eb2e8f9f7 6012 {
<> 144:ef7eb2e8f9f7 6013 rOffset -= L;
<> 144:ef7eb2e8f9f7 6014 }
<> 144:ef7eb2e8f9f7 6015
<> 144:ef7eb2e8f9f7 6016 /* Decrement the loop counter */
<> 144:ef7eb2e8f9f7 6017 i--;
<> 144:ef7eb2e8f9f7 6018 }
<> 144:ef7eb2e8f9f7 6019
<> 144:ef7eb2e8f9f7 6020 /* Update the index pointer */
<> 144:ef7eb2e8f9f7 6021 *readOffset = rOffset;
<> 144:ef7eb2e8f9f7 6022 }
<> 144:ef7eb2e8f9f7 6023
<> 144:ef7eb2e8f9f7 6024 /**
<> 144:ef7eb2e8f9f7 6025 * @brief Q15 Circular write function.
<> 144:ef7eb2e8f9f7 6026 */
<> 144:ef7eb2e8f9f7 6027
<> 144:ef7eb2e8f9f7 6028 static __INLINE void arm_circularWrite_q15(
<> 144:ef7eb2e8f9f7 6029 q15_t * circBuffer,
<> 144:ef7eb2e8f9f7 6030 int32_t L,
<> 144:ef7eb2e8f9f7 6031 uint16_t * writeOffset,
<> 144:ef7eb2e8f9f7 6032 int32_t bufferInc,
<> 144:ef7eb2e8f9f7 6033 const q15_t * src,
<> 144:ef7eb2e8f9f7 6034 int32_t srcInc,
<> 144:ef7eb2e8f9f7 6035 uint32_t blockSize)
<> 144:ef7eb2e8f9f7 6036 {
<> 144:ef7eb2e8f9f7 6037 uint32_t i = 0u;
<> 144:ef7eb2e8f9f7 6038 int32_t wOffset;
<> 144:ef7eb2e8f9f7 6039
<> 144:ef7eb2e8f9f7 6040 /* Copy the value of Index pointer that points
<> 144:ef7eb2e8f9f7 6041 * to the current location where the input samples to be copied */
<> 144:ef7eb2e8f9f7 6042 wOffset = *writeOffset;
<> 144:ef7eb2e8f9f7 6043
<> 144:ef7eb2e8f9f7 6044 /* Loop over the blockSize */
<> 144:ef7eb2e8f9f7 6045 i = blockSize;
<> 144:ef7eb2e8f9f7 6046
<> 144:ef7eb2e8f9f7 6047 while(i > 0u)
<> 144:ef7eb2e8f9f7 6048 {
<> 144:ef7eb2e8f9f7 6049 /* copy the input sample to the circular buffer */
<> 144:ef7eb2e8f9f7 6050 circBuffer[wOffset] = *src;
<> 144:ef7eb2e8f9f7 6051
<> 144:ef7eb2e8f9f7 6052 /* Update the input pointer */
<> 144:ef7eb2e8f9f7 6053 src += srcInc;
<> 144:ef7eb2e8f9f7 6054
<> 144:ef7eb2e8f9f7 6055 /* Circularly update wOffset. Watch out for positive and negative value */
<> 144:ef7eb2e8f9f7 6056 wOffset += bufferInc;
<> 144:ef7eb2e8f9f7 6057 if(wOffset >= L)
<> 144:ef7eb2e8f9f7 6058 wOffset -= L;
<> 144:ef7eb2e8f9f7 6059
<> 144:ef7eb2e8f9f7 6060 /* Decrement the loop counter */
<> 144:ef7eb2e8f9f7 6061 i--;
<> 144:ef7eb2e8f9f7 6062 }
<> 144:ef7eb2e8f9f7 6063
<> 144:ef7eb2e8f9f7 6064 /* Update the index pointer */
<> 144:ef7eb2e8f9f7 6065 *writeOffset = wOffset;
<> 144:ef7eb2e8f9f7 6066 }
<> 144:ef7eb2e8f9f7 6067
<> 144:ef7eb2e8f9f7 6068
<> 144:ef7eb2e8f9f7 6069
<> 144:ef7eb2e8f9f7 6070 /**
<> 144:ef7eb2e8f9f7 6071 * @brief Q15 Circular Read function.
<> 144:ef7eb2e8f9f7 6072 */
<> 144:ef7eb2e8f9f7 6073 static __INLINE void arm_circularRead_q15(
<> 144:ef7eb2e8f9f7 6074 q15_t * circBuffer,
<> 144:ef7eb2e8f9f7 6075 int32_t L,
<> 144:ef7eb2e8f9f7 6076 int32_t * readOffset,
<> 144:ef7eb2e8f9f7 6077 int32_t bufferInc,
<> 144:ef7eb2e8f9f7 6078 q15_t * dst,
<> 144:ef7eb2e8f9f7 6079 q15_t * dst_base,
<> 144:ef7eb2e8f9f7 6080 int32_t dst_length,
<> 144:ef7eb2e8f9f7 6081 int32_t dstInc,
<> 144:ef7eb2e8f9f7 6082 uint32_t blockSize)
<> 144:ef7eb2e8f9f7 6083 {
<> 144:ef7eb2e8f9f7 6084 uint32_t i = 0;
<> 144:ef7eb2e8f9f7 6085 int32_t rOffset, dst_end;
<> 144:ef7eb2e8f9f7 6086
<> 144:ef7eb2e8f9f7 6087 /* Copy the value of Index pointer that points
<> 144:ef7eb2e8f9f7 6088 * to the current location from where the input samples to be read */
<> 144:ef7eb2e8f9f7 6089 rOffset = *readOffset;
<> 144:ef7eb2e8f9f7 6090
<> 144:ef7eb2e8f9f7 6091 dst_end = (int32_t) (dst_base + dst_length);
<> 144:ef7eb2e8f9f7 6092
<> 144:ef7eb2e8f9f7 6093 /* Loop over the blockSize */
<> 144:ef7eb2e8f9f7 6094 i = blockSize;
<> 144:ef7eb2e8f9f7 6095
<> 144:ef7eb2e8f9f7 6096 while(i > 0u)
<> 144:ef7eb2e8f9f7 6097 {
<> 144:ef7eb2e8f9f7 6098 /* copy the sample from the circular buffer to the destination buffer */
<> 144:ef7eb2e8f9f7 6099 *dst = circBuffer[rOffset];
<> 144:ef7eb2e8f9f7 6100
<> 144:ef7eb2e8f9f7 6101 /* Update the input pointer */
<> 144:ef7eb2e8f9f7 6102 dst += dstInc;
<> 144:ef7eb2e8f9f7 6103
<> 144:ef7eb2e8f9f7 6104 if(dst == (q15_t *) dst_end)
<> 144:ef7eb2e8f9f7 6105 {
<> 144:ef7eb2e8f9f7 6106 dst = dst_base;
<> 144:ef7eb2e8f9f7 6107 }
<> 144:ef7eb2e8f9f7 6108
<> 144:ef7eb2e8f9f7 6109 /* Circularly update wOffset. Watch out for positive and negative value */
<> 144:ef7eb2e8f9f7 6110 rOffset += bufferInc;
<> 144:ef7eb2e8f9f7 6111
<> 144:ef7eb2e8f9f7 6112 if(rOffset >= L)
<> 144:ef7eb2e8f9f7 6113 {
<> 144:ef7eb2e8f9f7 6114 rOffset -= L;
<> 144:ef7eb2e8f9f7 6115 }
<> 144:ef7eb2e8f9f7 6116
<> 144:ef7eb2e8f9f7 6117 /* Decrement the loop counter */
<> 144:ef7eb2e8f9f7 6118 i--;
<> 144:ef7eb2e8f9f7 6119 }
<> 144:ef7eb2e8f9f7 6120
<> 144:ef7eb2e8f9f7 6121 /* Update the index pointer */
<> 144:ef7eb2e8f9f7 6122 *readOffset = rOffset;
<> 144:ef7eb2e8f9f7 6123 }
<> 144:ef7eb2e8f9f7 6124
<> 144:ef7eb2e8f9f7 6125
<> 144:ef7eb2e8f9f7 6126 /**
<> 144:ef7eb2e8f9f7 6127 * @brief Q7 Circular write function.
<> 144:ef7eb2e8f9f7 6128 */
<> 144:ef7eb2e8f9f7 6129
<> 144:ef7eb2e8f9f7 6130 static __INLINE void arm_circularWrite_q7(
<> 144:ef7eb2e8f9f7 6131 q7_t * circBuffer,
<> 144:ef7eb2e8f9f7 6132 int32_t L,
<> 144:ef7eb2e8f9f7 6133 uint16_t * writeOffset,
<> 144:ef7eb2e8f9f7 6134 int32_t bufferInc,
<> 144:ef7eb2e8f9f7 6135 const q7_t * src,
<> 144:ef7eb2e8f9f7 6136 int32_t srcInc,
<> 144:ef7eb2e8f9f7 6137 uint32_t blockSize)
<> 144:ef7eb2e8f9f7 6138 {
<> 144:ef7eb2e8f9f7 6139 uint32_t i = 0u;
<> 144:ef7eb2e8f9f7 6140 int32_t wOffset;
<> 144:ef7eb2e8f9f7 6141
<> 144:ef7eb2e8f9f7 6142 /* Copy the value of Index pointer that points
<> 144:ef7eb2e8f9f7 6143 * to the current location where the input samples to be copied */
<> 144:ef7eb2e8f9f7 6144 wOffset = *writeOffset;
<> 144:ef7eb2e8f9f7 6145
<> 144:ef7eb2e8f9f7 6146 /* Loop over the blockSize */
<> 144:ef7eb2e8f9f7 6147 i = blockSize;
<> 144:ef7eb2e8f9f7 6148
<> 144:ef7eb2e8f9f7 6149 while(i > 0u)
<> 144:ef7eb2e8f9f7 6150 {
<> 144:ef7eb2e8f9f7 6151 /* copy the input sample to the circular buffer */
<> 144:ef7eb2e8f9f7 6152 circBuffer[wOffset] = *src;
<> 144:ef7eb2e8f9f7 6153
<> 144:ef7eb2e8f9f7 6154 /* Update the input pointer */
<> 144:ef7eb2e8f9f7 6155 src += srcInc;
<> 144:ef7eb2e8f9f7 6156
<> 144:ef7eb2e8f9f7 6157 /* Circularly update wOffset. Watch out for positive and negative value */
<> 144:ef7eb2e8f9f7 6158 wOffset += bufferInc;
<> 144:ef7eb2e8f9f7 6159 if(wOffset >= L)
<> 144:ef7eb2e8f9f7 6160 wOffset -= L;
<> 144:ef7eb2e8f9f7 6161
<> 144:ef7eb2e8f9f7 6162 /* Decrement the loop counter */
<> 144:ef7eb2e8f9f7 6163 i--;
<> 144:ef7eb2e8f9f7 6164 }
<> 144:ef7eb2e8f9f7 6165
<> 144:ef7eb2e8f9f7 6166 /* Update the index pointer */
<> 144:ef7eb2e8f9f7 6167 *writeOffset = wOffset;
<> 144:ef7eb2e8f9f7 6168 }
<> 144:ef7eb2e8f9f7 6169
<> 144:ef7eb2e8f9f7 6170
<> 144:ef7eb2e8f9f7 6171
<> 144:ef7eb2e8f9f7 6172 /**
<> 144:ef7eb2e8f9f7 6173 * @brief Q7 Circular Read function.
<> 144:ef7eb2e8f9f7 6174 */
<> 144:ef7eb2e8f9f7 6175 static __INLINE void arm_circularRead_q7(
<> 144:ef7eb2e8f9f7 6176 q7_t * circBuffer,
<> 144:ef7eb2e8f9f7 6177 int32_t L,
<> 144:ef7eb2e8f9f7 6178 int32_t * readOffset,
<> 144:ef7eb2e8f9f7 6179 int32_t bufferInc,
<> 144:ef7eb2e8f9f7 6180 q7_t * dst,
<> 144:ef7eb2e8f9f7 6181 q7_t * dst_base,
<> 144:ef7eb2e8f9f7 6182 int32_t dst_length,
<> 144:ef7eb2e8f9f7 6183 int32_t dstInc,
<> 144:ef7eb2e8f9f7 6184 uint32_t blockSize)
<> 144:ef7eb2e8f9f7 6185 {
<> 144:ef7eb2e8f9f7 6186 uint32_t i = 0;
<> 144:ef7eb2e8f9f7 6187 int32_t rOffset, dst_end;
<> 144:ef7eb2e8f9f7 6188
<> 144:ef7eb2e8f9f7 6189 /* Copy the value of Index pointer that points
<> 144:ef7eb2e8f9f7 6190 * to the current location from where the input samples to be read */
<> 144:ef7eb2e8f9f7 6191 rOffset = *readOffset;
<> 144:ef7eb2e8f9f7 6192
<> 144:ef7eb2e8f9f7 6193 dst_end = (int32_t) (dst_base + dst_length);
<> 144:ef7eb2e8f9f7 6194
<> 144:ef7eb2e8f9f7 6195 /* Loop over the blockSize */
<> 144:ef7eb2e8f9f7 6196 i = blockSize;
<> 144:ef7eb2e8f9f7 6197
<> 144:ef7eb2e8f9f7 6198 while(i > 0u)
<> 144:ef7eb2e8f9f7 6199 {
<> 144:ef7eb2e8f9f7 6200 /* copy the sample from the circular buffer to the destination buffer */
<> 144:ef7eb2e8f9f7 6201 *dst = circBuffer[rOffset];
<> 144:ef7eb2e8f9f7 6202
<> 144:ef7eb2e8f9f7 6203 /* Update the input pointer */
<> 144:ef7eb2e8f9f7 6204 dst += dstInc;
<> 144:ef7eb2e8f9f7 6205
<> 144:ef7eb2e8f9f7 6206 if(dst == (q7_t *) dst_end)
<> 144:ef7eb2e8f9f7 6207 {
<> 144:ef7eb2e8f9f7 6208 dst = dst_base;
<> 144:ef7eb2e8f9f7 6209 }
<> 144:ef7eb2e8f9f7 6210
<> 144:ef7eb2e8f9f7 6211 /* Circularly update rOffset. Watch out for positive and negative value */
<> 144:ef7eb2e8f9f7 6212 rOffset += bufferInc;
<> 144:ef7eb2e8f9f7 6213
<> 144:ef7eb2e8f9f7 6214 if(rOffset >= L)
<> 144:ef7eb2e8f9f7 6215 {
<> 144:ef7eb2e8f9f7 6216 rOffset -= L;
<> 144:ef7eb2e8f9f7 6217 }
<> 144:ef7eb2e8f9f7 6218
<> 144:ef7eb2e8f9f7 6219 /* Decrement the loop counter */
<> 144:ef7eb2e8f9f7 6220 i--;
<> 144:ef7eb2e8f9f7 6221 }
<> 144:ef7eb2e8f9f7 6222
<> 144:ef7eb2e8f9f7 6223 /* Update the index pointer */
<> 144:ef7eb2e8f9f7 6224 *readOffset = rOffset;
<> 144:ef7eb2e8f9f7 6225 }
<> 144:ef7eb2e8f9f7 6226
<> 144:ef7eb2e8f9f7 6227
<> 144:ef7eb2e8f9f7 6228 /**
<> 144:ef7eb2e8f9f7 6229 * @brief Sum of the squares of the elements of a Q31 vector.
<> 144:ef7eb2e8f9f7 6230 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6231 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6232 * @param[out] *pResult is output value.
<> 144:ef7eb2e8f9f7 6233 * @return none.
<> 144:ef7eb2e8f9f7 6234 */
<> 144:ef7eb2e8f9f7 6235
<> 144:ef7eb2e8f9f7 6236 void arm_power_q31(
<> 144:ef7eb2e8f9f7 6237 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 6238 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6239 q63_t * pResult);
<> 144:ef7eb2e8f9f7 6240
<> 144:ef7eb2e8f9f7 6241 /**
<> 144:ef7eb2e8f9f7 6242 * @brief Sum of the squares of the elements of a floating-point vector.
<> 144:ef7eb2e8f9f7 6243 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6244 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6245 * @param[out] *pResult is output value.
<> 144:ef7eb2e8f9f7 6246 * @return none.
<> 144:ef7eb2e8f9f7 6247 */
<> 144:ef7eb2e8f9f7 6248
<> 144:ef7eb2e8f9f7 6249 void arm_power_f32(
<> 144:ef7eb2e8f9f7 6250 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 6251 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6252 float32_t * pResult);
<> 144:ef7eb2e8f9f7 6253
<> 144:ef7eb2e8f9f7 6254 /**
<> 144:ef7eb2e8f9f7 6255 * @brief Sum of the squares of the elements of a Q15 vector.
<> 144:ef7eb2e8f9f7 6256 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6257 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6258 * @param[out] *pResult is output value.
<> 144:ef7eb2e8f9f7 6259 * @return none.
<> 144:ef7eb2e8f9f7 6260 */
<> 144:ef7eb2e8f9f7 6261
<> 144:ef7eb2e8f9f7 6262 void arm_power_q15(
<> 144:ef7eb2e8f9f7 6263 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 6264 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6265 q63_t * pResult);
<> 144:ef7eb2e8f9f7 6266
<> 144:ef7eb2e8f9f7 6267 /**
<> 144:ef7eb2e8f9f7 6268 * @brief Sum of the squares of the elements of a Q7 vector.
<> 144:ef7eb2e8f9f7 6269 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6270 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6271 * @param[out] *pResult is output value.
<> 144:ef7eb2e8f9f7 6272 * @return none.
<> 144:ef7eb2e8f9f7 6273 */
<> 144:ef7eb2e8f9f7 6274
<> 144:ef7eb2e8f9f7 6275 void arm_power_q7(
<> 144:ef7eb2e8f9f7 6276 q7_t * pSrc,
<> 144:ef7eb2e8f9f7 6277 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6278 q31_t * pResult);
<> 144:ef7eb2e8f9f7 6279
<> 144:ef7eb2e8f9f7 6280 /**
<> 144:ef7eb2e8f9f7 6281 * @brief Mean value of a Q7 vector.
<> 144:ef7eb2e8f9f7 6282 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6283 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6284 * @param[out] *pResult is output value.
<> 144:ef7eb2e8f9f7 6285 * @return none.
<> 144:ef7eb2e8f9f7 6286 */
<> 144:ef7eb2e8f9f7 6287
<> 144:ef7eb2e8f9f7 6288 void arm_mean_q7(
<> 144:ef7eb2e8f9f7 6289 q7_t * pSrc,
<> 144:ef7eb2e8f9f7 6290 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6291 q7_t * pResult);
<> 144:ef7eb2e8f9f7 6292
<> 144:ef7eb2e8f9f7 6293 /**
<> 144:ef7eb2e8f9f7 6294 * @brief Mean value of a Q15 vector.
<> 144:ef7eb2e8f9f7 6295 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6296 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6297 * @param[out] *pResult is output value.
<> 144:ef7eb2e8f9f7 6298 * @return none.
<> 144:ef7eb2e8f9f7 6299 */
<> 144:ef7eb2e8f9f7 6300 void arm_mean_q15(
<> 144:ef7eb2e8f9f7 6301 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 6302 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6303 q15_t * pResult);
<> 144:ef7eb2e8f9f7 6304
<> 144:ef7eb2e8f9f7 6305 /**
<> 144:ef7eb2e8f9f7 6306 * @brief Mean value of a Q31 vector.
<> 144:ef7eb2e8f9f7 6307 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6308 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6309 * @param[out] *pResult is output value.
<> 144:ef7eb2e8f9f7 6310 * @return none.
<> 144:ef7eb2e8f9f7 6311 */
<> 144:ef7eb2e8f9f7 6312 void arm_mean_q31(
<> 144:ef7eb2e8f9f7 6313 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 6314 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6315 q31_t * pResult);
<> 144:ef7eb2e8f9f7 6316
<> 144:ef7eb2e8f9f7 6317 /**
<> 144:ef7eb2e8f9f7 6318 * @brief Mean value of a floating-point vector.
<> 144:ef7eb2e8f9f7 6319 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6320 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6321 * @param[out] *pResult is output value.
<> 144:ef7eb2e8f9f7 6322 * @return none.
<> 144:ef7eb2e8f9f7 6323 */
<> 144:ef7eb2e8f9f7 6324 void arm_mean_f32(
<> 144:ef7eb2e8f9f7 6325 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 6326 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6327 float32_t * pResult);
<> 144:ef7eb2e8f9f7 6328
<> 144:ef7eb2e8f9f7 6329 /**
<> 144:ef7eb2e8f9f7 6330 * @brief Variance of the elements of a floating-point vector.
<> 144:ef7eb2e8f9f7 6331 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6332 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6333 * @param[out] *pResult is output value.
<> 144:ef7eb2e8f9f7 6334 * @return none.
<> 144:ef7eb2e8f9f7 6335 */
<> 144:ef7eb2e8f9f7 6336
<> 144:ef7eb2e8f9f7 6337 void arm_var_f32(
<> 144:ef7eb2e8f9f7 6338 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 6339 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6340 float32_t * pResult);
<> 144:ef7eb2e8f9f7 6341
<> 144:ef7eb2e8f9f7 6342 /**
<> 144:ef7eb2e8f9f7 6343 * @brief Variance of the elements of a Q31 vector.
<> 144:ef7eb2e8f9f7 6344 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6345 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6346 * @param[out] *pResult is output value.
<> 144:ef7eb2e8f9f7 6347 * @return none.
<> 144:ef7eb2e8f9f7 6348 */
<> 144:ef7eb2e8f9f7 6349
<> 144:ef7eb2e8f9f7 6350 void arm_var_q31(
<> 144:ef7eb2e8f9f7 6351 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 6352 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6353 q63_t * pResult);
<> 144:ef7eb2e8f9f7 6354
<> 144:ef7eb2e8f9f7 6355 /**
<> 144:ef7eb2e8f9f7 6356 * @brief Variance of the elements of a Q15 vector.
<> 144:ef7eb2e8f9f7 6357 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6358 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6359 * @param[out] *pResult is output value.
<> 144:ef7eb2e8f9f7 6360 * @return none.
<> 144:ef7eb2e8f9f7 6361 */
<> 144:ef7eb2e8f9f7 6362
<> 144:ef7eb2e8f9f7 6363 void arm_var_q15(
<> 144:ef7eb2e8f9f7 6364 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 6365 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6366 q31_t * pResult);
<> 144:ef7eb2e8f9f7 6367
<> 144:ef7eb2e8f9f7 6368 /**
<> 144:ef7eb2e8f9f7 6369 * @brief Root Mean Square of the elements of a floating-point vector.
<> 144:ef7eb2e8f9f7 6370 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6371 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6372 * @param[out] *pResult is output value.
<> 144:ef7eb2e8f9f7 6373 * @return none.
<> 144:ef7eb2e8f9f7 6374 */
<> 144:ef7eb2e8f9f7 6375
<> 144:ef7eb2e8f9f7 6376 void arm_rms_f32(
<> 144:ef7eb2e8f9f7 6377 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 6378 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6379 float32_t * pResult);
<> 144:ef7eb2e8f9f7 6380
<> 144:ef7eb2e8f9f7 6381 /**
<> 144:ef7eb2e8f9f7 6382 * @brief Root Mean Square of the elements of a Q31 vector.
<> 144:ef7eb2e8f9f7 6383 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6384 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6385 * @param[out] *pResult is output value.
<> 144:ef7eb2e8f9f7 6386 * @return none.
<> 144:ef7eb2e8f9f7 6387 */
<> 144:ef7eb2e8f9f7 6388
<> 144:ef7eb2e8f9f7 6389 void arm_rms_q31(
<> 144:ef7eb2e8f9f7 6390 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 6391 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6392 q31_t * pResult);
<> 144:ef7eb2e8f9f7 6393
<> 144:ef7eb2e8f9f7 6394 /**
<> 144:ef7eb2e8f9f7 6395 * @brief Root Mean Square of the elements of a Q15 vector.
<> 144:ef7eb2e8f9f7 6396 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6397 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6398 * @param[out] *pResult is output value.
<> 144:ef7eb2e8f9f7 6399 * @return none.
<> 144:ef7eb2e8f9f7 6400 */
<> 144:ef7eb2e8f9f7 6401
<> 144:ef7eb2e8f9f7 6402 void arm_rms_q15(
<> 144:ef7eb2e8f9f7 6403 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 6404 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6405 q15_t * pResult);
<> 144:ef7eb2e8f9f7 6406
<> 144:ef7eb2e8f9f7 6407 /**
<> 144:ef7eb2e8f9f7 6408 * @brief Standard deviation of the elements of a floating-point vector.
<> 144:ef7eb2e8f9f7 6409 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6410 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6411 * @param[out] *pResult is output value.
<> 144:ef7eb2e8f9f7 6412 * @return none.
<> 144:ef7eb2e8f9f7 6413 */
<> 144:ef7eb2e8f9f7 6414
<> 144:ef7eb2e8f9f7 6415 void arm_std_f32(
<> 144:ef7eb2e8f9f7 6416 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 6417 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6418 float32_t * pResult);
<> 144:ef7eb2e8f9f7 6419
<> 144:ef7eb2e8f9f7 6420 /**
<> 144:ef7eb2e8f9f7 6421 * @brief Standard deviation of the elements of a Q31 vector.
<> 144:ef7eb2e8f9f7 6422 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6423 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6424 * @param[out] *pResult is output value.
<> 144:ef7eb2e8f9f7 6425 * @return none.
<> 144:ef7eb2e8f9f7 6426 */
<> 144:ef7eb2e8f9f7 6427
<> 144:ef7eb2e8f9f7 6428 void arm_std_q31(
<> 144:ef7eb2e8f9f7 6429 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 6430 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6431 q31_t * pResult);
<> 144:ef7eb2e8f9f7 6432
<> 144:ef7eb2e8f9f7 6433 /**
<> 144:ef7eb2e8f9f7 6434 * @brief Standard deviation of the elements of a Q15 vector.
<> 144:ef7eb2e8f9f7 6435 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6436 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6437 * @param[out] *pResult is output value.
<> 144:ef7eb2e8f9f7 6438 * @return none.
<> 144:ef7eb2e8f9f7 6439 */
<> 144:ef7eb2e8f9f7 6440
<> 144:ef7eb2e8f9f7 6441 void arm_std_q15(
<> 144:ef7eb2e8f9f7 6442 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 6443 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6444 q15_t * pResult);
<> 144:ef7eb2e8f9f7 6445
<> 144:ef7eb2e8f9f7 6446 /**
<> 144:ef7eb2e8f9f7 6447 * @brief Floating-point complex magnitude
<> 144:ef7eb2e8f9f7 6448 * @param[in] *pSrc points to the complex input vector
<> 144:ef7eb2e8f9f7 6449 * @param[out] *pDst points to the real output vector
<> 144:ef7eb2e8f9f7 6450 * @param[in] numSamples number of complex samples in the input vector
<> 144:ef7eb2e8f9f7 6451 * @return none.
<> 144:ef7eb2e8f9f7 6452 */
<> 144:ef7eb2e8f9f7 6453
<> 144:ef7eb2e8f9f7 6454 void arm_cmplx_mag_f32(
<> 144:ef7eb2e8f9f7 6455 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 6456 float32_t * pDst,
<> 144:ef7eb2e8f9f7 6457 uint32_t numSamples);
<> 144:ef7eb2e8f9f7 6458
<> 144:ef7eb2e8f9f7 6459 /**
<> 144:ef7eb2e8f9f7 6460 * @brief Q31 complex magnitude
<> 144:ef7eb2e8f9f7 6461 * @param[in] *pSrc points to the complex input vector
<> 144:ef7eb2e8f9f7 6462 * @param[out] *pDst points to the real output vector
<> 144:ef7eb2e8f9f7 6463 * @param[in] numSamples number of complex samples in the input vector
<> 144:ef7eb2e8f9f7 6464 * @return none.
<> 144:ef7eb2e8f9f7 6465 */
<> 144:ef7eb2e8f9f7 6466
<> 144:ef7eb2e8f9f7 6467 void arm_cmplx_mag_q31(
<> 144:ef7eb2e8f9f7 6468 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 6469 q31_t * pDst,
<> 144:ef7eb2e8f9f7 6470 uint32_t numSamples);
<> 144:ef7eb2e8f9f7 6471
<> 144:ef7eb2e8f9f7 6472 /**
<> 144:ef7eb2e8f9f7 6473 * @brief Q15 complex magnitude
<> 144:ef7eb2e8f9f7 6474 * @param[in] *pSrc points to the complex input vector
<> 144:ef7eb2e8f9f7 6475 * @param[out] *pDst points to the real output vector
<> 144:ef7eb2e8f9f7 6476 * @param[in] numSamples number of complex samples in the input vector
<> 144:ef7eb2e8f9f7 6477 * @return none.
<> 144:ef7eb2e8f9f7 6478 */
<> 144:ef7eb2e8f9f7 6479
<> 144:ef7eb2e8f9f7 6480 void arm_cmplx_mag_q15(
<> 144:ef7eb2e8f9f7 6481 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 6482 q15_t * pDst,
<> 144:ef7eb2e8f9f7 6483 uint32_t numSamples);
<> 144:ef7eb2e8f9f7 6484
<> 144:ef7eb2e8f9f7 6485 /**
<> 144:ef7eb2e8f9f7 6486 * @brief Q15 complex dot product
<> 144:ef7eb2e8f9f7 6487 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 6488 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 6489 * @param[in] numSamples number of complex samples in each vector
<> 144:ef7eb2e8f9f7 6490 * @param[out] *realResult real part of the result returned here
<> 144:ef7eb2e8f9f7 6491 * @param[out] *imagResult imaginary part of the result returned here
<> 144:ef7eb2e8f9f7 6492 * @return none.
<> 144:ef7eb2e8f9f7 6493 */
<> 144:ef7eb2e8f9f7 6494
<> 144:ef7eb2e8f9f7 6495 void arm_cmplx_dot_prod_q15(
<> 144:ef7eb2e8f9f7 6496 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 6497 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 6498 uint32_t numSamples,
<> 144:ef7eb2e8f9f7 6499 q31_t * realResult,
<> 144:ef7eb2e8f9f7 6500 q31_t * imagResult);
<> 144:ef7eb2e8f9f7 6501
<> 144:ef7eb2e8f9f7 6502 /**
<> 144:ef7eb2e8f9f7 6503 * @brief Q31 complex dot product
<> 144:ef7eb2e8f9f7 6504 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 6505 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 6506 * @param[in] numSamples number of complex samples in each vector
<> 144:ef7eb2e8f9f7 6507 * @param[out] *realResult real part of the result returned here
<> 144:ef7eb2e8f9f7 6508 * @param[out] *imagResult imaginary part of the result returned here
<> 144:ef7eb2e8f9f7 6509 * @return none.
<> 144:ef7eb2e8f9f7 6510 */
<> 144:ef7eb2e8f9f7 6511
<> 144:ef7eb2e8f9f7 6512 void arm_cmplx_dot_prod_q31(
<> 144:ef7eb2e8f9f7 6513 q31_t * pSrcA,
<> 144:ef7eb2e8f9f7 6514 q31_t * pSrcB,
<> 144:ef7eb2e8f9f7 6515 uint32_t numSamples,
<> 144:ef7eb2e8f9f7 6516 q63_t * realResult,
<> 144:ef7eb2e8f9f7 6517 q63_t * imagResult);
<> 144:ef7eb2e8f9f7 6518
<> 144:ef7eb2e8f9f7 6519 /**
<> 144:ef7eb2e8f9f7 6520 * @brief Floating-point complex dot product
<> 144:ef7eb2e8f9f7 6521 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 6522 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 6523 * @param[in] numSamples number of complex samples in each vector
<> 144:ef7eb2e8f9f7 6524 * @param[out] *realResult real part of the result returned here
<> 144:ef7eb2e8f9f7 6525 * @param[out] *imagResult imaginary part of the result returned here
<> 144:ef7eb2e8f9f7 6526 * @return none.
<> 144:ef7eb2e8f9f7 6527 */
<> 144:ef7eb2e8f9f7 6528
<> 144:ef7eb2e8f9f7 6529 void arm_cmplx_dot_prod_f32(
<> 144:ef7eb2e8f9f7 6530 float32_t * pSrcA,
<> 144:ef7eb2e8f9f7 6531 float32_t * pSrcB,
<> 144:ef7eb2e8f9f7 6532 uint32_t numSamples,
<> 144:ef7eb2e8f9f7 6533 float32_t * realResult,
<> 144:ef7eb2e8f9f7 6534 float32_t * imagResult);
<> 144:ef7eb2e8f9f7 6535
<> 144:ef7eb2e8f9f7 6536 /**
<> 144:ef7eb2e8f9f7 6537 * @brief Q15 complex-by-real multiplication
<> 144:ef7eb2e8f9f7 6538 * @param[in] *pSrcCmplx points to the complex input vector
<> 144:ef7eb2e8f9f7 6539 * @param[in] *pSrcReal points to the real input vector
<> 144:ef7eb2e8f9f7 6540 * @param[out] *pCmplxDst points to the complex output vector
<> 144:ef7eb2e8f9f7 6541 * @param[in] numSamples number of samples in each vector
<> 144:ef7eb2e8f9f7 6542 * @return none.
<> 144:ef7eb2e8f9f7 6543 */
<> 144:ef7eb2e8f9f7 6544
<> 144:ef7eb2e8f9f7 6545 void arm_cmplx_mult_real_q15(
<> 144:ef7eb2e8f9f7 6546 q15_t * pSrcCmplx,
<> 144:ef7eb2e8f9f7 6547 q15_t * pSrcReal,
<> 144:ef7eb2e8f9f7 6548 q15_t * pCmplxDst,
<> 144:ef7eb2e8f9f7 6549 uint32_t numSamples);
<> 144:ef7eb2e8f9f7 6550
<> 144:ef7eb2e8f9f7 6551 /**
<> 144:ef7eb2e8f9f7 6552 * @brief Q31 complex-by-real multiplication
<> 144:ef7eb2e8f9f7 6553 * @param[in] *pSrcCmplx points to the complex input vector
<> 144:ef7eb2e8f9f7 6554 * @param[in] *pSrcReal points to the real input vector
<> 144:ef7eb2e8f9f7 6555 * @param[out] *pCmplxDst points to the complex output vector
<> 144:ef7eb2e8f9f7 6556 * @param[in] numSamples number of samples in each vector
<> 144:ef7eb2e8f9f7 6557 * @return none.
<> 144:ef7eb2e8f9f7 6558 */
<> 144:ef7eb2e8f9f7 6559
<> 144:ef7eb2e8f9f7 6560 void arm_cmplx_mult_real_q31(
<> 144:ef7eb2e8f9f7 6561 q31_t * pSrcCmplx,
<> 144:ef7eb2e8f9f7 6562 q31_t * pSrcReal,
<> 144:ef7eb2e8f9f7 6563 q31_t * pCmplxDst,
<> 144:ef7eb2e8f9f7 6564 uint32_t numSamples);
<> 144:ef7eb2e8f9f7 6565
<> 144:ef7eb2e8f9f7 6566 /**
<> 144:ef7eb2e8f9f7 6567 * @brief Floating-point complex-by-real multiplication
<> 144:ef7eb2e8f9f7 6568 * @param[in] *pSrcCmplx points to the complex input vector
<> 144:ef7eb2e8f9f7 6569 * @param[in] *pSrcReal points to the real input vector
<> 144:ef7eb2e8f9f7 6570 * @param[out] *pCmplxDst points to the complex output vector
<> 144:ef7eb2e8f9f7 6571 * @param[in] numSamples number of samples in each vector
<> 144:ef7eb2e8f9f7 6572 * @return none.
<> 144:ef7eb2e8f9f7 6573 */
<> 144:ef7eb2e8f9f7 6574
<> 144:ef7eb2e8f9f7 6575 void arm_cmplx_mult_real_f32(
<> 144:ef7eb2e8f9f7 6576 float32_t * pSrcCmplx,
<> 144:ef7eb2e8f9f7 6577 float32_t * pSrcReal,
<> 144:ef7eb2e8f9f7 6578 float32_t * pCmplxDst,
<> 144:ef7eb2e8f9f7 6579 uint32_t numSamples);
<> 144:ef7eb2e8f9f7 6580
<> 144:ef7eb2e8f9f7 6581 /**
<> 144:ef7eb2e8f9f7 6582 * @brief Minimum value of a Q7 vector.
<> 144:ef7eb2e8f9f7 6583 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6584 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6585 * @param[out] *result is output pointer
<> 144:ef7eb2e8f9f7 6586 * @param[in] index is the array index of the minimum value in the input buffer.
<> 144:ef7eb2e8f9f7 6587 * @return none.
<> 144:ef7eb2e8f9f7 6588 */
<> 144:ef7eb2e8f9f7 6589
<> 144:ef7eb2e8f9f7 6590 void arm_min_q7(
<> 144:ef7eb2e8f9f7 6591 q7_t * pSrc,
<> 144:ef7eb2e8f9f7 6592 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6593 q7_t * result,
<> 144:ef7eb2e8f9f7 6594 uint32_t * index);
<> 144:ef7eb2e8f9f7 6595
<> 144:ef7eb2e8f9f7 6596 /**
<> 144:ef7eb2e8f9f7 6597 * @brief Minimum value of a Q15 vector.
<> 144:ef7eb2e8f9f7 6598 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6599 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6600 * @param[out] *pResult is output pointer
<> 144:ef7eb2e8f9f7 6601 * @param[in] *pIndex is the array index of the minimum value in the input buffer.
<> 144:ef7eb2e8f9f7 6602 * @return none.
<> 144:ef7eb2e8f9f7 6603 */
<> 144:ef7eb2e8f9f7 6604
<> 144:ef7eb2e8f9f7 6605 void arm_min_q15(
<> 144:ef7eb2e8f9f7 6606 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 6607 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6608 q15_t * pResult,
<> 144:ef7eb2e8f9f7 6609 uint32_t * pIndex);
<> 144:ef7eb2e8f9f7 6610
<> 144:ef7eb2e8f9f7 6611 /**
<> 144:ef7eb2e8f9f7 6612 * @brief Minimum value of a Q31 vector.
<> 144:ef7eb2e8f9f7 6613 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6614 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6615 * @param[out] *pResult is output pointer
<> 144:ef7eb2e8f9f7 6616 * @param[out] *pIndex is the array index of the minimum value in the input buffer.
<> 144:ef7eb2e8f9f7 6617 * @return none.
<> 144:ef7eb2e8f9f7 6618 */
<> 144:ef7eb2e8f9f7 6619 void arm_min_q31(
<> 144:ef7eb2e8f9f7 6620 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 6621 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6622 q31_t * pResult,
<> 144:ef7eb2e8f9f7 6623 uint32_t * pIndex);
<> 144:ef7eb2e8f9f7 6624
<> 144:ef7eb2e8f9f7 6625 /**
<> 144:ef7eb2e8f9f7 6626 * @brief Minimum value of a floating-point vector.
<> 144:ef7eb2e8f9f7 6627 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6628 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6629 * @param[out] *pResult is output pointer
<> 144:ef7eb2e8f9f7 6630 * @param[out] *pIndex is the array index of the minimum value in the input buffer.
<> 144:ef7eb2e8f9f7 6631 * @return none.
<> 144:ef7eb2e8f9f7 6632 */
<> 144:ef7eb2e8f9f7 6633
<> 144:ef7eb2e8f9f7 6634 void arm_min_f32(
<> 144:ef7eb2e8f9f7 6635 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 6636 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6637 float32_t * pResult,
<> 144:ef7eb2e8f9f7 6638 uint32_t * pIndex);
<> 144:ef7eb2e8f9f7 6639
<> 144:ef7eb2e8f9f7 6640 /**
<> 144:ef7eb2e8f9f7 6641 * @brief Maximum value of a Q7 vector.
<> 144:ef7eb2e8f9f7 6642 * @param[in] *pSrc points to the input buffer
<> 144:ef7eb2e8f9f7 6643 * @param[in] blockSize length of the input vector
<> 144:ef7eb2e8f9f7 6644 * @param[out] *pResult maximum value returned here
<> 144:ef7eb2e8f9f7 6645 * @param[out] *pIndex index of maximum value returned here
<> 144:ef7eb2e8f9f7 6646 * @return none.
<> 144:ef7eb2e8f9f7 6647 */
<> 144:ef7eb2e8f9f7 6648
<> 144:ef7eb2e8f9f7 6649 void arm_max_q7(
<> 144:ef7eb2e8f9f7 6650 q7_t * pSrc,
<> 144:ef7eb2e8f9f7 6651 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6652 q7_t * pResult,
<> 144:ef7eb2e8f9f7 6653 uint32_t * pIndex);
<> 144:ef7eb2e8f9f7 6654
<> 144:ef7eb2e8f9f7 6655 /**
<> 144:ef7eb2e8f9f7 6656 * @brief Maximum value of a Q15 vector.
<> 144:ef7eb2e8f9f7 6657 * @param[in] *pSrc points to the input buffer
<> 144:ef7eb2e8f9f7 6658 * @param[in] blockSize length of the input vector
<> 144:ef7eb2e8f9f7 6659 * @param[out] *pResult maximum value returned here
<> 144:ef7eb2e8f9f7 6660 * @param[out] *pIndex index of maximum value returned here
<> 144:ef7eb2e8f9f7 6661 * @return none.
<> 144:ef7eb2e8f9f7 6662 */
<> 144:ef7eb2e8f9f7 6663
<> 144:ef7eb2e8f9f7 6664 void arm_max_q15(
<> 144:ef7eb2e8f9f7 6665 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 6666 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6667 q15_t * pResult,
<> 144:ef7eb2e8f9f7 6668 uint32_t * pIndex);
<> 144:ef7eb2e8f9f7 6669
<> 144:ef7eb2e8f9f7 6670 /**
<> 144:ef7eb2e8f9f7 6671 * @brief Maximum value of a Q31 vector.
<> 144:ef7eb2e8f9f7 6672 * @param[in] *pSrc points to the input buffer
<> 144:ef7eb2e8f9f7 6673 * @param[in] blockSize length of the input vector
<> 144:ef7eb2e8f9f7 6674 * @param[out] *pResult maximum value returned here
<> 144:ef7eb2e8f9f7 6675 * @param[out] *pIndex index of maximum value returned here
<> 144:ef7eb2e8f9f7 6676 * @return none.
<> 144:ef7eb2e8f9f7 6677 */
<> 144:ef7eb2e8f9f7 6678
<> 144:ef7eb2e8f9f7 6679 void arm_max_q31(
<> 144:ef7eb2e8f9f7 6680 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 6681 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6682 q31_t * pResult,
<> 144:ef7eb2e8f9f7 6683 uint32_t * pIndex);
<> 144:ef7eb2e8f9f7 6684
<> 144:ef7eb2e8f9f7 6685 /**
<> 144:ef7eb2e8f9f7 6686 * @brief Maximum value of a floating-point vector.
<> 144:ef7eb2e8f9f7 6687 * @param[in] *pSrc points to the input buffer
<> 144:ef7eb2e8f9f7 6688 * @param[in] blockSize length of the input vector
<> 144:ef7eb2e8f9f7 6689 * @param[out] *pResult maximum value returned here
<> 144:ef7eb2e8f9f7 6690 * @param[out] *pIndex index of maximum value returned here
<> 144:ef7eb2e8f9f7 6691 * @return none.
<> 144:ef7eb2e8f9f7 6692 */
<> 144:ef7eb2e8f9f7 6693
<> 144:ef7eb2e8f9f7 6694 void arm_max_f32(
<> 144:ef7eb2e8f9f7 6695 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 6696 uint32_t blockSize,
<> 144:ef7eb2e8f9f7 6697 float32_t * pResult,
<> 144:ef7eb2e8f9f7 6698 uint32_t * pIndex);
<> 144:ef7eb2e8f9f7 6699
<> 144:ef7eb2e8f9f7 6700 /**
<> 144:ef7eb2e8f9f7 6701 * @brief Q15 complex-by-complex multiplication
<> 144:ef7eb2e8f9f7 6702 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 6703 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 6704 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 6705 * @param[in] numSamples number of complex samples in each vector
<> 144:ef7eb2e8f9f7 6706 * @return none.
<> 144:ef7eb2e8f9f7 6707 */
<> 144:ef7eb2e8f9f7 6708
<> 144:ef7eb2e8f9f7 6709 void arm_cmplx_mult_cmplx_q15(
<> 144:ef7eb2e8f9f7 6710 q15_t * pSrcA,
<> 144:ef7eb2e8f9f7 6711 q15_t * pSrcB,
<> 144:ef7eb2e8f9f7 6712 q15_t * pDst,
<> 144:ef7eb2e8f9f7 6713 uint32_t numSamples);
<> 144:ef7eb2e8f9f7 6714
<> 144:ef7eb2e8f9f7 6715 /**
<> 144:ef7eb2e8f9f7 6716 * @brief Q31 complex-by-complex multiplication
<> 144:ef7eb2e8f9f7 6717 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 6718 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 6719 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 6720 * @param[in] numSamples number of complex samples in each vector
<> 144:ef7eb2e8f9f7 6721 * @return none.
<> 144:ef7eb2e8f9f7 6722 */
<> 144:ef7eb2e8f9f7 6723
<> 144:ef7eb2e8f9f7 6724 void arm_cmplx_mult_cmplx_q31(
<> 144:ef7eb2e8f9f7 6725 q31_t * pSrcA,
<> 144:ef7eb2e8f9f7 6726 q31_t * pSrcB,
<> 144:ef7eb2e8f9f7 6727 q31_t * pDst,
<> 144:ef7eb2e8f9f7 6728 uint32_t numSamples);
<> 144:ef7eb2e8f9f7 6729
<> 144:ef7eb2e8f9f7 6730 /**
<> 144:ef7eb2e8f9f7 6731 * @brief Floating-point complex-by-complex multiplication
<> 144:ef7eb2e8f9f7 6732 * @param[in] *pSrcA points to the first input vector
<> 144:ef7eb2e8f9f7 6733 * @param[in] *pSrcB points to the second input vector
<> 144:ef7eb2e8f9f7 6734 * @param[out] *pDst points to the output vector
<> 144:ef7eb2e8f9f7 6735 * @param[in] numSamples number of complex samples in each vector
<> 144:ef7eb2e8f9f7 6736 * @return none.
<> 144:ef7eb2e8f9f7 6737 */
<> 144:ef7eb2e8f9f7 6738
<> 144:ef7eb2e8f9f7 6739 void arm_cmplx_mult_cmplx_f32(
<> 144:ef7eb2e8f9f7 6740 float32_t * pSrcA,
<> 144:ef7eb2e8f9f7 6741 float32_t * pSrcB,
<> 144:ef7eb2e8f9f7 6742 float32_t * pDst,
<> 144:ef7eb2e8f9f7 6743 uint32_t numSamples);
<> 144:ef7eb2e8f9f7 6744
<> 144:ef7eb2e8f9f7 6745 /**
<> 144:ef7eb2e8f9f7 6746 * @brief Converts the elements of the floating-point vector to Q31 vector.
<> 144:ef7eb2e8f9f7 6747 * @param[in] *pSrc points to the floating-point input vector
<> 144:ef7eb2e8f9f7 6748 * @param[out] *pDst points to the Q31 output vector
<> 144:ef7eb2e8f9f7 6749 * @param[in] blockSize length of the input vector
<> 144:ef7eb2e8f9f7 6750 * @return none.
<> 144:ef7eb2e8f9f7 6751 */
<> 144:ef7eb2e8f9f7 6752 void arm_float_to_q31(
<> 144:ef7eb2e8f9f7 6753 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 6754 q31_t * pDst,
<> 144:ef7eb2e8f9f7 6755 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 6756
<> 144:ef7eb2e8f9f7 6757 /**
<> 144:ef7eb2e8f9f7 6758 * @brief Converts the elements of the floating-point vector to Q15 vector.
<> 144:ef7eb2e8f9f7 6759 * @param[in] *pSrc points to the floating-point input vector
<> 144:ef7eb2e8f9f7 6760 * @param[out] *pDst points to the Q15 output vector
<> 144:ef7eb2e8f9f7 6761 * @param[in] blockSize length of the input vector
<> 144:ef7eb2e8f9f7 6762 * @return none
<> 144:ef7eb2e8f9f7 6763 */
<> 144:ef7eb2e8f9f7 6764 void arm_float_to_q15(
<> 144:ef7eb2e8f9f7 6765 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 6766 q15_t * pDst,
<> 144:ef7eb2e8f9f7 6767 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 6768
<> 144:ef7eb2e8f9f7 6769 /**
<> 144:ef7eb2e8f9f7 6770 * @brief Converts the elements of the floating-point vector to Q7 vector.
<> 144:ef7eb2e8f9f7 6771 * @param[in] *pSrc points to the floating-point input vector
<> 144:ef7eb2e8f9f7 6772 * @param[out] *pDst points to the Q7 output vector
<> 144:ef7eb2e8f9f7 6773 * @param[in] blockSize length of the input vector
<> 144:ef7eb2e8f9f7 6774 * @return none
<> 144:ef7eb2e8f9f7 6775 */
<> 144:ef7eb2e8f9f7 6776 void arm_float_to_q7(
<> 144:ef7eb2e8f9f7 6777 float32_t * pSrc,
<> 144:ef7eb2e8f9f7 6778 q7_t * pDst,
<> 144:ef7eb2e8f9f7 6779 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 6780
<> 144:ef7eb2e8f9f7 6781
<> 144:ef7eb2e8f9f7 6782 /**
<> 144:ef7eb2e8f9f7 6783 * @brief Converts the elements of the Q31 vector to Q15 vector.
<> 144:ef7eb2e8f9f7 6784 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6785 * @param[out] *pDst is output pointer
<> 144:ef7eb2e8f9f7 6786 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6787 * @return none.
<> 144:ef7eb2e8f9f7 6788 */
<> 144:ef7eb2e8f9f7 6789 void arm_q31_to_q15(
<> 144:ef7eb2e8f9f7 6790 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 6791 q15_t * pDst,
<> 144:ef7eb2e8f9f7 6792 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 6793
<> 144:ef7eb2e8f9f7 6794 /**
<> 144:ef7eb2e8f9f7 6795 * @brief Converts the elements of the Q31 vector to Q7 vector.
<> 144:ef7eb2e8f9f7 6796 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6797 * @param[out] *pDst is output pointer
<> 144:ef7eb2e8f9f7 6798 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6799 * @return none.
<> 144:ef7eb2e8f9f7 6800 */
<> 144:ef7eb2e8f9f7 6801 void arm_q31_to_q7(
<> 144:ef7eb2e8f9f7 6802 q31_t * pSrc,
<> 144:ef7eb2e8f9f7 6803 q7_t * pDst,
<> 144:ef7eb2e8f9f7 6804 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 6805
<> 144:ef7eb2e8f9f7 6806 /**
<> 144:ef7eb2e8f9f7 6807 * @brief Converts the elements of the Q15 vector to floating-point vector.
<> 144:ef7eb2e8f9f7 6808 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6809 * @param[out] *pDst is output pointer
<> 144:ef7eb2e8f9f7 6810 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6811 * @return none.
<> 144:ef7eb2e8f9f7 6812 */
<> 144:ef7eb2e8f9f7 6813 void arm_q15_to_float(
<> 144:ef7eb2e8f9f7 6814 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 6815 float32_t * pDst,
<> 144:ef7eb2e8f9f7 6816 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 6817
<> 144:ef7eb2e8f9f7 6818
<> 144:ef7eb2e8f9f7 6819 /**
<> 144:ef7eb2e8f9f7 6820 * @brief Converts the elements of the Q15 vector to Q31 vector.
<> 144:ef7eb2e8f9f7 6821 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6822 * @param[out] *pDst is output pointer
<> 144:ef7eb2e8f9f7 6823 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6824 * @return none.
<> 144:ef7eb2e8f9f7 6825 */
<> 144:ef7eb2e8f9f7 6826 void arm_q15_to_q31(
<> 144:ef7eb2e8f9f7 6827 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 6828 q31_t * pDst,
<> 144:ef7eb2e8f9f7 6829 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 6830
<> 144:ef7eb2e8f9f7 6831
<> 144:ef7eb2e8f9f7 6832 /**
<> 144:ef7eb2e8f9f7 6833 * @brief Converts the elements of the Q15 vector to Q7 vector.
<> 144:ef7eb2e8f9f7 6834 * @param[in] *pSrc is input pointer
<> 144:ef7eb2e8f9f7 6835 * @param[out] *pDst is output pointer
<> 144:ef7eb2e8f9f7 6836 * @param[in] blockSize is the number of samples to process
<> 144:ef7eb2e8f9f7 6837 * @return none.
<> 144:ef7eb2e8f9f7 6838 */
<> 144:ef7eb2e8f9f7 6839 void arm_q15_to_q7(
<> 144:ef7eb2e8f9f7 6840 q15_t * pSrc,
<> 144:ef7eb2e8f9f7 6841 q7_t * pDst,
<> 144:ef7eb2e8f9f7 6842 uint32_t blockSize);
<> 144:ef7eb2e8f9f7 6843
<> 144:ef7eb2e8f9f7 6844
<> 144:ef7eb2e8f9f7 6845 /**
<> 144:ef7eb2e8f9f7 6846 * @ingroup groupInterpolation
<> 144:ef7eb2e8f9f7 6847 */
<> 144:ef7eb2e8f9f7 6848
<> 144:ef7eb2e8f9f7 6849 /**
<> 144:ef7eb2e8f9f7 6850 * @defgroup BilinearInterpolate Bilinear Interpolation
<> 144:ef7eb2e8f9f7 6851 *
<> 144:ef7eb2e8f9f7 6852 * Bilinear interpolation is an extension of linear interpolation applied to a two dimensional grid.
<> 144:ef7eb2e8f9f7 6853 * The underlying function <code>f(x, y)</code> is sampled on a regular grid and the interpolation process
<> 144:ef7eb2e8f9f7 6854 * determines values between the grid points.
<> 144:ef7eb2e8f9f7 6855 * Bilinear interpolation is equivalent to two step linear interpolation, first in the x-dimension and then in the y-dimension.
<> 144:ef7eb2e8f9f7 6856 * Bilinear interpolation is often used in image processing to rescale images.
<> 144:ef7eb2e8f9f7 6857 * The CMSIS DSP library provides bilinear interpolation functions for Q7, Q15, Q31, and floating-point data types.
<> 144:ef7eb2e8f9f7 6858 *
<> 144:ef7eb2e8f9f7 6859 * <b>Algorithm</b>
<> 144:ef7eb2e8f9f7 6860 * \par
<> 144:ef7eb2e8f9f7 6861 * The instance structure used by the bilinear interpolation functions describes a two dimensional data table.
<> 144:ef7eb2e8f9f7 6862 * For floating-point, the instance structure is defined as:
<> 144:ef7eb2e8f9f7 6863 * <pre>
<> 144:ef7eb2e8f9f7 6864 * typedef struct
<> 144:ef7eb2e8f9f7 6865 * {
<> 144:ef7eb2e8f9f7 6866 * uint16_t numRows;
<> 144:ef7eb2e8f9f7 6867 * uint16_t numCols;
<> 144:ef7eb2e8f9f7 6868 * float32_t *pData;
<> 144:ef7eb2e8f9f7 6869 * } arm_bilinear_interp_instance_f32;
<> 144:ef7eb2e8f9f7 6870 * </pre>
<> 144:ef7eb2e8f9f7 6871 *
<> 144:ef7eb2e8f9f7 6872 * \par
<> 144:ef7eb2e8f9f7 6873 * where <code>numRows</code> specifies the number of rows in the table;
<> 144:ef7eb2e8f9f7 6874 * <code>numCols</code> specifies the number of columns in the table;
<> 144:ef7eb2e8f9f7 6875 * and <code>pData</code> points to an array of size <code>numRows*numCols</code> values.
<> 144:ef7eb2e8f9f7 6876 * The data table <code>pTable</code> is organized in row order and the supplied data values fall on integer indexes.
<> 144:ef7eb2e8f9f7 6877 * That is, table element (x,y) is located at <code>pTable[x + y*numCols]</code> where x and y are integers.
<> 144:ef7eb2e8f9f7 6878 *
<> 144:ef7eb2e8f9f7 6879 * \par
<> 144:ef7eb2e8f9f7 6880 * Let <code>(x, y)</code> specify the desired interpolation point. Then define:
<> 144:ef7eb2e8f9f7 6881 * <pre>
<> 144:ef7eb2e8f9f7 6882 * XF = floor(x)
<> 144:ef7eb2e8f9f7 6883 * YF = floor(y)
<> 144:ef7eb2e8f9f7 6884 * </pre>
<> 144:ef7eb2e8f9f7 6885 * \par
<> 144:ef7eb2e8f9f7 6886 * The interpolated output point is computed as:
<> 144:ef7eb2e8f9f7 6887 * <pre>
<> 144:ef7eb2e8f9f7 6888 * f(x, y) = f(XF, YF) * (1-(x-XF)) * (1-(y-YF))
<> 144:ef7eb2e8f9f7 6889 * + f(XF+1, YF) * (x-XF)*(1-(y-YF))
<> 144:ef7eb2e8f9f7 6890 * + f(XF, YF+1) * (1-(x-XF))*(y-YF)
<> 144:ef7eb2e8f9f7 6891 * + f(XF+1, YF+1) * (x-XF)*(y-YF)
<> 144:ef7eb2e8f9f7 6892 * </pre>
<> 144:ef7eb2e8f9f7 6893 * Note that the coordinates (x, y) contain integer and fractional components.
<> 144:ef7eb2e8f9f7 6894 * The integer components specify which portion of the table to use while the
<> 144:ef7eb2e8f9f7 6895 * fractional components control the interpolation processor.
<> 144:ef7eb2e8f9f7 6896 *
<> 144:ef7eb2e8f9f7 6897 * \par
<> 144:ef7eb2e8f9f7 6898 * if (x,y) are outside of the table boundary, Bilinear interpolation returns zero output.
<> 144:ef7eb2e8f9f7 6899 */
<> 144:ef7eb2e8f9f7 6900
<> 144:ef7eb2e8f9f7 6901 /**
<> 144:ef7eb2e8f9f7 6902 * @addtogroup BilinearInterpolate
<> 144:ef7eb2e8f9f7 6903 * @{
<> 144:ef7eb2e8f9f7 6904 */
<> 144:ef7eb2e8f9f7 6905
<> 144:ef7eb2e8f9f7 6906 /**
<> 144:ef7eb2e8f9f7 6907 *
<> 144:ef7eb2e8f9f7 6908 * @brief Floating-point bilinear interpolation.
<> 144:ef7eb2e8f9f7 6909 * @param[in,out] *S points to an instance of the interpolation structure.
<> 144:ef7eb2e8f9f7 6910 * @param[in] X interpolation coordinate.
<> 144:ef7eb2e8f9f7 6911 * @param[in] Y interpolation coordinate.
<> 144:ef7eb2e8f9f7 6912 * @return out interpolated value.
<> 144:ef7eb2e8f9f7 6913 */
<> 144:ef7eb2e8f9f7 6914
<> 144:ef7eb2e8f9f7 6915
<> 144:ef7eb2e8f9f7 6916 static __INLINE float32_t arm_bilinear_interp_f32(
<> 144:ef7eb2e8f9f7 6917 const arm_bilinear_interp_instance_f32 * S,
<> 144:ef7eb2e8f9f7 6918 float32_t X,
<> 144:ef7eb2e8f9f7 6919 float32_t Y)
<> 144:ef7eb2e8f9f7 6920 {
<> 144:ef7eb2e8f9f7 6921 float32_t out;
<> 144:ef7eb2e8f9f7 6922 float32_t f00, f01, f10, f11;
<> 144:ef7eb2e8f9f7 6923 float32_t *pData = S->pData;
<> 144:ef7eb2e8f9f7 6924 int32_t xIndex, yIndex, index;
<> 144:ef7eb2e8f9f7 6925 float32_t xdiff, ydiff;
<> 144:ef7eb2e8f9f7 6926 float32_t b1, b2, b3, b4;
<> 144:ef7eb2e8f9f7 6927
<> 144:ef7eb2e8f9f7 6928 xIndex = (int32_t) X;
<> 144:ef7eb2e8f9f7 6929 yIndex = (int32_t) Y;
<> 144:ef7eb2e8f9f7 6930
<> 144:ef7eb2e8f9f7 6931 /* Care taken for table outside boundary */
<> 144:ef7eb2e8f9f7 6932 /* Returns zero output when values are outside table boundary */
<> 144:ef7eb2e8f9f7 6933 if(xIndex < 0 || xIndex > (S->numRows - 1) || yIndex < 0
<> 144:ef7eb2e8f9f7 6934 || yIndex > (S->numCols - 1))
<> 144:ef7eb2e8f9f7 6935 {
<> 144:ef7eb2e8f9f7 6936 return (0);
<> 144:ef7eb2e8f9f7 6937 }
<> 144:ef7eb2e8f9f7 6938
<> 144:ef7eb2e8f9f7 6939 /* Calculation of index for two nearest points in X-direction */
<> 144:ef7eb2e8f9f7 6940 index = (xIndex - 1) + (yIndex - 1) * S->numCols;
<> 144:ef7eb2e8f9f7 6941
<> 144:ef7eb2e8f9f7 6942
<> 144:ef7eb2e8f9f7 6943 /* Read two nearest points in X-direction */
<> 144:ef7eb2e8f9f7 6944 f00 = pData[index];
<> 144:ef7eb2e8f9f7 6945 f01 = pData[index + 1];
<> 144:ef7eb2e8f9f7 6946
<> 144:ef7eb2e8f9f7 6947 /* Calculation of index for two nearest points in Y-direction */
<> 144:ef7eb2e8f9f7 6948 index = (xIndex - 1) + (yIndex) * S->numCols;
<> 144:ef7eb2e8f9f7 6949
<> 144:ef7eb2e8f9f7 6950
<> 144:ef7eb2e8f9f7 6951 /* Read two nearest points in Y-direction */
<> 144:ef7eb2e8f9f7 6952 f10 = pData[index];
<> 144:ef7eb2e8f9f7 6953 f11 = pData[index + 1];
<> 144:ef7eb2e8f9f7 6954
<> 144:ef7eb2e8f9f7 6955 /* Calculation of intermediate values */
<> 144:ef7eb2e8f9f7 6956 b1 = f00;
<> 144:ef7eb2e8f9f7 6957 b2 = f01 - f00;
<> 144:ef7eb2e8f9f7 6958 b3 = f10 - f00;
<> 144:ef7eb2e8f9f7 6959 b4 = f00 - f01 - f10 + f11;
<> 144:ef7eb2e8f9f7 6960
<> 144:ef7eb2e8f9f7 6961 /* Calculation of fractional part in X */
<> 144:ef7eb2e8f9f7 6962 xdiff = X - xIndex;
<> 144:ef7eb2e8f9f7 6963
<> 144:ef7eb2e8f9f7 6964 /* Calculation of fractional part in Y */
<> 144:ef7eb2e8f9f7 6965 ydiff = Y - yIndex;
<> 144:ef7eb2e8f9f7 6966
<> 144:ef7eb2e8f9f7 6967 /* Calculation of bi-linear interpolated output */
<> 144:ef7eb2e8f9f7 6968 out = b1 + b2 * xdiff + b3 * ydiff + b4 * xdiff * ydiff;
<> 144:ef7eb2e8f9f7 6969
<> 144:ef7eb2e8f9f7 6970 /* return to application */
<> 144:ef7eb2e8f9f7 6971 return (out);
<> 144:ef7eb2e8f9f7 6972
<> 144:ef7eb2e8f9f7 6973 }
<> 144:ef7eb2e8f9f7 6974
<> 144:ef7eb2e8f9f7 6975 /**
<> 144:ef7eb2e8f9f7 6976 *
<> 144:ef7eb2e8f9f7 6977 * @brief Q31 bilinear interpolation.
<> 144:ef7eb2e8f9f7 6978 * @param[in,out] *S points to an instance of the interpolation structure.
<> 144:ef7eb2e8f9f7 6979 * @param[in] X interpolation coordinate in 12.20 format.
<> 144:ef7eb2e8f9f7 6980 * @param[in] Y interpolation coordinate in 12.20 format.
<> 144:ef7eb2e8f9f7 6981 * @return out interpolated value.
<> 144:ef7eb2e8f9f7 6982 */
<> 144:ef7eb2e8f9f7 6983
<> 144:ef7eb2e8f9f7 6984 static __INLINE q31_t arm_bilinear_interp_q31(
<> 144:ef7eb2e8f9f7 6985 arm_bilinear_interp_instance_q31 * S,
<> 144:ef7eb2e8f9f7 6986 q31_t X,
<> 144:ef7eb2e8f9f7 6987 q31_t Y)
<> 144:ef7eb2e8f9f7 6988 {
<> 144:ef7eb2e8f9f7 6989 q31_t out; /* Temporary output */
<> 144:ef7eb2e8f9f7 6990 q31_t acc = 0; /* output */
<> 144:ef7eb2e8f9f7 6991 q31_t xfract, yfract; /* X, Y fractional parts */
<> 144:ef7eb2e8f9f7 6992 q31_t x1, x2, y1, y2; /* Nearest output values */
<> 144:ef7eb2e8f9f7 6993 int32_t rI, cI; /* Row and column indices */
<> 144:ef7eb2e8f9f7 6994 q31_t *pYData = S->pData; /* pointer to output table values */
<> 144:ef7eb2e8f9f7 6995 uint32_t nCols = S->numCols; /* num of rows */
<> 144:ef7eb2e8f9f7 6996
<> 144:ef7eb2e8f9f7 6997
<> 144:ef7eb2e8f9f7 6998 /* Input is in 12.20 format */
<> 144:ef7eb2e8f9f7 6999 /* 12 bits for the table index */
<> 144:ef7eb2e8f9f7 7000 /* Index value calculation */
<> 144:ef7eb2e8f9f7 7001 rI = ((X & 0xFFF00000) >> 20u);
<> 144:ef7eb2e8f9f7 7002
<> 144:ef7eb2e8f9f7 7003 /* Input is in 12.20 format */
<> 144:ef7eb2e8f9f7 7004 /* 12 bits for the table index */
<> 144:ef7eb2e8f9f7 7005 /* Index value calculation */
<> 144:ef7eb2e8f9f7 7006 cI = ((Y & 0xFFF00000) >> 20u);
<> 144:ef7eb2e8f9f7 7007
<> 144:ef7eb2e8f9f7 7008 /* Care taken for table outside boundary */
<> 144:ef7eb2e8f9f7 7009 /* Returns zero output when values are outside table boundary */
<> 144:ef7eb2e8f9f7 7010 if(rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
<> 144:ef7eb2e8f9f7 7011 {
<> 144:ef7eb2e8f9f7 7012 return (0);
<> 144:ef7eb2e8f9f7 7013 }
<> 144:ef7eb2e8f9f7 7014
<> 144:ef7eb2e8f9f7 7015 /* 20 bits for the fractional part */
<> 144:ef7eb2e8f9f7 7016 /* shift left xfract by 11 to keep 1.31 format */
<> 144:ef7eb2e8f9f7 7017 xfract = (X & 0x000FFFFF) << 11u;
<> 144:ef7eb2e8f9f7 7018
<> 144:ef7eb2e8f9f7 7019 /* Read two nearest output values from the index */
<> 144:ef7eb2e8f9f7 7020 x1 = pYData[(rI) + nCols * (cI)];
<> 144:ef7eb2e8f9f7 7021 x2 = pYData[(rI) + nCols * (cI) + 1u];
<> 144:ef7eb2e8f9f7 7022
<> 144:ef7eb2e8f9f7 7023 /* 20 bits for the fractional part */
<> 144:ef7eb2e8f9f7 7024 /* shift left yfract by 11 to keep 1.31 format */
<> 144:ef7eb2e8f9f7 7025 yfract = (Y & 0x000FFFFF) << 11u;
<> 144:ef7eb2e8f9f7 7026
<> 144:ef7eb2e8f9f7 7027 /* Read two nearest output values from the index */
<> 144:ef7eb2e8f9f7 7028 y1 = pYData[(rI) + nCols * (cI + 1)];
<> 144:ef7eb2e8f9f7 7029 y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
<> 144:ef7eb2e8f9f7 7030
<> 144:ef7eb2e8f9f7 7031 /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 3.29(q29) format */
<> 144:ef7eb2e8f9f7 7032 out = ((q31_t) (((q63_t) x1 * (0x7FFFFFFF - xfract)) >> 32));
<> 144:ef7eb2e8f9f7 7033 acc = ((q31_t) (((q63_t) out * (0x7FFFFFFF - yfract)) >> 32));
<> 144:ef7eb2e8f9f7 7034
<> 144:ef7eb2e8f9f7 7035 /* x2 * (xfract) * (1-yfract) in 3.29(q29) and adding to acc */
<> 144:ef7eb2e8f9f7 7036 out = ((q31_t) ((q63_t) x2 * (0x7FFFFFFF - yfract) >> 32));
<> 144:ef7eb2e8f9f7 7037 acc += ((q31_t) ((q63_t) out * (xfract) >> 32));
<> 144:ef7eb2e8f9f7 7038
<> 144:ef7eb2e8f9f7 7039 /* y1 * (1 - xfract) * (yfract) in 3.29(q29) and adding to acc */
<> 144:ef7eb2e8f9f7 7040 out = ((q31_t) ((q63_t) y1 * (0x7FFFFFFF - xfract) >> 32));
<> 144:ef7eb2e8f9f7 7041 acc += ((q31_t) ((q63_t) out * (yfract) >> 32));
<> 144:ef7eb2e8f9f7 7042
<> 144:ef7eb2e8f9f7 7043 /* y2 * (xfract) * (yfract) in 3.29(q29) and adding to acc */
<> 144:ef7eb2e8f9f7 7044 out = ((q31_t) ((q63_t) y2 * (xfract) >> 32));
<> 144:ef7eb2e8f9f7 7045 acc += ((q31_t) ((q63_t) out * (yfract) >> 32));
<> 144:ef7eb2e8f9f7 7046
<> 144:ef7eb2e8f9f7 7047 /* Convert acc to 1.31(q31) format */
<> 144:ef7eb2e8f9f7 7048 return (acc << 2u);
<> 144:ef7eb2e8f9f7 7049
<> 144:ef7eb2e8f9f7 7050 }
<> 144:ef7eb2e8f9f7 7051
<> 144:ef7eb2e8f9f7 7052 /**
<> 144:ef7eb2e8f9f7 7053 * @brief Q15 bilinear interpolation.
<> 144:ef7eb2e8f9f7 7054 * @param[in,out] *S points to an instance of the interpolation structure.
<> 144:ef7eb2e8f9f7 7055 * @param[in] X interpolation coordinate in 12.20 format.
<> 144:ef7eb2e8f9f7 7056 * @param[in] Y interpolation coordinate in 12.20 format.
<> 144:ef7eb2e8f9f7 7057 * @return out interpolated value.
<> 144:ef7eb2e8f9f7 7058 */
<> 144:ef7eb2e8f9f7 7059
<> 144:ef7eb2e8f9f7 7060 static __INLINE q15_t arm_bilinear_interp_q15(
<> 144:ef7eb2e8f9f7 7061 arm_bilinear_interp_instance_q15 * S,
<> 144:ef7eb2e8f9f7 7062 q31_t X,
<> 144:ef7eb2e8f9f7 7063 q31_t Y)
<> 144:ef7eb2e8f9f7 7064 {
<> 144:ef7eb2e8f9f7 7065 q63_t acc = 0; /* output */
<> 144:ef7eb2e8f9f7 7066 q31_t out; /* Temporary output */
<> 144:ef7eb2e8f9f7 7067 q15_t x1, x2, y1, y2; /* Nearest output values */
<> 144:ef7eb2e8f9f7 7068 q31_t xfract, yfract; /* X, Y fractional parts */
<> 144:ef7eb2e8f9f7 7069 int32_t rI, cI; /* Row and column indices */
<> 144:ef7eb2e8f9f7 7070 q15_t *pYData = S->pData; /* pointer to output table values */
<> 144:ef7eb2e8f9f7 7071 uint32_t nCols = S->numCols; /* num of rows */
<> 144:ef7eb2e8f9f7 7072
<> 144:ef7eb2e8f9f7 7073 /* Input is in 12.20 format */
<> 144:ef7eb2e8f9f7 7074 /* 12 bits for the table index */
<> 144:ef7eb2e8f9f7 7075 /* Index value calculation */
<> 144:ef7eb2e8f9f7 7076 rI = ((X & 0xFFF00000) >> 20);
<> 144:ef7eb2e8f9f7 7077
<> 144:ef7eb2e8f9f7 7078 /* Input is in 12.20 format */
<> 144:ef7eb2e8f9f7 7079 /* 12 bits for the table index */
<> 144:ef7eb2e8f9f7 7080 /* Index value calculation */
<> 144:ef7eb2e8f9f7 7081 cI = ((Y & 0xFFF00000) >> 20);
<> 144:ef7eb2e8f9f7 7082
<> 144:ef7eb2e8f9f7 7083 /* Care taken for table outside boundary */
<> 144:ef7eb2e8f9f7 7084 /* Returns zero output when values are outside table boundary */
<> 144:ef7eb2e8f9f7 7085 if(rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
<> 144:ef7eb2e8f9f7 7086 {
<> 144:ef7eb2e8f9f7 7087 return (0);
<> 144:ef7eb2e8f9f7 7088 }
<> 144:ef7eb2e8f9f7 7089
<> 144:ef7eb2e8f9f7 7090 /* 20 bits for the fractional part */
<> 144:ef7eb2e8f9f7 7091 /* xfract should be in 12.20 format */
<> 144:ef7eb2e8f9f7 7092 xfract = (X & 0x000FFFFF);
<> 144:ef7eb2e8f9f7 7093
<> 144:ef7eb2e8f9f7 7094 /* Read two nearest output values from the index */
<> 144:ef7eb2e8f9f7 7095 x1 = pYData[(rI) + nCols * (cI)];
<> 144:ef7eb2e8f9f7 7096 x2 = pYData[(rI) + nCols * (cI) + 1u];
<> 144:ef7eb2e8f9f7 7097
<> 144:ef7eb2e8f9f7 7098
<> 144:ef7eb2e8f9f7 7099 /* 20 bits for the fractional part */
<> 144:ef7eb2e8f9f7 7100 /* yfract should be in 12.20 format */
<> 144:ef7eb2e8f9f7 7101 yfract = (Y & 0x000FFFFF);
<> 144:ef7eb2e8f9f7 7102
<> 144:ef7eb2e8f9f7 7103 /* Read two nearest output values from the index */
<> 144:ef7eb2e8f9f7 7104 y1 = pYData[(rI) + nCols * (cI + 1)];
<> 144:ef7eb2e8f9f7 7105 y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
<> 144:ef7eb2e8f9f7 7106
<> 144:ef7eb2e8f9f7 7107 /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 13.51 format */
<> 144:ef7eb2e8f9f7 7108
<> 144:ef7eb2e8f9f7 7109 /* x1 is in 1.15(q15), xfract in 12.20 format and out is in 13.35 format */
<> 144:ef7eb2e8f9f7 7110 /* convert 13.35 to 13.31 by right shifting and out is in 1.31 */
<> 144:ef7eb2e8f9f7 7111 out = (q31_t) (((q63_t) x1 * (0xFFFFF - xfract)) >> 4u);
<> 144:ef7eb2e8f9f7 7112 acc = ((q63_t) out * (0xFFFFF - yfract));
<> 144:ef7eb2e8f9f7 7113
<> 144:ef7eb2e8f9f7 7114 /* x2 * (xfract) * (1-yfract) in 1.51 and adding to acc */
<> 144:ef7eb2e8f9f7 7115 out = (q31_t) (((q63_t) x2 * (0xFFFFF - yfract)) >> 4u);
<> 144:ef7eb2e8f9f7 7116 acc += ((q63_t) out * (xfract));
<> 144:ef7eb2e8f9f7 7117
<> 144:ef7eb2e8f9f7 7118 /* y1 * (1 - xfract) * (yfract) in 1.51 and adding to acc */
<> 144:ef7eb2e8f9f7 7119 out = (q31_t) (((q63_t) y1 * (0xFFFFF - xfract)) >> 4u);
<> 144:ef7eb2e8f9f7 7120 acc += ((q63_t) out * (yfract));
<> 144:ef7eb2e8f9f7 7121
<> 144:ef7eb2e8f9f7 7122 /* y2 * (xfract) * (yfract) in 1.51 and adding to acc */
<> 144:ef7eb2e8f9f7 7123 out = (q31_t) (((q63_t) y2 * (xfract)) >> 4u);
<> 144:ef7eb2e8f9f7 7124 acc += ((q63_t) out * (yfract));
<> 144:ef7eb2e8f9f7 7125
<> 144:ef7eb2e8f9f7 7126 /* acc is in 13.51 format and down shift acc by 36 times */
<> 144:ef7eb2e8f9f7 7127 /* Convert out to 1.15 format */
<> 144:ef7eb2e8f9f7 7128 return (acc >> 36);
<> 144:ef7eb2e8f9f7 7129
<> 144:ef7eb2e8f9f7 7130 }
<> 144:ef7eb2e8f9f7 7131
<> 144:ef7eb2e8f9f7 7132 /**
<> 144:ef7eb2e8f9f7 7133 * @brief Q7 bilinear interpolation.
<> 144:ef7eb2e8f9f7 7134 * @param[in,out] *S points to an instance of the interpolation structure.
<> 144:ef7eb2e8f9f7 7135 * @param[in] X interpolation coordinate in 12.20 format.
<> 144:ef7eb2e8f9f7 7136 * @param[in] Y interpolation coordinate in 12.20 format.
<> 144:ef7eb2e8f9f7 7137 * @return out interpolated value.
<> 144:ef7eb2e8f9f7 7138 */
<> 144:ef7eb2e8f9f7 7139
<> 144:ef7eb2e8f9f7 7140 static __INLINE q7_t arm_bilinear_interp_q7(
<> 144:ef7eb2e8f9f7 7141 arm_bilinear_interp_instance_q7 * S,
<> 144:ef7eb2e8f9f7 7142 q31_t X,
<> 144:ef7eb2e8f9f7 7143 q31_t Y)
<> 144:ef7eb2e8f9f7 7144 {
<> 144:ef7eb2e8f9f7 7145 q63_t acc = 0; /* output */
<> 144:ef7eb2e8f9f7 7146 q31_t out; /* Temporary output */
<> 144:ef7eb2e8f9f7 7147 q31_t xfract, yfract; /* X, Y fractional parts */
<> 144:ef7eb2e8f9f7 7148 q7_t x1, x2, y1, y2; /* Nearest output values */
<> 144:ef7eb2e8f9f7 7149 int32_t rI, cI; /* Row and column indices */
<> 144:ef7eb2e8f9f7 7150 q7_t *pYData = S->pData; /* pointer to output table values */
<> 144:ef7eb2e8f9f7 7151 uint32_t nCols = S->numCols; /* num of rows */
<> 144:ef7eb2e8f9f7 7152
<> 144:ef7eb2e8f9f7 7153 /* Input is in 12.20 format */
<> 144:ef7eb2e8f9f7 7154 /* 12 bits for the table index */
<> 144:ef7eb2e8f9f7 7155 /* Index value calculation */
<> 144:ef7eb2e8f9f7 7156 rI = ((X & 0xFFF00000) >> 20);
<> 144:ef7eb2e8f9f7 7157
<> 144:ef7eb2e8f9f7 7158 /* Input is in 12.20 format */
<> 144:ef7eb2e8f9f7 7159 /* 12 bits for the table index */
<> 144:ef7eb2e8f9f7 7160 /* Index value calculation */
<> 144:ef7eb2e8f9f7 7161 cI = ((Y & 0xFFF00000) >> 20);
<> 144:ef7eb2e8f9f7 7162
<> 144:ef7eb2e8f9f7 7163 /* Care taken for table outside boundary */
<> 144:ef7eb2e8f9f7 7164 /* Returns zero output when values are outside table boundary */
<> 144:ef7eb2e8f9f7 7165 if(rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
<> 144:ef7eb2e8f9f7 7166 {
<> 144:ef7eb2e8f9f7 7167 return (0);
<> 144:ef7eb2e8f9f7 7168 }
<> 144:ef7eb2e8f9f7 7169
<> 144:ef7eb2e8f9f7 7170 /* 20 bits for the fractional part */
<> 144:ef7eb2e8f9f7 7171 /* xfract should be in 12.20 format */
<> 144:ef7eb2e8f9f7 7172 xfract = (X & 0x000FFFFF);
<> 144:ef7eb2e8f9f7 7173
<> 144:ef7eb2e8f9f7 7174 /* Read two nearest output values from the index */
<> 144:ef7eb2e8f9f7 7175 x1 = pYData[(rI) + nCols * (cI)];
<> 144:ef7eb2e8f9f7 7176 x2 = pYData[(rI) + nCols * (cI) + 1u];
<> 144:ef7eb2e8f9f7 7177
<> 144:ef7eb2e8f9f7 7178
<> 144:ef7eb2e8f9f7 7179 /* 20 bits for the fractional part */
<> 144:ef7eb2e8f9f7 7180 /* yfract should be in 12.20 format */
<> 144:ef7eb2e8f9f7 7181 yfract = (Y & 0x000FFFFF);
<> 144:ef7eb2e8f9f7 7182
<> 144:ef7eb2e8f9f7 7183 /* Read two nearest output values from the index */
<> 144:ef7eb2e8f9f7 7184 y1 = pYData[(rI) + nCols * (cI + 1)];
<> 144:ef7eb2e8f9f7 7185 y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
<> 144:ef7eb2e8f9f7 7186
<> 144:ef7eb2e8f9f7 7187 /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 16.47 format */
<> 144:ef7eb2e8f9f7 7188 out = ((x1 * (0xFFFFF - xfract)));
<> 144:ef7eb2e8f9f7 7189 acc = (((q63_t) out * (0xFFFFF - yfract)));
<> 144:ef7eb2e8f9f7 7190
<> 144:ef7eb2e8f9f7 7191 /* x2 * (xfract) * (1-yfract) in 2.22 and adding to acc */
<> 144:ef7eb2e8f9f7 7192 out = ((x2 * (0xFFFFF - yfract)));
<> 144:ef7eb2e8f9f7 7193 acc += (((q63_t) out * (xfract)));
<> 144:ef7eb2e8f9f7 7194
<> 144:ef7eb2e8f9f7 7195 /* y1 * (1 - xfract) * (yfract) in 2.22 and adding to acc */
<> 144:ef7eb2e8f9f7 7196 out = ((y1 * (0xFFFFF - xfract)));
<> 144:ef7eb2e8f9f7 7197 acc += (((q63_t) out * (yfract)));
<> 144:ef7eb2e8f9f7 7198
<> 144:ef7eb2e8f9f7 7199 /* y2 * (xfract) * (yfract) in 2.22 and adding to acc */
<> 144:ef7eb2e8f9f7 7200 out = ((y2 * (yfract)));
<> 144:ef7eb2e8f9f7 7201 acc += (((q63_t) out * (xfract)));
<> 144:ef7eb2e8f9f7 7202
<> 144:ef7eb2e8f9f7 7203 /* acc in 16.47 format and down shift by 40 to convert to 1.7 format */
<> 144:ef7eb2e8f9f7 7204 return (acc >> 40);
<> 144:ef7eb2e8f9f7 7205
<> 144:ef7eb2e8f9f7 7206 }
<> 144:ef7eb2e8f9f7 7207
<> 144:ef7eb2e8f9f7 7208 /**
<> 144:ef7eb2e8f9f7 7209 * @} end of BilinearInterpolate group
<> 144:ef7eb2e8f9f7 7210 */
<> 144:ef7eb2e8f9f7 7211
<> 144:ef7eb2e8f9f7 7212
<> 144:ef7eb2e8f9f7 7213 #if defined ( __CC_ARM ) //Keil
<> 144:ef7eb2e8f9f7 7214 //SMMLAR
<> 144:ef7eb2e8f9f7 7215 #define multAcc_32x32_keep32_R(a, x, y) \
<> 144:ef7eb2e8f9f7 7216 a = (q31_t) (((((q63_t) a) << 32) + ((q63_t) x * y) + 0x80000000LL ) >> 32)
<> 144:ef7eb2e8f9f7 7217
<> 144:ef7eb2e8f9f7 7218 //SMMLSR
<> 144:ef7eb2e8f9f7 7219 #define multSub_32x32_keep32_R(a, x, y) \
<> 144:ef7eb2e8f9f7 7220 a = (q31_t) (((((q63_t) a) << 32) - ((q63_t) x * y) + 0x80000000LL ) >> 32)
<> 144:ef7eb2e8f9f7 7221
<> 144:ef7eb2e8f9f7 7222 //SMMULR
<> 144:ef7eb2e8f9f7 7223 #define mult_32x32_keep32_R(a, x, y) \
<> 144:ef7eb2e8f9f7 7224 a = (q31_t) (((q63_t) x * y + 0x80000000LL ) >> 32)
<> 144:ef7eb2e8f9f7 7225
<> 144:ef7eb2e8f9f7 7226 //Enter low optimization region - place directly above function definition
<> 144:ef7eb2e8f9f7 7227 #define LOW_OPTIMIZATION_ENTER \
<> 144:ef7eb2e8f9f7 7228 _Pragma ("push") \
<> 144:ef7eb2e8f9f7 7229 _Pragma ("O1")
<> 144:ef7eb2e8f9f7 7230
<> 144:ef7eb2e8f9f7 7231 //Exit low optimization region - place directly after end of function definition
<> 144:ef7eb2e8f9f7 7232 #define LOW_OPTIMIZATION_EXIT \
<> 144:ef7eb2e8f9f7 7233 _Pragma ("pop")
<> 144:ef7eb2e8f9f7 7234
<> 144:ef7eb2e8f9f7 7235 //Enter low optimization region - place directly above function definition
<> 144:ef7eb2e8f9f7 7236 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
<> 144:ef7eb2e8f9f7 7237
<> 144:ef7eb2e8f9f7 7238 //Exit low optimization region - place directly after end of function definition
<> 144:ef7eb2e8f9f7 7239 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 144:ef7eb2e8f9f7 7240
<> 144:ef7eb2e8f9f7 7241 #elif defined(__ICCARM__) //IAR
<> 144:ef7eb2e8f9f7 7242 //SMMLA
<> 144:ef7eb2e8f9f7 7243 #define multAcc_32x32_keep32_R(a, x, y) \
<> 144:ef7eb2e8f9f7 7244 a += (q31_t) (((q63_t) x * y) >> 32)
<> 144:ef7eb2e8f9f7 7245
<> 144:ef7eb2e8f9f7 7246 //SMMLS
<> 144:ef7eb2e8f9f7 7247 #define multSub_32x32_keep32_R(a, x, y) \
<> 144:ef7eb2e8f9f7 7248 a -= (q31_t) (((q63_t) x * y) >> 32)
<> 144:ef7eb2e8f9f7 7249
<> 144:ef7eb2e8f9f7 7250 //SMMUL
<> 144:ef7eb2e8f9f7 7251 #define mult_32x32_keep32_R(a, x, y) \
<> 144:ef7eb2e8f9f7 7252 a = (q31_t) (((q63_t) x * y ) >> 32)
<> 144:ef7eb2e8f9f7 7253
<> 144:ef7eb2e8f9f7 7254 //Enter low optimization region - place directly above function definition
<> 144:ef7eb2e8f9f7 7255 #define LOW_OPTIMIZATION_ENTER \
<> 144:ef7eb2e8f9f7 7256 _Pragma ("optimize=low")
<> 144:ef7eb2e8f9f7 7257
<> 144:ef7eb2e8f9f7 7258 //Exit low optimization region - place directly after end of function definition
<> 144:ef7eb2e8f9f7 7259 #define LOW_OPTIMIZATION_EXIT
<> 144:ef7eb2e8f9f7 7260
<> 144:ef7eb2e8f9f7 7261 //Enter low optimization region - place directly above function definition
<> 144:ef7eb2e8f9f7 7262 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER \
<> 144:ef7eb2e8f9f7 7263 _Pragma ("optimize=low")
<> 144:ef7eb2e8f9f7 7264
<> 144:ef7eb2e8f9f7 7265 //Exit low optimization region - place directly after end of function definition
<> 144:ef7eb2e8f9f7 7266 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 144:ef7eb2e8f9f7 7267
<> 144:ef7eb2e8f9f7 7268 #elif defined(__GNUC__)
<> 144:ef7eb2e8f9f7 7269 //SMMLA
<> 144:ef7eb2e8f9f7 7270 #define multAcc_32x32_keep32_R(a, x, y) \
<> 144:ef7eb2e8f9f7 7271 a += (q31_t) (((q63_t) x * y) >> 32)
<> 144:ef7eb2e8f9f7 7272
<> 144:ef7eb2e8f9f7 7273 //SMMLS
<> 144:ef7eb2e8f9f7 7274 #define multSub_32x32_keep32_R(a, x, y) \
<> 144:ef7eb2e8f9f7 7275 a -= (q31_t) (((q63_t) x * y) >> 32)
<> 144:ef7eb2e8f9f7 7276
<> 144:ef7eb2e8f9f7 7277 //SMMUL
<> 144:ef7eb2e8f9f7 7278 #define mult_32x32_keep32_R(a, x, y) \
<> 144:ef7eb2e8f9f7 7279 a = (q31_t) (((q63_t) x * y ) >> 32)
<> 144:ef7eb2e8f9f7 7280
<> 144:ef7eb2e8f9f7 7281 #define LOW_OPTIMIZATION_ENTER __attribute__(( optimize("-O1") ))
<> 144:ef7eb2e8f9f7 7282
<> 144:ef7eb2e8f9f7 7283 #define LOW_OPTIMIZATION_EXIT
<> 144:ef7eb2e8f9f7 7284
<> 144:ef7eb2e8f9f7 7285 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
<> 144:ef7eb2e8f9f7 7286
<> 144:ef7eb2e8f9f7 7287 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 144:ef7eb2e8f9f7 7288
<> 144:ef7eb2e8f9f7 7289 #endif
<> 144:ef7eb2e8f9f7 7290
<> 144:ef7eb2e8f9f7 7291
<> 144:ef7eb2e8f9f7 7292
<> 144:ef7eb2e8f9f7 7293
<> 144:ef7eb2e8f9f7 7294
<> 144:ef7eb2e8f9f7 7295 #ifdef __cplusplus
<> 144:ef7eb2e8f9f7 7296 }
<> 144:ef7eb2e8f9f7 7297 #endif
<> 144:ef7eb2e8f9f7 7298
<> 144:ef7eb2e8f9f7 7299
<> 144:ef7eb2e8f9f7 7300 #endif /* _ARM_MATH_H */
<> 144:ef7eb2e8f9f7 7301
<> 144:ef7eb2e8f9f7 7302
<> 144:ef7eb2e8f9f7 7303 /**
<> 144:ef7eb2e8f9f7 7304 *
<> 144:ef7eb2e8f9f7 7305 * End of file.
<> 144:ef7eb2e8f9f7 7306 */