ads1115 only

Fork of mbed by mbed official

Committer:
kaoshen
Date:
Tue Jan 17 23:27:32 2017 +0000
Revision:
135:fce8a9387ed1
Parent:
132:9baf128c2fab
333 ADS1115 ADC1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 132:9baf128c2fab 1 /* ----------------------------------------------------------------------
<> 132:9baf128c2fab 2 * Copyright (C) 2010-2015 ARM Limited. All rights reserved.
<> 132:9baf128c2fab 3 *
<> 132:9baf128c2fab 4 * $Date: 19. March 2015
<> 132:9baf128c2fab 5 * $Revision: V.1.4.5
<> 132:9baf128c2fab 6 *
<> 132:9baf128c2fab 7 * Project: CMSIS DSP Library
<> 132:9baf128c2fab 8 * Title: arm_math.h
<> 132:9baf128c2fab 9 *
<> 132:9baf128c2fab 10 * Description: Public header file for CMSIS DSP Library
<> 132:9baf128c2fab 11 *
<> 132:9baf128c2fab 12 * Target Processor: Cortex-M7/Cortex-M4/Cortex-M3/Cortex-M0
<> 132:9baf128c2fab 13 *
<> 132:9baf128c2fab 14 * Redistribution and use in source and binary forms, with or without
<> 132:9baf128c2fab 15 * modification, are permitted provided that the following conditions
<> 132:9baf128c2fab 16 * are met:
<> 132:9baf128c2fab 17 * - Redistributions of source code must retain the above copyright
<> 132:9baf128c2fab 18 * notice, this list of conditions and the following disclaimer.
<> 132:9baf128c2fab 19 * - Redistributions in binary form must reproduce the above copyright
<> 132:9baf128c2fab 20 * notice, this list of conditions and the following disclaimer in
<> 132:9baf128c2fab 21 * the documentation and/or other materials provided with the
<> 132:9baf128c2fab 22 * distribution.
<> 132:9baf128c2fab 23 * - Neither the name of ARM LIMITED nor the names of its contributors
<> 132:9baf128c2fab 24 * may be used to endorse or promote products derived from this
<> 132:9baf128c2fab 25 * software without specific prior written permission.
<> 132:9baf128c2fab 26 *
<> 132:9baf128c2fab 27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
<> 132:9baf128c2fab 28 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
<> 132:9baf128c2fab 29 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
<> 132:9baf128c2fab 30 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
<> 132:9baf128c2fab 31 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
<> 132:9baf128c2fab 32 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
<> 132:9baf128c2fab 33 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
<> 132:9baf128c2fab 34 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
<> 132:9baf128c2fab 35 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
<> 132:9baf128c2fab 36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
<> 132:9baf128c2fab 37 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
<> 132:9baf128c2fab 38 * POSSIBILITY OF SUCH DAMAGE.
<> 132:9baf128c2fab 39 * -------------------------------------------------------------------- */
<> 132:9baf128c2fab 40
<> 132:9baf128c2fab 41 /**
<> 132:9baf128c2fab 42 \mainpage CMSIS DSP Software Library
<> 132:9baf128c2fab 43 *
<> 132:9baf128c2fab 44 * Introduction
<> 132:9baf128c2fab 45 * ------------
<> 132:9baf128c2fab 46 *
<> 132:9baf128c2fab 47 * This user manual describes the CMSIS DSP software library,
<> 132:9baf128c2fab 48 * a suite of common signal processing functions for use on Cortex-M processor based devices.
<> 132:9baf128c2fab 49 *
<> 132:9baf128c2fab 50 * The library is divided into a number of functions each covering a specific category:
<> 132:9baf128c2fab 51 * - Basic math functions
<> 132:9baf128c2fab 52 * - Fast math functions
<> 132:9baf128c2fab 53 * - Complex math functions
<> 132:9baf128c2fab 54 * - Filters
<> 132:9baf128c2fab 55 * - Matrix functions
<> 132:9baf128c2fab 56 * - Transforms
<> 132:9baf128c2fab 57 * - Motor control functions
<> 132:9baf128c2fab 58 * - Statistical functions
<> 132:9baf128c2fab 59 * - Support functions
<> 132:9baf128c2fab 60 * - Interpolation functions
<> 132:9baf128c2fab 61 *
<> 132:9baf128c2fab 62 * The library has separate functions for operating on 8-bit integers, 16-bit integers,
<> 132:9baf128c2fab 63 * 32-bit integer and 32-bit floating-point values.
<> 132:9baf128c2fab 64 *
<> 132:9baf128c2fab 65 * Using the Library
<> 132:9baf128c2fab 66 * ------------
<> 132:9baf128c2fab 67 *
<> 132:9baf128c2fab 68 * The library installer contains prebuilt versions of the libraries in the <code>Lib</code> folder.
<> 132:9baf128c2fab 69 * - arm_cortexM7lfdp_math.lib (Little endian and Double Precision Floating Point Unit on Cortex-M7)
<> 132:9baf128c2fab 70 * - arm_cortexM7bfdp_math.lib (Big endian and Double Precision Floating Point Unit on Cortex-M7)
<> 132:9baf128c2fab 71 * - arm_cortexM7lfsp_math.lib (Little endian and Single Precision Floating Point Unit on Cortex-M7)
<> 132:9baf128c2fab 72 * - arm_cortexM7bfsp_math.lib (Big endian and Single Precision Floating Point Unit on Cortex-M7)
<> 132:9baf128c2fab 73 * - arm_cortexM7l_math.lib (Little endian on Cortex-M7)
<> 132:9baf128c2fab 74 * - arm_cortexM7b_math.lib (Big endian on Cortex-M7)
<> 132:9baf128c2fab 75 * - arm_cortexM4lf_math.lib (Little endian and Floating Point Unit on Cortex-M4)
<> 132:9baf128c2fab 76 * - arm_cortexM4bf_math.lib (Big endian and Floating Point Unit on Cortex-M4)
<> 132:9baf128c2fab 77 * - arm_cortexM4l_math.lib (Little endian on Cortex-M4)
<> 132:9baf128c2fab 78 * - arm_cortexM4b_math.lib (Big endian on Cortex-M4)
<> 132:9baf128c2fab 79 * - arm_cortexM3l_math.lib (Little endian on Cortex-M3)
<> 132:9baf128c2fab 80 * - arm_cortexM3b_math.lib (Big endian on Cortex-M3)
<> 132:9baf128c2fab 81 * - arm_cortexM0l_math.lib (Little endian on Cortex-M0 / CortexM0+)
<> 132:9baf128c2fab 82 * - arm_cortexM0b_math.lib (Big endian on Cortex-M0 / CortexM0+)
<> 132:9baf128c2fab 83 *
<> 132:9baf128c2fab 84 * The library functions are declared in the public file <code>arm_math.h</code> which is placed in the <code>Include</code> folder.
<> 132:9baf128c2fab 85 * Simply include this file and link the appropriate library in the application and begin calling the library functions. The Library supports single
<> 132:9baf128c2fab 86 * public header file <code> arm_math.h</code> for Cortex-M7/M4/M3/M0/M0+ with little endian and big endian. Same header file will be used for floating point unit(FPU) variants.
<> 132:9baf128c2fab 87 * Define the appropriate pre processor MACRO ARM_MATH_CM7 or ARM_MATH_CM4 or ARM_MATH_CM3 or
<> 132:9baf128c2fab 88 * ARM_MATH_CM0 or ARM_MATH_CM0PLUS depending on the target processor in the application.
<> 132:9baf128c2fab 89 *
<> 132:9baf128c2fab 90 * Examples
<> 132:9baf128c2fab 91 * --------
<> 132:9baf128c2fab 92 *
<> 132:9baf128c2fab 93 * The library ships with a number of examples which demonstrate how to use the library functions.
<> 132:9baf128c2fab 94 *
<> 132:9baf128c2fab 95 * Toolchain Support
<> 132:9baf128c2fab 96 * ------------
<> 132:9baf128c2fab 97 *
<> 132:9baf128c2fab 98 * The library has been developed and tested with MDK-ARM version 5.14.0.0
<> 132:9baf128c2fab 99 * The library is being tested in GCC and IAR toolchains and updates on this activity will be made available shortly.
<> 132:9baf128c2fab 100 *
<> 132:9baf128c2fab 101 * Building the Library
<> 132:9baf128c2fab 102 * ------------
<> 132:9baf128c2fab 103 *
<> 132:9baf128c2fab 104 * The library installer contains a project file to re build libraries on MDK-ARM Tool chain in the <code>CMSIS\\DSP_Lib\\Source\\ARM</code> folder.
<> 132:9baf128c2fab 105 * - arm_cortexM_math.uvprojx
<> 132:9baf128c2fab 106 *
<> 132:9baf128c2fab 107 *
<> 132:9baf128c2fab 108 * The libraries can be built by opening the arm_cortexM_math.uvprojx project in MDK-ARM, selecting a specific target, and defining the optional pre processor MACROs detailed above.
<> 132:9baf128c2fab 109 *
<> 132:9baf128c2fab 110 * Pre-processor Macros
<> 132:9baf128c2fab 111 * ------------
<> 132:9baf128c2fab 112 *
<> 132:9baf128c2fab 113 * Each library project have differant pre-processor macros.
<> 132:9baf128c2fab 114 *
<> 132:9baf128c2fab 115 * - UNALIGNED_SUPPORT_DISABLE:
<> 132:9baf128c2fab 116 *
<> 132:9baf128c2fab 117 * Define macro UNALIGNED_SUPPORT_DISABLE, If the silicon does not support unaligned memory access
<> 132:9baf128c2fab 118 *
<> 132:9baf128c2fab 119 * - ARM_MATH_BIG_ENDIAN:
<> 132:9baf128c2fab 120 *
<> 132:9baf128c2fab 121 * Define macro ARM_MATH_BIG_ENDIAN to build the library for big endian targets. By default library builds for little endian targets.
<> 132:9baf128c2fab 122 *
<> 132:9baf128c2fab 123 * - ARM_MATH_MATRIX_CHECK:
<> 132:9baf128c2fab 124 *
<> 132:9baf128c2fab 125 * Define macro ARM_MATH_MATRIX_CHECK for checking on the input and output sizes of matrices
<> 132:9baf128c2fab 126 *
<> 132:9baf128c2fab 127 * - ARM_MATH_ROUNDING:
<> 132:9baf128c2fab 128 *
<> 132:9baf128c2fab 129 * Define macro ARM_MATH_ROUNDING for rounding on support functions
<> 132:9baf128c2fab 130 *
<> 132:9baf128c2fab 131 * - ARM_MATH_CMx:
<> 132:9baf128c2fab 132 *
<> 132:9baf128c2fab 133 * Define macro ARM_MATH_CM4 for building the library on Cortex-M4 target, ARM_MATH_CM3 for building library on Cortex-M3 target
<> 132:9baf128c2fab 134 * and ARM_MATH_CM0 for building library on Cortex-M0 target, ARM_MATH_CM0PLUS for building library on Cortex-M0+ target, and
<> 132:9baf128c2fab 135 * ARM_MATH_CM7 for building the library on cortex-M7.
<> 132:9baf128c2fab 136 *
<> 132:9baf128c2fab 137 * - __FPU_PRESENT:
<> 132:9baf128c2fab 138 *
<> 132:9baf128c2fab 139 * Initialize macro __FPU_PRESENT = 1 when building on FPU supported Targets. Enable this macro for M4bf and M4lf libraries
<> 132:9baf128c2fab 140 *
<> 132:9baf128c2fab 141 * <hr>
<> 132:9baf128c2fab 142 * CMSIS-DSP in ARM::CMSIS Pack
<> 132:9baf128c2fab 143 * -----------------------------
<> 132:9baf128c2fab 144 *
<> 132:9baf128c2fab 145 * The following files relevant to CMSIS-DSP are present in the <b>ARM::CMSIS</b> Pack directories:
<> 132:9baf128c2fab 146 * |File/Folder |Content |
<> 132:9baf128c2fab 147 * |------------------------------|------------------------------------------------------------------------|
<> 132:9baf128c2fab 148 * |\b CMSIS\\Documentation\\DSP | This documentation |
<> 132:9baf128c2fab 149 * |\b CMSIS\\DSP_Lib | Software license agreement (license.txt) |
<> 132:9baf128c2fab 150 * |\b CMSIS\\DSP_Lib\\Examples | Example projects demonstrating the usage of the library functions |
<> 132:9baf128c2fab 151 * |\b CMSIS\\DSP_Lib\\Source | Source files for rebuilding the library |
<> 132:9baf128c2fab 152 *
<> 132:9baf128c2fab 153 * <hr>
<> 132:9baf128c2fab 154 * Revision History of CMSIS-DSP
<> 132:9baf128c2fab 155 * ------------
<> 132:9baf128c2fab 156 * Please refer to \ref ChangeLog_pg.
<> 132:9baf128c2fab 157 *
<> 132:9baf128c2fab 158 * Copyright Notice
<> 132:9baf128c2fab 159 * ------------
<> 132:9baf128c2fab 160 *
<> 132:9baf128c2fab 161 * Copyright (C) 2010-2015 ARM Limited. All rights reserved.
<> 132:9baf128c2fab 162 */
<> 132:9baf128c2fab 163
<> 132:9baf128c2fab 164
<> 132:9baf128c2fab 165 /**
<> 132:9baf128c2fab 166 * @defgroup groupMath Basic Math Functions
<> 132:9baf128c2fab 167 */
<> 132:9baf128c2fab 168
<> 132:9baf128c2fab 169 /**
<> 132:9baf128c2fab 170 * @defgroup groupFastMath Fast Math Functions
<> 132:9baf128c2fab 171 * This set of functions provides a fast approximation to sine, cosine, and square root.
<> 132:9baf128c2fab 172 * As compared to most of the other functions in the CMSIS math library, the fast math functions
<> 132:9baf128c2fab 173 * operate on individual values and not arrays.
<> 132:9baf128c2fab 174 * There are separate functions for Q15, Q31, and floating-point data.
<> 132:9baf128c2fab 175 *
<> 132:9baf128c2fab 176 */
<> 132:9baf128c2fab 177
<> 132:9baf128c2fab 178 /**
<> 132:9baf128c2fab 179 * @defgroup groupCmplxMath Complex Math Functions
<> 132:9baf128c2fab 180 * This set of functions operates on complex data vectors.
<> 132:9baf128c2fab 181 * The data in the complex arrays is stored in an interleaved fashion
<> 132:9baf128c2fab 182 * (real, imag, real, imag, ...).
<> 132:9baf128c2fab 183 * In the API functions, the number of samples in a complex array refers
<> 132:9baf128c2fab 184 * to the number of complex values; the array contains twice this number of
<> 132:9baf128c2fab 185 * real values.
<> 132:9baf128c2fab 186 */
<> 132:9baf128c2fab 187
<> 132:9baf128c2fab 188 /**
<> 132:9baf128c2fab 189 * @defgroup groupFilters Filtering Functions
<> 132:9baf128c2fab 190 */
<> 132:9baf128c2fab 191
<> 132:9baf128c2fab 192 /**
<> 132:9baf128c2fab 193 * @defgroup groupMatrix Matrix Functions
<> 132:9baf128c2fab 194 *
<> 132:9baf128c2fab 195 * This set of functions provides basic matrix math operations.
<> 132:9baf128c2fab 196 * The functions operate on matrix data structures. For example,
<> 132:9baf128c2fab 197 * the type
<> 132:9baf128c2fab 198 * definition for the floating-point matrix structure is shown
<> 132:9baf128c2fab 199 * below:
<> 132:9baf128c2fab 200 * <pre>
<> 132:9baf128c2fab 201 * typedef struct
<> 132:9baf128c2fab 202 * {
<> 132:9baf128c2fab 203 * uint16_t numRows; // number of rows of the matrix.
<> 132:9baf128c2fab 204 * uint16_t numCols; // number of columns of the matrix.
<> 132:9baf128c2fab 205 * float32_t *pData; // points to the data of the matrix.
<> 132:9baf128c2fab 206 * } arm_matrix_instance_f32;
<> 132:9baf128c2fab 207 * </pre>
<> 132:9baf128c2fab 208 * There are similar definitions for Q15 and Q31 data types.
<> 132:9baf128c2fab 209 *
<> 132:9baf128c2fab 210 * The structure specifies the size of the matrix and then points to
<> 132:9baf128c2fab 211 * an array of data. The array is of size <code>numRows X numCols</code>
<> 132:9baf128c2fab 212 * and the values are arranged in row order. That is, the
<> 132:9baf128c2fab 213 * matrix element (i, j) is stored at:
<> 132:9baf128c2fab 214 * <pre>
<> 132:9baf128c2fab 215 * pData[i*numCols + j]
<> 132:9baf128c2fab 216 * </pre>
<> 132:9baf128c2fab 217 *
<> 132:9baf128c2fab 218 * \par Init Functions
<> 132:9baf128c2fab 219 * There is an associated initialization function for each type of matrix
<> 132:9baf128c2fab 220 * data structure.
<> 132:9baf128c2fab 221 * The initialization function sets the values of the internal structure fields.
<> 132:9baf128c2fab 222 * Refer to the function <code>arm_mat_init_f32()</code>, <code>arm_mat_init_q31()</code>
<> 132:9baf128c2fab 223 * and <code>arm_mat_init_q15()</code> for floating-point, Q31 and Q15 types, respectively.
<> 132:9baf128c2fab 224 *
<> 132:9baf128c2fab 225 * \par
<> 132:9baf128c2fab 226 * Use of the initialization function is optional. However, if initialization function is used
<> 132:9baf128c2fab 227 * then the instance structure cannot be placed into a const data section.
<> 132:9baf128c2fab 228 * To place the instance structure in a const data
<> 132:9baf128c2fab 229 * section, manually initialize the data structure. For example:
<> 132:9baf128c2fab 230 * <pre>
<> 132:9baf128c2fab 231 * <code>arm_matrix_instance_f32 S = {nRows, nColumns, pData};</code>
<> 132:9baf128c2fab 232 * <code>arm_matrix_instance_q31 S = {nRows, nColumns, pData};</code>
<> 132:9baf128c2fab 233 * <code>arm_matrix_instance_q15 S = {nRows, nColumns, pData};</code>
<> 132:9baf128c2fab 234 * </pre>
<> 132:9baf128c2fab 235 * where <code>nRows</code> specifies the number of rows, <code>nColumns</code>
<> 132:9baf128c2fab 236 * specifies the number of columns, and <code>pData</code> points to the
<> 132:9baf128c2fab 237 * data array.
<> 132:9baf128c2fab 238 *
<> 132:9baf128c2fab 239 * \par Size Checking
<> 132:9baf128c2fab 240 * By default all of the matrix functions perform size checking on the input and
<> 132:9baf128c2fab 241 * output matrices. For example, the matrix addition function verifies that the
<> 132:9baf128c2fab 242 * two input matrices and the output matrix all have the same number of rows and
<> 132:9baf128c2fab 243 * columns. If the size check fails the functions return:
<> 132:9baf128c2fab 244 * <pre>
<> 132:9baf128c2fab 245 * ARM_MATH_SIZE_MISMATCH
<> 132:9baf128c2fab 246 * </pre>
<> 132:9baf128c2fab 247 * Otherwise the functions return
<> 132:9baf128c2fab 248 * <pre>
<> 132:9baf128c2fab 249 * ARM_MATH_SUCCESS
<> 132:9baf128c2fab 250 * </pre>
<> 132:9baf128c2fab 251 * There is some overhead associated with this matrix size checking.
<> 132:9baf128c2fab 252 * The matrix size checking is enabled via the \#define
<> 132:9baf128c2fab 253 * <pre>
<> 132:9baf128c2fab 254 * ARM_MATH_MATRIX_CHECK
<> 132:9baf128c2fab 255 * </pre>
<> 132:9baf128c2fab 256 * within the library project settings. By default this macro is defined
<> 132:9baf128c2fab 257 * and size checking is enabled. By changing the project settings and
<> 132:9baf128c2fab 258 * undefining this macro size checking is eliminated and the functions
<> 132:9baf128c2fab 259 * run a bit faster. With size checking disabled the functions always
<> 132:9baf128c2fab 260 * return <code>ARM_MATH_SUCCESS</code>.
<> 132:9baf128c2fab 261 */
<> 132:9baf128c2fab 262
<> 132:9baf128c2fab 263 /**
<> 132:9baf128c2fab 264 * @defgroup groupTransforms Transform Functions
<> 132:9baf128c2fab 265 */
<> 132:9baf128c2fab 266
<> 132:9baf128c2fab 267 /**
<> 132:9baf128c2fab 268 * @defgroup groupController Controller Functions
<> 132:9baf128c2fab 269 */
<> 132:9baf128c2fab 270
<> 132:9baf128c2fab 271 /**
<> 132:9baf128c2fab 272 * @defgroup groupStats Statistics Functions
<> 132:9baf128c2fab 273 */
<> 132:9baf128c2fab 274 /**
<> 132:9baf128c2fab 275 * @defgroup groupSupport Support Functions
<> 132:9baf128c2fab 276 */
<> 132:9baf128c2fab 277
<> 132:9baf128c2fab 278 /**
<> 132:9baf128c2fab 279 * @defgroup groupInterpolation Interpolation Functions
<> 132:9baf128c2fab 280 * These functions perform 1- and 2-dimensional interpolation of data.
<> 132:9baf128c2fab 281 * Linear interpolation is used for 1-dimensional data and
<> 132:9baf128c2fab 282 * bilinear interpolation is used for 2-dimensional data.
<> 132:9baf128c2fab 283 */
<> 132:9baf128c2fab 284
<> 132:9baf128c2fab 285 /**
<> 132:9baf128c2fab 286 * @defgroup groupExamples Examples
<> 132:9baf128c2fab 287 */
<> 132:9baf128c2fab 288 #ifndef _ARM_MATH_H
<> 132:9baf128c2fab 289 #define _ARM_MATH_H
<> 132:9baf128c2fab 290
<> 132:9baf128c2fab 291 #define __CMSIS_GENERIC /* disable NVIC and Systick functions */
<> 132:9baf128c2fab 292
<> 132:9baf128c2fab 293 #if defined(ARM_MATH_CM7)
<> 132:9baf128c2fab 294 #include "core_cm7.h"
<> 132:9baf128c2fab 295 #elif defined (ARM_MATH_CM4)
<> 132:9baf128c2fab 296 #include "core_cm4.h"
<> 132:9baf128c2fab 297 #elif defined (ARM_MATH_CM3)
<> 132:9baf128c2fab 298 #include "core_cm3.h"
<> 132:9baf128c2fab 299 #elif defined (ARM_MATH_CM0)
<> 132:9baf128c2fab 300 #include "core_cm0.h"
<> 132:9baf128c2fab 301 #define ARM_MATH_CM0_FAMILY
<> 132:9baf128c2fab 302 #elif defined (ARM_MATH_CM0PLUS)
<> 132:9baf128c2fab 303 #include "core_cm0plus.h"
<> 132:9baf128c2fab 304 #define ARM_MATH_CM0_FAMILY
<> 132:9baf128c2fab 305 #else
<> 132:9baf128c2fab 306 #error "Define according the used Cortex core ARM_MATH_CM7, ARM_MATH_CM4, ARM_MATH_CM3, ARM_MATH_CM0PLUS or ARM_MATH_CM0"
<> 132:9baf128c2fab 307 #endif
<> 132:9baf128c2fab 308
<> 132:9baf128c2fab 309 #undef __CMSIS_GENERIC /* enable NVIC and Systick functions */
<> 132:9baf128c2fab 310 #include "string.h"
<> 132:9baf128c2fab 311 #include "math.h"
<> 132:9baf128c2fab 312 #ifdef __cplusplus
<> 132:9baf128c2fab 313 extern "C"
<> 132:9baf128c2fab 314 {
<> 132:9baf128c2fab 315 #endif
<> 132:9baf128c2fab 316
<> 132:9baf128c2fab 317
<> 132:9baf128c2fab 318 /**
<> 132:9baf128c2fab 319 * @brief Macros required for reciprocal calculation in Normalized LMS
<> 132:9baf128c2fab 320 */
<> 132:9baf128c2fab 321
<> 132:9baf128c2fab 322 #define DELTA_Q31 (0x100)
<> 132:9baf128c2fab 323 #define DELTA_Q15 0x5
<> 132:9baf128c2fab 324 #define INDEX_MASK 0x0000003F
<> 132:9baf128c2fab 325 #ifndef PI
<> 132:9baf128c2fab 326 #define PI 3.14159265358979f
<> 132:9baf128c2fab 327 #endif
<> 132:9baf128c2fab 328
<> 132:9baf128c2fab 329 /**
<> 132:9baf128c2fab 330 * @brief Macros required for SINE and COSINE Fast math approximations
<> 132:9baf128c2fab 331 */
<> 132:9baf128c2fab 332
<> 132:9baf128c2fab 333 #define FAST_MATH_TABLE_SIZE 512
<> 132:9baf128c2fab 334 #define FAST_MATH_Q31_SHIFT (32 - 10)
<> 132:9baf128c2fab 335 #define FAST_MATH_Q15_SHIFT (16 - 10)
<> 132:9baf128c2fab 336 #define CONTROLLER_Q31_SHIFT (32 - 9)
<> 132:9baf128c2fab 337 #define TABLE_SIZE 256
<> 132:9baf128c2fab 338 #define TABLE_SPACING_Q31 0x400000
<> 132:9baf128c2fab 339 #define TABLE_SPACING_Q15 0x80
<> 132:9baf128c2fab 340
<> 132:9baf128c2fab 341 /**
<> 132:9baf128c2fab 342 * @brief Macros required for SINE and COSINE Controller functions
<> 132:9baf128c2fab 343 */
<> 132:9baf128c2fab 344 /* 1.31(q31) Fixed value of 2/360 */
<> 132:9baf128c2fab 345 /* -1 to +1 is divided into 360 values so total spacing is (2/360) */
<> 132:9baf128c2fab 346 #define INPUT_SPACING 0xB60B61
<> 132:9baf128c2fab 347
<> 132:9baf128c2fab 348 /**
<> 132:9baf128c2fab 349 * @brief Macro for Unaligned Support
<> 132:9baf128c2fab 350 */
<> 132:9baf128c2fab 351 #ifndef UNALIGNED_SUPPORT_DISABLE
<> 132:9baf128c2fab 352 #define ALIGN4
<> 132:9baf128c2fab 353 #else
<> 132:9baf128c2fab 354 #if defined (__GNUC__)
<> 132:9baf128c2fab 355 #define ALIGN4 __attribute__((aligned(4)))
<> 132:9baf128c2fab 356 #else
<> 132:9baf128c2fab 357 #define ALIGN4 __align(4)
<> 132:9baf128c2fab 358 #endif
<> 132:9baf128c2fab 359 #endif /* #ifndef UNALIGNED_SUPPORT_DISABLE */
<> 132:9baf128c2fab 360
<> 132:9baf128c2fab 361 /**
<> 132:9baf128c2fab 362 * @brief Error status returned by some functions in the library.
<> 132:9baf128c2fab 363 */
<> 132:9baf128c2fab 364
<> 132:9baf128c2fab 365 typedef enum
<> 132:9baf128c2fab 366 {
<> 132:9baf128c2fab 367 ARM_MATH_SUCCESS = 0, /**< No error */
<> 132:9baf128c2fab 368 ARM_MATH_ARGUMENT_ERROR = -1, /**< One or more arguments are incorrect */
<> 132:9baf128c2fab 369 ARM_MATH_LENGTH_ERROR = -2, /**< Length of data buffer is incorrect */
<> 132:9baf128c2fab 370 ARM_MATH_SIZE_MISMATCH = -3, /**< Size of matrices is not compatible with the operation. */
<> 132:9baf128c2fab 371 ARM_MATH_NANINF = -4, /**< Not-a-number (NaN) or infinity is generated */
<> 132:9baf128c2fab 372 ARM_MATH_SINGULAR = -5, /**< Generated by matrix inversion if the input matrix is singular and cannot be inverted. */
<> 132:9baf128c2fab 373 ARM_MATH_TEST_FAILURE = -6 /**< Test Failed */
<> 132:9baf128c2fab 374 } arm_status;
<> 132:9baf128c2fab 375
<> 132:9baf128c2fab 376 /**
<> 132:9baf128c2fab 377 * @brief 8-bit fractional data type in 1.7 format.
<> 132:9baf128c2fab 378 */
<> 132:9baf128c2fab 379 typedef int8_t q7_t;
<> 132:9baf128c2fab 380
<> 132:9baf128c2fab 381 /**
<> 132:9baf128c2fab 382 * @brief 16-bit fractional data type in 1.15 format.
<> 132:9baf128c2fab 383 */
<> 132:9baf128c2fab 384 typedef int16_t q15_t;
<> 132:9baf128c2fab 385
<> 132:9baf128c2fab 386 /**
<> 132:9baf128c2fab 387 * @brief 32-bit fractional data type in 1.31 format.
<> 132:9baf128c2fab 388 */
<> 132:9baf128c2fab 389 typedef int32_t q31_t;
<> 132:9baf128c2fab 390
<> 132:9baf128c2fab 391 /**
<> 132:9baf128c2fab 392 * @brief 64-bit fractional data type in 1.63 format.
<> 132:9baf128c2fab 393 */
<> 132:9baf128c2fab 394 typedef int64_t q63_t;
<> 132:9baf128c2fab 395
<> 132:9baf128c2fab 396 /**
<> 132:9baf128c2fab 397 * @brief 32-bit floating-point type definition.
<> 132:9baf128c2fab 398 */
<> 132:9baf128c2fab 399 typedef float float32_t;
<> 132:9baf128c2fab 400
<> 132:9baf128c2fab 401 /**
<> 132:9baf128c2fab 402 * @brief 64-bit floating-point type definition.
<> 132:9baf128c2fab 403 */
<> 132:9baf128c2fab 404 typedef double float64_t;
<> 132:9baf128c2fab 405
<> 132:9baf128c2fab 406 /**
<> 132:9baf128c2fab 407 * @brief definition to read/write two 16 bit values.
<> 132:9baf128c2fab 408 */
<> 132:9baf128c2fab 409 #if defined __CC_ARM
<> 132:9baf128c2fab 410 #define __SIMD32_TYPE int32_t __packed
<> 132:9baf128c2fab 411 #define CMSIS_UNUSED __attribute__((unused))
<> 132:9baf128c2fab 412 #elif defined __ICCARM__
<> 132:9baf128c2fab 413 #define __SIMD32_TYPE int32_t __packed
<> 132:9baf128c2fab 414 #define CMSIS_UNUSED
<> 132:9baf128c2fab 415 #elif defined __GNUC__
<> 132:9baf128c2fab 416 #define __SIMD32_TYPE int32_t
<> 132:9baf128c2fab 417 #define CMSIS_UNUSED __attribute__((unused))
<> 132:9baf128c2fab 418 #elif defined __CSMC__ /* Cosmic */
<> 132:9baf128c2fab 419 #define __SIMD32_TYPE int32_t
<> 132:9baf128c2fab 420 #define CMSIS_UNUSED
<> 132:9baf128c2fab 421 #elif defined __TASKING__
<> 132:9baf128c2fab 422 #define __SIMD32_TYPE __unaligned int32_t
<> 132:9baf128c2fab 423 #define CMSIS_UNUSED
<> 132:9baf128c2fab 424 #else
<> 132:9baf128c2fab 425 #error Unknown compiler
<> 132:9baf128c2fab 426 #endif
<> 132:9baf128c2fab 427
<> 132:9baf128c2fab 428 #define __SIMD32(addr) (*(__SIMD32_TYPE **) & (addr))
<> 132:9baf128c2fab 429 #define __SIMD32_CONST(addr) ((__SIMD32_TYPE *)(addr))
<> 132:9baf128c2fab 430
<> 132:9baf128c2fab 431 #define _SIMD32_OFFSET(addr) (*(__SIMD32_TYPE *) (addr))
<> 132:9baf128c2fab 432
<> 132:9baf128c2fab 433 #define __SIMD64(addr) (*(int64_t **) & (addr))
<> 132:9baf128c2fab 434
<> 132:9baf128c2fab 435 #if defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY)
<> 132:9baf128c2fab 436 /**
<> 132:9baf128c2fab 437 * @brief definition to pack two 16 bit values.
<> 132:9baf128c2fab 438 */
<> 132:9baf128c2fab 439 #define __PKHBT(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0x0000FFFF) | \
<> 132:9baf128c2fab 440 (((int32_t)(ARG2) << ARG3) & (int32_t)0xFFFF0000) )
<> 132:9baf128c2fab 441 #define __PKHTB(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0xFFFF0000) | \
<> 132:9baf128c2fab 442 (((int32_t)(ARG2) >> ARG3) & (int32_t)0x0000FFFF) )
<> 132:9baf128c2fab 443
<> 132:9baf128c2fab 444 #endif
<> 132:9baf128c2fab 445
<> 132:9baf128c2fab 446
<> 132:9baf128c2fab 447 /**
<> 132:9baf128c2fab 448 * @brief definition to pack four 8 bit values.
<> 132:9baf128c2fab 449 */
<> 132:9baf128c2fab 450 #ifndef ARM_MATH_BIG_ENDIAN
<> 132:9baf128c2fab 451
<> 132:9baf128c2fab 452 #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v0) << 0) & (int32_t)0x000000FF) | \
<> 132:9baf128c2fab 453 (((int32_t)(v1) << 8) & (int32_t)0x0000FF00) | \
<> 132:9baf128c2fab 454 (((int32_t)(v2) << 16) & (int32_t)0x00FF0000) | \
<> 132:9baf128c2fab 455 (((int32_t)(v3) << 24) & (int32_t)0xFF000000) )
<> 132:9baf128c2fab 456 #else
<> 132:9baf128c2fab 457
<> 132:9baf128c2fab 458 #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v3) << 0) & (int32_t)0x000000FF) | \
<> 132:9baf128c2fab 459 (((int32_t)(v2) << 8) & (int32_t)0x0000FF00) | \
<> 132:9baf128c2fab 460 (((int32_t)(v1) << 16) & (int32_t)0x00FF0000) | \
<> 132:9baf128c2fab 461 (((int32_t)(v0) << 24) & (int32_t)0xFF000000) )
<> 132:9baf128c2fab 462
<> 132:9baf128c2fab 463 #endif
<> 132:9baf128c2fab 464
<> 132:9baf128c2fab 465
<> 132:9baf128c2fab 466 /**
<> 132:9baf128c2fab 467 * @brief Clips Q63 to Q31 values.
<> 132:9baf128c2fab 468 */
<> 132:9baf128c2fab 469 static __INLINE q31_t clip_q63_to_q31(
<> 132:9baf128c2fab 470 q63_t x)
<> 132:9baf128c2fab 471 {
<> 132:9baf128c2fab 472 return ((q31_t) (x >> 32) != ((q31_t) x >> 31)) ?
<> 132:9baf128c2fab 473 ((0x7FFFFFFF ^ ((q31_t) (x >> 63)))) : (q31_t) x;
<> 132:9baf128c2fab 474 }
<> 132:9baf128c2fab 475
<> 132:9baf128c2fab 476 /**
<> 132:9baf128c2fab 477 * @brief Clips Q63 to Q15 values.
<> 132:9baf128c2fab 478 */
<> 132:9baf128c2fab 479 static __INLINE q15_t clip_q63_to_q15(
<> 132:9baf128c2fab 480 q63_t x)
<> 132:9baf128c2fab 481 {
<> 132:9baf128c2fab 482 return ((q31_t) (x >> 32) != ((q31_t) x >> 31)) ?
<> 132:9baf128c2fab 483 ((0x7FFF ^ ((q15_t) (x >> 63)))) : (q15_t) (x >> 15);
<> 132:9baf128c2fab 484 }
<> 132:9baf128c2fab 485
<> 132:9baf128c2fab 486 /**
<> 132:9baf128c2fab 487 * @brief Clips Q31 to Q7 values.
<> 132:9baf128c2fab 488 */
<> 132:9baf128c2fab 489 static __INLINE q7_t clip_q31_to_q7(
<> 132:9baf128c2fab 490 q31_t x)
<> 132:9baf128c2fab 491 {
<> 132:9baf128c2fab 492 return ((q31_t) (x >> 24) != ((q31_t) x >> 23)) ?
<> 132:9baf128c2fab 493 ((0x7F ^ ((q7_t) (x >> 31)))) : (q7_t) x;
<> 132:9baf128c2fab 494 }
<> 132:9baf128c2fab 495
<> 132:9baf128c2fab 496 /**
<> 132:9baf128c2fab 497 * @brief Clips Q31 to Q15 values.
<> 132:9baf128c2fab 498 */
<> 132:9baf128c2fab 499 static __INLINE q15_t clip_q31_to_q15(
<> 132:9baf128c2fab 500 q31_t x)
<> 132:9baf128c2fab 501 {
<> 132:9baf128c2fab 502 return ((q31_t) (x >> 16) != ((q31_t) x >> 15)) ?
<> 132:9baf128c2fab 503 ((0x7FFF ^ ((q15_t) (x >> 31)))) : (q15_t) x;
<> 132:9baf128c2fab 504 }
<> 132:9baf128c2fab 505
<> 132:9baf128c2fab 506 /**
<> 132:9baf128c2fab 507 * @brief Multiplies 32 X 64 and returns 32 bit result in 2.30 format.
<> 132:9baf128c2fab 508 */
<> 132:9baf128c2fab 509
<> 132:9baf128c2fab 510 static __INLINE q63_t mult32x64(
<> 132:9baf128c2fab 511 q63_t x,
<> 132:9baf128c2fab 512 q31_t y)
<> 132:9baf128c2fab 513 {
<> 132:9baf128c2fab 514 return ((((q63_t) (x & 0x00000000FFFFFFFF) * y) >> 32) +
<> 132:9baf128c2fab 515 (((q63_t) (x >> 32) * y)));
<> 132:9baf128c2fab 516 }
<> 132:9baf128c2fab 517
<> 132:9baf128c2fab 518
<> 132:9baf128c2fab 519 //#if defined (ARM_MATH_CM0_FAMILY) && defined ( __CC_ARM )
<> 132:9baf128c2fab 520 //#define __CLZ __clz
<> 132:9baf128c2fab 521 //#endif
<> 132:9baf128c2fab 522
<> 132:9baf128c2fab 523 //note: function can be removed when all toolchain support __CLZ for Cortex-M0
<> 132:9baf128c2fab 524 #if defined (ARM_MATH_CM0_FAMILY) && ((defined (__ICCARM__)) )
<> 132:9baf128c2fab 525
<> 132:9baf128c2fab 526 static __INLINE uint32_t __CLZ(
<> 132:9baf128c2fab 527 q31_t data);
<> 132:9baf128c2fab 528
<> 132:9baf128c2fab 529
<> 132:9baf128c2fab 530 static __INLINE uint32_t __CLZ(
<> 132:9baf128c2fab 531 q31_t data)
<> 132:9baf128c2fab 532 {
<> 132:9baf128c2fab 533 uint32_t count = 0;
<> 132:9baf128c2fab 534 uint32_t mask = 0x80000000;
<> 132:9baf128c2fab 535
<> 132:9baf128c2fab 536 while((data & mask) == 0)
<> 132:9baf128c2fab 537 {
<> 132:9baf128c2fab 538 count += 1u;
<> 132:9baf128c2fab 539 mask = mask >> 1u;
<> 132:9baf128c2fab 540 }
<> 132:9baf128c2fab 541
<> 132:9baf128c2fab 542 return (count);
<> 132:9baf128c2fab 543
<> 132:9baf128c2fab 544 }
<> 132:9baf128c2fab 545
<> 132:9baf128c2fab 546 #endif
<> 132:9baf128c2fab 547
<> 132:9baf128c2fab 548 /**
<> 132:9baf128c2fab 549 * @brief Function to Calculates 1/in (reciprocal) value of Q31 Data type.
<> 132:9baf128c2fab 550 */
<> 132:9baf128c2fab 551
<> 132:9baf128c2fab 552 static __INLINE uint32_t arm_recip_q31(
<> 132:9baf128c2fab 553 q31_t in,
<> 132:9baf128c2fab 554 q31_t * dst,
<> 132:9baf128c2fab 555 q31_t * pRecipTable)
<> 132:9baf128c2fab 556 {
<> 132:9baf128c2fab 557
<> 132:9baf128c2fab 558 uint32_t out, tempVal;
<> 132:9baf128c2fab 559 uint32_t index, i;
<> 132:9baf128c2fab 560 uint32_t signBits;
<> 132:9baf128c2fab 561
<> 132:9baf128c2fab 562 if(in > 0)
<> 132:9baf128c2fab 563 {
<> 132:9baf128c2fab 564 signBits = __CLZ(in) - 1;
<> 132:9baf128c2fab 565 }
<> 132:9baf128c2fab 566 else
<> 132:9baf128c2fab 567 {
<> 132:9baf128c2fab 568 signBits = __CLZ(-in) - 1;
<> 132:9baf128c2fab 569 }
<> 132:9baf128c2fab 570
<> 132:9baf128c2fab 571 /* Convert input sample to 1.31 format */
<> 132:9baf128c2fab 572 in = in << signBits;
<> 132:9baf128c2fab 573
<> 132:9baf128c2fab 574 /* calculation of index for initial approximated Val */
<> 132:9baf128c2fab 575 index = (uint32_t) (in >> 24u);
<> 132:9baf128c2fab 576 index = (index & INDEX_MASK);
<> 132:9baf128c2fab 577
<> 132:9baf128c2fab 578 /* 1.31 with exp 1 */
<> 132:9baf128c2fab 579 out = pRecipTable[index];
<> 132:9baf128c2fab 580
<> 132:9baf128c2fab 581 /* calculation of reciprocal value */
<> 132:9baf128c2fab 582 /* running approximation for two iterations */
<> 132:9baf128c2fab 583 for (i = 0u; i < 2u; i++)
<> 132:9baf128c2fab 584 {
<> 132:9baf128c2fab 585 tempVal = (q31_t) (((q63_t) in * out) >> 31u);
<> 132:9baf128c2fab 586 tempVal = 0x7FFFFFFF - tempVal;
<> 132:9baf128c2fab 587 /* 1.31 with exp 1 */
<> 132:9baf128c2fab 588 //out = (q31_t) (((q63_t) out * tempVal) >> 30u);
<> 132:9baf128c2fab 589 out = (q31_t) clip_q63_to_q31(((q63_t) out * tempVal) >> 30u);
<> 132:9baf128c2fab 590 }
<> 132:9baf128c2fab 591
<> 132:9baf128c2fab 592 /* write output */
<> 132:9baf128c2fab 593 *dst = out;
<> 132:9baf128c2fab 594
<> 132:9baf128c2fab 595 /* return num of signbits of out = 1/in value */
<> 132:9baf128c2fab 596 return (signBits + 1u);
<> 132:9baf128c2fab 597
<> 132:9baf128c2fab 598 }
<> 132:9baf128c2fab 599
<> 132:9baf128c2fab 600 /**
<> 132:9baf128c2fab 601 * @brief Function to Calculates 1/in (reciprocal) value of Q15 Data type.
<> 132:9baf128c2fab 602 */
<> 132:9baf128c2fab 603 static __INLINE uint32_t arm_recip_q15(
<> 132:9baf128c2fab 604 q15_t in,
<> 132:9baf128c2fab 605 q15_t * dst,
<> 132:9baf128c2fab 606 q15_t * pRecipTable)
<> 132:9baf128c2fab 607 {
<> 132:9baf128c2fab 608
<> 132:9baf128c2fab 609 uint32_t out = 0, tempVal = 0;
<> 132:9baf128c2fab 610 uint32_t index = 0, i = 0;
<> 132:9baf128c2fab 611 uint32_t signBits = 0;
<> 132:9baf128c2fab 612
<> 132:9baf128c2fab 613 if(in > 0)
<> 132:9baf128c2fab 614 {
<> 132:9baf128c2fab 615 signBits = __CLZ(in) - 17;
<> 132:9baf128c2fab 616 }
<> 132:9baf128c2fab 617 else
<> 132:9baf128c2fab 618 {
<> 132:9baf128c2fab 619 signBits = __CLZ(-in) - 17;
<> 132:9baf128c2fab 620 }
<> 132:9baf128c2fab 621
<> 132:9baf128c2fab 622 /* Convert input sample to 1.15 format */
<> 132:9baf128c2fab 623 in = in << signBits;
<> 132:9baf128c2fab 624
<> 132:9baf128c2fab 625 /* calculation of index for initial approximated Val */
<> 132:9baf128c2fab 626 index = in >> 8;
<> 132:9baf128c2fab 627 index = (index & INDEX_MASK);
<> 132:9baf128c2fab 628
<> 132:9baf128c2fab 629 /* 1.15 with exp 1 */
<> 132:9baf128c2fab 630 out = pRecipTable[index];
<> 132:9baf128c2fab 631
<> 132:9baf128c2fab 632 /* calculation of reciprocal value */
<> 132:9baf128c2fab 633 /* running approximation for two iterations */
<> 132:9baf128c2fab 634 for (i = 0; i < 2; i++)
<> 132:9baf128c2fab 635 {
<> 132:9baf128c2fab 636 tempVal = (q15_t) (((q31_t) in * out) >> 15);
<> 132:9baf128c2fab 637 tempVal = 0x7FFF - tempVal;
<> 132:9baf128c2fab 638 /* 1.15 with exp 1 */
<> 132:9baf128c2fab 639 out = (q15_t) (((q31_t) out * tempVal) >> 14);
<> 132:9baf128c2fab 640 }
<> 132:9baf128c2fab 641
<> 132:9baf128c2fab 642 /* write output */
<> 132:9baf128c2fab 643 *dst = out;
<> 132:9baf128c2fab 644
<> 132:9baf128c2fab 645 /* return num of signbits of out = 1/in value */
<> 132:9baf128c2fab 646 return (signBits + 1);
<> 132:9baf128c2fab 647
<> 132:9baf128c2fab 648 }
<> 132:9baf128c2fab 649
<> 132:9baf128c2fab 650
<> 132:9baf128c2fab 651 /*
<> 132:9baf128c2fab 652 * @brief C custom defined intrinisic function for only M0 processors
<> 132:9baf128c2fab 653 */
<> 132:9baf128c2fab 654 #if defined(ARM_MATH_CM0_FAMILY)
<> 132:9baf128c2fab 655
<> 132:9baf128c2fab 656 static __INLINE q31_t __SSAT(
<> 132:9baf128c2fab 657 q31_t x,
<> 132:9baf128c2fab 658 uint32_t y)
<> 132:9baf128c2fab 659 {
<> 132:9baf128c2fab 660 int32_t posMax, negMin;
<> 132:9baf128c2fab 661 uint32_t i;
<> 132:9baf128c2fab 662
<> 132:9baf128c2fab 663 posMax = 1;
<> 132:9baf128c2fab 664 for (i = 0; i < (y - 1); i++)
<> 132:9baf128c2fab 665 {
<> 132:9baf128c2fab 666 posMax = posMax * 2;
<> 132:9baf128c2fab 667 }
<> 132:9baf128c2fab 668
<> 132:9baf128c2fab 669 if(x > 0)
<> 132:9baf128c2fab 670 {
<> 132:9baf128c2fab 671 posMax = (posMax - 1);
<> 132:9baf128c2fab 672
<> 132:9baf128c2fab 673 if(x > posMax)
<> 132:9baf128c2fab 674 {
<> 132:9baf128c2fab 675 x = posMax;
<> 132:9baf128c2fab 676 }
<> 132:9baf128c2fab 677 }
<> 132:9baf128c2fab 678 else
<> 132:9baf128c2fab 679 {
<> 132:9baf128c2fab 680 negMin = -posMax;
<> 132:9baf128c2fab 681
<> 132:9baf128c2fab 682 if(x < negMin)
<> 132:9baf128c2fab 683 {
<> 132:9baf128c2fab 684 x = negMin;
<> 132:9baf128c2fab 685 }
<> 132:9baf128c2fab 686 }
<> 132:9baf128c2fab 687 return (x);
<> 132:9baf128c2fab 688
<> 132:9baf128c2fab 689
<> 132:9baf128c2fab 690 }
<> 132:9baf128c2fab 691
<> 132:9baf128c2fab 692 #endif /* end of ARM_MATH_CM0_FAMILY */
<> 132:9baf128c2fab 693
<> 132:9baf128c2fab 694
<> 132:9baf128c2fab 695
<> 132:9baf128c2fab 696 /*
<> 132:9baf128c2fab 697 * @brief C custom defined intrinsic function for M3 and M0 processors
<> 132:9baf128c2fab 698 */
<> 132:9baf128c2fab 699 #if defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY)
<> 132:9baf128c2fab 700
<> 132:9baf128c2fab 701 /*
<> 132:9baf128c2fab 702 * @brief C custom defined QADD8 for M3 and M0 processors
<> 132:9baf128c2fab 703 */
<> 132:9baf128c2fab 704 static __INLINE q31_t __QADD8(
<> 132:9baf128c2fab 705 q31_t x,
<> 132:9baf128c2fab 706 q31_t y)
<> 132:9baf128c2fab 707 {
<> 132:9baf128c2fab 708
<> 132:9baf128c2fab 709 q31_t sum;
<> 132:9baf128c2fab 710 q7_t r, s, t, u;
<> 132:9baf128c2fab 711
<> 132:9baf128c2fab 712 r = (q7_t) x;
<> 132:9baf128c2fab 713 s = (q7_t) y;
<> 132:9baf128c2fab 714
<> 132:9baf128c2fab 715 r = __SSAT((q31_t) (r + s), 8);
<> 132:9baf128c2fab 716 s = __SSAT(((q31_t) (((x << 16) >> 24) + ((y << 16) >> 24))), 8);
<> 132:9baf128c2fab 717 t = __SSAT(((q31_t) (((x << 8) >> 24) + ((y << 8) >> 24))), 8);
<> 132:9baf128c2fab 718 u = __SSAT(((q31_t) ((x >> 24) + (y >> 24))), 8);
<> 132:9baf128c2fab 719
<> 132:9baf128c2fab 720 sum =
<> 132:9baf128c2fab 721 (((q31_t) u << 24) & 0xFF000000) | (((q31_t) t << 16) & 0x00FF0000) |
<> 132:9baf128c2fab 722 (((q31_t) s << 8) & 0x0000FF00) | (r & 0x000000FF);
<> 132:9baf128c2fab 723
<> 132:9baf128c2fab 724 return sum;
<> 132:9baf128c2fab 725
<> 132:9baf128c2fab 726 }
<> 132:9baf128c2fab 727
<> 132:9baf128c2fab 728 /*
<> 132:9baf128c2fab 729 * @brief C custom defined QSUB8 for M3 and M0 processors
<> 132:9baf128c2fab 730 */
<> 132:9baf128c2fab 731 static __INLINE q31_t __QSUB8(
<> 132:9baf128c2fab 732 q31_t x,
<> 132:9baf128c2fab 733 q31_t y)
<> 132:9baf128c2fab 734 {
<> 132:9baf128c2fab 735
<> 132:9baf128c2fab 736 q31_t sum;
<> 132:9baf128c2fab 737 q31_t r, s, t, u;
<> 132:9baf128c2fab 738
<> 132:9baf128c2fab 739 r = (q7_t) x;
<> 132:9baf128c2fab 740 s = (q7_t) y;
<> 132:9baf128c2fab 741
<> 132:9baf128c2fab 742 r = __SSAT((r - s), 8);
<> 132:9baf128c2fab 743 s = __SSAT(((q31_t) (((x << 16) >> 24) - ((y << 16) >> 24))), 8) << 8;
<> 132:9baf128c2fab 744 t = __SSAT(((q31_t) (((x << 8) >> 24) - ((y << 8) >> 24))), 8) << 16;
<> 132:9baf128c2fab 745 u = __SSAT(((q31_t) ((x >> 24) - (y >> 24))), 8) << 24;
<> 132:9baf128c2fab 746
<> 132:9baf128c2fab 747 sum =
<> 132:9baf128c2fab 748 (u & 0xFF000000) | (t & 0x00FF0000) | (s & 0x0000FF00) | (r &
<> 132:9baf128c2fab 749 0x000000FF);
<> 132:9baf128c2fab 750
<> 132:9baf128c2fab 751 return sum;
<> 132:9baf128c2fab 752 }
<> 132:9baf128c2fab 753
<> 132:9baf128c2fab 754 /*
<> 132:9baf128c2fab 755 * @brief C custom defined QADD16 for M3 and M0 processors
<> 132:9baf128c2fab 756 */
<> 132:9baf128c2fab 757
<> 132:9baf128c2fab 758 /*
<> 132:9baf128c2fab 759 * @brief C custom defined QADD16 for M3 and M0 processors
<> 132:9baf128c2fab 760 */
<> 132:9baf128c2fab 761 static __INLINE q31_t __QADD16(
<> 132:9baf128c2fab 762 q31_t x,
<> 132:9baf128c2fab 763 q31_t y)
<> 132:9baf128c2fab 764 {
<> 132:9baf128c2fab 765
<> 132:9baf128c2fab 766 q31_t sum;
<> 132:9baf128c2fab 767 q31_t r, s;
<> 132:9baf128c2fab 768
<> 132:9baf128c2fab 769 r = (q15_t) x;
<> 132:9baf128c2fab 770 s = (q15_t) y;
<> 132:9baf128c2fab 771
<> 132:9baf128c2fab 772 r = __SSAT(r + s, 16);
<> 132:9baf128c2fab 773 s = __SSAT(((q31_t) ((x >> 16) + (y >> 16))), 16) << 16;
<> 132:9baf128c2fab 774
<> 132:9baf128c2fab 775 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 132:9baf128c2fab 776
<> 132:9baf128c2fab 777 return sum;
<> 132:9baf128c2fab 778
<> 132:9baf128c2fab 779 }
<> 132:9baf128c2fab 780
<> 132:9baf128c2fab 781 /*
<> 132:9baf128c2fab 782 * @brief C custom defined SHADD16 for M3 and M0 processors
<> 132:9baf128c2fab 783 */
<> 132:9baf128c2fab 784 static __INLINE q31_t __SHADD16(
<> 132:9baf128c2fab 785 q31_t x,
<> 132:9baf128c2fab 786 q31_t y)
<> 132:9baf128c2fab 787 {
<> 132:9baf128c2fab 788
<> 132:9baf128c2fab 789 q31_t sum;
<> 132:9baf128c2fab 790 q31_t r, s;
<> 132:9baf128c2fab 791
<> 132:9baf128c2fab 792 r = (q15_t) x;
<> 132:9baf128c2fab 793 s = (q15_t) y;
<> 132:9baf128c2fab 794
<> 132:9baf128c2fab 795 r = ((r >> 1) + (s >> 1));
<> 132:9baf128c2fab 796 s = ((q31_t) ((x >> 17) + (y >> 17))) << 16;
<> 132:9baf128c2fab 797
<> 132:9baf128c2fab 798 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 132:9baf128c2fab 799
<> 132:9baf128c2fab 800 return sum;
<> 132:9baf128c2fab 801
<> 132:9baf128c2fab 802 }
<> 132:9baf128c2fab 803
<> 132:9baf128c2fab 804 /*
<> 132:9baf128c2fab 805 * @brief C custom defined QSUB16 for M3 and M0 processors
<> 132:9baf128c2fab 806 */
<> 132:9baf128c2fab 807 static __INLINE q31_t __QSUB16(
<> 132:9baf128c2fab 808 q31_t x,
<> 132:9baf128c2fab 809 q31_t y)
<> 132:9baf128c2fab 810 {
<> 132:9baf128c2fab 811
<> 132:9baf128c2fab 812 q31_t sum;
<> 132:9baf128c2fab 813 q31_t r, s;
<> 132:9baf128c2fab 814
<> 132:9baf128c2fab 815 r = (q15_t) x;
<> 132:9baf128c2fab 816 s = (q15_t) y;
<> 132:9baf128c2fab 817
<> 132:9baf128c2fab 818 r = __SSAT(r - s, 16);
<> 132:9baf128c2fab 819 s = __SSAT(((q31_t) ((x >> 16) - (y >> 16))), 16) << 16;
<> 132:9baf128c2fab 820
<> 132:9baf128c2fab 821 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 132:9baf128c2fab 822
<> 132:9baf128c2fab 823 return sum;
<> 132:9baf128c2fab 824 }
<> 132:9baf128c2fab 825
<> 132:9baf128c2fab 826 /*
<> 132:9baf128c2fab 827 * @brief C custom defined SHSUB16 for M3 and M0 processors
<> 132:9baf128c2fab 828 */
<> 132:9baf128c2fab 829 static __INLINE q31_t __SHSUB16(
<> 132:9baf128c2fab 830 q31_t x,
<> 132:9baf128c2fab 831 q31_t y)
<> 132:9baf128c2fab 832 {
<> 132:9baf128c2fab 833
<> 132:9baf128c2fab 834 q31_t diff;
<> 132:9baf128c2fab 835 q31_t r, s;
<> 132:9baf128c2fab 836
<> 132:9baf128c2fab 837 r = (q15_t) x;
<> 132:9baf128c2fab 838 s = (q15_t) y;
<> 132:9baf128c2fab 839
<> 132:9baf128c2fab 840 r = ((r >> 1) - (s >> 1));
<> 132:9baf128c2fab 841 s = (((x >> 17) - (y >> 17)) << 16);
<> 132:9baf128c2fab 842
<> 132:9baf128c2fab 843 diff = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 132:9baf128c2fab 844
<> 132:9baf128c2fab 845 return diff;
<> 132:9baf128c2fab 846 }
<> 132:9baf128c2fab 847
<> 132:9baf128c2fab 848 /*
<> 132:9baf128c2fab 849 * @brief C custom defined QASX for M3 and M0 processors
<> 132:9baf128c2fab 850 */
<> 132:9baf128c2fab 851 static __INLINE q31_t __QASX(
<> 132:9baf128c2fab 852 q31_t x,
<> 132:9baf128c2fab 853 q31_t y)
<> 132:9baf128c2fab 854 {
<> 132:9baf128c2fab 855
<> 132:9baf128c2fab 856 q31_t sum = 0;
<> 132:9baf128c2fab 857
<> 132:9baf128c2fab 858 sum =
<> 132:9baf128c2fab 859 ((sum +
<> 132:9baf128c2fab 860 clip_q31_to_q15((q31_t) ((q15_t) (x >> 16) + (q15_t) y))) << 16) +
<> 132:9baf128c2fab 861 clip_q31_to_q15((q31_t) ((q15_t) x - (q15_t) (y >> 16)));
<> 132:9baf128c2fab 862
<> 132:9baf128c2fab 863 return sum;
<> 132:9baf128c2fab 864 }
<> 132:9baf128c2fab 865
<> 132:9baf128c2fab 866 /*
<> 132:9baf128c2fab 867 * @brief C custom defined SHASX for M3 and M0 processors
<> 132:9baf128c2fab 868 */
<> 132:9baf128c2fab 869 static __INLINE q31_t __SHASX(
<> 132:9baf128c2fab 870 q31_t x,
<> 132:9baf128c2fab 871 q31_t y)
<> 132:9baf128c2fab 872 {
<> 132:9baf128c2fab 873
<> 132:9baf128c2fab 874 q31_t sum;
<> 132:9baf128c2fab 875 q31_t r, s;
<> 132:9baf128c2fab 876
<> 132:9baf128c2fab 877 r = (q15_t) x;
<> 132:9baf128c2fab 878 s = (q15_t) y;
<> 132:9baf128c2fab 879
<> 132:9baf128c2fab 880 r = ((r >> 1) - (y >> 17));
<> 132:9baf128c2fab 881 s = (((x >> 17) + (s >> 1)) << 16);
<> 132:9baf128c2fab 882
<> 132:9baf128c2fab 883 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 132:9baf128c2fab 884
<> 132:9baf128c2fab 885 return sum;
<> 132:9baf128c2fab 886 }
<> 132:9baf128c2fab 887
<> 132:9baf128c2fab 888
<> 132:9baf128c2fab 889 /*
<> 132:9baf128c2fab 890 * @brief C custom defined QSAX for M3 and M0 processors
<> 132:9baf128c2fab 891 */
<> 132:9baf128c2fab 892 static __INLINE q31_t __QSAX(
<> 132:9baf128c2fab 893 q31_t x,
<> 132:9baf128c2fab 894 q31_t y)
<> 132:9baf128c2fab 895 {
<> 132:9baf128c2fab 896
<> 132:9baf128c2fab 897 q31_t sum = 0;
<> 132:9baf128c2fab 898
<> 132:9baf128c2fab 899 sum =
<> 132:9baf128c2fab 900 ((sum +
<> 132:9baf128c2fab 901 clip_q31_to_q15((q31_t) ((q15_t) (x >> 16) - (q15_t) y))) << 16) +
<> 132:9baf128c2fab 902 clip_q31_to_q15((q31_t) ((q15_t) x + (q15_t) (y >> 16)));
<> 132:9baf128c2fab 903
<> 132:9baf128c2fab 904 return sum;
<> 132:9baf128c2fab 905 }
<> 132:9baf128c2fab 906
<> 132:9baf128c2fab 907 /*
<> 132:9baf128c2fab 908 * @brief C custom defined SHSAX for M3 and M0 processors
<> 132:9baf128c2fab 909 */
<> 132:9baf128c2fab 910 static __INLINE q31_t __SHSAX(
<> 132:9baf128c2fab 911 q31_t x,
<> 132:9baf128c2fab 912 q31_t y)
<> 132:9baf128c2fab 913 {
<> 132:9baf128c2fab 914
<> 132:9baf128c2fab 915 q31_t sum;
<> 132:9baf128c2fab 916 q31_t r, s;
<> 132:9baf128c2fab 917
<> 132:9baf128c2fab 918 r = (q15_t) x;
<> 132:9baf128c2fab 919 s = (q15_t) y;
<> 132:9baf128c2fab 920
<> 132:9baf128c2fab 921 r = ((r >> 1) + (y >> 17));
<> 132:9baf128c2fab 922 s = (((x >> 17) - (s >> 1)) << 16);
<> 132:9baf128c2fab 923
<> 132:9baf128c2fab 924 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 132:9baf128c2fab 925
<> 132:9baf128c2fab 926 return sum;
<> 132:9baf128c2fab 927 }
<> 132:9baf128c2fab 928
<> 132:9baf128c2fab 929 /*
<> 132:9baf128c2fab 930 * @brief C custom defined SMUSDX for M3 and M0 processors
<> 132:9baf128c2fab 931 */
<> 132:9baf128c2fab 932 static __INLINE q31_t __SMUSDX(
<> 132:9baf128c2fab 933 q31_t x,
<> 132:9baf128c2fab 934 q31_t y)
<> 132:9baf128c2fab 935 {
<> 132:9baf128c2fab 936
<> 132:9baf128c2fab 937 return ((q31_t) (((q15_t) x * (q15_t) (y >> 16)) -
<> 132:9baf128c2fab 938 ((q15_t) (x >> 16) * (q15_t) y)));
<> 132:9baf128c2fab 939 }
<> 132:9baf128c2fab 940
<> 132:9baf128c2fab 941 /*
<> 132:9baf128c2fab 942 * @brief C custom defined SMUADX for M3 and M0 processors
<> 132:9baf128c2fab 943 */
<> 132:9baf128c2fab 944 static __INLINE q31_t __SMUADX(
<> 132:9baf128c2fab 945 q31_t x,
<> 132:9baf128c2fab 946 q31_t y)
<> 132:9baf128c2fab 947 {
<> 132:9baf128c2fab 948
<> 132:9baf128c2fab 949 return ((q31_t) (((q15_t) x * (q15_t) (y >> 16)) +
<> 132:9baf128c2fab 950 ((q15_t) (x >> 16) * (q15_t) y)));
<> 132:9baf128c2fab 951 }
<> 132:9baf128c2fab 952
<> 132:9baf128c2fab 953 /*
<> 132:9baf128c2fab 954 * @brief C custom defined QADD for M3 and M0 processors
<> 132:9baf128c2fab 955 */
<> 132:9baf128c2fab 956 static __INLINE q31_t __QADD(
<> 132:9baf128c2fab 957 q31_t x,
<> 132:9baf128c2fab 958 q31_t y)
<> 132:9baf128c2fab 959 {
<> 132:9baf128c2fab 960 return clip_q63_to_q31((q63_t) x + y);
<> 132:9baf128c2fab 961 }
<> 132:9baf128c2fab 962
<> 132:9baf128c2fab 963 /*
<> 132:9baf128c2fab 964 * @brief C custom defined QSUB for M3 and M0 processors
<> 132:9baf128c2fab 965 */
<> 132:9baf128c2fab 966 static __INLINE q31_t __QSUB(
<> 132:9baf128c2fab 967 q31_t x,
<> 132:9baf128c2fab 968 q31_t y)
<> 132:9baf128c2fab 969 {
<> 132:9baf128c2fab 970 return clip_q63_to_q31((q63_t) x - y);
<> 132:9baf128c2fab 971 }
<> 132:9baf128c2fab 972
<> 132:9baf128c2fab 973 /*
<> 132:9baf128c2fab 974 * @brief C custom defined SMLAD for M3 and M0 processors
<> 132:9baf128c2fab 975 */
<> 132:9baf128c2fab 976 static __INLINE q31_t __SMLAD(
<> 132:9baf128c2fab 977 q31_t x,
<> 132:9baf128c2fab 978 q31_t y,
<> 132:9baf128c2fab 979 q31_t sum)
<> 132:9baf128c2fab 980 {
<> 132:9baf128c2fab 981
<> 132:9baf128c2fab 982 return (sum + ((q15_t) (x >> 16) * (q15_t) (y >> 16)) +
<> 132:9baf128c2fab 983 ((q15_t) x * (q15_t) y));
<> 132:9baf128c2fab 984 }
<> 132:9baf128c2fab 985
<> 132:9baf128c2fab 986 /*
<> 132:9baf128c2fab 987 * @brief C custom defined SMLADX for M3 and M0 processors
<> 132:9baf128c2fab 988 */
<> 132:9baf128c2fab 989 static __INLINE q31_t __SMLADX(
<> 132:9baf128c2fab 990 q31_t x,
<> 132:9baf128c2fab 991 q31_t y,
<> 132:9baf128c2fab 992 q31_t sum)
<> 132:9baf128c2fab 993 {
<> 132:9baf128c2fab 994
<> 132:9baf128c2fab 995 return (sum + ((q15_t) (x >> 16) * (q15_t) (y)) +
<> 132:9baf128c2fab 996 ((q15_t) x * (q15_t) (y >> 16)));
<> 132:9baf128c2fab 997 }
<> 132:9baf128c2fab 998
<> 132:9baf128c2fab 999 /*
<> 132:9baf128c2fab 1000 * @brief C custom defined SMLSDX for M3 and M0 processors
<> 132:9baf128c2fab 1001 */
<> 132:9baf128c2fab 1002 static __INLINE q31_t __SMLSDX(
<> 132:9baf128c2fab 1003 q31_t x,
<> 132:9baf128c2fab 1004 q31_t y,
<> 132:9baf128c2fab 1005 q31_t sum)
<> 132:9baf128c2fab 1006 {
<> 132:9baf128c2fab 1007
<> 132:9baf128c2fab 1008 return (sum - ((q15_t) (x >> 16) * (q15_t) (y)) +
<> 132:9baf128c2fab 1009 ((q15_t) x * (q15_t) (y >> 16)));
<> 132:9baf128c2fab 1010 }
<> 132:9baf128c2fab 1011
<> 132:9baf128c2fab 1012 /*
<> 132:9baf128c2fab 1013 * @brief C custom defined SMLALD for M3 and M0 processors
<> 132:9baf128c2fab 1014 */
<> 132:9baf128c2fab 1015 static __INLINE q63_t __SMLALD(
<> 132:9baf128c2fab 1016 q31_t x,
<> 132:9baf128c2fab 1017 q31_t y,
<> 132:9baf128c2fab 1018 q63_t sum)
<> 132:9baf128c2fab 1019 {
<> 132:9baf128c2fab 1020
<> 132:9baf128c2fab 1021 return (sum + ((q15_t) (x >> 16) * (q15_t) (y >> 16)) +
<> 132:9baf128c2fab 1022 ((q15_t) x * (q15_t) y));
<> 132:9baf128c2fab 1023 }
<> 132:9baf128c2fab 1024
<> 132:9baf128c2fab 1025 /*
<> 132:9baf128c2fab 1026 * @brief C custom defined SMLALDX for M3 and M0 processors
<> 132:9baf128c2fab 1027 */
<> 132:9baf128c2fab 1028 static __INLINE q63_t __SMLALDX(
<> 132:9baf128c2fab 1029 q31_t x,
<> 132:9baf128c2fab 1030 q31_t y,
<> 132:9baf128c2fab 1031 q63_t sum)
<> 132:9baf128c2fab 1032 {
<> 132:9baf128c2fab 1033
<> 132:9baf128c2fab 1034 return (sum + ((q15_t) (x >> 16) * (q15_t) y)) +
<> 132:9baf128c2fab 1035 ((q15_t) x * (q15_t) (y >> 16));
<> 132:9baf128c2fab 1036 }
<> 132:9baf128c2fab 1037
<> 132:9baf128c2fab 1038 /*
<> 132:9baf128c2fab 1039 * @brief C custom defined SMUAD for M3 and M0 processors
<> 132:9baf128c2fab 1040 */
<> 132:9baf128c2fab 1041 static __INLINE q31_t __SMUAD(
<> 132:9baf128c2fab 1042 q31_t x,
<> 132:9baf128c2fab 1043 q31_t y)
<> 132:9baf128c2fab 1044 {
<> 132:9baf128c2fab 1045
<> 132:9baf128c2fab 1046 return (((x >> 16) * (y >> 16)) +
<> 132:9baf128c2fab 1047 (((x << 16) >> 16) * ((y << 16) >> 16)));
<> 132:9baf128c2fab 1048 }
<> 132:9baf128c2fab 1049
<> 132:9baf128c2fab 1050 /*
<> 132:9baf128c2fab 1051 * @brief C custom defined SMUSD for M3 and M0 processors
<> 132:9baf128c2fab 1052 */
<> 132:9baf128c2fab 1053 static __INLINE q31_t __SMUSD(
<> 132:9baf128c2fab 1054 q31_t x,
<> 132:9baf128c2fab 1055 q31_t y)
<> 132:9baf128c2fab 1056 {
<> 132:9baf128c2fab 1057
<> 132:9baf128c2fab 1058 return (-((x >> 16) * (y >> 16)) +
<> 132:9baf128c2fab 1059 (((x << 16) >> 16) * ((y << 16) >> 16)));
<> 132:9baf128c2fab 1060 }
<> 132:9baf128c2fab 1061
<> 132:9baf128c2fab 1062
<> 132:9baf128c2fab 1063 /*
<> 132:9baf128c2fab 1064 * @brief C custom defined SXTB16 for M3 and M0 processors
<> 132:9baf128c2fab 1065 */
<> 132:9baf128c2fab 1066 static __INLINE q31_t __SXTB16(
<> 132:9baf128c2fab 1067 q31_t x)
<> 132:9baf128c2fab 1068 {
<> 132:9baf128c2fab 1069
<> 132:9baf128c2fab 1070 return ((((x << 24) >> 24) & 0x0000FFFF) |
<> 132:9baf128c2fab 1071 (((x << 8) >> 8) & 0xFFFF0000));
<> 132:9baf128c2fab 1072 }
<> 132:9baf128c2fab 1073
<> 132:9baf128c2fab 1074
<> 132:9baf128c2fab 1075 #endif /* defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY) */
<> 132:9baf128c2fab 1076
<> 132:9baf128c2fab 1077
<> 132:9baf128c2fab 1078 /**
<> 132:9baf128c2fab 1079 * @brief Instance structure for the Q7 FIR filter.
<> 132:9baf128c2fab 1080 */
<> 132:9baf128c2fab 1081 typedef struct
<> 132:9baf128c2fab 1082 {
<> 132:9baf128c2fab 1083 uint16_t numTaps; /**< number of filter coefficients in the filter. */
<> 132:9baf128c2fab 1084 q7_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 132:9baf128c2fab 1085 q7_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 132:9baf128c2fab 1086 } arm_fir_instance_q7;
<> 132:9baf128c2fab 1087
<> 132:9baf128c2fab 1088 /**
<> 132:9baf128c2fab 1089 * @brief Instance structure for the Q15 FIR filter.
<> 132:9baf128c2fab 1090 */
<> 132:9baf128c2fab 1091 typedef struct
<> 132:9baf128c2fab 1092 {
<> 132:9baf128c2fab 1093 uint16_t numTaps; /**< number of filter coefficients in the filter. */
<> 132:9baf128c2fab 1094 q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 132:9baf128c2fab 1095 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 132:9baf128c2fab 1096 } arm_fir_instance_q15;
<> 132:9baf128c2fab 1097
<> 132:9baf128c2fab 1098 /**
<> 132:9baf128c2fab 1099 * @brief Instance structure for the Q31 FIR filter.
<> 132:9baf128c2fab 1100 */
<> 132:9baf128c2fab 1101 typedef struct
<> 132:9baf128c2fab 1102 {
<> 132:9baf128c2fab 1103 uint16_t numTaps; /**< number of filter coefficients in the filter. */
<> 132:9baf128c2fab 1104 q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 132:9baf128c2fab 1105 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 132:9baf128c2fab 1106 } arm_fir_instance_q31;
<> 132:9baf128c2fab 1107
<> 132:9baf128c2fab 1108 /**
<> 132:9baf128c2fab 1109 * @brief Instance structure for the floating-point FIR filter.
<> 132:9baf128c2fab 1110 */
<> 132:9baf128c2fab 1111 typedef struct
<> 132:9baf128c2fab 1112 {
<> 132:9baf128c2fab 1113 uint16_t numTaps; /**< number of filter coefficients in the filter. */
<> 132:9baf128c2fab 1114 float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 132:9baf128c2fab 1115 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 132:9baf128c2fab 1116 } arm_fir_instance_f32;
<> 132:9baf128c2fab 1117
<> 132:9baf128c2fab 1118
<> 132:9baf128c2fab 1119 /**
<> 132:9baf128c2fab 1120 * @brief Processing function for the Q7 FIR filter.
<> 132:9baf128c2fab 1121 * @param[in] *S points to an instance of the Q7 FIR filter structure.
<> 132:9baf128c2fab 1122 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 1123 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 1124 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 1125 * @return none.
<> 132:9baf128c2fab 1126 */
<> 132:9baf128c2fab 1127 void arm_fir_q7(
<> 132:9baf128c2fab 1128 const arm_fir_instance_q7 * S,
<> 132:9baf128c2fab 1129 q7_t * pSrc,
<> 132:9baf128c2fab 1130 q7_t * pDst,
<> 132:9baf128c2fab 1131 uint32_t blockSize);
<> 132:9baf128c2fab 1132
<> 132:9baf128c2fab 1133
<> 132:9baf128c2fab 1134 /**
<> 132:9baf128c2fab 1135 * @brief Initialization function for the Q7 FIR filter.
<> 132:9baf128c2fab 1136 * @param[in,out] *S points to an instance of the Q7 FIR structure.
<> 132:9baf128c2fab 1137 * @param[in] numTaps Number of filter coefficients in the filter.
<> 132:9baf128c2fab 1138 * @param[in] *pCoeffs points to the filter coefficients.
<> 132:9baf128c2fab 1139 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 1140 * @param[in] blockSize number of samples that are processed.
<> 132:9baf128c2fab 1141 * @return none
<> 132:9baf128c2fab 1142 */
<> 132:9baf128c2fab 1143 void arm_fir_init_q7(
<> 132:9baf128c2fab 1144 arm_fir_instance_q7 * S,
<> 132:9baf128c2fab 1145 uint16_t numTaps,
<> 132:9baf128c2fab 1146 q7_t * pCoeffs,
<> 132:9baf128c2fab 1147 q7_t * pState,
<> 132:9baf128c2fab 1148 uint32_t blockSize);
<> 132:9baf128c2fab 1149
<> 132:9baf128c2fab 1150
<> 132:9baf128c2fab 1151 /**
<> 132:9baf128c2fab 1152 * @brief Processing function for the Q15 FIR filter.
<> 132:9baf128c2fab 1153 * @param[in] *S points to an instance of the Q15 FIR structure.
<> 132:9baf128c2fab 1154 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 1155 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 1156 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 1157 * @return none.
<> 132:9baf128c2fab 1158 */
<> 132:9baf128c2fab 1159 void arm_fir_q15(
<> 132:9baf128c2fab 1160 const arm_fir_instance_q15 * S,
<> 132:9baf128c2fab 1161 q15_t * pSrc,
<> 132:9baf128c2fab 1162 q15_t * pDst,
<> 132:9baf128c2fab 1163 uint32_t blockSize);
<> 132:9baf128c2fab 1164
<> 132:9baf128c2fab 1165 /**
<> 132:9baf128c2fab 1166 * @brief Processing function for the fast Q15 FIR filter for Cortex-M3 and Cortex-M4.
<> 132:9baf128c2fab 1167 * @param[in] *S points to an instance of the Q15 FIR filter structure.
<> 132:9baf128c2fab 1168 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 1169 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 1170 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 1171 * @return none.
<> 132:9baf128c2fab 1172 */
<> 132:9baf128c2fab 1173 void arm_fir_fast_q15(
<> 132:9baf128c2fab 1174 const arm_fir_instance_q15 * S,
<> 132:9baf128c2fab 1175 q15_t * pSrc,
<> 132:9baf128c2fab 1176 q15_t * pDst,
<> 132:9baf128c2fab 1177 uint32_t blockSize);
<> 132:9baf128c2fab 1178
<> 132:9baf128c2fab 1179 /**
<> 132:9baf128c2fab 1180 * @brief Initialization function for the Q15 FIR filter.
<> 132:9baf128c2fab 1181 * @param[in,out] *S points to an instance of the Q15 FIR filter structure.
<> 132:9baf128c2fab 1182 * @param[in] numTaps Number of filter coefficients in the filter. Must be even and greater than or equal to 4.
<> 132:9baf128c2fab 1183 * @param[in] *pCoeffs points to the filter coefficients.
<> 132:9baf128c2fab 1184 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 1185 * @param[in] blockSize number of samples that are processed at a time.
<> 132:9baf128c2fab 1186 * @return The function returns ARM_MATH_SUCCESS if initialization was successful or ARM_MATH_ARGUMENT_ERROR if
<> 132:9baf128c2fab 1187 * <code>numTaps</code> is not a supported value.
<> 132:9baf128c2fab 1188 */
<> 132:9baf128c2fab 1189
<> 132:9baf128c2fab 1190 arm_status arm_fir_init_q15(
<> 132:9baf128c2fab 1191 arm_fir_instance_q15 * S,
<> 132:9baf128c2fab 1192 uint16_t numTaps,
<> 132:9baf128c2fab 1193 q15_t * pCoeffs,
<> 132:9baf128c2fab 1194 q15_t * pState,
<> 132:9baf128c2fab 1195 uint32_t blockSize);
<> 132:9baf128c2fab 1196
<> 132:9baf128c2fab 1197 /**
<> 132:9baf128c2fab 1198 * @brief Processing function for the Q31 FIR filter.
<> 132:9baf128c2fab 1199 * @param[in] *S points to an instance of the Q31 FIR filter structure.
<> 132:9baf128c2fab 1200 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 1201 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 1202 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 1203 * @return none.
<> 132:9baf128c2fab 1204 */
<> 132:9baf128c2fab 1205 void arm_fir_q31(
<> 132:9baf128c2fab 1206 const arm_fir_instance_q31 * S,
<> 132:9baf128c2fab 1207 q31_t * pSrc,
<> 132:9baf128c2fab 1208 q31_t * pDst,
<> 132:9baf128c2fab 1209 uint32_t blockSize);
<> 132:9baf128c2fab 1210
<> 132:9baf128c2fab 1211 /**
<> 132:9baf128c2fab 1212 * @brief Processing function for the fast Q31 FIR filter for Cortex-M3 and Cortex-M4.
<> 132:9baf128c2fab 1213 * @param[in] *S points to an instance of the Q31 FIR structure.
<> 132:9baf128c2fab 1214 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 1215 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 1216 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 1217 * @return none.
<> 132:9baf128c2fab 1218 */
<> 132:9baf128c2fab 1219 void arm_fir_fast_q31(
<> 132:9baf128c2fab 1220 const arm_fir_instance_q31 * S,
<> 132:9baf128c2fab 1221 q31_t * pSrc,
<> 132:9baf128c2fab 1222 q31_t * pDst,
<> 132:9baf128c2fab 1223 uint32_t blockSize);
<> 132:9baf128c2fab 1224
<> 132:9baf128c2fab 1225 /**
<> 132:9baf128c2fab 1226 * @brief Initialization function for the Q31 FIR filter.
<> 132:9baf128c2fab 1227 * @param[in,out] *S points to an instance of the Q31 FIR structure.
<> 132:9baf128c2fab 1228 * @param[in] numTaps Number of filter coefficients in the filter.
<> 132:9baf128c2fab 1229 * @param[in] *pCoeffs points to the filter coefficients.
<> 132:9baf128c2fab 1230 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 1231 * @param[in] blockSize number of samples that are processed at a time.
<> 132:9baf128c2fab 1232 * @return none.
<> 132:9baf128c2fab 1233 */
<> 132:9baf128c2fab 1234 void arm_fir_init_q31(
<> 132:9baf128c2fab 1235 arm_fir_instance_q31 * S,
<> 132:9baf128c2fab 1236 uint16_t numTaps,
<> 132:9baf128c2fab 1237 q31_t * pCoeffs,
<> 132:9baf128c2fab 1238 q31_t * pState,
<> 132:9baf128c2fab 1239 uint32_t blockSize);
<> 132:9baf128c2fab 1240
<> 132:9baf128c2fab 1241 /**
<> 132:9baf128c2fab 1242 * @brief Processing function for the floating-point FIR filter.
<> 132:9baf128c2fab 1243 * @param[in] *S points to an instance of the floating-point FIR structure.
<> 132:9baf128c2fab 1244 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 1245 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 1246 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 1247 * @return none.
<> 132:9baf128c2fab 1248 */
<> 132:9baf128c2fab 1249 void arm_fir_f32(
<> 132:9baf128c2fab 1250 const arm_fir_instance_f32 * S,
<> 132:9baf128c2fab 1251 float32_t * pSrc,
<> 132:9baf128c2fab 1252 float32_t * pDst,
<> 132:9baf128c2fab 1253 uint32_t blockSize);
<> 132:9baf128c2fab 1254
<> 132:9baf128c2fab 1255 /**
<> 132:9baf128c2fab 1256 * @brief Initialization function for the floating-point FIR filter.
<> 132:9baf128c2fab 1257 * @param[in,out] *S points to an instance of the floating-point FIR filter structure.
<> 132:9baf128c2fab 1258 * @param[in] numTaps Number of filter coefficients in the filter.
<> 132:9baf128c2fab 1259 * @param[in] *pCoeffs points to the filter coefficients.
<> 132:9baf128c2fab 1260 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 1261 * @param[in] blockSize number of samples that are processed at a time.
<> 132:9baf128c2fab 1262 * @return none.
<> 132:9baf128c2fab 1263 */
<> 132:9baf128c2fab 1264 void arm_fir_init_f32(
<> 132:9baf128c2fab 1265 arm_fir_instance_f32 * S,
<> 132:9baf128c2fab 1266 uint16_t numTaps,
<> 132:9baf128c2fab 1267 float32_t * pCoeffs,
<> 132:9baf128c2fab 1268 float32_t * pState,
<> 132:9baf128c2fab 1269 uint32_t blockSize);
<> 132:9baf128c2fab 1270
<> 132:9baf128c2fab 1271
<> 132:9baf128c2fab 1272 /**
<> 132:9baf128c2fab 1273 * @brief Instance structure for the Q15 Biquad cascade filter.
<> 132:9baf128c2fab 1274 */
<> 132:9baf128c2fab 1275 typedef struct
<> 132:9baf128c2fab 1276 {
<> 132:9baf128c2fab 1277 int8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 132:9baf128c2fab 1278 q15_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
<> 132:9baf128c2fab 1279 q15_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
<> 132:9baf128c2fab 1280 int8_t postShift; /**< Additional shift, in bits, applied to each output sample. */
<> 132:9baf128c2fab 1281
<> 132:9baf128c2fab 1282 } arm_biquad_casd_df1_inst_q15;
<> 132:9baf128c2fab 1283
<> 132:9baf128c2fab 1284
<> 132:9baf128c2fab 1285 /**
<> 132:9baf128c2fab 1286 * @brief Instance structure for the Q31 Biquad cascade filter.
<> 132:9baf128c2fab 1287 */
<> 132:9baf128c2fab 1288 typedef struct
<> 132:9baf128c2fab 1289 {
<> 132:9baf128c2fab 1290 uint32_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 132:9baf128c2fab 1291 q31_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
<> 132:9baf128c2fab 1292 q31_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
<> 132:9baf128c2fab 1293 uint8_t postShift; /**< Additional shift, in bits, applied to each output sample. */
<> 132:9baf128c2fab 1294
<> 132:9baf128c2fab 1295 } arm_biquad_casd_df1_inst_q31;
<> 132:9baf128c2fab 1296
<> 132:9baf128c2fab 1297 /**
<> 132:9baf128c2fab 1298 * @brief Instance structure for the floating-point Biquad cascade filter.
<> 132:9baf128c2fab 1299 */
<> 132:9baf128c2fab 1300 typedef struct
<> 132:9baf128c2fab 1301 {
<> 132:9baf128c2fab 1302 uint32_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 132:9baf128c2fab 1303 float32_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
<> 132:9baf128c2fab 1304 float32_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
<> 132:9baf128c2fab 1305
<> 132:9baf128c2fab 1306
<> 132:9baf128c2fab 1307 } arm_biquad_casd_df1_inst_f32;
<> 132:9baf128c2fab 1308
<> 132:9baf128c2fab 1309
<> 132:9baf128c2fab 1310
<> 132:9baf128c2fab 1311 /**
<> 132:9baf128c2fab 1312 * @brief Processing function for the Q15 Biquad cascade filter.
<> 132:9baf128c2fab 1313 * @param[in] *S points to an instance of the Q15 Biquad cascade structure.
<> 132:9baf128c2fab 1314 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 1315 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 1316 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 1317 * @return none.
<> 132:9baf128c2fab 1318 */
<> 132:9baf128c2fab 1319
<> 132:9baf128c2fab 1320 void arm_biquad_cascade_df1_q15(
<> 132:9baf128c2fab 1321 const arm_biquad_casd_df1_inst_q15 * S,
<> 132:9baf128c2fab 1322 q15_t * pSrc,
<> 132:9baf128c2fab 1323 q15_t * pDst,
<> 132:9baf128c2fab 1324 uint32_t blockSize);
<> 132:9baf128c2fab 1325
<> 132:9baf128c2fab 1326 /**
<> 132:9baf128c2fab 1327 * @brief Initialization function for the Q15 Biquad cascade filter.
<> 132:9baf128c2fab 1328 * @param[in,out] *S points to an instance of the Q15 Biquad cascade structure.
<> 132:9baf128c2fab 1329 * @param[in] numStages number of 2nd order stages in the filter.
<> 132:9baf128c2fab 1330 * @param[in] *pCoeffs points to the filter coefficients.
<> 132:9baf128c2fab 1331 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 1332 * @param[in] postShift Shift to be applied to the output. Varies according to the coefficients format
<> 132:9baf128c2fab 1333 * @return none
<> 132:9baf128c2fab 1334 */
<> 132:9baf128c2fab 1335
<> 132:9baf128c2fab 1336 void arm_biquad_cascade_df1_init_q15(
<> 132:9baf128c2fab 1337 arm_biquad_casd_df1_inst_q15 * S,
<> 132:9baf128c2fab 1338 uint8_t numStages,
<> 132:9baf128c2fab 1339 q15_t * pCoeffs,
<> 132:9baf128c2fab 1340 q15_t * pState,
<> 132:9baf128c2fab 1341 int8_t postShift);
<> 132:9baf128c2fab 1342
<> 132:9baf128c2fab 1343
<> 132:9baf128c2fab 1344 /**
<> 132:9baf128c2fab 1345 * @brief Fast but less precise processing function for the Q15 Biquad cascade filter for Cortex-M3 and Cortex-M4.
<> 132:9baf128c2fab 1346 * @param[in] *S points to an instance of the Q15 Biquad cascade structure.
<> 132:9baf128c2fab 1347 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 1348 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 1349 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 1350 * @return none.
<> 132:9baf128c2fab 1351 */
<> 132:9baf128c2fab 1352
<> 132:9baf128c2fab 1353 void arm_biquad_cascade_df1_fast_q15(
<> 132:9baf128c2fab 1354 const arm_biquad_casd_df1_inst_q15 * S,
<> 132:9baf128c2fab 1355 q15_t * pSrc,
<> 132:9baf128c2fab 1356 q15_t * pDst,
<> 132:9baf128c2fab 1357 uint32_t blockSize);
<> 132:9baf128c2fab 1358
<> 132:9baf128c2fab 1359
<> 132:9baf128c2fab 1360 /**
<> 132:9baf128c2fab 1361 * @brief Processing function for the Q31 Biquad cascade filter
<> 132:9baf128c2fab 1362 * @param[in] *S points to an instance of the Q31 Biquad cascade structure.
<> 132:9baf128c2fab 1363 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 1364 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 1365 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 1366 * @return none.
<> 132:9baf128c2fab 1367 */
<> 132:9baf128c2fab 1368
<> 132:9baf128c2fab 1369 void arm_biquad_cascade_df1_q31(
<> 132:9baf128c2fab 1370 const arm_biquad_casd_df1_inst_q31 * S,
<> 132:9baf128c2fab 1371 q31_t * pSrc,
<> 132:9baf128c2fab 1372 q31_t * pDst,
<> 132:9baf128c2fab 1373 uint32_t blockSize);
<> 132:9baf128c2fab 1374
<> 132:9baf128c2fab 1375 /**
<> 132:9baf128c2fab 1376 * @brief Fast but less precise processing function for the Q31 Biquad cascade filter for Cortex-M3 and Cortex-M4.
<> 132:9baf128c2fab 1377 * @param[in] *S points to an instance of the Q31 Biquad cascade structure.
<> 132:9baf128c2fab 1378 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 1379 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 1380 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 1381 * @return none.
<> 132:9baf128c2fab 1382 */
<> 132:9baf128c2fab 1383
<> 132:9baf128c2fab 1384 void arm_biquad_cascade_df1_fast_q31(
<> 132:9baf128c2fab 1385 const arm_biquad_casd_df1_inst_q31 * S,
<> 132:9baf128c2fab 1386 q31_t * pSrc,
<> 132:9baf128c2fab 1387 q31_t * pDst,
<> 132:9baf128c2fab 1388 uint32_t blockSize);
<> 132:9baf128c2fab 1389
<> 132:9baf128c2fab 1390 /**
<> 132:9baf128c2fab 1391 * @brief Initialization function for the Q31 Biquad cascade filter.
<> 132:9baf128c2fab 1392 * @param[in,out] *S points to an instance of the Q31 Biquad cascade structure.
<> 132:9baf128c2fab 1393 * @param[in] numStages number of 2nd order stages in the filter.
<> 132:9baf128c2fab 1394 * @param[in] *pCoeffs points to the filter coefficients.
<> 132:9baf128c2fab 1395 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 1396 * @param[in] postShift Shift to be applied to the output. Varies according to the coefficients format
<> 132:9baf128c2fab 1397 * @return none
<> 132:9baf128c2fab 1398 */
<> 132:9baf128c2fab 1399
<> 132:9baf128c2fab 1400 void arm_biquad_cascade_df1_init_q31(
<> 132:9baf128c2fab 1401 arm_biquad_casd_df1_inst_q31 * S,
<> 132:9baf128c2fab 1402 uint8_t numStages,
<> 132:9baf128c2fab 1403 q31_t * pCoeffs,
<> 132:9baf128c2fab 1404 q31_t * pState,
<> 132:9baf128c2fab 1405 int8_t postShift);
<> 132:9baf128c2fab 1406
<> 132:9baf128c2fab 1407 /**
<> 132:9baf128c2fab 1408 * @brief Processing function for the floating-point Biquad cascade filter.
<> 132:9baf128c2fab 1409 * @param[in] *S points to an instance of the floating-point Biquad cascade structure.
<> 132:9baf128c2fab 1410 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 1411 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 1412 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 1413 * @return none.
<> 132:9baf128c2fab 1414 */
<> 132:9baf128c2fab 1415
<> 132:9baf128c2fab 1416 void arm_biquad_cascade_df1_f32(
<> 132:9baf128c2fab 1417 const arm_biquad_casd_df1_inst_f32 * S,
<> 132:9baf128c2fab 1418 float32_t * pSrc,
<> 132:9baf128c2fab 1419 float32_t * pDst,
<> 132:9baf128c2fab 1420 uint32_t blockSize);
<> 132:9baf128c2fab 1421
<> 132:9baf128c2fab 1422 /**
<> 132:9baf128c2fab 1423 * @brief Initialization function for the floating-point Biquad cascade filter.
<> 132:9baf128c2fab 1424 * @param[in,out] *S points to an instance of the floating-point Biquad cascade structure.
<> 132:9baf128c2fab 1425 * @param[in] numStages number of 2nd order stages in the filter.
<> 132:9baf128c2fab 1426 * @param[in] *pCoeffs points to the filter coefficients.
<> 132:9baf128c2fab 1427 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 1428 * @return none
<> 132:9baf128c2fab 1429 */
<> 132:9baf128c2fab 1430
<> 132:9baf128c2fab 1431 void arm_biquad_cascade_df1_init_f32(
<> 132:9baf128c2fab 1432 arm_biquad_casd_df1_inst_f32 * S,
<> 132:9baf128c2fab 1433 uint8_t numStages,
<> 132:9baf128c2fab 1434 float32_t * pCoeffs,
<> 132:9baf128c2fab 1435 float32_t * pState);
<> 132:9baf128c2fab 1436
<> 132:9baf128c2fab 1437
<> 132:9baf128c2fab 1438 /**
<> 132:9baf128c2fab 1439 * @brief Instance structure for the floating-point matrix structure.
<> 132:9baf128c2fab 1440 */
<> 132:9baf128c2fab 1441
<> 132:9baf128c2fab 1442 typedef struct
<> 132:9baf128c2fab 1443 {
<> 132:9baf128c2fab 1444 uint16_t numRows; /**< number of rows of the matrix. */
<> 132:9baf128c2fab 1445 uint16_t numCols; /**< number of columns of the matrix. */
<> 132:9baf128c2fab 1446 float32_t *pData; /**< points to the data of the matrix. */
<> 132:9baf128c2fab 1447 } arm_matrix_instance_f32;
<> 132:9baf128c2fab 1448
<> 132:9baf128c2fab 1449
<> 132:9baf128c2fab 1450 /**
<> 132:9baf128c2fab 1451 * @brief Instance structure for the floating-point matrix structure.
<> 132:9baf128c2fab 1452 */
<> 132:9baf128c2fab 1453
<> 132:9baf128c2fab 1454 typedef struct
<> 132:9baf128c2fab 1455 {
<> 132:9baf128c2fab 1456 uint16_t numRows; /**< number of rows of the matrix. */
<> 132:9baf128c2fab 1457 uint16_t numCols; /**< number of columns of the matrix. */
<> 132:9baf128c2fab 1458 float64_t *pData; /**< points to the data of the matrix. */
<> 132:9baf128c2fab 1459 } arm_matrix_instance_f64;
<> 132:9baf128c2fab 1460
<> 132:9baf128c2fab 1461 /**
<> 132:9baf128c2fab 1462 * @brief Instance structure for the Q15 matrix structure.
<> 132:9baf128c2fab 1463 */
<> 132:9baf128c2fab 1464
<> 132:9baf128c2fab 1465 typedef struct
<> 132:9baf128c2fab 1466 {
<> 132:9baf128c2fab 1467 uint16_t numRows; /**< number of rows of the matrix. */
<> 132:9baf128c2fab 1468 uint16_t numCols; /**< number of columns of the matrix. */
<> 132:9baf128c2fab 1469 q15_t *pData; /**< points to the data of the matrix. */
<> 132:9baf128c2fab 1470
<> 132:9baf128c2fab 1471 } arm_matrix_instance_q15;
<> 132:9baf128c2fab 1472
<> 132:9baf128c2fab 1473 /**
<> 132:9baf128c2fab 1474 * @brief Instance structure for the Q31 matrix structure.
<> 132:9baf128c2fab 1475 */
<> 132:9baf128c2fab 1476
<> 132:9baf128c2fab 1477 typedef struct
<> 132:9baf128c2fab 1478 {
<> 132:9baf128c2fab 1479 uint16_t numRows; /**< number of rows of the matrix. */
<> 132:9baf128c2fab 1480 uint16_t numCols; /**< number of columns of the matrix. */
<> 132:9baf128c2fab 1481 q31_t *pData; /**< points to the data of the matrix. */
<> 132:9baf128c2fab 1482
<> 132:9baf128c2fab 1483 } arm_matrix_instance_q31;
<> 132:9baf128c2fab 1484
<> 132:9baf128c2fab 1485
<> 132:9baf128c2fab 1486
<> 132:9baf128c2fab 1487 /**
<> 132:9baf128c2fab 1488 * @brief Floating-point matrix addition.
<> 132:9baf128c2fab 1489 * @param[in] *pSrcA points to the first input matrix structure
<> 132:9baf128c2fab 1490 * @param[in] *pSrcB points to the second input matrix structure
<> 132:9baf128c2fab 1491 * @param[out] *pDst points to output matrix structure
<> 132:9baf128c2fab 1492 * @return The function returns either
<> 132:9baf128c2fab 1493 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1494 */
<> 132:9baf128c2fab 1495
<> 132:9baf128c2fab 1496 arm_status arm_mat_add_f32(
<> 132:9baf128c2fab 1497 const arm_matrix_instance_f32 * pSrcA,
<> 132:9baf128c2fab 1498 const arm_matrix_instance_f32 * pSrcB,
<> 132:9baf128c2fab 1499 arm_matrix_instance_f32 * pDst);
<> 132:9baf128c2fab 1500
<> 132:9baf128c2fab 1501 /**
<> 132:9baf128c2fab 1502 * @brief Q15 matrix addition.
<> 132:9baf128c2fab 1503 * @param[in] *pSrcA points to the first input matrix structure
<> 132:9baf128c2fab 1504 * @param[in] *pSrcB points to the second input matrix structure
<> 132:9baf128c2fab 1505 * @param[out] *pDst points to output matrix structure
<> 132:9baf128c2fab 1506 * @return The function returns either
<> 132:9baf128c2fab 1507 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1508 */
<> 132:9baf128c2fab 1509
<> 132:9baf128c2fab 1510 arm_status arm_mat_add_q15(
<> 132:9baf128c2fab 1511 const arm_matrix_instance_q15 * pSrcA,
<> 132:9baf128c2fab 1512 const arm_matrix_instance_q15 * pSrcB,
<> 132:9baf128c2fab 1513 arm_matrix_instance_q15 * pDst);
<> 132:9baf128c2fab 1514
<> 132:9baf128c2fab 1515 /**
<> 132:9baf128c2fab 1516 * @brief Q31 matrix addition.
<> 132:9baf128c2fab 1517 * @param[in] *pSrcA points to the first input matrix structure
<> 132:9baf128c2fab 1518 * @param[in] *pSrcB points to the second input matrix structure
<> 132:9baf128c2fab 1519 * @param[out] *pDst points to output matrix structure
<> 132:9baf128c2fab 1520 * @return The function returns either
<> 132:9baf128c2fab 1521 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1522 */
<> 132:9baf128c2fab 1523
<> 132:9baf128c2fab 1524 arm_status arm_mat_add_q31(
<> 132:9baf128c2fab 1525 const arm_matrix_instance_q31 * pSrcA,
<> 132:9baf128c2fab 1526 const arm_matrix_instance_q31 * pSrcB,
<> 132:9baf128c2fab 1527 arm_matrix_instance_q31 * pDst);
<> 132:9baf128c2fab 1528
<> 132:9baf128c2fab 1529 /**
<> 132:9baf128c2fab 1530 * @brief Floating-point, complex, matrix multiplication.
<> 132:9baf128c2fab 1531 * @param[in] *pSrcA points to the first input matrix structure
<> 132:9baf128c2fab 1532 * @param[in] *pSrcB points to the second input matrix structure
<> 132:9baf128c2fab 1533 * @param[out] *pDst points to output matrix structure
<> 132:9baf128c2fab 1534 * @return The function returns either
<> 132:9baf128c2fab 1535 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1536 */
<> 132:9baf128c2fab 1537
<> 132:9baf128c2fab 1538 arm_status arm_mat_cmplx_mult_f32(
<> 132:9baf128c2fab 1539 const arm_matrix_instance_f32 * pSrcA,
<> 132:9baf128c2fab 1540 const arm_matrix_instance_f32 * pSrcB,
<> 132:9baf128c2fab 1541 arm_matrix_instance_f32 * pDst);
<> 132:9baf128c2fab 1542
<> 132:9baf128c2fab 1543 /**
<> 132:9baf128c2fab 1544 * @brief Q15, complex, matrix multiplication.
<> 132:9baf128c2fab 1545 * @param[in] *pSrcA points to the first input matrix structure
<> 132:9baf128c2fab 1546 * @param[in] *pSrcB points to the second input matrix structure
<> 132:9baf128c2fab 1547 * @param[out] *pDst points to output matrix structure
<> 132:9baf128c2fab 1548 * @return The function returns either
<> 132:9baf128c2fab 1549 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1550 */
<> 132:9baf128c2fab 1551
<> 132:9baf128c2fab 1552 arm_status arm_mat_cmplx_mult_q15(
<> 132:9baf128c2fab 1553 const arm_matrix_instance_q15 * pSrcA,
<> 132:9baf128c2fab 1554 const arm_matrix_instance_q15 * pSrcB,
<> 132:9baf128c2fab 1555 arm_matrix_instance_q15 * pDst,
<> 132:9baf128c2fab 1556 q15_t * pScratch);
<> 132:9baf128c2fab 1557
<> 132:9baf128c2fab 1558 /**
<> 132:9baf128c2fab 1559 * @brief Q31, complex, matrix multiplication.
<> 132:9baf128c2fab 1560 * @param[in] *pSrcA points to the first input matrix structure
<> 132:9baf128c2fab 1561 * @param[in] *pSrcB points to the second input matrix structure
<> 132:9baf128c2fab 1562 * @param[out] *pDst points to output matrix structure
<> 132:9baf128c2fab 1563 * @return The function returns either
<> 132:9baf128c2fab 1564 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1565 */
<> 132:9baf128c2fab 1566
<> 132:9baf128c2fab 1567 arm_status arm_mat_cmplx_mult_q31(
<> 132:9baf128c2fab 1568 const arm_matrix_instance_q31 * pSrcA,
<> 132:9baf128c2fab 1569 const arm_matrix_instance_q31 * pSrcB,
<> 132:9baf128c2fab 1570 arm_matrix_instance_q31 * pDst);
<> 132:9baf128c2fab 1571
<> 132:9baf128c2fab 1572
<> 132:9baf128c2fab 1573 /**
<> 132:9baf128c2fab 1574 * @brief Floating-point matrix transpose.
<> 132:9baf128c2fab 1575 * @param[in] *pSrc points to the input matrix
<> 132:9baf128c2fab 1576 * @param[out] *pDst points to the output matrix
<> 132:9baf128c2fab 1577 * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code>
<> 132:9baf128c2fab 1578 * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1579 */
<> 132:9baf128c2fab 1580
<> 132:9baf128c2fab 1581 arm_status arm_mat_trans_f32(
<> 132:9baf128c2fab 1582 const arm_matrix_instance_f32 * pSrc,
<> 132:9baf128c2fab 1583 arm_matrix_instance_f32 * pDst);
<> 132:9baf128c2fab 1584
<> 132:9baf128c2fab 1585
<> 132:9baf128c2fab 1586 /**
<> 132:9baf128c2fab 1587 * @brief Q15 matrix transpose.
<> 132:9baf128c2fab 1588 * @param[in] *pSrc points to the input matrix
<> 132:9baf128c2fab 1589 * @param[out] *pDst points to the output matrix
<> 132:9baf128c2fab 1590 * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code>
<> 132:9baf128c2fab 1591 * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1592 */
<> 132:9baf128c2fab 1593
<> 132:9baf128c2fab 1594 arm_status arm_mat_trans_q15(
<> 132:9baf128c2fab 1595 const arm_matrix_instance_q15 * pSrc,
<> 132:9baf128c2fab 1596 arm_matrix_instance_q15 * pDst);
<> 132:9baf128c2fab 1597
<> 132:9baf128c2fab 1598 /**
<> 132:9baf128c2fab 1599 * @brief Q31 matrix transpose.
<> 132:9baf128c2fab 1600 * @param[in] *pSrc points to the input matrix
<> 132:9baf128c2fab 1601 * @param[out] *pDst points to the output matrix
<> 132:9baf128c2fab 1602 * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code>
<> 132:9baf128c2fab 1603 * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1604 */
<> 132:9baf128c2fab 1605
<> 132:9baf128c2fab 1606 arm_status arm_mat_trans_q31(
<> 132:9baf128c2fab 1607 const arm_matrix_instance_q31 * pSrc,
<> 132:9baf128c2fab 1608 arm_matrix_instance_q31 * pDst);
<> 132:9baf128c2fab 1609
<> 132:9baf128c2fab 1610
<> 132:9baf128c2fab 1611 /**
<> 132:9baf128c2fab 1612 * @brief Floating-point matrix multiplication
<> 132:9baf128c2fab 1613 * @param[in] *pSrcA points to the first input matrix structure
<> 132:9baf128c2fab 1614 * @param[in] *pSrcB points to the second input matrix structure
<> 132:9baf128c2fab 1615 * @param[out] *pDst points to output matrix structure
<> 132:9baf128c2fab 1616 * @return The function returns either
<> 132:9baf128c2fab 1617 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1618 */
<> 132:9baf128c2fab 1619
<> 132:9baf128c2fab 1620 arm_status arm_mat_mult_f32(
<> 132:9baf128c2fab 1621 const arm_matrix_instance_f32 * pSrcA,
<> 132:9baf128c2fab 1622 const arm_matrix_instance_f32 * pSrcB,
<> 132:9baf128c2fab 1623 arm_matrix_instance_f32 * pDst);
<> 132:9baf128c2fab 1624
<> 132:9baf128c2fab 1625 /**
<> 132:9baf128c2fab 1626 * @brief Q15 matrix multiplication
<> 132:9baf128c2fab 1627 * @param[in] *pSrcA points to the first input matrix structure
<> 132:9baf128c2fab 1628 * @param[in] *pSrcB points to the second input matrix structure
<> 132:9baf128c2fab 1629 * @param[out] *pDst points to output matrix structure
<> 132:9baf128c2fab 1630 * @param[in] *pState points to the array for storing intermediate results
<> 132:9baf128c2fab 1631 * @return The function returns either
<> 132:9baf128c2fab 1632 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1633 */
<> 132:9baf128c2fab 1634
<> 132:9baf128c2fab 1635 arm_status arm_mat_mult_q15(
<> 132:9baf128c2fab 1636 const arm_matrix_instance_q15 * pSrcA,
<> 132:9baf128c2fab 1637 const arm_matrix_instance_q15 * pSrcB,
<> 132:9baf128c2fab 1638 arm_matrix_instance_q15 * pDst,
<> 132:9baf128c2fab 1639 q15_t * pState);
<> 132:9baf128c2fab 1640
<> 132:9baf128c2fab 1641 /**
<> 132:9baf128c2fab 1642 * @brief Q15 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4
<> 132:9baf128c2fab 1643 * @param[in] *pSrcA points to the first input matrix structure
<> 132:9baf128c2fab 1644 * @param[in] *pSrcB points to the second input matrix structure
<> 132:9baf128c2fab 1645 * @param[out] *pDst points to output matrix structure
<> 132:9baf128c2fab 1646 * @param[in] *pState points to the array for storing intermediate results
<> 132:9baf128c2fab 1647 * @return The function returns either
<> 132:9baf128c2fab 1648 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1649 */
<> 132:9baf128c2fab 1650
<> 132:9baf128c2fab 1651 arm_status arm_mat_mult_fast_q15(
<> 132:9baf128c2fab 1652 const arm_matrix_instance_q15 * pSrcA,
<> 132:9baf128c2fab 1653 const arm_matrix_instance_q15 * pSrcB,
<> 132:9baf128c2fab 1654 arm_matrix_instance_q15 * pDst,
<> 132:9baf128c2fab 1655 q15_t * pState);
<> 132:9baf128c2fab 1656
<> 132:9baf128c2fab 1657 /**
<> 132:9baf128c2fab 1658 * @brief Q31 matrix multiplication
<> 132:9baf128c2fab 1659 * @param[in] *pSrcA points to the first input matrix structure
<> 132:9baf128c2fab 1660 * @param[in] *pSrcB points to the second input matrix structure
<> 132:9baf128c2fab 1661 * @param[out] *pDst points to output matrix structure
<> 132:9baf128c2fab 1662 * @return The function returns either
<> 132:9baf128c2fab 1663 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1664 */
<> 132:9baf128c2fab 1665
<> 132:9baf128c2fab 1666 arm_status arm_mat_mult_q31(
<> 132:9baf128c2fab 1667 const arm_matrix_instance_q31 * pSrcA,
<> 132:9baf128c2fab 1668 const arm_matrix_instance_q31 * pSrcB,
<> 132:9baf128c2fab 1669 arm_matrix_instance_q31 * pDst);
<> 132:9baf128c2fab 1670
<> 132:9baf128c2fab 1671 /**
<> 132:9baf128c2fab 1672 * @brief Q31 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4
<> 132:9baf128c2fab 1673 * @param[in] *pSrcA points to the first input matrix structure
<> 132:9baf128c2fab 1674 * @param[in] *pSrcB points to the second input matrix structure
<> 132:9baf128c2fab 1675 * @param[out] *pDst points to output matrix structure
<> 132:9baf128c2fab 1676 * @return The function returns either
<> 132:9baf128c2fab 1677 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1678 */
<> 132:9baf128c2fab 1679
<> 132:9baf128c2fab 1680 arm_status arm_mat_mult_fast_q31(
<> 132:9baf128c2fab 1681 const arm_matrix_instance_q31 * pSrcA,
<> 132:9baf128c2fab 1682 const arm_matrix_instance_q31 * pSrcB,
<> 132:9baf128c2fab 1683 arm_matrix_instance_q31 * pDst);
<> 132:9baf128c2fab 1684
<> 132:9baf128c2fab 1685
<> 132:9baf128c2fab 1686 /**
<> 132:9baf128c2fab 1687 * @brief Floating-point matrix subtraction
<> 132:9baf128c2fab 1688 * @param[in] *pSrcA points to the first input matrix structure
<> 132:9baf128c2fab 1689 * @param[in] *pSrcB points to the second input matrix structure
<> 132:9baf128c2fab 1690 * @param[out] *pDst points to output matrix structure
<> 132:9baf128c2fab 1691 * @return The function returns either
<> 132:9baf128c2fab 1692 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1693 */
<> 132:9baf128c2fab 1694
<> 132:9baf128c2fab 1695 arm_status arm_mat_sub_f32(
<> 132:9baf128c2fab 1696 const arm_matrix_instance_f32 * pSrcA,
<> 132:9baf128c2fab 1697 const arm_matrix_instance_f32 * pSrcB,
<> 132:9baf128c2fab 1698 arm_matrix_instance_f32 * pDst);
<> 132:9baf128c2fab 1699
<> 132:9baf128c2fab 1700 /**
<> 132:9baf128c2fab 1701 * @brief Q15 matrix subtraction
<> 132:9baf128c2fab 1702 * @param[in] *pSrcA points to the first input matrix structure
<> 132:9baf128c2fab 1703 * @param[in] *pSrcB points to the second input matrix structure
<> 132:9baf128c2fab 1704 * @param[out] *pDst points to output matrix structure
<> 132:9baf128c2fab 1705 * @return The function returns either
<> 132:9baf128c2fab 1706 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1707 */
<> 132:9baf128c2fab 1708
<> 132:9baf128c2fab 1709 arm_status arm_mat_sub_q15(
<> 132:9baf128c2fab 1710 const arm_matrix_instance_q15 * pSrcA,
<> 132:9baf128c2fab 1711 const arm_matrix_instance_q15 * pSrcB,
<> 132:9baf128c2fab 1712 arm_matrix_instance_q15 * pDst);
<> 132:9baf128c2fab 1713
<> 132:9baf128c2fab 1714 /**
<> 132:9baf128c2fab 1715 * @brief Q31 matrix subtraction
<> 132:9baf128c2fab 1716 * @param[in] *pSrcA points to the first input matrix structure
<> 132:9baf128c2fab 1717 * @param[in] *pSrcB points to the second input matrix structure
<> 132:9baf128c2fab 1718 * @param[out] *pDst points to output matrix structure
<> 132:9baf128c2fab 1719 * @return The function returns either
<> 132:9baf128c2fab 1720 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1721 */
<> 132:9baf128c2fab 1722
<> 132:9baf128c2fab 1723 arm_status arm_mat_sub_q31(
<> 132:9baf128c2fab 1724 const arm_matrix_instance_q31 * pSrcA,
<> 132:9baf128c2fab 1725 const arm_matrix_instance_q31 * pSrcB,
<> 132:9baf128c2fab 1726 arm_matrix_instance_q31 * pDst);
<> 132:9baf128c2fab 1727
<> 132:9baf128c2fab 1728 /**
<> 132:9baf128c2fab 1729 * @brief Floating-point matrix scaling.
<> 132:9baf128c2fab 1730 * @param[in] *pSrc points to the input matrix
<> 132:9baf128c2fab 1731 * @param[in] scale scale factor
<> 132:9baf128c2fab 1732 * @param[out] *pDst points to the output matrix
<> 132:9baf128c2fab 1733 * @return The function returns either
<> 132:9baf128c2fab 1734 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1735 */
<> 132:9baf128c2fab 1736
<> 132:9baf128c2fab 1737 arm_status arm_mat_scale_f32(
<> 132:9baf128c2fab 1738 const arm_matrix_instance_f32 * pSrc,
<> 132:9baf128c2fab 1739 float32_t scale,
<> 132:9baf128c2fab 1740 arm_matrix_instance_f32 * pDst);
<> 132:9baf128c2fab 1741
<> 132:9baf128c2fab 1742 /**
<> 132:9baf128c2fab 1743 * @brief Q15 matrix scaling.
<> 132:9baf128c2fab 1744 * @param[in] *pSrc points to input matrix
<> 132:9baf128c2fab 1745 * @param[in] scaleFract fractional portion of the scale factor
<> 132:9baf128c2fab 1746 * @param[in] shift number of bits to shift the result by
<> 132:9baf128c2fab 1747 * @param[out] *pDst points to output matrix
<> 132:9baf128c2fab 1748 * @return The function returns either
<> 132:9baf128c2fab 1749 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1750 */
<> 132:9baf128c2fab 1751
<> 132:9baf128c2fab 1752 arm_status arm_mat_scale_q15(
<> 132:9baf128c2fab 1753 const arm_matrix_instance_q15 * pSrc,
<> 132:9baf128c2fab 1754 q15_t scaleFract,
<> 132:9baf128c2fab 1755 int32_t shift,
<> 132:9baf128c2fab 1756 arm_matrix_instance_q15 * pDst);
<> 132:9baf128c2fab 1757
<> 132:9baf128c2fab 1758 /**
<> 132:9baf128c2fab 1759 * @brief Q31 matrix scaling.
<> 132:9baf128c2fab 1760 * @param[in] *pSrc points to input matrix
<> 132:9baf128c2fab 1761 * @param[in] scaleFract fractional portion of the scale factor
<> 132:9baf128c2fab 1762 * @param[in] shift number of bits to shift the result by
<> 132:9baf128c2fab 1763 * @param[out] *pDst points to output matrix structure
<> 132:9baf128c2fab 1764 * @return The function returns either
<> 132:9baf128c2fab 1765 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 132:9baf128c2fab 1766 */
<> 132:9baf128c2fab 1767
<> 132:9baf128c2fab 1768 arm_status arm_mat_scale_q31(
<> 132:9baf128c2fab 1769 const arm_matrix_instance_q31 * pSrc,
<> 132:9baf128c2fab 1770 q31_t scaleFract,
<> 132:9baf128c2fab 1771 int32_t shift,
<> 132:9baf128c2fab 1772 arm_matrix_instance_q31 * pDst);
<> 132:9baf128c2fab 1773
<> 132:9baf128c2fab 1774
<> 132:9baf128c2fab 1775 /**
<> 132:9baf128c2fab 1776 * @brief Q31 matrix initialization.
<> 132:9baf128c2fab 1777 * @param[in,out] *S points to an instance of the floating-point matrix structure.
<> 132:9baf128c2fab 1778 * @param[in] nRows number of rows in the matrix.
<> 132:9baf128c2fab 1779 * @param[in] nColumns number of columns in the matrix.
<> 132:9baf128c2fab 1780 * @param[in] *pData points to the matrix data array.
<> 132:9baf128c2fab 1781 * @return none
<> 132:9baf128c2fab 1782 */
<> 132:9baf128c2fab 1783
<> 132:9baf128c2fab 1784 void arm_mat_init_q31(
<> 132:9baf128c2fab 1785 arm_matrix_instance_q31 * S,
<> 132:9baf128c2fab 1786 uint16_t nRows,
<> 132:9baf128c2fab 1787 uint16_t nColumns,
<> 132:9baf128c2fab 1788 q31_t * pData);
<> 132:9baf128c2fab 1789
<> 132:9baf128c2fab 1790 /**
<> 132:9baf128c2fab 1791 * @brief Q15 matrix initialization.
<> 132:9baf128c2fab 1792 * @param[in,out] *S points to an instance of the floating-point matrix structure.
<> 132:9baf128c2fab 1793 * @param[in] nRows number of rows in the matrix.
<> 132:9baf128c2fab 1794 * @param[in] nColumns number of columns in the matrix.
<> 132:9baf128c2fab 1795 * @param[in] *pData points to the matrix data array.
<> 132:9baf128c2fab 1796 * @return none
<> 132:9baf128c2fab 1797 */
<> 132:9baf128c2fab 1798
<> 132:9baf128c2fab 1799 void arm_mat_init_q15(
<> 132:9baf128c2fab 1800 arm_matrix_instance_q15 * S,
<> 132:9baf128c2fab 1801 uint16_t nRows,
<> 132:9baf128c2fab 1802 uint16_t nColumns,
<> 132:9baf128c2fab 1803 q15_t * pData);
<> 132:9baf128c2fab 1804
<> 132:9baf128c2fab 1805 /**
<> 132:9baf128c2fab 1806 * @brief Floating-point matrix initialization.
<> 132:9baf128c2fab 1807 * @param[in,out] *S points to an instance of the floating-point matrix structure.
<> 132:9baf128c2fab 1808 * @param[in] nRows number of rows in the matrix.
<> 132:9baf128c2fab 1809 * @param[in] nColumns number of columns in the matrix.
<> 132:9baf128c2fab 1810 * @param[in] *pData points to the matrix data array.
<> 132:9baf128c2fab 1811 * @return none
<> 132:9baf128c2fab 1812 */
<> 132:9baf128c2fab 1813
<> 132:9baf128c2fab 1814 void arm_mat_init_f32(
<> 132:9baf128c2fab 1815 arm_matrix_instance_f32 * S,
<> 132:9baf128c2fab 1816 uint16_t nRows,
<> 132:9baf128c2fab 1817 uint16_t nColumns,
<> 132:9baf128c2fab 1818 float32_t * pData);
<> 132:9baf128c2fab 1819
<> 132:9baf128c2fab 1820
<> 132:9baf128c2fab 1821
<> 132:9baf128c2fab 1822 /**
<> 132:9baf128c2fab 1823 * @brief Instance structure for the Q15 PID Control.
<> 132:9baf128c2fab 1824 */
<> 132:9baf128c2fab 1825 typedef struct
<> 132:9baf128c2fab 1826 {
<> 132:9baf128c2fab 1827 q15_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
<> 132:9baf128c2fab 1828 #ifdef ARM_MATH_CM0_FAMILY
<> 132:9baf128c2fab 1829 q15_t A1;
<> 132:9baf128c2fab 1830 q15_t A2;
<> 132:9baf128c2fab 1831 #else
<> 132:9baf128c2fab 1832 q31_t A1; /**< The derived gain A1 = -Kp - 2Kd | Kd.*/
<> 132:9baf128c2fab 1833 #endif
<> 132:9baf128c2fab 1834 q15_t state[3]; /**< The state array of length 3. */
<> 132:9baf128c2fab 1835 q15_t Kp; /**< The proportional gain. */
<> 132:9baf128c2fab 1836 q15_t Ki; /**< The integral gain. */
<> 132:9baf128c2fab 1837 q15_t Kd; /**< The derivative gain. */
<> 132:9baf128c2fab 1838 } arm_pid_instance_q15;
<> 132:9baf128c2fab 1839
<> 132:9baf128c2fab 1840 /**
<> 132:9baf128c2fab 1841 * @brief Instance structure for the Q31 PID Control.
<> 132:9baf128c2fab 1842 */
<> 132:9baf128c2fab 1843 typedef struct
<> 132:9baf128c2fab 1844 {
<> 132:9baf128c2fab 1845 q31_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
<> 132:9baf128c2fab 1846 q31_t A1; /**< The derived gain, A1 = -Kp - 2Kd. */
<> 132:9baf128c2fab 1847 q31_t A2; /**< The derived gain, A2 = Kd . */
<> 132:9baf128c2fab 1848 q31_t state[3]; /**< The state array of length 3. */
<> 132:9baf128c2fab 1849 q31_t Kp; /**< The proportional gain. */
<> 132:9baf128c2fab 1850 q31_t Ki; /**< The integral gain. */
<> 132:9baf128c2fab 1851 q31_t Kd; /**< The derivative gain. */
<> 132:9baf128c2fab 1852
<> 132:9baf128c2fab 1853 } arm_pid_instance_q31;
<> 132:9baf128c2fab 1854
<> 132:9baf128c2fab 1855 /**
<> 132:9baf128c2fab 1856 * @brief Instance structure for the floating-point PID Control.
<> 132:9baf128c2fab 1857 */
<> 132:9baf128c2fab 1858 typedef struct
<> 132:9baf128c2fab 1859 {
<> 132:9baf128c2fab 1860 float32_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
<> 132:9baf128c2fab 1861 float32_t A1; /**< The derived gain, A1 = -Kp - 2Kd. */
<> 132:9baf128c2fab 1862 float32_t A2; /**< The derived gain, A2 = Kd . */
<> 132:9baf128c2fab 1863 float32_t state[3]; /**< The state array of length 3. */
<> 132:9baf128c2fab 1864 float32_t Kp; /**< The proportional gain. */
<> 132:9baf128c2fab 1865 float32_t Ki; /**< The integral gain. */
<> 132:9baf128c2fab 1866 float32_t Kd; /**< The derivative gain. */
<> 132:9baf128c2fab 1867 } arm_pid_instance_f32;
<> 132:9baf128c2fab 1868
<> 132:9baf128c2fab 1869
<> 132:9baf128c2fab 1870
<> 132:9baf128c2fab 1871 /**
<> 132:9baf128c2fab 1872 * @brief Initialization function for the floating-point PID Control.
<> 132:9baf128c2fab 1873 * @param[in,out] *S points to an instance of the PID structure.
<> 132:9baf128c2fab 1874 * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state.
<> 132:9baf128c2fab 1875 * @return none.
<> 132:9baf128c2fab 1876 */
<> 132:9baf128c2fab 1877 void arm_pid_init_f32(
<> 132:9baf128c2fab 1878 arm_pid_instance_f32 * S,
<> 132:9baf128c2fab 1879 int32_t resetStateFlag);
<> 132:9baf128c2fab 1880
<> 132:9baf128c2fab 1881 /**
<> 132:9baf128c2fab 1882 * @brief Reset function for the floating-point PID Control.
<> 132:9baf128c2fab 1883 * @param[in,out] *S is an instance of the floating-point PID Control structure
<> 132:9baf128c2fab 1884 * @return none
<> 132:9baf128c2fab 1885 */
<> 132:9baf128c2fab 1886 void arm_pid_reset_f32(
<> 132:9baf128c2fab 1887 arm_pid_instance_f32 * S);
<> 132:9baf128c2fab 1888
<> 132:9baf128c2fab 1889
<> 132:9baf128c2fab 1890 /**
<> 132:9baf128c2fab 1891 * @brief Initialization function for the Q31 PID Control.
<> 132:9baf128c2fab 1892 * @param[in,out] *S points to an instance of the Q15 PID structure.
<> 132:9baf128c2fab 1893 * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state.
<> 132:9baf128c2fab 1894 * @return none.
<> 132:9baf128c2fab 1895 */
<> 132:9baf128c2fab 1896 void arm_pid_init_q31(
<> 132:9baf128c2fab 1897 arm_pid_instance_q31 * S,
<> 132:9baf128c2fab 1898 int32_t resetStateFlag);
<> 132:9baf128c2fab 1899
<> 132:9baf128c2fab 1900
<> 132:9baf128c2fab 1901 /**
<> 132:9baf128c2fab 1902 * @brief Reset function for the Q31 PID Control.
<> 132:9baf128c2fab 1903 * @param[in,out] *S points to an instance of the Q31 PID Control structure
<> 132:9baf128c2fab 1904 * @return none
<> 132:9baf128c2fab 1905 */
<> 132:9baf128c2fab 1906
<> 132:9baf128c2fab 1907 void arm_pid_reset_q31(
<> 132:9baf128c2fab 1908 arm_pid_instance_q31 * S);
<> 132:9baf128c2fab 1909
<> 132:9baf128c2fab 1910 /**
<> 132:9baf128c2fab 1911 * @brief Initialization function for the Q15 PID Control.
<> 132:9baf128c2fab 1912 * @param[in,out] *S points to an instance of the Q15 PID structure.
<> 132:9baf128c2fab 1913 * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state.
<> 132:9baf128c2fab 1914 * @return none.
<> 132:9baf128c2fab 1915 */
<> 132:9baf128c2fab 1916 void arm_pid_init_q15(
<> 132:9baf128c2fab 1917 arm_pid_instance_q15 * S,
<> 132:9baf128c2fab 1918 int32_t resetStateFlag);
<> 132:9baf128c2fab 1919
<> 132:9baf128c2fab 1920 /**
<> 132:9baf128c2fab 1921 * @brief Reset function for the Q15 PID Control.
<> 132:9baf128c2fab 1922 * @param[in,out] *S points to an instance of the q15 PID Control structure
<> 132:9baf128c2fab 1923 * @return none
<> 132:9baf128c2fab 1924 */
<> 132:9baf128c2fab 1925 void arm_pid_reset_q15(
<> 132:9baf128c2fab 1926 arm_pid_instance_q15 * S);
<> 132:9baf128c2fab 1927
<> 132:9baf128c2fab 1928
<> 132:9baf128c2fab 1929 /**
<> 132:9baf128c2fab 1930 * @brief Instance structure for the floating-point Linear Interpolate function.
<> 132:9baf128c2fab 1931 */
<> 132:9baf128c2fab 1932 typedef struct
<> 132:9baf128c2fab 1933 {
<> 132:9baf128c2fab 1934 uint32_t nValues; /**< nValues */
<> 132:9baf128c2fab 1935 float32_t x1; /**< x1 */
<> 132:9baf128c2fab 1936 float32_t xSpacing; /**< xSpacing */
<> 132:9baf128c2fab 1937 float32_t *pYData; /**< pointer to the table of Y values */
<> 132:9baf128c2fab 1938 } arm_linear_interp_instance_f32;
<> 132:9baf128c2fab 1939
<> 132:9baf128c2fab 1940 /**
<> 132:9baf128c2fab 1941 * @brief Instance structure for the floating-point bilinear interpolation function.
<> 132:9baf128c2fab 1942 */
<> 132:9baf128c2fab 1943
<> 132:9baf128c2fab 1944 typedef struct
<> 132:9baf128c2fab 1945 {
<> 132:9baf128c2fab 1946 uint16_t numRows; /**< number of rows in the data table. */
<> 132:9baf128c2fab 1947 uint16_t numCols; /**< number of columns in the data table. */
<> 132:9baf128c2fab 1948 float32_t *pData; /**< points to the data table. */
<> 132:9baf128c2fab 1949 } arm_bilinear_interp_instance_f32;
<> 132:9baf128c2fab 1950
<> 132:9baf128c2fab 1951 /**
<> 132:9baf128c2fab 1952 * @brief Instance structure for the Q31 bilinear interpolation function.
<> 132:9baf128c2fab 1953 */
<> 132:9baf128c2fab 1954
<> 132:9baf128c2fab 1955 typedef struct
<> 132:9baf128c2fab 1956 {
<> 132:9baf128c2fab 1957 uint16_t numRows; /**< number of rows in the data table. */
<> 132:9baf128c2fab 1958 uint16_t numCols; /**< number of columns in the data table. */
<> 132:9baf128c2fab 1959 q31_t *pData; /**< points to the data table. */
<> 132:9baf128c2fab 1960 } arm_bilinear_interp_instance_q31;
<> 132:9baf128c2fab 1961
<> 132:9baf128c2fab 1962 /**
<> 132:9baf128c2fab 1963 * @brief Instance structure for the Q15 bilinear interpolation function.
<> 132:9baf128c2fab 1964 */
<> 132:9baf128c2fab 1965
<> 132:9baf128c2fab 1966 typedef struct
<> 132:9baf128c2fab 1967 {
<> 132:9baf128c2fab 1968 uint16_t numRows; /**< number of rows in the data table. */
<> 132:9baf128c2fab 1969 uint16_t numCols; /**< number of columns in the data table. */
<> 132:9baf128c2fab 1970 q15_t *pData; /**< points to the data table. */
<> 132:9baf128c2fab 1971 } arm_bilinear_interp_instance_q15;
<> 132:9baf128c2fab 1972
<> 132:9baf128c2fab 1973 /**
<> 132:9baf128c2fab 1974 * @brief Instance structure for the Q15 bilinear interpolation function.
<> 132:9baf128c2fab 1975 */
<> 132:9baf128c2fab 1976
<> 132:9baf128c2fab 1977 typedef struct
<> 132:9baf128c2fab 1978 {
<> 132:9baf128c2fab 1979 uint16_t numRows; /**< number of rows in the data table. */
<> 132:9baf128c2fab 1980 uint16_t numCols; /**< number of columns in the data table. */
<> 132:9baf128c2fab 1981 q7_t *pData; /**< points to the data table. */
<> 132:9baf128c2fab 1982 } arm_bilinear_interp_instance_q7;
<> 132:9baf128c2fab 1983
<> 132:9baf128c2fab 1984
<> 132:9baf128c2fab 1985 /**
<> 132:9baf128c2fab 1986 * @brief Q7 vector multiplication.
<> 132:9baf128c2fab 1987 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 1988 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 1989 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 1990 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 1991 * @return none.
<> 132:9baf128c2fab 1992 */
<> 132:9baf128c2fab 1993
<> 132:9baf128c2fab 1994 void arm_mult_q7(
<> 132:9baf128c2fab 1995 q7_t * pSrcA,
<> 132:9baf128c2fab 1996 q7_t * pSrcB,
<> 132:9baf128c2fab 1997 q7_t * pDst,
<> 132:9baf128c2fab 1998 uint32_t blockSize);
<> 132:9baf128c2fab 1999
<> 132:9baf128c2fab 2000 /**
<> 132:9baf128c2fab 2001 * @brief Q15 vector multiplication.
<> 132:9baf128c2fab 2002 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 2003 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 2004 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2005 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2006 * @return none.
<> 132:9baf128c2fab 2007 */
<> 132:9baf128c2fab 2008
<> 132:9baf128c2fab 2009 void arm_mult_q15(
<> 132:9baf128c2fab 2010 q15_t * pSrcA,
<> 132:9baf128c2fab 2011 q15_t * pSrcB,
<> 132:9baf128c2fab 2012 q15_t * pDst,
<> 132:9baf128c2fab 2013 uint32_t blockSize);
<> 132:9baf128c2fab 2014
<> 132:9baf128c2fab 2015 /**
<> 132:9baf128c2fab 2016 * @brief Q31 vector multiplication.
<> 132:9baf128c2fab 2017 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 2018 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 2019 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2020 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2021 * @return none.
<> 132:9baf128c2fab 2022 */
<> 132:9baf128c2fab 2023
<> 132:9baf128c2fab 2024 void arm_mult_q31(
<> 132:9baf128c2fab 2025 q31_t * pSrcA,
<> 132:9baf128c2fab 2026 q31_t * pSrcB,
<> 132:9baf128c2fab 2027 q31_t * pDst,
<> 132:9baf128c2fab 2028 uint32_t blockSize);
<> 132:9baf128c2fab 2029
<> 132:9baf128c2fab 2030 /**
<> 132:9baf128c2fab 2031 * @brief Floating-point vector multiplication.
<> 132:9baf128c2fab 2032 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 2033 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 2034 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2035 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2036 * @return none.
<> 132:9baf128c2fab 2037 */
<> 132:9baf128c2fab 2038
<> 132:9baf128c2fab 2039 void arm_mult_f32(
<> 132:9baf128c2fab 2040 float32_t * pSrcA,
<> 132:9baf128c2fab 2041 float32_t * pSrcB,
<> 132:9baf128c2fab 2042 float32_t * pDst,
<> 132:9baf128c2fab 2043 uint32_t blockSize);
<> 132:9baf128c2fab 2044
<> 132:9baf128c2fab 2045
<> 132:9baf128c2fab 2046
<> 132:9baf128c2fab 2047
<> 132:9baf128c2fab 2048
<> 132:9baf128c2fab 2049
<> 132:9baf128c2fab 2050 /**
<> 132:9baf128c2fab 2051 * @brief Instance structure for the Q15 CFFT/CIFFT function.
<> 132:9baf128c2fab 2052 */
<> 132:9baf128c2fab 2053
<> 132:9baf128c2fab 2054 typedef struct
<> 132:9baf128c2fab 2055 {
<> 132:9baf128c2fab 2056 uint16_t fftLen; /**< length of the FFT. */
<> 132:9baf128c2fab 2057 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 132:9baf128c2fab 2058 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 132:9baf128c2fab 2059 q15_t *pTwiddle; /**< points to the Sin twiddle factor table. */
<> 132:9baf128c2fab 2060 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 132:9baf128c2fab 2061 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 132:9baf128c2fab 2062 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 132:9baf128c2fab 2063 } arm_cfft_radix2_instance_q15;
<> 132:9baf128c2fab 2064
<> 132:9baf128c2fab 2065 /* Deprecated */
<> 132:9baf128c2fab 2066 arm_status arm_cfft_radix2_init_q15(
<> 132:9baf128c2fab 2067 arm_cfft_radix2_instance_q15 * S,
<> 132:9baf128c2fab 2068 uint16_t fftLen,
<> 132:9baf128c2fab 2069 uint8_t ifftFlag,
<> 132:9baf128c2fab 2070 uint8_t bitReverseFlag);
<> 132:9baf128c2fab 2071
<> 132:9baf128c2fab 2072 /* Deprecated */
<> 132:9baf128c2fab 2073 void arm_cfft_radix2_q15(
<> 132:9baf128c2fab 2074 const arm_cfft_radix2_instance_q15 * S,
<> 132:9baf128c2fab 2075 q15_t * pSrc);
<> 132:9baf128c2fab 2076
<> 132:9baf128c2fab 2077
<> 132:9baf128c2fab 2078
<> 132:9baf128c2fab 2079 /**
<> 132:9baf128c2fab 2080 * @brief Instance structure for the Q15 CFFT/CIFFT function.
<> 132:9baf128c2fab 2081 */
<> 132:9baf128c2fab 2082
<> 132:9baf128c2fab 2083 typedef struct
<> 132:9baf128c2fab 2084 {
<> 132:9baf128c2fab 2085 uint16_t fftLen; /**< length of the FFT. */
<> 132:9baf128c2fab 2086 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 132:9baf128c2fab 2087 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 132:9baf128c2fab 2088 q15_t *pTwiddle; /**< points to the twiddle factor table. */
<> 132:9baf128c2fab 2089 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 132:9baf128c2fab 2090 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 132:9baf128c2fab 2091 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 132:9baf128c2fab 2092 } arm_cfft_radix4_instance_q15;
<> 132:9baf128c2fab 2093
<> 132:9baf128c2fab 2094 /* Deprecated */
<> 132:9baf128c2fab 2095 arm_status arm_cfft_radix4_init_q15(
<> 132:9baf128c2fab 2096 arm_cfft_radix4_instance_q15 * S,
<> 132:9baf128c2fab 2097 uint16_t fftLen,
<> 132:9baf128c2fab 2098 uint8_t ifftFlag,
<> 132:9baf128c2fab 2099 uint8_t bitReverseFlag);
<> 132:9baf128c2fab 2100
<> 132:9baf128c2fab 2101 /* Deprecated */
<> 132:9baf128c2fab 2102 void arm_cfft_radix4_q15(
<> 132:9baf128c2fab 2103 const arm_cfft_radix4_instance_q15 * S,
<> 132:9baf128c2fab 2104 q15_t * pSrc);
<> 132:9baf128c2fab 2105
<> 132:9baf128c2fab 2106 /**
<> 132:9baf128c2fab 2107 * @brief Instance structure for the Radix-2 Q31 CFFT/CIFFT function.
<> 132:9baf128c2fab 2108 */
<> 132:9baf128c2fab 2109
<> 132:9baf128c2fab 2110 typedef struct
<> 132:9baf128c2fab 2111 {
<> 132:9baf128c2fab 2112 uint16_t fftLen; /**< length of the FFT. */
<> 132:9baf128c2fab 2113 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 132:9baf128c2fab 2114 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 132:9baf128c2fab 2115 q31_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 132:9baf128c2fab 2116 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 132:9baf128c2fab 2117 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 132:9baf128c2fab 2118 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 132:9baf128c2fab 2119 } arm_cfft_radix2_instance_q31;
<> 132:9baf128c2fab 2120
<> 132:9baf128c2fab 2121 /* Deprecated */
<> 132:9baf128c2fab 2122 arm_status arm_cfft_radix2_init_q31(
<> 132:9baf128c2fab 2123 arm_cfft_radix2_instance_q31 * S,
<> 132:9baf128c2fab 2124 uint16_t fftLen,
<> 132:9baf128c2fab 2125 uint8_t ifftFlag,
<> 132:9baf128c2fab 2126 uint8_t bitReverseFlag);
<> 132:9baf128c2fab 2127
<> 132:9baf128c2fab 2128 /* Deprecated */
<> 132:9baf128c2fab 2129 void arm_cfft_radix2_q31(
<> 132:9baf128c2fab 2130 const arm_cfft_radix2_instance_q31 * S,
<> 132:9baf128c2fab 2131 q31_t * pSrc);
<> 132:9baf128c2fab 2132
<> 132:9baf128c2fab 2133 /**
<> 132:9baf128c2fab 2134 * @brief Instance structure for the Q31 CFFT/CIFFT function.
<> 132:9baf128c2fab 2135 */
<> 132:9baf128c2fab 2136
<> 132:9baf128c2fab 2137 typedef struct
<> 132:9baf128c2fab 2138 {
<> 132:9baf128c2fab 2139 uint16_t fftLen; /**< length of the FFT. */
<> 132:9baf128c2fab 2140 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 132:9baf128c2fab 2141 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 132:9baf128c2fab 2142 q31_t *pTwiddle; /**< points to the twiddle factor table. */
<> 132:9baf128c2fab 2143 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 132:9baf128c2fab 2144 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 132:9baf128c2fab 2145 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 132:9baf128c2fab 2146 } arm_cfft_radix4_instance_q31;
<> 132:9baf128c2fab 2147
<> 132:9baf128c2fab 2148 /* Deprecated */
<> 132:9baf128c2fab 2149 void arm_cfft_radix4_q31(
<> 132:9baf128c2fab 2150 const arm_cfft_radix4_instance_q31 * S,
<> 132:9baf128c2fab 2151 q31_t * pSrc);
<> 132:9baf128c2fab 2152
<> 132:9baf128c2fab 2153 /* Deprecated */
<> 132:9baf128c2fab 2154 arm_status arm_cfft_radix4_init_q31(
<> 132:9baf128c2fab 2155 arm_cfft_radix4_instance_q31 * S,
<> 132:9baf128c2fab 2156 uint16_t fftLen,
<> 132:9baf128c2fab 2157 uint8_t ifftFlag,
<> 132:9baf128c2fab 2158 uint8_t bitReverseFlag);
<> 132:9baf128c2fab 2159
<> 132:9baf128c2fab 2160 /**
<> 132:9baf128c2fab 2161 * @brief Instance structure for the floating-point CFFT/CIFFT function.
<> 132:9baf128c2fab 2162 */
<> 132:9baf128c2fab 2163
<> 132:9baf128c2fab 2164 typedef struct
<> 132:9baf128c2fab 2165 {
<> 132:9baf128c2fab 2166 uint16_t fftLen; /**< length of the FFT. */
<> 132:9baf128c2fab 2167 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 132:9baf128c2fab 2168 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 132:9baf128c2fab 2169 float32_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 132:9baf128c2fab 2170 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 132:9baf128c2fab 2171 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 132:9baf128c2fab 2172 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 132:9baf128c2fab 2173 float32_t onebyfftLen; /**< value of 1/fftLen. */
<> 132:9baf128c2fab 2174 } arm_cfft_radix2_instance_f32;
<> 132:9baf128c2fab 2175
<> 132:9baf128c2fab 2176 /* Deprecated */
<> 132:9baf128c2fab 2177 arm_status arm_cfft_radix2_init_f32(
<> 132:9baf128c2fab 2178 arm_cfft_radix2_instance_f32 * S,
<> 132:9baf128c2fab 2179 uint16_t fftLen,
<> 132:9baf128c2fab 2180 uint8_t ifftFlag,
<> 132:9baf128c2fab 2181 uint8_t bitReverseFlag);
<> 132:9baf128c2fab 2182
<> 132:9baf128c2fab 2183 /* Deprecated */
<> 132:9baf128c2fab 2184 void arm_cfft_radix2_f32(
<> 132:9baf128c2fab 2185 const arm_cfft_radix2_instance_f32 * S,
<> 132:9baf128c2fab 2186 float32_t * pSrc);
<> 132:9baf128c2fab 2187
<> 132:9baf128c2fab 2188 /**
<> 132:9baf128c2fab 2189 * @brief Instance structure for the floating-point CFFT/CIFFT function.
<> 132:9baf128c2fab 2190 */
<> 132:9baf128c2fab 2191
<> 132:9baf128c2fab 2192 typedef struct
<> 132:9baf128c2fab 2193 {
<> 132:9baf128c2fab 2194 uint16_t fftLen; /**< length of the FFT. */
<> 132:9baf128c2fab 2195 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 132:9baf128c2fab 2196 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 132:9baf128c2fab 2197 float32_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 132:9baf128c2fab 2198 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 132:9baf128c2fab 2199 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 132:9baf128c2fab 2200 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 132:9baf128c2fab 2201 float32_t onebyfftLen; /**< value of 1/fftLen. */
<> 132:9baf128c2fab 2202 } arm_cfft_radix4_instance_f32;
<> 132:9baf128c2fab 2203
<> 132:9baf128c2fab 2204 /* Deprecated */
<> 132:9baf128c2fab 2205 arm_status arm_cfft_radix4_init_f32(
<> 132:9baf128c2fab 2206 arm_cfft_radix4_instance_f32 * S,
<> 132:9baf128c2fab 2207 uint16_t fftLen,
<> 132:9baf128c2fab 2208 uint8_t ifftFlag,
<> 132:9baf128c2fab 2209 uint8_t bitReverseFlag);
<> 132:9baf128c2fab 2210
<> 132:9baf128c2fab 2211 /* Deprecated */
<> 132:9baf128c2fab 2212 void arm_cfft_radix4_f32(
<> 132:9baf128c2fab 2213 const arm_cfft_radix4_instance_f32 * S,
<> 132:9baf128c2fab 2214 float32_t * pSrc);
<> 132:9baf128c2fab 2215
<> 132:9baf128c2fab 2216 /**
<> 132:9baf128c2fab 2217 * @brief Instance structure for the fixed-point CFFT/CIFFT function.
<> 132:9baf128c2fab 2218 */
<> 132:9baf128c2fab 2219
<> 132:9baf128c2fab 2220 typedef struct
<> 132:9baf128c2fab 2221 {
<> 132:9baf128c2fab 2222 uint16_t fftLen; /**< length of the FFT. */
<> 132:9baf128c2fab 2223 const q15_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 132:9baf128c2fab 2224 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 132:9baf128c2fab 2225 uint16_t bitRevLength; /**< bit reversal table length. */
<> 132:9baf128c2fab 2226 } arm_cfft_instance_q15;
<> 132:9baf128c2fab 2227
<> 132:9baf128c2fab 2228 void arm_cfft_q15(
<> 132:9baf128c2fab 2229 const arm_cfft_instance_q15 * S,
<> 132:9baf128c2fab 2230 q15_t * p1,
<> 132:9baf128c2fab 2231 uint8_t ifftFlag,
<> 132:9baf128c2fab 2232 uint8_t bitReverseFlag);
<> 132:9baf128c2fab 2233
<> 132:9baf128c2fab 2234 /**
<> 132:9baf128c2fab 2235 * @brief Instance structure for the fixed-point CFFT/CIFFT function.
<> 132:9baf128c2fab 2236 */
<> 132:9baf128c2fab 2237
<> 132:9baf128c2fab 2238 typedef struct
<> 132:9baf128c2fab 2239 {
<> 132:9baf128c2fab 2240 uint16_t fftLen; /**< length of the FFT. */
<> 132:9baf128c2fab 2241 const q31_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 132:9baf128c2fab 2242 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 132:9baf128c2fab 2243 uint16_t bitRevLength; /**< bit reversal table length. */
<> 132:9baf128c2fab 2244 } arm_cfft_instance_q31;
<> 132:9baf128c2fab 2245
<> 132:9baf128c2fab 2246 void arm_cfft_q31(
<> 132:9baf128c2fab 2247 const arm_cfft_instance_q31 * S,
<> 132:9baf128c2fab 2248 q31_t * p1,
<> 132:9baf128c2fab 2249 uint8_t ifftFlag,
<> 132:9baf128c2fab 2250 uint8_t bitReverseFlag);
<> 132:9baf128c2fab 2251
<> 132:9baf128c2fab 2252 /**
<> 132:9baf128c2fab 2253 * @brief Instance structure for the floating-point CFFT/CIFFT function.
<> 132:9baf128c2fab 2254 */
<> 132:9baf128c2fab 2255
<> 132:9baf128c2fab 2256 typedef struct
<> 132:9baf128c2fab 2257 {
<> 132:9baf128c2fab 2258 uint16_t fftLen; /**< length of the FFT. */
<> 132:9baf128c2fab 2259 const float32_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 132:9baf128c2fab 2260 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 132:9baf128c2fab 2261 uint16_t bitRevLength; /**< bit reversal table length. */
<> 132:9baf128c2fab 2262 } arm_cfft_instance_f32;
<> 132:9baf128c2fab 2263
<> 132:9baf128c2fab 2264 void arm_cfft_f32(
<> 132:9baf128c2fab 2265 const arm_cfft_instance_f32 * S,
<> 132:9baf128c2fab 2266 float32_t * p1,
<> 132:9baf128c2fab 2267 uint8_t ifftFlag,
<> 132:9baf128c2fab 2268 uint8_t bitReverseFlag);
<> 132:9baf128c2fab 2269
<> 132:9baf128c2fab 2270 /**
<> 132:9baf128c2fab 2271 * @brief Instance structure for the Q15 RFFT/RIFFT function.
<> 132:9baf128c2fab 2272 */
<> 132:9baf128c2fab 2273
<> 132:9baf128c2fab 2274 typedef struct
<> 132:9baf128c2fab 2275 {
<> 132:9baf128c2fab 2276 uint32_t fftLenReal; /**< length of the real FFT. */
<> 132:9baf128c2fab 2277 uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
<> 132:9baf128c2fab 2278 uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
<> 132:9baf128c2fab 2279 uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 132:9baf128c2fab 2280 q15_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
<> 132:9baf128c2fab 2281 q15_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
<> 132:9baf128c2fab 2282 const arm_cfft_instance_q15 *pCfft; /**< points to the complex FFT instance. */
<> 132:9baf128c2fab 2283 } arm_rfft_instance_q15;
<> 132:9baf128c2fab 2284
<> 132:9baf128c2fab 2285 arm_status arm_rfft_init_q15(
<> 132:9baf128c2fab 2286 arm_rfft_instance_q15 * S,
<> 132:9baf128c2fab 2287 uint32_t fftLenReal,
<> 132:9baf128c2fab 2288 uint32_t ifftFlagR,
<> 132:9baf128c2fab 2289 uint32_t bitReverseFlag);
<> 132:9baf128c2fab 2290
<> 132:9baf128c2fab 2291 void arm_rfft_q15(
<> 132:9baf128c2fab 2292 const arm_rfft_instance_q15 * S,
<> 132:9baf128c2fab 2293 q15_t * pSrc,
<> 132:9baf128c2fab 2294 q15_t * pDst);
<> 132:9baf128c2fab 2295
<> 132:9baf128c2fab 2296 /**
<> 132:9baf128c2fab 2297 * @brief Instance structure for the Q31 RFFT/RIFFT function.
<> 132:9baf128c2fab 2298 */
<> 132:9baf128c2fab 2299
<> 132:9baf128c2fab 2300 typedef struct
<> 132:9baf128c2fab 2301 {
<> 132:9baf128c2fab 2302 uint32_t fftLenReal; /**< length of the real FFT. */
<> 132:9baf128c2fab 2303 uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
<> 132:9baf128c2fab 2304 uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
<> 132:9baf128c2fab 2305 uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 132:9baf128c2fab 2306 q31_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
<> 132:9baf128c2fab 2307 q31_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
<> 132:9baf128c2fab 2308 const arm_cfft_instance_q31 *pCfft; /**< points to the complex FFT instance. */
<> 132:9baf128c2fab 2309 } arm_rfft_instance_q31;
<> 132:9baf128c2fab 2310
<> 132:9baf128c2fab 2311 arm_status arm_rfft_init_q31(
<> 132:9baf128c2fab 2312 arm_rfft_instance_q31 * S,
<> 132:9baf128c2fab 2313 uint32_t fftLenReal,
<> 132:9baf128c2fab 2314 uint32_t ifftFlagR,
<> 132:9baf128c2fab 2315 uint32_t bitReverseFlag);
<> 132:9baf128c2fab 2316
<> 132:9baf128c2fab 2317 void arm_rfft_q31(
<> 132:9baf128c2fab 2318 const arm_rfft_instance_q31 * S,
<> 132:9baf128c2fab 2319 q31_t * pSrc,
<> 132:9baf128c2fab 2320 q31_t * pDst);
<> 132:9baf128c2fab 2321
<> 132:9baf128c2fab 2322 /**
<> 132:9baf128c2fab 2323 * @brief Instance structure for the floating-point RFFT/RIFFT function.
<> 132:9baf128c2fab 2324 */
<> 132:9baf128c2fab 2325
<> 132:9baf128c2fab 2326 typedef struct
<> 132:9baf128c2fab 2327 {
<> 132:9baf128c2fab 2328 uint32_t fftLenReal; /**< length of the real FFT. */
<> 132:9baf128c2fab 2329 uint16_t fftLenBy2; /**< length of the complex FFT. */
<> 132:9baf128c2fab 2330 uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
<> 132:9baf128c2fab 2331 uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
<> 132:9baf128c2fab 2332 uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 132:9baf128c2fab 2333 float32_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
<> 132:9baf128c2fab 2334 float32_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
<> 132:9baf128c2fab 2335 arm_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */
<> 132:9baf128c2fab 2336 } arm_rfft_instance_f32;
<> 132:9baf128c2fab 2337
<> 132:9baf128c2fab 2338 arm_status arm_rfft_init_f32(
<> 132:9baf128c2fab 2339 arm_rfft_instance_f32 * S,
<> 132:9baf128c2fab 2340 arm_cfft_radix4_instance_f32 * S_CFFT,
<> 132:9baf128c2fab 2341 uint32_t fftLenReal,
<> 132:9baf128c2fab 2342 uint32_t ifftFlagR,
<> 132:9baf128c2fab 2343 uint32_t bitReverseFlag);
<> 132:9baf128c2fab 2344
<> 132:9baf128c2fab 2345 void arm_rfft_f32(
<> 132:9baf128c2fab 2346 const arm_rfft_instance_f32 * S,
<> 132:9baf128c2fab 2347 float32_t * pSrc,
<> 132:9baf128c2fab 2348 float32_t * pDst);
<> 132:9baf128c2fab 2349
<> 132:9baf128c2fab 2350 /**
<> 132:9baf128c2fab 2351 * @brief Instance structure for the floating-point RFFT/RIFFT function.
<> 132:9baf128c2fab 2352 */
<> 132:9baf128c2fab 2353
<> 132:9baf128c2fab 2354 typedef struct
<> 132:9baf128c2fab 2355 {
<> 132:9baf128c2fab 2356 arm_cfft_instance_f32 Sint; /**< Internal CFFT structure. */
<> 132:9baf128c2fab 2357 uint16_t fftLenRFFT; /**< length of the real sequence */
<> 132:9baf128c2fab 2358 float32_t * pTwiddleRFFT; /**< Twiddle factors real stage */
<> 132:9baf128c2fab 2359 } arm_rfft_fast_instance_f32 ;
<> 132:9baf128c2fab 2360
<> 132:9baf128c2fab 2361 arm_status arm_rfft_fast_init_f32 (
<> 132:9baf128c2fab 2362 arm_rfft_fast_instance_f32 * S,
<> 132:9baf128c2fab 2363 uint16_t fftLen);
<> 132:9baf128c2fab 2364
<> 132:9baf128c2fab 2365 void arm_rfft_fast_f32(
<> 132:9baf128c2fab 2366 arm_rfft_fast_instance_f32 * S,
<> 132:9baf128c2fab 2367 float32_t * p, float32_t * pOut,
<> 132:9baf128c2fab 2368 uint8_t ifftFlag);
<> 132:9baf128c2fab 2369
<> 132:9baf128c2fab 2370 /**
<> 132:9baf128c2fab 2371 * @brief Instance structure for the floating-point DCT4/IDCT4 function.
<> 132:9baf128c2fab 2372 */
<> 132:9baf128c2fab 2373
<> 132:9baf128c2fab 2374 typedef struct
<> 132:9baf128c2fab 2375 {
<> 132:9baf128c2fab 2376 uint16_t N; /**< length of the DCT4. */
<> 132:9baf128c2fab 2377 uint16_t Nby2; /**< half of the length of the DCT4. */
<> 132:9baf128c2fab 2378 float32_t normalize; /**< normalizing factor. */
<> 132:9baf128c2fab 2379 float32_t *pTwiddle; /**< points to the twiddle factor table. */
<> 132:9baf128c2fab 2380 float32_t *pCosFactor; /**< points to the cosFactor table. */
<> 132:9baf128c2fab 2381 arm_rfft_instance_f32 *pRfft; /**< points to the real FFT instance. */
<> 132:9baf128c2fab 2382 arm_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */
<> 132:9baf128c2fab 2383 } arm_dct4_instance_f32;
<> 132:9baf128c2fab 2384
<> 132:9baf128c2fab 2385 /**
<> 132:9baf128c2fab 2386 * @brief Initialization function for the floating-point DCT4/IDCT4.
<> 132:9baf128c2fab 2387 * @param[in,out] *S points to an instance of floating-point DCT4/IDCT4 structure.
<> 132:9baf128c2fab 2388 * @param[in] *S_RFFT points to an instance of floating-point RFFT/RIFFT structure.
<> 132:9baf128c2fab 2389 * @param[in] *S_CFFT points to an instance of floating-point CFFT/CIFFT structure.
<> 132:9baf128c2fab 2390 * @param[in] N length of the DCT4.
<> 132:9baf128c2fab 2391 * @param[in] Nby2 half of the length of the DCT4.
<> 132:9baf128c2fab 2392 * @param[in] normalize normalizing factor.
<> 132:9baf128c2fab 2393 * @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.
<> 132:9baf128c2fab 2394 */
<> 132:9baf128c2fab 2395
<> 132:9baf128c2fab 2396 arm_status arm_dct4_init_f32(
<> 132:9baf128c2fab 2397 arm_dct4_instance_f32 * S,
<> 132:9baf128c2fab 2398 arm_rfft_instance_f32 * S_RFFT,
<> 132:9baf128c2fab 2399 arm_cfft_radix4_instance_f32 * S_CFFT,
<> 132:9baf128c2fab 2400 uint16_t N,
<> 132:9baf128c2fab 2401 uint16_t Nby2,
<> 132:9baf128c2fab 2402 float32_t normalize);
<> 132:9baf128c2fab 2403
<> 132:9baf128c2fab 2404 /**
<> 132:9baf128c2fab 2405 * @brief Processing function for the floating-point DCT4/IDCT4.
<> 132:9baf128c2fab 2406 * @param[in] *S points to an instance of the floating-point DCT4/IDCT4 structure.
<> 132:9baf128c2fab 2407 * @param[in] *pState points to state buffer.
<> 132:9baf128c2fab 2408 * @param[in,out] *pInlineBuffer points to the in-place input and output buffer.
<> 132:9baf128c2fab 2409 * @return none.
<> 132:9baf128c2fab 2410 */
<> 132:9baf128c2fab 2411
<> 132:9baf128c2fab 2412 void arm_dct4_f32(
<> 132:9baf128c2fab 2413 const arm_dct4_instance_f32 * S,
<> 132:9baf128c2fab 2414 float32_t * pState,
<> 132:9baf128c2fab 2415 float32_t * pInlineBuffer);
<> 132:9baf128c2fab 2416
<> 132:9baf128c2fab 2417 /**
<> 132:9baf128c2fab 2418 * @brief Instance structure for the Q31 DCT4/IDCT4 function.
<> 132:9baf128c2fab 2419 */
<> 132:9baf128c2fab 2420
<> 132:9baf128c2fab 2421 typedef struct
<> 132:9baf128c2fab 2422 {
<> 132:9baf128c2fab 2423 uint16_t N; /**< length of the DCT4. */
<> 132:9baf128c2fab 2424 uint16_t Nby2; /**< half of the length of the DCT4. */
<> 132:9baf128c2fab 2425 q31_t normalize; /**< normalizing factor. */
<> 132:9baf128c2fab 2426 q31_t *pTwiddle; /**< points to the twiddle factor table. */
<> 132:9baf128c2fab 2427 q31_t *pCosFactor; /**< points to the cosFactor table. */
<> 132:9baf128c2fab 2428 arm_rfft_instance_q31 *pRfft; /**< points to the real FFT instance. */
<> 132:9baf128c2fab 2429 arm_cfft_radix4_instance_q31 *pCfft; /**< points to the complex FFT instance. */
<> 132:9baf128c2fab 2430 } arm_dct4_instance_q31;
<> 132:9baf128c2fab 2431
<> 132:9baf128c2fab 2432 /**
<> 132:9baf128c2fab 2433 * @brief Initialization function for the Q31 DCT4/IDCT4.
<> 132:9baf128c2fab 2434 * @param[in,out] *S points to an instance of Q31 DCT4/IDCT4 structure.
<> 132:9baf128c2fab 2435 * @param[in] *S_RFFT points to an instance of Q31 RFFT/RIFFT structure
<> 132:9baf128c2fab 2436 * @param[in] *S_CFFT points to an instance of Q31 CFFT/CIFFT structure
<> 132:9baf128c2fab 2437 * @param[in] N length of the DCT4.
<> 132:9baf128c2fab 2438 * @param[in] Nby2 half of the length of the DCT4.
<> 132:9baf128c2fab 2439 * @param[in] normalize normalizing factor.
<> 132:9baf128c2fab 2440 * @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.
<> 132:9baf128c2fab 2441 */
<> 132:9baf128c2fab 2442
<> 132:9baf128c2fab 2443 arm_status arm_dct4_init_q31(
<> 132:9baf128c2fab 2444 arm_dct4_instance_q31 * S,
<> 132:9baf128c2fab 2445 arm_rfft_instance_q31 * S_RFFT,
<> 132:9baf128c2fab 2446 arm_cfft_radix4_instance_q31 * S_CFFT,
<> 132:9baf128c2fab 2447 uint16_t N,
<> 132:9baf128c2fab 2448 uint16_t Nby2,
<> 132:9baf128c2fab 2449 q31_t normalize);
<> 132:9baf128c2fab 2450
<> 132:9baf128c2fab 2451 /**
<> 132:9baf128c2fab 2452 * @brief Processing function for the Q31 DCT4/IDCT4.
<> 132:9baf128c2fab 2453 * @param[in] *S points to an instance of the Q31 DCT4 structure.
<> 132:9baf128c2fab 2454 * @param[in] *pState points to state buffer.
<> 132:9baf128c2fab 2455 * @param[in,out] *pInlineBuffer points to the in-place input and output buffer.
<> 132:9baf128c2fab 2456 * @return none.
<> 132:9baf128c2fab 2457 */
<> 132:9baf128c2fab 2458
<> 132:9baf128c2fab 2459 void arm_dct4_q31(
<> 132:9baf128c2fab 2460 const arm_dct4_instance_q31 * S,
<> 132:9baf128c2fab 2461 q31_t * pState,
<> 132:9baf128c2fab 2462 q31_t * pInlineBuffer);
<> 132:9baf128c2fab 2463
<> 132:9baf128c2fab 2464 /**
<> 132:9baf128c2fab 2465 * @brief Instance structure for the Q15 DCT4/IDCT4 function.
<> 132:9baf128c2fab 2466 */
<> 132:9baf128c2fab 2467
<> 132:9baf128c2fab 2468 typedef struct
<> 132:9baf128c2fab 2469 {
<> 132:9baf128c2fab 2470 uint16_t N; /**< length of the DCT4. */
<> 132:9baf128c2fab 2471 uint16_t Nby2; /**< half of the length of the DCT4. */
<> 132:9baf128c2fab 2472 q15_t normalize; /**< normalizing factor. */
<> 132:9baf128c2fab 2473 q15_t *pTwiddle; /**< points to the twiddle factor table. */
<> 132:9baf128c2fab 2474 q15_t *pCosFactor; /**< points to the cosFactor table. */
<> 132:9baf128c2fab 2475 arm_rfft_instance_q15 *pRfft; /**< points to the real FFT instance. */
<> 132:9baf128c2fab 2476 arm_cfft_radix4_instance_q15 *pCfft; /**< points to the complex FFT instance. */
<> 132:9baf128c2fab 2477 } arm_dct4_instance_q15;
<> 132:9baf128c2fab 2478
<> 132:9baf128c2fab 2479 /**
<> 132:9baf128c2fab 2480 * @brief Initialization function for the Q15 DCT4/IDCT4.
<> 132:9baf128c2fab 2481 * @param[in,out] *S points to an instance of Q15 DCT4/IDCT4 structure.
<> 132:9baf128c2fab 2482 * @param[in] *S_RFFT points to an instance of Q15 RFFT/RIFFT structure.
<> 132:9baf128c2fab 2483 * @param[in] *S_CFFT points to an instance of Q15 CFFT/CIFFT structure.
<> 132:9baf128c2fab 2484 * @param[in] N length of the DCT4.
<> 132:9baf128c2fab 2485 * @param[in] Nby2 half of the length of the DCT4.
<> 132:9baf128c2fab 2486 * @param[in] normalize normalizing factor.
<> 132:9baf128c2fab 2487 * @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.
<> 132:9baf128c2fab 2488 */
<> 132:9baf128c2fab 2489
<> 132:9baf128c2fab 2490 arm_status arm_dct4_init_q15(
<> 132:9baf128c2fab 2491 arm_dct4_instance_q15 * S,
<> 132:9baf128c2fab 2492 arm_rfft_instance_q15 * S_RFFT,
<> 132:9baf128c2fab 2493 arm_cfft_radix4_instance_q15 * S_CFFT,
<> 132:9baf128c2fab 2494 uint16_t N,
<> 132:9baf128c2fab 2495 uint16_t Nby2,
<> 132:9baf128c2fab 2496 q15_t normalize);
<> 132:9baf128c2fab 2497
<> 132:9baf128c2fab 2498 /**
<> 132:9baf128c2fab 2499 * @brief Processing function for the Q15 DCT4/IDCT4.
<> 132:9baf128c2fab 2500 * @param[in] *S points to an instance of the Q15 DCT4 structure.
<> 132:9baf128c2fab 2501 * @param[in] *pState points to state buffer.
<> 132:9baf128c2fab 2502 * @param[in,out] *pInlineBuffer points to the in-place input and output buffer.
<> 132:9baf128c2fab 2503 * @return none.
<> 132:9baf128c2fab 2504 */
<> 132:9baf128c2fab 2505
<> 132:9baf128c2fab 2506 void arm_dct4_q15(
<> 132:9baf128c2fab 2507 const arm_dct4_instance_q15 * S,
<> 132:9baf128c2fab 2508 q15_t * pState,
<> 132:9baf128c2fab 2509 q15_t * pInlineBuffer);
<> 132:9baf128c2fab 2510
<> 132:9baf128c2fab 2511 /**
<> 132:9baf128c2fab 2512 * @brief Floating-point vector addition.
<> 132:9baf128c2fab 2513 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 2514 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 2515 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2516 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2517 * @return none.
<> 132:9baf128c2fab 2518 */
<> 132:9baf128c2fab 2519
<> 132:9baf128c2fab 2520 void arm_add_f32(
<> 132:9baf128c2fab 2521 float32_t * pSrcA,
<> 132:9baf128c2fab 2522 float32_t * pSrcB,
<> 132:9baf128c2fab 2523 float32_t * pDst,
<> 132:9baf128c2fab 2524 uint32_t blockSize);
<> 132:9baf128c2fab 2525
<> 132:9baf128c2fab 2526 /**
<> 132:9baf128c2fab 2527 * @brief Q7 vector addition.
<> 132:9baf128c2fab 2528 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 2529 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 2530 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2531 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2532 * @return none.
<> 132:9baf128c2fab 2533 */
<> 132:9baf128c2fab 2534
<> 132:9baf128c2fab 2535 void arm_add_q7(
<> 132:9baf128c2fab 2536 q7_t * pSrcA,
<> 132:9baf128c2fab 2537 q7_t * pSrcB,
<> 132:9baf128c2fab 2538 q7_t * pDst,
<> 132:9baf128c2fab 2539 uint32_t blockSize);
<> 132:9baf128c2fab 2540
<> 132:9baf128c2fab 2541 /**
<> 132:9baf128c2fab 2542 * @brief Q15 vector addition.
<> 132:9baf128c2fab 2543 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 2544 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 2545 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2546 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2547 * @return none.
<> 132:9baf128c2fab 2548 */
<> 132:9baf128c2fab 2549
<> 132:9baf128c2fab 2550 void arm_add_q15(
<> 132:9baf128c2fab 2551 q15_t * pSrcA,
<> 132:9baf128c2fab 2552 q15_t * pSrcB,
<> 132:9baf128c2fab 2553 q15_t * pDst,
<> 132:9baf128c2fab 2554 uint32_t blockSize);
<> 132:9baf128c2fab 2555
<> 132:9baf128c2fab 2556 /**
<> 132:9baf128c2fab 2557 * @brief Q31 vector addition.
<> 132:9baf128c2fab 2558 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 2559 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 2560 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2561 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2562 * @return none.
<> 132:9baf128c2fab 2563 */
<> 132:9baf128c2fab 2564
<> 132:9baf128c2fab 2565 void arm_add_q31(
<> 132:9baf128c2fab 2566 q31_t * pSrcA,
<> 132:9baf128c2fab 2567 q31_t * pSrcB,
<> 132:9baf128c2fab 2568 q31_t * pDst,
<> 132:9baf128c2fab 2569 uint32_t blockSize);
<> 132:9baf128c2fab 2570
<> 132:9baf128c2fab 2571 /**
<> 132:9baf128c2fab 2572 * @brief Floating-point vector subtraction.
<> 132:9baf128c2fab 2573 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 2574 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 2575 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2576 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2577 * @return none.
<> 132:9baf128c2fab 2578 */
<> 132:9baf128c2fab 2579
<> 132:9baf128c2fab 2580 void arm_sub_f32(
<> 132:9baf128c2fab 2581 float32_t * pSrcA,
<> 132:9baf128c2fab 2582 float32_t * pSrcB,
<> 132:9baf128c2fab 2583 float32_t * pDst,
<> 132:9baf128c2fab 2584 uint32_t blockSize);
<> 132:9baf128c2fab 2585
<> 132:9baf128c2fab 2586 /**
<> 132:9baf128c2fab 2587 * @brief Q7 vector subtraction.
<> 132:9baf128c2fab 2588 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 2589 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 2590 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2591 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2592 * @return none.
<> 132:9baf128c2fab 2593 */
<> 132:9baf128c2fab 2594
<> 132:9baf128c2fab 2595 void arm_sub_q7(
<> 132:9baf128c2fab 2596 q7_t * pSrcA,
<> 132:9baf128c2fab 2597 q7_t * pSrcB,
<> 132:9baf128c2fab 2598 q7_t * pDst,
<> 132:9baf128c2fab 2599 uint32_t blockSize);
<> 132:9baf128c2fab 2600
<> 132:9baf128c2fab 2601 /**
<> 132:9baf128c2fab 2602 * @brief Q15 vector subtraction.
<> 132:9baf128c2fab 2603 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 2604 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 2605 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2606 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2607 * @return none.
<> 132:9baf128c2fab 2608 */
<> 132:9baf128c2fab 2609
<> 132:9baf128c2fab 2610 void arm_sub_q15(
<> 132:9baf128c2fab 2611 q15_t * pSrcA,
<> 132:9baf128c2fab 2612 q15_t * pSrcB,
<> 132:9baf128c2fab 2613 q15_t * pDst,
<> 132:9baf128c2fab 2614 uint32_t blockSize);
<> 132:9baf128c2fab 2615
<> 132:9baf128c2fab 2616 /**
<> 132:9baf128c2fab 2617 * @brief Q31 vector subtraction.
<> 132:9baf128c2fab 2618 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 2619 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 2620 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2621 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2622 * @return none.
<> 132:9baf128c2fab 2623 */
<> 132:9baf128c2fab 2624
<> 132:9baf128c2fab 2625 void arm_sub_q31(
<> 132:9baf128c2fab 2626 q31_t * pSrcA,
<> 132:9baf128c2fab 2627 q31_t * pSrcB,
<> 132:9baf128c2fab 2628 q31_t * pDst,
<> 132:9baf128c2fab 2629 uint32_t blockSize);
<> 132:9baf128c2fab 2630
<> 132:9baf128c2fab 2631 /**
<> 132:9baf128c2fab 2632 * @brief Multiplies a floating-point vector by a scalar.
<> 132:9baf128c2fab 2633 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 2634 * @param[in] scale scale factor to be applied
<> 132:9baf128c2fab 2635 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2636 * @param[in] blockSize number of samples in the vector
<> 132:9baf128c2fab 2637 * @return none.
<> 132:9baf128c2fab 2638 */
<> 132:9baf128c2fab 2639
<> 132:9baf128c2fab 2640 void arm_scale_f32(
<> 132:9baf128c2fab 2641 float32_t * pSrc,
<> 132:9baf128c2fab 2642 float32_t scale,
<> 132:9baf128c2fab 2643 float32_t * pDst,
<> 132:9baf128c2fab 2644 uint32_t blockSize);
<> 132:9baf128c2fab 2645
<> 132:9baf128c2fab 2646 /**
<> 132:9baf128c2fab 2647 * @brief Multiplies a Q7 vector by a scalar.
<> 132:9baf128c2fab 2648 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 2649 * @param[in] scaleFract fractional portion of the scale value
<> 132:9baf128c2fab 2650 * @param[in] shift number of bits to shift the result by
<> 132:9baf128c2fab 2651 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2652 * @param[in] blockSize number of samples in the vector
<> 132:9baf128c2fab 2653 * @return none.
<> 132:9baf128c2fab 2654 */
<> 132:9baf128c2fab 2655
<> 132:9baf128c2fab 2656 void arm_scale_q7(
<> 132:9baf128c2fab 2657 q7_t * pSrc,
<> 132:9baf128c2fab 2658 q7_t scaleFract,
<> 132:9baf128c2fab 2659 int8_t shift,
<> 132:9baf128c2fab 2660 q7_t * pDst,
<> 132:9baf128c2fab 2661 uint32_t blockSize);
<> 132:9baf128c2fab 2662
<> 132:9baf128c2fab 2663 /**
<> 132:9baf128c2fab 2664 * @brief Multiplies a Q15 vector by a scalar.
<> 132:9baf128c2fab 2665 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 2666 * @param[in] scaleFract fractional portion of the scale value
<> 132:9baf128c2fab 2667 * @param[in] shift number of bits to shift the result by
<> 132:9baf128c2fab 2668 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2669 * @param[in] blockSize number of samples in the vector
<> 132:9baf128c2fab 2670 * @return none.
<> 132:9baf128c2fab 2671 */
<> 132:9baf128c2fab 2672
<> 132:9baf128c2fab 2673 void arm_scale_q15(
<> 132:9baf128c2fab 2674 q15_t * pSrc,
<> 132:9baf128c2fab 2675 q15_t scaleFract,
<> 132:9baf128c2fab 2676 int8_t shift,
<> 132:9baf128c2fab 2677 q15_t * pDst,
<> 132:9baf128c2fab 2678 uint32_t blockSize);
<> 132:9baf128c2fab 2679
<> 132:9baf128c2fab 2680 /**
<> 132:9baf128c2fab 2681 * @brief Multiplies a Q31 vector by a scalar.
<> 132:9baf128c2fab 2682 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 2683 * @param[in] scaleFract fractional portion of the scale value
<> 132:9baf128c2fab 2684 * @param[in] shift number of bits to shift the result by
<> 132:9baf128c2fab 2685 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2686 * @param[in] blockSize number of samples in the vector
<> 132:9baf128c2fab 2687 * @return none.
<> 132:9baf128c2fab 2688 */
<> 132:9baf128c2fab 2689
<> 132:9baf128c2fab 2690 void arm_scale_q31(
<> 132:9baf128c2fab 2691 q31_t * pSrc,
<> 132:9baf128c2fab 2692 q31_t scaleFract,
<> 132:9baf128c2fab 2693 int8_t shift,
<> 132:9baf128c2fab 2694 q31_t * pDst,
<> 132:9baf128c2fab 2695 uint32_t blockSize);
<> 132:9baf128c2fab 2696
<> 132:9baf128c2fab 2697 /**
<> 132:9baf128c2fab 2698 * @brief Q7 vector absolute value.
<> 132:9baf128c2fab 2699 * @param[in] *pSrc points to the input buffer
<> 132:9baf128c2fab 2700 * @param[out] *pDst points to the output buffer
<> 132:9baf128c2fab 2701 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2702 * @return none.
<> 132:9baf128c2fab 2703 */
<> 132:9baf128c2fab 2704
<> 132:9baf128c2fab 2705 void arm_abs_q7(
<> 132:9baf128c2fab 2706 q7_t * pSrc,
<> 132:9baf128c2fab 2707 q7_t * pDst,
<> 132:9baf128c2fab 2708 uint32_t blockSize);
<> 132:9baf128c2fab 2709
<> 132:9baf128c2fab 2710 /**
<> 132:9baf128c2fab 2711 * @brief Floating-point vector absolute value.
<> 132:9baf128c2fab 2712 * @param[in] *pSrc points to the input buffer
<> 132:9baf128c2fab 2713 * @param[out] *pDst points to the output buffer
<> 132:9baf128c2fab 2714 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2715 * @return none.
<> 132:9baf128c2fab 2716 */
<> 132:9baf128c2fab 2717
<> 132:9baf128c2fab 2718 void arm_abs_f32(
<> 132:9baf128c2fab 2719 float32_t * pSrc,
<> 132:9baf128c2fab 2720 float32_t * pDst,
<> 132:9baf128c2fab 2721 uint32_t blockSize);
<> 132:9baf128c2fab 2722
<> 132:9baf128c2fab 2723 /**
<> 132:9baf128c2fab 2724 * @brief Q15 vector absolute value.
<> 132:9baf128c2fab 2725 * @param[in] *pSrc points to the input buffer
<> 132:9baf128c2fab 2726 * @param[out] *pDst points to the output buffer
<> 132:9baf128c2fab 2727 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2728 * @return none.
<> 132:9baf128c2fab 2729 */
<> 132:9baf128c2fab 2730
<> 132:9baf128c2fab 2731 void arm_abs_q15(
<> 132:9baf128c2fab 2732 q15_t * pSrc,
<> 132:9baf128c2fab 2733 q15_t * pDst,
<> 132:9baf128c2fab 2734 uint32_t blockSize);
<> 132:9baf128c2fab 2735
<> 132:9baf128c2fab 2736 /**
<> 132:9baf128c2fab 2737 * @brief Q31 vector absolute value.
<> 132:9baf128c2fab 2738 * @param[in] *pSrc points to the input buffer
<> 132:9baf128c2fab 2739 * @param[out] *pDst points to the output buffer
<> 132:9baf128c2fab 2740 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2741 * @return none.
<> 132:9baf128c2fab 2742 */
<> 132:9baf128c2fab 2743
<> 132:9baf128c2fab 2744 void arm_abs_q31(
<> 132:9baf128c2fab 2745 q31_t * pSrc,
<> 132:9baf128c2fab 2746 q31_t * pDst,
<> 132:9baf128c2fab 2747 uint32_t blockSize);
<> 132:9baf128c2fab 2748
<> 132:9baf128c2fab 2749 /**
<> 132:9baf128c2fab 2750 * @brief Dot product of floating-point vectors.
<> 132:9baf128c2fab 2751 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 2752 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 2753 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2754 * @param[out] *result output result returned here
<> 132:9baf128c2fab 2755 * @return none.
<> 132:9baf128c2fab 2756 */
<> 132:9baf128c2fab 2757
<> 132:9baf128c2fab 2758 void arm_dot_prod_f32(
<> 132:9baf128c2fab 2759 float32_t * pSrcA,
<> 132:9baf128c2fab 2760 float32_t * pSrcB,
<> 132:9baf128c2fab 2761 uint32_t blockSize,
<> 132:9baf128c2fab 2762 float32_t * result);
<> 132:9baf128c2fab 2763
<> 132:9baf128c2fab 2764 /**
<> 132:9baf128c2fab 2765 * @brief Dot product of Q7 vectors.
<> 132:9baf128c2fab 2766 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 2767 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 2768 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2769 * @param[out] *result output result returned here
<> 132:9baf128c2fab 2770 * @return none.
<> 132:9baf128c2fab 2771 */
<> 132:9baf128c2fab 2772
<> 132:9baf128c2fab 2773 void arm_dot_prod_q7(
<> 132:9baf128c2fab 2774 q7_t * pSrcA,
<> 132:9baf128c2fab 2775 q7_t * pSrcB,
<> 132:9baf128c2fab 2776 uint32_t blockSize,
<> 132:9baf128c2fab 2777 q31_t * result);
<> 132:9baf128c2fab 2778
<> 132:9baf128c2fab 2779 /**
<> 132:9baf128c2fab 2780 * @brief Dot product of Q15 vectors.
<> 132:9baf128c2fab 2781 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 2782 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 2783 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2784 * @param[out] *result output result returned here
<> 132:9baf128c2fab 2785 * @return none.
<> 132:9baf128c2fab 2786 */
<> 132:9baf128c2fab 2787
<> 132:9baf128c2fab 2788 void arm_dot_prod_q15(
<> 132:9baf128c2fab 2789 q15_t * pSrcA,
<> 132:9baf128c2fab 2790 q15_t * pSrcB,
<> 132:9baf128c2fab 2791 uint32_t blockSize,
<> 132:9baf128c2fab 2792 q63_t * result);
<> 132:9baf128c2fab 2793
<> 132:9baf128c2fab 2794 /**
<> 132:9baf128c2fab 2795 * @brief Dot product of Q31 vectors.
<> 132:9baf128c2fab 2796 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 2797 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 2798 * @param[in] blockSize number of samples in each vector
<> 132:9baf128c2fab 2799 * @param[out] *result output result returned here
<> 132:9baf128c2fab 2800 * @return none.
<> 132:9baf128c2fab 2801 */
<> 132:9baf128c2fab 2802
<> 132:9baf128c2fab 2803 void arm_dot_prod_q31(
<> 132:9baf128c2fab 2804 q31_t * pSrcA,
<> 132:9baf128c2fab 2805 q31_t * pSrcB,
<> 132:9baf128c2fab 2806 uint32_t blockSize,
<> 132:9baf128c2fab 2807 q63_t * result);
<> 132:9baf128c2fab 2808
<> 132:9baf128c2fab 2809 /**
<> 132:9baf128c2fab 2810 * @brief Shifts the elements of a Q7 vector a specified number of bits.
<> 132:9baf128c2fab 2811 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 2812 * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right.
<> 132:9baf128c2fab 2813 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2814 * @param[in] blockSize number of samples in the vector
<> 132:9baf128c2fab 2815 * @return none.
<> 132:9baf128c2fab 2816 */
<> 132:9baf128c2fab 2817
<> 132:9baf128c2fab 2818 void arm_shift_q7(
<> 132:9baf128c2fab 2819 q7_t * pSrc,
<> 132:9baf128c2fab 2820 int8_t shiftBits,
<> 132:9baf128c2fab 2821 q7_t * pDst,
<> 132:9baf128c2fab 2822 uint32_t blockSize);
<> 132:9baf128c2fab 2823
<> 132:9baf128c2fab 2824 /**
<> 132:9baf128c2fab 2825 * @brief Shifts the elements of a Q15 vector a specified number of bits.
<> 132:9baf128c2fab 2826 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 2827 * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right.
<> 132:9baf128c2fab 2828 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2829 * @param[in] blockSize number of samples in the vector
<> 132:9baf128c2fab 2830 * @return none.
<> 132:9baf128c2fab 2831 */
<> 132:9baf128c2fab 2832
<> 132:9baf128c2fab 2833 void arm_shift_q15(
<> 132:9baf128c2fab 2834 q15_t * pSrc,
<> 132:9baf128c2fab 2835 int8_t shiftBits,
<> 132:9baf128c2fab 2836 q15_t * pDst,
<> 132:9baf128c2fab 2837 uint32_t blockSize);
<> 132:9baf128c2fab 2838
<> 132:9baf128c2fab 2839 /**
<> 132:9baf128c2fab 2840 * @brief Shifts the elements of a Q31 vector a specified number of bits.
<> 132:9baf128c2fab 2841 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 2842 * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right.
<> 132:9baf128c2fab 2843 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2844 * @param[in] blockSize number of samples in the vector
<> 132:9baf128c2fab 2845 * @return none.
<> 132:9baf128c2fab 2846 */
<> 132:9baf128c2fab 2847
<> 132:9baf128c2fab 2848 void arm_shift_q31(
<> 132:9baf128c2fab 2849 q31_t * pSrc,
<> 132:9baf128c2fab 2850 int8_t shiftBits,
<> 132:9baf128c2fab 2851 q31_t * pDst,
<> 132:9baf128c2fab 2852 uint32_t blockSize);
<> 132:9baf128c2fab 2853
<> 132:9baf128c2fab 2854 /**
<> 132:9baf128c2fab 2855 * @brief Adds a constant offset to a floating-point vector.
<> 132:9baf128c2fab 2856 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 2857 * @param[in] offset is the offset to be added
<> 132:9baf128c2fab 2858 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2859 * @param[in] blockSize number of samples in the vector
<> 132:9baf128c2fab 2860 * @return none.
<> 132:9baf128c2fab 2861 */
<> 132:9baf128c2fab 2862
<> 132:9baf128c2fab 2863 void arm_offset_f32(
<> 132:9baf128c2fab 2864 float32_t * pSrc,
<> 132:9baf128c2fab 2865 float32_t offset,
<> 132:9baf128c2fab 2866 float32_t * pDst,
<> 132:9baf128c2fab 2867 uint32_t blockSize);
<> 132:9baf128c2fab 2868
<> 132:9baf128c2fab 2869 /**
<> 132:9baf128c2fab 2870 * @brief Adds a constant offset to a Q7 vector.
<> 132:9baf128c2fab 2871 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 2872 * @param[in] offset is the offset to be added
<> 132:9baf128c2fab 2873 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2874 * @param[in] blockSize number of samples in the vector
<> 132:9baf128c2fab 2875 * @return none.
<> 132:9baf128c2fab 2876 */
<> 132:9baf128c2fab 2877
<> 132:9baf128c2fab 2878 void arm_offset_q7(
<> 132:9baf128c2fab 2879 q7_t * pSrc,
<> 132:9baf128c2fab 2880 q7_t offset,
<> 132:9baf128c2fab 2881 q7_t * pDst,
<> 132:9baf128c2fab 2882 uint32_t blockSize);
<> 132:9baf128c2fab 2883
<> 132:9baf128c2fab 2884 /**
<> 132:9baf128c2fab 2885 * @brief Adds a constant offset to a Q15 vector.
<> 132:9baf128c2fab 2886 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 2887 * @param[in] offset is the offset to be added
<> 132:9baf128c2fab 2888 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2889 * @param[in] blockSize number of samples in the vector
<> 132:9baf128c2fab 2890 * @return none.
<> 132:9baf128c2fab 2891 */
<> 132:9baf128c2fab 2892
<> 132:9baf128c2fab 2893 void arm_offset_q15(
<> 132:9baf128c2fab 2894 q15_t * pSrc,
<> 132:9baf128c2fab 2895 q15_t offset,
<> 132:9baf128c2fab 2896 q15_t * pDst,
<> 132:9baf128c2fab 2897 uint32_t blockSize);
<> 132:9baf128c2fab 2898
<> 132:9baf128c2fab 2899 /**
<> 132:9baf128c2fab 2900 * @brief Adds a constant offset to a Q31 vector.
<> 132:9baf128c2fab 2901 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 2902 * @param[in] offset is the offset to be added
<> 132:9baf128c2fab 2903 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2904 * @param[in] blockSize number of samples in the vector
<> 132:9baf128c2fab 2905 * @return none.
<> 132:9baf128c2fab 2906 */
<> 132:9baf128c2fab 2907
<> 132:9baf128c2fab 2908 void arm_offset_q31(
<> 132:9baf128c2fab 2909 q31_t * pSrc,
<> 132:9baf128c2fab 2910 q31_t offset,
<> 132:9baf128c2fab 2911 q31_t * pDst,
<> 132:9baf128c2fab 2912 uint32_t blockSize);
<> 132:9baf128c2fab 2913
<> 132:9baf128c2fab 2914 /**
<> 132:9baf128c2fab 2915 * @brief Negates the elements of a floating-point vector.
<> 132:9baf128c2fab 2916 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 2917 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2918 * @param[in] blockSize number of samples in the vector
<> 132:9baf128c2fab 2919 * @return none.
<> 132:9baf128c2fab 2920 */
<> 132:9baf128c2fab 2921
<> 132:9baf128c2fab 2922 void arm_negate_f32(
<> 132:9baf128c2fab 2923 float32_t * pSrc,
<> 132:9baf128c2fab 2924 float32_t * pDst,
<> 132:9baf128c2fab 2925 uint32_t blockSize);
<> 132:9baf128c2fab 2926
<> 132:9baf128c2fab 2927 /**
<> 132:9baf128c2fab 2928 * @brief Negates the elements of a Q7 vector.
<> 132:9baf128c2fab 2929 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 2930 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2931 * @param[in] blockSize number of samples in the vector
<> 132:9baf128c2fab 2932 * @return none.
<> 132:9baf128c2fab 2933 */
<> 132:9baf128c2fab 2934
<> 132:9baf128c2fab 2935 void arm_negate_q7(
<> 132:9baf128c2fab 2936 q7_t * pSrc,
<> 132:9baf128c2fab 2937 q7_t * pDst,
<> 132:9baf128c2fab 2938 uint32_t blockSize);
<> 132:9baf128c2fab 2939
<> 132:9baf128c2fab 2940 /**
<> 132:9baf128c2fab 2941 * @brief Negates the elements of a Q15 vector.
<> 132:9baf128c2fab 2942 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 2943 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2944 * @param[in] blockSize number of samples in the vector
<> 132:9baf128c2fab 2945 * @return none.
<> 132:9baf128c2fab 2946 */
<> 132:9baf128c2fab 2947
<> 132:9baf128c2fab 2948 void arm_negate_q15(
<> 132:9baf128c2fab 2949 q15_t * pSrc,
<> 132:9baf128c2fab 2950 q15_t * pDst,
<> 132:9baf128c2fab 2951 uint32_t blockSize);
<> 132:9baf128c2fab 2952
<> 132:9baf128c2fab 2953 /**
<> 132:9baf128c2fab 2954 * @brief Negates the elements of a Q31 vector.
<> 132:9baf128c2fab 2955 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 2956 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 2957 * @param[in] blockSize number of samples in the vector
<> 132:9baf128c2fab 2958 * @return none.
<> 132:9baf128c2fab 2959 */
<> 132:9baf128c2fab 2960
<> 132:9baf128c2fab 2961 void arm_negate_q31(
<> 132:9baf128c2fab 2962 q31_t * pSrc,
<> 132:9baf128c2fab 2963 q31_t * pDst,
<> 132:9baf128c2fab 2964 uint32_t blockSize);
<> 132:9baf128c2fab 2965 /**
<> 132:9baf128c2fab 2966 * @brief Copies the elements of a floating-point vector.
<> 132:9baf128c2fab 2967 * @param[in] *pSrc input pointer
<> 132:9baf128c2fab 2968 * @param[out] *pDst output pointer
<> 132:9baf128c2fab 2969 * @param[in] blockSize number of samples to process
<> 132:9baf128c2fab 2970 * @return none.
<> 132:9baf128c2fab 2971 */
<> 132:9baf128c2fab 2972 void arm_copy_f32(
<> 132:9baf128c2fab 2973 float32_t * pSrc,
<> 132:9baf128c2fab 2974 float32_t * pDst,
<> 132:9baf128c2fab 2975 uint32_t blockSize);
<> 132:9baf128c2fab 2976
<> 132:9baf128c2fab 2977 /**
<> 132:9baf128c2fab 2978 * @brief Copies the elements of a Q7 vector.
<> 132:9baf128c2fab 2979 * @param[in] *pSrc input pointer
<> 132:9baf128c2fab 2980 * @param[out] *pDst output pointer
<> 132:9baf128c2fab 2981 * @param[in] blockSize number of samples to process
<> 132:9baf128c2fab 2982 * @return none.
<> 132:9baf128c2fab 2983 */
<> 132:9baf128c2fab 2984 void arm_copy_q7(
<> 132:9baf128c2fab 2985 q7_t * pSrc,
<> 132:9baf128c2fab 2986 q7_t * pDst,
<> 132:9baf128c2fab 2987 uint32_t blockSize);
<> 132:9baf128c2fab 2988
<> 132:9baf128c2fab 2989 /**
<> 132:9baf128c2fab 2990 * @brief Copies the elements of a Q15 vector.
<> 132:9baf128c2fab 2991 * @param[in] *pSrc input pointer
<> 132:9baf128c2fab 2992 * @param[out] *pDst output pointer
<> 132:9baf128c2fab 2993 * @param[in] blockSize number of samples to process
<> 132:9baf128c2fab 2994 * @return none.
<> 132:9baf128c2fab 2995 */
<> 132:9baf128c2fab 2996 void arm_copy_q15(
<> 132:9baf128c2fab 2997 q15_t * pSrc,
<> 132:9baf128c2fab 2998 q15_t * pDst,
<> 132:9baf128c2fab 2999 uint32_t blockSize);
<> 132:9baf128c2fab 3000
<> 132:9baf128c2fab 3001 /**
<> 132:9baf128c2fab 3002 * @brief Copies the elements of a Q31 vector.
<> 132:9baf128c2fab 3003 * @param[in] *pSrc input pointer
<> 132:9baf128c2fab 3004 * @param[out] *pDst output pointer
<> 132:9baf128c2fab 3005 * @param[in] blockSize number of samples to process
<> 132:9baf128c2fab 3006 * @return none.
<> 132:9baf128c2fab 3007 */
<> 132:9baf128c2fab 3008 void arm_copy_q31(
<> 132:9baf128c2fab 3009 q31_t * pSrc,
<> 132:9baf128c2fab 3010 q31_t * pDst,
<> 132:9baf128c2fab 3011 uint32_t blockSize);
<> 132:9baf128c2fab 3012 /**
<> 132:9baf128c2fab 3013 * @brief Fills a constant value into a floating-point vector.
<> 132:9baf128c2fab 3014 * @param[in] value input value to be filled
<> 132:9baf128c2fab 3015 * @param[out] *pDst output pointer
<> 132:9baf128c2fab 3016 * @param[in] blockSize number of samples to process
<> 132:9baf128c2fab 3017 * @return none.
<> 132:9baf128c2fab 3018 */
<> 132:9baf128c2fab 3019 void arm_fill_f32(
<> 132:9baf128c2fab 3020 float32_t value,
<> 132:9baf128c2fab 3021 float32_t * pDst,
<> 132:9baf128c2fab 3022 uint32_t blockSize);
<> 132:9baf128c2fab 3023
<> 132:9baf128c2fab 3024 /**
<> 132:9baf128c2fab 3025 * @brief Fills a constant value into a Q7 vector.
<> 132:9baf128c2fab 3026 * @param[in] value input value to be filled
<> 132:9baf128c2fab 3027 * @param[out] *pDst output pointer
<> 132:9baf128c2fab 3028 * @param[in] blockSize number of samples to process
<> 132:9baf128c2fab 3029 * @return none.
<> 132:9baf128c2fab 3030 */
<> 132:9baf128c2fab 3031 void arm_fill_q7(
<> 132:9baf128c2fab 3032 q7_t value,
<> 132:9baf128c2fab 3033 q7_t * pDst,
<> 132:9baf128c2fab 3034 uint32_t blockSize);
<> 132:9baf128c2fab 3035
<> 132:9baf128c2fab 3036 /**
<> 132:9baf128c2fab 3037 * @brief Fills a constant value into a Q15 vector.
<> 132:9baf128c2fab 3038 * @param[in] value input value to be filled
<> 132:9baf128c2fab 3039 * @param[out] *pDst output pointer
<> 132:9baf128c2fab 3040 * @param[in] blockSize number of samples to process
<> 132:9baf128c2fab 3041 * @return none.
<> 132:9baf128c2fab 3042 */
<> 132:9baf128c2fab 3043 void arm_fill_q15(
<> 132:9baf128c2fab 3044 q15_t value,
<> 132:9baf128c2fab 3045 q15_t * pDst,
<> 132:9baf128c2fab 3046 uint32_t blockSize);
<> 132:9baf128c2fab 3047
<> 132:9baf128c2fab 3048 /**
<> 132:9baf128c2fab 3049 * @brief Fills a constant value into a Q31 vector.
<> 132:9baf128c2fab 3050 * @param[in] value input value to be filled
<> 132:9baf128c2fab 3051 * @param[out] *pDst output pointer
<> 132:9baf128c2fab 3052 * @param[in] blockSize number of samples to process
<> 132:9baf128c2fab 3053 * @return none.
<> 132:9baf128c2fab 3054 */
<> 132:9baf128c2fab 3055 void arm_fill_q31(
<> 132:9baf128c2fab 3056 q31_t value,
<> 132:9baf128c2fab 3057 q31_t * pDst,
<> 132:9baf128c2fab 3058 uint32_t blockSize);
<> 132:9baf128c2fab 3059
<> 132:9baf128c2fab 3060 /**
<> 132:9baf128c2fab 3061 * @brief Convolution of floating-point sequences.
<> 132:9baf128c2fab 3062 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3063 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3064 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3065 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3066 * @param[out] *pDst points to the location where the output result is written. Length srcALen+srcBLen-1.
<> 132:9baf128c2fab 3067 * @return none.
<> 132:9baf128c2fab 3068 */
<> 132:9baf128c2fab 3069
<> 132:9baf128c2fab 3070 void arm_conv_f32(
<> 132:9baf128c2fab 3071 float32_t * pSrcA,
<> 132:9baf128c2fab 3072 uint32_t srcALen,
<> 132:9baf128c2fab 3073 float32_t * pSrcB,
<> 132:9baf128c2fab 3074 uint32_t srcBLen,
<> 132:9baf128c2fab 3075 float32_t * pDst);
<> 132:9baf128c2fab 3076
<> 132:9baf128c2fab 3077
<> 132:9baf128c2fab 3078 /**
<> 132:9baf128c2fab 3079 * @brief Convolution of Q15 sequences.
<> 132:9baf128c2fab 3080 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3081 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3082 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3083 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3084 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 132:9baf128c2fab 3085 * @param[in] *pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 132:9baf128c2fab 3086 * @param[in] *pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
<> 132:9baf128c2fab 3087 * @return none.
<> 132:9baf128c2fab 3088 */
<> 132:9baf128c2fab 3089
<> 132:9baf128c2fab 3090
<> 132:9baf128c2fab 3091 void arm_conv_opt_q15(
<> 132:9baf128c2fab 3092 q15_t * pSrcA,
<> 132:9baf128c2fab 3093 uint32_t srcALen,
<> 132:9baf128c2fab 3094 q15_t * pSrcB,
<> 132:9baf128c2fab 3095 uint32_t srcBLen,
<> 132:9baf128c2fab 3096 q15_t * pDst,
<> 132:9baf128c2fab 3097 q15_t * pScratch1,
<> 132:9baf128c2fab 3098 q15_t * pScratch2);
<> 132:9baf128c2fab 3099
<> 132:9baf128c2fab 3100
<> 132:9baf128c2fab 3101 /**
<> 132:9baf128c2fab 3102 * @brief Convolution of Q15 sequences.
<> 132:9baf128c2fab 3103 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3104 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3105 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3106 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3107 * @param[out] *pDst points to the location where the output result is written. Length srcALen+srcBLen-1.
<> 132:9baf128c2fab 3108 * @return none.
<> 132:9baf128c2fab 3109 */
<> 132:9baf128c2fab 3110
<> 132:9baf128c2fab 3111 void arm_conv_q15(
<> 132:9baf128c2fab 3112 q15_t * pSrcA,
<> 132:9baf128c2fab 3113 uint32_t srcALen,
<> 132:9baf128c2fab 3114 q15_t * pSrcB,
<> 132:9baf128c2fab 3115 uint32_t srcBLen,
<> 132:9baf128c2fab 3116 q15_t * pDst);
<> 132:9baf128c2fab 3117
<> 132:9baf128c2fab 3118 /**
<> 132:9baf128c2fab 3119 * @brief Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 132:9baf128c2fab 3120 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3121 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3122 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3123 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3124 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 132:9baf128c2fab 3125 * @return none.
<> 132:9baf128c2fab 3126 */
<> 132:9baf128c2fab 3127
<> 132:9baf128c2fab 3128 void arm_conv_fast_q15(
<> 132:9baf128c2fab 3129 q15_t * pSrcA,
<> 132:9baf128c2fab 3130 uint32_t srcALen,
<> 132:9baf128c2fab 3131 q15_t * pSrcB,
<> 132:9baf128c2fab 3132 uint32_t srcBLen,
<> 132:9baf128c2fab 3133 q15_t * pDst);
<> 132:9baf128c2fab 3134
<> 132:9baf128c2fab 3135 /**
<> 132:9baf128c2fab 3136 * @brief Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 132:9baf128c2fab 3137 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3138 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3139 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3140 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3141 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 132:9baf128c2fab 3142 * @param[in] *pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 132:9baf128c2fab 3143 * @param[in] *pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
<> 132:9baf128c2fab 3144 * @return none.
<> 132:9baf128c2fab 3145 */
<> 132:9baf128c2fab 3146
<> 132:9baf128c2fab 3147 void arm_conv_fast_opt_q15(
<> 132:9baf128c2fab 3148 q15_t * pSrcA,
<> 132:9baf128c2fab 3149 uint32_t srcALen,
<> 132:9baf128c2fab 3150 q15_t * pSrcB,
<> 132:9baf128c2fab 3151 uint32_t srcBLen,
<> 132:9baf128c2fab 3152 q15_t * pDst,
<> 132:9baf128c2fab 3153 q15_t * pScratch1,
<> 132:9baf128c2fab 3154 q15_t * pScratch2);
<> 132:9baf128c2fab 3155
<> 132:9baf128c2fab 3156
<> 132:9baf128c2fab 3157
<> 132:9baf128c2fab 3158 /**
<> 132:9baf128c2fab 3159 * @brief Convolution of Q31 sequences.
<> 132:9baf128c2fab 3160 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3161 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3162 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3163 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3164 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 132:9baf128c2fab 3165 * @return none.
<> 132:9baf128c2fab 3166 */
<> 132:9baf128c2fab 3167
<> 132:9baf128c2fab 3168 void arm_conv_q31(
<> 132:9baf128c2fab 3169 q31_t * pSrcA,
<> 132:9baf128c2fab 3170 uint32_t srcALen,
<> 132:9baf128c2fab 3171 q31_t * pSrcB,
<> 132:9baf128c2fab 3172 uint32_t srcBLen,
<> 132:9baf128c2fab 3173 q31_t * pDst);
<> 132:9baf128c2fab 3174
<> 132:9baf128c2fab 3175 /**
<> 132:9baf128c2fab 3176 * @brief Convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 132:9baf128c2fab 3177 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3178 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3179 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3180 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3181 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 132:9baf128c2fab 3182 * @return none.
<> 132:9baf128c2fab 3183 */
<> 132:9baf128c2fab 3184
<> 132:9baf128c2fab 3185 void arm_conv_fast_q31(
<> 132:9baf128c2fab 3186 q31_t * pSrcA,
<> 132:9baf128c2fab 3187 uint32_t srcALen,
<> 132:9baf128c2fab 3188 q31_t * pSrcB,
<> 132:9baf128c2fab 3189 uint32_t srcBLen,
<> 132:9baf128c2fab 3190 q31_t * pDst);
<> 132:9baf128c2fab 3191
<> 132:9baf128c2fab 3192
<> 132:9baf128c2fab 3193 /**
<> 132:9baf128c2fab 3194 * @brief Convolution of Q7 sequences.
<> 132:9baf128c2fab 3195 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3196 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3197 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3198 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3199 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 132:9baf128c2fab 3200 * @param[in] *pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 132:9baf128c2fab 3201 * @param[in] *pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen).
<> 132:9baf128c2fab 3202 * @return none.
<> 132:9baf128c2fab 3203 */
<> 132:9baf128c2fab 3204
<> 132:9baf128c2fab 3205 void arm_conv_opt_q7(
<> 132:9baf128c2fab 3206 q7_t * pSrcA,
<> 132:9baf128c2fab 3207 uint32_t srcALen,
<> 132:9baf128c2fab 3208 q7_t * pSrcB,
<> 132:9baf128c2fab 3209 uint32_t srcBLen,
<> 132:9baf128c2fab 3210 q7_t * pDst,
<> 132:9baf128c2fab 3211 q15_t * pScratch1,
<> 132:9baf128c2fab 3212 q15_t * pScratch2);
<> 132:9baf128c2fab 3213
<> 132:9baf128c2fab 3214
<> 132:9baf128c2fab 3215
<> 132:9baf128c2fab 3216 /**
<> 132:9baf128c2fab 3217 * @brief Convolution of Q7 sequences.
<> 132:9baf128c2fab 3218 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3219 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3220 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3221 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3222 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 132:9baf128c2fab 3223 * @return none.
<> 132:9baf128c2fab 3224 */
<> 132:9baf128c2fab 3225
<> 132:9baf128c2fab 3226 void arm_conv_q7(
<> 132:9baf128c2fab 3227 q7_t * pSrcA,
<> 132:9baf128c2fab 3228 uint32_t srcALen,
<> 132:9baf128c2fab 3229 q7_t * pSrcB,
<> 132:9baf128c2fab 3230 uint32_t srcBLen,
<> 132:9baf128c2fab 3231 q7_t * pDst);
<> 132:9baf128c2fab 3232
<> 132:9baf128c2fab 3233
<> 132:9baf128c2fab 3234 /**
<> 132:9baf128c2fab 3235 * @brief Partial convolution of floating-point sequences.
<> 132:9baf128c2fab 3236 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3237 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3238 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3239 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3240 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3241 * @param[in] firstIndex is the first output sample to start with.
<> 132:9baf128c2fab 3242 * @param[in] numPoints is the number of output points to be computed.
<> 132:9baf128c2fab 3243 * @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].
<> 132:9baf128c2fab 3244 */
<> 132:9baf128c2fab 3245
<> 132:9baf128c2fab 3246 arm_status arm_conv_partial_f32(
<> 132:9baf128c2fab 3247 float32_t * pSrcA,
<> 132:9baf128c2fab 3248 uint32_t srcALen,
<> 132:9baf128c2fab 3249 float32_t * pSrcB,
<> 132:9baf128c2fab 3250 uint32_t srcBLen,
<> 132:9baf128c2fab 3251 float32_t * pDst,
<> 132:9baf128c2fab 3252 uint32_t firstIndex,
<> 132:9baf128c2fab 3253 uint32_t numPoints);
<> 132:9baf128c2fab 3254
<> 132:9baf128c2fab 3255 /**
<> 132:9baf128c2fab 3256 * @brief Partial convolution of Q15 sequences.
<> 132:9baf128c2fab 3257 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3258 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3259 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3260 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3261 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3262 * @param[in] firstIndex is the first output sample to start with.
<> 132:9baf128c2fab 3263 * @param[in] numPoints is the number of output points to be computed.
<> 132:9baf128c2fab 3264 * @param[in] * pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 132:9baf128c2fab 3265 * @param[in] * pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
<> 132:9baf128c2fab 3266 * @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].
<> 132:9baf128c2fab 3267 */
<> 132:9baf128c2fab 3268
<> 132:9baf128c2fab 3269 arm_status arm_conv_partial_opt_q15(
<> 132:9baf128c2fab 3270 q15_t * pSrcA,
<> 132:9baf128c2fab 3271 uint32_t srcALen,
<> 132:9baf128c2fab 3272 q15_t * pSrcB,
<> 132:9baf128c2fab 3273 uint32_t srcBLen,
<> 132:9baf128c2fab 3274 q15_t * pDst,
<> 132:9baf128c2fab 3275 uint32_t firstIndex,
<> 132:9baf128c2fab 3276 uint32_t numPoints,
<> 132:9baf128c2fab 3277 q15_t * pScratch1,
<> 132:9baf128c2fab 3278 q15_t * pScratch2);
<> 132:9baf128c2fab 3279
<> 132:9baf128c2fab 3280
<> 132:9baf128c2fab 3281 /**
<> 132:9baf128c2fab 3282 * @brief Partial convolution of Q15 sequences.
<> 132:9baf128c2fab 3283 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3284 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3285 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3286 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3287 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3288 * @param[in] firstIndex is the first output sample to start with.
<> 132:9baf128c2fab 3289 * @param[in] numPoints is the number of output points to be computed.
<> 132:9baf128c2fab 3290 * @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].
<> 132:9baf128c2fab 3291 */
<> 132:9baf128c2fab 3292
<> 132:9baf128c2fab 3293 arm_status arm_conv_partial_q15(
<> 132:9baf128c2fab 3294 q15_t * pSrcA,
<> 132:9baf128c2fab 3295 uint32_t srcALen,
<> 132:9baf128c2fab 3296 q15_t * pSrcB,
<> 132:9baf128c2fab 3297 uint32_t srcBLen,
<> 132:9baf128c2fab 3298 q15_t * pDst,
<> 132:9baf128c2fab 3299 uint32_t firstIndex,
<> 132:9baf128c2fab 3300 uint32_t numPoints);
<> 132:9baf128c2fab 3301
<> 132:9baf128c2fab 3302 /**
<> 132:9baf128c2fab 3303 * @brief Partial convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 132:9baf128c2fab 3304 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3305 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3306 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3307 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3308 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3309 * @param[in] firstIndex is the first output sample to start with.
<> 132:9baf128c2fab 3310 * @param[in] numPoints is the number of output points to be computed.
<> 132:9baf128c2fab 3311 * @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].
<> 132:9baf128c2fab 3312 */
<> 132:9baf128c2fab 3313
<> 132:9baf128c2fab 3314 arm_status arm_conv_partial_fast_q15(
<> 132:9baf128c2fab 3315 q15_t * pSrcA,
<> 132:9baf128c2fab 3316 uint32_t srcALen,
<> 132:9baf128c2fab 3317 q15_t * pSrcB,
<> 132:9baf128c2fab 3318 uint32_t srcBLen,
<> 132:9baf128c2fab 3319 q15_t * pDst,
<> 132:9baf128c2fab 3320 uint32_t firstIndex,
<> 132:9baf128c2fab 3321 uint32_t numPoints);
<> 132:9baf128c2fab 3322
<> 132:9baf128c2fab 3323
<> 132:9baf128c2fab 3324 /**
<> 132:9baf128c2fab 3325 * @brief Partial convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 132:9baf128c2fab 3326 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3327 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3328 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3329 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3330 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3331 * @param[in] firstIndex is the first output sample to start with.
<> 132:9baf128c2fab 3332 * @param[in] numPoints is the number of output points to be computed.
<> 132:9baf128c2fab 3333 * @param[in] * pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 132:9baf128c2fab 3334 * @param[in] * pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
<> 132:9baf128c2fab 3335 * @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].
<> 132:9baf128c2fab 3336 */
<> 132:9baf128c2fab 3337
<> 132:9baf128c2fab 3338 arm_status arm_conv_partial_fast_opt_q15(
<> 132:9baf128c2fab 3339 q15_t * pSrcA,
<> 132:9baf128c2fab 3340 uint32_t srcALen,
<> 132:9baf128c2fab 3341 q15_t * pSrcB,
<> 132:9baf128c2fab 3342 uint32_t srcBLen,
<> 132:9baf128c2fab 3343 q15_t * pDst,
<> 132:9baf128c2fab 3344 uint32_t firstIndex,
<> 132:9baf128c2fab 3345 uint32_t numPoints,
<> 132:9baf128c2fab 3346 q15_t * pScratch1,
<> 132:9baf128c2fab 3347 q15_t * pScratch2);
<> 132:9baf128c2fab 3348
<> 132:9baf128c2fab 3349
<> 132:9baf128c2fab 3350 /**
<> 132:9baf128c2fab 3351 * @brief Partial convolution of Q31 sequences.
<> 132:9baf128c2fab 3352 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3353 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3354 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3355 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3356 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3357 * @param[in] firstIndex is the first output sample to start with.
<> 132:9baf128c2fab 3358 * @param[in] numPoints is the number of output points to be computed.
<> 132:9baf128c2fab 3359 * @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].
<> 132:9baf128c2fab 3360 */
<> 132:9baf128c2fab 3361
<> 132:9baf128c2fab 3362 arm_status arm_conv_partial_q31(
<> 132:9baf128c2fab 3363 q31_t * pSrcA,
<> 132:9baf128c2fab 3364 uint32_t srcALen,
<> 132:9baf128c2fab 3365 q31_t * pSrcB,
<> 132:9baf128c2fab 3366 uint32_t srcBLen,
<> 132:9baf128c2fab 3367 q31_t * pDst,
<> 132:9baf128c2fab 3368 uint32_t firstIndex,
<> 132:9baf128c2fab 3369 uint32_t numPoints);
<> 132:9baf128c2fab 3370
<> 132:9baf128c2fab 3371
<> 132:9baf128c2fab 3372 /**
<> 132:9baf128c2fab 3373 * @brief Partial convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 132:9baf128c2fab 3374 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3375 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3376 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3377 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3378 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3379 * @param[in] firstIndex is the first output sample to start with.
<> 132:9baf128c2fab 3380 * @param[in] numPoints is the number of output points to be computed.
<> 132:9baf128c2fab 3381 * @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].
<> 132:9baf128c2fab 3382 */
<> 132:9baf128c2fab 3383
<> 132:9baf128c2fab 3384 arm_status arm_conv_partial_fast_q31(
<> 132:9baf128c2fab 3385 q31_t * pSrcA,
<> 132:9baf128c2fab 3386 uint32_t srcALen,
<> 132:9baf128c2fab 3387 q31_t * pSrcB,
<> 132:9baf128c2fab 3388 uint32_t srcBLen,
<> 132:9baf128c2fab 3389 q31_t * pDst,
<> 132:9baf128c2fab 3390 uint32_t firstIndex,
<> 132:9baf128c2fab 3391 uint32_t numPoints);
<> 132:9baf128c2fab 3392
<> 132:9baf128c2fab 3393
<> 132:9baf128c2fab 3394 /**
<> 132:9baf128c2fab 3395 * @brief Partial convolution of Q7 sequences
<> 132:9baf128c2fab 3396 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3397 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3398 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3399 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3400 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3401 * @param[in] firstIndex is the first output sample to start with.
<> 132:9baf128c2fab 3402 * @param[in] numPoints is the number of output points to be computed.
<> 132:9baf128c2fab 3403 * @param[in] *pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 132:9baf128c2fab 3404 * @param[in] *pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen).
<> 132:9baf128c2fab 3405 * @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].
<> 132:9baf128c2fab 3406 */
<> 132:9baf128c2fab 3407
<> 132:9baf128c2fab 3408 arm_status arm_conv_partial_opt_q7(
<> 132:9baf128c2fab 3409 q7_t * pSrcA,
<> 132:9baf128c2fab 3410 uint32_t srcALen,
<> 132:9baf128c2fab 3411 q7_t * pSrcB,
<> 132:9baf128c2fab 3412 uint32_t srcBLen,
<> 132:9baf128c2fab 3413 q7_t * pDst,
<> 132:9baf128c2fab 3414 uint32_t firstIndex,
<> 132:9baf128c2fab 3415 uint32_t numPoints,
<> 132:9baf128c2fab 3416 q15_t * pScratch1,
<> 132:9baf128c2fab 3417 q15_t * pScratch2);
<> 132:9baf128c2fab 3418
<> 132:9baf128c2fab 3419
<> 132:9baf128c2fab 3420 /**
<> 132:9baf128c2fab 3421 * @brief Partial convolution of Q7 sequences.
<> 132:9baf128c2fab 3422 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 3423 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 3424 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 3425 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 3426 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3427 * @param[in] firstIndex is the first output sample to start with.
<> 132:9baf128c2fab 3428 * @param[in] numPoints is the number of output points to be computed.
<> 132:9baf128c2fab 3429 * @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].
<> 132:9baf128c2fab 3430 */
<> 132:9baf128c2fab 3431
<> 132:9baf128c2fab 3432 arm_status arm_conv_partial_q7(
<> 132:9baf128c2fab 3433 q7_t * pSrcA,
<> 132:9baf128c2fab 3434 uint32_t srcALen,
<> 132:9baf128c2fab 3435 q7_t * pSrcB,
<> 132:9baf128c2fab 3436 uint32_t srcBLen,
<> 132:9baf128c2fab 3437 q7_t * pDst,
<> 132:9baf128c2fab 3438 uint32_t firstIndex,
<> 132:9baf128c2fab 3439 uint32_t numPoints);
<> 132:9baf128c2fab 3440
<> 132:9baf128c2fab 3441
<> 132:9baf128c2fab 3442
<> 132:9baf128c2fab 3443 /**
<> 132:9baf128c2fab 3444 * @brief Instance structure for the Q15 FIR decimator.
<> 132:9baf128c2fab 3445 */
<> 132:9baf128c2fab 3446
<> 132:9baf128c2fab 3447 typedef struct
<> 132:9baf128c2fab 3448 {
<> 132:9baf128c2fab 3449 uint8_t M; /**< decimation factor. */
<> 132:9baf128c2fab 3450 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 132:9baf128c2fab 3451 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 132:9baf128c2fab 3452 q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 132:9baf128c2fab 3453 } arm_fir_decimate_instance_q15;
<> 132:9baf128c2fab 3454
<> 132:9baf128c2fab 3455 /**
<> 132:9baf128c2fab 3456 * @brief Instance structure for the Q31 FIR decimator.
<> 132:9baf128c2fab 3457 */
<> 132:9baf128c2fab 3458
<> 132:9baf128c2fab 3459 typedef struct
<> 132:9baf128c2fab 3460 {
<> 132:9baf128c2fab 3461 uint8_t M; /**< decimation factor. */
<> 132:9baf128c2fab 3462 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 132:9baf128c2fab 3463 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 132:9baf128c2fab 3464 q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 132:9baf128c2fab 3465
<> 132:9baf128c2fab 3466 } arm_fir_decimate_instance_q31;
<> 132:9baf128c2fab 3467
<> 132:9baf128c2fab 3468 /**
<> 132:9baf128c2fab 3469 * @brief Instance structure for the floating-point FIR decimator.
<> 132:9baf128c2fab 3470 */
<> 132:9baf128c2fab 3471
<> 132:9baf128c2fab 3472 typedef struct
<> 132:9baf128c2fab 3473 {
<> 132:9baf128c2fab 3474 uint8_t M; /**< decimation factor. */
<> 132:9baf128c2fab 3475 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 132:9baf128c2fab 3476 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 132:9baf128c2fab 3477 float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 132:9baf128c2fab 3478
<> 132:9baf128c2fab 3479 } arm_fir_decimate_instance_f32;
<> 132:9baf128c2fab 3480
<> 132:9baf128c2fab 3481
<> 132:9baf128c2fab 3482
<> 132:9baf128c2fab 3483 /**
<> 132:9baf128c2fab 3484 * @brief Processing function for the floating-point FIR decimator.
<> 132:9baf128c2fab 3485 * @param[in] *S points to an instance of the floating-point FIR decimator structure.
<> 132:9baf128c2fab 3486 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 3487 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3488 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 3489 * @return none
<> 132:9baf128c2fab 3490 */
<> 132:9baf128c2fab 3491
<> 132:9baf128c2fab 3492 void arm_fir_decimate_f32(
<> 132:9baf128c2fab 3493 const arm_fir_decimate_instance_f32 * S,
<> 132:9baf128c2fab 3494 float32_t * pSrc,
<> 132:9baf128c2fab 3495 float32_t * pDst,
<> 132:9baf128c2fab 3496 uint32_t blockSize);
<> 132:9baf128c2fab 3497
<> 132:9baf128c2fab 3498
<> 132:9baf128c2fab 3499 /**
<> 132:9baf128c2fab 3500 * @brief Initialization function for the floating-point FIR decimator.
<> 132:9baf128c2fab 3501 * @param[in,out] *S points to an instance of the floating-point FIR decimator structure.
<> 132:9baf128c2fab 3502 * @param[in] numTaps number of coefficients in the filter.
<> 132:9baf128c2fab 3503 * @param[in] M decimation factor.
<> 132:9baf128c2fab 3504 * @param[in] *pCoeffs points to the filter coefficients.
<> 132:9baf128c2fab 3505 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 3506 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 3507 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 132:9baf128c2fab 3508 * <code>blockSize</code> is not a multiple of <code>M</code>.
<> 132:9baf128c2fab 3509 */
<> 132:9baf128c2fab 3510
<> 132:9baf128c2fab 3511 arm_status arm_fir_decimate_init_f32(
<> 132:9baf128c2fab 3512 arm_fir_decimate_instance_f32 * S,
<> 132:9baf128c2fab 3513 uint16_t numTaps,
<> 132:9baf128c2fab 3514 uint8_t M,
<> 132:9baf128c2fab 3515 float32_t * pCoeffs,
<> 132:9baf128c2fab 3516 float32_t * pState,
<> 132:9baf128c2fab 3517 uint32_t blockSize);
<> 132:9baf128c2fab 3518
<> 132:9baf128c2fab 3519 /**
<> 132:9baf128c2fab 3520 * @brief Processing function for the Q15 FIR decimator.
<> 132:9baf128c2fab 3521 * @param[in] *S points to an instance of the Q15 FIR decimator structure.
<> 132:9baf128c2fab 3522 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 3523 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3524 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 3525 * @return none
<> 132:9baf128c2fab 3526 */
<> 132:9baf128c2fab 3527
<> 132:9baf128c2fab 3528 void arm_fir_decimate_q15(
<> 132:9baf128c2fab 3529 const arm_fir_decimate_instance_q15 * S,
<> 132:9baf128c2fab 3530 q15_t * pSrc,
<> 132:9baf128c2fab 3531 q15_t * pDst,
<> 132:9baf128c2fab 3532 uint32_t blockSize);
<> 132:9baf128c2fab 3533
<> 132:9baf128c2fab 3534 /**
<> 132:9baf128c2fab 3535 * @brief Processing function for the Q15 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
<> 132:9baf128c2fab 3536 * @param[in] *S points to an instance of the Q15 FIR decimator structure.
<> 132:9baf128c2fab 3537 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 3538 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3539 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 3540 * @return none
<> 132:9baf128c2fab 3541 */
<> 132:9baf128c2fab 3542
<> 132:9baf128c2fab 3543 void arm_fir_decimate_fast_q15(
<> 132:9baf128c2fab 3544 const arm_fir_decimate_instance_q15 * S,
<> 132:9baf128c2fab 3545 q15_t * pSrc,
<> 132:9baf128c2fab 3546 q15_t * pDst,
<> 132:9baf128c2fab 3547 uint32_t blockSize);
<> 132:9baf128c2fab 3548
<> 132:9baf128c2fab 3549
<> 132:9baf128c2fab 3550
<> 132:9baf128c2fab 3551 /**
<> 132:9baf128c2fab 3552 * @brief Initialization function for the Q15 FIR decimator.
<> 132:9baf128c2fab 3553 * @param[in,out] *S points to an instance of the Q15 FIR decimator structure.
<> 132:9baf128c2fab 3554 * @param[in] numTaps number of coefficients in the filter.
<> 132:9baf128c2fab 3555 * @param[in] M decimation factor.
<> 132:9baf128c2fab 3556 * @param[in] *pCoeffs points to the filter coefficients.
<> 132:9baf128c2fab 3557 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 3558 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 3559 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 132:9baf128c2fab 3560 * <code>blockSize</code> is not a multiple of <code>M</code>.
<> 132:9baf128c2fab 3561 */
<> 132:9baf128c2fab 3562
<> 132:9baf128c2fab 3563 arm_status arm_fir_decimate_init_q15(
<> 132:9baf128c2fab 3564 arm_fir_decimate_instance_q15 * S,
<> 132:9baf128c2fab 3565 uint16_t numTaps,
<> 132:9baf128c2fab 3566 uint8_t M,
<> 132:9baf128c2fab 3567 q15_t * pCoeffs,
<> 132:9baf128c2fab 3568 q15_t * pState,
<> 132:9baf128c2fab 3569 uint32_t blockSize);
<> 132:9baf128c2fab 3570
<> 132:9baf128c2fab 3571 /**
<> 132:9baf128c2fab 3572 * @brief Processing function for the Q31 FIR decimator.
<> 132:9baf128c2fab 3573 * @param[in] *S points to an instance of the Q31 FIR decimator structure.
<> 132:9baf128c2fab 3574 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 3575 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3576 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 3577 * @return none
<> 132:9baf128c2fab 3578 */
<> 132:9baf128c2fab 3579
<> 132:9baf128c2fab 3580 void arm_fir_decimate_q31(
<> 132:9baf128c2fab 3581 const arm_fir_decimate_instance_q31 * S,
<> 132:9baf128c2fab 3582 q31_t * pSrc,
<> 132:9baf128c2fab 3583 q31_t * pDst,
<> 132:9baf128c2fab 3584 uint32_t blockSize);
<> 132:9baf128c2fab 3585
<> 132:9baf128c2fab 3586 /**
<> 132:9baf128c2fab 3587 * @brief Processing function for the Q31 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
<> 132:9baf128c2fab 3588 * @param[in] *S points to an instance of the Q31 FIR decimator structure.
<> 132:9baf128c2fab 3589 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 3590 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3591 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 3592 * @return none
<> 132:9baf128c2fab 3593 */
<> 132:9baf128c2fab 3594
<> 132:9baf128c2fab 3595 void arm_fir_decimate_fast_q31(
<> 132:9baf128c2fab 3596 arm_fir_decimate_instance_q31 * S,
<> 132:9baf128c2fab 3597 q31_t * pSrc,
<> 132:9baf128c2fab 3598 q31_t * pDst,
<> 132:9baf128c2fab 3599 uint32_t blockSize);
<> 132:9baf128c2fab 3600
<> 132:9baf128c2fab 3601
<> 132:9baf128c2fab 3602 /**
<> 132:9baf128c2fab 3603 * @brief Initialization function for the Q31 FIR decimator.
<> 132:9baf128c2fab 3604 * @param[in,out] *S points to an instance of the Q31 FIR decimator structure.
<> 132:9baf128c2fab 3605 * @param[in] numTaps number of coefficients in the filter.
<> 132:9baf128c2fab 3606 * @param[in] M decimation factor.
<> 132:9baf128c2fab 3607 * @param[in] *pCoeffs points to the filter coefficients.
<> 132:9baf128c2fab 3608 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 3609 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 3610 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 132:9baf128c2fab 3611 * <code>blockSize</code> is not a multiple of <code>M</code>.
<> 132:9baf128c2fab 3612 */
<> 132:9baf128c2fab 3613
<> 132:9baf128c2fab 3614 arm_status arm_fir_decimate_init_q31(
<> 132:9baf128c2fab 3615 arm_fir_decimate_instance_q31 * S,
<> 132:9baf128c2fab 3616 uint16_t numTaps,
<> 132:9baf128c2fab 3617 uint8_t M,
<> 132:9baf128c2fab 3618 q31_t * pCoeffs,
<> 132:9baf128c2fab 3619 q31_t * pState,
<> 132:9baf128c2fab 3620 uint32_t blockSize);
<> 132:9baf128c2fab 3621
<> 132:9baf128c2fab 3622
<> 132:9baf128c2fab 3623
<> 132:9baf128c2fab 3624 /**
<> 132:9baf128c2fab 3625 * @brief Instance structure for the Q15 FIR interpolator.
<> 132:9baf128c2fab 3626 */
<> 132:9baf128c2fab 3627
<> 132:9baf128c2fab 3628 typedef struct
<> 132:9baf128c2fab 3629 {
<> 132:9baf128c2fab 3630 uint8_t L; /**< upsample factor. */
<> 132:9baf128c2fab 3631 uint16_t phaseLength; /**< length of each polyphase filter component. */
<> 132:9baf128c2fab 3632 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
<> 132:9baf128c2fab 3633 q15_t *pState; /**< points to the state variable array. The array is of length blockSize+phaseLength-1. */
<> 132:9baf128c2fab 3634 } arm_fir_interpolate_instance_q15;
<> 132:9baf128c2fab 3635
<> 132:9baf128c2fab 3636 /**
<> 132:9baf128c2fab 3637 * @brief Instance structure for the Q31 FIR interpolator.
<> 132:9baf128c2fab 3638 */
<> 132:9baf128c2fab 3639
<> 132:9baf128c2fab 3640 typedef struct
<> 132:9baf128c2fab 3641 {
<> 132:9baf128c2fab 3642 uint8_t L; /**< upsample factor. */
<> 132:9baf128c2fab 3643 uint16_t phaseLength; /**< length of each polyphase filter component. */
<> 132:9baf128c2fab 3644 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
<> 132:9baf128c2fab 3645 q31_t *pState; /**< points to the state variable array. The array is of length blockSize+phaseLength-1. */
<> 132:9baf128c2fab 3646 } arm_fir_interpolate_instance_q31;
<> 132:9baf128c2fab 3647
<> 132:9baf128c2fab 3648 /**
<> 132:9baf128c2fab 3649 * @brief Instance structure for the floating-point FIR interpolator.
<> 132:9baf128c2fab 3650 */
<> 132:9baf128c2fab 3651
<> 132:9baf128c2fab 3652 typedef struct
<> 132:9baf128c2fab 3653 {
<> 132:9baf128c2fab 3654 uint8_t L; /**< upsample factor. */
<> 132:9baf128c2fab 3655 uint16_t phaseLength; /**< length of each polyphase filter component. */
<> 132:9baf128c2fab 3656 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
<> 132:9baf128c2fab 3657 float32_t *pState; /**< points to the state variable array. The array is of length phaseLength+numTaps-1. */
<> 132:9baf128c2fab 3658 } arm_fir_interpolate_instance_f32;
<> 132:9baf128c2fab 3659
<> 132:9baf128c2fab 3660
<> 132:9baf128c2fab 3661 /**
<> 132:9baf128c2fab 3662 * @brief Processing function for the Q15 FIR interpolator.
<> 132:9baf128c2fab 3663 * @param[in] *S points to an instance of the Q15 FIR interpolator structure.
<> 132:9baf128c2fab 3664 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 3665 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 3666 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 3667 * @return none.
<> 132:9baf128c2fab 3668 */
<> 132:9baf128c2fab 3669
<> 132:9baf128c2fab 3670 void arm_fir_interpolate_q15(
<> 132:9baf128c2fab 3671 const arm_fir_interpolate_instance_q15 * S,
<> 132:9baf128c2fab 3672 q15_t * pSrc,
<> 132:9baf128c2fab 3673 q15_t * pDst,
<> 132:9baf128c2fab 3674 uint32_t blockSize);
<> 132:9baf128c2fab 3675
<> 132:9baf128c2fab 3676
<> 132:9baf128c2fab 3677 /**
<> 132:9baf128c2fab 3678 * @brief Initialization function for the Q15 FIR interpolator.
<> 132:9baf128c2fab 3679 * @param[in,out] *S points to an instance of the Q15 FIR interpolator structure.
<> 132:9baf128c2fab 3680 * @param[in] L upsample factor.
<> 132:9baf128c2fab 3681 * @param[in] numTaps number of filter coefficients in the filter.
<> 132:9baf128c2fab 3682 * @param[in] *pCoeffs points to the filter coefficient buffer.
<> 132:9baf128c2fab 3683 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 3684 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 3685 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 132:9baf128c2fab 3686 * the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</code>.
<> 132:9baf128c2fab 3687 */
<> 132:9baf128c2fab 3688
<> 132:9baf128c2fab 3689 arm_status arm_fir_interpolate_init_q15(
<> 132:9baf128c2fab 3690 arm_fir_interpolate_instance_q15 * S,
<> 132:9baf128c2fab 3691 uint8_t L,
<> 132:9baf128c2fab 3692 uint16_t numTaps,
<> 132:9baf128c2fab 3693 q15_t * pCoeffs,
<> 132:9baf128c2fab 3694 q15_t * pState,
<> 132:9baf128c2fab 3695 uint32_t blockSize);
<> 132:9baf128c2fab 3696
<> 132:9baf128c2fab 3697 /**
<> 132:9baf128c2fab 3698 * @brief Processing function for the Q31 FIR interpolator.
<> 132:9baf128c2fab 3699 * @param[in] *S points to an instance of the Q15 FIR interpolator structure.
<> 132:9baf128c2fab 3700 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 3701 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 3702 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 3703 * @return none.
<> 132:9baf128c2fab 3704 */
<> 132:9baf128c2fab 3705
<> 132:9baf128c2fab 3706 void arm_fir_interpolate_q31(
<> 132:9baf128c2fab 3707 const arm_fir_interpolate_instance_q31 * S,
<> 132:9baf128c2fab 3708 q31_t * pSrc,
<> 132:9baf128c2fab 3709 q31_t * pDst,
<> 132:9baf128c2fab 3710 uint32_t blockSize);
<> 132:9baf128c2fab 3711
<> 132:9baf128c2fab 3712 /**
<> 132:9baf128c2fab 3713 * @brief Initialization function for the Q31 FIR interpolator.
<> 132:9baf128c2fab 3714 * @param[in,out] *S points to an instance of the Q31 FIR interpolator structure.
<> 132:9baf128c2fab 3715 * @param[in] L upsample factor.
<> 132:9baf128c2fab 3716 * @param[in] numTaps number of filter coefficients in the filter.
<> 132:9baf128c2fab 3717 * @param[in] *pCoeffs points to the filter coefficient buffer.
<> 132:9baf128c2fab 3718 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 3719 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 3720 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 132:9baf128c2fab 3721 * the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</code>.
<> 132:9baf128c2fab 3722 */
<> 132:9baf128c2fab 3723
<> 132:9baf128c2fab 3724 arm_status arm_fir_interpolate_init_q31(
<> 132:9baf128c2fab 3725 arm_fir_interpolate_instance_q31 * S,
<> 132:9baf128c2fab 3726 uint8_t L,
<> 132:9baf128c2fab 3727 uint16_t numTaps,
<> 132:9baf128c2fab 3728 q31_t * pCoeffs,
<> 132:9baf128c2fab 3729 q31_t * pState,
<> 132:9baf128c2fab 3730 uint32_t blockSize);
<> 132:9baf128c2fab 3731
<> 132:9baf128c2fab 3732
<> 132:9baf128c2fab 3733 /**
<> 132:9baf128c2fab 3734 * @brief Processing function for the floating-point FIR interpolator.
<> 132:9baf128c2fab 3735 * @param[in] *S points to an instance of the floating-point FIR interpolator structure.
<> 132:9baf128c2fab 3736 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 3737 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 3738 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 3739 * @return none.
<> 132:9baf128c2fab 3740 */
<> 132:9baf128c2fab 3741
<> 132:9baf128c2fab 3742 void arm_fir_interpolate_f32(
<> 132:9baf128c2fab 3743 const arm_fir_interpolate_instance_f32 * S,
<> 132:9baf128c2fab 3744 float32_t * pSrc,
<> 132:9baf128c2fab 3745 float32_t * pDst,
<> 132:9baf128c2fab 3746 uint32_t blockSize);
<> 132:9baf128c2fab 3747
<> 132:9baf128c2fab 3748 /**
<> 132:9baf128c2fab 3749 * @brief Initialization function for the floating-point FIR interpolator.
<> 132:9baf128c2fab 3750 * @param[in,out] *S points to an instance of the floating-point FIR interpolator structure.
<> 132:9baf128c2fab 3751 * @param[in] L upsample factor.
<> 132:9baf128c2fab 3752 * @param[in] numTaps number of filter coefficients in the filter.
<> 132:9baf128c2fab 3753 * @param[in] *pCoeffs points to the filter coefficient buffer.
<> 132:9baf128c2fab 3754 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 3755 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 3756 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 132:9baf128c2fab 3757 * the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</code>.
<> 132:9baf128c2fab 3758 */
<> 132:9baf128c2fab 3759
<> 132:9baf128c2fab 3760 arm_status arm_fir_interpolate_init_f32(
<> 132:9baf128c2fab 3761 arm_fir_interpolate_instance_f32 * S,
<> 132:9baf128c2fab 3762 uint8_t L,
<> 132:9baf128c2fab 3763 uint16_t numTaps,
<> 132:9baf128c2fab 3764 float32_t * pCoeffs,
<> 132:9baf128c2fab 3765 float32_t * pState,
<> 132:9baf128c2fab 3766 uint32_t blockSize);
<> 132:9baf128c2fab 3767
<> 132:9baf128c2fab 3768 /**
<> 132:9baf128c2fab 3769 * @brief Instance structure for the high precision Q31 Biquad cascade filter.
<> 132:9baf128c2fab 3770 */
<> 132:9baf128c2fab 3771
<> 132:9baf128c2fab 3772 typedef struct
<> 132:9baf128c2fab 3773 {
<> 132:9baf128c2fab 3774 uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 132:9baf128c2fab 3775 q63_t *pState; /**< points to the array of state coefficients. The array is of length 4*numStages. */
<> 132:9baf128c2fab 3776 q31_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
<> 132:9baf128c2fab 3777 uint8_t postShift; /**< additional shift, in bits, applied to each output sample. */
<> 132:9baf128c2fab 3778
<> 132:9baf128c2fab 3779 } arm_biquad_cas_df1_32x64_ins_q31;
<> 132:9baf128c2fab 3780
<> 132:9baf128c2fab 3781
<> 132:9baf128c2fab 3782 /**
<> 132:9baf128c2fab 3783 * @param[in] *S points to an instance of the high precision Q31 Biquad cascade filter structure.
<> 132:9baf128c2fab 3784 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 3785 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3786 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 3787 * @return none.
<> 132:9baf128c2fab 3788 */
<> 132:9baf128c2fab 3789
<> 132:9baf128c2fab 3790 void arm_biquad_cas_df1_32x64_q31(
<> 132:9baf128c2fab 3791 const arm_biquad_cas_df1_32x64_ins_q31 * S,
<> 132:9baf128c2fab 3792 q31_t * pSrc,
<> 132:9baf128c2fab 3793 q31_t * pDst,
<> 132:9baf128c2fab 3794 uint32_t blockSize);
<> 132:9baf128c2fab 3795
<> 132:9baf128c2fab 3796
<> 132:9baf128c2fab 3797 /**
<> 132:9baf128c2fab 3798 * @param[in,out] *S points to an instance of the high precision Q31 Biquad cascade filter structure.
<> 132:9baf128c2fab 3799 * @param[in] numStages number of 2nd order stages in the filter.
<> 132:9baf128c2fab 3800 * @param[in] *pCoeffs points to the filter coefficients.
<> 132:9baf128c2fab 3801 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 3802 * @param[in] postShift shift to be applied to the output. Varies according to the coefficients format
<> 132:9baf128c2fab 3803 * @return none
<> 132:9baf128c2fab 3804 */
<> 132:9baf128c2fab 3805
<> 132:9baf128c2fab 3806 void arm_biquad_cas_df1_32x64_init_q31(
<> 132:9baf128c2fab 3807 arm_biquad_cas_df1_32x64_ins_q31 * S,
<> 132:9baf128c2fab 3808 uint8_t numStages,
<> 132:9baf128c2fab 3809 q31_t * pCoeffs,
<> 132:9baf128c2fab 3810 q63_t * pState,
<> 132:9baf128c2fab 3811 uint8_t postShift);
<> 132:9baf128c2fab 3812
<> 132:9baf128c2fab 3813
<> 132:9baf128c2fab 3814
<> 132:9baf128c2fab 3815 /**
<> 132:9baf128c2fab 3816 * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
<> 132:9baf128c2fab 3817 */
<> 132:9baf128c2fab 3818
<> 132:9baf128c2fab 3819 typedef struct
<> 132:9baf128c2fab 3820 {
<> 132:9baf128c2fab 3821 uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 132:9baf128c2fab 3822 float32_t *pState; /**< points to the array of state coefficients. The array is of length 2*numStages. */
<> 132:9baf128c2fab 3823 float32_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
<> 132:9baf128c2fab 3824 } arm_biquad_cascade_df2T_instance_f32;
<> 132:9baf128c2fab 3825
<> 132:9baf128c2fab 3826
<> 132:9baf128c2fab 3827
<> 132:9baf128c2fab 3828 /**
<> 132:9baf128c2fab 3829 * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
<> 132:9baf128c2fab 3830 */
<> 132:9baf128c2fab 3831
<> 132:9baf128c2fab 3832 typedef struct
<> 132:9baf128c2fab 3833 {
<> 132:9baf128c2fab 3834 uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 132:9baf128c2fab 3835 float32_t *pState; /**< points to the array of state coefficients. The array is of length 4*numStages. */
<> 132:9baf128c2fab 3836 float32_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
<> 132:9baf128c2fab 3837 } arm_biquad_cascade_stereo_df2T_instance_f32;
<> 132:9baf128c2fab 3838
<> 132:9baf128c2fab 3839
<> 132:9baf128c2fab 3840
<> 132:9baf128c2fab 3841 /**
<> 132:9baf128c2fab 3842 * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
<> 132:9baf128c2fab 3843 */
<> 132:9baf128c2fab 3844
<> 132:9baf128c2fab 3845 typedef struct
<> 132:9baf128c2fab 3846 {
<> 132:9baf128c2fab 3847 uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 132:9baf128c2fab 3848 float64_t *pState; /**< points to the array of state coefficients. The array is of length 2*numStages. */
<> 132:9baf128c2fab 3849 float64_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
<> 132:9baf128c2fab 3850 } arm_biquad_cascade_df2T_instance_f64;
<> 132:9baf128c2fab 3851
<> 132:9baf128c2fab 3852
<> 132:9baf128c2fab 3853 /**
<> 132:9baf128c2fab 3854 * @brief Processing function for the floating-point transposed direct form II Biquad cascade filter.
<> 132:9baf128c2fab 3855 * @param[in] *S points to an instance of the filter data structure.
<> 132:9baf128c2fab 3856 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 3857 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3858 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 3859 * @return none.
<> 132:9baf128c2fab 3860 */
<> 132:9baf128c2fab 3861
<> 132:9baf128c2fab 3862 void arm_biquad_cascade_df2T_f32(
<> 132:9baf128c2fab 3863 const arm_biquad_cascade_df2T_instance_f32 * S,
<> 132:9baf128c2fab 3864 float32_t * pSrc,
<> 132:9baf128c2fab 3865 float32_t * pDst,
<> 132:9baf128c2fab 3866 uint32_t blockSize);
<> 132:9baf128c2fab 3867
<> 132:9baf128c2fab 3868
<> 132:9baf128c2fab 3869 /**
<> 132:9baf128c2fab 3870 * @brief Processing function for the floating-point transposed direct form II Biquad cascade filter. 2 channels
<> 132:9baf128c2fab 3871 * @param[in] *S points to an instance of the filter data structure.
<> 132:9baf128c2fab 3872 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 3873 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3874 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 3875 * @return none.
<> 132:9baf128c2fab 3876 */
<> 132:9baf128c2fab 3877
<> 132:9baf128c2fab 3878 void arm_biquad_cascade_stereo_df2T_f32(
<> 132:9baf128c2fab 3879 const arm_biquad_cascade_stereo_df2T_instance_f32 * S,
<> 132:9baf128c2fab 3880 float32_t * pSrc,
<> 132:9baf128c2fab 3881 float32_t * pDst,
<> 132:9baf128c2fab 3882 uint32_t blockSize);
<> 132:9baf128c2fab 3883
<> 132:9baf128c2fab 3884 /**
<> 132:9baf128c2fab 3885 * @brief Processing function for the floating-point transposed direct form II Biquad cascade filter.
<> 132:9baf128c2fab 3886 * @param[in] *S points to an instance of the filter data structure.
<> 132:9baf128c2fab 3887 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 3888 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 3889 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 3890 * @return none.
<> 132:9baf128c2fab 3891 */
<> 132:9baf128c2fab 3892
<> 132:9baf128c2fab 3893 void arm_biquad_cascade_df2T_f64(
<> 132:9baf128c2fab 3894 const arm_biquad_cascade_df2T_instance_f64 * S,
<> 132:9baf128c2fab 3895 float64_t * pSrc,
<> 132:9baf128c2fab 3896 float64_t * pDst,
<> 132:9baf128c2fab 3897 uint32_t blockSize);
<> 132:9baf128c2fab 3898
<> 132:9baf128c2fab 3899
<> 132:9baf128c2fab 3900 /**
<> 132:9baf128c2fab 3901 * @brief Initialization function for the floating-point transposed direct form II Biquad cascade filter.
<> 132:9baf128c2fab 3902 * @param[in,out] *S points to an instance of the filter data structure.
<> 132:9baf128c2fab 3903 * @param[in] numStages number of 2nd order stages in the filter.
<> 132:9baf128c2fab 3904 * @param[in] *pCoeffs points to the filter coefficients.
<> 132:9baf128c2fab 3905 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 3906 * @return none
<> 132:9baf128c2fab 3907 */
<> 132:9baf128c2fab 3908
<> 132:9baf128c2fab 3909 void arm_biquad_cascade_df2T_init_f32(
<> 132:9baf128c2fab 3910 arm_biquad_cascade_df2T_instance_f32 * S,
<> 132:9baf128c2fab 3911 uint8_t numStages,
<> 132:9baf128c2fab 3912 float32_t * pCoeffs,
<> 132:9baf128c2fab 3913 float32_t * pState);
<> 132:9baf128c2fab 3914
<> 132:9baf128c2fab 3915
<> 132:9baf128c2fab 3916 /**
<> 132:9baf128c2fab 3917 * @brief Initialization function for the floating-point transposed direct form II Biquad cascade filter.
<> 132:9baf128c2fab 3918 * @param[in,out] *S points to an instance of the filter data structure.
<> 132:9baf128c2fab 3919 * @param[in] numStages number of 2nd order stages in the filter.
<> 132:9baf128c2fab 3920 * @param[in] *pCoeffs points to the filter coefficients.
<> 132:9baf128c2fab 3921 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 3922 * @return none
<> 132:9baf128c2fab 3923 */
<> 132:9baf128c2fab 3924
<> 132:9baf128c2fab 3925 void arm_biquad_cascade_stereo_df2T_init_f32(
<> 132:9baf128c2fab 3926 arm_biquad_cascade_stereo_df2T_instance_f32 * S,
<> 132:9baf128c2fab 3927 uint8_t numStages,
<> 132:9baf128c2fab 3928 float32_t * pCoeffs,
<> 132:9baf128c2fab 3929 float32_t * pState);
<> 132:9baf128c2fab 3930
<> 132:9baf128c2fab 3931
<> 132:9baf128c2fab 3932 /**
<> 132:9baf128c2fab 3933 * @brief Initialization function for the floating-point transposed direct form II Biquad cascade filter.
<> 132:9baf128c2fab 3934 * @param[in,out] *S points to an instance of the filter data structure.
<> 132:9baf128c2fab 3935 * @param[in] numStages number of 2nd order stages in the filter.
<> 132:9baf128c2fab 3936 * @param[in] *pCoeffs points to the filter coefficients.
<> 132:9baf128c2fab 3937 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 3938 * @return none
<> 132:9baf128c2fab 3939 */
<> 132:9baf128c2fab 3940
<> 132:9baf128c2fab 3941 void arm_biquad_cascade_df2T_init_f64(
<> 132:9baf128c2fab 3942 arm_biquad_cascade_df2T_instance_f64 * S,
<> 132:9baf128c2fab 3943 uint8_t numStages,
<> 132:9baf128c2fab 3944 float64_t * pCoeffs,
<> 132:9baf128c2fab 3945 float64_t * pState);
<> 132:9baf128c2fab 3946
<> 132:9baf128c2fab 3947
<> 132:9baf128c2fab 3948
<> 132:9baf128c2fab 3949 /**
<> 132:9baf128c2fab 3950 * @brief Instance structure for the Q15 FIR lattice filter.
<> 132:9baf128c2fab 3951 */
<> 132:9baf128c2fab 3952
<> 132:9baf128c2fab 3953 typedef struct
<> 132:9baf128c2fab 3954 {
<> 132:9baf128c2fab 3955 uint16_t numStages; /**< number of filter stages. */
<> 132:9baf128c2fab 3956 q15_t *pState; /**< points to the state variable array. The array is of length numStages. */
<> 132:9baf128c2fab 3957 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
<> 132:9baf128c2fab 3958 } arm_fir_lattice_instance_q15;
<> 132:9baf128c2fab 3959
<> 132:9baf128c2fab 3960 /**
<> 132:9baf128c2fab 3961 * @brief Instance structure for the Q31 FIR lattice filter.
<> 132:9baf128c2fab 3962 */
<> 132:9baf128c2fab 3963
<> 132:9baf128c2fab 3964 typedef struct
<> 132:9baf128c2fab 3965 {
<> 132:9baf128c2fab 3966 uint16_t numStages; /**< number of filter stages. */
<> 132:9baf128c2fab 3967 q31_t *pState; /**< points to the state variable array. The array is of length numStages. */
<> 132:9baf128c2fab 3968 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
<> 132:9baf128c2fab 3969 } arm_fir_lattice_instance_q31;
<> 132:9baf128c2fab 3970
<> 132:9baf128c2fab 3971 /**
<> 132:9baf128c2fab 3972 * @brief Instance structure for the floating-point FIR lattice filter.
<> 132:9baf128c2fab 3973 */
<> 132:9baf128c2fab 3974
<> 132:9baf128c2fab 3975 typedef struct
<> 132:9baf128c2fab 3976 {
<> 132:9baf128c2fab 3977 uint16_t numStages; /**< number of filter stages. */
<> 132:9baf128c2fab 3978 float32_t *pState; /**< points to the state variable array. The array is of length numStages. */
<> 132:9baf128c2fab 3979 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
<> 132:9baf128c2fab 3980 } arm_fir_lattice_instance_f32;
<> 132:9baf128c2fab 3981
<> 132:9baf128c2fab 3982 /**
<> 132:9baf128c2fab 3983 * @brief Initialization function for the Q15 FIR lattice filter.
<> 132:9baf128c2fab 3984 * @param[in] *S points to an instance of the Q15 FIR lattice structure.
<> 132:9baf128c2fab 3985 * @param[in] numStages number of filter stages.
<> 132:9baf128c2fab 3986 * @param[in] *pCoeffs points to the coefficient buffer. The array is of length numStages.
<> 132:9baf128c2fab 3987 * @param[in] *pState points to the state buffer. The array is of length numStages.
<> 132:9baf128c2fab 3988 * @return none.
<> 132:9baf128c2fab 3989 */
<> 132:9baf128c2fab 3990
<> 132:9baf128c2fab 3991 void arm_fir_lattice_init_q15(
<> 132:9baf128c2fab 3992 arm_fir_lattice_instance_q15 * S,
<> 132:9baf128c2fab 3993 uint16_t numStages,
<> 132:9baf128c2fab 3994 q15_t * pCoeffs,
<> 132:9baf128c2fab 3995 q15_t * pState);
<> 132:9baf128c2fab 3996
<> 132:9baf128c2fab 3997
<> 132:9baf128c2fab 3998 /**
<> 132:9baf128c2fab 3999 * @brief Processing function for the Q15 FIR lattice filter.
<> 132:9baf128c2fab 4000 * @param[in] *S points to an instance of the Q15 FIR lattice structure.
<> 132:9baf128c2fab 4001 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 4002 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 4003 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4004 * @return none.
<> 132:9baf128c2fab 4005 */
<> 132:9baf128c2fab 4006 void arm_fir_lattice_q15(
<> 132:9baf128c2fab 4007 const arm_fir_lattice_instance_q15 * S,
<> 132:9baf128c2fab 4008 q15_t * pSrc,
<> 132:9baf128c2fab 4009 q15_t * pDst,
<> 132:9baf128c2fab 4010 uint32_t blockSize);
<> 132:9baf128c2fab 4011
<> 132:9baf128c2fab 4012 /**
<> 132:9baf128c2fab 4013 * @brief Initialization function for the Q31 FIR lattice filter.
<> 132:9baf128c2fab 4014 * @param[in] *S points to an instance of the Q31 FIR lattice structure.
<> 132:9baf128c2fab 4015 * @param[in] numStages number of filter stages.
<> 132:9baf128c2fab 4016 * @param[in] *pCoeffs points to the coefficient buffer. The array is of length numStages.
<> 132:9baf128c2fab 4017 * @param[in] *pState points to the state buffer. The array is of length numStages.
<> 132:9baf128c2fab 4018 * @return none.
<> 132:9baf128c2fab 4019 */
<> 132:9baf128c2fab 4020
<> 132:9baf128c2fab 4021 void arm_fir_lattice_init_q31(
<> 132:9baf128c2fab 4022 arm_fir_lattice_instance_q31 * S,
<> 132:9baf128c2fab 4023 uint16_t numStages,
<> 132:9baf128c2fab 4024 q31_t * pCoeffs,
<> 132:9baf128c2fab 4025 q31_t * pState);
<> 132:9baf128c2fab 4026
<> 132:9baf128c2fab 4027
<> 132:9baf128c2fab 4028 /**
<> 132:9baf128c2fab 4029 * @brief Processing function for the Q31 FIR lattice filter.
<> 132:9baf128c2fab 4030 * @param[in] *S points to an instance of the Q31 FIR lattice structure.
<> 132:9baf128c2fab 4031 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 4032 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 4033 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4034 * @return none.
<> 132:9baf128c2fab 4035 */
<> 132:9baf128c2fab 4036
<> 132:9baf128c2fab 4037 void arm_fir_lattice_q31(
<> 132:9baf128c2fab 4038 const arm_fir_lattice_instance_q31 * S,
<> 132:9baf128c2fab 4039 q31_t * pSrc,
<> 132:9baf128c2fab 4040 q31_t * pDst,
<> 132:9baf128c2fab 4041 uint32_t blockSize);
<> 132:9baf128c2fab 4042
<> 132:9baf128c2fab 4043 /**
<> 132:9baf128c2fab 4044 * @brief Initialization function for the floating-point FIR lattice filter.
<> 132:9baf128c2fab 4045 * @param[in] *S points to an instance of the floating-point FIR lattice structure.
<> 132:9baf128c2fab 4046 * @param[in] numStages number of filter stages.
<> 132:9baf128c2fab 4047 * @param[in] *pCoeffs points to the coefficient buffer. The array is of length numStages.
<> 132:9baf128c2fab 4048 * @param[in] *pState points to the state buffer. The array is of length numStages.
<> 132:9baf128c2fab 4049 * @return none.
<> 132:9baf128c2fab 4050 */
<> 132:9baf128c2fab 4051
<> 132:9baf128c2fab 4052 void arm_fir_lattice_init_f32(
<> 132:9baf128c2fab 4053 arm_fir_lattice_instance_f32 * S,
<> 132:9baf128c2fab 4054 uint16_t numStages,
<> 132:9baf128c2fab 4055 float32_t * pCoeffs,
<> 132:9baf128c2fab 4056 float32_t * pState);
<> 132:9baf128c2fab 4057
<> 132:9baf128c2fab 4058 /**
<> 132:9baf128c2fab 4059 * @brief Processing function for the floating-point FIR lattice filter.
<> 132:9baf128c2fab 4060 * @param[in] *S points to an instance of the floating-point FIR lattice structure.
<> 132:9baf128c2fab 4061 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 4062 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 4063 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4064 * @return none.
<> 132:9baf128c2fab 4065 */
<> 132:9baf128c2fab 4066
<> 132:9baf128c2fab 4067 void arm_fir_lattice_f32(
<> 132:9baf128c2fab 4068 const arm_fir_lattice_instance_f32 * S,
<> 132:9baf128c2fab 4069 float32_t * pSrc,
<> 132:9baf128c2fab 4070 float32_t * pDst,
<> 132:9baf128c2fab 4071 uint32_t blockSize);
<> 132:9baf128c2fab 4072
<> 132:9baf128c2fab 4073 /**
<> 132:9baf128c2fab 4074 * @brief Instance structure for the Q15 IIR lattice filter.
<> 132:9baf128c2fab 4075 */
<> 132:9baf128c2fab 4076 typedef struct
<> 132:9baf128c2fab 4077 {
<> 132:9baf128c2fab 4078 uint16_t numStages; /**< number of stages in the filter. */
<> 132:9baf128c2fab 4079 q15_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
<> 132:9baf128c2fab 4080 q15_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
<> 132:9baf128c2fab 4081 q15_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
<> 132:9baf128c2fab 4082 } arm_iir_lattice_instance_q15;
<> 132:9baf128c2fab 4083
<> 132:9baf128c2fab 4084 /**
<> 132:9baf128c2fab 4085 * @brief Instance structure for the Q31 IIR lattice filter.
<> 132:9baf128c2fab 4086 */
<> 132:9baf128c2fab 4087 typedef struct
<> 132:9baf128c2fab 4088 {
<> 132:9baf128c2fab 4089 uint16_t numStages; /**< number of stages in the filter. */
<> 132:9baf128c2fab 4090 q31_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
<> 132:9baf128c2fab 4091 q31_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
<> 132:9baf128c2fab 4092 q31_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
<> 132:9baf128c2fab 4093 } arm_iir_lattice_instance_q31;
<> 132:9baf128c2fab 4094
<> 132:9baf128c2fab 4095 /**
<> 132:9baf128c2fab 4096 * @brief Instance structure for the floating-point IIR lattice filter.
<> 132:9baf128c2fab 4097 */
<> 132:9baf128c2fab 4098 typedef struct
<> 132:9baf128c2fab 4099 {
<> 132:9baf128c2fab 4100 uint16_t numStages; /**< number of stages in the filter. */
<> 132:9baf128c2fab 4101 float32_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
<> 132:9baf128c2fab 4102 float32_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
<> 132:9baf128c2fab 4103 float32_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
<> 132:9baf128c2fab 4104 } arm_iir_lattice_instance_f32;
<> 132:9baf128c2fab 4105
<> 132:9baf128c2fab 4106 /**
<> 132:9baf128c2fab 4107 * @brief Processing function for the floating-point IIR lattice filter.
<> 132:9baf128c2fab 4108 * @param[in] *S points to an instance of the floating-point IIR lattice structure.
<> 132:9baf128c2fab 4109 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 4110 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 4111 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4112 * @return none.
<> 132:9baf128c2fab 4113 */
<> 132:9baf128c2fab 4114
<> 132:9baf128c2fab 4115 void arm_iir_lattice_f32(
<> 132:9baf128c2fab 4116 const arm_iir_lattice_instance_f32 * S,
<> 132:9baf128c2fab 4117 float32_t * pSrc,
<> 132:9baf128c2fab 4118 float32_t * pDst,
<> 132:9baf128c2fab 4119 uint32_t blockSize);
<> 132:9baf128c2fab 4120
<> 132:9baf128c2fab 4121 /**
<> 132:9baf128c2fab 4122 * @brief Initialization function for the floating-point IIR lattice filter.
<> 132:9baf128c2fab 4123 * @param[in] *S points to an instance of the floating-point IIR lattice structure.
<> 132:9baf128c2fab 4124 * @param[in] numStages number of stages in the filter.
<> 132:9baf128c2fab 4125 * @param[in] *pkCoeffs points to the reflection coefficient buffer. The array is of length numStages.
<> 132:9baf128c2fab 4126 * @param[in] *pvCoeffs points to the ladder coefficient buffer. The array is of length numStages+1.
<> 132:9baf128c2fab 4127 * @param[in] *pState points to the state buffer. The array is of length numStages+blockSize-1.
<> 132:9baf128c2fab 4128 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4129 * @return none.
<> 132:9baf128c2fab 4130 */
<> 132:9baf128c2fab 4131
<> 132:9baf128c2fab 4132 void arm_iir_lattice_init_f32(
<> 132:9baf128c2fab 4133 arm_iir_lattice_instance_f32 * S,
<> 132:9baf128c2fab 4134 uint16_t numStages,
<> 132:9baf128c2fab 4135 float32_t * pkCoeffs,
<> 132:9baf128c2fab 4136 float32_t * pvCoeffs,
<> 132:9baf128c2fab 4137 float32_t * pState,
<> 132:9baf128c2fab 4138 uint32_t blockSize);
<> 132:9baf128c2fab 4139
<> 132:9baf128c2fab 4140
<> 132:9baf128c2fab 4141 /**
<> 132:9baf128c2fab 4142 * @brief Processing function for the Q31 IIR lattice filter.
<> 132:9baf128c2fab 4143 * @param[in] *S points to an instance of the Q31 IIR lattice structure.
<> 132:9baf128c2fab 4144 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 4145 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 4146 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4147 * @return none.
<> 132:9baf128c2fab 4148 */
<> 132:9baf128c2fab 4149
<> 132:9baf128c2fab 4150 void arm_iir_lattice_q31(
<> 132:9baf128c2fab 4151 const arm_iir_lattice_instance_q31 * S,
<> 132:9baf128c2fab 4152 q31_t * pSrc,
<> 132:9baf128c2fab 4153 q31_t * pDst,
<> 132:9baf128c2fab 4154 uint32_t blockSize);
<> 132:9baf128c2fab 4155
<> 132:9baf128c2fab 4156
<> 132:9baf128c2fab 4157 /**
<> 132:9baf128c2fab 4158 * @brief Initialization function for the Q31 IIR lattice filter.
<> 132:9baf128c2fab 4159 * @param[in] *S points to an instance of the Q31 IIR lattice structure.
<> 132:9baf128c2fab 4160 * @param[in] numStages number of stages in the filter.
<> 132:9baf128c2fab 4161 * @param[in] *pkCoeffs points to the reflection coefficient buffer. The array is of length numStages.
<> 132:9baf128c2fab 4162 * @param[in] *pvCoeffs points to the ladder coefficient buffer. The array is of length numStages+1.
<> 132:9baf128c2fab 4163 * @param[in] *pState points to the state buffer. The array is of length numStages+blockSize.
<> 132:9baf128c2fab 4164 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4165 * @return none.
<> 132:9baf128c2fab 4166 */
<> 132:9baf128c2fab 4167
<> 132:9baf128c2fab 4168 void arm_iir_lattice_init_q31(
<> 132:9baf128c2fab 4169 arm_iir_lattice_instance_q31 * S,
<> 132:9baf128c2fab 4170 uint16_t numStages,
<> 132:9baf128c2fab 4171 q31_t * pkCoeffs,
<> 132:9baf128c2fab 4172 q31_t * pvCoeffs,
<> 132:9baf128c2fab 4173 q31_t * pState,
<> 132:9baf128c2fab 4174 uint32_t blockSize);
<> 132:9baf128c2fab 4175
<> 132:9baf128c2fab 4176
<> 132:9baf128c2fab 4177 /**
<> 132:9baf128c2fab 4178 * @brief Processing function for the Q15 IIR lattice filter.
<> 132:9baf128c2fab 4179 * @param[in] *S points to an instance of the Q15 IIR lattice structure.
<> 132:9baf128c2fab 4180 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 4181 * @param[out] *pDst points to the block of output data.
<> 132:9baf128c2fab 4182 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4183 * @return none.
<> 132:9baf128c2fab 4184 */
<> 132:9baf128c2fab 4185
<> 132:9baf128c2fab 4186 void arm_iir_lattice_q15(
<> 132:9baf128c2fab 4187 const arm_iir_lattice_instance_q15 * S,
<> 132:9baf128c2fab 4188 q15_t * pSrc,
<> 132:9baf128c2fab 4189 q15_t * pDst,
<> 132:9baf128c2fab 4190 uint32_t blockSize);
<> 132:9baf128c2fab 4191
<> 132:9baf128c2fab 4192
<> 132:9baf128c2fab 4193 /**
<> 132:9baf128c2fab 4194 * @brief Initialization function for the Q15 IIR lattice filter.
<> 132:9baf128c2fab 4195 * @param[in] *S points to an instance of the fixed-point Q15 IIR lattice structure.
<> 132:9baf128c2fab 4196 * @param[in] numStages number of stages in the filter.
<> 132:9baf128c2fab 4197 * @param[in] *pkCoeffs points to reflection coefficient buffer. The array is of length numStages.
<> 132:9baf128c2fab 4198 * @param[in] *pvCoeffs points to ladder coefficient buffer. The array is of length numStages+1.
<> 132:9baf128c2fab 4199 * @param[in] *pState points to state buffer. The array is of length numStages+blockSize.
<> 132:9baf128c2fab 4200 * @param[in] blockSize number of samples to process per call.
<> 132:9baf128c2fab 4201 * @return none.
<> 132:9baf128c2fab 4202 */
<> 132:9baf128c2fab 4203
<> 132:9baf128c2fab 4204 void arm_iir_lattice_init_q15(
<> 132:9baf128c2fab 4205 arm_iir_lattice_instance_q15 * S,
<> 132:9baf128c2fab 4206 uint16_t numStages,
<> 132:9baf128c2fab 4207 q15_t * pkCoeffs,
<> 132:9baf128c2fab 4208 q15_t * pvCoeffs,
<> 132:9baf128c2fab 4209 q15_t * pState,
<> 132:9baf128c2fab 4210 uint32_t blockSize);
<> 132:9baf128c2fab 4211
<> 132:9baf128c2fab 4212 /**
<> 132:9baf128c2fab 4213 * @brief Instance structure for the floating-point LMS filter.
<> 132:9baf128c2fab 4214 */
<> 132:9baf128c2fab 4215
<> 132:9baf128c2fab 4216 typedef struct
<> 132:9baf128c2fab 4217 {
<> 132:9baf128c2fab 4218 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 132:9baf128c2fab 4219 float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 132:9baf128c2fab 4220 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 132:9baf128c2fab 4221 float32_t mu; /**< step size that controls filter coefficient updates. */
<> 132:9baf128c2fab 4222 } arm_lms_instance_f32;
<> 132:9baf128c2fab 4223
<> 132:9baf128c2fab 4224 /**
<> 132:9baf128c2fab 4225 * @brief Processing function for floating-point LMS filter.
<> 132:9baf128c2fab 4226 * @param[in] *S points to an instance of the floating-point LMS filter structure.
<> 132:9baf128c2fab 4227 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 4228 * @param[in] *pRef points to the block of reference data.
<> 132:9baf128c2fab 4229 * @param[out] *pOut points to the block of output data.
<> 132:9baf128c2fab 4230 * @param[out] *pErr points to the block of error data.
<> 132:9baf128c2fab 4231 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4232 * @return none.
<> 132:9baf128c2fab 4233 */
<> 132:9baf128c2fab 4234
<> 132:9baf128c2fab 4235 void arm_lms_f32(
<> 132:9baf128c2fab 4236 const arm_lms_instance_f32 * S,
<> 132:9baf128c2fab 4237 float32_t * pSrc,
<> 132:9baf128c2fab 4238 float32_t * pRef,
<> 132:9baf128c2fab 4239 float32_t * pOut,
<> 132:9baf128c2fab 4240 float32_t * pErr,
<> 132:9baf128c2fab 4241 uint32_t blockSize);
<> 132:9baf128c2fab 4242
<> 132:9baf128c2fab 4243 /**
<> 132:9baf128c2fab 4244 * @brief Initialization function for floating-point LMS filter.
<> 132:9baf128c2fab 4245 * @param[in] *S points to an instance of the floating-point LMS filter structure.
<> 132:9baf128c2fab 4246 * @param[in] numTaps number of filter coefficients.
<> 132:9baf128c2fab 4247 * @param[in] *pCoeffs points to the coefficient buffer.
<> 132:9baf128c2fab 4248 * @param[in] *pState points to state buffer.
<> 132:9baf128c2fab 4249 * @param[in] mu step size that controls filter coefficient updates.
<> 132:9baf128c2fab 4250 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4251 * @return none.
<> 132:9baf128c2fab 4252 */
<> 132:9baf128c2fab 4253
<> 132:9baf128c2fab 4254 void arm_lms_init_f32(
<> 132:9baf128c2fab 4255 arm_lms_instance_f32 * S,
<> 132:9baf128c2fab 4256 uint16_t numTaps,
<> 132:9baf128c2fab 4257 float32_t * pCoeffs,
<> 132:9baf128c2fab 4258 float32_t * pState,
<> 132:9baf128c2fab 4259 float32_t mu,
<> 132:9baf128c2fab 4260 uint32_t blockSize);
<> 132:9baf128c2fab 4261
<> 132:9baf128c2fab 4262 /**
<> 132:9baf128c2fab 4263 * @brief Instance structure for the Q15 LMS filter.
<> 132:9baf128c2fab 4264 */
<> 132:9baf128c2fab 4265
<> 132:9baf128c2fab 4266 typedef struct
<> 132:9baf128c2fab 4267 {
<> 132:9baf128c2fab 4268 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 132:9baf128c2fab 4269 q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 132:9baf128c2fab 4270 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 132:9baf128c2fab 4271 q15_t mu; /**< step size that controls filter coefficient updates. */
<> 132:9baf128c2fab 4272 uint32_t postShift; /**< bit shift applied to coefficients. */
<> 132:9baf128c2fab 4273 } arm_lms_instance_q15;
<> 132:9baf128c2fab 4274
<> 132:9baf128c2fab 4275
<> 132:9baf128c2fab 4276 /**
<> 132:9baf128c2fab 4277 * @brief Initialization function for the Q15 LMS filter.
<> 132:9baf128c2fab 4278 * @param[in] *S points to an instance of the Q15 LMS filter structure.
<> 132:9baf128c2fab 4279 * @param[in] numTaps number of filter coefficients.
<> 132:9baf128c2fab 4280 * @param[in] *pCoeffs points to the coefficient buffer.
<> 132:9baf128c2fab 4281 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 4282 * @param[in] mu step size that controls filter coefficient updates.
<> 132:9baf128c2fab 4283 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4284 * @param[in] postShift bit shift applied to coefficients.
<> 132:9baf128c2fab 4285 * @return none.
<> 132:9baf128c2fab 4286 */
<> 132:9baf128c2fab 4287
<> 132:9baf128c2fab 4288 void arm_lms_init_q15(
<> 132:9baf128c2fab 4289 arm_lms_instance_q15 * S,
<> 132:9baf128c2fab 4290 uint16_t numTaps,
<> 132:9baf128c2fab 4291 q15_t * pCoeffs,
<> 132:9baf128c2fab 4292 q15_t * pState,
<> 132:9baf128c2fab 4293 q15_t mu,
<> 132:9baf128c2fab 4294 uint32_t blockSize,
<> 132:9baf128c2fab 4295 uint32_t postShift);
<> 132:9baf128c2fab 4296
<> 132:9baf128c2fab 4297 /**
<> 132:9baf128c2fab 4298 * @brief Processing function for Q15 LMS filter.
<> 132:9baf128c2fab 4299 * @param[in] *S points to an instance of the Q15 LMS filter structure.
<> 132:9baf128c2fab 4300 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 4301 * @param[in] *pRef points to the block of reference data.
<> 132:9baf128c2fab 4302 * @param[out] *pOut points to the block of output data.
<> 132:9baf128c2fab 4303 * @param[out] *pErr points to the block of error data.
<> 132:9baf128c2fab 4304 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4305 * @return none.
<> 132:9baf128c2fab 4306 */
<> 132:9baf128c2fab 4307
<> 132:9baf128c2fab 4308 void arm_lms_q15(
<> 132:9baf128c2fab 4309 const arm_lms_instance_q15 * S,
<> 132:9baf128c2fab 4310 q15_t * pSrc,
<> 132:9baf128c2fab 4311 q15_t * pRef,
<> 132:9baf128c2fab 4312 q15_t * pOut,
<> 132:9baf128c2fab 4313 q15_t * pErr,
<> 132:9baf128c2fab 4314 uint32_t blockSize);
<> 132:9baf128c2fab 4315
<> 132:9baf128c2fab 4316
<> 132:9baf128c2fab 4317 /**
<> 132:9baf128c2fab 4318 * @brief Instance structure for the Q31 LMS filter.
<> 132:9baf128c2fab 4319 */
<> 132:9baf128c2fab 4320
<> 132:9baf128c2fab 4321 typedef struct
<> 132:9baf128c2fab 4322 {
<> 132:9baf128c2fab 4323 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 132:9baf128c2fab 4324 q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 132:9baf128c2fab 4325 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 132:9baf128c2fab 4326 q31_t mu; /**< step size that controls filter coefficient updates. */
<> 132:9baf128c2fab 4327 uint32_t postShift; /**< bit shift applied to coefficients. */
<> 132:9baf128c2fab 4328
<> 132:9baf128c2fab 4329 } arm_lms_instance_q31;
<> 132:9baf128c2fab 4330
<> 132:9baf128c2fab 4331 /**
<> 132:9baf128c2fab 4332 * @brief Processing function for Q31 LMS filter.
<> 132:9baf128c2fab 4333 * @param[in] *S points to an instance of the Q15 LMS filter structure.
<> 132:9baf128c2fab 4334 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 4335 * @param[in] *pRef points to the block of reference data.
<> 132:9baf128c2fab 4336 * @param[out] *pOut points to the block of output data.
<> 132:9baf128c2fab 4337 * @param[out] *pErr points to the block of error data.
<> 132:9baf128c2fab 4338 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4339 * @return none.
<> 132:9baf128c2fab 4340 */
<> 132:9baf128c2fab 4341
<> 132:9baf128c2fab 4342 void arm_lms_q31(
<> 132:9baf128c2fab 4343 const arm_lms_instance_q31 * S,
<> 132:9baf128c2fab 4344 q31_t * pSrc,
<> 132:9baf128c2fab 4345 q31_t * pRef,
<> 132:9baf128c2fab 4346 q31_t * pOut,
<> 132:9baf128c2fab 4347 q31_t * pErr,
<> 132:9baf128c2fab 4348 uint32_t blockSize);
<> 132:9baf128c2fab 4349
<> 132:9baf128c2fab 4350 /**
<> 132:9baf128c2fab 4351 * @brief Initialization function for Q31 LMS filter.
<> 132:9baf128c2fab 4352 * @param[in] *S points to an instance of the Q31 LMS filter structure.
<> 132:9baf128c2fab 4353 * @param[in] numTaps number of filter coefficients.
<> 132:9baf128c2fab 4354 * @param[in] *pCoeffs points to coefficient buffer.
<> 132:9baf128c2fab 4355 * @param[in] *pState points to state buffer.
<> 132:9baf128c2fab 4356 * @param[in] mu step size that controls filter coefficient updates.
<> 132:9baf128c2fab 4357 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4358 * @param[in] postShift bit shift applied to coefficients.
<> 132:9baf128c2fab 4359 * @return none.
<> 132:9baf128c2fab 4360 */
<> 132:9baf128c2fab 4361
<> 132:9baf128c2fab 4362 void arm_lms_init_q31(
<> 132:9baf128c2fab 4363 arm_lms_instance_q31 * S,
<> 132:9baf128c2fab 4364 uint16_t numTaps,
<> 132:9baf128c2fab 4365 q31_t * pCoeffs,
<> 132:9baf128c2fab 4366 q31_t * pState,
<> 132:9baf128c2fab 4367 q31_t mu,
<> 132:9baf128c2fab 4368 uint32_t blockSize,
<> 132:9baf128c2fab 4369 uint32_t postShift);
<> 132:9baf128c2fab 4370
<> 132:9baf128c2fab 4371 /**
<> 132:9baf128c2fab 4372 * @brief Instance structure for the floating-point normalized LMS filter.
<> 132:9baf128c2fab 4373 */
<> 132:9baf128c2fab 4374
<> 132:9baf128c2fab 4375 typedef struct
<> 132:9baf128c2fab 4376 {
<> 132:9baf128c2fab 4377 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 132:9baf128c2fab 4378 float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 132:9baf128c2fab 4379 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 132:9baf128c2fab 4380 float32_t mu; /**< step size that control filter coefficient updates. */
<> 132:9baf128c2fab 4381 float32_t energy; /**< saves previous frame energy. */
<> 132:9baf128c2fab 4382 float32_t x0; /**< saves previous input sample. */
<> 132:9baf128c2fab 4383 } arm_lms_norm_instance_f32;
<> 132:9baf128c2fab 4384
<> 132:9baf128c2fab 4385 /**
<> 132:9baf128c2fab 4386 * @brief Processing function for floating-point normalized LMS filter.
<> 132:9baf128c2fab 4387 * @param[in] *S points to an instance of the floating-point normalized LMS filter structure.
<> 132:9baf128c2fab 4388 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 4389 * @param[in] *pRef points to the block of reference data.
<> 132:9baf128c2fab 4390 * @param[out] *pOut points to the block of output data.
<> 132:9baf128c2fab 4391 * @param[out] *pErr points to the block of error data.
<> 132:9baf128c2fab 4392 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4393 * @return none.
<> 132:9baf128c2fab 4394 */
<> 132:9baf128c2fab 4395
<> 132:9baf128c2fab 4396 void arm_lms_norm_f32(
<> 132:9baf128c2fab 4397 arm_lms_norm_instance_f32 * S,
<> 132:9baf128c2fab 4398 float32_t * pSrc,
<> 132:9baf128c2fab 4399 float32_t * pRef,
<> 132:9baf128c2fab 4400 float32_t * pOut,
<> 132:9baf128c2fab 4401 float32_t * pErr,
<> 132:9baf128c2fab 4402 uint32_t blockSize);
<> 132:9baf128c2fab 4403
<> 132:9baf128c2fab 4404 /**
<> 132:9baf128c2fab 4405 * @brief Initialization function for floating-point normalized LMS filter.
<> 132:9baf128c2fab 4406 * @param[in] *S points to an instance of the floating-point LMS filter structure.
<> 132:9baf128c2fab 4407 * @param[in] numTaps number of filter coefficients.
<> 132:9baf128c2fab 4408 * @param[in] *pCoeffs points to coefficient buffer.
<> 132:9baf128c2fab 4409 * @param[in] *pState points to state buffer.
<> 132:9baf128c2fab 4410 * @param[in] mu step size that controls filter coefficient updates.
<> 132:9baf128c2fab 4411 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4412 * @return none.
<> 132:9baf128c2fab 4413 */
<> 132:9baf128c2fab 4414
<> 132:9baf128c2fab 4415 void arm_lms_norm_init_f32(
<> 132:9baf128c2fab 4416 arm_lms_norm_instance_f32 * S,
<> 132:9baf128c2fab 4417 uint16_t numTaps,
<> 132:9baf128c2fab 4418 float32_t * pCoeffs,
<> 132:9baf128c2fab 4419 float32_t * pState,
<> 132:9baf128c2fab 4420 float32_t mu,
<> 132:9baf128c2fab 4421 uint32_t blockSize);
<> 132:9baf128c2fab 4422
<> 132:9baf128c2fab 4423
<> 132:9baf128c2fab 4424 /**
<> 132:9baf128c2fab 4425 * @brief Instance structure for the Q31 normalized LMS filter.
<> 132:9baf128c2fab 4426 */
<> 132:9baf128c2fab 4427 typedef struct
<> 132:9baf128c2fab 4428 {
<> 132:9baf128c2fab 4429 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 132:9baf128c2fab 4430 q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 132:9baf128c2fab 4431 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 132:9baf128c2fab 4432 q31_t mu; /**< step size that controls filter coefficient updates. */
<> 132:9baf128c2fab 4433 uint8_t postShift; /**< bit shift applied to coefficients. */
<> 132:9baf128c2fab 4434 q31_t *recipTable; /**< points to the reciprocal initial value table. */
<> 132:9baf128c2fab 4435 q31_t energy; /**< saves previous frame energy. */
<> 132:9baf128c2fab 4436 q31_t x0; /**< saves previous input sample. */
<> 132:9baf128c2fab 4437 } arm_lms_norm_instance_q31;
<> 132:9baf128c2fab 4438
<> 132:9baf128c2fab 4439 /**
<> 132:9baf128c2fab 4440 * @brief Processing function for Q31 normalized LMS filter.
<> 132:9baf128c2fab 4441 * @param[in] *S points to an instance of the Q31 normalized LMS filter structure.
<> 132:9baf128c2fab 4442 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 4443 * @param[in] *pRef points to the block of reference data.
<> 132:9baf128c2fab 4444 * @param[out] *pOut points to the block of output data.
<> 132:9baf128c2fab 4445 * @param[out] *pErr points to the block of error data.
<> 132:9baf128c2fab 4446 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4447 * @return none.
<> 132:9baf128c2fab 4448 */
<> 132:9baf128c2fab 4449
<> 132:9baf128c2fab 4450 void arm_lms_norm_q31(
<> 132:9baf128c2fab 4451 arm_lms_norm_instance_q31 * S,
<> 132:9baf128c2fab 4452 q31_t * pSrc,
<> 132:9baf128c2fab 4453 q31_t * pRef,
<> 132:9baf128c2fab 4454 q31_t * pOut,
<> 132:9baf128c2fab 4455 q31_t * pErr,
<> 132:9baf128c2fab 4456 uint32_t blockSize);
<> 132:9baf128c2fab 4457
<> 132:9baf128c2fab 4458 /**
<> 132:9baf128c2fab 4459 * @brief Initialization function for Q31 normalized LMS filter.
<> 132:9baf128c2fab 4460 * @param[in] *S points to an instance of the Q31 normalized LMS filter structure.
<> 132:9baf128c2fab 4461 * @param[in] numTaps number of filter coefficients.
<> 132:9baf128c2fab 4462 * @param[in] *pCoeffs points to coefficient buffer.
<> 132:9baf128c2fab 4463 * @param[in] *pState points to state buffer.
<> 132:9baf128c2fab 4464 * @param[in] mu step size that controls filter coefficient updates.
<> 132:9baf128c2fab 4465 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4466 * @param[in] postShift bit shift applied to coefficients.
<> 132:9baf128c2fab 4467 * @return none.
<> 132:9baf128c2fab 4468 */
<> 132:9baf128c2fab 4469
<> 132:9baf128c2fab 4470 void arm_lms_norm_init_q31(
<> 132:9baf128c2fab 4471 arm_lms_norm_instance_q31 * S,
<> 132:9baf128c2fab 4472 uint16_t numTaps,
<> 132:9baf128c2fab 4473 q31_t * pCoeffs,
<> 132:9baf128c2fab 4474 q31_t * pState,
<> 132:9baf128c2fab 4475 q31_t mu,
<> 132:9baf128c2fab 4476 uint32_t blockSize,
<> 132:9baf128c2fab 4477 uint8_t postShift);
<> 132:9baf128c2fab 4478
<> 132:9baf128c2fab 4479 /**
<> 132:9baf128c2fab 4480 * @brief Instance structure for the Q15 normalized LMS filter.
<> 132:9baf128c2fab 4481 */
<> 132:9baf128c2fab 4482
<> 132:9baf128c2fab 4483 typedef struct
<> 132:9baf128c2fab 4484 {
<> 132:9baf128c2fab 4485 uint16_t numTaps; /**< Number of coefficients in the filter. */
<> 132:9baf128c2fab 4486 q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 132:9baf128c2fab 4487 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 132:9baf128c2fab 4488 q15_t mu; /**< step size that controls filter coefficient updates. */
<> 132:9baf128c2fab 4489 uint8_t postShift; /**< bit shift applied to coefficients. */
<> 132:9baf128c2fab 4490 q15_t *recipTable; /**< Points to the reciprocal initial value table. */
<> 132:9baf128c2fab 4491 q15_t energy; /**< saves previous frame energy. */
<> 132:9baf128c2fab 4492 q15_t x0; /**< saves previous input sample. */
<> 132:9baf128c2fab 4493 } arm_lms_norm_instance_q15;
<> 132:9baf128c2fab 4494
<> 132:9baf128c2fab 4495 /**
<> 132:9baf128c2fab 4496 * @brief Processing function for Q15 normalized LMS filter.
<> 132:9baf128c2fab 4497 * @param[in] *S points to an instance of the Q15 normalized LMS filter structure.
<> 132:9baf128c2fab 4498 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 4499 * @param[in] *pRef points to the block of reference data.
<> 132:9baf128c2fab 4500 * @param[out] *pOut points to the block of output data.
<> 132:9baf128c2fab 4501 * @param[out] *pErr points to the block of error data.
<> 132:9baf128c2fab 4502 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4503 * @return none.
<> 132:9baf128c2fab 4504 */
<> 132:9baf128c2fab 4505
<> 132:9baf128c2fab 4506 void arm_lms_norm_q15(
<> 132:9baf128c2fab 4507 arm_lms_norm_instance_q15 * S,
<> 132:9baf128c2fab 4508 q15_t * pSrc,
<> 132:9baf128c2fab 4509 q15_t * pRef,
<> 132:9baf128c2fab 4510 q15_t * pOut,
<> 132:9baf128c2fab 4511 q15_t * pErr,
<> 132:9baf128c2fab 4512 uint32_t blockSize);
<> 132:9baf128c2fab 4513
<> 132:9baf128c2fab 4514
<> 132:9baf128c2fab 4515 /**
<> 132:9baf128c2fab 4516 * @brief Initialization function for Q15 normalized LMS filter.
<> 132:9baf128c2fab 4517 * @param[in] *S points to an instance of the Q15 normalized LMS filter structure.
<> 132:9baf128c2fab 4518 * @param[in] numTaps number of filter coefficients.
<> 132:9baf128c2fab 4519 * @param[in] *pCoeffs points to coefficient buffer.
<> 132:9baf128c2fab 4520 * @param[in] *pState points to state buffer.
<> 132:9baf128c2fab 4521 * @param[in] mu step size that controls filter coefficient updates.
<> 132:9baf128c2fab 4522 * @param[in] blockSize number of samples to process.
<> 132:9baf128c2fab 4523 * @param[in] postShift bit shift applied to coefficients.
<> 132:9baf128c2fab 4524 * @return none.
<> 132:9baf128c2fab 4525 */
<> 132:9baf128c2fab 4526
<> 132:9baf128c2fab 4527 void arm_lms_norm_init_q15(
<> 132:9baf128c2fab 4528 arm_lms_norm_instance_q15 * S,
<> 132:9baf128c2fab 4529 uint16_t numTaps,
<> 132:9baf128c2fab 4530 q15_t * pCoeffs,
<> 132:9baf128c2fab 4531 q15_t * pState,
<> 132:9baf128c2fab 4532 q15_t mu,
<> 132:9baf128c2fab 4533 uint32_t blockSize,
<> 132:9baf128c2fab 4534 uint8_t postShift);
<> 132:9baf128c2fab 4535
<> 132:9baf128c2fab 4536 /**
<> 132:9baf128c2fab 4537 * @brief Correlation of floating-point sequences.
<> 132:9baf128c2fab 4538 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 4539 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 4540 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 4541 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 4542 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 132:9baf128c2fab 4543 * @return none.
<> 132:9baf128c2fab 4544 */
<> 132:9baf128c2fab 4545
<> 132:9baf128c2fab 4546 void arm_correlate_f32(
<> 132:9baf128c2fab 4547 float32_t * pSrcA,
<> 132:9baf128c2fab 4548 uint32_t srcALen,
<> 132:9baf128c2fab 4549 float32_t * pSrcB,
<> 132:9baf128c2fab 4550 uint32_t srcBLen,
<> 132:9baf128c2fab 4551 float32_t * pDst);
<> 132:9baf128c2fab 4552
<> 132:9baf128c2fab 4553
<> 132:9baf128c2fab 4554 /**
<> 132:9baf128c2fab 4555 * @brief Correlation of Q15 sequences
<> 132:9baf128c2fab 4556 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 4557 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 4558 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 4559 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 4560 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 132:9baf128c2fab 4561 * @param[in] *pScratch points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 132:9baf128c2fab 4562 * @return none.
<> 132:9baf128c2fab 4563 */
<> 132:9baf128c2fab 4564 void arm_correlate_opt_q15(
<> 132:9baf128c2fab 4565 q15_t * pSrcA,
<> 132:9baf128c2fab 4566 uint32_t srcALen,
<> 132:9baf128c2fab 4567 q15_t * pSrcB,
<> 132:9baf128c2fab 4568 uint32_t srcBLen,
<> 132:9baf128c2fab 4569 q15_t * pDst,
<> 132:9baf128c2fab 4570 q15_t * pScratch);
<> 132:9baf128c2fab 4571
<> 132:9baf128c2fab 4572
<> 132:9baf128c2fab 4573 /**
<> 132:9baf128c2fab 4574 * @brief Correlation of Q15 sequences.
<> 132:9baf128c2fab 4575 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 4576 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 4577 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 4578 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 4579 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 132:9baf128c2fab 4580 * @return none.
<> 132:9baf128c2fab 4581 */
<> 132:9baf128c2fab 4582
<> 132:9baf128c2fab 4583 void arm_correlate_q15(
<> 132:9baf128c2fab 4584 q15_t * pSrcA,
<> 132:9baf128c2fab 4585 uint32_t srcALen,
<> 132:9baf128c2fab 4586 q15_t * pSrcB,
<> 132:9baf128c2fab 4587 uint32_t srcBLen,
<> 132:9baf128c2fab 4588 q15_t * pDst);
<> 132:9baf128c2fab 4589
<> 132:9baf128c2fab 4590 /**
<> 132:9baf128c2fab 4591 * @brief Correlation of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
<> 132:9baf128c2fab 4592 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 4593 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 4594 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 4595 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 4596 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 132:9baf128c2fab 4597 * @return none.
<> 132:9baf128c2fab 4598 */
<> 132:9baf128c2fab 4599
<> 132:9baf128c2fab 4600 void arm_correlate_fast_q15(
<> 132:9baf128c2fab 4601 q15_t * pSrcA,
<> 132:9baf128c2fab 4602 uint32_t srcALen,
<> 132:9baf128c2fab 4603 q15_t * pSrcB,
<> 132:9baf128c2fab 4604 uint32_t srcBLen,
<> 132:9baf128c2fab 4605 q15_t * pDst);
<> 132:9baf128c2fab 4606
<> 132:9baf128c2fab 4607
<> 132:9baf128c2fab 4608
<> 132:9baf128c2fab 4609 /**
<> 132:9baf128c2fab 4610 * @brief Correlation of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
<> 132:9baf128c2fab 4611 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 4612 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 4613 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 4614 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 4615 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 132:9baf128c2fab 4616 * @param[in] *pScratch points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 132:9baf128c2fab 4617 * @return none.
<> 132:9baf128c2fab 4618 */
<> 132:9baf128c2fab 4619
<> 132:9baf128c2fab 4620 void arm_correlate_fast_opt_q15(
<> 132:9baf128c2fab 4621 q15_t * pSrcA,
<> 132:9baf128c2fab 4622 uint32_t srcALen,
<> 132:9baf128c2fab 4623 q15_t * pSrcB,
<> 132:9baf128c2fab 4624 uint32_t srcBLen,
<> 132:9baf128c2fab 4625 q15_t * pDst,
<> 132:9baf128c2fab 4626 q15_t * pScratch);
<> 132:9baf128c2fab 4627
<> 132:9baf128c2fab 4628 /**
<> 132:9baf128c2fab 4629 * @brief Correlation of Q31 sequences.
<> 132:9baf128c2fab 4630 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 4631 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 4632 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 4633 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 4634 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 132:9baf128c2fab 4635 * @return none.
<> 132:9baf128c2fab 4636 */
<> 132:9baf128c2fab 4637
<> 132:9baf128c2fab 4638 void arm_correlate_q31(
<> 132:9baf128c2fab 4639 q31_t * pSrcA,
<> 132:9baf128c2fab 4640 uint32_t srcALen,
<> 132:9baf128c2fab 4641 q31_t * pSrcB,
<> 132:9baf128c2fab 4642 uint32_t srcBLen,
<> 132:9baf128c2fab 4643 q31_t * pDst);
<> 132:9baf128c2fab 4644
<> 132:9baf128c2fab 4645 /**
<> 132:9baf128c2fab 4646 * @brief Correlation of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 132:9baf128c2fab 4647 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 4648 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 4649 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 4650 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 4651 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 132:9baf128c2fab 4652 * @return none.
<> 132:9baf128c2fab 4653 */
<> 132:9baf128c2fab 4654
<> 132:9baf128c2fab 4655 void arm_correlate_fast_q31(
<> 132:9baf128c2fab 4656 q31_t * pSrcA,
<> 132:9baf128c2fab 4657 uint32_t srcALen,
<> 132:9baf128c2fab 4658 q31_t * pSrcB,
<> 132:9baf128c2fab 4659 uint32_t srcBLen,
<> 132:9baf128c2fab 4660 q31_t * pDst);
<> 132:9baf128c2fab 4661
<> 132:9baf128c2fab 4662
<> 132:9baf128c2fab 4663
<> 132:9baf128c2fab 4664 /**
<> 132:9baf128c2fab 4665 * @brief Correlation of Q7 sequences.
<> 132:9baf128c2fab 4666 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 4667 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 4668 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 4669 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 4670 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 132:9baf128c2fab 4671 * @param[in] *pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 132:9baf128c2fab 4672 * @param[in] *pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen).
<> 132:9baf128c2fab 4673 * @return none.
<> 132:9baf128c2fab 4674 */
<> 132:9baf128c2fab 4675
<> 132:9baf128c2fab 4676 void arm_correlate_opt_q7(
<> 132:9baf128c2fab 4677 q7_t * pSrcA,
<> 132:9baf128c2fab 4678 uint32_t srcALen,
<> 132:9baf128c2fab 4679 q7_t * pSrcB,
<> 132:9baf128c2fab 4680 uint32_t srcBLen,
<> 132:9baf128c2fab 4681 q7_t * pDst,
<> 132:9baf128c2fab 4682 q15_t * pScratch1,
<> 132:9baf128c2fab 4683 q15_t * pScratch2);
<> 132:9baf128c2fab 4684
<> 132:9baf128c2fab 4685
<> 132:9baf128c2fab 4686 /**
<> 132:9baf128c2fab 4687 * @brief Correlation of Q7 sequences.
<> 132:9baf128c2fab 4688 * @param[in] *pSrcA points to the first input sequence.
<> 132:9baf128c2fab 4689 * @param[in] srcALen length of the first input sequence.
<> 132:9baf128c2fab 4690 * @param[in] *pSrcB points to the second input sequence.
<> 132:9baf128c2fab 4691 * @param[in] srcBLen length of the second input sequence.
<> 132:9baf128c2fab 4692 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 132:9baf128c2fab 4693 * @return none.
<> 132:9baf128c2fab 4694 */
<> 132:9baf128c2fab 4695
<> 132:9baf128c2fab 4696 void arm_correlate_q7(
<> 132:9baf128c2fab 4697 q7_t * pSrcA,
<> 132:9baf128c2fab 4698 uint32_t srcALen,
<> 132:9baf128c2fab 4699 q7_t * pSrcB,
<> 132:9baf128c2fab 4700 uint32_t srcBLen,
<> 132:9baf128c2fab 4701 q7_t * pDst);
<> 132:9baf128c2fab 4702
<> 132:9baf128c2fab 4703
<> 132:9baf128c2fab 4704 /**
<> 132:9baf128c2fab 4705 * @brief Instance structure for the floating-point sparse FIR filter.
<> 132:9baf128c2fab 4706 */
<> 132:9baf128c2fab 4707 typedef struct
<> 132:9baf128c2fab 4708 {
<> 132:9baf128c2fab 4709 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 132:9baf128c2fab 4710 uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
<> 132:9baf128c2fab 4711 float32_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
<> 132:9baf128c2fab 4712 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 132:9baf128c2fab 4713 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
<> 132:9baf128c2fab 4714 int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
<> 132:9baf128c2fab 4715 } arm_fir_sparse_instance_f32;
<> 132:9baf128c2fab 4716
<> 132:9baf128c2fab 4717 /**
<> 132:9baf128c2fab 4718 * @brief Instance structure for the Q31 sparse FIR filter.
<> 132:9baf128c2fab 4719 */
<> 132:9baf128c2fab 4720
<> 132:9baf128c2fab 4721 typedef struct
<> 132:9baf128c2fab 4722 {
<> 132:9baf128c2fab 4723 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 132:9baf128c2fab 4724 uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
<> 132:9baf128c2fab 4725 q31_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
<> 132:9baf128c2fab 4726 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 132:9baf128c2fab 4727 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
<> 132:9baf128c2fab 4728 int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
<> 132:9baf128c2fab 4729 } arm_fir_sparse_instance_q31;
<> 132:9baf128c2fab 4730
<> 132:9baf128c2fab 4731 /**
<> 132:9baf128c2fab 4732 * @brief Instance structure for the Q15 sparse FIR filter.
<> 132:9baf128c2fab 4733 */
<> 132:9baf128c2fab 4734
<> 132:9baf128c2fab 4735 typedef struct
<> 132:9baf128c2fab 4736 {
<> 132:9baf128c2fab 4737 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 132:9baf128c2fab 4738 uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
<> 132:9baf128c2fab 4739 q15_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
<> 132:9baf128c2fab 4740 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 132:9baf128c2fab 4741 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
<> 132:9baf128c2fab 4742 int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
<> 132:9baf128c2fab 4743 } arm_fir_sparse_instance_q15;
<> 132:9baf128c2fab 4744
<> 132:9baf128c2fab 4745 /**
<> 132:9baf128c2fab 4746 * @brief Instance structure for the Q7 sparse FIR filter.
<> 132:9baf128c2fab 4747 */
<> 132:9baf128c2fab 4748
<> 132:9baf128c2fab 4749 typedef struct
<> 132:9baf128c2fab 4750 {
<> 132:9baf128c2fab 4751 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 132:9baf128c2fab 4752 uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
<> 132:9baf128c2fab 4753 q7_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
<> 132:9baf128c2fab 4754 q7_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 132:9baf128c2fab 4755 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
<> 132:9baf128c2fab 4756 int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
<> 132:9baf128c2fab 4757 } arm_fir_sparse_instance_q7;
<> 132:9baf128c2fab 4758
<> 132:9baf128c2fab 4759 /**
<> 132:9baf128c2fab 4760 * @brief Processing function for the floating-point sparse FIR filter.
<> 132:9baf128c2fab 4761 * @param[in] *S points to an instance of the floating-point sparse FIR structure.
<> 132:9baf128c2fab 4762 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 4763 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 4764 * @param[in] *pScratchIn points to a temporary buffer of size blockSize.
<> 132:9baf128c2fab 4765 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 4766 * @return none.
<> 132:9baf128c2fab 4767 */
<> 132:9baf128c2fab 4768
<> 132:9baf128c2fab 4769 void arm_fir_sparse_f32(
<> 132:9baf128c2fab 4770 arm_fir_sparse_instance_f32 * S,
<> 132:9baf128c2fab 4771 float32_t * pSrc,
<> 132:9baf128c2fab 4772 float32_t * pDst,
<> 132:9baf128c2fab 4773 float32_t * pScratchIn,
<> 132:9baf128c2fab 4774 uint32_t blockSize);
<> 132:9baf128c2fab 4775
<> 132:9baf128c2fab 4776 /**
<> 132:9baf128c2fab 4777 * @brief Initialization function for the floating-point sparse FIR filter.
<> 132:9baf128c2fab 4778 * @param[in,out] *S points to an instance of the floating-point sparse FIR structure.
<> 132:9baf128c2fab 4779 * @param[in] numTaps number of nonzero coefficients in the filter.
<> 132:9baf128c2fab 4780 * @param[in] *pCoeffs points to the array of filter coefficients.
<> 132:9baf128c2fab 4781 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 4782 * @param[in] *pTapDelay points to the array of offset times.
<> 132:9baf128c2fab 4783 * @param[in] maxDelay maximum offset time supported.
<> 132:9baf128c2fab 4784 * @param[in] blockSize number of samples that will be processed per block.
<> 132:9baf128c2fab 4785 * @return none
<> 132:9baf128c2fab 4786 */
<> 132:9baf128c2fab 4787
<> 132:9baf128c2fab 4788 void arm_fir_sparse_init_f32(
<> 132:9baf128c2fab 4789 arm_fir_sparse_instance_f32 * S,
<> 132:9baf128c2fab 4790 uint16_t numTaps,
<> 132:9baf128c2fab 4791 float32_t * pCoeffs,
<> 132:9baf128c2fab 4792 float32_t * pState,
<> 132:9baf128c2fab 4793 int32_t * pTapDelay,
<> 132:9baf128c2fab 4794 uint16_t maxDelay,
<> 132:9baf128c2fab 4795 uint32_t blockSize);
<> 132:9baf128c2fab 4796
<> 132:9baf128c2fab 4797 /**
<> 132:9baf128c2fab 4798 * @brief Processing function for the Q31 sparse FIR filter.
<> 132:9baf128c2fab 4799 * @param[in] *S points to an instance of the Q31 sparse FIR structure.
<> 132:9baf128c2fab 4800 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 4801 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 4802 * @param[in] *pScratchIn points to a temporary buffer of size blockSize.
<> 132:9baf128c2fab 4803 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 4804 * @return none.
<> 132:9baf128c2fab 4805 */
<> 132:9baf128c2fab 4806
<> 132:9baf128c2fab 4807 void arm_fir_sparse_q31(
<> 132:9baf128c2fab 4808 arm_fir_sparse_instance_q31 * S,
<> 132:9baf128c2fab 4809 q31_t * pSrc,
<> 132:9baf128c2fab 4810 q31_t * pDst,
<> 132:9baf128c2fab 4811 q31_t * pScratchIn,
<> 132:9baf128c2fab 4812 uint32_t blockSize);
<> 132:9baf128c2fab 4813
<> 132:9baf128c2fab 4814 /**
<> 132:9baf128c2fab 4815 * @brief Initialization function for the Q31 sparse FIR filter.
<> 132:9baf128c2fab 4816 * @param[in,out] *S points to an instance of the Q31 sparse FIR structure.
<> 132:9baf128c2fab 4817 * @param[in] numTaps number of nonzero coefficients in the filter.
<> 132:9baf128c2fab 4818 * @param[in] *pCoeffs points to the array of filter coefficients.
<> 132:9baf128c2fab 4819 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 4820 * @param[in] *pTapDelay points to the array of offset times.
<> 132:9baf128c2fab 4821 * @param[in] maxDelay maximum offset time supported.
<> 132:9baf128c2fab 4822 * @param[in] blockSize number of samples that will be processed per block.
<> 132:9baf128c2fab 4823 * @return none
<> 132:9baf128c2fab 4824 */
<> 132:9baf128c2fab 4825
<> 132:9baf128c2fab 4826 void arm_fir_sparse_init_q31(
<> 132:9baf128c2fab 4827 arm_fir_sparse_instance_q31 * S,
<> 132:9baf128c2fab 4828 uint16_t numTaps,
<> 132:9baf128c2fab 4829 q31_t * pCoeffs,
<> 132:9baf128c2fab 4830 q31_t * pState,
<> 132:9baf128c2fab 4831 int32_t * pTapDelay,
<> 132:9baf128c2fab 4832 uint16_t maxDelay,
<> 132:9baf128c2fab 4833 uint32_t blockSize);
<> 132:9baf128c2fab 4834
<> 132:9baf128c2fab 4835 /**
<> 132:9baf128c2fab 4836 * @brief Processing function for the Q15 sparse FIR filter.
<> 132:9baf128c2fab 4837 * @param[in] *S points to an instance of the Q15 sparse FIR structure.
<> 132:9baf128c2fab 4838 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 4839 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 4840 * @param[in] *pScratchIn points to a temporary buffer of size blockSize.
<> 132:9baf128c2fab 4841 * @param[in] *pScratchOut points to a temporary buffer of size blockSize.
<> 132:9baf128c2fab 4842 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 4843 * @return none.
<> 132:9baf128c2fab 4844 */
<> 132:9baf128c2fab 4845
<> 132:9baf128c2fab 4846 void arm_fir_sparse_q15(
<> 132:9baf128c2fab 4847 arm_fir_sparse_instance_q15 * S,
<> 132:9baf128c2fab 4848 q15_t * pSrc,
<> 132:9baf128c2fab 4849 q15_t * pDst,
<> 132:9baf128c2fab 4850 q15_t * pScratchIn,
<> 132:9baf128c2fab 4851 q31_t * pScratchOut,
<> 132:9baf128c2fab 4852 uint32_t blockSize);
<> 132:9baf128c2fab 4853
<> 132:9baf128c2fab 4854
<> 132:9baf128c2fab 4855 /**
<> 132:9baf128c2fab 4856 * @brief Initialization function for the Q15 sparse FIR filter.
<> 132:9baf128c2fab 4857 * @param[in,out] *S points to an instance of the Q15 sparse FIR structure.
<> 132:9baf128c2fab 4858 * @param[in] numTaps number of nonzero coefficients in the filter.
<> 132:9baf128c2fab 4859 * @param[in] *pCoeffs points to the array of filter coefficients.
<> 132:9baf128c2fab 4860 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 4861 * @param[in] *pTapDelay points to the array of offset times.
<> 132:9baf128c2fab 4862 * @param[in] maxDelay maximum offset time supported.
<> 132:9baf128c2fab 4863 * @param[in] blockSize number of samples that will be processed per block.
<> 132:9baf128c2fab 4864 * @return none
<> 132:9baf128c2fab 4865 */
<> 132:9baf128c2fab 4866
<> 132:9baf128c2fab 4867 void arm_fir_sparse_init_q15(
<> 132:9baf128c2fab 4868 arm_fir_sparse_instance_q15 * S,
<> 132:9baf128c2fab 4869 uint16_t numTaps,
<> 132:9baf128c2fab 4870 q15_t * pCoeffs,
<> 132:9baf128c2fab 4871 q15_t * pState,
<> 132:9baf128c2fab 4872 int32_t * pTapDelay,
<> 132:9baf128c2fab 4873 uint16_t maxDelay,
<> 132:9baf128c2fab 4874 uint32_t blockSize);
<> 132:9baf128c2fab 4875
<> 132:9baf128c2fab 4876 /**
<> 132:9baf128c2fab 4877 * @brief Processing function for the Q7 sparse FIR filter.
<> 132:9baf128c2fab 4878 * @param[in] *S points to an instance of the Q7 sparse FIR structure.
<> 132:9baf128c2fab 4879 * @param[in] *pSrc points to the block of input data.
<> 132:9baf128c2fab 4880 * @param[out] *pDst points to the block of output data
<> 132:9baf128c2fab 4881 * @param[in] *pScratchIn points to a temporary buffer of size blockSize.
<> 132:9baf128c2fab 4882 * @param[in] *pScratchOut points to a temporary buffer of size blockSize.
<> 132:9baf128c2fab 4883 * @param[in] blockSize number of input samples to process per call.
<> 132:9baf128c2fab 4884 * @return none.
<> 132:9baf128c2fab 4885 */
<> 132:9baf128c2fab 4886
<> 132:9baf128c2fab 4887 void arm_fir_sparse_q7(
<> 132:9baf128c2fab 4888 arm_fir_sparse_instance_q7 * S,
<> 132:9baf128c2fab 4889 q7_t * pSrc,
<> 132:9baf128c2fab 4890 q7_t * pDst,
<> 132:9baf128c2fab 4891 q7_t * pScratchIn,
<> 132:9baf128c2fab 4892 q31_t * pScratchOut,
<> 132:9baf128c2fab 4893 uint32_t blockSize);
<> 132:9baf128c2fab 4894
<> 132:9baf128c2fab 4895 /**
<> 132:9baf128c2fab 4896 * @brief Initialization function for the Q7 sparse FIR filter.
<> 132:9baf128c2fab 4897 * @param[in,out] *S points to an instance of the Q7 sparse FIR structure.
<> 132:9baf128c2fab 4898 * @param[in] numTaps number of nonzero coefficients in the filter.
<> 132:9baf128c2fab 4899 * @param[in] *pCoeffs points to the array of filter coefficients.
<> 132:9baf128c2fab 4900 * @param[in] *pState points to the state buffer.
<> 132:9baf128c2fab 4901 * @param[in] *pTapDelay points to the array of offset times.
<> 132:9baf128c2fab 4902 * @param[in] maxDelay maximum offset time supported.
<> 132:9baf128c2fab 4903 * @param[in] blockSize number of samples that will be processed per block.
<> 132:9baf128c2fab 4904 * @return none
<> 132:9baf128c2fab 4905 */
<> 132:9baf128c2fab 4906
<> 132:9baf128c2fab 4907 void arm_fir_sparse_init_q7(
<> 132:9baf128c2fab 4908 arm_fir_sparse_instance_q7 * S,
<> 132:9baf128c2fab 4909 uint16_t numTaps,
<> 132:9baf128c2fab 4910 q7_t * pCoeffs,
<> 132:9baf128c2fab 4911 q7_t * pState,
<> 132:9baf128c2fab 4912 int32_t * pTapDelay,
<> 132:9baf128c2fab 4913 uint16_t maxDelay,
<> 132:9baf128c2fab 4914 uint32_t blockSize);
<> 132:9baf128c2fab 4915
<> 132:9baf128c2fab 4916
<> 132:9baf128c2fab 4917 /*
<> 132:9baf128c2fab 4918 * @brief Floating-point sin_cos function.
<> 132:9baf128c2fab 4919 * @param[in] theta input value in degrees
<> 132:9baf128c2fab 4920 * @param[out] *pSinVal points to the processed sine output.
<> 132:9baf128c2fab 4921 * @param[out] *pCosVal points to the processed cos output.
<> 132:9baf128c2fab 4922 * @return none.
<> 132:9baf128c2fab 4923 */
<> 132:9baf128c2fab 4924
<> 132:9baf128c2fab 4925 void arm_sin_cos_f32(
<> 132:9baf128c2fab 4926 float32_t theta,
<> 132:9baf128c2fab 4927 float32_t * pSinVal,
<> 132:9baf128c2fab 4928 float32_t * pCcosVal);
<> 132:9baf128c2fab 4929
<> 132:9baf128c2fab 4930 /*
<> 132:9baf128c2fab 4931 * @brief Q31 sin_cos function.
<> 132:9baf128c2fab 4932 * @param[in] theta scaled input value in degrees
<> 132:9baf128c2fab 4933 * @param[out] *pSinVal points to the processed sine output.
<> 132:9baf128c2fab 4934 * @param[out] *pCosVal points to the processed cosine output.
<> 132:9baf128c2fab 4935 * @return none.
<> 132:9baf128c2fab 4936 */
<> 132:9baf128c2fab 4937
<> 132:9baf128c2fab 4938 void arm_sin_cos_q31(
<> 132:9baf128c2fab 4939 q31_t theta,
<> 132:9baf128c2fab 4940 q31_t * pSinVal,
<> 132:9baf128c2fab 4941 q31_t * pCosVal);
<> 132:9baf128c2fab 4942
<> 132:9baf128c2fab 4943
<> 132:9baf128c2fab 4944 /**
<> 132:9baf128c2fab 4945 * @brief Floating-point complex conjugate.
<> 132:9baf128c2fab 4946 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 4947 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 4948 * @param[in] numSamples number of complex samples in each vector
<> 132:9baf128c2fab 4949 * @return none.
<> 132:9baf128c2fab 4950 */
<> 132:9baf128c2fab 4951
<> 132:9baf128c2fab 4952 void arm_cmplx_conj_f32(
<> 132:9baf128c2fab 4953 float32_t * pSrc,
<> 132:9baf128c2fab 4954 float32_t * pDst,
<> 132:9baf128c2fab 4955 uint32_t numSamples);
<> 132:9baf128c2fab 4956
<> 132:9baf128c2fab 4957 /**
<> 132:9baf128c2fab 4958 * @brief Q31 complex conjugate.
<> 132:9baf128c2fab 4959 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 4960 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 4961 * @param[in] numSamples number of complex samples in each vector
<> 132:9baf128c2fab 4962 * @return none.
<> 132:9baf128c2fab 4963 */
<> 132:9baf128c2fab 4964
<> 132:9baf128c2fab 4965 void arm_cmplx_conj_q31(
<> 132:9baf128c2fab 4966 q31_t * pSrc,
<> 132:9baf128c2fab 4967 q31_t * pDst,
<> 132:9baf128c2fab 4968 uint32_t numSamples);
<> 132:9baf128c2fab 4969
<> 132:9baf128c2fab 4970 /**
<> 132:9baf128c2fab 4971 * @brief Q15 complex conjugate.
<> 132:9baf128c2fab 4972 * @param[in] *pSrc points to the input vector
<> 132:9baf128c2fab 4973 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 4974 * @param[in] numSamples number of complex samples in each vector
<> 132:9baf128c2fab 4975 * @return none.
<> 132:9baf128c2fab 4976 */
<> 132:9baf128c2fab 4977
<> 132:9baf128c2fab 4978 void arm_cmplx_conj_q15(
<> 132:9baf128c2fab 4979 q15_t * pSrc,
<> 132:9baf128c2fab 4980 q15_t * pDst,
<> 132:9baf128c2fab 4981 uint32_t numSamples);
<> 132:9baf128c2fab 4982
<> 132:9baf128c2fab 4983
<> 132:9baf128c2fab 4984
<> 132:9baf128c2fab 4985 /**
<> 132:9baf128c2fab 4986 * @brief Floating-point complex magnitude squared
<> 132:9baf128c2fab 4987 * @param[in] *pSrc points to the complex input vector
<> 132:9baf128c2fab 4988 * @param[out] *pDst points to the real output vector
<> 132:9baf128c2fab 4989 * @param[in] numSamples number of complex samples in the input vector
<> 132:9baf128c2fab 4990 * @return none.
<> 132:9baf128c2fab 4991 */
<> 132:9baf128c2fab 4992
<> 132:9baf128c2fab 4993 void arm_cmplx_mag_squared_f32(
<> 132:9baf128c2fab 4994 float32_t * pSrc,
<> 132:9baf128c2fab 4995 float32_t * pDst,
<> 132:9baf128c2fab 4996 uint32_t numSamples);
<> 132:9baf128c2fab 4997
<> 132:9baf128c2fab 4998 /**
<> 132:9baf128c2fab 4999 * @brief Q31 complex magnitude squared
<> 132:9baf128c2fab 5000 * @param[in] *pSrc points to the complex input vector
<> 132:9baf128c2fab 5001 * @param[out] *pDst points to the real output vector
<> 132:9baf128c2fab 5002 * @param[in] numSamples number of complex samples in the input vector
<> 132:9baf128c2fab 5003 * @return none.
<> 132:9baf128c2fab 5004 */
<> 132:9baf128c2fab 5005
<> 132:9baf128c2fab 5006 void arm_cmplx_mag_squared_q31(
<> 132:9baf128c2fab 5007 q31_t * pSrc,
<> 132:9baf128c2fab 5008 q31_t * pDst,
<> 132:9baf128c2fab 5009 uint32_t numSamples);
<> 132:9baf128c2fab 5010
<> 132:9baf128c2fab 5011 /**
<> 132:9baf128c2fab 5012 * @brief Q15 complex magnitude squared
<> 132:9baf128c2fab 5013 * @param[in] *pSrc points to the complex input vector
<> 132:9baf128c2fab 5014 * @param[out] *pDst points to the real output vector
<> 132:9baf128c2fab 5015 * @param[in] numSamples number of complex samples in the input vector
<> 132:9baf128c2fab 5016 * @return none.
<> 132:9baf128c2fab 5017 */
<> 132:9baf128c2fab 5018
<> 132:9baf128c2fab 5019 void arm_cmplx_mag_squared_q15(
<> 132:9baf128c2fab 5020 q15_t * pSrc,
<> 132:9baf128c2fab 5021 q15_t * pDst,
<> 132:9baf128c2fab 5022 uint32_t numSamples);
<> 132:9baf128c2fab 5023
<> 132:9baf128c2fab 5024
<> 132:9baf128c2fab 5025 /**
<> 132:9baf128c2fab 5026 * @ingroup groupController
<> 132:9baf128c2fab 5027 */
<> 132:9baf128c2fab 5028
<> 132:9baf128c2fab 5029 /**
<> 132:9baf128c2fab 5030 * @defgroup PID PID Motor Control
<> 132:9baf128c2fab 5031 *
<> 132:9baf128c2fab 5032 * A Proportional Integral Derivative (PID) controller is a generic feedback control
<> 132:9baf128c2fab 5033 * loop mechanism widely used in industrial control systems.
<> 132:9baf128c2fab 5034 * A PID controller is the most commonly used type of feedback controller.
<> 132:9baf128c2fab 5035 *
<> 132:9baf128c2fab 5036 * This set of functions implements (PID) controllers
<> 132:9baf128c2fab 5037 * for Q15, Q31, and floating-point data types. The functions operate on a single sample
<> 132:9baf128c2fab 5038 * of data and each call to the function returns a single processed value.
<> 132:9baf128c2fab 5039 * <code>S</code> points to an instance of the PID control data structure. <code>in</code>
<> 132:9baf128c2fab 5040 * is the input sample value. The functions return the output value.
<> 132:9baf128c2fab 5041 *
<> 132:9baf128c2fab 5042 * \par Algorithm:
<> 132:9baf128c2fab 5043 * <pre>
<> 132:9baf128c2fab 5044 * y[n] = y[n-1] + A0 * x[n] + A1 * x[n-1] + A2 * x[n-2]
<> 132:9baf128c2fab 5045 * A0 = Kp + Ki + Kd
<> 132:9baf128c2fab 5046 * A1 = (-Kp ) - (2 * Kd )
<> 132:9baf128c2fab 5047 * A2 = Kd </pre>
<> 132:9baf128c2fab 5048 *
<> 132:9baf128c2fab 5049 * \par
<> 132:9baf128c2fab 5050 * where \c Kp is proportional constant, \c Ki is Integral constant and \c Kd is Derivative constant
<> 132:9baf128c2fab 5051 *
<> 132:9baf128c2fab 5052 * \par
<> 132:9baf128c2fab 5053 * \image html PID.gif "Proportional Integral Derivative Controller"
<> 132:9baf128c2fab 5054 *
<> 132:9baf128c2fab 5055 * \par
<> 132:9baf128c2fab 5056 * The PID controller calculates an "error" value as the difference between
<> 132:9baf128c2fab 5057 * the measured output and the reference input.
<> 132:9baf128c2fab 5058 * The controller attempts to minimize the error by adjusting the process control inputs.
<> 132:9baf128c2fab 5059 * The proportional value determines the reaction to the current error,
<> 132:9baf128c2fab 5060 * the integral value determines the reaction based on the sum of recent errors,
<> 132:9baf128c2fab 5061 * and the derivative value determines the reaction based on the rate at which the error has been changing.
<> 132:9baf128c2fab 5062 *
<> 132:9baf128c2fab 5063 * \par Instance Structure
<> 132:9baf128c2fab 5064 * The Gains A0, A1, A2 and state variables for a PID controller are stored together in an instance data structure.
<> 132:9baf128c2fab 5065 * A separate instance structure must be defined for each PID Controller.
<> 132:9baf128c2fab 5066 * There are separate instance structure declarations for each of the 3 supported data types.
<> 132:9baf128c2fab 5067 *
<> 132:9baf128c2fab 5068 * \par Reset Functions
<> 132:9baf128c2fab 5069 * There is also an associated reset function for each data type which clears the state array.
<> 132:9baf128c2fab 5070 *
<> 132:9baf128c2fab 5071 * \par Initialization Functions
<> 132:9baf128c2fab 5072 * There is also an associated initialization function for each data type.
<> 132:9baf128c2fab 5073 * The initialization function performs the following operations:
<> 132:9baf128c2fab 5074 * - Initializes the Gains A0, A1, A2 from Kp,Ki, Kd gains.
<> 132:9baf128c2fab 5075 * - Zeros out the values in the state buffer.
<> 132:9baf128c2fab 5076 *
<> 132:9baf128c2fab 5077 * \par
<> 132:9baf128c2fab 5078 * Instance structure cannot be placed into a const data section and it is recommended to use the initialization function.
<> 132:9baf128c2fab 5079 *
<> 132:9baf128c2fab 5080 * \par Fixed-Point Behavior
<> 132:9baf128c2fab 5081 * Care must be taken when using the fixed-point versions of the PID Controller functions.
<> 132:9baf128c2fab 5082 * In particular, the overflow and saturation behavior of the accumulator used in each function must be considered.
<> 132:9baf128c2fab 5083 * Refer to the function specific documentation below for usage guidelines.
<> 132:9baf128c2fab 5084 */
<> 132:9baf128c2fab 5085
<> 132:9baf128c2fab 5086 /**
<> 132:9baf128c2fab 5087 * @addtogroup PID
<> 132:9baf128c2fab 5088 * @{
<> 132:9baf128c2fab 5089 */
<> 132:9baf128c2fab 5090
<> 132:9baf128c2fab 5091 /**
<> 132:9baf128c2fab 5092 * @brief Process function for the floating-point PID Control.
<> 132:9baf128c2fab 5093 * @param[in,out] *S is an instance of the floating-point PID Control structure
<> 132:9baf128c2fab 5094 * @param[in] in input sample to process
<> 132:9baf128c2fab 5095 * @return out processed output sample.
<> 132:9baf128c2fab 5096 */
<> 132:9baf128c2fab 5097
<> 132:9baf128c2fab 5098
<> 132:9baf128c2fab 5099 static __INLINE float32_t arm_pid_f32(
<> 132:9baf128c2fab 5100 arm_pid_instance_f32 * S,
<> 132:9baf128c2fab 5101 float32_t in)
<> 132:9baf128c2fab 5102 {
<> 132:9baf128c2fab 5103 float32_t out;
<> 132:9baf128c2fab 5104
<> 132:9baf128c2fab 5105 /* y[n] = y[n-1] + A0 * x[n] + A1 * x[n-1] + A2 * x[n-2] */
<> 132:9baf128c2fab 5106 out = (S->A0 * in) +
<> 132:9baf128c2fab 5107 (S->A1 * S->state[0]) + (S->A2 * S->state[1]) + (S->state[2]);
<> 132:9baf128c2fab 5108
<> 132:9baf128c2fab 5109 /* Update state */
<> 132:9baf128c2fab 5110 S->state[1] = S->state[0];
<> 132:9baf128c2fab 5111 S->state[0] = in;
<> 132:9baf128c2fab 5112 S->state[2] = out;
<> 132:9baf128c2fab 5113
<> 132:9baf128c2fab 5114 /* return to application */
<> 132:9baf128c2fab 5115 return (out);
<> 132:9baf128c2fab 5116
<> 132:9baf128c2fab 5117 }
<> 132:9baf128c2fab 5118
<> 132:9baf128c2fab 5119 /**
<> 132:9baf128c2fab 5120 * @brief Process function for the Q31 PID Control.
<> 132:9baf128c2fab 5121 * @param[in,out] *S points to an instance of the Q31 PID Control structure
<> 132:9baf128c2fab 5122 * @param[in] in input sample to process
<> 132:9baf128c2fab 5123 * @return out processed output sample.
<> 132:9baf128c2fab 5124 *
<> 132:9baf128c2fab 5125 * <b>Scaling and Overflow Behavior:</b>
<> 132:9baf128c2fab 5126 * \par
<> 132:9baf128c2fab 5127 * The function is implemented using an internal 64-bit accumulator.
<> 132:9baf128c2fab 5128 * The accumulator has a 2.62 format and maintains full precision of the intermediate multiplication results but provides only a single guard bit.
<> 132:9baf128c2fab 5129 * Thus, if the accumulator result overflows it wraps around rather than clip.
<> 132:9baf128c2fab 5130 * In order to avoid overflows completely the input signal must be scaled down by 2 bits as there are four additions.
<> 132:9baf128c2fab 5131 * After all multiply-accumulates are performed, the 2.62 accumulator is truncated to 1.32 format and then saturated to 1.31 format.
<> 132:9baf128c2fab 5132 */
<> 132:9baf128c2fab 5133
<> 132:9baf128c2fab 5134 static __INLINE q31_t arm_pid_q31(
<> 132:9baf128c2fab 5135 arm_pid_instance_q31 * S,
<> 132:9baf128c2fab 5136 q31_t in)
<> 132:9baf128c2fab 5137 {
<> 132:9baf128c2fab 5138 q63_t acc;
<> 132:9baf128c2fab 5139 q31_t out;
<> 132:9baf128c2fab 5140
<> 132:9baf128c2fab 5141 /* acc = A0 * x[n] */
<> 132:9baf128c2fab 5142 acc = (q63_t) S->A0 * in;
<> 132:9baf128c2fab 5143
<> 132:9baf128c2fab 5144 /* acc += A1 * x[n-1] */
<> 132:9baf128c2fab 5145 acc += (q63_t) S->A1 * S->state[0];
<> 132:9baf128c2fab 5146
<> 132:9baf128c2fab 5147 /* acc += A2 * x[n-2] */
<> 132:9baf128c2fab 5148 acc += (q63_t) S->A2 * S->state[1];
<> 132:9baf128c2fab 5149
<> 132:9baf128c2fab 5150 /* convert output to 1.31 format to add y[n-1] */
<> 132:9baf128c2fab 5151 out = (q31_t) (acc >> 31u);
<> 132:9baf128c2fab 5152
<> 132:9baf128c2fab 5153 /* out += y[n-1] */
<> 132:9baf128c2fab 5154 out += S->state[2];
<> 132:9baf128c2fab 5155
<> 132:9baf128c2fab 5156 /* Update state */
<> 132:9baf128c2fab 5157 S->state[1] = S->state[0];
<> 132:9baf128c2fab 5158 S->state[0] = in;
<> 132:9baf128c2fab 5159 S->state[2] = out;
<> 132:9baf128c2fab 5160
<> 132:9baf128c2fab 5161 /* return to application */
<> 132:9baf128c2fab 5162 return (out);
<> 132:9baf128c2fab 5163
<> 132:9baf128c2fab 5164 }
<> 132:9baf128c2fab 5165
<> 132:9baf128c2fab 5166 /**
<> 132:9baf128c2fab 5167 * @brief Process function for the Q15 PID Control.
<> 132:9baf128c2fab 5168 * @param[in,out] *S points to an instance of the Q15 PID Control structure
<> 132:9baf128c2fab 5169 * @param[in] in input sample to process
<> 132:9baf128c2fab 5170 * @return out processed output sample.
<> 132:9baf128c2fab 5171 *
<> 132:9baf128c2fab 5172 * <b>Scaling and Overflow Behavior:</b>
<> 132:9baf128c2fab 5173 * \par
<> 132:9baf128c2fab 5174 * The function is implemented using a 64-bit internal accumulator.
<> 132:9baf128c2fab 5175 * Both Gains and state variables are represented in 1.15 format and multiplications yield a 2.30 result.
<> 132:9baf128c2fab 5176 * The 2.30 intermediate results are accumulated in a 64-bit accumulator in 34.30 format.
<> 132:9baf128c2fab 5177 * There is no risk of internal overflow with this approach and the full precision of intermediate multiplications is preserved.
<> 132:9baf128c2fab 5178 * After all additions have been performed, the accumulator is truncated to 34.15 format by discarding low 15 bits.
<> 132:9baf128c2fab 5179 * Lastly, the accumulator is saturated to yield a result in 1.15 format.
<> 132:9baf128c2fab 5180 */
<> 132:9baf128c2fab 5181
<> 132:9baf128c2fab 5182 static __INLINE q15_t arm_pid_q15(
<> 132:9baf128c2fab 5183 arm_pid_instance_q15 * S,
<> 132:9baf128c2fab 5184 q15_t in)
<> 132:9baf128c2fab 5185 {
<> 132:9baf128c2fab 5186 q63_t acc;
<> 132:9baf128c2fab 5187 q15_t out;
<> 132:9baf128c2fab 5188
<> 132:9baf128c2fab 5189 #ifndef ARM_MATH_CM0_FAMILY
<> 132:9baf128c2fab 5190 __SIMD32_TYPE *vstate;
<> 132:9baf128c2fab 5191
<> 132:9baf128c2fab 5192 /* Implementation of PID controller */
<> 132:9baf128c2fab 5193
<> 132:9baf128c2fab 5194 /* acc = A0 * x[n] */
<> 132:9baf128c2fab 5195 acc = (q31_t) __SMUAD(S->A0, in);
<> 132:9baf128c2fab 5196
<> 132:9baf128c2fab 5197 /* acc += A1 * x[n-1] + A2 * x[n-2] */
<> 132:9baf128c2fab 5198 vstate = __SIMD32_CONST(S->state);
<> 132:9baf128c2fab 5199 acc = __SMLALD(S->A1, (q31_t) *vstate, acc);
<> 132:9baf128c2fab 5200
<> 132:9baf128c2fab 5201 #else
<> 132:9baf128c2fab 5202 /* acc = A0 * x[n] */
<> 132:9baf128c2fab 5203 acc = ((q31_t) S->A0) * in;
<> 132:9baf128c2fab 5204
<> 132:9baf128c2fab 5205 /* acc += A1 * x[n-1] + A2 * x[n-2] */
<> 132:9baf128c2fab 5206 acc += (q31_t) S->A1 * S->state[0];
<> 132:9baf128c2fab 5207 acc += (q31_t) S->A2 * S->state[1];
<> 132:9baf128c2fab 5208
<> 132:9baf128c2fab 5209 #endif
<> 132:9baf128c2fab 5210
<> 132:9baf128c2fab 5211 /* acc += y[n-1] */
<> 132:9baf128c2fab 5212 acc += (q31_t) S->state[2] << 15;
<> 132:9baf128c2fab 5213
<> 132:9baf128c2fab 5214 /* saturate the output */
<> 132:9baf128c2fab 5215 out = (q15_t) (__SSAT((acc >> 15), 16));
<> 132:9baf128c2fab 5216
<> 132:9baf128c2fab 5217 /* Update state */
<> 132:9baf128c2fab 5218 S->state[1] = S->state[0];
<> 132:9baf128c2fab 5219 S->state[0] = in;
<> 132:9baf128c2fab 5220 S->state[2] = out;
<> 132:9baf128c2fab 5221
<> 132:9baf128c2fab 5222 /* return to application */
<> 132:9baf128c2fab 5223 return (out);
<> 132:9baf128c2fab 5224
<> 132:9baf128c2fab 5225 }
<> 132:9baf128c2fab 5226
<> 132:9baf128c2fab 5227 /**
<> 132:9baf128c2fab 5228 * @} end of PID group
<> 132:9baf128c2fab 5229 */
<> 132:9baf128c2fab 5230
<> 132:9baf128c2fab 5231
<> 132:9baf128c2fab 5232 /**
<> 132:9baf128c2fab 5233 * @brief Floating-point matrix inverse.
<> 132:9baf128c2fab 5234 * @param[in] *src points to the instance of the input floating-point matrix structure.
<> 132:9baf128c2fab 5235 * @param[out] *dst points to the instance of the output floating-point matrix structure.
<> 132:9baf128c2fab 5236 * @return The function returns ARM_MATH_SIZE_MISMATCH, if the dimensions do not match.
<> 132:9baf128c2fab 5237 * If the input matrix is singular (does not have an inverse), then the algorithm terminates and returns error status ARM_MATH_SINGULAR.
<> 132:9baf128c2fab 5238 */
<> 132:9baf128c2fab 5239
<> 132:9baf128c2fab 5240 arm_status arm_mat_inverse_f32(
<> 132:9baf128c2fab 5241 const arm_matrix_instance_f32 * src,
<> 132:9baf128c2fab 5242 arm_matrix_instance_f32 * dst);
<> 132:9baf128c2fab 5243
<> 132:9baf128c2fab 5244
<> 132:9baf128c2fab 5245 /**
<> 132:9baf128c2fab 5246 * @brief Floating-point matrix inverse.
<> 132:9baf128c2fab 5247 * @param[in] *src points to the instance of the input floating-point matrix structure.
<> 132:9baf128c2fab 5248 * @param[out] *dst points to the instance of the output floating-point matrix structure.
<> 132:9baf128c2fab 5249 * @return The function returns ARM_MATH_SIZE_MISMATCH, if the dimensions do not match.
<> 132:9baf128c2fab 5250 * If the input matrix is singular (does not have an inverse), then the algorithm terminates and returns error status ARM_MATH_SINGULAR.
<> 132:9baf128c2fab 5251 */
<> 132:9baf128c2fab 5252
<> 132:9baf128c2fab 5253 arm_status arm_mat_inverse_f64(
<> 132:9baf128c2fab 5254 const arm_matrix_instance_f64 * src,
<> 132:9baf128c2fab 5255 arm_matrix_instance_f64 * dst);
<> 132:9baf128c2fab 5256
<> 132:9baf128c2fab 5257
<> 132:9baf128c2fab 5258
<> 132:9baf128c2fab 5259 /**
<> 132:9baf128c2fab 5260 * @ingroup groupController
<> 132:9baf128c2fab 5261 */
<> 132:9baf128c2fab 5262
<> 132:9baf128c2fab 5263
<> 132:9baf128c2fab 5264 /**
<> 132:9baf128c2fab 5265 * @defgroup clarke Vector Clarke Transform
<> 132:9baf128c2fab 5266 * Forward Clarke transform converts the instantaneous stator phases into a two-coordinate time invariant vector.
<> 132:9baf128c2fab 5267 * Generally the Clarke transform uses three-phase currents <code>Ia, Ib and Ic</code> to calculate currents
<> 132:9baf128c2fab 5268 * in the two-phase orthogonal stator axis <code>Ialpha</code> and <code>Ibeta</code>.
<> 132:9baf128c2fab 5269 * When <code>Ialpha</code> is superposed with <code>Ia</code> as shown in the figure below
<> 132:9baf128c2fab 5270 * \image html clarke.gif Stator current space vector and its components in (a,b).
<> 132:9baf128c2fab 5271 * and <code>Ia + Ib + Ic = 0</code>, in this condition <code>Ialpha</code> and <code>Ibeta</code>
<> 132:9baf128c2fab 5272 * can be calculated using only <code>Ia</code> and <code>Ib</code>.
<> 132:9baf128c2fab 5273 *
<> 132:9baf128c2fab 5274 * The function operates on a single sample of data and each call to the function returns the processed output.
<> 132:9baf128c2fab 5275 * The library provides separate functions for Q31 and floating-point data types.
<> 132:9baf128c2fab 5276 * \par Algorithm
<> 132:9baf128c2fab 5277 * \image html clarkeFormula.gif
<> 132:9baf128c2fab 5278 * where <code>Ia</code> and <code>Ib</code> are the instantaneous stator phases and
<> 132:9baf128c2fab 5279 * <code>pIalpha</code> and <code>pIbeta</code> are the two coordinates of time invariant vector.
<> 132:9baf128c2fab 5280 * \par Fixed-Point Behavior
<> 132:9baf128c2fab 5281 * Care must be taken when using the Q31 version of the Clarke transform.
<> 132:9baf128c2fab 5282 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
<> 132:9baf128c2fab 5283 * Refer to the function specific documentation below for usage guidelines.
<> 132:9baf128c2fab 5284 */
<> 132:9baf128c2fab 5285
<> 132:9baf128c2fab 5286 /**
<> 132:9baf128c2fab 5287 * @addtogroup clarke
<> 132:9baf128c2fab 5288 * @{
<> 132:9baf128c2fab 5289 */
<> 132:9baf128c2fab 5290
<> 132:9baf128c2fab 5291 /**
<> 132:9baf128c2fab 5292 *
<> 132:9baf128c2fab 5293 * @brief Floating-point Clarke transform
<> 132:9baf128c2fab 5294 * @param[in] Ia input three-phase coordinate <code>a</code>
<> 132:9baf128c2fab 5295 * @param[in] Ib input three-phase coordinate <code>b</code>
<> 132:9baf128c2fab 5296 * @param[out] *pIalpha points to output two-phase orthogonal vector axis alpha
<> 132:9baf128c2fab 5297 * @param[out] *pIbeta points to output two-phase orthogonal vector axis beta
<> 132:9baf128c2fab 5298 * @return none.
<> 132:9baf128c2fab 5299 */
<> 132:9baf128c2fab 5300
<> 132:9baf128c2fab 5301 static __INLINE void arm_clarke_f32(
<> 132:9baf128c2fab 5302 float32_t Ia,
<> 132:9baf128c2fab 5303 float32_t Ib,
<> 132:9baf128c2fab 5304 float32_t * pIalpha,
<> 132:9baf128c2fab 5305 float32_t * pIbeta)
<> 132:9baf128c2fab 5306 {
<> 132:9baf128c2fab 5307 /* Calculate pIalpha using the equation, pIalpha = Ia */
<> 132:9baf128c2fab 5308 *pIalpha = Ia;
<> 132:9baf128c2fab 5309
<> 132:9baf128c2fab 5310 /* Calculate pIbeta using the equation, pIbeta = (1/sqrt(3)) * Ia + (2/sqrt(3)) * Ib */
<> 132:9baf128c2fab 5311 *pIbeta =
<> 132:9baf128c2fab 5312 ((float32_t) 0.57735026919 * Ia + (float32_t) 1.15470053838 * Ib);
<> 132:9baf128c2fab 5313
<> 132:9baf128c2fab 5314 }
<> 132:9baf128c2fab 5315
<> 132:9baf128c2fab 5316 /**
<> 132:9baf128c2fab 5317 * @brief Clarke transform for Q31 version
<> 132:9baf128c2fab 5318 * @param[in] Ia input three-phase coordinate <code>a</code>
<> 132:9baf128c2fab 5319 * @param[in] Ib input three-phase coordinate <code>b</code>
<> 132:9baf128c2fab 5320 * @param[out] *pIalpha points to output two-phase orthogonal vector axis alpha
<> 132:9baf128c2fab 5321 * @param[out] *pIbeta points to output two-phase orthogonal vector axis beta
<> 132:9baf128c2fab 5322 * @return none.
<> 132:9baf128c2fab 5323 *
<> 132:9baf128c2fab 5324 * <b>Scaling and Overflow Behavior:</b>
<> 132:9baf128c2fab 5325 * \par
<> 132:9baf128c2fab 5326 * The function is implemented using an internal 32-bit accumulator.
<> 132:9baf128c2fab 5327 * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
<> 132:9baf128c2fab 5328 * There is saturation on the addition, hence there is no risk of overflow.
<> 132:9baf128c2fab 5329 */
<> 132:9baf128c2fab 5330
<> 132:9baf128c2fab 5331 static __INLINE void arm_clarke_q31(
<> 132:9baf128c2fab 5332 q31_t Ia,
<> 132:9baf128c2fab 5333 q31_t Ib,
<> 132:9baf128c2fab 5334 q31_t * pIalpha,
<> 132:9baf128c2fab 5335 q31_t * pIbeta)
<> 132:9baf128c2fab 5336 {
<> 132:9baf128c2fab 5337 q31_t product1, product2; /* Temporary variables used to store intermediate results */
<> 132:9baf128c2fab 5338
<> 132:9baf128c2fab 5339 /* Calculating pIalpha from Ia by equation pIalpha = Ia */
<> 132:9baf128c2fab 5340 *pIalpha = Ia;
<> 132:9baf128c2fab 5341
<> 132:9baf128c2fab 5342 /* Intermediate product is calculated by (1/(sqrt(3)) * Ia) */
<> 132:9baf128c2fab 5343 product1 = (q31_t) (((q63_t) Ia * 0x24F34E8B) >> 30);
<> 132:9baf128c2fab 5344
<> 132:9baf128c2fab 5345 /* Intermediate product is calculated by (2/sqrt(3) * Ib) */
<> 132:9baf128c2fab 5346 product2 = (q31_t) (((q63_t) Ib * 0x49E69D16) >> 30);
<> 132:9baf128c2fab 5347
<> 132:9baf128c2fab 5348 /* pIbeta is calculated by adding the intermediate products */
<> 132:9baf128c2fab 5349 *pIbeta = __QADD(product1, product2);
<> 132:9baf128c2fab 5350 }
<> 132:9baf128c2fab 5351
<> 132:9baf128c2fab 5352 /**
<> 132:9baf128c2fab 5353 * @} end of clarke group
<> 132:9baf128c2fab 5354 */
<> 132:9baf128c2fab 5355
<> 132:9baf128c2fab 5356 /**
<> 132:9baf128c2fab 5357 * @brief Converts the elements of the Q7 vector to Q31 vector.
<> 132:9baf128c2fab 5358 * @param[in] *pSrc input pointer
<> 132:9baf128c2fab 5359 * @param[out] *pDst output pointer
<> 132:9baf128c2fab 5360 * @param[in] blockSize number of samples to process
<> 132:9baf128c2fab 5361 * @return none.
<> 132:9baf128c2fab 5362 */
<> 132:9baf128c2fab 5363 void arm_q7_to_q31(
<> 132:9baf128c2fab 5364 q7_t * pSrc,
<> 132:9baf128c2fab 5365 q31_t * pDst,
<> 132:9baf128c2fab 5366 uint32_t blockSize);
<> 132:9baf128c2fab 5367
<> 132:9baf128c2fab 5368
<> 132:9baf128c2fab 5369
<> 132:9baf128c2fab 5370
<> 132:9baf128c2fab 5371 /**
<> 132:9baf128c2fab 5372 * @ingroup groupController
<> 132:9baf128c2fab 5373 */
<> 132:9baf128c2fab 5374
<> 132:9baf128c2fab 5375 /**
<> 132:9baf128c2fab 5376 * @defgroup inv_clarke Vector Inverse Clarke Transform
<> 132:9baf128c2fab 5377 * Inverse Clarke transform converts the two-coordinate time invariant vector into instantaneous stator phases.
<> 132:9baf128c2fab 5378 *
<> 132:9baf128c2fab 5379 * The function operates on a single sample of data and each call to the function returns the processed output.
<> 132:9baf128c2fab 5380 * The library provides separate functions for Q31 and floating-point data types.
<> 132:9baf128c2fab 5381 * \par Algorithm
<> 132:9baf128c2fab 5382 * \image html clarkeInvFormula.gif
<> 132:9baf128c2fab 5383 * where <code>pIa</code> and <code>pIb</code> are the instantaneous stator phases and
<> 132:9baf128c2fab 5384 * <code>Ialpha</code> and <code>Ibeta</code> are the two coordinates of time invariant vector.
<> 132:9baf128c2fab 5385 * \par Fixed-Point Behavior
<> 132:9baf128c2fab 5386 * Care must be taken when using the Q31 version of the Clarke transform.
<> 132:9baf128c2fab 5387 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
<> 132:9baf128c2fab 5388 * Refer to the function specific documentation below for usage guidelines.
<> 132:9baf128c2fab 5389 */
<> 132:9baf128c2fab 5390
<> 132:9baf128c2fab 5391 /**
<> 132:9baf128c2fab 5392 * @addtogroup inv_clarke
<> 132:9baf128c2fab 5393 * @{
<> 132:9baf128c2fab 5394 */
<> 132:9baf128c2fab 5395
<> 132:9baf128c2fab 5396 /**
<> 132:9baf128c2fab 5397 * @brief Floating-point Inverse Clarke transform
<> 132:9baf128c2fab 5398 * @param[in] Ialpha input two-phase orthogonal vector axis alpha
<> 132:9baf128c2fab 5399 * @param[in] Ibeta input two-phase orthogonal vector axis beta
<> 132:9baf128c2fab 5400 * @param[out] *pIa points to output three-phase coordinate <code>a</code>
<> 132:9baf128c2fab 5401 * @param[out] *pIb points to output three-phase coordinate <code>b</code>
<> 132:9baf128c2fab 5402 * @return none.
<> 132:9baf128c2fab 5403 */
<> 132:9baf128c2fab 5404
<> 132:9baf128c2fab 5405
<> 132:9baf128c2fab 5406 static __INLINE void arm_inv_clarke_f32(
<> 132:9baf128c2fab 5407 float32_t Ialpha,
<> 132:9baf128c2fab 5408 float32_t Ibeta,
<> 132:9baf128c2fab 5409 float32_t * pIa,
<> 132:9baf128c2fab 5410 float32_t * pIb)
<> 132:9baf128c2fab 5411 {
<> 132:9baf128c2fab 5412 /* Calculating pIa from Ialpha by equation pIa = Ialpha */
<> 132:9baf128c2fab 5413 *pIa = Ialpha;
<> 132:9baf128c2fab 5414
<> 132:9baf128c2fab 5415 /* Calculating pIb from Ialpha and Ibeta by equation pIb = -(1/2) * Ialpha + (sqrt(3)/2) * Ibeta */
<> 132:9baf128c2fab 5416 *pIb = -0.5 * Ialpha + (float32_t) 0.8660254039 *Ibeta;
<> 132:9baf128c2fab 5417
<> 132:9baf128c2fab 5418 }
<> 132:9baf128c2fab 5419
<> 132:9baf128c2fab 5420 /**
<> 132:9baf128c2fab 5421 * @brief Inverse Clarke transform for Q31 version
<> 132:9baf128c2fab 5422 * @param[in] Ialpha input two-phase orthogonal vector axis alpha
<> 132:9baf128c2fab 5423 * @param[in] Ibeta input two-phase orthogonal vector axis beta
<> 132:9baf128c2fab 5424 * @param[out] *pIa points to output three-phase coordinate <code>a</code>
<> 132:9baf128c2fab 5425 * @param[out] *pIb points to output three-phase coordinate <code>b</code>
<> 132:9baf128c2fab 5426 * @return none.
<> 132:9baf128c2fab 5427 *
<> 132:9baf128c2fab 5428 * <b>Scaling and Overflow Behavior:</b>
<> 132:9baf128c2fab 5429 * \par
<> 132:9baf128c2fab 5430 * The function is implemented using an internal 32-bit accumulator.
<> 132:9baf128c2fab 5431 * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
<> 132:9baf128c2fab 5432 * There is saturation on the subtraction, hence there is no risk of overflow.
<> 132:9baf128c2fab 5433 */
<> 132:9baf128c2fab 5434
<> 132:9baf128c2fab 5435 static __INLINE void arm_inv_clarke_q31(
<> 132:9baf128c2fab 5436 q31_t Ialpha,
<> 132:9baf128c2fab 5437 q31_t Ibeta,
<> 132:9baf128c2fab 5438 q31_t * pIa,
<> 132:9baf128c2fab 5439 q31_t * pIb)
<> 132:9baf128c2fab 5440 {
<> 132:9baf128c2fab 5441 q31_t product1, product2; /* Temporary variables used to store intermediate results */
<> 132:9baf128c2fab 5442
<> 132:9baf128c2fab 5443 /* Calculating pIa from Ialpha by equation pIa = Ialpha */
<> 132:9baf128c2fab 5444 *pIa = Ialpha;
<> 132:9baf128c2fab 5445
<> 132:9baf128c2fab 5446 /* Intermediate product is calculated by (1/(2*sqrt(3)) * Ia) */
<> 132:9baf128c2fab 5447 product1 = (q31_t) (((q63_t) (Ialpha) * (0x40000000)) >> 31);
<> 132:9baf128c2fab 5448
<> 132:9baf128c2fab 5449 /* Intermediate product is calculated by (1/sqrt(3) * pIb) */
<> 132:9baf128c2fab 5450 product2 = (q31_t) (((q63_t) (Ibeta) * (0x6ED9EBA1)) >> 31);
<> 132:9baf128c2fab 5451
<> 132:9baf128c2fab 5452 /* pIb is calculated by subtracting the products */
<> 132:9baf128c2fab 5453 *pIb = __QSUB(product2, product1);
<> 132:9baf128c2fab 5454
<> 132:9baf128c2fab 5455 }
<> 132:9baf128c2fab 5456
<> 132:9baf128c2fab 5457 /**
<> 132:9baf128c2fab 5458 * @} end of inv_clarke group
<> 132:9baf128c2fab 5459 */
<> 132:9baf128c2fab 5460
<> 132:9baf128c2fab 5461 /**
<> 132:9baf128c2fab 5462 * @brief Converts the elements of the Q7 vector to Q15 vector.
<> 132:9baf128c2fab 5463 * @param[in] *pSrc input pointer
<> 132:9baf128c2fab 5464 * @param[out] *pDst output pointer
<> 132:9baf128c2fab 5465 * @param[in] blockSize number of samples to process
<> 132:9baf128c2fab 5466 * @return none.
<> 132:9baf128c2fab 5467 */
<> 132:9baf128c2fab 5468 void arm_q7_to_q15(
<> 132:9baf128c2fab 5469 q7_t * pSrc,
<> 132:9baf128c2fab 5470 q15_t * pDst,
<> 132:9baf128c2fab 5471 uint32_t blockSize);
<> 132:9baf128c2fab 5472
<> 132:9baf128c2fab 5473
<> 132:9baf128c2fab 5474
<> 132:9baf128c2fab 5475 /**
<> 132:9baf128c2fab 5476 * @ingroup groupController
<> 132:9baf128c2fab 5477 */
<> 132:9baf128c2fab 5478
<> 132:9baf128c2fab 5479 /**
<> 132:9baf128c2fab 5480 * @defgroup park Vector Park Transform
<> 132:9baf128c2fab 5481 *
<> 132:9baf128c2fab 5482 * Forward Park transform converts the input two-coordinate vector to flux and torque components.
<> 132:9baf128c2fab 5483 * The Park transform can be used to realize the transformation of the <code>Ialpha</code> and the <code>Ibeta</code> currents
<> 132:9baf128c2fab 5484 * from the stationary to the moving reference frame and control the spatial relationship between
<> 132:9baf128c2fab 5485 * the stator vector current and rotor flux vector.
<> 132:9baf128c2fab 5486 * If we consider the d axis aligned with the rotor flux, the diagram below shows the
<> 132:9baf128c2fab 5487 * current vector and the relationship from the two reference frames:
<> 132:9baf128c2fab 5488 * \image html park.gif "Stator current space vector and its component in (a,b) and in the d,q rotating reference frame"
<> 132:9baf128c2fab 5489 *
<> 132:9baf128c2fab 5490 * The function operates on a single sample of data and each call to the function returns the processed output.
<> 132:9baf128c2fab 5491 * The library provides separate functions for Q31 and floating-point data types.
<> 132:9baf128c2fab 5492 * \par Algorithm
<> 132:9baf128c2fab 5493 * \image html parkFormula.gif
<> 132:9baf128c2fab 5494 * where <code>Ialpha</code> and <code>Ibeta</code> are the stator vector components,
<> 132:9baf128c2fab 5495 * <code>pId</code> and <code>pIq</code> are rotor vector components and <code>cosVal</code> and <code>sinVal</code> are the
<> 132:9baf128c2fab 5496 * cosine and sine values of theta (rotor flux position).
<> 132:9baf128c2fab 5497 * \par Fixed-Point Behavior
<> 132:9baf128c2fab 5498 * Care must be taken when using the Q31 version of the Park transform.
<> 132:9baf128c2fab 5499 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
<> 132:9baf128c2fab 5500 * Refer to the function specific documentation below for usage guidelines.
<> 132:9baf128c2fab 5501 */
<> 132:9baf128c2fab 5502
<> 132:9baf128c2fab 5503 /**
<> 132:9baf128c2fab 5504 * @addtogroup park
<> 132:9baf128c2fab 5505 * @{
<> 132:9baf128c2fab 5506 */
<> 132:9baf128c2fab 5507
<> 132:9baf128c2fab 5508 /**
<> 132:9baf128c2fab 5509 * @brief Floating-point Park transform
<> 132:9baf128c2fab 5510 * @param[in] Ialpha input two-phase vector coordinate alpha
<> 132:9baf128c2fab 5511 * @param[in] Ibeta input two-phase vector coordinate beta
<> 132:9baf128c2fab 5512 * @param[out] *pId points to output rotor reference frame d
<> 132:9baf128c2fab 5513 * @param[out] *pIq points to output rotor reference frame q
<> 132:9baf128c2fab 5514 * @param[in] sinVal sine value of rotation angle theta
<> 132:9baf128c2fab 5515 * @param[in] cosVal cosine value of rotation angle theta
<> 132:9baf128c2fab 5516 * @return none.
<> 132:9baf128c2fab 5517 *
<> 132:9baf128c2fab 5518 * The function implements the forward Park transform.
<> 132:9baf128c2fab 5519 *
<> 132:9baf128c2fab 5520 */
<> 132:9baf128c2fab 5521
<> 132:9baf128c2fab 5522 static __INLINE void arm_park_f32(
<> 132:9baf128c2fab 5523 float32_t Ialpha,
<> 132:9baf128c2fab 5524 float32_t Ibeta,
<> 132:9baf128c2fab 5525 float32_t * pId,
<> 132:9baf128c2fab 5526 float32_t * pIq,
<> 132:9baf128c2fab 5527 float32_t sinVal,
<> 132:9baf128c2fab 5528 float32_t cosVal)
<> 132:9baf128c2fab 5529 {
<> 132:9baf128c2fab 5530 /* Calculate pId using the equation, pId = Ialpha * cosVal + Ibeta * sinVal */
<> 132:9baf128c2fab 5531 *pId = Ialpha * cosVal + Ibeta * sinVal;
<> 132:9baf128c2fab 5532
<> 132:9baf128c2fab 5533 /* Calculate pIq using the equation, pIq = - Ialpha * sinVal + Ibeta * cosVal */
<> 132:9baf128c2fab 5534 *pIq = -Ialpha * sinVal + Ibeta * cosVal;
<> 132:9baf128c2fab 5535
<> 132:9baf128c2fab 5536 }
<> 132:9baf128c2fab 5537
<> 132:9baf128c2fab 5538 /**
<> 132:9baf128c2fab 5539 * @brief Park transform for Q31 version
<> 132:9baf128c2fab 5540 * @param[in] Ialpha input two-phase vector coordinate alpha
<> 132:9baf128c2fab 5541 * @param[in] Ibeta input two-phase vector coordinate beta
<> 132:9baf128c2fab 5542 * @param[out] *pId points to output rotor reference frame d
<> 132:9baf128c2fab 5543 * @param[out] *pIq points to output rotor reference frame q
<> 132:9baf128c2fab 5544 * @param[in] sinVal sine value of rotation angle theta
<> 132:9baf128c2fab 5545 * @param[in] cosVal cosine value of rotation angle theta
<> 132:9baf128c2fab 5546 * @return none.
<> 132:9baf128c2fab 5547 *
<> 132:9baf128c2fab 5548 * <b>Scaling and Overflow Behavior:</b>
<> 132:9baf128c2fab 5549 * \par
<> 132:9baf128c2fab 5550 * The function is implemented using an internal 32-bit accumulator.
<> 132:9baf128c2fab 5551 * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
<> 132:9baf128c2fab 5552 * There is saturation on the addition and subtraction, hence there is no risk of overflow.
<> 132:9baf128c2fab 5553 */
<> 132:9baf128c2fab 5554
<> 132:9baf128c2fab 5555
<> 132:9baf128c2fab 5556 static __INLINE void arm_park_q31(
<> 132:9baf128c2fab 5557 q31_t Ialpha,
<> 132:9baf128c2fab 5558 q31_t Ibeta,
<> 132:9baf128c2fab 5559 q31_t * pId,
<> 132:9baf128c2fab 5560 q31_t * pIq,
<> 132:9baf128c2fab 5561 q31_t sinVal,
<> 132:9baf128c2fab 5562 q31_t cosVal)
<> 132:9baf128c2fab 5563 {
<> 132:9baf128c2fab 5564 q31_t product1, product2; /* Temporary variables used to store intermediate results */
<> 132:9baf128c2fab 5565 q31_t product3, product4; /* Temporary variables used to store intermediate results */
<> 132:9baf128c2fab 5566
<> 132:9baf128c2fab 5567 /* Intermediate product is calculated by (Ialpha * cosVal) */
<> 132:9baf128c2fab 5568 product1 = (q31_t) (((q63_t) (Ialpha) * (cosVal)) >> 31);
<> 132:9baf128c2fab 5569
<> 132:9baf128c2fab 5570 /* Intermediate product is calculated by (Ibeta * sinVal) */
<> 132:9baf128c2fab 5571 product2 = (q31_t) (((q63_t) (Ibeta) * (sinVal)) >> 31);
<> 132:9baf128c2fab 5572
<> 132:9baf128c2fab 5573
<> 132:9baf128c2fab 5574 /* Intermediate product is calculated by (Ialpha * sinVal) */
<> 132:9baf128c2fab 5575 product3 = (q31_t) (((q63_t) (Ialpha) * (sinVal)) >> 31);
<> 132:9baf128c2fab 5576
<> 132:9baf128c2fab 5577 /* Intermediate product is calculated by (Ibeta * cosVal) */
<> 132:9baf128c2fab 5578 product4 = (q31_t) (((q63_t) (Ibeta) * (cosVal)) >> 31);
<> 132:9baf128c2fab 5579
<> 132:9baf128c2fab 5580 /* Calculate pId by adding the two intermediate products 1 and 2 */
<> 132:9baf128c2fab 5581 *pId = __QADD(product1, product2);
<> 132:9baf128c2fab 5582
<> 132:9baf128c2fab 5583 /* Calculate pIq by subtracting the two intermediate products 3 from 4 */
<> 132:9baf128c2fab 5584 *pIq = __QSUB(product4, product3);
<> 132:9baf128c2fab 5585 }
<> 132:9baf128c2fab 5586
<> 132:9baf128c2fab 5587 /**
<> 132:9baf128c2fab 5588 * @} end of park group
<> 132:9baf128c2fab 5589 */
<> 132:9baf128c2fab 5590
<> 132:9baf128c2fab 5591 /**
<> 132:9baf128c2fab 5592 * @brief Converts the elements of the Q7 vector to floating-point vector.
<> 132:9baf128c2fab 5593 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 5594 * @param[out] *pDst is output pointer
<> 132:9baf128c2fab 5595 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 5596 * @return none.
<> 132:9baf128c2fab 5597 */
<> 132:9baf128c2fab 5598 void arm_q7_to_float(
<> 132:9baf128c2fab 5599 q7_t * pSrc,
<> 132:9baf128c2fab 5600 float32_t * pDst,
<> 132:9baf128c2fab 5601 uint32_t blockSize);
<> 132:9baf128c2fab 5602
<> 132:9baf128c2fab 5603
<> 132:9baf128c2fab 5604 /**
<> 132:9baf128c2fab 5605 * @ingroup groupController
<> 132:9baf128c2fab 5606 */
<> 132:9baf128c2fab 5607
<> 132:9baf128c2fab 5608 /**
<> 132:9baf128c2fab 5609 * @defgroup inv_park Vector Inverse Park transform
<> 132:9baf128c2fab 5610 * Inverse Park transform converts the input flux and torque components to two-coordinate vector.
<> 132:9baf128c2fab 5611 *
<> 132:9baf128c2fab 5612 * The function operates on a single sample of data and each call to the function returns the processed output.
<> 132:9baf128c2fab 5613 * The library provides separate functions for Q31 and floating-point data types.
<> 132:9baf128c2fab 5614 * \par Algorithm
<> 132:9baf128c2fab 5615 * \image html parkInvFormula.gif
<> 132:9baf128c2fab 5616 * where <code>pIalpha</code> and <code>pIbeta</code> are the stator vector components,
<> 132:9baf128c2fab 5617 * <code>Id</code> and <code>Iq</code> are rotor vector components and <code>cosVal</code> and <code>sinVal</code> are the
<> 132:9baf128c2fab 5618 * cosine and sine values of theta (rotor flux position).
<> 132:9baf128c2fab 5619 * \par Fixed-Point Behavior
<> 132:9baf128c2fab 5620 * Care must be taken when using the Q31 version of the Park transform.
<> 132:9baf128c2fab 5621 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
<> 132:9baf128c2fab 5622 * Refer to the function specific documentation below for usage guidelines.
<> 132:9baf128c2fab 5623 */
<> 132:9baf128c2fab 5624
<> 132:9baf128c2fab 5625 /**
<> 132:9baf128c2fab 5626 * @addtogroup inv_park
<> 132:9baf128c2fab 5627 * @{
<> 132:9baf128c2fab 5628 */
<> 132:9baf128c2fab 5629
<> 132:9baf128c2fab 5630 /**
<> 132:9baf128c2fab 5631 * @brief Floating-point Inverse Park transform
<> 132:9baf128c2fab 5632 * @param[in] Id input coordinate of rotor reference frame d
<> 132:9baf128c2fab 5633 * @param[in] Iq input coordinate of rotor reference frame q
<> 132:9baf128c2fab 5634 * @param[out] *pIalpha points to output two-phase orthogonal vector axis alpha
<> 132:9baf128c2fab 5635 * @param[out] *pIbeta points to output two-phase orthogonal vector axis beta
<> 132:9baf128c2fab 5636 * @param[in] sinVal sine value of rotation angle theta
<> 132:9baf128c2fab 5637 * @param[in] cosVal cosine value of rotation angle theta
<> 132:9baf128c2fab 5638 * @return none.
<> 132:9baf128c2fab 5639 */
<> 132:9baf128c2fab 5640
<> 132:9baf128c2fab 5641 static __INLINE void arm_inv_park_f32(
<> 132:9baf128c2fab 5642 float32_t Id,
<> 132:9baf128c2fab 5643 float32_t Iq,
<> 132:9baf128c2fab 5644 float32_t * pIalpha,
<> 132:9baf128c2fab 5645 float32_t * pIbeta,
<> 132:9baf128c2fab 5646 float32_t sinVal,
<> 132:9baf128c2fab 5647 float32_t cosVal)
<> 132:9baf128c2fab 5648 {
<> 132:9baf128c2fab 5649 /* Calculate pIalpha using the equation, pIalpha = Id * cosVal - Iq * sinVal */
<> 132:9baf128c2fab 5650 *pIalpha = Id * cosVal - Iq * sinVal;
<> 132:9baf128c2fab 5651
<> 132:9baf128c2fab 5652 /* Calculate pIbeta using the equation, pIbeta = Id * sinVal + Iq * cosVal */
<> 132:9baf128c2fab 5653 *pIbeta = Id * sinVal + Iq * cosVal;
<> 132:9baf128c2fab 5654
<> 132:9baf128c2fab 5655 }
<> 132:9baf128c2fab 5656
<> 132:9baf128c2fab 5657
<> 132:9baf128c2fab 5658 /**
<> 132:9baf128c2fab 5659 * @brief Inverse Park transform for Q31 version
<> 132:9baf128c2fab 5660 * @param[in] Id input coordinate of rotor reference frame d
<> 132:9baf128c2fab 5661 * @param[in] Iq input coordinate of rotor reference frame q
<> 132:9baf128c2fab 5662 * @param[out] *pIalpha points to output two-phase orthogonal vector axis alpha
<> 132:9baf128c2fab 5663 * @param[out] *pIbeta points to output two-phase orthogonal vector axis beta
<> 132:9baf128c2fab 5664 * @param[in] sinVal sine value of rotation angle theta
<> 132:9baf128c2fab 5665 * @param[in] cosVal cosine value of rotation angle theta
<> 132:9baf128c2fab 5666 * @return none.
<> 132:9baf128c2fab 5667 *
<> 132:9baf128c2fab 5668 * <b>Scaling and Overflow Behavior:</b>
<> 132:9baf128c2fab 5669 * \par
<> 132:9baf128c2fab 5670 * The function is implemented using an internal 32-bit accumulator.
<> 132:9baf128c2fab 5671 * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
<> 132:9baf128c2fab 5672 * There is saturation on the addition, hence there is no risk of overflow.
<> 132:9baf128c2fab 5673 */
<> 132:9baf128c2fab 5674
<> 132:9baf128c2fab 5675
<> 132:9baf128c2fab 5676 static __INLINE void arm_inv_park_q31(
<> 132:9baf128c2fab 5677 q31_t Id,
<> 132:9baf128c2fab 5678 q31_t Iq,
<> 132:9baf128c2fab 5679 q31_t * pIalpha,
<> 132:9baf128c2fab 5680 q31_t * pIbeta,
<> 132:9baf128c2fab 5681 q31_t sinVal,
<> 132:9baf128c2fab 5682 q31_t cosVal)
<> 132:9baf128c2fab 5683 {
<> 132:9baf128c2fab 5684 q31_t product1, product2; /* Temporary variables used to store intermediate results */
<> 132:9baf128c2fab 5685 q31_t product3, product4; /* Temporary variables used to store intermediate results */
<> 132:9baf128c2fab 5686
<> 132:9baf128c2fab 5687 /* Intermediate product is calculated by (Id * cosVal) */
<> 132:9baf128c2fab 5688 product1 = (q31_t) (((q63_t) (Id) * (cosVal)) >> 31);
<> 132:9baf128c2fab 5689
<> 132:9baf128c2fab 5690 /* Intermediate product is calculated by (Iq * sinVal) */
<> 132:9baf128c2fab 5691 product2 = (q31_t) (((q63_t) (Iq) * (sinVal)) >> 31);
<> 132:9baf128c2fab 5692
<> 132:9baf128c2fab 5693
<> 132:9baf128c2fab 5694 /* Intermediate product is calculated by (Id * sinVal) */
<> 132:9baf128c2fab 5695 product3 = (q31_t) (((q63_t) (Id) * (sinVal)) >> 31);
<> 132:9baf128c2fab 5696
<> 132:9baf128c2fab 5697 /* Intermediate product is calculated by (Iq * cosVal) */
<> 132:9baf128c2fab 5698 product4 = (q31_t) (((q63_t) (Iq) * (cosVal)) >> 31);
<> 132:9baf128c2fab 5699
<> 132:9baf128c2fab 5700 /* Calculate pIalpha by using the two intermediate products 1 and 2 */
<> 132:9baf128c2fab 5701 *pIalpha = __QSUB(product1, product2);
<> 132:9baf128c2fab 5702
<> 132:9baf128c2fab 5703 /* Calculate pIbeta by using the two intermediate products 3 and 4 */
<> 132:9baf128c2fab 5704 *pIbeta = __QADD(product4, product3);
<> 132:9baf128c2fab 5705
<> 132:9baf128c2fab 5706 }
<> 132:9baf128c2fab 5707
<> 132:9baf128c2fab 5708 /**
<> 132:9baf128c2fab 5709 * @} end of Inverse park group
<> 132:9baf128c2fab 5710 */
<> 132:9baf128c2fab 5711
<> 132:9baf128c2fab 5712
<> 132:9baf128c2fab 5713 /**
<> 132:9baf128c2fab 5714 * @brief Converts the elements of the Q31 vector to floating-point vector.
<> 132:9baf128c2fab 5715 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 5716 * @param[out] *pDst is output pointer
<> 132:9baf128c2fab 5717 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 5718 * @return none.
<> 132:9baf128c2fab 5719 */
<> 132:9baf128c2fab 5720 void arm_q31_to_float(
<> 132:9baf128c2fab 5721 q31_t * pSrc,
<> 132:9baf128c2fab 5722 float32_t * pDst,
<> 132:9baf128c2fab 5723 uint32_t blockSize);
<> 132:9baf128c2fab 5724
<> 132:9baf128c2fab 5725 /**
<> 132:9baf128c2fab 5726 * @ingroup groupInterpolation
<> 132:9baf128c2fab 5727 */
<> 132:9baf128c2fab 5728
<> 132:9baf128c2fab 5729 /**
<> 132:9baf128c2fab 5730 * @defgroup LinearInterpolate Linear Interpolation
<> 132:9baf128c2fab 5731 *
<> 132:9baf128c2fab 5732 * Linear interpolation is a method of curve fitting using linear polynomials.
<> 132:9baf128c2fab 5733 * Linear interpolation works by effectively drawing a straight line between two neighboring samples and returning the appropriate point along that line
<> 132:9baf128c2fab 5734 *
<> 132:9baf128c2fab 5735 * \par
<> 132:9baf128c2fab 5736 * \image html LinearInterp.gif "Linear interpolation"
<> 132:9baf128c2fab 5737 *
<> 132:9baf128c2fab 5738 * \par
<> 132:9baf128c2fab 5739 * A Linear Interpolate function calculates an output value(y), for the input(x)
<> 132:9baf128c2fab 5740 * using linear interpolation of the input values x0, x1( nearest input values) and the output values y0 and y1(nearest output values)
<> 132:9baf128c2fab 5741 *
<> 132:9baf128c2fab 5742 * \par Algorithm:
<> 132:9baf128c2fab 5743 * <pre>
<> 132:9baf128c2fab 5744 * y = y0 + (x - x0) * ((y1 - y0)/(x1-x0))
<> 132:9baf128c2fab 5745 * where x0, x1 are nearest values of input x
<> 132:9baf128c2fab 5746 * y0, y1 are nearest values to output y
<> 132:9baf128c2fab 5747 * </pre>
<> 132:9baf128c2fab 5748 *
<> 132:9baf128c2fab 5749 * \par
<> 132:9baf128c2fab 5750 * This set of functions implements Linear interpolation process
<> 132:9baf128c2fab 5751 * for Q7, Q15, Q31, and floating-point data types. The functions operate on a single
<> 132:9baf128c2fab 5752 * sample of data and each call to the function returns a single processed value.
<> 132:9baf128c2fab 5753 * <code>S</code> points to an instance of the Linear Interpolate function data structure.
<> 132:9baf128c2fab 5754 * <code>x</code> is the input sample value. The functions returns the output value.
<> 132:9baf128c2fab 5755 *
<> 132:9baf128c2fab 5756 * \par
<> 132:9baf128c2fab 5757 * if x is outside of the table boundary, Linear interpolation returns first value of the table
<> 132:9baf128c2fab 5758 * if x is below input range and returns last value of table if x is above range.
<> 132:9baf128c2fab 5759 */
<> 132:9baf128c2fab 5760
<> 132:9baf128c2fab 5761 /**
<> 132:9baf128c2fab 5762 * @addtogroup LinearInterpolate
<> 132:9baf128c2fab 5763 * @{
<> 132:9baf128c2fab 5764 */
<> 132:9baf128c2fab 5765
<> 132:9baf128c2fab 5766 /**
<> 132:9baf128c2fab 5767 * @brief Process function for the floating-point Linear Interpolation Function.
<> 132:9baf128c2fab 5768 * @param[in,out] *S is an instance of the floating-point Linear Interpolation structure
<> 132:9baf128c2fab 5769 * @param[in] x input sample to process
<> 132:9baf128c2fab 5770 * @return y processed output sample.
<> 132:9baf128c2fab 5771 *
<> 132:9baf128c2fab 5772 */
<> 132:9baf128c2fab 5773
<> 132:9baf128c2fab 5774 static __INLINE float32_t arm_linear_interp_f32(
<> 132:9baf128c2fab 5775 arm_linear_interp_instance_f32 * S,
<> 132:9baf128c2fab 5776 float32_t x)
<> 132:9baf128c2fab 5777 {
<> 132:9baf128c2fab 5778
<> 132:9baf128c2fab 5779 float32_t y;
<> 132:9baf128c2fab 5780 float32_t x0, x1; /* Nearest input values */
<> 132:9baf128c2fab 5781 float32_t y0, y1; /* Nearest output values */
<> 132:9baf128c2fab 5782 float32_t xSpacing = S->xSpacing; /* spacing between input values */
<> 132:9baf128c2fab 5783 int32_t i; /* Index variable */
<> 132:9baf128c2fab 5784 float32_t *pYData = S->pYData; /* pointer to output table */
<> 132:9baf128c2fab 5785
<> 132:9baf128c2fab 5786 /* Calculation of index */
<> 132:9baf128c2fab 5787 i = (int32_t) ((x - S->x1) / xSpacing);
<> 132:9baf128c2fab 5788
<> 132:9baf128c2fab 5789 if(i < 0)
<> 132:9baf128c2fab 5790 {
<> 132:9baf128c2fab 5791 /* Iniatilize output for below specified range as least output value of table */
<> 132:9baf128c2fab 5792 y = pYData[0];
<> 132:9baf128c2fab 5793 }
<> 132:9baf128c2fab 5794 else if((uint32_t)i >= S->nValues)
<> 132:9baf128c2fab 5795 {
<> 132:9baf128c2fab 5796 /* Iniatilize output for above specified range as last output value of table */
<> 132:9baf128c2fab 5797 y = pYData[S->nValues - 1];
<> 132:9baf128c2fab 5798 }
<> 132:9baf128c2fab 5799 else
<> 132:9baf128c2fab 5800 {
<> 132:9baf128c2fab 5801 /* Calculation of nearest input values */
<> 132:9baf128c2fab 5802 x0 = S->x1 + i * xSpacing;
<> 132:9baf128c2fab 5803 x1 = S->x1 + (i + 1) * xSpacing;
<> 132:9baf128c2fab 5804
<> 132:9baf128c2fab 5805 /* Read of nearest output values */
<> 132:9baf128c2fab 5806 y0 = pYData[i];
<> 132:9baf128c2fab 5807 y1 = pYData[i + 1];
<> 132:9baf128c2fab 5808
<> 132:9baf128c2fab 5809 /* Calculation of output */
<> 132:9baf128c2fab 5810 y = y0 + (x - x0) * ((y1 - y0) / (x1 - x0));
<> 132:9baf128c2fab 5811
<> 132:9baf128c2fab 5812 }
<> 132:9baf128c2fab 5813
<> 132:9baf128c2fab 5814 /* returns output value */
<> 132:9baf128c2fab 5815 return (y);
<> 132:9baf128c2fab 5816 }
<> 132:9baf128c2fab 5817
<> 132:9baf128c2fab 5818 /**
<> 132:9baf128c2fab 5819 *
<> 132:9baf128c2fab 5820 * @brief Process function for the Q31 Linear Interpolation Function.
<> 132:9baf128c2fab 5821 * @param[in] *pYData pointer to Q31 Linear Interpolation table
<> 132:9baf128c2fab 5822 * @param[in] x input sample to process
<> 132:9baf128c2fab 5823 * @param[in] nValues number of table values
<> 132:9baf128c2fab 5824 * @return y processed output sample.
<> 132:9baf128c2fab 5825 *
<> 132:9baf128c2fab 5826 * \par
<> 132:9baf128c2fab 5827 * Input sample <code>x</code> is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part.
<> 132:9baf128c2fab 5828 * This function can support maximum of table size 2^12.
<> 132:9baf128c2fab 5829 *
<> 132:9baf128c2fab 5830 */
<> 132:9baf128c2fab 5831
<> 132:9baf128c2fab 5832
<> 132:9baf128c2fab 5833 static __INLINE q31_t arm_linear_interp_q31(
<> 132:9baf128c2fab 5834 q31_t * pYData,
<> 132:9baf128c2fab 5835 q31_t x,
<> 132:9baf128c2fab 5836 uint32_t nValues)
<> 132:9baf128c2fab 5837 {
<> 132:9baf128c2fab 5838 q31_t y; /* output */
<> 132:9baf128c2fab 5839 q31_t y0, y1; /* Nearest output values */
<> 132:9baf128c2fab 5840 q31_t fract; /* fractional part */
<> 132:9baf128c2fab 5841 int32_t index; /* Index to read nearest output values */
<> 132:9baf128c2fab 5842
<> 132:9baf128c2fab 5843 /* Input is in 12.20 format */
<> 132:9baf128c2fab 5844 /* 12 bits for the table index */
<> 132:9baf128c2fab 5845 /* Index value calculation */
<> 132:9baf128c2fab 5846 index = ((x & 0xFFF00000) >> 20);
<> 132:9baf128c2fab 5847
<> 132:9baf128c2fab 5848 if(index >= (int32_t)(nValues - 1))
<> 132:9baf128c2fab 5849 {
<> 132:9baf128c2fab 5850 return (pYData[nValues - 1]);
<> 132:9baf128c2fab 5851 }
<> 132:9baf128c2fab 5852 else if(index < 0)
<> 132:9baf128c2fab 5853 {
<> 132:9baf128c2fab 5854 return (pYData[0]);
<> 132:9baf128c2fab 5855 }
<> 132:9baf128c2fab 5856 else
<> 132:9baf128c2fab 5857 {
<> 132:9baf128c2fab 5858
<> 132:9baf128c2fab 5859 /* 20 bits for the fractional part */
<> 132:9baf128c2fab 5860 /* shift left by 11 to keep fract in 1.31 format */
<> 132:9baf128c2fab 5861 fract = (x & 0x000FFFFF) << 11;
<> 132:9baf128c2fab 5862
<> 132:9baf128c2fab 5863 /* Read two nearest output values from the index in 1.31(q31) format */
<> 132:9baf128c2fab 5864 y0 = pYData[index];
<> 132:9baf128c2fab 5865 y1 = pYData[index + 1u];
<> 132:9baf128c2fab 5866
<> 132:9baf128c2fab 5867 /* Calculation of y0 * (1-fract) and y is in 2.30 format */
<> 132:9baf128c2fab 5868 y = ((q31_t) ((q63_t) y0 * (0x7FFFFFFF - fract) >> 32));
<> 132:9baf128c2fab 5869
<> 132:9baf128c2fab 5870 /* Calculation of y0 * (1-fract) + y1 *fract and y is in 2.30 format */
<> 132:9baf128c2fab 5871 y += ((q31_t) (((q63_t) y1 * fract) >> 32));
<> 132:9baf128c2fab 5872
<> 132:9baf128c2fab 5873 /* Convert y to 1.31 format */
<> 132:9baf128c2fab 5874 return (y << 1u);
<> 132:9baf128c2fab 5875
<> 132:9baf128c2fab 5876 }
<> 132:9baf128c2fab 5877
<> 132:9baf128c2fab 5878 }
<> 132:9baf128c2fab 5879
<> 132:9baf128c2fab 5880 /**
<> 132:9baf128c2fab 5881 *
<> 132:9baf128c2fab 5882 * @brief Process function for the Q15 Linear Interpolation Function.
<> 132:9baf128c2fab 5883 * @param[in] *pYData pointer to Q15 Linear Interpolation table
<> 132:9baf128c2fab 5884 * @param[in] x input sample to process
<> 132:9baf128c2fab 5885 * @param[in] nValues number of table values
<> 132:9baf128c2fab 5886 * @return y processed output sample.
<> 132:9baf128c2fab 5887 *
<> 132:9baf128c2fab 5888 * \par
<> 132:9baf128c2fab 5889 * Input sample <code>x</code> is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part.
<> 132:9baf128c2fab 5890 * This function can support maximum of table size 2^12.
<> 132:9baf128c2fab 5891 *
<> 132:9baf128c2fab 5892 */
<> 132:9baf128c2fab 5893
<> 132:9baf128c2fab 5894
<> 132:9baf128c2fab 5895 static __INLINE q15_t arm_linear_interp_q15(
<> 132:9baf128c2fab 5896 q15_t * pYData,
<> 132:9baf128c2fab 5897 q31_t x,
<> 132:9baf128c2fab 5898 uint32_t nValues)
<> 132:9baf128c2fab 5899 {
<> 132:9baf128c2fab 5900 q63_t y; /* output */
<> 132:9baf128c2fab 5901 q15_t y0, y1; /* Nearest output values */
<> 132:9baf128c2fab 5902 q31_t fract; /* fractional part */
<> 132:9baf128c2fab 5903 int32_t index; /* Index to read nearest output values */
<> 132:9baf128c2fab 5904
<> 132:9baf128c2fab 5905 /* Input is in 12.20 format */
<> 132:9baf128c2fab 5906 /* 12 bits for the table index */
<> 132:9baf128c2fab 5907 /* Index value calculation */
<> 132:9baf128c2fab 5908 index = ((x & 0xFFF00000) >> 20u);
<> 132:9baf128c2fab 5909
<> 132:9baf128c2fab 5910 if(index >= (int32_t)(nValues - 1))
<> 132:9baf128c2fab 5911 {
<> 132:9baf128c2fab 5912 return (pYData[nValues - 1]);
<> 132:9baf128c2fab 5913 }
<> 132:9baf128c2fab 5914 else if(index < 0)
<> 132:9baf128c2fab 5915 {
<> 132:9baf128c2fab 5916 return (pYData[0]);
<> 132:9baf128c2fab 5917 }
<> 132:9baf128c2fab 5918 else
<> 132:9baf128c2fab 5919 {
<> 132:9baf128c2fab 5920 /* 20 bits for the fractional part */
<> 132:9baf128c2fab 5921 /* fract is in 12.20 format */
<> 132:9baf128c2fab 5922 fract = (x & 0x000FFFFF);
<> 132:9baf128c2fab 5923
<> 132:9baf128c2fab 5924 /* Read two nearest output values from the index */
<> 132:9baf128c2fab 5925 y0 = pYData[index];
<> 132:9baf128c2fab 5926 y1 = pYData[index + 1u];
<> 132:9baf128c2fab 5927
<> 132:9baf128c2fab 5928 /* Calculation of y0 * (1-fract) and y is in 13.35 format */
<> 132:9baf128c2fab 5929 y = ((q63_t) y0 * (0xFFFFF - fract));
<> 132:9baf128c2fab 5930
<> 132:9baf128c2fab 5931 /* Calculation of (y0 * (1-fract) + y1 * fract) and y is in 13.35 format */
<> 132:9baf128c2fab 5932 y += ((q63_t) y1 * (fract));
<> 132:9baf128c2fab 5933
<> 132:9baf128c2fab 5934 /* convert y to 1.15 format */
<> 132:9baf128c2fab 5935 return (y >> 20);
<> 132:9baf128c2fab 5936 }
<> 132:9baf128c2fab 5937
<> 132:9baf128c2fab 5938
<> 132:9baf128c2fab 5939 }
<> 132:9baf128c2fab 5940
<> 132:9baf128c2fab 5941 /**
<> 132:9baf128c2fab 5942 *
<> 132:9baf128c2fab 5943 * @brief Process function for the Q7 Linear Interpolation Function.
<> 132:9baf128c2fab 5944 * @param[in] *pYData pointer to Q7 Linear Interpolation table
<> 132:9baf128c2fab 5945 * @param[in] x input sample to process
<> 132:9baf128c2fab 5946 * @param[in] nValues number of table values
<> 132:9baf128c2fab 5947 * @return y processed output sample.
<> 132:9baf128c2fab 5948 *
<> 132:9baf128c2fab 5949 * \par
<> 132:9baf128c2fab 5950 * Input sample <code>x</code> is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part.
<> 132:9baf128c2fab 5951 * This function can support maximum of table size 2^12.
<> 132:9baf128c2fab 5952 */
<> 132:9baf128c2fab 5953
<> 132:9baf128c2fab 5954
<> 132:9baf128c2fab 5955 static __INLINE q7_t arm_linear_interp_q7(
<> 132:9baf128c2fab 5956 q7_t * pYData,
<> 132:9baf128c2fab 5957 q31_t x,
<> 132:9baf128c2fab 5958 uint32_t nValues)
<> 132:9baf128c2fab 5959 {
<> 132:9baf128c2fab 5960 q31_t y; /* output */
<> 132:9baf128c2fab 5961 q7_t y0, y1; /* Nearest output values */
<> 132:9baf128c2fab 5962 q31_t fract; /* fractional part */
<> 132:9baf128c2fab 5963 uint32_t index; /* Index to read nearest output values */
<> 132:9baf128c2fab 5964
<> 132:9baf128c2fab 5965 /* Input is in 12.20 format */
<> 132:9baf128c2fab 5966 /* 12 bits for the table index */
<> 132:9baf128c2fab 5967 /* Index value calculation */
<> 132:9baf128c2fab 5968 if (x < 0)
<> 132:9baf128c2fab 5969 {
<> 132:9baf128c2fab 5970 return (pYData[0]);
<> 132:9baf128c2fab 5971 }
<> 132:9baf128c2fab 5972 index = (x >> 20) & 0xfff;
<> 132:9baf128c2fab 5973
<> 132:9baf128c2fab 5974
<> 132:9baf128c2fab 5975 if(index >= (nValues - 1))
<> 132:9baf128c2fab 5976 {
<> 132:9baf128c2fab 5977 return (pYData[nValues - 1]);
<> 132:9baf128c2fab 5978 }
<> 132:9baf128c2fab 5979 else
<> 132:9baf128c2fab 5980 {
<> 132:9baf128c2fab 5981
<> 132:9baf128c2fab 5982 /* 20 bits for the fractional part */
<> 132:9baf128c2fab 5983 /* fract is in 12.20 format */
<> 132:9baf128c2fab 5984 fract = (x & 0x000FFFFF);
<> 132:9baf128c2fab 5985
<> 132:9baf128c2fab 5986 /* Read two nearest output values from the index and are in 1.7(q7) format */
<> 132:9baf128c2fab 5987 y0 = pYData[index];
<> 132:9baf128c2fab 5988 y1 = pYData[index + 1u];
<> 132:9baf128c2fab 5989
<> 132:9baf128c2fab 5990 /* Calculation of y0 * (1-fract ) and y is in 13.27(q27) format */
<> 132:9baf128c2fab 5991 y = ((y0 * (0xFFFFF - fract)));
<> 132:9baf128c2fab 5992
<> 132:9baf128c2fab 5993 /* Calculation of y1 * fract + y0 * (1-fract) and y is in 13.27(q27) format */
<> 132:9baf128c2fab 5994 y += (y1 * fract);
<> 132:9baf128c2fab 5995
<> 132:9baf128c2fab 5996 /* convert y to 1.7(q7) format */
<> 132:9baf128c2fab 5997 return (y >> 20u);
<> 132:9baf128c2fab 5998
<> 132:9baf128c2fab 5999 }
<> 132:9baf128c2fab 6000
<> 132:9baf128c2fab 6001 }
<> 132:9baf128c2fab 6002 /**
<> 132:9baf128c2fab 6003 * @} end of LinearInterpolate group
<> 132:9baf128c2fab 6004 */
<> 132:9baf128c2fab 6005
<> 132:9baf128c2fab 6006 /**
<> 132:9baf128c2fab 6007 * @brief Fast approximation to the trigonometric sine function for floating-point data.
<> 132:9baf128c2fab 6008 * @param[in] x input value in radians.
<> 132:9baf128c2fab 6009 * @return sin(x).
<> 132:9baf128c2fab 6010 */
<> 132:9baf128c2fab 6011
<> 132:9baf128c2fab 6012 float32_t arm_sin_f32(
<> 132:9baf128c2fab 6013 float32_t x);
<> 132:9baf128c2fab 6014
<> 132:9baf128c2fab 6015 /**
<> 132:9baf128c2fab 6016 * @brief Fast approximation to the trigonometric sine function for Q31 data.
<> 132:9baf128c2fab 6017 * @param[in] x Scaled input value in radians.
<> 132:9baf128c2fab 6018 * @return sin(x).
<> 132:9baf128c2fab 6019 */
<> 132:9baf128c2fab 6020
<> 132:9baf128c2fab 6021 q31_t arm_sin_q31(
<> 132:9baf128c2fab 6022 q31_t x);
<> 132:9baf128c2fab 6023
<> 132:9baf128c2fab 6024 /**
<> 132:9baf128c2fab 6025 * @brief Fast approximation to the trigonometric sine function for Q15 data.
<> 132:9baf128c2fab 6026 * @param[in] x Scaled input value in radians.
<> 132:9baf128c2fab 6027 * @return sin(x).
<> 132:9baf128c2fab 6028 */
<> 132:9baf128c2fab 6029
<> 132:9baf128c2fab 6030 q15_t arm_sin_q15(
<> 132:9baf128c2fab 6031 q15_t x);
<> 132:9baf128c2fab 6032
<> 132:9baf128c2fab 6033 /**
<> 132:9baf128c2fab 6034 * @brief Fast approximation to the trigonometric cosine function for floating-point data.
<> 132:9baf128c2fab 6035 * @param[in] x input value in radians.
<> 132:9baf128c2fab 6036 * @return cos(x).
<> 132:9baf128c2fab 6037 */
<> 132:9baf128c2fab 6038
<> 132:9baf128c2fab 6039 float32_t arm_cos_f32(
<> 132:9baf128c2fab 6040 float32_t x);
<> 132:9baf128c2fab 6041
<> 132:9baf128c2fab 6042 /**
<> 132:9baf128c2fab 6043 * @brief Fast approximation to the trigonometric cosine function for Q31 data.
<> 132:9baf128c2fab 6044 * @param[in] x Scaled input value in radians.
<> 132:9baf128c2fab 6045 * @return cos(x).
<> 132:9baf128c2fab 6046 */
<> 132:9baf128c2fab 6047
<> 132:9baf128c2fab 6048 q31_t arm_cos_q31(
<> 132:9baf128c2fab 6049 q31_t x);
<> 132:9baf128c2fab 6050
<> 132:9baf128c2fab 6051 /**
<> 132:9baf128c2fab 6052 * @brief Fast approximation to the trigonometric cosine function for Q15 data.
<> 132:9baf128c2fab 6053 * @param[in] x Scaled input value in radians.
<> 132:9baf128c2fab 6054 * @return cos(x).
<> 132:9baf128c2fab 6055 */
<> 132:9baf128c2fab 6056
<> 132:9baf128c2fab 6057 q15_t arm_cos_q15(
<> 132:9baf128c2fab 6058 q15_t x);
<> 132:9baf128c2fab 6059
<> 132:9baf128c2fab 6060
<> 132:9baf128c2fab 6061 /**
<> 132:9baf128c2fab 6062 * @ingroup groupFastMath
<> 132:9baf128c2fab 6063 */
<> 132:9baf128c2fab 6064
<> 132:9baf128c2fab 6065
<> 132:9baf128c2fab 6066 /**
<> 132:9baf128c2fab 6067 * @defgroup SQRT Square Root
<> 132:9baf128c2fab 6068 *
<> 132:9baf128c2fab 6069 * Computes the square root of a number.
<> 132:9baf128c2fab 6070 * There are separate functions for Q15, Q31, and floating-point data types.
<> 132:9baf128c2fab 6071 * The square root function is computed using the Newton-Raphson algorithm.
<> 132:9baf128c2fab 6072 * This is an iterative algorithm of the form:
<> 132:9baf128c2fab 6073 * <pre>
<> 132:9baf128c2fab 6074 * x1 = x0 - f(x0)/f'(x0)
<> 132:9baf128c2fab 6075 * </pre>
<> 132:9baf128c2fab 6076 * where <code>x1</code> is the current estimate,
<> 132:9baf128c2fab 6077 * <code>x0</code> is the previous estimate, and
<> 132:9baf128c2fab 6078 * <code>f'(x0)</code> is the derivative of <code>f()</code> evaluated at <code>x0</code>.
<> 132:9baf128c2fab 6079 * For the square root function, the algorithm reduces to:
<> 132:9baf128c2fab 6080 * <pre>
<> 132:9baf128c2fab 6081 * x0 = in/2 [initial guess]
<> 132:9baf128c2fab 6082 * x1 = 1/2 * ( x0 + in / x0) [each iteration]
<> 132:9baf128c2fab 6083 * </pre>
<> 132:9baf128c2fab 6084 */
<> 132:9baf128c2fab 6085
<> 132:9baf128c2fab 6086
<> 132:9baf128c2fab 6087 /**
<> 132:9baf128c2fab 6088 * @addtogroup SQRT
<> 132:9baf128c2fab 6089 * @{
<> 132:9baf128c2fab 6090 */
<> 132:9baf128c2fab 6091
<> 132:9baf128c2fab 6092 /**
<> 132:9baf128c2fab 6093 * @brief Floating-point square root function.
<> 132:9baf128c2fab 6094 * @param[in] in input value.
<> 132:9baf128c2fab 6095 * @param[out] *pOut square root of input value.
<> 132:9baf128c2fab 6096 * @return The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUMENT_ERROR if
<> 132:9baf128c2fab 6097 * <code>in</code> is negative value and returns zero output for negative values.
<> 132:9baf128c2fab 6098 */
<> 132:9baf128c2fab 6099
<> 132:9baf128c2fab 6100 static __INLINE arm_status arm_sqrt_f32(
<> 132:9baf128c2fab 6101 float32_t in,
<> 132:9baf128c2fab 6102 float32_t * pOut)
<> 132:9baf128c2fab 6103 {
<> 132:9baf128c2fab 6104 if(in >= 0.0f)
<> 132:9baf128c2fab 6105 {
<> 132:9baf128c2fab 6106
<> 132:9baf128c2fab 6107 // #if __FPU_USED
<> 132:9baf128c2fab 6108 #if (__FPU_USED == 1) && defined ( __CC_ARM )
<> 132:9baf128c2fab 6109 *pOut = __sqrtf(in);
<> 132:9baf128c2fab 6110 #else
<> 132:9baf128c2fab 6111 *pOut = sqrtf(in);
<> 132:9baf128c2fab 6112 #endif
<> 132:9baf128c2fab 6113
<> 132:9baf128c2fab 6114 return (ARM_MATH_SUCCESS);
<> 132:9baf128c2fab 6115 }
<> 132:9baf128c2fab 6116 else
<> 132:9baf128c2fab 6117 {
<> 132:9baf128c2fab 6118 *pOut = 0.0f;
<> 132:9baf128c2fab 6119 return (ARM_MATH_ARGUMENT_ERROR);
<> 132:9baf128c2fab 6120 }
<> 132:9baf128c2fab 6121
<> 132:9baf128c2fab 6122 }
<> 132:9baf128c2fab 6123
<> 132:9baf128c2fab 6124
<> 132:9baf128c2fab 6125 /**
<> 132:9baf128c2fab 6126 * @brief Q31 square root function.
<> 132:9baf128c2fab 6127 * @param[in] in input value. The range of the input value is [0 +1) or 0x00000000 to 0x7FFFFFFF.
<> 132:9baf128c2fab 6128 * @param[out] *pOut square root of input value.
<> 132:9baf128c2fab 6129 * @return The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUMENT_ERROR if
<> 132:9baf128c2fab 6130 * <code>in</code> is negative value and returns zero output for negative values.
<> 132:9baf128c2fab 6131 */
<> 132:9baf128c2fab 6132 arm_status arm_sqrt_q31(
<> 132:9baf128c2fab 6133 q31_t in,
<> 132:9baf128c2fab 6134 q31_t * pOut);
<> 132:9baf128c2fab 6135
<> 132:9baf128c2fab 6136 /**
<> 132:9baf128c2fab 6137 * @brief Q15 square root function.
<> 132:9baf128c2fab 6138 * @param[in] in input value. The range of the input value is [0 +1) or 0x0000 to 0x7FFF.
<> 132:9baf128c2fab 6139 * @param[out] *pOut square root of input value.
<> 132:9baf128c2fab 6140 * @return The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUMENT_ERROR if
<> 132:9baf128c2fab 6141 * <code>in</code> is negative value and returns zero output for negative values.
<> 132:9baf128c2fab 6142 */
<> 132:9baf128c2fab 6143 arm_status arm_sqrt_q15(
<> 132:9baf128c2fab 6144 q15_t in,
<> 132:9baf128c2fab 6145 q15_t * pOut);
<> 132:9baf128c2fab 6146
<> 132:9baf128c2fab 6147 /**
<> 132:9baf128c2fab 6148 * @} end of SQRT group
<> 132:9baf128c2fab 6149 */
<> 132:9baf128c2fab 6150
<> 132:9baf128c2fab 6151
<> 132:9baf128c2fab 6152
<> 132:9baf128c2fab 6153
<> 132:9baf128c2fab 6154
<> 132:9baf128c2fab 6155
<> 132:9baf128c2fab 6156 /**
<> 132:9baf128c2fab 6157 * @brief floating-point Circular write function.
<> 132:9baf128c2fab 6158 */
<> 132:9baf128c2fab 6159
<> 132:9baf128c2fab 6160 static __INLINE void arm_circularWrite_f32(
<> 132:9baf128c2fab 6161 int32_t * circBuffer,
<> 132:9baf128c2fab 6162 int32_t L,
<> 132:9baf128c2fab 6163 uint16_t * writeOffset,
<> 132:9baf128c2fab 6164 int32_t bufferInc,
<> 132:9baf128c2fab 6165 const int32_t * src,
<> 132:9baf128c2fab 6166 int32_t srcInc,
<> 132:9baf128c2fab 6167 uint32_t blockSize)
<> 132:9baf128c2fab 6168 {
<> 132:9baf128c2fab 6169 uint32_t i = 0u;
<> 132:9baf128c2fab 6170 int32_t wOffset;
<> 132:9baf128c2fab 6171
<> 132:9baf128c2fab 6172 /* Copy the value of Index pointer that points
<> 132:9baf128c2fab 6173 * to the current location where the input samples to be copied */
<> 132:9baf128c2fab 6174 wOffset = *writeOffset;
<> 132:9baf128c2fab 6175
<> 132:9baf128c2fab 6176 /* Loop over the blockSize */
<> 132:9baf128c2fab 6177 i = blockSize;
<> 132:9baf128c2fab 6178
<> 132:9baf128c2fab 6179 while(i > 0u)
<> 132:9baf128c2fab 6180 {
<> 132:9baf128c2fab 6181 /* copy the input sample to the circular buffer */
<> 132:9baf128c2fab 6182 circBuffer[wOffset] = *src;
<> 132:9baf128c2fab 6183
<> 132:9baf128c2fab 6184 /* Update the input pointer */
<> 132:9baf128c2fab 6185 src += srcInc;
<> 132:9baf128c2fab 6186
<> 132:9baf128c2fab 6187 /* Circularly update wOffset. Watch out for positive and negative value */
<> 132:9baf128c2fab 6188 wOffset += bufferInc;
<> 132:9baf128c2fab 6189 if(wOffset >= L)
<> 132:9baf128c2fab 6190 wOffset -= L;
<> 132:9baf128c2fab 6191
<> 132:9baf128c2fab 6192 /* Decrement the loop counter */
<> 132:9baf128c2fab 6193 i--;
<> 132:9baf128c2fab 6194 }
<> 132:9baf128c2fab 6195
<> 132:9baf128c2fab 6196 /* Update the index pointer */
<> 132:9baf128c2fab 6197 *writeOffset = wOffset;
<> 132:9baf128c2fab 6198 }
<> 132:9baf128c2fab 6199
<> 132:9baf128c2fab 6200
<> 132:9baf128c2fab 6201
<> 132:9baf128c2fab 6202 /**
<> 132:9baf128c2fab 6203 * @brief floating-point Circular Read function.
<> 132:9baf128c2fab 6204 */
<> 132:9baf128c2fab 6205 static __INLINE void arm_circularRead_f32(
<> 132:9baf128c2fab 6206 int32_t * circBuffer,
<> 132:9baf128c2fab 6207 int32_t L,
<> 132:9baf128c2fab 6208 int32_t * readOffset,
<> 132:9baf128c2fab 6209 int32_t bufferInc,
<> 132:9baf128c2fab 6210 int32_t * dst,
<> 132:9baf128c2fab 6211 int32_t * dst_base,
<> 132:9baf128c2fab 6212 int32_t dst_length,
<> 132:9baf128c2fab 6213 int32_t dstInc,
<> 132:9baf128c2fab 6214 uint32_t blockSize)
<> 132:9baf128c2fab 6215 {
<> 132:9baf128c2fab 6216 uint32_t i = 0u;
<> 132:9baf128c2fab 6217 int32_t rOffset, dst_end;
<> 132:9baf128c2fab 6218
<> 132:9baf128c2fab 6219 /* Copy the value of Index pointer that points
<> 132:9baf128c2fab 6220 * to the current location from where the input samples to be read */
<> 132:9baf128c2fab 6221 rOffset = *readOffset;
<> 132:9baf128c2fab 6222 dst_end = (int32_t) (dst_base + dst_length);
<> 132:9baf128c2fab 6223
<> 132:9baf128c2fab 6224 /* Loop over the blockSize */
<> 132:9baf128c2fab 6225 i = blockSize;
<> 132:9baf128c2fab 6226
<> 132:9baf128c2fab 6227 while(i > 0u)
<> 132:9baf128c2fab 6228 {
<> 132:9baf128c2fab 6229 /* copy the sample from the circular buffer to the destination buffer */
<> 132:9baf128c2fab 6230 *dst = circBuffer[rOffset];
<> 132:9baf128c2fab 6231
<> 132:9baf128c2fab 6232 /* Update the input pointer */
<> 132:9baf128c2fab 6233 dst += dstInc;
<> 132:9baf128c2fab 6234
<> 132:9baf128c2fab 6235 if(dst == (int32_t *) dst_end)
<> 132:9baf128c2fab 6236 {
<> 132:9baf128c2fab 6237 dst = dst_base;
<> 132:9baf128c2fab 6238 }
<> 132:9baf128c2fab 6239
<> 132:9baf128c2fab 6240 /* Circularly update rOffset. Watch out for positive and negative value */
<> 132:9baf128c2fab 6241 rOffset += bufferInc;
<> 132:9baf128c2fab 6242
<> 132:9baf128c2fab 6243 if(rOffset >= L)
<> 132:9baf128c2fab 6244 {
<> 132:9baf128c2fab 6245 rOffset -= L;
<> 132:9baf128c2fab 6246 }
<> 132:9baf128c2fab 6247
<> 132:9baf128c2fab 6248 /* Decrement the loop counter */
<> 132:9baf128c2fab 6249 i--;
<> 132:9baf128c2fab 6250 }
<> 132:9baf128c2fab 6251
<> 132:9baf128c2fab 6252 /* Update the index pointer */
<> 132:9baf128c2fab 6253 *readOffset = rOffset;
<> 132:9baf128c2fab 6254 }
<> 132:9baf128c2fab 6255
<> 132:9baf128c2fab 6256 /**
<> 132:9baf128c2fab 6257 * @brief Q15 Circular write function.
<> 132:9baf128c2fab 6258 */
<> 132:9baf128c2fab 6259
<> 132:9baf128c2fab 6260 static __INLINE void arm_circularWrite_q15(
<> 132:9baf128c2fab 6261 q15_t * circBuffer,
<> 132:9baf128c2fab 6262 int32_t L,
<> 132:9baf128c2fab 6263 uint16_t * writeOffset,
<> 132:9baf128c2fab 6264 int32_t bufferInc,
<> 132:9baf128c2fab 6265 const q15_t * src,
<> 132:9baf128c2fab 6266 int32_t srcInc,
<> 132:9baf128c2fab 6267 uint32_t blockSize)
<> 132:9baf128c2fab 6268 {
<> 132:9baf128c2fab 6269 uint32_t i = 0u;
<> 132:9baf128c2fab 6270 int32_t wOffset;
<> 132:9baf128c2fab 6271
<> 132:9baf128c2fab 6272 /* Copy the value of Index pointer that points
<> 132:9baf128c2fab 6273 * to the current location where the input samples to be copied */
<> 132:9baf128c2fab 6274 wOffset = *writeOffset;
<> 132:9baf128c2fab 6275
<> 132:9baf128c2fab 6276 /* Loop over the blockSize */
<> 132:9baf128c2fab 6277 i = blockSize;
<> 132:9baf128c2fab 6278
<> 132:9baf128c2fab 6279 while(i > 0u)
<> 132:9baf128c2fab 6280 {
<> 132:9baf128c2fab 6281 /* copy the input sample to the circular buffer */
<> 132:9baf128c2fab 6282 circBuffer[wOffset] = *src;
<> 132:9baf128c2fab 6283
<> 132:9baf128c2fab 6284 /* Update the input pointer */
<> 132:9baf128c2fab 6285 src += srcInc;
<> 132:9baf128c2fab 6286
<> 132:9baf128c2fab 6287 /* Circularly update wOffset. Watch out for positive and negative value */
<> 132:9baf128c2fab 6288 wOffset += bufferInc;
<> 132:9baf128c2fab 6289 if(wOffset >= L)
<> 132:9baf128c2fab 6290 wOffset -= L;
<> 132:9baf128c2fab 6291
<> 132:9baf128c2fab 6292 /* Decrement the loop counter */
<> 132:9baf128c2fab 6293 i--;
<> 132:9baf128c2fab 6294 }
<> 132:9baf128c2fab 6295
<> 132:9baf128c2fab 6296 /* Update the index pointer */
<> 132:9baf128c2fab 6297 *writeOffset = wOffset;
<> 132:9baf128c2fab 6298 }
<> 132:9baf128c2fab 6299
<> 132:9baf128c2fab 6300
<> 132:9baf128c2fab 6301
<> 132:9baf128c2fab 6302 /**
<> 132:9baf128c2fab 6303 * @brief Q15 Circular Read function.
<> 132:9baf128c2fab 6304 */
<> 132:9baf128c2fab 6305 static __INLINE void arm_circularRead_q15(
<> 132:9baf128c2fab 6306 q15_t * circBuffer,
<> 132:9baf128c2fab 6307 int32_t L,
<> 132:9baf128c2fab 6308 int32_t * readOffset,
<> 132:9baf128c2fab 6309 int32_t bufferInc,
<> 132:9baf128c2fab 6310 q15_t * dst,
<> 132:9baf128c2fab 6311 q15_t * dst_base,
<> 132:9baf128c2fab 6312 int32_t dst_length,
<> 132:9baf128c2fab 6313 int32_t dstInc,
<> 132:9baf128c2fab 6314 uint32_t blockSize)
<> 132:9baf128c2fab 6315 {
<> 132:9baf128c2fab 6316 uint32_t i = 0;
<> 132:9baf128c2fab 6317 int32_t rOffset, dst_end;
<> 132:9baf128c2fab 6318
<> 132:9baf128c2fab 6319 /* Copy the value of Index pointer that points
<> 132:9baf128c2fab 6320 * to the current location from where the input samples to be read */
<> 132:9baf128c2fab 6321 rOffset = *readOffset;
<> 132:9baf128c2fab 6322
<> 132:9baf128c2fab 6323 dst_end = (int32_t) (dst_base + dst_length);
<> 132:9baf128c2fab 6324
<> 132:9baf128c2fab 6325 /* Loop over the blockSize */
<> 132:9baf128c2fab 6326 i = blockSize;
<> 132:9baf128c2fab 6327
<> 132:9baf128c2fab 6328 while(i > 0u)
<> 132:9baf128c2fab 6329 {
<> 132:9baf128c2fab 6330 /* copy the sample from the circular buffer to the destination buffer */
<> 132:9baf128c2fab 6331 *dst = circBuffer[rOffset];
<> 132:9baf128c2fab 6332
<> 132:9baf128c2fab 6333 /* Update the input pointer */
<> 132:9baf128c2fab 6334 dst += dstInc;
<> 132:9baf128c2fab 6335
<> 132:9baf128c2fab 6336 if(dst == (q15_t *) dst_end)
<> 132:9baf128c2fab 6337 {
<> 132:9baf128c2fab 6338 dst = dst_base;
<> 132:9baf128c2fab 6339 }
<> 132:9baf128c2fab 6340
<> 132:9baf128c2fab 6341 /* Circularly update wOffset. Watch out for positive and negative value */
<> 132:9baf128c2fab 6342 rOffset += bufferInc;
<> 132:9baf128c2fab 6343
<> 132:9baf128c2fab 6344 if(rOffset >= L)
<> 132:9baf128c2fab 6345 {
<> 132:9baf128c2fab 6346 rOffset -= L;
<> 132:9baf128c2fab 6347 }
<> 132:9baf128c2fab 6348
<> 132:9baf128c2fab 6349 /* Decrement the loop counter */
<> 132:9baf128c2fab 6350 i--;
<> 132:9baf128c2fab 6351 }
<> 132:9baf128c2fab 6352
<> 132:9baf128c2fab 6353 /* Update the index pointer */
<> 132:9baf128c2fab 6354 *readOffset = rOffset;
<> 132:9baf128c2fab 6355 }
<> 132:9baf128c2fab 6356
<> 132:9baf128c2fab 6357
<> 132:9baf128c2fab 6358 /**
<> 132:9baf128c2fab 6359 * @brief Q7 Circular write function.
<> 132:9baf128c2fab 6360 */
<> 132:9baf128c2fab 6361
<> 132:9baf128c2fab 6362 static __INLINE void arm_circularWrite_q7(
<> 132:9baf128c2fab 6363 q7_t * circBuffer,
<> 132:9baf128c2fab 6364 int32_t L,
<> 132:9baf128c2fab 6365 uint16_t * writeOffset,
<> 132:9baf128c2fab 6366 int32_t bufferInc,
<> 132:9baf128c2fab 6367 const q7_t * src,
<> 132:9baf128c2fab 6368 int32_t srcInc,
<> 132:9baf128c2fab 6369 uint32_t blockSize)
<> 132:9baf128c2fab 6370 {
<> 132:9baf128c2fab 6371 uint32_t i = 0u;
<> 132:9baf128c2fab 6372 int32_t wOffset;
<> 132:9baf128c2fab 6373
<> 132:9baf128c2fab 6374 /* Copy the value of Index pointer that points
<> 132:9baf128c2fab 6375 * to the current location where the input samples to be copied */
<> 132:9baf128c2fab 6376 wOffset = *writeOffset;
<> 132:9baf128c2fab 6377
<> 132:9baf128c2fab 6378 /* Loop over the blockSize */
<> 132:9baf128c2fab 6379 i = blockSize;
<> 132:9baf128c2fab 6380
<> 132:9baf128c2fab 6381 while(i > 0u)
<> 132:9baf128c2fab 6382 {
<> 132:9baf128c2fab 6383 /* copy the input sample to the circular buffer */
<> 132:9baf128c2fab 6384 circBuffer[wOffset] = *src;
<> 132:9baf128c2fab 6385
<> 132:9baf128c2fab 6386 /* Update the input pointer */
<> 132:9baf128c2fab 6387 src += srcInc;
<> 132:9baf128c2fab 6388
<> 132:9baf128c2fab 6389 /* Circularly update wOffset. Watch out for positive and negative value */
<> 132:9baf128c2fab 6390 wOffset += bufferInc;
<> 132:9baf128c2fab 6391 if(wOffset >= L)
<> 132:9baf128c2fab 6392 wOffset -= L;
<> 132:9baf128c2fab 6393
<> 132:9baf128c2fab 6394 /* Decrement the loop counter */
<> 132:9baf128c2fab 6395 i--;
<> 132:9baf128c2fab 6396 }
<> 132:9baf128c2fab 6397
<> 132:9baf128c2fab 6398 /* Update the index pointer */
<> 132:9baf128c2fab 6399 *writeOffset = wOffset;
<> 132:9baf128c2fab 6400 }
<> 132:9baf128c2fab 6401
<> 132:9baf128c2fab 6402
<> 132:9baf128c2fab 6403
<> 132:9baf128c2fab 6404 /**
<> 132:9baf128c2fab 6405 * @brief Q7 Circular Read function.
<> 132:9baf128c2fab 6406 */
<> 132:9baf128c2fab 6407 static __INLINE void arm_circularRead_q7(
<> 132:9baf128c2fab 6408 q7_t * circBuffer,
<> 132:9baf128c2fab 6409 int32_t L,
<> 132:9baf128c2fab 6410 int32_t * readOffset,
<> 132:9baf128c2fab 6411 int32_t bufferInc,
<> 132:9baf128c2fab 6412 q7_t * dst,
<> 132:9baf128c2fab 6413 q7_t * dst_base,
<> 132:9baf128c2fab 6414 int32_t dst_length,
<> 132:9baf128c2fab 6415 int32_t dstInc,
<> 132:9baf128c2fab 6416 uint32_t blockSize)
<> 132:9baf128c2fab 6417 {
<> 132:9baf128c2fab 6418 uint32_t i = 0;
<> 132:9baf128c2fab 6419 int32_t rOffset, dst_end;
<> 132:9baf128c2fab 6420
<> 132:9baf128c2fab 6421 /* Copy the value of Index pointer that points
<> 132:9baf128c2fab 6422 * to the current location from where the input samples to be read */
<> 132:9baf128c2fab 6423 rOffset = *readOffset;
<> 132:9baf128c2fab 6424
<> 132:9baf128c2fab 6425 dst_end = (int32_t) (dst_base + dst_length);
<> 132:9baf128c2fab 6426
<> 132:9baf128c2fab 6427 /* Loop over the blockSize */
<> 132:9baf128c2fab 6428 i = blockSize;
<> 132:9baf128c2fab 6429
<> 132:9baf128c2fab 6430 while(i > 0u)
<> 132:9baf128c2fab 6431 {
<> 132:9baf128c2fab 6432 /* copy the sample from the circular buffer to the destination buffer */
<> 132:9baf128c2fab 6433 *dst = circBuffer[rOffset];
<> 132:9baf128c2fab 6434
<> 132:9baf128c2fab 6435 /* Update the input pointer */
<> 132:9baf128c2fab 6436 dst += dstInc;
<> 132:9baf128c2fab 6437
<> 132:9baf128c2fab 6438 if(dst == (q7_t *) dst_end)
<> 132:9baf128c2fab 6439 {
<> 132:9baf128c2fab 6440 dst = dst_base;
<> 132:9baf128c2fab 6441 }
<> 132:9baf128c2fab 6442
<> 132:9baf128c2fab 6443 /* Circularly update rOffset. Watch out for positive and negative value */
<> 132:9baf128c2fab 6444 rOffset += bufferInc;
<> 132:9baf128c2fab 6445
<> 132:9baf128c2fab 6446 if(rOffset >= L)
<> 132:9baf128c2fab 6447 {
<> 132:9baf128c2fab 6448 rOffset -= L;
<> 132:9baf128c2fab 6449 }
<> 132:9baf128c2fab 6450
<> 132:9baf128c2fab 6451 /* Decrement the loop counter */
<> 132:9baf128c2fab 6452 i--;
<> 132:9baf128c2fab 6453 }
<> 132:9baf128c2fab 6454
<> 132:9baf128c2fab 6455 /* Update the index pointer */
<> 132:9baf128c2fab 6456 *readOffset = rOffset;
<> 132:9baf128c2fab 6457 }
<> 132:9baf128c2fab 6458
<> 132:9baf128c2fab 6459
<> 132:9baf128c2fab 6460 /**
<> 132:9baf128c2fab 6461 * @brief Sum of the squares of the elements of a Q31 vector.
<> 132:9baf128c2fab 6462 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6463 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6464 * @param[out] *pResult is output value.
<> 132:9baf128c2fab 6465 * @return none.
<> 132:9baf128c2fab 6466 */
<> 132:9baf128c2fab 6467
<> 132:9baf128c2fab 6468 void arm_power_q31(
<> 132:9baf128c2fab 6469 q31_t * pSrc,
<> 132:9baf128c2fab 6470 uint32_t blockSize,
<> 132:9baf128c2fab 6471 q63_t * pResult);
<> 132:9baf128c2fab 6472
<> 132:9baf128c2fab 6473 /**
<> 132:9baf128c2fab 6474 * @brief Sum of the squares of the elements of a floating-point vector.
<> 132:9baf128c2fab 6475 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6476 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6477 * @param[out] *pResult is output value.
<> 132:9baf128c2fab 6478 * @return none.
<> 132:9baf128c2fab 6479 */
<> 132:9baf128c2fab 6480
<> 132:9baf128c2fab 6481 void arm_power_f32(
<> 132:9baf128c2fab 6482 float32_t * pSrc,
<> 132:9baf128c2fab 6483 uint32_t blockSize,
<> 132:9baf128c2fab 6484 float32_t * pResult);
<> 132:9baf128c2fab 6485
<> 132:9baf128c2fab 6486 /**
<> 132:9baf128c2fab 6487 * @brief Sum of the squares of the elements of a Q15 vector.
<> 132:9baf128c2fab 6488 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6489 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6490 * @param[out] *pResult is output value.
<> 132:9baf128c2fab 6491 * @return none.
<> 132:9baf128c2fab 6492 */
<> 132:9baf128c2fab 6493
<> 132:9baf128c2fab 6494 void arm_power_q15(
<> 132:9baf128c2fab 6495 q15_t * pSrc,
<> 132:9baf128c2fab 6496 uint32_t blockSize,
<> 132:9baf128c2fab 6497 q63_t * pResult);
<> 132:9baf128c2fab 6498
<> 132:9baf128c2fab 6499 /**
<> 132:9baf128c2fab 6500 * @brief Sum of the squares of the elements of a Q7 vector.
<> 132:9baf128c2fab 6501 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6502 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6503 * @param[out] *pResult is output value.
<> 132:9baf128c2fab 6504 * @return none.
<> 132:9baf128c2fab 6505 */
<> 132:9baf128c2fab 6506
<> 132:9baf128c2fab 6507 void arm_power_q7(
<> 132:9baf128c2fab 6508 q7_t * pSrc,
<> 132:9baf128c2fab 6509 uint32_t blockSize,
<> 132:9baf128c2fab 6510 q31_t * pResult);
<> 132:9baf128c2fab 6511
<> 132:9baf128c2fab 6512 /**
<> 132:9baf128c2fab 6513 * @brief Mean value of a Q7 vector.
<> 132:9baf128c2fab 6514 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6515 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6516 * @param[out] *pResult is output value.
<> 132:9baf128c2fab 6517 * @return none.
<> 132:9baf128c2fab 6518 */
<> 132:9baf128c2fab 6519
<> 132:9baf128c2fab 6520 void arm_mean_q7(
<> 132:9baf128c2fab 6521 q7_t * pSrc,
<> 132:9baf128c2fab 6522 uint32_t blockSize,
<> 132:9baf128c2fab 6523 q7_t * pResult);
<> 132:9baf128c2fab 6524
<> 132:9baf128c2fab 6525 /**
<> 132:9baf128c2fab 6526 * @brief Mean value of a Q15 vector.
<> 132:9baf128c2fab 6527 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6528 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6529 * @param[out] *pResult is output value.
<> 132:9baf128c2fab 6530 * @return none.
<> 132:9baf128c2fab 6531 */
<> 132:9baf128c2fab 6532 void arm_mean_q15(
<> 132:9baf128c2fab 6533 q15_t * pSrc,
<> 132:9baf128c2fab 6534 uint32_t blockSize,
<> 132:9baf128c2fab 6535 q15_t * pResult);
<> 132:9baf128c2fab 6536
<> 132:9baf128c2fab 6537 /**
<> 132:9baf128c2fab 6538 * @brief Mean value of a Q31 vector.
<> 132:9baf128c2fab 6539 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6540 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6541 * @param[out] *pResult is output value.
<> 132:9baf128c2fab 6542 * @return none.
<> 132:9baf128c2fab 6543 */
<> 132:9baf128c2fab 6544 void arm_mean_q31(
<> 132:9baf128c2fab 6545 q31_t * pSrc,
<> 132:9baf128c2fab 6546 uint32_t blockSize,
<> 132:9baf128c2fab 6547 q31_t * pResult);
<> 132:9baf128c2fab 6548
<> 132:9baf128c2fab 6549 /**
<> 132:9baf128c2fab 6550 * @brief Mean value of a floating-point vector.
<> 132:9baf128c2fab 6551 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6552 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6553 * @param[out] *pResult is output value.
<> 132:9baf128c2fab 6554 * @return none.
<> 132:9baf128c2fab 6555 */
<> 132:9baf128c2fab 6556 void arm_mean_f32(
<> 132:9baf128c2fab 6557 float32_t * pSrc,
<> 132:9baf128c2fab 6558 uint32_t blockSize,
<> 132:9baf128c2fab 6559 float32_t * pResult);
<> 132:9baf128c2fab 6560
<> 132:9baf128c2fab 6561 /**
<> 132:9baf128c2fab 6562 * @brief Variance of the elements of a floating-point vector.
<> 132:9baf128c2fab 6563 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6564 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6565 * @param[out] *pResult is output value.
<> 132:9baf128c2fab 6566 * @return none.
<> 132:9baf128c2fab 6567 */
<> 132:9baf128c2fab 6568
<> 132:9baf128c2fab 6569 void arm_var_f32(
<> 132:9baf128c2fab 6570 float32_t * pSrc,
<> 132:9baf128c2fab 6571 uint32_t blockSize,
<> 132:9baf128c2fab 6572 float32_t * pResult);
<> 132:9baf128c2fab 6573
<> 132:9baf128c2fab 6574 /**
<> 132:9baf128c2fab 6575 * @brief Variance of the elements of a Q31 vector.
<> 132:9baf128c2fab 6576 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6577 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6578 * @param[out] *pResult is output value.
<> 132:9baf128c2fab 6579 * @return none.
<> 132:9baf128c2fab 6580 */
<> 132:9baf128c2fab 6581
<> 132:9baf128c2fab 6582 void arm_var_q31(
<> 132:9baf128c2fab 6583 q31_t * pSrc,
<> 132:9baf128c2fab 6584 uint32_t blockSize,
<> 132:9baf128c2fab 6585 q31_t * pResult);
<> 132:9baf128c2fab 6586
<> 132:9baf128c2fab 6587 /**
<> 132:9baf128c2fab 6588 * @brief Variance of the elements of a Q15 vector.
<> 132:9baf128c2fab 6589 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6590 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6591 * @param[out] *pResult is output value.
<> 132:9baf128c2fab 6592 * @return none.
<> 132:9baf128c2fab 6593 */
<> 132:9baf128c2fab 6594
<> 132:9baf128c2fab 6595 void arm_var_q15(
<> 132:9baf128c2fab 6596 q15_t * pSrc,
<> 132:9baf128c2fab 6597 uint32_t blockSize,
<> 132:9baf128c2fab 6598 q15_t * pResult);
<> 132:9baf128c2fab 6599
<> 132:9baf128c2fab 6600 /**
<> 132:9baf128c2fab 6601 * @brief Root Mean Square of the elements of a floating-point vector.
<> 132:9baf128c2fab 6602 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6603 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6604 * @param[out] *pResult is output value.
<> 132:9baf128c2fab 6605 * @return none.
<> 132:9baf128c2fab 6606 */
<> 132:9baf128c2fab 6607
<> 132:9baf128c2fab 6608 void arm_rms_f32(
<> 132:9baf128c2fab 6609 float32_t * pSrc,
<> 132:9baf128c2fab 6610 uint32_t blockSize,
<> 132:9baf128c2fab 6611 float32_t * pResult);
<> 132:9baf128c2fab 6612
<> 132:9baf128c2fab 6613 /**
<> 132:9baf128c2fab 6614 * @brief Root Mean Square of the elements of a Q31 vector.
<> 132:9baf128c2fab 6615 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6616 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6617 * @param[out] *pResult is output value.
<> 132:9baf128c2fab 6618 * @return none.
<> 132:9baf128c2fab 6619 */
<> 132:9baf128c2fab 6620
<> 132:9baf128c2fab 6621 void arm_rms_q31(
<> 132:9baf128c2fab 6622 q31_t * pSrc,
<> 132:9baf128c2fab 6623 uint32_t blockSize,
<> 132:9baf128c2fab 6624 q31_t * pResult);
<> 132:9baf128c2fab 6625
<> 132:9baf128c2fab 6626 /**
<> 132:9baf128c2fab 6627 * @brief Root Mean Square of the elements of a Q15 vector.
<> 132:9baf128c2fab 6628 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6629 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6630 * @param[out] *pResult is output value.
<> 132:9baf128c2fab 6631 * @return none.
<> 132:9baf128c2fab 6632 */
<> 132:9baf128c2fab 6633
<> 132:9baf128c2fab 6634 void arm_rms_q15(
<> 132:9baf128c2fab 6635 q15_t * pSrc,
<> 132:9baf128c2fab 6636 uint32_t blockSize,
<> 132:9baf128c2fab 6637 q15_t * pResult);
<> 132:9baf128c2fab 6638
<> 132:9baf128c2fab 6639 /**
<> 132:9baf128c2fab 6640 * @brief Standard deviation of the elements of a floating-point vector.
<> 132:9baf128c2fab 6641 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6642 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6643 * @param[out] *pResult is output value.
<> 132:9baf128c2fab 6644 * @return none.
<> 132:9baf128c2fab 6645 */
<> 132:9baf128c2fab 6646
<> 132:9baf128c2fab 6647 void arm_std_f32(
<> 132:9baf128c2fab 6648 float32_t * pSrc,
<> 132:9baf128c2fab 6649 uint32_t blockSize,
<> 132:9baf128c2fab 6650 float32_t * pResult);
<> 132:9baf128c2fab 6651
<> 132:9baf128c2fab 6652 /**
<> 132:9baf128c2fab 6653 * @brief Standard deviation of the elements of a Q31 vector.
<> 132:9baf128c2fab 6654 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6655 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6656 * @param[out] *pResult is output value.
<> 132:9baf128c2fab 6657 * @return none.
<> 132:9baf128c2fab 6658 */
<> 132:9baf128c2fab 6659
<> 132:9baf128c2fab 6660 void arm_std_q31(
<> 132:9baf128c2fab 6661 q31_t * pSrc,
<> 132:9baf128c2fab 6662 uint32_t blockSize,
<> 132:9baf128c2fab 6663 q31_t * pResult);
<> 132:9baf128c2fab 6664
<> 132:9baf128c2fab 6665 /**
<> 132:9baf128c2fab 6666 * @brief Standard deviation of the elements of a Q15 vector.
<> 132:9baf128c2fab 6667 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6668 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6669 * @param[out] *pResult is output value.
<> 132:9baf128c2fab 6670 * @return none.
<> 132:9baf128c2fab 6671 */
<> 132:9baf128c2fab 6672
<> 132:9baf128c2fab 6673 void arm_std_q15(
<> 132:9baf128c2fab 6674 q15_t * pSrc,
<> 132:9baf128c2fab 6675 uint32_t blockSize,
<> 132:9baf128c2fab 6676 q15_t * pResult);
<> 132:9baf128c2fab 6677
<> 132:9baf128c2fab 6678 /**
<> 132:9baf128c2fab 6679 * @brief Floating-point complex magnitude
<> 132:9baf128c2fab 6680 * @param[in] *pSrc points to the complex input vector
<> 132:9baf128c2fab 6681 * @param[out] *pDst points to the real output vector
<> 132:9baf128c2fab 6682 * @param[in] numSamples number of complex samples in the input vector
<> 132:9baf128c2fab 6683 * @return none.
<> 132:9baf128c2fab 6684 */
<> 132:9baf128c2fab 6685
<> 132:9baf128c2fab 6686 void arm_cmplx_mag_f32(
<> 132:9baf128c2fab 6687 float32_t * pSrc,
<> 132:9baf128c2fab 6688 float32_t * pDst,
<> 132:9baf128c2fab 6689 uint32_t numSamples);
<> 132:9baf128c2fab 6690
<> 132:9baf128c2fab 6691 /**
<> 132:9baf128c2fab 6692 * @brief Q31 complex magnitude
<> 132:9baf128c2fab 6693 * @param[in] *pSrc points to the complex input vector
<> 132:9baf128c2fab 6694 * @param[out] *pDst points to the real output vector
<> 132:9baf128c2fab 6695 * @param[in] numSamples number of complex samples in the input vector
<> 132:9baf128c2fab 6696 * @return none.
<> 132:9baf128c2fab 6697 */
<> 132:9baf128c2fab 6698
<> 132:9baf128c2fab 6699 void arm_cmplx_mag_q31(
<> 132:9baf128c2fab 6700 q31_t * pSrc,
<> 132:9baf128c2fab 6701 q31_t * pDst,
<> 132:9baf128c2fab 6702 uint32_t numSamples);
<> 132:9baf128c2fab 6703
<> 132:9baf128c2fab 6704 /**
<> 132:9baf128c2fab 6705 * @brief Q15 complex magnitude
<> 132:9baf128c2fab 6706 * @param[in] *pSrc points to the complex input vector
<> 132:9baf128c2fab 6707 * @param[out] *pDst points to the real output vector
<> 132:9baf128c2fab 6708 * @param[in] numSamples number of complex samples in the input vector
<> 132:9baf128c2fab 6709 * @return none.
<> 132:9baf128c2fab 6710 */
<> 132:9baf128c2fab 6711
<> 132:9baf128c2fab 6712 void arm_cmplx_mag_q15(
<> 132:9baf128c2fab 6713 q15_t * pSrc,
<> 132:9baf128c2fab 6714 q15_t * pDst,
<> 132:9baf128c2fab 6715 uint32_t numSamples);
<> 132:9baf128c2fab 6716
<> 132:9baf128c2fab 6717 /**
<> 132:9baf128c2fab 6718 * @brief Q15 complex dot product
<> 132:9baf128c2fab 6719 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 6720 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 6721 * @param[in] numSamples number of complex samples in each vector
<> 132:9baf128c2fab 6722 * @param[out] *realResult real part of the result returned here
<> 132:9baf128c2fab 6723 * @param[out] *imagResult imaginary part of the result returned here
<> 132:9baf128c2fab 6724 * @return none.
<> 132:9baf128c2fab 6725 */
<> 132:9baf128c2fab 6726
<> 132:9baf128c2fab 6727 void arm_cmplx_dot_prod_q15(
<> 132:9baf128c2fab 6728 q15_t * pSrcA,
<> 132:9baf128c2fab 6729 q15_t * pSrcB,
<> 132:9baf128c2fab 6730 uint32_t numSamples,
<> 132:9baf128c2fab 6731 q31_t * realResult,
<> 132:9baf128c2fab 6732 q31_t * imagResult);
<> 132:9baf128c2fab 6733
<> 132:9baf128c2fab 6734 /**
<> 132:9baf128c2fab 6735 * @brief Q31 complex dot product
<> 132:9baf128c2fab 6736 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 6737 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 6738 * @param[in] numSamples number of complex samples in each vector
<> 132:9baf128c2fab 6739 * @param[out] *realResult real part of the result returned here
<> 132:9baf128c2fab 6740 * @param[out] *imagResult imaginary part of the result returned here
<> 132:9baf128c2fab 6741 * @return none.
<> 132:9baf128c2fab 6742 */
<> 132:9baf128c2fab 6743
<> 132:9baf128c2fab 6744 void arm_cmplx_dot_prod_q31(
<> 132:9baf128c2fab 6745 q31_t * pSrcA,
<> 132:9baf128c2fab 6746 q31_t * pSrcB,
<> 132:9baf128c2fab 6747 uint32_t numSamples,
<> 132:9baf128c2fab 6748 q63_t * realResult,
<> 132:9baf128c2fab 6749 q63_t * imagResult);
<> 132:9baf128c2fab 6750
<> 132:9baf128c2fab 6751 /**
<> 132:9baf128c2fab 6752 * @brief Floating-point complex dot product
<> 132:9baf128c2fab 6753 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 6754 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 6755 * @param[in] numSamples number of complex samples in each vector
<> 132:9baf128c2fab 6756 * @param[out] *realResult real part of the result returned here
<> 132:9baf128c2fab 6757 * @param[out] *imagResult imaginary part of the result returned here
<> 132:9baf128c2fab 6758 * @return none.
<> 132:9baf128c2fab 6759 */
<> 132:9baf128c2fab 6760
<> 132:9baf128c2fab 6761 void arm_cmplx_dot_prod_f32(
<> 132:9baf128c2fab 6762 float32_t * pSrcA,
<> 132:9baf128c2fab 6763 float32_t * pSrcB,
<> 132:9baf128c2fab 6764 uint32_t numSamples,
<> 132:9baf128c2fab 6765 float32_t * realResult,
<> 132:9baf128c2fab 6766 float32_t * imagResult);
<> 132:9baf128c2fab 6767
<> 132:9baf128c2fab 6768 /**
<> 132:9baf128c2fab 6769 * @brief Q15 complex-by-real multiplication
<> 132:9baf128c2fab 6770 * @param[in] *pSrcCmplx points to the complex input vector
<> 132:9baf128c2fab 6771 * @param[in] *pSrcReal points to the real input vector
<> 132:9baf128c2fab 6772 * @param[out] *pCmplxDst points to the complex output vector
<> 132:9baf128c2fab 6773 * @param[in] numSamples number of samples in each vector
<> 132:9baf128c2fab 6774 * @return none.
<> 132:9baf128c2fab 6775 */
<> 132:9baf128c2fab 6776
<> 132:9baf128c2fab 6777 void arm_cmplx_mult_real_q15(
<> 132:9baf128c2fab 6778 q15_t * pSrcCmplx,
<> 132:9baf128c2fab 6779 q15_t * pSrcReal,
<> 132:9baf128c2fab 6780 q15_t * pCmplxDst,
<> 132:9baf128c2fab 6781 uint32_t numSamples);
<> 132:9baf128c2fab 6782
<> 132:9baf128c2fab 6783 /**
<> 132:9baf128c2fab 6784 * @brief Q31 complex-by-real multiplication
<> 132:9baf128c2fab 6785 * @param[in] *pSrcCmplx points to the complex input vector
<> 132:9baf128c2fab 6786 * @param[in] *pSrcReal points to the real input vector
<> 132:9baf128c2fab 6787 * @param[out] *pCmplxDst points to the complex output vector
<> 132:9baf128c2fab 6788 * @param[in] numSamples number of samples in each vector
<> 132:9baf128c2fab 6789 * @return none.
<> 132:9baf128c2fab 6790 */
<> 132:9baf128c2fab 6791
<> 132:9baf128c2fab 6792 void arm_cmplx_mult_real_q31(
<> 132:9baf128c2fab 6793 q31_t * pSrcCmplx,
<> 132:9baf128c2fab 6794 q31_t * pSrcReal,
<> 132:9baf128c2fab 6795 q31_t * pCmplxDst,
<> 132:9baf128c2fab 6796 uint32_t numSamples);
<> 132:9baf128c2fab 6797
<> 132:9baf128c2fab 6798 /**
<> 132:9baf128c2fab 6799 * @brief Floating-point complex-by-real multiplication
<> 132:9baf128c2fab 6800 * @param[in] *pSrcCmplx points to the complex input vector
<> 132:9baf128c2fab 6801 * @param[in] *pSrcReal points to the real input vector
<> 132:9baf128c2fab 6802 * @param[out] *pCmplxDst points to the complex output vector
<> 132:9baf128c2fab 6803 * @param[in] numSamples number of samples in each vector
<> 132:9baf128c2fab 6804 * @return none.
<> 132:9baf128c2fab 6805 */
<> 132:9baf128c2fab 6806
<> 132:9baf128c2fab 6807 void arm_cmplx_mult_real_f32(
<> 132:9baf128c2fab 6808 float32_t * pSrcCmplx,
<> 132:9baf128c2fab 6809 float32_t * pSrcReal,
<> 132:9baf128c2fab 6810 float32_t * pCmplxDst,
<> 132:9baf128c2fab 6811 uint32_t numSamples);
<> 132:9baf128c2fab 6812
<> 132:9baf128c2fab 6813 /**
<> 132:9baf128c2fab 6814 * @brief Minimum value of a Q7 vector.
<> 132:9baf128c2fab 6815 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6816 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6817 * @param[out] *result is output pointer
<> 132:9baf128c2fab 6818 * @param[in] index is the array index of the minimum value in the input buffer.
<> 132:9baf128c2fab 6819 * @return none.
<> 132:9baf128c2fab 6820 */
<> 132:9baf128c2fab 6821
<> 132:9baf128c2fab 6822 void arm_min_q7(
<> 132:9baf128c2fab 6823 q7_t * pSrc,
<> 132:9baf128c2fab 6824 uint32_t blockSize,
<> 132:9baf128c2fab 6825 q7_t * result,
<> 132:9baf128c2fab 6826 uint32_t * index);
<> 132:9baf128c2fab 6827
<> 132:9baf128c2fab 6828 /**
<> 132:9baf128c2fab 6829 * @brief Minimum value of a Q15 vector.
<> 132:9baf128c2fab 6830 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6831 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6832 * @param[out] *pResult is output pointer
<> 132:9baf128c2fab 6833 * @param[in] *pIndex is the array index of the minimum value in the input buffer.
<> 132:9baf128c2fab 6834 * @return none.
<> 132:9baf128c2fab 6835 */
<> 132:9baf128c2fab 6836
<> 132:9baf128c2fab 6837 void arm_min_q15(
<> 132:9baf128c2fab 6838 q15_t * pSrc,
<> 132:9baf128c2fab 6839 uint32_t blockSize,
<> 132:9baf128c2fab 6840 q15_t * pResult,
<> 132:9baf128c2fab 6841 uint32_t * pIndex);
<> 132:9baf128c2fab 6842
<> 132:9baf128c2fab 6843 /**
<> 132:9baf128c2fab 6844 * @brief Minimum value of a Q31 vector.
<> 132:9baf128c2fab 6845 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6846 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6847 * @param[out] *pResult is output pointer
<> 132:9baf128c2fab 6848 * @param[out] *pIndex is the array index of the minimum value in the input buffer.
<> 132:9baf128c2fab 6849 * @return none.
<> 132:9baf128c2fab 6850 */
<> 132:9baf128c2fab 6851 void arm_min_q31(
<> 132:9baf128c2fab 6852 q31_t * pSrc,
<> 132:9baf128c2fab 6853 uint32_t blockSize,
<> 132:9baf128c2fab 6854 q31_t * pResult,
<> 132:9baf128c2fab 6855 uint32_t * pIndex);
<> 132:9baf128c2fab 6856
<> 132:9baf128c2fab 6857 /**
<> 132:9baf128c2fab 6858 * @brief Minimum value of a floating-point vector.
<> 132:9baf128c2fab 6859 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 6860 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 6861 * @param[out] *pResult is output pointer
<> 132:9baf128c2fab 6862 * @param[out] *pIndex is the array index of the minimum value in the input buffer.
<> 132:9baf128c2fab 6863 * @return none.
<> 132:9baf128c2fab 6864 */
<> 132:9baf128c2fab 6865
<> 132:9baf128c2fab 6866 void arm_min_f32(
<> 132:9baf128c2fab 6867 float32_t * pSrc,
<> 132:9baf128c2fab 6868 uint32_t blockSize,
<> 132:9baf128c2fab 6869 float32_t * pResult,
<> 132:9baf128c2fab 6870 uint32_t * pIndex);
<> 132:9baf128c2fab 6871
<> 132:9baf128c2fab 6872 /**
<> 132:9baf128c2fab 6873 * @brief Maximum value of a Q7 vector.
<> 132:9baf128c2fab 6874 * @param[in] *pSrc points to the input buffer
<> 132:9baf128c2fab 6875 * @param[in] blockSize length of the input vector
<> 132:9baf128c2fab 6876 * @param[out] *pResult maximum value returned here
<> 132:9baf128c2fab 6877 * @param[out] *pIndex index of maximum value returned here
<> 132:9baf128c2fab 6878 * @return none.
<> 132:9baf128c2fab 6879 */
<> 132:9baf128c2fab 6880
<> 132:9baf128c2fab 6881 void arm_max_q7(
<> 132:9baf128c2fab 6882 q7_t * pSrc,
<> 132:9baf128c2fab 6883 uint32_t blockSize,
<> 132:9baf128c2fab 6884 q7_t * pResult,
<> 132:9baf128c2fab 6885 uint32_t * pIndex);
<> 132:9baf128c2fab 6886
<> 132:9baf128c2fab 6887 /**
<> 132:9baf128c2fab 6888 * @brief Maximum value of a Q15 vector.
<> 132:9baf128c2fab 6889 * @param[in] *pSrc points to the input buffer
<> 132:9baf128c2fab 6890 * @param[in] blockSize length of the input vector
<> 132:9baf128c2fab 6891 * @param[out] *pResult maximum value returned here
<> 132:9baf128c2fab 6892 * @param[out] *pIndex index of maximum value returned here
<> 132:9baf128c2fab 6893 * @return none.
<> 132:9baf128c2fab 6894 */
<> 132:9baf128c2fab 6895
<> 132:9baf128c2fab 6896 void arm_max_q15(
<> 132:9baf128c2fab 6897 q15_t * pSrc,
<> 132:9baf128c2fab 6898 uint32_t blockSize,
<> 132:9baf128c2fab 6899 q15_t * pResult,
<> 132:9baf128c2fab 6900 uint32_t * pIndex);
<> 132:9baf128c2fab 6901
<> 132:9baf128c2fab 6902 /**
<> 132:9baf128c2fab 6903 * @brief Maximum value of a Q31 vector.
<> 132:9baf128c2fab 6904 * @param[in] *pSrc points to the input buffer
<> 132:9baf128c2fab 6905 * @param[in] blockSize length of the input vector
<> 132:9baf128c2fab 6906 * @param[out] *pResult maximum value returned here
<> 132:9baf128c2fab 6907 * @param[out] *pIndex index of maximum value returned here
<> 132:9baf128c2fab 6908 * @return none.
<> 132:9baf128c2fab 6909 */
<> 132:9baf128c2fab 6910
<> 132:9baf128c2fab 6911 void arm_max_q31(
<> 132:9baf128c2fab 6912 q31_t * pSrc,
<> 132:9baf128c2fab 6913 uint32_t blockSize,
<> 132:9baf128c2fab 6914 q31_t * pResult,
<> 132:9baf128c2fab 6915 uint32_t * pIndex);
<> 132:9baf128c2fab 6916
<> 132:9baf128c2fab 6917 /**
<> 132:9baf128c2fab 6918 * @brief Maximum value of a floating-point vector.
<> 132:9baf128c2fab 6919 * @param[in] *pSrc points to the input buffer
<> 132:9baf128c2fab 6920 * @param[in] blockSize length of the input vector
<> 132:9baf128c2fab 6921 * @param[out] *pResult maximum value returned here
<> 132:9baf128c2fab 6922 * @param[out] *pIndex index of maximum value returned here
<> 132:9baf128c2fab 6923 * @return none.
<> 132:9baf128c2fab 6924 */
<> 132:9baf128c2fab 6925
<> 132:9baf128c2fab 6926 void arm_max_f32(
<> 132:9baf128c2fab 6927 float32_t * pSrc,
<> 132:9baf128c2fab 6928 uint32_t blockSize,
<> 132:9baf128c2fab 6929 float32_t * pResult,
<> 132:9baf128c2fab 6930 uint32_t * pIndex);
<> 132:9baf128c2fab 6931
<> 132:9baf128c2fab 6932 /**
<> 132:9baf128c2fab 6933 * @brief Q15 complex-by-complex multiplication
<> 132:9baf128c2fab 6934 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 6935 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 6936 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 6937 * @param[in] numSamples number of complex samples in each vector
<> 132:9baf128c2fab 6938 * @return none.
<> 132:9baf128c2fab 6939 */
<> 132:9baf128c2fab 6940
<> 132:9baf128c2fab 6941 void arm_cmplx_mult_cmplx_q15(
<> 132:9baf128c2fab 6942 q15_t * pSrcA,
<> 132:9baf128c2fab 6943 q15_t * pSrcB,
<> 132:9baf128c2fab 6944 q15_t * pDst,
<> 132:9baf128c2fab 6945 uint32_t numSamples);
<> 132:9baf128c2fab 6946
<> 132:9baf128c2fab 6947 /**
<> 132:9baf128c2fab 6948 * @brief Q31 complex-by-complex multiplication
<> 132:9baf128c2fab 6949 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 6950 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 6951 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 6952 * @param[in] numSamples number of complex samples in each vector
<> 132:9baf128c2fab 6953 * @return none.
<> 132:9baf128c2fab 6954 */
<> 132:9baf128c2fab 6955
<> 132:9baf128c2fab 6956 void arm_cmplx_mult_cmplx_q31(
<> 132:9baf128c2fab 6957 q31_t * pSrcA,
<> 132:9baf128c2fab 6958 q31_t * pSrcB,
<> 132:9baf128c2fab 6959 q31_t * pDst,
<> 132:9baf128c2fab 6960 uint32_t numSamples);
<> 132:9baf128c2fab 6961
<> 132:9baf128c2fab 6962 /**
<> 132:9baf128c2fab 6963 * @brief Floating-point complex-by-complex multiplication
<> 132:9baf128c2fab 6964 * @param[in] *pSrcA points to the first input vector
<> 132:9baf128c2fab 6965 * @param[in] *pSrcB points to the second input vector
<> 132:9baf128c2fab 6966 * @param[out] *pDst points to the output vector
<> 132:9baf128c2fab 6967 * @param[in] numSamples number of complex samples in each vector
<> 132:9baf128c2fab 6968 * @return none.
<> 132:9baf128c2fab 6969 */
<> 132:9baf128c2fab 6970
<> 132:9baf128c2fab 6971 void arm_cmplx_mult_cmplx_f32(
<> 132:9baf128c2fab 6972 float32_t * pSrcA,
<> 132:9baf128c2fab 6973 float32_t * pSrcB,
<> 132:9baf128c2fab 6974 float32_t * pDst,
<> 132:9baf128c2fab 6975 uint32_t numSamples);
<> 132:9baf128c2fab 6976
<> 132:9baf128c2fab 6977 /**
<> 132:9baf128c2fab 6978 * @brief Converts the elements of the floating-point vector to Q31 vector.
<> 132:9baf128c2fab 6979 * @param[in] *pSrc points to the floating-point input vector
<> 132:9baf128c2fab 6980 * @param[out] *pDst points to the Q31 output vector
<> 132:9baf128c2fab 6981 * @param[in] blockSize length of the input vector
<> 132:9baf128c2fab 6982 * @return none.
<> 132:9baf128c2fab 6983 */
<> 132:9baf128c2fab 6984 void arm_float_to_q31(
<> 132:9baf128c2fab 6985 float32_t * pSrc,
<> 132:9baf128c2fab 6986 q31_t * pDst,
<> 132:9baf128c2fab 6987 uint32_t blockSize);
<> 132:9baf128c2fab 6988
<> 132:9baf128c2fab 6989 /**
<> 132:9baf128c2fab 6990 * @brief Converts the elements of the floating-point vector to Q15 vector.
<> 132:9baf128c2fab 6991 * @param[in] *pSrc points to the floating-point input vector
<> 132:9baf128c2fab 6992 * @param[out] *pDst points to the Q15 output vector
<> 132:9baf128c2fab 6993 * @param[in] blockSize length of the input vector
<> 132:9baf128c2fab 6994 * @return none
<> 132:9baf128c2fab 6995 */
<> 132:9baf128c2fab 6996 void arm_float_to_q15(
<> 132:9baf128c2fab 6997 float32_t * pSrc,
<> 132:9baf128c2fab 6998 q15_t * pDst,
<> 132:9baf128c2fab 6999 uint32_t blockSize);
<> 132:9baf128c2fab 7000
<> 132:9baf128c2fab 7001 /**
<> 132:9baf128c2fab 7002 * @brief Converts the elements of the floating-point vector to Q7 vector.
<> 132:9baf128c2fab 7003 * @param[in] *pSrc points to the floating-point input vector
<> 132:9baf128c2fab 7004 * @param[out] *pDst points to the Q7 output vector
<> 132:9baf128c2fab 7005 * @param[in] blockSize length of the input vector
<> 132:9baf128c2fab 7006 * @return none
<> 132:9baf128c2fab 7007 */
<> 132:9baf128c2fab 7008 void arm_float_to_q7(
<> 132:9baf128c2fab 7009 float32_t * pSrc,
<> 132:9baf128c2fab 7010 q7_t * pDst,
<> 132:9baf128c2fab 7011 uint32_t blockSize);
<> 132:9baf128c2fab 7012
<> 132:9baf128c2fab 7013
<> 132:9baf128c2fab 7014 /**
<> 132:9baf128c2fab 7015 * @brief Converts the elements of the Q31 vector to Q15 vector.
<> 132:9baf128c2fab 7016 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 7017 * @param[out] *pDst is output pointer
<> 132:9baf128c2fab 7018 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 7019 * @return none.
<> 132:9baf128c2fab 7020 */
<> 132:9baf128c2fab 7021 void arm_q31_to_q15(
<> 132:9baf128c2fab 7022 q31_t * pSrc,
<> 132:9baf128c2fab 7023 q15_t * pDst,
<> 132:9baf128c2fab 7024 uint32_t blockSize);
<> 132:9baf128c2fab 7025
<> 132:9baf128c2fab 7026 /**
<> 132:9baf128c2fab 7027 * @brief Converts the elements of the Q31 vector to Q7 vector.
<> 132:9baf128c2fab 7028 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 7029 * @param[out] *pDst is output pointer
<> 132:9baf128c2fab 7030 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 7031 * @return none.
<> 132:9baf128c2fab 7032 */
<> 132:9baf128c2fab 7033 void arm_q31_to_q7(
<> 132:9baf128c2fab 7034 q31_t * pSrc,
<> 132:9baf128c2fab 7035 q7_t * pDst,
<> 132:9baf128c2fab 7036 uint32_t blockSize);
<> 132:9baf128c2fab 7037
<> 132:9baf128c2fab 7038 /**
<> 132:9baf128c2fab 7039 * @brief Converts the elements of the Q15 vector to floating-point vector.
<> 132:9baf128c2fab 7040 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 7041 * @param[out] *pDst is output pointer
<> 132:9baf128c2fab 7042 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 7043 * @return none.
<> 132:9baf128c2fab 7044 */
<> 132:9baf128c2fab 7045 void arm_q15_to_float(
<> 132:9baf128c2fab 7046 q15_t * pSrc,
<> 132:9baf128c2fab 7047 float32_t * pDst,
<> 132:9baf128c2fab 7048 uint32_t blockSize);
<> 132:9baf128c2fab 7049
<> 132:9baf128c2fab 7050
<> 132:9baf128c2fab 7051 /**
<> 132:9baf128c2fab 7052 * @brief Converts the elements of the Q15 vector to Q31 vector.
<> 132:9baf128c2fab 7053 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 7054 * @param[out] *pDst is output pointer
<> 132:9baf128c2fab 7055 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 7056 * @return none.
<> 132:9baf128c2fab 7057 */
<> 132:9baf128c2fab 7058 void arm_q15_to_q31(
<> 132:9baf128c2fab 7059 q15_t * pSrc,
<> 132:9baf128c2fab 7060 q31_t * pDst,
<> 132:9baf128c2fab 7061 uint32_t blockSize);
<> 132:9baf128c2fab 7062
<> 132:9baf128c2fab 7063
<> 132:9baf128c2fab 7064 /**
<> 132:9baf128c2fab 7065 * @brief Converts the elements of the Q15 vector to Q7 vector.
<> 132:9baf128c2fab 7066 * @param[in] *pSrc is input pointer
<> 132:9baf128c2fab 7067 * @param[out] *pDst is output pointer
<> 132:9baf128c2fab 7068 * @param[in] blockSize is the number of samples to process
<> 132:9baf128c2fab 7069 * @return none.
<> 132:9baf128c2fab 7070 */
<> 132:9baf128c2fab 7071 void arm_q15_to_q7(
<> 132:9baf128c2fab 7072 q15_t * pSrc,
<> 132:9baf128c2fab 7073 q7_t * pDst,
<> 132:9baf128c2fab 7074 uint32_t blockSize);
<> 132:9baf128c2fab 7075
<> 132:9baf128c2fab 7076
<> 132:9baf128c2fab 7077 /**
<> 132:9baf128c2fab 7078 * @ingroup groupInterpolation
<> 132:9baf128c2fab 7079 */
<> 132:9baf128c2fab 7080
<> 132:9baf128c2fab 7081 /**
<> 132:9baf128c2fab 7082 * @defgroup BilinearInterpolate Bilinear Interpolation
<> 132:9baf128c2fab 7083 *
<> 132:9baf128c2fab 7084 * Bilinear interpolation is an extension of linear interpolation applied to a two dimensional grid.
<> 132:9baf128c2fab 7085 * The underlying function <code>f(x, y)</code> is sampled on a regular grid and the interpolation process
<> 132:9baf128c2fab 7086 * determines values between the grid points.
<> 132:9baf128c2fab 7087 * Bilinear interpolation is equivalent to two step linear interpolation, first in the x-dimension and then in the y-dimension.
<> 132:9baf128c2fab 7088 * Bilinear interpolation is often used in image processing to rescale images.
<> 132:9baf128c2fab 7089 * The CMSIS DSP library provides bilinear interpolation functions for Q7, Q15, Q31, and floating-point data types.
<> 132:9baf128c2fab 7090 *
<> 132:9baf128c2fab 7091 * <b>Algorithm</b>
<> 132:9baf128c2fab 7092 * \par
<> 132:9baf128c2fab 7093 * The instance structure used by the bilinear interpolation functions describes a two dimensional data table.
<> 132:9baf128c2fab 7094 * For floating-point, the instance structure is defined as:
<> 132:9baf128c2fab 7095 * <pre>
<> 132:9baf128c2fab 7096 * typedef struct
<> 132:9baf128c2fab 7097 * {
<> 132:9baf128c2fab 7098 * uint16_t numRows;
<> 132:9baf128c2fab 7099 * uint16_t numCols;
<> 132:9baf128c2fab 7100 * float32_t *pData;
<> 132:9baf128c2fab 7101 * } arm_bilinear_interp_instance_f32;
<> 132:9baf128c2fab 7102 * </pre>
<> 132:9baf128c2fab 7103 *
<> 132:9baf128c2fab 7104 * \par
<> 132:9baf128c2fab 7105 * where <code>numRows</code> specifies the number of rows in the table;
<> 132:9baf128c2fab 7106 * <code>numCols</code> specifies the number of columns in the table;
<> 132:9baf128c2fab 7107 * and <code>pData</code> points to an array of size <code>numRows*numCols</code> values.
<> 132:9baf128c2fab 7108 * The data table <code>pTable</code> is organized in row order and the supplied data values fall on integer indexes.
<> 132:9baf128c2fab 7109 * That is, table element (x,y) is located at <code>pTable[x + y*numCols]</code> where x and y are integers.
<> 132:9baf128c2fab 7110 *
<> 132:9baf128c2fab 7111 * \par
<> 132:9baf128c2fab 7112 * Let <code>(x, y)</code> specify the desired interpolation point. Then define:
<> 132:9baf128c2fab 7113 * <pre>
<> 132:9baf128c2fab 7114 * XF = floor(x)
<> 132:9baf128c2fab 7115 * YF = floor(y)
<> 132:9baf128c2fab 7116 * </pre>
<> 132:9baf128c2fab 7117 * \par
<> 132:9baf128c2fab 7118 * The interpolated output point is computed as:
<> 132:9baf128c2fab 7119 * <pre>
<> 132:9baf128c2fab 7120 * f(x, y) = f(XF, YF) * (1-(x-XF)) * (1-(y-YF))
<> 132:9baf128c2fab 7121 * + f(XF+1, YF) * (x-XF)*(1-(y-YF))
<> 132:9baf128c2fab 7122 * + f(XF, YF+1) * (1-(x-XF))*(y-YF)
<> 132:9baf128c2fab 7123 * + f(XF+1, YF+1) * (x-XF)*(y-YF)
<> 132:9baf128c2fab 7124 * </pre>
<> 132:9baf128c2fab 7125 * Note that the coordinates (x, y) contain integer and fractional components.
<> 132:9baf128c2fab 7126 * The integer components specify which portion of the table to use while the
<> 132:9baf128c2fab 7127 * fractional components control the interpolation processor.
<> 132:9baf128c2fab 7128 *
<> 132:9baf128c2fab 7129 * \par
<> 132:9baf128c2fab 7130 * if (x,y) are outside of the table boundary, Bilinear interpolation returns zero output.
<> 132:9baf128c2fab 7131 */
<> 132:9baf128c2fab 7132
<> 132:9baf128c2fab 7133 /**
<> 132:9baf128c2fab 7134 * @addtogroup BilinearInterpolate
<> 132:9baf128c2fab 7135 * @{
<> 132:9baf128c2fab 7136 */
<> 132:9baf128c2fab 7137
<> 132:9baf128c2fab 7138 /**
<> 132:9baf128c2fab 7139 *
<> 132:9baf128c2fab 7140 * @brief Floating-point bilinear interpolation.
<> 132:9baf128c2fab 7141 * @param[in,out] *S points to an instance of the interpolation structure.
<> 132:9baf128c2fab 7142 * @param[in] X interpolation coordinate.
<> 132:9baf128c2fab 7143 * @param[in] Y interpolation coordinate.
<> 132:9baf128c2fab 7144 * @return out interpolated value.
<> 132:9baf128c2fab 7145 */
<> 132:9baf128c2fab 7146
<> 132:9baf128c2fab 7147
<> 132:9baf128c2fab 7148 static __INLINE float32_t arm_bilinear_interp_f32(
<> 132:9baf128c2fab 7149 const arm_bilinear_interp_instance_f32 * S,
<> 132:9baf128c2fab 7150 float32_t X,
<> 132:9baf128c2fab 7151 float32_t Y)
<> 132:9baf128c2fab 7152 {
<> 132:9baf128c2fab 7153 float32_t out;
<> 132:9baf128c2fab 7154 float32_t f00, f01, f10, f11;
<> 132:9baf128c2fab 7155 float32_t *pData = S->pData;
<> 132:9baf128c2fab 7156 int32_t xIndex, yIndex, index;
<> 132:9baf128c2fab 7157 float32_t xdiff, ydiff;
<> 132:9baf128c2fab 7158 float32_t b1, b2, b3, b4;
<> 132:9baf128c2fab 7159
<> 132:9baf128c2fab 7160 xIndex = (int32_t) X;
<> 132:9baf128c2fab 7161 yIndex = (int32_t) Y;
<> 132:9baf128c2fab 7162
<> 132:9baf128c2fab 7163 /* Care taken for table outside boundary */
<> 132:9baf128c2fab 7164 /* Returns zero output when values are outside table boundary */
<> 132:9baf128c2fab 7165 if(xIndex < 0 || xIndex > (S->numRows - 1) || yIndex < 0
<> 132:9baf128c2fab 7166 || yIndex > (S->numCols - 1))
<> 132:9baf128c2fab 7167 {
<> 132:9baf128c2fab 7168 return (0);
<> 132:9baf128c2fab 7169 }
<> 132:9baf128c2fab 7170
<> 132:9baf128c2fab 7171 /* Calculation of index for two nearest points in X-direction */
<> 132:9baf128c2fab 7172 index = (xIndex - 1) + (yIndex - 1) * S->numCols;
<> 132:9baf128c2fab 7173
<> 132:9baf128c2fab 7174
<> 132:9baf128c2fab 7175 /* Read two nearest points in X-direction */
<> 132:9baf128c2fab 7176 f00 = pData[index];
<> 132:9baf128c2fab 7177 f01 = pData[index + 1];
<> 132:9baf128c2fab 7178
<> 132:9baf128c2fab 7179 /* Calculation of index for two nearest points in Y-direction */
<> 132:9baf128c2fab 7180 index = (xIndex - 1) + (yIndex) * S->numCols;
<> 132:9baf128c2fab 7181
<> 132:9baf128c2fab 7182
<> 132:9baf128c2fab 7183 /* Read two nearest points in Y-direction */
<> 132:9baf128c2fab 7184 f10 = pData[index];
<> 132:9baf128c2fab 7185 f11 = pData[index + 1];
<> 132:9baf128c2fab 7186
<> 132:9baf128c2fab 7187 /* Calculation of intermediate values */
<> 132:9baf128c2fab 7188 b1 = f00;
<> 132:9baf128c2fab 7189 b2 = f01 - f00;
<> 132:9baf128c2fab 7190 b3 = f10 - f00;
<> 132:9baf128c2fab 7191 b4 = f00 - f01 - f10 + f11;
<> 132:9baf128c2fab 7192
<> 132:9baf128c2fab 7193 /* Calculation of fractional part in X */
<> 132:9baf128c2fab 7194 xdiff = X - xIndex;
<> 132:9baf128c2fab 7195
<> 132:9baf128c2fab 7196 /* Calculation of fractional part in Y */
<> 132:9baf128c2fab 7197 ydiff = Y - yIndex;
<> 132:9baf128c2fab 7198
<> 132:9baf128c2fab 7199 /* Calculation of bi-linear interpolated output */
<> 132:9baf128c2fab 7200 out = b1 + b2 * xdiff + b3 * ydiff + b4 * xdiff * ydiff;
<> 132:9baf128c2fab 7201
<> 132:9baf128c2fab 7202 /* return to application */
<> 132:9baf128c2fab 7203 return (out);
<> 132:9baf128c2fab 7204
<> 132:9baf128c2fab 7205 }
<> 132:9baf128c2fab 7206
<> 132:9baf128c2fab 7207 /**
<> 132:9baf128c2fab 7208 *
<> 132:9baf128c2fab 7209 * @brief Q31 bilinear interpolation.
<> 132:9baf128c2fab 7210 * @param[in,out] *S points to an instance of the interpolation structure.
<> 132:9baf128c2fab 7211 * @param[in] X interpolation coordinate in 12.20 format.
<> 132:9baf128c2fab 7212 * @param[in] Y interpolation coordinate in 12.20 format.
<> 132:9baf128c2fab 7213 * @return out interpolated value.
<> 132:9baf128c2fab 7214 */
<> 132:9baf128c2fab 7215
<> 132:9baf128c2fab 7216 static __INLINE q31_t arm_bilinear_interp_q31(
<> 132:9baf128c2fab 7217 arm_bilinear_interp_instance_q31 * S,
<> 132:9baf128c2fab 7218 q31_t X,
<> 132:9baf128c2fab 7219 q31_t Y)
<> 132:9baf128c2fab 7220 {
<> 132:9baf128c2fab 7221 q31_t out; /* Temporary output */
<> 132:9baf128c2fab 7222 q31_t acc = 0; /* output */
<> 132:9baf128c2fab 7223 q31_t xfract, yfract; /* X, Y fractional parts */
<> 132:9baf128c2fab 7224 q31_t x1, x2, y1, y2; /* Nearest output values */
<> 132:9baf128c2fab 7225 int32_t rI, cI; /* Row and column indices */
<> 132:9baf128c2fab 7226 q31_t *pYData = S->pData; /* pointer to output table values */
<> 132:9baf128c2fab 7227 uint32_t nCols = S->numCols; /* num of rows */
<> 132:9baf128c2fab 7228
<> 132:9baf128c2fab 7229
<> 132:9baf128c2fab 7230 /* Input is in 12.20 format */
<> 132:9baf128c2fab 7231 /* 12 bits for the table index */
<> 132:9baf128c2fab 7232 /* Index value calculation */
<> 132:9baf128c2fab 7233 rI = ((X & 0xFFF00000) >> 20u);
<> 132:9baf128c2fab 7234
<> 132:9baf128c2fab 7235 /* Input is in 12.20 format */
<> 132:9baf128c2fab 7236 /* 12 bits for the table index */
<> 132:9baf128c2fab 7237 /* Index value calculation */
<> 132:9baf128c2fab 7238 cI = ((Y & 0xFFF00000) >> 20u);
<> 132:9baf128c2fab 7239
<> 132:9baf128c2fab 7240 /* Care taken for table outside boundary */
<> 132:9baf128c2fab 7241 /* Returns zero output when values are outside table boundary */
<> 132:9baf128c2fab 7242 if(rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
<> 132:9baf128c2fab 7243 {
<> 132:9baf128c2fab 7244 return (0);
<> 132:9baf128c2fab 7245 }
<> 132:9baf128c2fab 7246
<> 132:9baf128c2fab 7247 /* 20 bits for the fractional part */
<> 132:9baf128c2fab 7248 /* shift left xfract by 11 to keep 1.31 format */
<> 132:9baf128c2fab 7249 xfract = (X & 0x000FFFFF) << 11u;
<> 132:9baf128c2fab 7250
<> 132:9baf128c2fab 7251 /* Read two nearest output values from the index */
<> 132:9baf128c2fab 7252 x1 = pYData[(rI) + nCols * (cI)];
<> 132:9baf128c2fab 7253 x2 = pYData[(rI) + nCols * (cI) + 1u];
<> 132:9baf128c2fab 7254
<> 132:9baf128c2fab 7255 /* 20 bits for the fractional part */
<> 132:9baf128c2fab 7256 /* shift left yfract by 11 to keep 1.31 format */
<> 132:9baf128c2fab 7257 yfract = (Y & 0x000FFFFF) << 11u;
<> 132:9baf128c2fab 7258
<> 132:9baf128c2fab 7259 /* Read two nearest output values from the index */
<> 132:9baf128c2fab 7260 y1 = pYData[(rI) + nCols * (cI + 1)];
<> 132:9baf128c2fab 7261 y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
<> 132:9baf128c2fab 7262
<> 132:9baf128c2fab 7263 /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 3.29(q29) format */
<> 132:9baf128c2fab 7264 out = ((q31_t) (((q63_t) x1 * (0x7FFFFFFF - xfract)) >> 32));
<> 132:9baf128c2fab 7265 acc = ((q31_t) (((q63_t) out * (0x7FFFFFFF - yfract)) >> 32));
<> 132:9baf128c2fab 7266
<> 132:9baf128c2fab 7267 /* x2 * (xfract) * (1-yfract) in 3.29(q29) and adding to acc */
<> 132:9baf128c2fab 7268 out = ((q31_t) ((q63_t) x2 * (0x7FFFFFFF - yfract) >> 32));
<> 132:9baf128c2fab 7269 acc += ((q31_t) ((q63_t) out * (xfract) >> 32));
<> 132:9baf128c2fab 7270
<> 132:9baf128c2fab 7271 /* y1 * (1 - xfract) * (yfract) in 3.29(q29) and adding to acc */
<> 132:9baf128c2fab 7272 out = ((q31_t) ((q63_t) y1 * (0x7FFFFFFF - xfract) >> 32));
<> 132:9baf128c2fab 7273 acc += ((q31_t) ((q63_t) out * (yfract) >> 32));
<> 132:9baf128c2fab 7274
<> 132:9baf128c2fab 7275 /* y2 * (xfract) * (yfract) in 3.29(q29) and adding to acc */
<> 132:9baf128c2fab 7276 out = ((q31_t) ((q63_t) y2 * (xfract) >> 32));
<> 132:9baf128c2fab 7277 acc += ((q31_t) ((q63_t) out * (yfract) >> 32));
<> 132:9baf128c2fab 7278
<> 132:9baf128c2fab 7279 /* Convert acc to 1.31(q31) format */
<> 132:9baf128c2fab 7280 return (acc << 2u);
<> 132:9baf128c2fab 7281
<> 132:9baf128c2fab 7282 }
<> 132:9baf128c2fab 7283
<> 132:9baf128c2fab 7284 /**
<> 132:9baf128c2fab 7285 * @brief Q15 bilinear interpolation.
<> 132:9baf128c2fab 7286 * @param[in,out] *S points to an instance of the interpolation structure.
<> 132:9baf128c2fab 7287 * @param[in] X interpolation coordinate in 12.20 format.
<> 132:9baf128c2fab 7288 * @param[in] Y interpolation coordinate in 12.20 format.
<> 132:9baf128c2fab 7289 * @return out interpolated value.
<> 132:9baf128c2fab 7290 */
<> 132:9baf128c2fab 7291
<> 132:9baf128c2fab 7292 static __INLINE q15_t arm_bilinear_interp_q15(
<> 132:9baf128c2fab 7293 arm_bilinear_interp_instance_q15 * S,
<> 132:9baf128c2fab 7294 q31_t X,
<> 132:9baf128c2fab 7295 q31_t Y)
<> 132:9baf128c2fab 7296 {
<> 132:9baf128c2fab 7297 q63_t acc = 0; /* output */
<> 132:9baf128c2fab 7298 q31_t out; /* Temporary output */
<> 132:9baf128c2fab 7299 q15_t x1, x2, y1, y2; /* Nearest output values */
<> 132:9baf128c2fab 7300 q31_t xfract, yfract; /* X, Y fractional parts */
<> 132:9baf128c2fab 7301 int32_t rI, cI; /* Row and column indices */
<> 132:9baf128c2fab 7302 q15_t *pYData = S->pData; /* pointer to output table values */
<> 132:9baf128c2fab 7303 uint32_t nCols = S->numCols; /* num of rows */
<> 132:9baf128c2fab 7304
<> 132:9baf128c2fab 7305 /* Input is in 12.20 format */
<> 132:9baf128c2fab 7306 /* 12 bits for the table index */
<> 132:9baf128c2fab 7307 /* Index value calculation */
<> 132:9baf128c2fab 7308 rI = ((X & 0xFFF00000) >> 20);
<> 132:9baf128c2fab 7309
<> 132:9baf128c2fab 7310 /* Input is in 12.20 format */
<> 132:9baf128c2fab 7311 /* 12 bits for the table index */
<> 132:9baf128c2fab 7312 /* Index value calculation */
<> 132:9baf128c2fab 7313 cI = ((Y & 0xFFF00000) >> 20);
<> 132:9baf128c2fab 7314
<> 132:9baf128c2fab 7315 /* Care taken for table outside boundary */
<> 132:9baf128c2fab 7316 /* Returns zero output when values are outside table boundary */
<> 132:9baf128c2fab 7317 if(rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
<> 132:9baf128c2fab 7318 {
<> 132:9baf128c2fab 7319 return (0);
<> 132:9baf128c2fab 7320 }
<> 132:9baf128c2fab 7321
<> 132:9baf128c2fab 7322 /* 20 bits for the fractional part */
<> 132:9baf128c2fab 7323 /* xfract should be in 12.20 format */
<> 132:9baf128c2fab 7324 xfract = (X & 0x000FFFFF);
<> 132:9baf128c2fab 7325
<> 132:9baf128c2fab 7326 /* Read two nearest output values from the index */
<> 132:9baf128c2fab 7327 x1 = pYData[(rI) + nCols * (cI)];
<> 132:9baf128c2fab 7328 x2 = pYData[(rI) + nCols * (cI) + 1u];
<> 132:9baf128c2fab 7329
<> 132:9baf128c2fab 7330
<> 132:9baf128c2fab 7331 /* 20 bits for the fractional part */
<> 132:9baf128c2fab 7332 /* yfract should be in 12.20 format */
<> 132:9baf128c2fab 7333 yfract = (Y & 0x000FFFFF);
<> 132:9baf128c2fab 7334
<> 132:9baf128c2fab 7335 /* Read two nearest output values from the index */
<> 132:9baf128c2fab 7336 y1 = pYData[(rI) + nCols * (cI + 1)];
<> 132:9baf128c2fab 7337 y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
<> 132:9baf128c2fab 7338
<> 132:9baf128c2fab 7339 /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 13.51 format */
<> 132:9baf128c2fab 7340
<> 132:9baf128c2fab 7341 /* x1 is in 1.15(q15), xfract in 12.20 format and out is in 13.35 format */
<> 132:9baf128c2fab 7342 /* convert 13.35 to 13.31 by right shifting and out is in 1.31 */
<> 132:9baf128c2fab 7343 out = (q31_t) (((q63_t) x1 * (0xFFFFF - xfract)) >> 4u);
<> 132:9baf128c2fab 7344 acc = ((q63_t) out * (0xFFFFF - yfract));
<> 132:9baf128c2fab 7345
<> 132:9baf128c2fab 7346 /* x2 * (xfract) * (1-yfract) in 1.51 and adding to acc */
<> 132:9baf128c2fab 7347 out = (q31_t) (((q63_t) x2 * (0xFFFFF - yfract)) >> 4u);
<> 132:9baf128c2fab 7348 acc += ((q63_t) out * (xfract));
<> 132:9baf128c2fab 7349
<> 132:9baf128c2fab 7350 /* y1 * (1 - xfract) * (yfract) in 1.51 and adding to acc */
<> 132:9baf128c2fab 7351 out = (q31_t) (((q63_t) y1 * (0xFFFFF - xfract)) >> 4u);
<> 132:9baf128c2fab 7352 acc += ((q63_t) out * (yfract));
<> 132:9baf128c2fab 7353
<> 132:9baf128c2fab 7354 /* y2 * (xfract) * (yfract) in 1.51 and adding to acc */
<> 132:9baf128c2fab 7355 out = (q31_t) (((q63_t) y2 * (xfract)) >> 4u);
<> 132:9baf128c2fab 7356 acc += ((q63_t) out * (yfract));
<> 132:9baf128c2fab 7357
<> 132:9baf128c2fab 7358 /* acc is in 13.51 format and down shift acc by 36 times */
<> 132:9baf128c2fab 7359 /* Convert out to 1.15 format */
<> 132:9baf128c2fab 7360 return (acc >> 36);
<> 132:9baf128c2fab 7361
<> 132:9baf128c2fab 7362 }
<> 132:9baf128c2fab 7363
<> 132:9baf128c2fab 7364 /**
<> 132:9baf128c2fab 7365 * @brief Q7 bilinear interpolation.
<> 132:9baf128c2fab 7366 * @param[in,out] *S points to an instance of the interpolation structure.
<> 132:9baf128c2fab 7367 * @param[in] X interpolation coordinate in 12.20 format.
<> 132:9baf128c2fab 7368 * @param[in] Y interpolation coordinate in 12.20 format.
<> 132:9baf128c2fab 7369 * @return out interpolated value.
<> 132:9baf128c2fab 7370 */
<> 132:9baf128c2fab 7371
<> 132:9baf128c2fab 7372 static __INLINE q7_t arm_bilinear_interp_q7(
<> 132:9baf128c2fab 7373 arm_bilinear_interp_instance_q7 * S,
<> 132:9baf128c2fab 7374 q31_t X,
<> 132:9baf128c2fab 7375 q31_t Y)
<> 132:9baf128c2fab 7376 {
<> 132:9baf128c2fab 7377 q63_t acc = 0; /* output */
<> 132:9baf128c2fab 7378 q31_t out; /* Temporary output */
<> 132:9baf128c2fab 7379 q31_t xfract, yfract; /* X, Y fractional parts */
<> 132:9baf128c2fab 7380 q7_t x1, x2, y1, y2; /* Nearest output values */
<> 132:9baf128c2fab 7381 int32_t rI, cI; /* Row and column indices */
<> 132:9baf128c2fab 7382 q7_t *pYData = S->pData; /* pointer to output table values */
<> 132:9baf128c2fab 7383 uint32_t nCols = S->numCols; /* num of rows */
<> 132:9baf128c2fab 7384
<> 132:9baf128c2fab 7385 /* Input is in 12.20 format */
<> 132:9baf128c2fab 7386 /* 12 bits for the table index */
<> 132:9baf128c2fab 7387 /* Index value calculation */
<> 132:9baf128c2fab 7388 rI = ((X & 0xFFF00000) >> 20);
<> 132:9baf128c2fab 7389
<> 132:9baf128c2fab 7390 /* Input is in 12.20 format */
<> 132:9baf128c2fab 7391 /* 12 bits for the table index */
<> 132:9baf128c2fab 7392 /* Index value calculation */
<> 132:9baf128c2fab 7393 cI = ((Y & 0xFFF00000) >> 20);
<> 132:9baf128c2fab 7394
<> 132:9baf128c2fab 7395 /* Care taken for table outside boundary */
<> 132:9baf128c2fab 7396 /* Returns zero output when values are outside table boundary */
<> 132:9baf128c2fab 7397 if(rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
<> 132:9baf128c2fab 7398 {
<> 132:9baf128c2fab 7399 return (0);
<> 132:9baf128c2fab 7400 }
<> 132:9baf128c2fab 7401
<> 132:9baf128c2fab 7402 /* 20 bits for the fractional part */
<> 132:9baf128c2fab 7403 /* xfract should be in 12.20 format */
<> 132:9baf128c2fab 7404 xfract = (X & 0x000FFFFF);
<> 132:9baf128c2fab 7405
<> 132:9baf128c2fab 7406 /* Read two nearest output values from the index */
<> 132:9baf128c2fab 7407 x1 = pYData[(rI) + nCols * (cI)];
<> 132:9baf128c2fab 7408 x2 = pYData[(rI) + nCols * (cI) + 1u];
<> 132:9baf128c2fab 7409
<> 132:9baf128c2fab 7410
<> 132:9baf128c2fab 7411 /* 20 bits for the fractional part */
<> 132:9baf128c2fab 7412 /* yfract should be in 12.20 format */
<> 132:9baf128c2fab 7413 yfract = (Y & 0x000FFFFF);
<> 132:9baf128c2fab 7414
<> 132:9baf128c2fab 7415 /* Read two nearest output values from the index */
<> 132:9baf128c2fab 7416 y1 = pYData[(rI) + nCols * (cI + 1)];
<> 132:9baf128c2fab 7417 y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
<> 132:9baf128c2fab 7418
<> 132:9baf128c2fab 7419 /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 16.47 format */
<> 132:9baf128c2fab 7420 out = ((x1 * (0xFFFFF - xfract)));
<> 132:9baf128c2fab 7421 acc = (((q63_t) out * (0xFFFFF - yfract)));
<> 132:9baf128c2fab 7422
<> 132:9baf128c2fab 7423 /* x2 * (xfract) * (1-yfract) in 2.22 and adding to acc */
<> 132:9baf128c2fab 7424 out = ((x2 * (0xFFFFF - yfract)));
<> 132:9baf128c2fab 7425 acc += (((q63_t) out * (xfract)));
<> 132:9baf128c2fab 7426
<> 132:9baf128c2fab 7427 /* y1 * (1 - xfract) * (yfract) in 2.22 and adding to acc */
<> 132:9baf128c2fab 7428 out = ((y1 * (0xFFFFF - xfract)));
<> 132:9baf128c2fab 7429 acc += (((q63_t) out * (yfract)));
<> 132:9baf128c2fab 7430
<> 132:9baf128c2fab 7431 /* y2 * (xfract) * (yfract) in 2.22 and adding to acc */
<> 132:9baf128c2fab 7432 out = ((y2 * (yfract)));
<> 132:9baf128c2fab 7433 acc += (((q63_t) out * (xfract)));
<> 132:9baf128c2fab 7434
<> 132:9baf128c2fab 7435 /* acc in 16.47 format and down shift by 40 to convert to 1.7 format */
<> 132:9baf128c2fab 7436 return (acc >> 40);
<> 132:9baf128c2fab 7437
<> 132:9baf128c2fab 7438 }
<> 132:9baf128c2fab 7439
<> 132:9baf128c2fab 7440 /**
<> 132:9baf128c2fab 7441 * @} end of BilinearInterpolate group
<> 132:9baf128c2fab 7442 */
<> 132:9baf128c2fab 7443
<> 132:9baf128c2fab 7444
<> 132:9baf128c2fab 7445 //SMMLAR
<> 132:9baf128c2fab 7446 #define multAcc_32x32_keep32_R(a, x, y) \
<> 132:9baf128c2fab 7447 a = (q31_t) (((((q63_t) a) << 32) + ((q63_t) x * y) + 0x80000000LL ) >> 32)
<> 132:9baf128c2fab 7448
<> 132:9baf128c2fab 7449 //SMMLSR
<> 132:9baf128c2fab 7450 #define multSub_32x32_keep32_R(a, x, y) \
<> 132:9baf128c2fab 7451 a = (q31_t) (((((q63_t) a) << 32) - ((q63_t) x * y) + 0x80000000LL ) >> 32)
<> 132:9baf128c2fab 7452
<> 132:9baf128c2fab 7453 //SMMULR
<> 132:9baf128c2fab 7454 #define mult_32x32_keep32_R(a, x, y) \
<> 132:9baf128c2fab 7455 a = (q31_t) (((q63_t) x * y + 0x80000000LL ) >> 32)
<> 132:9baf128c2fab 7456
<> 132:9baf128c2fab 7457 //SMMLA
<> 132:9baf128c2fab 7458 #define multAcc_32x32_keep32(a, x, y) \
<> 132:9baf128c2fab 7459 a += (q31_t) (((q63_t) x * y) >> 32)
<> 132:9baf128c2fab 7460
<> 132:9baf128c2fab 7461 //SMMLS
<> 132:9baf128c2fab 7462 #define multSub_32x32_keep32(a, x, y) \
<> 132:9baf128c2fab 7463 a -= (q31_t) (((q63_t) x * y) >> 32)
<> 132:9baf128c2fab 7464
<> 132:9baf128c2fab 7465 //SMMUL
<> 132:9baf128c2fab 7466 #define mult_32x32_keep32(a, x, y) \
<> 132:9baf128c2fab 7467 a = (q31_t) (((q63_t) x * y ) >> 32)
<> 132:9baf128c2fab 7468
<> 132:9baf128c2fab 7469
<> 132:9baf128c2fab 7470 #if defined ( __CC_ARM ) //Keil
<> 132:9baf128c2fab 7471
<> 132:9baf128c2fab 7472 //Enter low optimization region - place directly above function definition
<> 132:9baf128c2fab 7473 #ifdef ARM_MATH_CM4
<> 132:9baf128c2fab 7474 #define LOW_OPTIMIZATION_ENTER \
<> 132:9baf128c2fab 7475 _Pragma ("push") \
<> 132:9baf128c2fab 7476 _Pragma ("O1")
<> 132:9baf128c2fab 7477 #else
<> 132:9baf128c2fab 7478 #define LOW_OPTIMIZATION_ENTER
<> 132:9baf128c2fab 7479 #endif
<> 132:9baf128c2fab 7480
<> 132:9baf128c2fab 7481 //Exit low optimization region - place directly after end of function definition
<> 132:9baf128c2fab 7482 #ifdef ARM_MATH_CM4
<> 132:9baf128c2fab 7483 #define LOW_OPTIMIZATION_EXIT \
<> 132:9baf128c2fab 7484 _Pragma ("pop")
<> 132:9baf128c2fab 7485 #else
<> 132:9baf128c2fab 7486 #define LOW_OPTIMIZATION_EXIT
<> 132:9baf128c2fab 7487 #endif
<> 132:9baf128c2fab 7488
<> 132:9baf128c2fab 7489 //Enter low optimization region - place directly above function definition
<> 132:9baf128c2fab 7490 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
<> 132:9baf128c2fab 7491
<> 132:9baf128c2fab 7492 //Exit low optimization region - place directly after end of function definition
<> 132:9baf128c2fab 7493 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 132:9baf128c2fab 7494
<> 132:9baf128c2fab 7495 #elif defined(__ICCARM__) //IAR
<> 132:9baf128c2fab 7496
<> 132:9baf128c2fab 7497 //Enter low optimization region - place directly above function definition
<> 132:9baf128c2fab 7498 #ifdef ARM_MATH_CM4
<> 132:9baf128c2fab 7499 #define LOW_OPTIMIZATION_ENTER \
<> 132:9baf128c2fab 7500 _Pragma ("optimize=low")
<> 132:9baf128c2fab 7501 #else
<> 132:9baf128c2fab 7502 #define LOW_OPTIMIZATION_ENTER
<> 132:9baf128c2fab 7503 #endif
<> 132:9baf128c2fab 7504
<> 132:9baf128c2fab 7505 //Exit low optimization region - place directly after end of function definition
<> 132:9baf128c2fab 7506 #define LOW_OPTIMIZATION_EXIT
<> 132:9baf128c2fab 7507
<> 132:9baf128c2fab 7508 //Enter low optimization region - place directly above function definition
<> 132:9baf128c2fab 7509 #ifdef ARM_MATH_CM4
<> 132:9baf128c2fab 7510 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER \
<> 132:9baf128c2fab 7511 _Pragma ("optimize=low")
<> 132:9baf128c2fab 7512 #else
<> 132:9baf128c2fab 7513 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
<> 132:9baf128c2fab 7514 #endif
<> 132:9baf128c2fab 7515
<> 132:9baf128c2fab 7516 //Exit low optimization region - place directly after end of function definition
<> 132:9baf128c2fab 7517 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 132:9baf128c2fab 7518
<> 132:9baf128c2fab 7519 #elif defined(__GNUC__)
<> 132:9baf128c2fab 7520
<> 132:9baf128c2fab 7521 #define LOW_OPTIMIZATION_ENTER __attribute__(( optimize("-O1") ))
<> 132:9baf128c2fab 7522
<> 132:9baf128c2fab 7523 #define LOW_OPTIMIZATION_EXIT
<> 132:9baf128c2fab 7524
<> 132:9baf128c2fab 7525 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
<> 132:9baf128c2fab 7526
<> 132:9baf128c2fab 7527 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 132:9baf128c2fab 7528
<> 132:9baf128c2fab 7529 #elif defined(__CSMC__) // Cosmic
<> 132:9baf128c2fab 7530
<> 132:9baf128c2fab 7531 #define LOW_OPTIMIZATION_ENTER
<> 132:9baf128c2fab 7532 #define LOW_OPTIMIZATION_EXIT
<> 132:9baf128c2fab 7533 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
<> 132:9baf128c2fab 7534 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 132:9baf128c2fab 7535
<> 132:9baf128c2fab 7536 #elif defined(__TASKING__) // TASKING
<> 132:9baf128c2fab 7537
<> 132:9baf128c2fab 7538 #define LOW_OPTIMIZATION_ENTER
<> 132:9baf128c2fab 7539 #define LOW_OPTIMIZATION_EXIT
<> 132:9baf128c2fab 7540 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
<> 132:9baf128c2fab 7541 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 132:9baf128c2fab 7542
<> 132:9baf128c2fab 7543 #endif
<> 132:9baf128c2fab 7544
<> 132:9baf128c2fab 7545
<> 132:9baf128c2fab 7546 #ifdef __cplusplus
<> 132:9baf128c2fab 7547 }
<> 132:9baf128c2fab 7548 #endif
<> 132:9baf128c2fab 7549
<> 132:9baf128c2fab 7550
<> 132:9baf128c2fab 7551 #endif /* _ARM_MATH_H */
<> 132:9baf128c2fab 7552
<> 132:9baf128c2fab 7553 /**
<> 132:9baf128c2fab 7554 *
<> 132:9baf128c2fab 7555 * End of file.
<> 132:9baf128c2fab 7556 */