The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
AnnaBridge
Date:
Fri May 26 12:30:20 2017 +0100
Revision:
143:86740a56073b
Parent:
139:856d2700e60b
Child:
145:64910690c574
Release 143 of the mbed library.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 139:856d2700e60b 1 /* ----------------------------------------------------------------------
<> 139:856d2700e60b 2 * Copyright (C) 2010-2015 ARM Limited. All rights reserved.
<> 139:856d2700e60b 3 *
<> 139:856d2700e60b 4 * $Date: 19. March 2015
<> 139:856d2700e60b 5 * $Revision: V.1.4.5
<> 139:856d2700e60b 6 *
<> 139:856d2700e60b 7 * Project: CMSIS DSP Library
<> 139:856d2700e60b 8 * Title: arm_math.h
<> 139:856d2700e60b 9 *
<> 139:856d2700e60b 10 * Description: Public header file for CMSIS DSP Library
<> 139:856d2700e60b 11 *
<> 139:856d2700e60b 12 * Target Processor: Cortex-M7/Cortex-M4/Cortex-M3/Cortex-M0
<> 139:856d2700e60b 13 *
<> 139:856d2700e60b 14 * Redistribution and use in source and binary forms, with or without
<> 139:856d2700e60b 15 * modification, are permitted provided that the following conditions
<> 139:856d2700e60b 16 * are met:
<> 139:856d2700e60b 17 * - Redistributions of source code must retain the above copyright
<> 139:856d2700e60b 18 * notice, this list of conditions and the following disclaimer.
<> 139:856d2700e60b 19 * - Redistributions in binary form must reproduce the above copyright
<> 139:856d2700e60b 20 * notice, this list of conditions and the following disclaimer in
<> 139:856d2700e60b 21 * the documentation and/or other materials provided with the
<> 139:856d2700e60b 22 * distribution.
<> 139:856d2700e60b 23 * - Neither the name of ARM LIMITED nor the names of its contributors
<> 139:856d2700e60b 24 * may be used to endorse or promote products derived from this
<> 139:856d2700e60b 25 * software without specific prior written permission.
<> 139:856d2700e60b 26 *
<> 139:856d2700e60b 27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
<> 139:856d2700e60b 28 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
<> 139:856d2700e60b 29 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
<> 139:856d2700e60b 30 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
<> 139:856d2700e60b 31 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
<> 139:856d2700e60b 32 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
<> 139:856d2700e60b 33 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
<> 139:856d2700e60b 34 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
<> 139:856d2700e60b 35 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
<> 139:856d2700e60b 36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
<> 139:856d2700e60b 37 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
<> 139:856d2700e60b 38 * POSSIBILITY OF SUCH DAMAGE.
<> 139:856d2700e60b 39 * -------------------------------------------------------------------- */
<> 139:856d2700e60b 40
<> 139:856d2700e60b 41 /**
<> 139:856d2700e60b 42 \mainpage CMSIS DSP Software Library
<> 139:856d2700e60b 43 *
<> 139:856d2700e60b 44 * Introduction
<> 139:856d2700e60b 45 * ------------
<> 139:856d2700e60b 46 *
<> 139:856d2700e60b 47 * This user manual describes the CMSIS DSP software library,
<> 139:856d2700e60b 48 * a suite of common signal processing functions for use on Cortex-M processor based devices.
<> 139:856d2700e60b 49 *
<> 139:856d2700e60b 50 * The library is divided into a number of functions each covering a specific category:
<> 139:856d2700e60b 51 * - Basic math functions
<> 139:856d2700e60b 52 * - Fast math functions
<> 139:856d2700e60b 53 * - Complex math functions
<> 139:856d2700e60b 54 * - Filters
<> 139:856d2700e60b 55 * - Matrix functions
<> 139:856d2700e60b 56 * - Transforms
<> 139:856d2700e60b 57 * - Motor control functions
<> 139:856d2700e60b 58 * - Statistical functions
<> 139:856d2700e60b 59 * - Support functions
<> 139:856d2700e60b 60 * - Interpolation functions
<> 139:856d2700e60b 61 *
<> 139:856d2700e60b 62 * The library has separate functions for operating on 8-bit integers, 16-bit integers,
<> 139:856d2700e60b 63 * 32-bit integer and 32-bit floating-point values.
<> 139:856d2700e60b 64 *
<> 139:856d2700e60b 65 * Using the Library
<> 139:856d2700e60b 66 * ------------
<> 139:856d2700e60b 67 *
<> 139:856d2700e60b 68 * The library installer contains prebuilt versions of the libraries in the <code>Lib</code> folder.
<> 139:856d2700e60b 69 * - arm_cortexM7lfdp_math.lib (Little endian and Double Precision Floating Point Unit on Cortex-M7)
<> 139:856d2700e60b 70 * - arm_cortexM7bfdp_math.lib (Big endian and Double Precision Floating Point Unit on Cortex-M7)
<> 139:856d2700e60b 71 * - arm_cortexM7lfsp_math.lib (Little endian and Single Precision Floating Point Unit on Cortex-M7)
<> 139:856d2700e60b 72 * - arm_cortexM7bfsp_math.lib (Big endian and Single Precision Floating Point Unit on Cortex-M7)
<> 139:856d2700e60b 73 * - arm_cortexM7l_math.lib (Little endian on Cortex-M7)
<> 139:856d2700e60b 74 * - arm_cortexM7b_math.lib (Big endian on Cortex-M7)
<> 139:856d2700e60b 75 * - arm_cortexM4lf_math.lib (Little endian and Floating Point Unit on Cortex-M4)
<> 139:856d2700e60b 76 * - arm_cortexM4bf_math.lib (Big endian and Floating Point Unit on Cortex-M4)
<> 139:856d2700e60b 77 * - arm_cortexM4l_math.lib (Little endian on Cortex-M4)
<> 139:856d2700e60b 78 * - arm_cortexM4b_math.lib (Big endian on Cortex-M4)
<> 139:856d2700e60b 79 * - arm_cortexM3l_math.lib (Little endian on Cortex-M3)
<> 139:856d2700e60b 80 * - arm_cortexM3b_math.lib (Big endian on Cortex-M3)
<> 139:856d2700e60b 81 * - arm_cortexM0l_math.lib (Little endian on Cortex-M0 / CortexM0+)
<> 139:856d2700e60b 82 * - arm_cortexM0b_math.lib (Big endian on Cortex-M0 / CortexM0+)
<> 139:856d2700e60b 83 *
<> 139:856d2700e60b 84 * The library functions are declared in the public file <code>arm_math.h</code> which is placed in the <code>Include</code> folder.
<> 139:856d2700e60b 85 * Simply include this file and link the appropriate library in the application and begin calling the library functions. The Library supports single
<> 139:856d2700e60b 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.
<> 139:856d2700e60b 87 * Define the appropriate pre processor MACRO ARM_MATH_CM7 or ARM_MATH_CM4 or ARM_MATH_CM3 or
<> 139:856d2700e60b 88 * ARM_MATH_CM0 or ARM_MATH_CM0PLUS depending on the target processor in the application.
<> 139:856d2700e60b 89 *
<> 139:856d2700e60b 90 * Examples
<> 139:856d2700e60b 91 * --------
<> 139:856d2700e60b 92 *
<> 139:856d2700e60b 93 * The library ships with a number of examples which demonstrate how to use the library functions.
<> 139:856d2700e60b 94 *
<> 139:856d2700e60b 95 * Toolchain Support
<> 139:856d2700e60b 96 * ------------
<> 139:856d2700e60b 97 *
<> 139:856d2700e60b 98 * The library has been developed and tested with MDK-ARM version 5.14.0.0
<> 139:856d2700e60b 99 * The library is being tested in GCC and IAR toolchains and updates on this activity will be made available shortly.
<> 139:856d2700e60b 100 *
<> 139:856d2700e60b 101 * Building the Library
<> 139:856d2700e60b 102 * ------------
<> 139:856d2700e60b 103 *
<> 139:856d2700e60b 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.
<> 139:856d2700e60b 105 * - arm_cortexM_math.uvprojx
<> 139:856d2700e60b 106 *
<> 139:856d2700e60b 107 *
<> 139:856d2700e60b 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.
<> 139:856d2700e60b 109 *
<> 139:856d2700e60b 110 * Pre-processor Macros
<> 139:856d2700e60b 111 * ------------
<> 139:856d2700e60b 112 *
<> 139:856d2700e60b 113 * Each library project have differant pre-processor macros.
<> 139:856d2700e60b 114 *
<> 139:856d2700e60b 115 * - UNALIGNED_SUPPORT_DISABLE:
<> 139:856d2700e60b 116 *
<> 139:856d2700e60b 117 * Define macro UNALIGNED_SUPPORT_DISABLE, If the silicon does not support unaligned memory access
<> 139:856d2700e60b 118 *
<> 139:856d2700e60b 119 * - ARM_MATH_BIG_ENDIAN:
<> 139:856d2700e60b 120 *
<> 139:856d2700e60b 121 * Define macro ARM_MATH_BIG_ENDIAN to build the library for big endian targets. By default library builds for little endian targets.
<> 139:856d2700e60b 122 *
<> 139:856d2700e60b 123 * - ARM_MATH_MATRIX_CHECK:
<> 139:856d2700e60b 124 *
<> 139:856d2700e60b 125 * Define macro ARM_MATH_MATRIX_CHECK for checking on the input and output sizes of matrices
<> 139:856d2700e60b 126 *
<> 139:856d2700e60b 127 * - ARM_MATH_ROUNDING:
<> 139:856d2700e60b 128 *
<> 139:856d2700e60b 129 * Define macro ARM_MATH_ROUNDING for rounding on support functions
<> 139:856d2700e60b 130 *
<> 139:856d2700e60b 131 * - ARM_MATH_CMx:
<> 139:856d2700e60b 132 *
<> 139:856d2700e60b 133 * Define macro ARM_MATH_CM4 for building the library on Cortex-M4 target, ARM_MATH_CM3 for building library on Cortex-M3 target
<> 139:856d2700e60b 134 * and ARM_MATH_CM0 for building library on Cortex-M0 target, ARM_MATH_CM0PLUS for building library on Cortex-M0+ target, and
<> 139:856d2700e60b 135 * ARM_MATH_CM7 for building the library on cortex-M7.
<> 139:856d2700e60b 136 *
<> 139:856d2700e60b 137 * - __FPU_PRESENT:
<> 139:856d2700e60b 138 *
<> 139:856d2700e60b 139 * Initialize macro __FPU_PRESENT = 1 when building on FPU supported Targets. Enable this macro for M4bf and M4lf libraries
<> 139:856d2700e60b 140 *
<> 139:856d2700e60b 141 * <hr>
<> 139:856d2700e60b 142 * CMSIS-DSP in ARM::CMSIS Pack
<> 139:856d2700e60b 143 * -----------------------------
<> 139:856d2700e60b 144 *
<> 139:856d2700e60b 145 * The following files relevant to CMSIS-DSP are present in the <b>ARM::CMSIS</b> Pack directories:
<> 139:856d2700e60b 146 * |File/Folder |Content |
<> 139:856d2700e60b 147 * |------------------------------|------------------------------------------------------------------------|
<> 139:856d2700e60b 148 * |\b CMSIS\\Documentation\\DSP | This documentation |
<> 139:856d2700e60b 149 * |\b CMSIS\\DSP_Lib | Software license agreement (license.txt) |
<> 139:856d2700e60b 150 * |\b CMSIS\\DSP_Lib\\Examples | Example projects demonstrating the usage of the library functions |
<> 139:856d2700e60b 151 * |\b CMSIS\\DSP_Lib\\Source | Source files for rebuilding the library |
<> 139:856d2700e60b 152 *
<> 139:856d2700e60b 153 * <hr>
<> 139:856d2700e60b 154 * Revision History of CMSIS-DSP
<> 139:856d2700e60b 155 * ------------
<> 139:856d2700e60b 156 * Please refer to \ref ChangeLog_pg.
<> 139:856d2700e60b 157 *
<> 139:856d2700e60b 158 * Copyright Notice
<> 139:856d2700e60b 159 * ------------
<> 139:856d2700e60b 160 *
<> 139:856d2700e60b 161 * Copyright (C) 2010-2015 ARM Limited. All rights reserved.
<> 139:856d2700e60b 162 */
<> 139:856d2700e60b 163
<> 139:856d2700e60b 164
<> 139:856d2700e60b 165 /**
<> 139:856d2700e60b 166 * @defgroup groupMath Basic Math Functions
<> 139:856d2700e60b 167 */
<> 139:856d2700e60b 168
<> 139:856d2700e60b 169 /**
<> 139:856d2700e60b 170 * @defgroup groupFastMath Fast Math Functions
<> 139:856d2700e60b 171 * This set of functions provides a fast approximation to sine, cosine, and square root.
<> 139:856d2700e60b 172 * As compared to most of the other functions in the CMSIS math library, the fast math functions
<> 139:856d2700e60b 173 * operate on individual values and not arrays.
<> 139:856d2700e60b 174 * There are separate functions for Q15, Q31, and floating-point data.
<> 139:856d2700e60b 175 *
<> 139:856d2700e60b 176 */
<> 139:856d2700e60b 177
<> 139:856d2700e60b 178 /**
<> 139:856d2700e60b 179 * @defgroup groupCmplxMath Complex Math Functions
<> 139:856d2700e60b 180 * This set of functions operates on complex data vectors.
<> 139:856d2700e60b 181 * The data in the complex arrays is stored in an interleaved fashion
<> 139:856d2700e60b 182 * (real, imag, real, imag, ...).
<> 139:856d2700e60b 183 * In the API functions, the number of samples in a complex array refers
<> 139:856d2700e60b 184 * to the number of complex values; the array contains twice this number of
<> 139:856d2700e60b 185 * real values.
<> 139:856d2700e60b 186 */
<> 139:856d2700e60b 187
<> 139:856d2700e60b 188 /**
<> 139:856d2700e60b 189 * @defgroup groupFilters Filtering Functions
<> 139:856d2700e60b 190 */
<> 139:856d2700e60b 191
<> 139:856d2700e60b 192 /**
<> 139:856d2700e60b 193 * @defgroup groupMatrix Matrix Functions
<> 139:856d2700e60b 194 *
<> 139:856d2700e60b 195 * This set of functions provides basic matrix math operations.
<> 139:856d2700e60b 196 * The functions operate on matrix data structures. For example,
<> 139:856d2700e60b 197 * the type
<> 139:856d2700e60b 198 * definition for the floating-point matrix structure is shown
<> 139:856d2700e60b 199 * below:
<> 139:856d2700e60b 200 * <pre>
<> 139:856d2700e60b 201 * typedef struct
<> 139:856d2700e60b 202 * {
<> 139:856d2700e60b 203 * uint16_t numRows; // number of rows of the matrix.
<> 139:856d2700e60b 204 * uint16_t numCols; // number of columns of the matrix.
<> 139:856d2700e60b 205 * float32_t *pData; // points to the data of the matrix.
<> 139:856d2700e60b 206 * } arm_matrix_instance_f32;
<> 139:856d2700e60b 207 * </pre>
<> 139:856d2700e60b 208 * There are similar definitions for Q15 and Q31 data types.
<> 139:856d2700e60b 209 *
<> 139:856d2700e60b 210 * The structure specifies the size of the matrix and then points to
<> 139:856d2700e60b 211 * an array of data. The array is of size <code>numRows X numCols</code>
<> 139:856d2700e60b 212 * and the values are arranged in row order. That is, the
<> 139:856d2700e60b 213 * matrix element (i, j) is stored at:
<> 139:856d2700e60b 214 * <pre>
<> 139:856d2700e60b 215 * pData[i*numCols + j]
<> 139:856d2700e60b 216 * </pre>
<> 139:856d2700e60b 217 *
<> 139:856d2700e60b 218 * \par Init Functions
<> 139:856d2700e60b 219 * There is an associated initialization function for each type of matrix
<> 139:856d2700e60b 220 * data structure.
<> 139:856d2700e60b 221 * The initialization function sets the values of the internal structure fields.
<> 139:856d2700e60b 222 * Refer to the function <code>arm_mat_init_f32()</code>, <code>arm_mat_init_q31()</code>
<> 139:856d2700e60b 223 * and <code>arm_mat_init_q15()</code> for floating-point, Q31 and Q15 types, respectively.
<> 139:856d2700e60b 224 *
<> 139:856d2700e60b 225 * \par
<> 139:856d2700e60b 226 * Use of the initialization function is optional. However, if initialization function is used
<> 139:856d2700e60b 227 * then the instance structure cannot be placed into a const data section.
<> 139:856d2700e60b 228 * To place the instance structure in a const data
<> 139:856d2700e60b 229 * section, manually initialize the data structure. For example:
<> 139:856d2700e60b 230 * <pre>
<> 139:856d2700e60b 231 * <code>arm_matrix_instance_f32 S = {nRows, nColumns, pData};</code>
<> 139:856d2700e60b 232 * <code>arm_matrix_instance_q31 S = {nRows, nColumns, pData};</code>
<> 139:856d2700e60b 233 * <code>arm_matrix_instance_q15 S = {nRows, nColumns, pData};</code>
<> 139:856d2700e60b 234 * </pre>
<> 139:856d2700e60b 235 * where <code>nRows</code> specifies the number of rows, <code>nColumns</code>
<> 139:856d2700e60b 236 * specifies the number of columns, and <code>pData</code> points to the
<> 139:856d2700e60b 237 * data array.
<> 139:856d2700e60b 238 *
<> 139:856d2700e60b 239 * \par Size Checking
<> 139:856d2700e60b 240 * By default all of the matrix functions perform size checking on the input and
<> 139:856d2700e60b 241 * output matrices. For example, the matrix addition function verifies that the
<> 139:856d2700e60b 242 * two input matrices and the output matrix all have the same number of rows and
<> 139:856d2700e60b 243 * columns. If the size check fails the functions return:
<> 139:856d2700e60b 244 * <pre>
<> 139:856d2700e60b 245 * ARM_MATH_SIZE_MISMATCH
<> 139:856d2700e60b 246 * </pre>
<> 139:856d2700e60b 247 * Otherwise the functions return
<> 139:856d2700e60b 248 * <pre>
<> 139:856d2700e60b 249 * ARM_MATH_SUCCESS
<> 139:856d2700e60b 250 * </pre>
<> 139:856d2700e60b 251 * There is some overhead associated with this matrix size checking.
<> 139:856d2700e60b 252 * The matrix size checking is enabled via the \#define
<> 139:856d2700e60b 253 * <pre>
<> 139:856d2700e60b 254 * ARM_MATH_MATRIX_CHECK
<> 139:856d2700e60b 255 * </pre>
<> 139:856d2700e60b 256 * within the library project settings. By default this macro is defined
<> 139:856d2700e60b 257 * and size checking is enabled. By changing the project settings and
<> 139:856d2700e60b 258 * undefining this macro size checking is eliminated and the functions
<> 139:856d2700e60b 259 * run a bit faster. With size checking disabled the functions always
<> 139:856d2700e60b 260 * return <code>ARM_MATH_SUCCESS</code>.
<> 139:856d2700e60b 261 */
<> 139:856d2700e60b 262
<> 139:856d2700e60b 263 /**
<> 139:856d2700e60b 264 * @defgroup groupTransforms Transform Functions
<> 139:856d2700e60b 265 */
<> 139:856d2700e60b 266
<> 139:856d2700e60b 267 /**
<> 139:856d2700e60b 268 * @defgroup groupController Controller Functions
<> 139:856d2700e60b 269 */
<> 139:856d2700e60b 270
<> 139:856d2700e60b 271 /**
<> 139:856d2700e60b 272 * @defgroup groupStats Statistics Functions
<> 139:856d2700e60b 273 */
<> 139:856d2700e60b 274 /**
<> 139:856d2700e60b 275 * @defgroup groupSupport Support Functions
<> 139:856d2700e60b 276 */
<> 139:856d2700e60b 277
<> 139:856d2700e60b 278 /**
<> 139:856d2700e60b 279 * @defgroup groupInterpolation Interpolation Functions
<> 139:856d2700e60b 280 * These functions perform 1- and 2-dimensional interpolation of data.
<> 139:856d2700e60b 281 * Linear interpolation is used for 1-dimensional data and
<> 139:856d2700e60b 282 * bilinear interpolation is used for 2-dimensional data.
<> 139:856d2700e60b 283 */
<> 139:856d2700e60b 284
<> 139:856d2700e60b 285 /**
<> 139:856d2700e60b 286 * @defgroup groupExamples Examples
<> 139:856d2700e60b 287 */
<> 139:856d2700e60b 288 #ifndef _ARM_MATH_H
<> 139:856d2700e60b 289 #define _ARM_MATH_H
<> 139:856d2700e60b 290
<> 139:856d2700e60b 291 #define __CMSIS_GENERIC /* disable NVIC and Systick functions */
<> 139:856d2700e60b 292
<> 139:856d2700e60b 293 #if defined(ARM_MATH_CM7)
<> 139:856d2700e60b 294 #include "core_cm7.h"
<> 139:856d2700e60b 295 #elif defined (ARM_MATH_CM4)
<> 139:856d2700e60b 296 #include "core_cm4.h"
<> 139:856d2700e60b 297 #elif defined (ARM_MATH_CM3)
<> 139:856d2700e60b 298 #include "core_cm3.h"
<> 139:856d2700e60b 299 #elif defined (ARM_MATH_CM0)
<> 139:856d2700e60b 300 #include "core_cm0.h"
<> 139:856d2700e60b 301 #define ARM_MATH_CM0_FAMILY
<> 139:856d2700e60b 302 #elif defined (ARM_MATH_CM0PLUS)
<> 139:856d2700e60b 303 #include "core_cm0plus.h"
<> 139:856d2700e60b 304 #define ARM_MATH_CM0_FAMILY
<> 139:856d2700e60b 305 #else
<> 139:856d2700e60b 306 #error "Define according the used Cortex core ARM_MATH_CM7, ARM_MATH_CM4, ARM_MATH_CM3, ARM_MATH_CM0PLUS or ARM_MATH_CM0"
<> 139:856d2700e60b 307 #endif
<> 139:856d2700e60b 308
<> 139:856d2700e60b 309 #undef __CMSIS_GENERIC /* enable NVIC and Systick functions */
<> 139:856d2700e60b 310 #include "string.h"
<> 139:856d2700e60b 311 #include "math.h"
<> 139:856d2700e60b 312 #ifdef __cplusplus
<> 139:856d2700e60b 313 extern "C"
<> 139:856d2700e60b 314 {
<> 139:856d2700e60b 315 #endif
<> 139:856d2700e60b 316
<> 139:856d2700e60b 317
<> 139:856d2700e60b 318 /**
<> 139:856d2700e60b 319 * @brief Macros required for reciprocal calculation in Normalized LMS
<> 139:856d2700e60b 320 */
<> 139:856d2700e60b 321
<> 139:856d2700e60b 322 #define DELTA_Q31 (0x100)
<> 139:856d2700e60b 323 #define DELTA_Q15 0x5
<> 139:856d2700e60b 324 #define INDEX_MASK 0x0000003F
<> 139:856d2700e60b 325 #ifndef PI
<> 139:856d2700e60b 326 #define PI 3.14159265358979f
<> 139:856d2700e60b 327 #endif
<> 139:856d2700e60b 328
<> 139:856d2700e60b 329 /**
<> 139:856d2700e60b 330 * @brief Macros required for SINE and COSINE Fast math approximations
<> 139:856d2700e60b 331 */
<> 139:856d2700e60b 332
<> 139:856d2700e60b 333 #define FAST_MATH_TABLE_SIZE 512
<> 139:856d2700e60b 334 #define FAST_MATH_Q31_SHIFT (32 - 10)
<> 139:856d2700e60b 335 #define FAST_MATH_Q15_SHIFT (16 - 10)
<> 139:856d2700e60b 336 #define CONTROLLER_Q31_SHIFT (32 - 9)
<> 139:856d2700e60b 337 #define TABLE_SIZE 256
<> 139:856d2700e60b 338 #define TABLE_SPACING_Q31 0x400000
<> 139:856d2700e60b 339 #define TABLE_SPACING_Q15 0x80
<> 139:856d2700e60b 340
<> 139:856d2700e60b 341 /**
<> 139:856d2700e60b 342 * @brief Macros required for SINE and COSINE Controller functions
<> 139:856d2700e60b 343 */
<> 139:856d2700e60b 344 /* 1.31(q31) Fixed value of 2/360 */
<> 139:856d2700e60b 345 /* -1 to +1 is divided into 360 values so total spacing is (2/360) */
<> 139:856d2700e60b 346 #define INPUT_SPACING 0xB60B61
<> 139:856d2700e60b 347
<> 139:856d2700e60b 348 /**
<> 139:856d2700e60b 349 * @brief Macro for Unaligned Support
<> 139:856d2700e60b 350 */
<> 139:856d2700e60b 351 #ifndef UNALIGNED_SUPPORT_DISABLE
<> 139:856d2700e60b 352 #define ALIGN4
<> 139:856d2700e60b 353 #else
<> 139:856d2700e60b 354 #if defined (__GNUC__)
<> 139:856d2700e60b 355 #define ALIGN4 __attribute__((aligned(4)))
<> 139:856d2700e60b 356 #else
<> 139:856d2700e60b 357 #define ALIGN4 __align(4)
<> 139:856d2700e60b 358 #endif
<> 139:856d2700e60b 359 #endif /* #ifndef UNALIGNED_SUPPORT_DISABLE */
<> 139:856d2700e60b 360
<> 139:856d2700e60b 361 /**
<> 139:856d2700e60b 362 * @brief Error status returned by some functions in the library.
<> 139:856d2700e60b 363 */
<> 139:856d2700e60b 364
<> 139:856d2700e60b 365 typedef enum
<> 139:856d2700e60b 366 {
<> 139:856d2700e60b 367 ARM_MATH_SUCCESS = 0, /**< No error */
<> 139:856d2700e60b 368 ARM_MATH_ARGUMENT_ERROR = -1, /**< One or more arguments are incorrect */
<> 139:856d2700e60b 369 ARM_MATH_LENGTH_ERROR = -2, /**< Length of data buffer is incorrect */
<> 139:856d2700e60b 370 ARM_MATH_SIZE_MISMATCH = -3, /**< Size of matrices is not compatible with the operation. */
<> 139:856d2700e60b 371 ARM_MATH_NANINF = -4, /**< Not-a-number (NaN) or infinity is generated */
<> 139:856d2700e60b 372 ARM_MATH_SINGULAR = -5, /**< Generated by matrix inversion if the input matrix is singular and cannot be inverted. */
<> 139:856d2700e60b 373 ARM_MATH_TEST_FAILURE = -6 /**< Test Failed */
<> 139:856d2700e60b 374 } arm_status;
<> 139:856d2700e60b 375
<> 139:856d2700e60b 376 /**
<> 139:856d2700e60b 377 * @brief 8-bit fractional data type in 1.7 format.
<> 139:856d2700e60b 378 */
<> 139:856d2700e60b 379 typedef int8_t q7_t;
<> 139:856d2700e60b 380
<> 139:856d2700e60b 381 /**
<> 139:856d2700e60b 382 * @brief 16-bit fractional data type in 1.15 format.
<> 139:856d2700e60b 383 */
<> 139:856d2700e60b 384 typedef int16_t q15_t;
<> 139:856d2700e60b 385
<> 139:856d2700e60b 386 /**
<> 139:856d2700e60b 387 * @brief 32-bit fractional data type in 1.31 format.
<> 139:856d2700e60b 388 */
<> 139:856d2700e60b 389 typedef int32_t q31_t;
<> 139:856d2700e60b 390
<> 139:856d2700e60b 391 /**
<> 139:856d2700e60b 392 * @brief 64-bit fractional data type in 1.63 format.
<> 139:856d2700e60b 393 */
<> 139:856d2700e60b 394 typedef int64_t q63_t;
<> 139:856d2700e60b 395
<> 139:856d2700e60b 396 /**
<> 139:856d2700e60b 397 * @brief 32-bit floating-point type definition.
<> 139:856d2700e60b 398 */
<> 139:856d2700e60b 399 typedef float float32_t;
<> 139:856d2700e60b 400
<> 139:856d2700e60b 401 /**
<> 139:856d2700e60b 402 * @brief 64-bit floating-point type definition.
<> 139:856d2700e60b 403 */
<> 139:856d2700e60b 404 typedef double float64_t;
<> 139:856d2700e60b 405
<> 139:856d2700e60b 406 /**
<> 139:856d2700e60b 407 * @brief definition to read/write two 16 bit values.
<> 139:856d2700e60b 408 */
<> 139:856d2700e60b 409 #if defined __CC_ARM
<> 139:856d2700e60b 410 #define __SIMD32_TYPE int32_t __packed
<> 139:856d2700e60b 411 #define CMSIS_UNUSED __attribute__((unused))
<> 139:856d2700e60b 412 #elif defined __ICCARM__
<> 139:856d2700e60b 413 #define __SIMD32_TYPE int32_t __packed
<> 139:856d2700e60b 414 #define CMSIS_UNUSED
<> 139:856d2700e60b 415 #elif defined __GNUC__
<> 139:856d2700e60b 416 #define __SIMD32_TYPE int32_t
<> 139:856d2700e60b 417 #define CMSIS_UNUSED __attribute__((unused))
<> 139:856d2700e60b 418 #elif defined __CSMC__ /* Cosmic */
<> 139:856d2700e60b 419 #define __SIMD32_TYPE int32_t
<> 139:856d2700e60b 420 #define CMSIS_UNUSED
<> 139:856d2700e60b 421 #elif defined __TASKING__
<> 139:856d2700e60b 422 #define __SIMD32_TYPE __unaligned int32_t
<> 139:856d2700e60b 423 #define CMSIS_UNUSED
<> 139:856d2700e60b 424 #else
<> 139:856d2700e60b 425 #error Unknown compiler
<> 139:856d2700e60b 426 #endif
<> 139:856d2700e60b 427
<> 139:856d2700e60b 428 #define __SIMD32(addr) (*(__SIMD32_TYPE **) & (addr))
<> 139:856d2700e60b 429 #define __SIMD32_CONST(addr) ((__SIMD32_TYPE *)(addr))
<> 139:856d2700e60b 430
<> 139:856d2700e60b 431 #define _SIMD32_OFFSET(addr) (*(__SIMD32_TYPE *) (addr))
<> 139:856d2700e60b 432
<> 139:856d2700e60b 433 #define __SIMD64(addr) (*(int64_t **) & (addr))
<> 139:856d2700e60b 434
<> 139:856d2700e60b 435 #if defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY)
<> 139:856d2700e60b 436 /**
<> 139:856d2700e60b 437 * @brief definition to pack two 16 bit values.
<> 139:856d2700e60b 438 */
<> 139:856d2700e60b 439 #define __PKHBT(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0x0000FFFF) | \
<> 139:856d2700e60b 440 (((int32_t)(ARG2) << ARG3) & (int32_t)0xFFFF0000) )
<> 139:856d2700e60b 441 #define __PKHTB(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0xFFFF0000) | \
<> 139:856d2700e60b 442 (((int32_t)(ARG2) >> ARG3) & (int32_t)0x0000FFFF) )
<> 139:856d2700e60b 443
<> 139:856d2700e60b 444 #endif
<> 139:856d2700e60b 445
<> 139:856d2700e60b 446
<> 139:856d2700e60b 447 /**
<> 139:856d2700e60b 448 * @brief definition to pack four 8 bit values.
<> 139:856d2700e60b 449 */
<> 139:856d2700e60b 450 #ifndef ARM_MATH_BIG_ENDIAN
<> 139:856d2700e60b 451
<> 139:856d2700e60b 452 #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v0) << 0) & (int32_t)0x000000FF) | \
<> 139:856d2700e60b 453 (((int32_t)(v1) << 8) & (int32_t)0x0000FF00) | \
<> 139:856d2700e60b 454 (((int32_t)(v2) << 16) & (int32_t)0x00FF0000) | \
<> 139:856d2700e60b 455 (((int32_t)(v3) << 24) & (int32_t)0xFF000000) )
<> 139:856d2700e60b 456 #else
<> 139:856d2700e60b 457
<> 139:856d2700e60b 458 #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v3) << 0) & (int32_t)0x000000FF) | \
<> 139:856d2700e60b 459 (((int32_t)(v2) << 8) & (int32_t)0x0000FF00) | \
<> 139:856d2700e60b 460 (((int32_t)(v1) << 16) & (int32_t)0x00FF0000) | \
<> 139:856d2700e60b 461 (((int32_t)(v0) << 24) & (int32_t)0xFF000000) )
<> 139:856d2700e60b 462
<> 139:856d2700e60b 463 #endif
<> 139:856d2700e60b 464
<> 139:856d2700e60b 465
<> 139:856d2700e60b 466 /**
<> 139:856d2700e60b 467 * @brief Clips Q63 to Q31 values.
<> 139:856d2700e60b 468 */
<> 139:856d2700e60b 469 static __INLINE q31_t clip_q63_to_q31(
<> 139:856d2700e60b 470 q63_t x)
<> 139:856d2700e60b 471 {
<> 139:856d2700e60b 472 return ((q31_t) (x >> 32) != ((q31_t) x >> 31)) ?
<> 139:856d2700e60b 473 ((0x7FFFFFFF ^ ((q31_t) (x >> 63)))) : (q31_t) x;
<> 139:856d2700e60b 474 }
<> 139:856d2700e60b 475
<> 139:856d2700e60b 476 /**
<> 139:856d2700e60b 477 * @brief Clips Q63 to Q15 values.
<> 139:856d2700e60b 478 */
<> 139:856d2700e60b 479 static __INLINE q15_t clip_q63_to_q15(
<> 139:856d2700e60b 480 q63_t x)
<> 139:856d2700e60b 481 {
<> 139:856d2700e60b 482 return ((q31_t) (x >> 32) != ((q31_t) x >> 31)) ?
<> 139:856d2700e60b 483 ((0x7FFF ^ ((q15_t) (x >> 63)))) : (q15_t) (x >> 15);
<> 139:856d2700e60b 484 }
<> 139:856d2700e60b 485
<> 139:856d2700e60b 486 /**
<> 139:856d2700e60b 487 * @brief Clips Q31 to Q7 values.
<> 139:856d2700e60b 488 */
<> 139:856d2700e60b 489 static __INLINE q7_t clip_q31_to_q7(
<> 139:856d2700e60b 490 q31_t x)
<> 139:856d2700e60b 491 {
<> 139:856d2700e60b 492 return ((q31_t) (x >> 24) != ((q31_t) x >> 23)) ?
<> 139:856d2700e60b 493 ((0x7F ^ ((q7_t) (x >> 31)))) : (q7_t) x;
<> 139:856d2700e60b 494 }
<> 139:856d2700e60b 495
<> 139:856d2700e60b 496 /**
<> 139:856d2700e60b 497 * @brief Clips Q31 to Q15 values.
<> 139:856d2700e60b 498 */
<> 139:856d2700e60b 499 static __INLINE q15_t clip_q31_to_q15(
<> 139:856d2700e60b 500 q31_t x)
<> 139:856d2700e60b 501 {
<> 139:856d2700e60b 502 return ((q31_t) (x >> 16) != ((q31_t) x >> 15)) ?
<> 139:856d2700e60b 503 ((0x7FFF ^ ((q15_t) (x >> 31)))) : (q15_t) x;
<> 139:856d2700e60b 504 }
<> 139:856d2700e60b 505
<> 139:856d2700e60b 506 /**
<> 139:856d2700e60b 507 * @brief Multiplies 32 X 64 and returns 32 bit result in 2.30 format.
<> 139:856d2700e60b 508 */
<> 139:856d2700e60b 509
<> 139:856d2700e60b 510 static __INLINE q63_t mult32x64(
<> 139:856d2700e60b 511 q63_t x,
<> 139:856d2700e60b 512 q31_t y)
<> 139:856d2700e60b 513 {
<> 139:856d2700e60b 514 return ((((q63_t) (x & 0x00000000FFFFFFFF) * y) >> 32) +
<> 139:856d2700e60b 515 (((q63_t) (x >> 32) * y)));
<> 139:856d2700e60b 516 }
<> 139:856d2700e60b 517
<> 139:856d2700e60b 518
<> 139:856d2700e60b 519 //#if defined (ARM_MATH_CM0_FAMILY) && defined ( __CC_ARM )
<> 139:856d2700e60b 520 //#define __CLZ __clz
<> 139:856d2700e60b 521 //#endif
<> 139:856d2700e60b 522
<> 139:856d2700e60b 523 //note: function can be removed when all toolchain support __CLZ for Cortex-M0
<> 139:856d2700e60b 524 #if defined (ARM_MATH_CM0_FAMILY) && ((defined (__ICCARM__)) )
<> 139:856d2700e60b 525
<> 139:856d2700e60b 526 static __INLINE uint32_t __CLZ(
<> 139:856d2700e60b 527 q31_t data);
<> 139:856d2700e60b 528
<> 139:856d2700e60b 529
<> 139:856d2700e60b 530 static __INLINE uint32_t __CLZ(
<> 139:856d2700e60b 531 q31_t data)
<> 139:856d2700e60b 532 {
<> 139:856d2700e60b 533 uint32_t count = 0;
<> 139:856d2700e60b 534 uint32_t mask = 0x80000000;
<> 139:856d2700e60b 535
<> 139:856d2700e60b 536 while((data & mask) == 0)
<> 139:856d2700e60b 537 {
<> 139:856d2700e60b 538 count += 1u;
<> 139:856d2700e60b 539 mask = mask >> 1u;
<> 139:856d2700e60b 540 }
<> 139:856d2700e60b 541
<> 139:856d2700e60b 542 return (count);
<> 139:856d2700e60b 543
<> 139:856d2700e60b 544 }
<> 139:856d2700e60b 545
<> 139:856d2700e60b 546 #endif
<> 139:856d2700e60b 547
<> 139:856d2700e60b 548 /**
<> 139:856d2700e60b 549 * @brief Function to Calculates 1/in (reciprocal) value of Q31 Data type.
<> 139:856d2700e60b 550 */
<> 139:856d2700e60b 551
<> 139:856d2700e60b 552 static __INLINE uint32_t arm_recip_q31(
<> 139:856d2700e60b 553 q31_t in,
<> 139:856d2700e60b 554 q31_t * dst,
<> 139:856d2700e60b 555 q31_t * pRecipTable)
<> 139:856d2700e60b 556 {
<> 139:856d2700e60b 557
<> 139:856d2700e60b 558 uint32_t out, tempVal;
<> 139:856d2700e60b 559 uint32_t index, i;
<> 139:856d2700e60b 560 uint32_t signBits;
<> 139:856d2700e60b 561
<> 139:856d2700e60b 562 if(in > 0)
<> 139:856d2700e60b 563 {
<> 139:856d2700e60b 564 signBits = __CLZ(in) - 1;
<> 139:856d2700e60b 565 }
<> 139:856d2700e60b 566 else
<> 139:856d2700e60b 567 {
<> 139:856d2700e60b 568 signBits = __CLZ(-in) - 1;
<> 139:856d2700e60b 569 }
<> 139:856d2700e60b 570
<> 139:856d2700e60b 571 /* Convert input sample to 1.31 format */
<> 139:856d2700e60b 572 in = in << signBits;
<> 139:856d2700e60b 573
<> 139:856d2700e60b 574 /* calculation of index for initial approximated Val */
<> 139:856d2700e60b 575 index = (uint32_t) (in >> 24u);
<> 139:856d2700e60b 576 index = (index & INDEX_MASK);
<> 139:856d2700e60b 577
<> 139:856d2700e60b 578 /* 1.31 with exp 1 */
<> 139:856d2700e60b 579 out = pRecipTable[index];
<> 139:856d2700e60b 580
<> 139:856d2700e60b 581 /* calculation of reciprocal value */
<> 139:856d2700e60b 582 /* running approximation for two iterations */
<> 139:856d2700e60b 583 for (i = 0u; i < 2u; i++)
<> 139:856d2700e60b 584 {
<> 139:856d2700e60b 585 tempVal = (q31_t) (((q63_t) in * out) >> 31u);
<> 139:856d2700e60b 586 tempVal = 0x7FFFFFFF - tempVal;
<> 139:856d2700e60b 587 /* 1.31 with exp 1 */
<> 139:856d2700e60b 588 //out = (q31_t) (((q63_t) out * tempVal) >> 30u);
<> 139:856d2700e60b 589 out = (q31_t) clip_q63_to_q31(((q63_t) out * tempVal) >> 30u);
<> 139:856d2700e60b 590 }
<> 139:856d2700e60b 591
<> 139:856d2700e60b 592 /* write output */
<> 139:856d2700e60b 593 *dst = out;
<> 139:856d2700e60b 594
<> 139:856d2700e60b 595 /* return num of signbits of out = 1/in value */
<> 139:856d2700e60b 596 return (signBits + 1u);
<> 139:856d2700e60b 597
<> 139:856d2700e60b 598 }
<> 139:856d2700e60b 599
<> 139:856d2700e60b 600 /**
<> 139:856d2700e60b 601 * @brief Function to Calculates 1/in (reciprocal) value of Q15 Data type.
<> 139:856d2700e60b 602 */
<> 139:856d2700e60b 603 static __INLINE uint32_t arm_recip_q15(
<> 139:856d2700e60b 604 q15_t in,
<> 139:856d2700e60b 605 q15_t * dst,
<> 139:856d2700e60b 606 q15_t * pRecipTable)
<> 139:856d2700e60b 607 {
<> 139:856d2700e60b 608
<> 139:856d2700e60b 609 uint32_t out = 0, tempVal = 0;
<> 139:856d2700e60b 610 uint32_t index = 0, i = 0;
<> 139:856d2700e60b 611 uint32_t signBits = 0;
<> 139:856d2700e60b 612
<> 139:856d2700e60b 613 if(in > 0)
<> 139:856d2700e60b 614 {
<> 139:856d2700e60b 615 signBits = __CLZ(in) - 17;
<> 139:856d2700e60b 616 }
<> 139:856d2700e60b 617 else
<> 139:856d2700e60b 618 {
<> 139:856d2700e60b 619 signBits = __CLZ(-in) - 17;
<> 139:856d2700e60b 620 }
<> 139:856d2700e60b 621
<> 139:856d2700e60b 622 /* Convert input sample to 1.15 format */
<> 139:856d2700e60b 623 in = in << signBits;
<> 139:856d2700e60b 624
<> 139:856d2700e60b 625 /* calculation of index for initial approximated Val */
<> 139:856d2700e60b 626 index = in >> 8;
<> 139:856d2700e60b 627 index = (index & INDEX_MASK);
<> 139:856d2700e60b 628
<> 139:856d2700e60b 629 /* 1.15 with exp 1 */
<> 139:856d2700e60b 630 out = pRecipTable[index];
<> 139:856d2700e60b 631
<> 139:856d2700e60b 632 /* calculation of reciprocal value */
<> 139:856d2700e60b 633 /* running approximation for two iterations */
<> 139:856d2700e60b 634 for (i = 0; i < 2; i++)
<> 139:856d2700e60b 635 {
<> 139:856d2700e60b 636 tempVal = (q15_t) (((q31_t) in * out) >> 15);
<> 139:856d2700e60b 637 tempVal = 0x7FFF - tempVal;
<> 139:856d2700e60b 638 /* 1.15 with exp 1 */
<> 139:856d2700e60b 639 out = (q15_t) (((q31_t) out * tempVal) >> 14);
<> 139:856d2700e60b 640 }
<> 139:856d2700e60b 641
<> 139:856d2700e60b 642 /* write output */
<> 139:856d2700e60b 643 *dst = out;
<> 139:856d2700e60b 644
<> 139:856d2700e60b 645 /* return num of signbits of out = 1/in value */
<> 139:856d2700e60b 646 return (signBits + 1);
<> 139:856d2700e60b 647
<> 139:856d2700e60b 648 }
<> 139:856d2700e60b 649
<> 139:856d2700e60b 650
<> 139:856d2700e60b 651 /*
<> 139:856d2700e60b 652 * @brief C custom defined intrinisic function for only M0 processors
<> 139:856d2700e60b 653 */
<> 139:856d2700e60b 654 #if defined(ARM_MATH_CM0_FAMILY)
<> 139:856d2700e60b 655
<> 139:856d2700e60b 656 static __INLINE q31_t __SSAT(
<> 139:856d2700e60b 657 q31_t x,
<> 139:856d2700e60b 658 uint32_t y)
<> 139:856d2700e60b 659 {
<> 139:856d2700e60b 660 int32_t posMax, negMin;
<> 139:856d2700e60b 661 uint32_t i;
<> 139:856d2700e60b 662
<> 139:856d2700e60b 663 posMax = 1;
<> 139:856d2700e60b 664 for (i = 0; i < (y - 1); i++)
<> 139:856d2700e60b 665 {
<> 139:856d2700e60b 666 posMax = posMax * 2;
<> 139:856d2700e60b 667 }
<> 139:856d2700e60b 668
<> 139:856d2700e60b 669 if(x > 0)
<> 139:856d2700e60b 670 {
<> 139:856d2700e60b 671 posMax = (posMax - 1);
<> 139:856d2700e60b 672
<> 139:856d2700e60b 673 if(x > posMax)
<> 139:856d2700e60b 674 {
<> 139:856d2700e60b 675 x = posMax;
<> 139:856d2700e60b 676 }
<> 139:856d2700e60b 677 }
<> 139:856d2700e60b 678 else
<> 139:856d2700e60b 679 {
<> 139:856d2700e60b 680 negMin = -posMax;
<> 139:856d2700e60b 681
<> 139:856d2700e60b 682 if(x < negMin)
<> 139:856d2700e60b 683 {
<> 139:856d2700e60b 684 x = negMin;
<> 139:856d2700e60b 685 }
<> 139:856d2700e60b 686 }
<> 139:856d2700e60b 687 return (x);
<> 139:856d2700e60b 688
<> 139:856d2700e60b 689
<> 139:856d2700e60b 690 }
<> 139:856d2700e60b 691
<> 139:856d2700e60b 692 #endif /* end of ARM_MATH_CM0_FAMILY */
<> 139:856d2700e60b 693
<> 139:856d2700e60b 694
<> 139:856d2700e60b 695
<> 139:856d2700e60b 696 /*
<> 139:856d2700e60b 697 * @brief C custom defined intrinsic function for M3 and M0 processors
<> 139:856d2700e60b 698 */
<> 139:856d2700e60b 699 #if defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY)
<> 139:856d2700e60b 700
<> 139:856d2700e60b 701 /*
<> 139:856d2700e60b 702 * @brief C custom defined QADD8 for M3 and M0 processors
<> 139:856d2700e60b 703 */
<> 139:856d2700e60b 704 static __INLINE q31_t __QADD8(
<> 139:856d2700e60b 705 q31_t x,
<> 139:856d2700e60b 706 q31_t y)
<> 139:856d2700e60b 707 {
<> 139:856d2700e60b 708
<> 139:856d2700e60b 709 q31_t sum;
<> 139:856d2700e60b 710 q7_t r, s, t, u;
<> 139:856d2700e60b 711
<> 139:856d2700e60b 712 r = (q7_t) x;
<> 139:856d2700e60b 713 s = (q7_t) y;
<> 139:856d2700e60b 714
<> 139:856d2700e60b 715 r = __SSAT((q31_t) (r + s), 8);
<> 139:856d2700e60b 716 s = __SSAT(((q31_t) (((x << 16) >> 24) + ((y << 16) >> 24))), 8);
<> 139:856d2700e60b 717 t = __SSAT(((q31_t) (((x << 8) >> 24) + ((y << 8) >> 24))), 8);
<> 139:856d2700e60b 718 u = __SSAT(((q31_t) ((x >> 24) + (y >> 24))), 8);
<> 139:856d2700e60b 719
<> 139:856d2700e60b 720 sum =
<> 139:856d2700e60b 721 (((q31_t) u << 24) & 0xFF000000) | (((q31_t) t << 16) & 0x00FF0000) |
<> 139:856d2700e60b 722 (((q31_t) s << 8) & 0x0000FF00) | (r & 0x000000FF);
<> 139:856d2700e60b 723
<> 139:856d2700e60b 724 return sum;
<> 139:856d2700e60b 725
<> 139:856d2700e60b 726 }
<> 139:856d2700e60b 727
<> 139:856d2700e60b 728 /*
<> 139:856d2700e60b 729 * @brief C custom defined QSUB8 for M3 and M0 processors
<> 139:856d2700e60b 730 */
<> 139:856d2700e60b 731 static __INLINE q31_t __QSUB8(
<> 139:856d2700e60b 732 q31_t x,
<> 139:856d2700e60b 733 q31_t y)
<> 139:856d2700e60b 734 {
<> 139:856d2700e60b 735
<> 139:856d2700e60b 736 q31_t sum;
<> 139:856d2700e60b 737 q31_t r, s, t, u;
<> 139:856d2700e60b 738
<> 139:856d2700e60b 739 r = (q7_t) x;
<> 139:856d2700e60b 740 s = (q7_t) y;
<> 139:856d2700e60b 741
<> 139:856d2700e60b 742 r = __SSAT((r - s), 8);
<> 139:856d2700e60b 743 s = __SSAT(((q31_t) (((x << 16) >> 24) - ((y << 16) >> 24))), 8) << 8;
<> 139:856d2700e60b 744 t = __SSAT(((q31_t) (((x << 8) >> 24) - ((y << 8) >> 24))), 8) << 16;
<> 139:856d2700e60b 745 u = __SSAT(((q31_t) ((x >> 24) - (y >> 24))), 8) << 24;
<> 139:856d2700e60b 746
<> 139:856d2700e60b 747 sum =
<> 139:856d2700e60b 748 (u & 0xFF000000) | (t & 0x00FF0000) | (s & 0x0000FF00) | (r &
<> 139:856d2700e60b 749 0x000000FF);
<> 139:856d2700e60b 750
<> 139:856d2700e60b 751 return sum;
<> 139:856d2700e60b 752 }
<> 139:856d2700e60b 753
<> 139:856d2700e60b 754 /*
<> 139:856d2700e60b 755 * @brief C custom defined QADD16 for M3 and M0 processors
<> 139:856d2700e60b 756 */
<> 139:856d2700e60b 757
<> 139:856d2700e60b 758 /*
<> 139:856d2700e60b 759 * @brief C custom defined QADD16 for M3 and M0 processors
<> 139:856d2700e60b 760 */
<> 139:856d2700e60b 761 static __INLINE q31_t __QADD16(
<> 139:856d2700e60b 762 q31_t x,
<> 139:856d2700e60b 763 q31_t y)
<> 139:856d2700e60b 764 {
<> 139:856d2700e60b 765
<> 139:856d2700e60b 766 q31_t sum;
<> 139:856d2700e60b 767 q31_t r, s;
<> 139:856d2700e60b 768
<> 139:856d2700e60b 769 r = (q15_t) x;
<> 139:856d2700e60b 770 s = (q15_t) y;
<> 139:856d2700e60b 771
<> 139:856d2700e60b 772 r = __SSAT(r + s, 16);
<> 139:856d2700e60b 773 s = __SSAT(((q31_t) ((x >> 16) + (y >> 16))), 16) << 16;
<> 139:856d2700e60b 774
<> 139:856d2700e60b 775 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 139:856d2700e60b 776
<> 139:856d2700e60b 777 return sum;
<> 139:856d2700e60b 778
<> 139:856d2700e60b 779 }
<> 139:856d2700e60b 780
<> 139:856d2700e60b 781 /*
<> 139:856d2700e60b 782 * @brief C custom defined SHADD16 for M3 and M0 processors
<> 139:856d2700e60b 783 */
<> 139:856d2700e60b 784 static __INLINE q31_t __SHADD16(
<> 139:856d2700e60b 785 q31_t x,
<> 139:856d2700e60b 786 q31_t y)
<> 139:856d2700e60b 787 {
<> 139:856d2700e60b 788
<> 139:856d2700e60b 789 q31_t sum;
<> 139:856d2700e60b 790 q31_t r, s;
<> 139:856d2700e60b 791
<> 139:856d2700e60b 792 r = (q15_t) x;
<> 139:856d2700e60b 793 s = (q15_t) y;
<> 139:856d2700e60b 794
<> 139:856d2700e60b 795 r = ((r >> 1) + (s >> 1));
<> 139:856d2700e60b 796 s = ((q31_t) ((x >> 17) + (y >> 17))) << 16;
<> 139:856d2700e60b 797
<> 139:856d2700e60b 798 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 139:856d2700e60b 799
<> 139:856d2700e60b 800 return sum;
<> 139:856d2700e60b 801
<> 139:856d2700e60b 802 }
<> 139:856d2700e60b 803
<> 139:856d2700e60b 804 /*
<> 139:856d2700e60b 805 * @brief C custom defined QSUB16 for M3 and M0 processors
<> 139:856d2700e60b 806 */
<> 139:856d2700e60b 807 static __INLINE q31_t __QSUB16(
<> 139:856d2700e60b 808 q31_t x,
<> 139:856d2700e60b 809 q31_t y)
<> 139:856d2700e60b 810 {
<> 139:856d2700e60b 811
<> 139:856d2700e60b 812 q31_t sum;
<> 139:856d2700e60b 813 q31_t r, s;
<> 139:856d2700e60b 814
<> 139:856d2700e60b 815 r = (q15_t) x;
<> 139:856d2700e60b 816 s = (q15_t) y;
<> 139:856d2700e60b 817
<> 139:856d2700e60b 818 r = __SSAT(r - s, 16);
<> 139:856d2700e60b 819 s = __SSAT(((q31_t) ((x >> 16) - (y >> 16))), 16) << 16;
<> 139:856d2700e60b 820
<> 139:856d2700e60b 821 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 139:856d2700e60b 822
<> 139:856d2700e60b 823 return sum;
<> 139:856d2700e60b 824 }
<> 139:856d2700e60b 825
<> 139:856d2700e60b 826 /*
<> 139:856d2700e60b 827 * @brief C custom defined SHSUB16 for M3 and M0 processors
<> 139:856d2700e60b 828 */
<> 139:856d2700e60b 829 static __INLINE q31_t __SHSUB16(
<> 139:856d2700e60b 830 q31_t x,
<> 139:856d2700e60b 831 q31_t y)
<> 139:856d2700e60b 832 {
<> 139:856d2700e60b 833
<> 139:856d2700e60b 834 q31_t diff;
<> 139:856d2700e60b 835 q31_t r, s;
<> 139:856d2700e60b 836
<> 139:856d2700e60b 837 r = (q15_t) x;
<> 139:856d2700e60b 838 s = (q15_t) y;
<> 139:856d2700e60b 839
<> 139:856d2700e60b 840 r = ((r >> 1) - (s >> 1));
<> 139:856d2700e60b 841 s = (((x >> 17) - (y >> 17)) << 16);
<> 139:856d2700e60b 842
<> 139:856d2700e60b 843 diff = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 139:856d2700e60b 844
<> 139:856d2700e60b 845 return diff;
<> 139:856d2700e60b 846 }
<> 139:856d2700e60b 847
<> 139:856d2700e60b 848 /*
<> 139:856d2700e60b 849 * @brief C custom defined QASX for M3 and M0 processors
<> 139:856d2700e60b 850 */
<> 139:856d2700e60b 851 static __INLINE q31_t __QASX(
<> 139:856d2700e60b 852 q31_t x,
<> 139:856d2700e60b 853 q31_t y)
<> 139:856d2700e60b 854 {
<> 139:856d2700e60b 855
<> 139:856d2700e60b 856 q31_t sum = 0;
<> 139:856d2700e60b 857
<> 139:856d2700e60b 858 sum =
<> 139:856d2700e60b 859 ((sum +
<> 139:856d2700e60b 860 clip_q31_to_q15((q31_t) ((q15_t) (x >> 16) + (q15_t) y))) << 16) +
<> 139:856d2700e60b 861 clip_q31_to_q15((q31_t) ((q15_t) x - (q15_t) (y >> 16)));
<> 139:856d2700e60b 862
<> 139:856d2700e60b 863 return sum;
<> 139:856d2700e60b 864 }
<> 139:856d2700e60b 865
<> 139:856d2700e60b 866 /*
<> 139:856d2700e60b 867 * @brief C custom defined SHASX for M3 and M0 processors
<> 139:856d2700e60b 868 */
<> 139:856d2700e60b 869 static __INLINE q31_t __SHASX(
<> 139:856d2700e60b 870 q31_t x,
<> 139:856d2700e60b 871 q31_t y)
<> 139:856d2700e60b 872 {
<> 139:856d2700e60b 873
<> 139:856d2700e60b 874 q31_t sum;
<> 139:856d2700e60b 875 q31_t r, s;
<> 139:856d2700e60b 876
<> 139:856d2700e60b 877 r = (q15_t) x;
<> 139:856d2700e60b 878 s = (q15_t) y;
<> 139:856d2700e60b 879
<> 139:856d2700e60b 880 r = ((r >> 1) - (y >> 17));
<> 139:856d2700e60b 881 s = (((x >> 17) + (s >> 1)) << 16);
<> 139:856d2700e60b 882
<> 139:856d2700e60b 883 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 139:856d2700e60b 884
<> 139:856d2700e60b 885 return sum;
<> 139:856d2700e60b 886 }
<> 139:856d2700e60b 887
<> 139:856d2700e60b 888
<> 139:856d2700e60b 889 /*
<> 139:856d2700e60b 890 * @brief C custom defined QSAX for M3 and M0 processors
<> 139:856d2700e60b 891 */
<> 139:856d2700e60b 892 static __INLINE q31_t __QSAX(
<> 139:856d2700e60b 893 q31_t x,
<> 139:856d2700e60b 894 q31_t y)
<> 139:856d2700e60b 895 {
<> 139:856d2700e60b 896
<> 139:856d2700e60b 897 q31_t sum = 0;
<> 139:856d2700e60b 898
<> 139:856d2700e60b 899 sum =
<> 139:856d2700e60b 900 ((sum +
<> 139:856d2700e60b 901 clip_q31_to_q15((q31_t) ((q15_t) (x >> 16) - (q15_t) y))) << 16) +
<> 139:856d2700e60b 902 clip_q31_to_q15((q31_t) ((q15_t) x + (q15_t) (y >> 16)));
<> 139:856d2700e60b 903
<> 139:856d2700e60b 904 return sum;
<> 139:856d2700e60b 905 }
<> 139:856d2700e60b 906
<> 139:856d2700e60b 907 /*
<> 139:856d2700e60b 908 * @brief C custom defined SHSAX for M3 and M0 processors
<> 139:856d2700e60b 909 */
<> 139:856d2700e60b 910 static __INLINE q31_t __SHSAX(
<> 139:856d2700e60b 911 q31_t x,
<> 139:856d2700e60b 912 q31_t y)
<> 139:856d2700e60b 913 {
<> 139:856d2700e60b 914
<> 139:856d2700e60b 915 q31_t sum;
<> 139:856d2700e60b 916 q31_t r, s;
<> 139:856d2700e60b 917
<> 139:856d2700e60b 918 r = (q15_t) x;
<> 139:856d2700e60b 919 s = (q15_t) y;
<> 139:856d2700e60b 920
<> 139:856d2700e60b 921 r = ((r >> 1) + (y >> 17));
<> 139:856d2700e60b 922 s = (((x >> 17) - (s >> 1)) << 16);
<> 139:856d2700e60b 923
<> 139:856d2700e60b 924 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 139:856d2700e60b 925
<> 139:856d2700e60b 926 return sum;
<> 139:856d2700e60b 927 }
<> 139:856d2700e60b 928
<> 139:856d2700e60b 929 /*
<> 139:856d2700e60b 930 * @brief C custom defined SMUSDX for M3 and M0 processors
<> 139:856d2700e60b 931 */
<> 139:856d2700e60b 932 static __INLINE q31_t __SMUSDX(
<> 139:856d2700e60b 933 q31_t x,
<> 139:856d2700e60b 934 q31_t y)
<> 139:856d2700e60b 935 {
<> 139:856d2700e60b 936
<> 139:856d2700e60b 937 return ((q31_t) (((q15_t) x * (q15_t) (y >> 16)) -
<> 139:856d2700e60b 938 ((q15_t) (x >> 16) * (q15_t) y)));
<> 139:856d2700e60b 939 }
<> 139:856d2700e60b 940
<> 139:856d2700e60b 941 /*
<> 139:856d2700e60b 942 * @brief C custom defined SMUADX for M3 and M0 processors
<> 139:856d2700e60b 943 */
<> 139:856d2700e60b 944 static __INLINE q31_t __SMUADX(
<> 139:856d2700e60b 945 q31_t x,
<> 139:856d2700e60b 946 q31_t y)
<> 139:856d2700e60b 947 {
<> 139:856d2700e60b 948
<> 139:856d2700e60b 949 return ((q31_t) (((q15_t) x * (q15_t) (y >> 16)) +
<> 139:856d2700e60b 950 ((q15_t) (x >> 16) * (q15_t) y)));
<> 139:856d2700e60b 951 }
<> 139:856d2700e60b 952
<> 139:856d2700e60b 953 /*
<> 139:856d2700e60b 954 * @brief C custom defined QADD for M3 and M0 processors
<> 139:856d2700e60b 955 */
<> 139:856d2700e60b 956 static __INLINE q31_t __QADD(
<> 139:856d2700e60b 957 q31_t x,
<> 139:856d2700e60b 958 q31_t y)
<> 139:856d2700e60b 959 {
<> 139:856d2700e60b 960 return clip_q63_to_q31((q63_t) x + y);
<> 139:856d2700e60b 961 }
<> 139:856d2700e60b 962
<> 139:856d2700e60b 963 /*
<> 139:856d2700e60b 964 * @brief C custom defined QSUB for M3 and M0 processors
<> 139:856d2700e60b 965 */
<> 139:856d2700e60b 966 static __INLINE q31_t __QSUB(
<> 139:856d2700e60b 967 q31_t x,
<> 139:856d2700e60b 968 q31_t y)
<> 139:856d2700e60b 969 {
<> 139:856d2700e60b 970 return clip_q63_to_q31((q63_t) x - y);
<> 139:856d2700e60b 971 }
<> 139:856d2700e60b 972
<> 139:856d2700e60b 973 /*
<> 139:856d2700e60b 974 * @brief C custom defined SMLAD for M3 and M0 processors
<> 139:856d2700e60b 975 */
<> 139:856d2700e60b 976 static __INLINE q31_t __SMLAD(
<> 139:856d2700e60b 977 q31_t x,
<> 139:856d2700e60b 978 q31_t y,
<> 139:856d2700e60b 979 q31_t sum)
<> 139:856d2700e60b 980 {
<> 139:856d2700e60b 981
<> 139:856d2700e60b 982 return (sum + ((q15_t) (x >> 16) * (q15_t) (y >> 16)) +
<> 139:856d2700e60b 983 ((q15_t) x * (q15_t) y));
<> 139:856d2700e60b 984 }
<> 139:856d2700e60b 985
<> 139:856d2700e60b 986 /*
<> 139:856d2700e60b 987 * @brief C custom defined SMLADX for M3 and M0 processors
<> 139:856d2700e60b 988 */
<> 139:856d2700e60b 989 static __INLINE q31_t __SMLADX(
<> 139:856d2700e60b 990 q31_t x,
<> 139:856d2700e60b 991 q31_t y,
<> 139:856d2700e60b 992 q31_t sum)
<> 139:856d2700e60b 993 {
<> 139:856d2700e60b 994
<> 139:856d2700e60b 995 return (sum + ((q15_t) (x >> 16) * (q15_t) (y)) +
<> 139:856d2700e60b 996 ((q15_t) x * (q15_t) (y >> 16)));
<> 139:856d2700e60b 997 }
<> 139:856d2700e60b 998
<> 139:856d2700e60b 999 /*
<> 139:856d2700e60b 1000 * @brief C custom defined SMLSDX for M3 and M0 processors
<> 139:856d2700e60b 1001 */
<> 139:856d2700e60b 1002 static __INLINE q31_t __SMLSDX(
<> 139:856d2700e60b 1003 q31_t x,
<> 139:856d2700e60b 1004 q31_t y,
<> 139:856d2700e60b 1005 q31_t sum)
<> 139:856d2700e60b 1006 {
<> 139:856d2700e60b 1007
<> 139:856d2700e60b 1008 return (sum - ((q15_t) (x >> 16) * (q15_t) (y)) +
<> 139:856d2700e60b 1009 ((q15_t) x * (q15_t) (y >> 16)));
<> 139:856d2700e60b 1010 }
<> 139:856d2700e60b 1011
<> 139:856d2700e60b 1012 /*
<> 139:856d2700e60b 1013 * @brief C custom defined SMLALD for M3 and M0 processors
<> 139:856d2700e60b 1014 */
<> 139:856d2700e60b 1015 static __INLINE q63_t __SMLALD(
<> 139:856d2700e60b 1016 q31_t x,
<> 139:856d2700e60b 1017 q31_t y,
<> 139:856d2700e60b 1018 q63_t sum)
<> 139:856d2700e60b 1019 {
<> 139:856d2700e60b 1020
<> 139:856d2700e60b 1021 return (sum + ((q15_t) (x >> 16) * (q15_t) (y >> 16)) +
<> 139:856d2700e60b 1022 ((q15_t) x * (q15_t) y));
<> 139:856d2700e60b 1023 }
<> 139:856d2700e60b 1024
<> 139:856d2700e60b 1025 /*
<> 139:856d2700e60b 1026 * @brief C custom defined SMLALDX for M3 and M0 processors
<> 139:856d2700e60b 1027 */
<> 139:856d2700e60b 1028 static __INLINE q63_t __SMLALDX(
<> 139:856d2700e60b 1029 q31_t x,
<> 139:856d2700e60b 1030 q31_t y,
<> 139:856d2700e60b 1031 q63_t sum)
<> 139:856d2700e60b 1032 {
<> 139:856d2700e60b 1033
<> 139:856d2700e60b 1034 return (sum + ((q15_t) (x >> 16) * (q15_t) y)) +
<> 139:856d2700e60b 1035 ((q15_t) x * (q15_t) (y >> 16));
<> 139:856d2700e60b 1036 }
<> 139:856d2700e60b 1037
<> 139:856d2700e60b 1038 /*
<> 139:856d2700e60b 1039 * @brief C custom defined SMUAD for M3 and M0 processors
<> 139:856d2700e60b 1040 */
<> 139:856d2700e60b 1041 static __INLINE q31_t __SMUAD(
<> 139:856d2700e60b 1042 q31_t x,
<> 139:856d2700e60b 1043 q31_t y)
<> 139:856d2700e60b 1044 {
<> 139:856d2700e60b 1045
<> 139:856d2700e60b 1046 return (((x >> 16) * (y >> 16)) +
<> 139:856d2700e60b 1047 (((x << 16) >> 16) * ((y << 16) >> 16)));
<> 139:856d2700e60b 1048 }
<> 139:856d2700e60b 1049
<> 139:856d2700e60b 1050 /*
<> 139:856d2700e60b 1051 * @brief C custom defined SMUSD for M3 and M0 processors
<> 139:856d2700e60b 1052 */
<> 139:856d2700e60b 1053 static __INLINE q31_t __SMUSD(
<> 139:856d2700e60b 1054 q31_t x,
<> 139:856d2700e60b 1055 q31_t y)
<> 139:856d2700e60b 1056 {
<> 139:856d2700e60b 1057
<> 139:856d2700e60b 1058 return (-((x >> 16) * (y >> 16)) +
<> 139:856d2700e60b 1059 (((x << 16) >> 16) * ((y << 16) >> 16)));
<> 139:856d2700e60b 1060 }
<> 139:856d2700e60b 1061
<> 139:856d2700e60b 1062
<> 139:856d2700e60b 1063 /*
<> 139:856d2700e60b 1064 * @brief C custom defined SXTB16 for M3 and M0 processors
<> 139:856d2700e60b 1065 */
<> 139:856d2700e60b 1066 static __INLINE q31_t __SXTB16(
<> 139:856d2700e60b 1067 q31_t x)
<> 139:856d2700e60b 1068 {
<> 139:856d2700e60b 1069
<> 139:856d2700e60b 1070 return ((((x << 24) >> 24) & 0x0000FFFF) |
<> 139:856d2700e60b 1071 (((x << 8) >> 8) & 0xFFFF0000));
<> 139:856d2700e60b 1072 }
<> 139:856d2700e60b 1073
<> 139:856d2700e60b 1074
<> 139:856d2700e60b 1075 #endif /* defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY) */
<> 139:856d2700e60b 1076
<> 139:856d2700e60b 1077
<> 139:856d2700e60b 1078 /**
<> 139:856d2700e60b 1079 * @brief Instance structure for the Q7 FIR filter.
<> 139:856d2700e60b 1080 */
<> 139:856d2700e60b 1081 typedef struct
<> 139:856d2700e60b 1082 {
<> 139:856d2700e60b 1083 uint16_t numTaps; /**< number of filter coefficients in the filter. */
<> 139:856d2700e60b 1084 q7_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 139:856d2700e60b 1085 q7_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 139:856d2700e60b 1086 } arm_fir_instance_q7;
<> 139:856d2700e60b 1087
<> 139:856d2700e60b 1088 /**
<> 139:856d2700e60b 1089 * @brief Instance structure for the Q15 FIR filter.
<> 139:856d2700e60b 1090 */
<> 139:856d2700e60b 1091 typedef struct
<> 139:856d2700e60b 1092 {
<> 139:856d2700e60b 1093 uint16_t numTaps; /**< number of filter coefficients in the filter. */
<> 139:856d2700e60b 1094 q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 139:856d2700e60b 1095 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 139:856d2700e60b 1096 } arm_fir_instance_q15;
<> 139:856d2700e60b 1097
<> 139:856d2700e60b 1098 /**
<> 139:856d2700e60b 1099 * @brief Instance structure for the Q31 FIR filter.
<> 139:856d2700e60b 1100 */
<> 139:856d2700e60b 1101 typedef struct
<> 139:856d2700e60b 1102 {
<> 139:856d2700e60b 1103 uint16_t numTaps; /**< number of filter coefficients in the filter. */
<> 139:856d2700e60b 1104 q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 139:856d2700e60b 1105 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 139:856d2700e60b 1106 } arm_fir_instance_q31;
<> 139:856d2700e60b 1107
<> 139:856d2700e60b 1108 /**
<> 139:856d2700e60b 1109 * @brief Instance structure for the floating-point FIR filter.
<> 139:856d2700e60b 1110 */
<> 139:856d2700e60b 1111 typedef struct
<> 139:856d2700e60b 1112 {
<> 139:856d2700e60b 1113 uint16_t numTaps; /**< number of filter coefficients in the filter. */
<> 139:856d2700e60b 1114 float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 139:856d2700e60b 1115 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 139:856d2700e60b 1116 } arm_fir_instance_f32;
<> 139:856d2700e60b 1117
<> 139:856d2700e60b 1118
<> 139:856d2700e60b 1119 /**
<> 139:856d2700e60b 1120 * @brief Processing function for the Q7 FIR filter.
<> 139:856d2700e60b 1121 * @param[in] *S points to an instance of the Q7 FIR filter structure.
<> 139:856d2700e60b 1122 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 1123 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 1124 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 1125 * @return none.
<> 139:856d2700e60b 1126 */
<> 139:856d2700e60b 1127 void arm_fir_q7(
<> 139:856d2700e60b 1128 const arm_fir_instance_q7 * S,
<> 139:856d2700e60b 1129 q7_t * pSrc,
<> 139:856d2700e60b 1130 q7_t * pDst,
<> 139:856d2700e60b 1131 uint32_t blockSize);
<> 139:856d2700e60b 1132
<> 139:856d2700e60b 1133
<> 139:856d2700e60b 1134 /**
<> 139:856d2700e60b 1135 * @brief Initialization function for the Q7 FIR filter.
<> 139:856d2700e60b 1136 * @param[in,out] *S points to an instance of the Q7 FIR structure.
<> 139:856d2700e60b 1137 * @param[in] numTaps Number of filter coefficients in the filter.
<> 139:856d2700e60b 1138 * @param[in] *pCoeffs points to the filter coefficients.
<> 139:856d2700e60b 1139 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 1140 * @param[in] blockSize number of samples that are processed.
<> 139:856d2700e60b 1141 * @return none
<> 139:856d2700e60b 1142 */
<> 139:856d2700e60b 1143 void arm_fir_init_q7(
<> 139:856d2700e60b 1144 arm_fir_instance_q7 * S,
<> 139:856d2700e60b 1145 uint16_t numTaps,
<> 139:856d2700e60b 1146 q7_t * pCoeffs,
<> 139:856d2700e60b 1147 q7_t * pState,
<> 139:856d2700e60b 1148 uint32_t blockSize);
<> 139:856d2700e60b 1149
<> 139:856d2700e60b 1150
<> 139:856d2700e60b 1151 /**
<> 139:856d2700e60b 1152 * @brief Processing function for the Q15 FIR filter.
<> 139:856d2700e60b 1153 * @param[in] *S points to an instance of the Q15 FIR structure.
<> 139:856d2700e60b 1154 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 1155 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 1156 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 1157 * @return none.
<> 139:856d2700e60b 1158 */
<> 139:856d2700e60b 1159 void arm_fir_q15(
<> 139:856d2700e60b 1160 const arm_fir_instance_q15 * S,
<> 139:856d2700e60b 1161 q15_t * pSrc,
<> 139:856d2700e60b 1162 q15_t * pDst,
<> 139:856d2700e60b 1163 uint32_t blockSize);
<> 139:856d2700e60b 1164
<> 139:856d2700e60b 1165 /**
<> 139:856d2700e60b 1166 * @brief Processing function for the fast Q15 FIR filter for Cortex-M3 and Cortex-M4.
<> 139:856d2700e60b 1167 * @param[in] *S points to an instance of the Q15 FIR filter structure.
<> 139:856d2700e60b 1168 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 1169 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 1170 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 1171 * @return none.
<> 139:856d2700e60b 1172 */
<> 139:856d2700e60b 1173 void arm_fir_fast_q15(
<> 139:856d2700e60b 1174 const arm_fir_instance_q15 * S,
<> 139:856d2700e60b 1175 q15_t * pSrc,
<> 139:856d2700e60b 1176 q15_t * pDst,
<> 139:856d2700e60b 1177 uint32_t blockSize);
<> 139:856d2700e60b 1178
<> 139:856d2700e60b 1179 /**
<> 139:856d2700e60b 1180 * @brief Initialization function for the Q15 FIR filter.
<> 139:856d2700e60b 1181 * @param[in,out] *S points to an instance of the Q15 FIR filter structure.
<> 139:856d2700e60b 1182 * @param[in] numTaps Number of filter coefficients in the filter. Must be even and greater than or equal to 4.
<> 139:856d2700e60b 1183 * @param[in] *pCoeffs points to the filter coefficients.
<> 139:856d2700e60b 1184 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 1185 * @param[in] blockSize number of samples that are processed at a time.
<> 139:856d2700e60b 1186 * @return The function returns ARM_MATH_SUCCESS if initialization was successful or ARM_MATH_ARGUMENT_ERROR if
<> 139:856d2700e60b 1187 * <code>numTaps</code> is not a supported value.
<> 139:856d2700e60b 1188 */
<> 139:856d2700e60b 1189
<> 139:856d2700e60b 1190 arm_status arm_fir_init_q15(
<> 139:856d2700e60b 1191 arm_fir_instance_q15 * S,
<> 139:856d2700e60b 1192 uint16_t numTaps,
<> 139:856d2700e60b 1193 q15_t * pCoeffs,
<> 139:856d2700e60b 1194 q15_t * pState,
<> 139:856d2700e60b 1195 uint32_t blockSize);
<> 139:856d2700e60b 1196
<> 139:856d2700e60b 1197 /**
<> 139:856d2700e60b 1198 * @brief Processing function for the Q31 FIR filter.
<> 139:856d2700e60b 1199 * @param[in] *S points to an instance of the Q31 FIR filter structure.
<> 139:856d2700e60b 1200 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 1201 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 1202 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 1203 * @return none.
<> 139:856d2700e60b 1204 */
<> 139:856d2700e60b 1205 void arm_fir_q31(
<> 139:856d2700e60b 1206 const arm_fir_instance_q31 * S,
<> 139:856d2700e60b 1207 q31_t * pSrc,
<> 139:856d2700e60b 1208 q31_t * pDst,
<> 139:856d2700e60b 1209 uint32_t blockSize);
<> 139:856d2700e60b 1210
<> 139:856d2700e60b 1211 /**
<> 139:856d2700e60b 1212 * @brief Processing function for the fast Q31 FIR filter for Cortex-M3 and Cortex-M4.
<> 139:856d2700e60b 1213 * @param[in] *S points to an instance of the Q31 FIR structure.
<> 139:856d2700e60b 1214 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 1215 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 1216 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 1217 * @return none.
<> 139:856d2700e60b 1218 */
<> 139:856d2700e60b 1219 void arm_fir_fast_q31(
<> 139:856d2700e60b 1220 const arm_fir_instance_q31 * S,
<> 139:856d2700e60b 1221 q31_t * pSrc,
<> 139:856d2700e60b 1222 q31_t * pDst,
<> 139:856d2700e60b 1223 uint32_t blockSize);
<> 139:856d2700e60b 1224
<> 139:856d2700e60b 1225 /**
<> 139:856d2700e60b 1226 * @brief Initialization function for the Q31 FIR filter.
<> 139:856d2700e60b 1227 * @param[in,out] *S points to an instance of the Q31 FIR structure.
<> 139:856d2700e60b 1228 * @param[in] numTaps Number of filter coefficients in the filter.
<> 139:856d2700e60b 1229 * @param[in] *pCoeffs points to the filter coefficients.
<> 139:856d2700e60b 1230 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 1231 * @param[in] blockSize number of samples that are processed at a time.
<> 139:856d2700e60b 1232 * @return none.
<> 139:856d2700e60b 1233 */
<> 139:856d2700e60b 1234 void arm_fir_init_q31(
<> 139:856d2700e60b 1235 arm_fir_instance_q31 * S,
<> 139:856d2700e60b 1236 uint16_t numTaps,
<> 139:856d2700e60b 1237 q31_t * pCoeffs,
<> 139:856d2700e60b 1238 q31_t * pState,
<> 139:856d2700e60b 1239 uint32_t blockSize);
<> 139:856d2700e60b 1240
<> 139:856d2700e60b 1241 /**
<> 139:856d2700e60b 1242 * @brief Processing function for the floating-point FIR filter.
<> 139:856d2700e60b 1243 * @param[in] *S points to an instance of the floating-point FIR structure.
<> 139:856d2700e60b 1244 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 1245 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 1246 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 1247 * @return none.
<> 139:856d2700e60b 1248 */
<> 139:856d2700e60b 1249 void arm_fir_f32(
<> 139:856d2700e60b 1250 const arm_fir_instance_f32 * S,
<> 139:856d2700e60b 1251 float32_t * pSrc,
<> 139:856d2700e60b 1252 float32_t * pDst,
<> 139:856d2700e60b 1253 uint32_t blockSize);
<> 139:856d2700e60b 1254
<> 139:856d2700e60b 1255 /**
<> 139:856d2700e60b 1256 * @brief Initialization function for the floating-point FIR filter.
<> 139:856d2700e60b 1257 * @param[in,out] *S points to an instance of the floating-point FIR filter structure.
<> 139:856d2700e60b 1258 * @param[in] numTaps Number of filter coefficients in the filter.
<> 139:856d2700e60b 1259 * @param[in] *pCoeffs points to the filter coefficients.
<> 139:856d2700e60b 1260 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 1261 * @param[in] blockSize number of samples that are processed at a time.
<> 139:856d2700e60b 1262 * @return none.
<> 139:856d2700e60b 1263 */
<> 139:856d2700e60b 1264 void arm_fir_init_f32(
<> 139:856d2700e60b 1265 arm_fir_instance_f32 * S,
<> 139:856d2700e60b 1266 uint16_t numTaps,
<> 139:856d2700e60b 1267 float32_t * pCoeffs,
<> 139:856d2700e60b 1268 float32_t * pState,
<> 139:856d2700e60b 1269 uint32_t blockSize);
<> 139:856d2700e60b 1270
<> 139:856d2700e60b 1271
<> 139:856d2700e60b 1272 /**
<> 139:856d2700e60b 1273 * @brief Instance structure for the Q15 Biquad cascade filter.
<> 139:856d2700e60b 1274 */
<> 139:856d2700e60b 1275 typedef struct
<> 139:856d2700e60b 1276 {
<> 139:856d2700e60b 1277 int8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 139:856d2700e60b 1278 q15_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
<> 139:856d2700e60b 1279 q15_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
<> 139:856d2700e60b 1280 int8_t postShift; /**< Additional shift, in bits, applied to each output sample. */
<> 139:856d2700e60b 1281
<> 139:856d2700e60b 1282 } arm_biquad_casd_df1_inst_q15;
<> 139:856d2700e60b 1283
<> 139:856d2700e60b 1284
<> 139:856d2700e60b 1285 /**
<> 139:856d2700e60b 1286 * @brief Instance structure for the Q31 Biquad cascade filter.
<> 139:856d2700e60b 1287 */
<> 139:856d2700e60b 1288 typedef struct
<> 139:856d2700e60b 1289 {
<> 139:856d2700e60b 1290 uint32_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 139:856d2700e60b 1291 q31_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
<> 139:856d2700e60b 1292 q31_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
<> 139:856d2700e60b 1293 uint8_t postShift; /**< Additional shift, in bits, applied to each output sample. */
<> 139:856d2700e60b 1294
<> 139:856d2700e60b 1295 } arm_biquad_casd_df1_inst_q31;
<> 139:856d2700e60b 1296
<> 139:856d2700e60b 1297 /**
<> 139:856d2700e60b 1298 * @brief Instance structure for the floating-point Biquad cascade filter.
<> 139:856d2700e60b 1299 */
<> 139:856d2700e60b 1300 typedef struct
<> 139:856d2700e60b 1301 {
<> 139:856d2700e60b 1302 uint32_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 139:856d2700e60b 1303 float32_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
<> 139:856d2700e60b 1304 float32_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
<> 139:856d2700e60b 1305
<> 139:856d2700e60b 1306
<> 139:856d2700e60b 1307 } arm_biquad_casd_df1_inst_f32;
<> 139:856d2700e60b 1308
<> 139:856d2700e60b 1309
<> 139:856d2700e60b 1310
<> 139:856d2700e60b 1311 /**
<> 139:856d2700e60b 1312 * @brief Processing function for the Q15 Biquad cascade filter.
<> 139:856d2700e60b 1313 * @param[in] *S points to an instance of the Q15 Biquad cascade structure.
<> 139:856d2700e60b 1314 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 1315 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 1316 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 1317 * @return none.
<> 139:856d2700e60b 1318 */
<> 139:856d2700e60b 1319
<> 139:856d2700e60b 1320 void arm_biquad_cascade_df1_q15(
<> 139:856d2700e60b 1321 const arm_biquad_casd_df1_inst_q15 * S,
<> 139:856d2700e60b 1322 q15_t * pSrc,
<> 139:856d2700e60b 1323 q15_t * pDst,
<> 139:856d2700e60b 1324 uint32_t blockSize);
<> 139:856d2700e60b 1325
<> 139:856d2700e60b 1326 /**
<> 139:856d2700e60b 1327 * @brief Initialization function for the Q15 Biquad cascade filter.
<> 139:856d2700e60b 1328 * @param[in,out] *S points to an instance of the Q15 Biquad cascade structure.
<> 139:856d2700e60b 1329 * @param[in] numStages number of 2nd order stages in the filter.
<> 139:856d2700e60b 1330 * @param[in] *pCoeffs points to the filter coefficients.
<> 139:856d2700e60b 1331 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 1332 * @param[in] postShift Shift to be applied to the output. Varies according to the coefficients format
<> 139:856d2700e60b 1333 * @return none
<> 139:856d2700e60b 1334 */
<> 139:856d2700e60b 1335
<> 139:856d2700e60b 1336 void arm_biquad_cascade_df1_init_q15(
<> 139:856d2700e60b 1337 arm_biquad_casd_df1_inst_q15 * S,
<> 139:856d2700e60b 1338 uint8_t numStages,
<> 139:856d2700e60b 1339 q15_t * pCoeffs,
<> 139:856d2700e60b 1340 q15_t * pState,
<> 139:856d2700e60b 1341 int8_t postShift);
<> 139:856d2700e60b 1342
<> 139:856d2700e60b 1343
<> 139:856d2700e60b 1344 /**
<> 139:856d2700e60b 1345 * @brief Fast but less precise processing function for the Q15 Biquad cascade filter for Cortex-M3 and Cortex-M4.
<> 139:856d2700e60b 1346 * @param[in] *S points to an instance of the Q15 Biquad cascade structure.
<> 139:856d2700e60b 1347 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 1348 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 1349 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 1350 * @return none.
<> 139:856d2700e60b 1351 */
<> 139:856d2700e60b 1352
<> 139:856d2700e60b 1353 void arm_biquad_cascade_df1_fast_q15(
<> 139:856d2700e60b 1354 const arm_biquad_casd_df1_inst_q15 * S,
<> 139:856d2700e60b 1355 q15_t * pSrc,
<> 139:856d2700e60b 1356 q15_t * pDst,
<> 139:856d2700e60b 1357 uint32_t blockSize);
<> 139:856d2700e60b 1358
<> 139:856d2700e60b 1359
<> 139:856d2700e60b 1360 /**
<> 139:856d2700e60b 1361 * @brief Processing function for the Q31 Biquad cascade filter
<> 139:856d2700e60b 1362 * @param[in] *S points to an instance of the Q31 Biquad cascade structure.
<> 139:856d2700e60b 1363 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 1364 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 1365 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 1366 * @return none.
<> 139:856d2700e60b 1367 */
<> 139:856d2700e60b 1368
<> 139:856d2700e60b 1369 void arm_biquad_cascade_df1_q31(
<> 139:856d2700e60b 1370 const arm_biquad_casd_df1_inst_q31 * S,
<> 139:856d2700e60b 1371 q31_t * pSrc,
<> 139:856d2700e60b 1372 q31_t * pDst,
<> 139:856d2700e60b 1373 uint32_t blockSize);
<> 139:856d2700e60b 1374
<> 139:856d2700e60b 1375 /**
<> 139:856d2700e60b 1376 * @brief Fast but less precise processing function for the Q31 Biquad cascade filter for Cortex-M3 and Cortex-M4.
<> 139:856d2700e60b 1377 * @param[in] *S points to an instance of the Q31 Biquad cascade structure.
<> 139:856d2700e60b 1378 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 1379 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 1380 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 1381 * @return none.
<> 139:856d2700e60b 1382 */
<> 139:856d2700e60b 1383
<> 139:856d2700e60b 1384 void arm_biquad_cascade_df1_fast_q31(
<> 139:856d2700e60b 1385 const arm_biquad_casd_df1_inst_q31 * S,
<> 139:856d2700e60b 1386 q31_t * pSrc,
<> 139:856d2700e60b 1387 q31_t * pDst,
<> 139:856d2700e60b 1388 uint32_t blockSize);
<> 139:856d2700e60b 1389
<> 139:856d2700e60b 1390 /**
<> 139:856d2700e60b 1391 * @brief Initialization function for the Q31 Biquad cascade filter.
<> 139:856d2700e60b 1392 * @param[in,out] *S points to an instance of the Q31 Biquad cascade structure.
<> 139:856d2700e60b 1393 * @param[in] numStages number of 2nd order stages in the filter.
<> 139:856d2700e60b 1394 * @param[in] *pCoeffs points to the filter coefficients.
<> 139:856d2700e60b 1395 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 1396 * @param[in] postShift Shift to be applied to the output. Varies according to the coefficients format
<> 139:856d2700e60b 1397 * @return none
<> 139:856d2700e60b 1398 */
<> 139:856d2700e60b 1399
<> 139:856d2700e60b 1400 void arm_biquad_cascade_df1_init_q31(
<> 139:856d2700e60b 1401 arm_biquad_casd_df1_inst_q31 * S,
<> 139:856d2700e60b 1402 uint8_t numStages,
<> 139:856d2700e60b 1403 q31_t * pCoeffs,
<> 139:856d2700e60b 1404 q31_t * pState,
<> 139:856d2700e60b 1405 int8_t postShift);
<> 139:856d2700e60b 1406
<> 139:856d2700e60b 1407 /**
<> 139:856d2700e60b 1408 * @brief Processing function for the floating-point Biquad cascade filter.
<> 139:856d2700e60b 1409 * @param[in] *S points to an instance of the floating-point Biquad cascade structure.
<> 139:856d2700e60b 1410 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 1411 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 1412 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 1413 * @return none.
<> 139:856d2700e60b 1414 */
<> 139:856d2700e60b 1415
<> 139:856d2700e60b 1416 void arm_biquad_cascade_df1_f32(
<> 139:856d2700e60b 1417 const arm_biquad_casd_df1_inst_f32 * S,
<> 139:856d2700e60b 1418 float32_t * pSrc,
<> 139:856d2700e60b 1419 float32_t * pDst,
<> 139:856d2700e60b 1420 uint32_t blockSize);
<> 139:856d2700e60b 1421
<> 139:856d2700e60b 1422 /**
<> 139:856d2700e60b 1423 * @brief Initialization function for the floating-point Biquad cascade filter.
<> 139:856d2700e60b 1424 * @param[in,out] *S points to an instance of the floating-point Biquad cascade structure.
<> 139:856d2700e60b 1425 * @param[in] numStages number of 2nd order stages in the filter.
<> 139:856d2700e60b 1426 * @param[in] *pCoeffs points to the filter coefficients.
<> 139:856d2700e60b 1427 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 1428 * @return none
<> 139:856d2700e60b 1429 */
<> 139:856d2700e60b 1430
<> 139:856d2700e60b 1431 void arm_biquad_cascade_df1_init_f32(
<> 139:856d2700e60b 1432 arm_biquad_casd_df1_inst_f32 * S,
<> 139:856d2700e60b 1433 uint8_t numStages,
<> 139:856d2700e60b 1434 float32_t * pCoeffs,
<> 139:856d2700e60b 1435 float32_t * pState);
<> 139:856d2700e60b 1436
<> 139:856d2700e60b 1437
<> 139:856d2700e60b 1438 /**
<> 139:856d2700e60b 1439 * @brief Instance structure for the floating-point matrix structure.
<> 139:856d2700e60b 1440 */
<> 139:856d2700e60b 1441
<> 139:856d2700e60b 1442 typedef struct
<> 139:856d2700e60b 1443 {
<> 139:856d2700e60b 1444 uint16_t numRows; /**< number of rows of the matrix. */
<> 139:856d2700e60b 1445 uint16_t numCols; /**< number of columns of the matrix. */
<> 139:856d2700e60b 1446 float32_t *pData; /**< points to the data of the matrix. */
<> 139:856d2700e60b 1447 } arm_matrix_instance_f32;
<> 139:856d2700e60b 1448
<> 139:856d2700e60b 1449
<> 139:856d2700e60b 1450 /**
<> 139:856d2700e60b 1451 * @brief Instance structure for the floating-point matrix structure.
<> 139:856d2700e60b 1452 */
<> 139:856d2700e60b 1453
<> 139:856d2700e60b 1454 typedef struct
<> 139:856d2700e60b 1455 {
<> 139:856d2700e60b 1456 uint16_t numRows; /**< number of rows of the matrix. */
<> 139:856d2700e60b 1457 uint16_t numCols; /**< number of columns of the matrix. */
<> 139:856d2700e60b 1458 float64_t *pData; /**< points to the data of the matrix. */
<> 139:856d2700e60b 1459 } arm_matrix_instance_f64;
<> 139:856d2700e60b 1460
<> 139:856d2700e60b 1461 /**
<> 139:856d2700e60b 1462 * @brief Instance structure for the Q15 matrix structure.
<> 139:856d2700e60b 1463 */
<> 139:856d2700e60b 1464
<> 139:856d2700e60b 1465 typedef struct
<> 139:856d2700e60b 1466 {
<> 139:856d2700e60b 1467 uint16_t numRows; /**< number of rows of the matrix. */
<> 139:856d2700e60b 1468 uint16_t numCols; /**< number of columns of the matrix. */
<> 139:856d2700e60b 1469 q15_t *pData; /**< points to the data of the matrix. */
<> 139:856d2700e60b 1470
<> 139:856d2700e60b 1471 } arm_matrix_instance_q15;
<> 139:856d2700e60b 1472
<> 139:856d2700e60b 1473 /**
<> 139:856d2700e60b 1474 * @brief Instance structure for the Q31 matrix structure.
<> 139:856d2700e60b 1475 */
<> 139:856d2700e60b 1476
<> 139:856d2700e60b 1477 typedef struct
<> 139:856d2700e60b 1478 {
<> 139:856d2700e60b 1479 uint16_t numRows; /**< number of rows of the matrix. */
<> 139:856d2700e60b 1480 uint16_t numCols; /**< number of columns of the matrix. */
<> 139:856d2700e60b 1481 q31_t *pData; /**< points to the data of the matrix. */
<> 139:856d2700e60b 1482
<> 139:856d2700e60b 1483 } arm_matrix_instance_q31;
<> 139:856d2700e60b 1484
<> 139:856d2700e60b 1485
<> 139:856d2700e60b 1486
<> 139:856d2700e60b 1487 /**
<> 139:856d2700e60b 1488 * @brief Floating-point matrix addition.
<> 139:856d2700e60b 1489 * @param[in] *pSrcA points to the first input matrix structure
<> 139:856d2700e60b 1490 * @param[in] *pSrcB points to the second input matrix structure
<> 139:856d2700e60b 1491 * @param[out] *pDst points to output matrix structure
<> 139:856d2700e60b 1492 * @return The function returns either
<> 139:856d2700e60b 1493 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1494 */
<> 139:856d2700e60b 1495
<> 139:856d2700e60b 1496 arm_status arm_mat_add_f32(
<> 139:856d2700e60b 1497 const arm_matrix_instance_f32 * pSrcA,
<> 139:856d2700e60b 1498 const arm_matrix_instance_f32 * pSrcB,
<> 139:856d2700e60b 1499 arm_matrix_instance_f32 * pDst);
<> 139:856d2700e60b 1500
<> 139:856d2700e60b 1501 /**
<> 139:856d2700e60b 1502 * @brief Q15 matrix addition.
<> 139:856d2700e60b 1503 * @param[in] *pSrcA points to the first input matrix structure
<> 139:856d2700e60b 1504 * @param[in] *pSrcB points to the second input matrix structure
<> 139:856d2700e60b 1505 * @param[out] *pDst points to output matrix structure
<> 139:856d2700e60b 1506 * @return The function returns either
<> 139:856d2700e60b 1507 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1508 */
<> 139:856d2700e60b 1509
<> 139:856d2700e60b 1510 arm_status arm_mat_add_q15(
<> 139:856d2700e60b 1511 const arm_matrix_instance_q15 * pSrcA,
<> 139:856d2700e60b 1512 const arm_matrix_instance_q15 * pSrcB,
<> 139:856d2700e60b 1513 arm_matrix_instance_q15 * pDst);
<> 139:856d2700e60b 1514
<> 139:856d2700e60b 1515 /**
<> 139:856d2700e60b 1516 * @brief Q31 matrix addition.
<> 139:856d2700e60b 1517 * @param[in] *pSrcA points to the first input matrix structure
<> 139:856d2700e60b 1518 * @param[in] *pSrcB points to the second input matrix structure
<> 139:856d2700e60b 1519 * @param[out] *pDst points to output matrix structure
<> 139:856d2700e60b 1520 * @return The function returns either
<> 139:856d2700e60b 1521 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1522 */
<> 139:856d2700e60b 1523
<> 139:856d2700e60b 1524 arm_status arm_mat_add_q31(
<> 139:856d2700e60b 1525 const arm_matrix_instance_q31 * pSrcA,
<> 139:856d2700e60b 1526 const arm_matrix_instance_q31 * pSrcB,
<> 139:856d2700e60b 1527 arm_matrix_instance_q31 * pDst);
<> 139:856d2700e60b 1528
<> 139:856d2700e60b 1529 /**
<> 139:856d2700e60b 1530 * @brief Floating-point, complex, matrix multiplication.
<> 139:856d2700e60b 1531 * @param[in] *pSrcA points to the first input matrix structure
<> 139:856d2700e60b 1532 * @param[in] *pSrcB points to the second input matrix structure
<> 139:856d2700e60b 1533 * @param[out] *pDst points to output matrix structure
<> 139:856d2700e60b 1534 * @return The function returns either
<> 139:856d2700e60b 1535 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1536 */
<> 139:856d2700e60b 1537
<> 139:856d2700e60b 1538 arm_status arm_mat_cmplx_mult_f32(
<> 139:856d2700e60b 1539 const arm_matrix_instance_f32 * pSrcA,
<> 139:856d2700e60b 1540 const arm_matrix_instance_f32 * pSrcB,
<> 139:856d2700e60b 1541 arm_matrix_instance_f32 * pDst);
<> 139:856d2700e60b 1542
<> 139:856d2700e60b 1543 /**
<> 139:856d2700e60b 1544 * @brief Q15, complex, matrix multiplication.
<> 139:856d2700e60b 1545 * @param[in] *pSrcA points to the first input matrix structure
<> 139:856d2700e60b 1546 * @param[in] *pSrcB points to the second input matrix structure
<> 139:856d2700e60b 1547 * @param[out] *pDst points to output matrix structure
<> 139:856d2700e60b 1548 * @return The function returns either
<> 139:856d2700e60b 1549 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1550 */
<> 139:856d2700e60b 1551
<> 139:856d2700e60b 1552 arm_status arm_mat_cmplx_mult_q15(
<> 139:856d2700e60b 1553 const arm_matrix_instance_q15 * pSrcA,
<> 139:856d2700e60b 1554 const arm_matrix_instance_q15 * pSrcB,
<> 139:856d2700e60b 1555 arm_matrix_instance_q15 * pDst,
<> 139:856d2700e60b 1556 q15_t * pScratch);
<> 139:856d2700e60b 1557
<> 139:856d2700e60b 1558 /**
<> 139:856d2700e60b 1559 * @brief Q31, complex, matrix multiplication.
<> 139:856d2700e60b 1560 * @param[in] *pSrcA points to the first input matrix structure
<> 139:856d2700e60b 1561 * @param[in] *pSrcB points to the second input matrix structure
<> 139:856d2700e60b 1562 * @param[out] *pDst points to output matrix structure
<> 139:856d2700e60b 1563 * @return The function returns either
<> 139:856d2700e60b 1564 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1565 */
<> 139:856d2700e60b 1566
<> 139:856d2700e60b 1567 arm_status arm_mat_cmplx_mult_q31(
<> 139:856d2700e60b 1568 const arm_matrix_instance_q31 * pSrcA,
<> 139:856d2700e60b 1569 const arm_matrix_instance_q31 * pSrcB,
<> 139:856d2700e60b 1570 arm_matrix_instance_q31 * pDst);
<> 139:856d2700e60b 1571
<> 139:856d2700e60b 1572
<> 139:856d2700e60b 1573 /**
<> 139:856d2700e60b 1574 * @brief Floating-point matrix transpose.
<> 139:856d2700e60b 1575 * @param[in] *pSrc points to the input matrix
<> 139:856d2700e60b 1576 * @param[out] *pDst points to the output matrix
<> 139:856d2700e60b 1577 * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code>
<> 139:856d2700e60b 1578 * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1579 */
<> 139:856d2700e60b 1580
<> 139:856d2700e60b 1581 arm_status arm_mat_trans_f32(
<> 139:856d2700e60b 1582 const arm_matrix_instance_f32 * pSrc,
<> 139:856d2700e60b 1583 arm_matrix_instance_f32 * pDst);
<> 139:856d2700e60b 1584
<> 139:856d2700e60b 1585
<> 139:856d2700e60b 1586 /**
<> 139:856d2700e60b 1587 * @brief Q15 matrix transpose.
<> 139:856d2700e60b 1588 * @param[in] *pSrc points to the input matrix
<> 139:856d2700e60b 1589 * @param[out] *pDst points to the output matrix
<> 139:856d2700e60b 1590 * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code>
<> 139:856d2700e60b 1591 * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1592 */
<> 139:856d2700e60b 1593
<> 139:856d2700e60b 1594 arm_status arm_mat_trans_q15(
<> 139:856d2700e60b 1595 const arm_matrix_instance_q15 * pSrc,
<> 139:856d2700e60b 1596 arm_matrix_instance_q15 * pDst);
<> 139:856d2700e60b 1597
<> 139:856d2700e60b 1598 /**
<> 139:856d2700e60b 1599 * @brief Q31 matrix transpose.
<> 139:856d2700e60b 1600 * @param[in] *pSrc points to the input matrix
<> 139:856d2700e60b 1601 * @param[out] *pDst points to the output matrix
<> 139:856d2700e60b 1602 * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code>
<> 139:856d2700e60b 1603 * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1604 */
<> 139:856d2700e60b 1605
<> 139:856d2700e60b 1606 arm_status arm_mat_trans_q31(
<> 139:856d2700e60b 1607 const arm_matrix_instance_q31 * pSrc,
<> 139:856d2700e60b 1608 arm_matrix_instance_q31 * pDst);
<> 139:856d2700e60b 1609
<> 139:856d2700e60b 1610
<> 139:856d2700e60b 1611 /**
<> 139:856d2700e60b 1612 * @brief Floating-point matrix multiplication
<> 139:856d2700e60b 1613 * @param[in] *pSrcA points to the first input matrix structure
<> 139:856d2700e60b 1614 * @param[in] *pSrcB points to the second input matrix structure
<> 139:856d2700e60b 1615 * @param[out] *pDst points to output matrix structure
<> 139:856d2700e60b 1616 * @return The function returns either
<> 139:856d2700e60b 1617 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1618 */
<> 139:856d2700e60b 1619
<> 139:856d2700e60b 1620 arm_status arm_mat_mult_f32(
<> 139:856d2700e60b 1621 const arm_matrix_instance_f32 * pSrcA,
<> 139:856d2700e60b 1622 const arm_matrix_instance_f32 * pSrcB,
<> 139:856d2700e60b 1623 arm_matrix_instance_f32 * pDst);
<> 139:856d2700e60b 1624
<> 139:856d2700e60b 1625 /**
<> 139:856d2700e60b 1626 * @brief Q15 matrix multiplication
<> 139:856d2700e60b 1627 * @param[in] *pSrcA points to the first input matrix structure
<> 139:856d2700e60b 1628 * @param[in] *pSrcB points to the second input matrix structure
<> 139:856d2700e60b 1629 * @param[out] *pDst points to output matrix structure
<> 139:856d2700e60b 1630 * @param[in] *pState points to the array for storing intermediate results
<> 139:856d2700e60b 1631 * @return The function returns either
<> 139:856d2700e60b 1632 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1633 */
<> 139:856d2700e60b 1634
<> 139:856d2700e60b 1635 arm_status arm_mat_mult_q15(
<> 139:856d2700e60b 1636 const arm_matrix_instance_q15 * pSrcA,
<> 139:856d2700e60b 1637 const arm_matrix_instance_q15 * pSrcB,
<> 139:856d2700e60b 1638 arm_matrix_instance_q15 * pDst,
<> 139:856d2700e60b 1639 q15_t * pState);
<> 139:856d2700e60b 1640
<> 139:856d2700e60b 1641 /**
<> 139:856d2700e60b 1642 * @brief Q15 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4
<> 139:856d2700e60b 1643 * @param[in] *pSrcA points to the first input matrix structure
<> 139:856d2700e60b 1644 * @param[in] *pSrcB points to the second input matrix structure
<> 139:856d2700e60b 1645 * @param[out] *pDst points to output matrix structure
<> 139:856d2700e60b 1646 * @param[in] *pState points to the array for storing intermediate results
<> 139:856d2700e60b 1647 * @return The function returns either
<> 139:856d2700e60b 1648 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1649 */
<> 139:856d2700e60b 1650
<> 139:856d2700e60b 1651 arm_status arm_mat_mult_fast_q15(
<> 139:856d2700e60b 1652 const arm_matrix_instance_q15 * pSrcA,
<> 139:856d2700e60b 1653 const arm_matrix_instance_q15 * pSrcB,
<> 139:856d2700e60b 1654 arm_matrix_instance_q15 * pDst,
<> 139:856d2700e60b 1655 q15_t * pState);
<> 139:856d2700e60b 1656
<> 139:856d2700e60b 1657 /**
<> 139:856d2700e60b 1658 * @brief Q31 matrix multiplication
<> 139:856d2700e60b 1659 * @param[in] *pSrcA points to the first input matrix structure
<> 139:856d2700e60b 1660 * @param[in] *pSrcB points to the second input matrix structure
<> 139:856d2700e60b 1661 * @param[out] *pDst points to output matrix structure
<> 139:856d2700e60b 1662 * @return The function returns either
<> 139:856d2700e60b 1663 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1664 */
<> 139:856d2700e60b 1665
<> 139:856d2700e60b 1666 arm_status arm_mat_mult_q31(
<> 139:856d2700e60b 1667 const arm_matrix_instance_q31 * pSrcA,
<> 139:856d2700e60b 1668 const arm_matrix_instance_q31 * pSrcB,
<> 139:856d2700e60b 1669 arm_matrix_instance_q31 * pDst);
<> 139:856d2700e60b 1670
<> 139:856d2700e60b 1671 /**
<> 139:856d2700e60b 1672 * @brief Q31 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4
<> 139:856d2700e60b 1673 * @param[in] *pSrcA points to the first input matrix structure
<> 139:856d2700e60b 1674 * @param[in] *pSrcB points to the second input matrix structure
<> 139:856d2700e60b 1675 * @param[out] *pDst points to output matrix structure
<> 139:856d2700e60b 1676 * @return The function returns either
<> 139:856d2700e60b 1677 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1678 */
<> 139:856d2700e60b 1679
<> 139:856d2700e60b 1680 arm_status arm_mat_mult_fast_q31(
<> 139:856d2700e60b 1681 const arm_matrix_instance_q31 * pSrcA,
<> 139:856d2700e60b 1682 const arm_matrix_instance_q31 * pSrcB,
<> 139:856d2700e60b 1683 arm_matrix_instance_q31 * pDst);
<> 139:856d2700e60b 1684
<> 139:856d2700e60b 1685
<> 139:856d2700e60b 1686 /**
<> 139:856d2700e60b 1687 * @brief Floating-point matrix subtraction
<> 139:856d2700e60b 1688 * @param[in] *pSrcA points to the first input matrix structure
<> 139:856d2700e60b 1689 * @param[in] *pSrcB points to the second input matrix structure
<> 139:856d2700e60b 1690 * @param[out] *pDst points to output matrix structure
<> 139:856d2700e60b 1691 * @return The function returns either
<> 139:856d2700e60b 1692 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1693 */
<> 139:856d2700e60b 1694
<> 139:856d2700e60b 1695 arm_status arm_mat_sub_f32(
<> 139:856d2700e60b 1696 const arm_matrix_instance_f32 * pSrcA,
<> 139:856d2700e60b 1697 const arm_matrix_instance_f32 * pSrcB,
<> 139:856d2700e60b 1698 arm_matrix_instance_f32 * pDst);
<> 139:856d2700e60b 1699
<> 139:856d2700e60b 1700 /**
<> 139:856d2700e60b 1701 * @brief Q15 matrix subtraction
<> 139:856d2700e60b 1702 * @param[in] *pSrcA points to the first input matrix structure
<> 139:856d2700e60b 1703 * @param[in] *pSrcB points to the second input matrix structure
<> 139:856d2700e60b 1704 * @param[out] *pDst points to output matrix structure
<> 139:856d2700e60b 1705 * @return The function returns either
<> 139:856d2700e60b 1706 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1707 */
<> 139:856d2700e60b 1708
<> 139:856d2700e60b 1709 arm_status arm_mat_sub_q15(
<> 139:856d2700e60b 1710 const arm_matrix_instance_q15 * pSrcA,
<> 139:856d2700e60b 1711 const arm_matrix_instance_q15 * pSrcB,
<> 139:856d2700e60b 1712 arm_matrix_instance_q15 * pDst);
<> 139:856d2700e60b 1713
<> 139:856d2700e60b 1714 /**
<> 139:856d2700e60b 1715 * @brief Q31 matrix subtraction
<> 139:856d2700e60b 1716 * @param[in] *pSrcA points to the first input matrix structure
<> 139:856d2700e60b 1717 * @param[in] *pSrcB points to the second input matrix structure
<> 139:856d2700e60b 1718 * @param[out] *pDst points to output matrix structure
<> 139:856d2700e60b 1719 * @return The function returns either
<> 139:856d2700e60b 1720 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1721 */
<> 139:856d2700e60b 1722
<> 139:856d2700e60b 1723 arm_status arm_mat_sub_q31(
<> 139:856d2700e60b 1724 const arm_matrix_instance_q31 * pSrcA,
<> 139:856d2700e60b 1725 const arm_matrix_instance_q31 * pSrcB,
<> 139:856d2700e60b 1726 arm_matrix_instance_q31 * pDst);
<> 139:856d2700e60b 1727
<> 139:856d2700e60b 1728 /**
<> 139:856d2700e60b 1729 * @brief Floating-point matrix scaling.
<> 139:856d2700e60b 1730 * @param[in] *pSrc points to the input matrix
<> 139:856d2700e60b 1731 * @param[in] scale scale factor
<> 139:856d2700e60b 1732 * @param[out] *pDst points to the output matrix
<> 139:856d2700e60b 1733 * @return The function returns either
<> 139:856d2700e60b 1734 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1735 */
<> 139:856d2700e60b 1736
<> 139:856d2700e60b 1737 arm_status arm_mat_scale_f32(
<> 139:856d2700e60b 1738 const arm_matrix_instance_f32 * pSrc,
<> 139:856d2700e60b 1739 float32_t scale,
<> 139:856d2700e60b 1740 arm_matrix_instance_f32 * pDst);
<> 139:856d2700e60b 1741
<> 139:856d2700e60b 1742 /**
<> 139:856d2700e60b 1743 * @brief Q15 matrix scaling.
<> 139:856d2700e60b 1744 * @param[in] *pSrc points to input matrix
<> 139:856d2700e60b 1745 * @param[in] scaleFract fractional portion of the scale factor
<> 139:856d2700e60b 1746 * @param[in] shift number of bits to shift the result by
<> 139:856d2700e60b 1747 * @param[out] *pDst points to output matrix
<> 139:856d2700e60b 1748 * @return The function returns either
<> 139:856d2700e60b 1749 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1750 */
<> 139:856d2700e60b 1751
<> 139:856d2700e60b 1752 arm_status arm_mat_scale_q15(
<> 139:856d2700e60b 1753 const arm_matrix_instance_q15 * pSrc,
<> 139:856d2700e60b 1754 q15_t scaleFract,
<> 139:856d2700e60b 1755 int32_t shift,
<> 139:856d2700e60b 1756 arm_matrix_instance_q15 * pDst);
<> 139:856d2700e60b 1757
<> 139:856d2700e60b 1758 /**
<> 139:856d2700e60b 1759 * @brief Q31 matrix scaling.
<> 139:856d2700e60b 1760 * @param[in] *pSrc points to input matrix
<> 139:856d2700e60b 1761 * @param[in] scaleFract fractional portion of the scale factor
<> 139:856d2700e60b 1762 * @param[in] shift number of bits to shift the result by
<> 139:856d2700e60b 1763 * @param[out] *pDst points to output matrix structure
<> 139:856d2700e60b 1764 * @return The function returns either
<> 139:856d2700e60b 1765 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 139:856d2700e60b 1766 */
<> 139:856d2700e60b 1767
<> 139:856d2700e60b 1768 arm_status arm_mat_scale_q31(
<> 139:856d2700e60b 1769 const arm_matrix_instance_q31 * pSrc,
<> 139:856d2700e60b 1770 q31_t scaleFract,
<> 139:856d2700e60b 1771 int32_t shift,
<> 139:856d2700e60b 1772 arm_matrix_instance_q31 * pDst);
<> 139:856d2700e60b 1773
<> 139:856d2700e60b 1774
<> 139:856d2700e60b 1775 /**
<> 139:856d2700e60b 1776 * @brief Q31 matrix initialization.
<> 139:856d2700e60b 1777 * @param[in,out] *S points to an instance of the floating-point matrix structure.
<> 139:856d2700e60b 1778 * @param[in] nRows number of rows in the matrix.
<> 139:856d2700e60b 1779 * @param[in] nColumns number of columns in the matrix.
<> 139:856d2700e60b 1780 * @param[in] *pData points to the matrix data array.
<> 139:856d2700e60b 1781 * @return none
<> 139:856d2700e60b 1782 */
<> 139:856d2700e60b 1783
<> 139:856d2700e60b 1784 void arm_mat_init_q31(
<> 139:856d2700e60b 1785 arm_matrix_instance_q31 * S,
<> 139:856d2700e60b 1786 uint16_t nRows,
<> 139:856d2700e60b 1787 uint16_t nColumns,
<> 139:856d2700e60b 1788 q31_t * pData);
<> 139:856d2700e60b 1789
<> 139:856d2700e60b 1790 /**
<> 139:856d2700e60b 1791 * @brief Q15 matrix initialization.
<> 139:856d2700e60b 1792 * @param[in,out] *S points to an instance of the floating-point matrix structure.
<> 139:856d2700e60b 1793 * @param[in] nRows number of rows in the matrix.
<> 139:856d2700e60b 1794 * @param[in] nColumns number of columns in the matrix.
<> 139:856d2700e60b 1795 * @param[in] *pData points to the matrix data array.
<> 139:856d2700e60b 1796 * @return none
<> 139:856d2700e60b 1797 */
<> 139:856d2700e60b 1798
<> 139:856d2700e60b 1799 void arm_mat_init_q15(
<> 139:856d2700e60b 1800 arm_matrix_instance_q15 * S,
<> 139:856d2700e60b 1801 uint16_t nRows,
<> 139:856d2700e60b 1802 uint16_t nColumns,
<> 139:856d2700e60b 1803 q15_t * pData);
<> 139:856d2700e60b 1804
<> 139:856d2700e60b 1805 /**
<> 139:856d2700e60b 1806 * @brief Floating-point matrix initialization.
<> 139:856d2700e60b 1807 * @param[in,out] *S points to an instance of the floating-point matrix structure.
<> 139:856d2700e60b 1808 * @param[in] nRows number of rows in the matrix.
<> 139:856d2700e60b 1809 * @param[in] nColumns number of columns in the matrix.
<> 139:856d2700e60b 1810 * @param[in] *pData points to the matrix data array.
<> 139:856d2700e60b 1811 * @return none
<> 139:856d2700e60b 1812 */
<> 139:856d2700e60b 1813
<> 139:856d2700e60b 1814 void arm_mat_init_f32(
<> 139:856d2700e60b 1815 arm_matrix_instance_f32 * S,
<> 139:856d2700e60b 1816 uint16_t nRows,
<> 139:856d2700e60b 1817 uint16_t nColumns,
<> 139:856d2700e60b 1818 float32_t * pData);
<> 139:856d2700e60b 1819
<> 139:856d2700e60b 1820
<> 139:856d2700e60b 1821
<> 139:856d2700e60b 1822 /**
<> 139:856d2700e60b 1823 * @brief Instance structure for the Q15 PID Control.
<> 139:856d2700e60b 1824 */
<> 139:856d2700e60b 1825 typedef struct
<> 139:856d2700e60b 1826 {
<> 139:856d2700e60b 1827 q15_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
<> 139:856d2700e60b 1828 #ifdef ARM_MATH_CM0_FAMILY
<> 139:856d2700e60b 1829 q15_t A1;
<> 139:856d2700e60b 1830 q15_t A2;
<> 139:856d2700e60b 1831 #else
<> 139:856d2700e60b 1832 q31_t A1; /**< The derived gain A1 = -Kp - 2Kd | Kd.*/
<> 139:856d2700e60b 1833 #endif
<> 139:856d2700e60b 1834 q15_t state[3]; /**< The state array of length 3. */
<> 139:856d2700e60b 1835 q15_t Kp; /**< The proportional gain. */
<> 139:856d2700e60b 1836 q15_t Ki; /**< The integral gain. */
<> 139:856d2700e60b 1837 q15_t Kd; /**< The derivative gain. */
<> 139:856d2700e60b 1838 } arm_pid_instance_q15;
<> 139:856d2700e60b 1839
<> 139:856d2700e60b 1840 /**
<> 139:856d2700e60b 1841 * @brief Instance structure for the Q31 PID Control.
<> 139:856d2700e60b 1842 */
<> 139:856d2700e60b 1843 typedef struct
<> 139:856d2700e60b 1844 {
<> 139:856d2700e60b 1845 q31_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
<> 139:856d2700e60b 1846 q31_t A1; /**< The derived gain, A1 = -Kp - 2Kd. */
<> 139:856d2700e60b 1847 q31_t A2; /**< The derived gain, A2 = Kd . */
<> 139:856d2700e60b 1848 q31_t state[3]; /**< The state array of length 3. */
<> 139:856d2700e60b 1849 q31_t Kp; /**< The proportional gain. */
<> 139:856d2700e60b 1850 q31_t Ki; /**< The integral gain. */
<> 139:856d2700e60b 1851 q31_t Kd; /**< The derivative gain. */
<> 139:856d2700e60b 1852
<> 139:856d2700e60b 1853 } arm_pid_instance_q31;
<> 139:856d2700e60b 1854
<> 139:856d2700e60b 1855 /**
<> 139:856d2700e60b 1856 * @brief Instance structure for the floating-point PID Control.
<> 139:856d2700e60b 1857 */
<> 139:856d2700e60b 1858 typedef struct
<> 139:856d2700e60b 1859 {
<> 139:856d2700e60b 1860 float32_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
<> 139:856d2700e60b 1861 float32_t A1; /**< The derived gain, A1 = -Kp - 2Kd. */
<> 139:856d2700e60b 1862 float32_t A2; /**< The derived gain, A2 = Kd . */
<> 139:856d2700e60b 1863 float32_t state[3]; /**< The state array of length 3. */
<> 139:856d2700e60b 1864 float32_t Kp; /**< The proportional gain. */
<> 139:856d2700e60b 1865 float32_t Ki; /**< The integral gain. */
<> 139:856d2700e60b 1866 float32_t Kd; /**< The derivative gain. */
<> 139:856d2700e60b 1867 } arm_pid_instance_f32;
<> 139:856d2700e60b 1868
<> 139:856d2700e60b 1869
<> 139:856d2700e60b 1870
<> 139:856d2700e60b 1871 /**
<> 139:856d2700e60b 1872 * @brief Initialization function for the floating-point PID Control.
<> 139:856d2700e60b 1873 * @param[in,out] *S points to an instance of the PID structure.
<> 139:856d2700e60b 1874 * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state.
<> 139:856d2700e60b 1875 * @return none.
<> 139:856d2700e60b 1876 */
<> 139:856d2700e60b 1877 void arm_pid_init_f32(
<> 139:856d2700e60b 1878 arm_pid_instance_f32 * S,
<> 139:856d2700e60b 1879 int32_t resetStateFlag);
<> 139:856d2700e60b 1880
<> 139:856d2700e60b 1881 /**
<> 139:856d2700e60b 1882 * @brief Reset function for the floating-point PID Control.
<> 139:856d2700e60b 1883 * @param[in,out] *S is an instance of the floating-point PID Control structure
<> 139:856d2700e60b 1884 * @return none
<> 139:856d2700e60b 1885 */
<> 139:856d2700e60b 1886 void arm_pid_reset_f32(
<> 139:856d2700e60b 1887 arm_pid_instance_f32 * S);
<> 139:856d2700e60b 1888
<> 139:856d2700e60b 1889
<> 139:856d2700e60b 1890 /**
<> 139:856d2700e60b 1891 * @brief Initialization function for the Q31 PID Control.
<> 139:856d2700e60b 1892 * @param[in,out] *S points to an instance of the Q15 PID structure.
<> 139:856d2700e60b 1893 * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state.
<> 139:856d2700e60b 1894 * @return none.
<> 139:856d2700e60b 1895 */
<> 139:856d2700e60b 1896 void arm_pid_init_q31(
<> 139:856d2700e60b 1897 arm_pid_instance_q31 * S,
<> 139:856d2700e60b 1898 int32_t resetStateFlag);
<> 139:856d2700e60b 1899
<> 139:856d2700e60b 1900
<> 139:856d2700e60b 1901 /**
<> 139:856d2700e60b 1902 * @brief Reset function for the Q31 PID Control.
<> 139:856d2700e60b 1903 * @param[in,out] *S points to an instance of the Q31 PID Control structure
<> 139:856d2700e60b 1904 * @return none
<> 139:856d2700e60b 1905 */
<> 139:856d2700e60b 1906
<> 139:856d2700e60b 1907 void arm_pid_reset_q31(
<> 139:856d2700e60b 1908 arm_pid_instance_q31 * S);
<> 139:856d2700e60b 1909
<> 139:856d2700e60b 1910 /**
<> 139:856d2700e60b 1911 * @brief Initialization function for the Q15 PID Control.
<> 139:856d2700e60b 1912 * @param[in,out] *S points to an instance of the Q15 PID structure.
<> 139:856d2700e60b 1913 * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state.
<> 139:856d2700e60b 1914 * @return none.
<> 139:856d2700e60b 1915 */
<> 139:856d2700e60b 1916 void arm_pid_init_q15(
<> 139:856d2700e60b 1917 arm_pid_instance_q15 * S,
<> 139:856d2700e60b 1918 int32_t resetStateFlag);
<> 139:856d2700e60b 1919
<> 139:856d2700e60b 1920 /**
<> 139:856d2700e60b 1921 * @brief Reset function for the Q15 PID Control.
<> 139:856d2700e60b 1922 * @param[in,out] *S points to an instance of the q15 PID Control structure
<> 139:856d2700e60b 1923 * @return none
<> 139:856d2700e60b 1924 */
<> 139:856d2700e60b 1925 void arm_pid_reset_q15(
<> 139:856d2700e60b 1926 arm_pid_instance_q15 * S);
<> 139:856d2700e60b 1927
<> 139:856d2700e60b 1928
<> 139:856d2700e60b 1929 /**
<> 139:856d2700e60b 1930 * @brief Instance structure for the floating-point Linear Interpolate function.
<> 139:856d2700e60b 1931 */
<> 139:856d2700e60b 1932 typedef struct
<> 139:856d2700e60b 1933 {
<> 139:856d2700e60b 1934 uint32_t nValues; /**< nValues */
<> 139:856d2700e60b 1935 float32_t x1; /**< x1 */
<> 139:856d2700e60b 1936 float32_t xSpacing; /**< xSpacing */
<> 139:856d2700e60b 1937 float32_t *pYData; /**< pointer to the table of Y values */
<> 139:856d2700e60b 1938 } arm_linear_interp_instance_f32;
<> 139:856d2700e60b 1939
<> 139:856d2700e60b 1940 /**
<> 139:856d2700e60b 1941 * @brief Instance structure for the floating-point bilinear interpolation function.
<> 139:856d2700e60b 1942 */
<> 139:856d2700e60b 1943
<> 139:856d2700e60b 1944 typedef struct
<> 139:856d2700e60b 1945 {
<> 139:856d2700e60b 1946 uint16_t numRows; /**< number of rows in the data table. */
<> 139:856d2700e60b 1947 uint16_t numCols; /**< number of columns in the data table. */
<> 139:856d2700e60b 1948 float32_t *pData; /**< points to the data table. */
<> 139:856d2700e60b 1949 } arm_bilinear_interp_instance_f32;
<> 139:856d2700e60b 1950
<> 139:856d2700e60b 1951 /**
<> 139:856d2700e60b 1952 * @brief Instance structure for the Q31 bilinear interpolation function.
<> 139:856d2700e60b 1953 */
<> 139:856d2700e60b 1954
<> 139:856d2700e60b 1955 typedef struct
<> 139:856d2700e60b 1956 {
<> 139:856d2700e60b 1957 uint16_t numRows; /**< number of rows in the data table. */
<> 139:856d2700e60b 1958 uint16_t numCols; /**< number of columns in the data table. */
<> 139:856d2700e60b 1959 q31_t *pData; /**< points to the data table. */
<> 139:856d2700e60b 1960 } arm_bilinear_interp_instance_q31;
<> 139:856d2700e60b 1961
<> 139:856d2700e60b 1962 /**
<> 139:856d2700e60b 1963 * @brief Instance structure for the Q15 bilinear interpolation function.
<> 139:856d2700e60b 1964 */
<> 139:856d2700e60b 1965
<> 139:856d2700e60b 1966 typedef struct
<> 139:856d2700e60b 1967 {
<> 139:856d2700e60b 1968 uint16_t numRows; /**< number of rows in the data table. */
<> 139:856d2700e60b 1969 uint16_t numCols; /**< number of columns in the data table. */
<> 139:856d2700e60b 1970 q15_t *pData; /**< points to the data table. */
<> 139:856d2700e60b 1971 } arm_bilinear_interp_instance_q15;
<> 139:856d2700e60b 1972
<> 139:856d2700e60b 1973 /**
<> 139:856d2700e60b 1974 * @brief Instance structure for the Q15 bilinear interpolation function.
<> 139:856d2700e60b 1975 */
<> 139:856d2700e60b 1976
<> 139:856d2700e60b 1977 typedef struct
<> 139:856d2700e60b 1978 {
<> 139:856d2700e60b 1979 uint16_t numRows; /**< number of rows in the data table. */
<> 139:856d2700e60b 1980 uint16_t numCols; /**< number of columns in the data table. */
<> 139:856d2700e60b 1981 q7_t *pData; /**< points to the data table. */
<> 139:856d2700e60b 1982 } arm_bilinear_interp_instance_q7;
<> 139:856d2700e60b 1983
<> 139:856d2700e60b 1984
<> 139:856d2700e60b 1985 /**
<> 139:856d2700e60b 1986 * @brief Q7 vector multiplication.
<> 139:856d2700e60b 1987 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 1988 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 1989 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 1990 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 1991 * @return none.
<> 139:856d2700e60b 1992 */
<> 139:856d2700e60b 1993
<> 139:856d2700e60b 1994 void arm_mult_q7(
<> 139:856d2700e60b 1995 q7_t * pSrcA,
<> 139:856d2700e60b 1996 q7_t * pSrcB,
<> 139:856d2700e60b 1997 q7_t * pDst,
<> 139:856d2700e60b 1998 uint32_t blockSize);
<> 139:856d2700e60b 1999
<> 139:856d2700e60b 2000 /**
<> 139:856d2700e60b 2001 * @brief Q15 vector multiplication.
<> 139:856d2700e60b 2002 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 2003 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 2004 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2005 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2006 * @return none.
<> 139:856d2700e60b 2007 */
<> 139:856d2700e60b 2008
<> 139:856d2700e60b 2009 void arm_mult_q15(
<> 139:856d2700e60b 2010 q15_t * pSrcA,
<> 139:856d2700e60b 2011 q15_t * pSrcB,
<> 139:856d2700e60b 2012 q15_t * pDst,
<> 139:856d2700e60b 2013 uint32_t blockSize);
<> 139:856d2700e60b 2014
<> 139:856d2700e60b 2015 /**
<> 139:856d2700e60b 2016 * @brief Q31 vector multiplication.
<> 139:856d2700e60b 2017 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 2018 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 2019 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2020 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2021 * @return none.
<> 139:856d2700e60b 2022 */
<> 139:856d2700e60b 2023
<> 139:856d2700e60b 2024 void arm_mult_q31(
<> 139:856d2700e60b 2025 q31_t * pSrcA,
<> 139:856d2700e60b 2026 q31_t * pSrcB,
<> 139:856d2700e60b 2027 q31_t * pDst,
<> 139:856d2700e60b 2028 uint32_t blockSize);
<> 139:856d2700e60b 2029
<> 139:856d2700e60b 2030 /**
<> 139:856d2700e60b 2031 * @brief Floating-point vector multiplication.
<> 139:856d2700e60b 2032 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 2033 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 2034 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2035 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2036 * @return none.
<> 139:856d2700e60b 2037 */
<> 139:856d2700e60b 2038
<> 139:856d2700e60b 2039 void arm_mult_f32(
<> 139:856d2700e60b 2040 float32_t * pSrcA,
<> 139:856d2700e60b 2041 float32_t * pSrcB,
<> 139:856d2700e60b 2042 float32_t * pDst,
<> 139:856d2700e60b 2043 uint32_t blockSize);
<> 139:856d2700e60b 2044
<> 139:856d2700e60b 2045
<> 139:856d2700e60b 2046
<> 139:856d2700e60b 2047
<> 139:856d2700e60b 2048
<> 139:856d2700e60b 2049
<> 139:856d2700e60b 2050 /**
<> 139:856d2700e60b 2051 * @brief Instance structure for the Q15 CFFT/CIFFT function.
<> 139:856d2700e60b 2052 */
<> 139:856d2700e60b 2053
<> 139:856d2700e60b 2054 typedef struct
<> 139:856d2700e60b 2055 {
<> 139:856d2700e60b 2056 uint16_t fftLen; /**< length of the FFT. */
<> 139:856d2700e60b 2057 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 139:856d2700e60b 2058 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 139:856d2700e60b 2059 q15_t *pTwiddle; /**< points to the Sin twiddle factor table. */
<> 139:856d2700e60b 2060 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 139:856d2700e60b 2061 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 139:856d2700e60b 2062 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 139:856d2700e60b 2063 } arm_cfft_radix2_instance_q15;
<> 139:856d2700e60b 2064
<> 139:856d2700e60b 2065 /* Deprecated */
<> 139:856d2700e60b 2066 arm_status arm_cfft_radix2_init_q15(
<> 139:856d2700e60b 2067 arm_cfft_radix2_instance_q15 * S,
<> 139:856d2700e60b 2068 uint16_t fftLen,
<> 139:856d2700e60b 2069 uint8_t ifftFlag,
<> 139:856d2700e60b 2070 uint8_t bitReverseFlag);
<> 139:856d2700e60b 2071
<> 139:856d2700e60b 2072 /* Deprecated */
<> 139:856d2700e60b 2073 void arm_cfft_radix2_q15(
<> 139:856d2700e60b 2074 const arm_cfft_radix2_instance_q15 * S,
<> 139:856d2700e60b 2075 q15_t * pSrc);
<> 139:856d2700e60b 2076
<> 139:856d2700e60b 2077
<> 139:856d2700e60b 2078
<> 139:856d2700e60b 2079 /**
<> 139:856d2700e60b 2080 * @brief Instance structure for the Q15 CFFT/CIFFT function.
<> 139:856d2700e60b 2081 */
<> 139:856d2700e60b 2082
<> 139:856d2700e60b 2083 typedef struct
<> 139:856d2700e60b 2084 {
<> 139:856d2700e60b 2085 uint16_t fftLen; /**< length of the FFT. */
<> 139:856d2700e60b 2086 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 139:856d2700e60b 2087 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 139:856d2700e60b 2088 q15_t *pTwiddle; /**< points to the twiddle factor table. */
<> 139:856d2700e60b 2089 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 139:856d2700e60b 2090 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 139:856d2700e60b 2091 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 139:856d2700e60b 2092 } arm_cfft_radix4_instance_q15;
<> 139:856d2700e60b 2093
<> 139:856d2700e60b 2094 /* Deprecated */
<> 139:856d2700e60b 2095 arm_status arm_cfft_radix4_init_q15(
<> 139:856d2700e60b 2096 arm_cfft_radix4_instance_q15 * S,
<> 139:856d2700e60b 2097 uint16_t fftLen,
<> 139:856d2700e60b 2098 uint8_t ifftFlag,
<> 139:856d2700e60b 2099 uint8_t bitReverseFlag);
<> 139:856d2700e60b 2100
<> 139:856d2700e60b 2101 /* Deprecated */
<> 139:856d2700e60b 2102 void arm_cfft_radix4_q15(
<> 139:856d2700e60b 2103 const arm_cfft_radix4_instance_q15 * S,
<> 139:856d2700e60b 2104 q15_t * pSrc);
<> 139:856d2700e60b 2105
<> 139:856d2700e60b 2106 /**
<> 139:856d2700e60b 2107 * @brief Instance structure for the Radix-2 Q31 CFFT/CIFFT function.
<> 139:856d2700e60b 2108 */
<> 139:856d2700e60b 2109
<> 139:856d2700e60b 2110 typedef struct
<> 139:856d2700e60b 2111 {
<> 139:856d2700e60b 2112 uint16_t fftLen; /**< length of the FFT. */
<> 139:856d2700e60b 2113 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 139:856d2700e60b 2114 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 139:856d2700e60b 2115 q31_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 139:856d2700e60b 2116 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 139:856d2700e60b 2117 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 139:856d2700e60b 2118 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 139:856d2700e60b 2119 } arm_cfft_radix2_instance_q31;
<> 139:856d2700e60b 2120
<> 139:856d2700e60b 2121 /* Deprecated */
<> 139:856d2700e60b 2122 arm_status arm_cfft_radix2_init_q31(
<> 139:856d2700e60b 2123 arm_cfft_radix2_instance_q31 * S,
<> 139:856d2700e60b 2124 uint16_t fftLen,
<> 139:856d2700e60b 2125 uint8_t ifftFlag,
<> 139:856d2700e60b 2126 uint8_t bitReverseFlag);
<> 139:856d2700e60b 2127
<> 139:856d2700e60b 2128 /* Deprecated */
<> 139:856d2700e60b 2129 void arm_cfft_radix2_q31(
<> 139:856d2700e60b 2130 const arm_cfft_radix2_instance_q31 * S,
<> 139:856d2700e60b 2131 q31_t * pSrc);
<> 139:856d2700e60b 2132
<> 139:856d2700e60b 2133 /**
<> 139:856d2700e60b 2134 * @brief Instance structure for the Q31 CFFT/CIFFT function.
<> 139:856d2700e60b 2135 */
<> 139:856d2700e60b 2136
<> 139:856d2700e60b 2137 typedef struct
<> 139:856d2700e60b 2138 {
<> 139:856d2700e60b 2139 uint16_t fftLen; /**< length of the FFT. */
<> 139:856d2700e60b 2140 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 139:856d2700e60b 2141 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 139:856d2700e60b 2142 q31_t *pTwiddle; /**< points to the twiddle factor table. */
<> 139:856d2700e60b 2143 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 139:856d2700e60b 2144 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 139:856d2700e60b 2145 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 139:856d2700e60b 2146 } arm_cfft_radix4_instance_q31;
<> 139:856d2700e60b 2147
<> 139:856d2700e60b 2148 /* Deprecated */
<> 139:856d2700e60b 2149 void arm_cfft_radix4_q31(
<> 139:856d2700e60b 2150 const arm_cfft_radix4_instance_q31 * S,
<> 139:856d2700e60b 2151 q31_t * pSrc);
<> 139:856d2700e60b 2152
<> 139:856d2700e60b 2153 /* Deprecated */
<> 139:856d2700e60b 2154 arm_status arm_cfft_radix4_init_q31(
<> 139:856d2700e60b 2155 arm_cfft_radix4_instance_q31 * S,
<> 139:856d2700e60b 2156 uint16_t fftLen,
<> 139:856d2700e60b 2157 uint8_t ifftFlag,
<> 139:856d2700e60b 2158 uint8_t bitReverseFlag);
<> 139:856d2700e60b 2159
<> 139:856d2700e60b 2160 /**
<> 139:856d2700e60b 2161 * @brief Instance structure for the floating-point CFFT/CIFFT function.
<> 139:856d2700e60b 2162 */
<> 139:856d2700e60b 2163
<> 139:856d2700e60b 2164 typedef struct
<> 139:856d2700e60b 2165 {
<> 139:856d2700e60b 2166 uint16_t fftLen; /**< length of the FFT. */
<> 139:856d2700e60b 2167 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 139:856d2700e60b 2168 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 139:856d2700e60b 2169 float32_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 139:856d2700e60b 2170 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 139:856d2700e60b 2171 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 139:856d2700e60b 2172 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 139:856d2700e60b 2173 float32_t onebyfftLen; /**< value of 1/fftLen. */
<> 139:856d2700e60b 2174 } arm_cfft_radix2_instance_f32;
<> 139:856d2700e60b 2175
<> 139:856d2700e60b 2176 /* Deprecated */
<> 139:856d2700e60b 2177 arm_status arm_cfft_radix2_init_f32(
<> 139:856d2700e60b 2178 arm_cfft_radix2_instance_f32 * S,
<> 139:856d2700e60b 2179 uint16_t fftLen,
<> 139:856d2700e60b 2180 uint8_t ifftFlag,
<> 139:856d2700e60b 2181 uint8_t bitReverseFlag);
<> 139:856d2700e60b 2182
<> 139:856d2700e60b 2183 /* Deprecated */
<> 139:856d2700e60b 2184 void arm_cfft_radix2_f32(
<> 139:856d2700e60b 2185 const arm_cfft_radix2_instance_f32 * S,
<> 139:856d2700e60b 2186 float32_t * pSrc);
<> 139:856d2700e60b 2187
<> 139:856d2700e60b 2188 /**
<> 139:856d2700e60b 2189 * @brief Instance structure for the floating-point CFFT/CIFFT function.
<> 139:856d2700e60b 2190 */
<> 139:856d2700e60b 2191
<> 139:856d2700e60b 2192 typedef struct
<> 139:856d2700e60b 2193 {
<> 139:856d2700e60b 2194 uint16_t fftLen; /**< length of the FFT. */
<> 139:856d2700e60b 2195 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 139:856d2700e60b 2196 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 139:856d2700e60b 2197 float32_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 139:856d2700e60b 2198 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 139:856d2700e60b 2199 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 139:856d2700e60b 2200 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 139:856d2700e60b 2201 float32_t onebyfftLen; /**< value of 1/fftLen. */
<> 139:856d2700e60b 2202 } arm_cfft_radix4_instance_f32;
<> 139:856d2700e60b 2203
<> 139:856d2700e60b 2204 /* Deprecated */
<> 139:856d2700e60b 2205 arm_status arm_cfft_radix4_init_f32(
<> 139:856d2700e60b 2206 arm_cfft_radix4_instance_f32 * S,
<> 139:856d2700e60b 2207 uint16_t fftLen,
<> 139:856d2700e60b 2208 uint8_t ifftFlag,
<> 139:856d2700e60b 2209 uint8_t bitReverseFlag);
<> 139:856d2700e60b 2210
<> 139:856d2700e60b 2211 /* Deprecated */
<> 139:856d2700e60b 2212 void arm_cfft_radix4_f32(
<> 139:856d2700e60b 2213 const arm_cfft_radix4_instance_f32 * S,
<> 139:856d2700e60b 2214 float32_t * pSrc);
<> 139:856d2700e60b 2215
<> 139:856d2700e60b 2216 /**
<> 139:856d2700e60b 2217 * @brief Instance structure for the fixed-point CFFT/CIFFT function.
<> 139:856d2700e60b 2218 */
<> 139:856d2700e60b 2219
<> 139:856d2700e60b 2220 typedef struct
<> 139:856d2700e60b 2221 {
<> 139:856d2700e60b 2222 uint16_t fftLen; /**< length of the FFT. */
<> 139:856d2700e60b 2223 const q15_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 139:856d2700e60b 2224 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 139:856d2700e60b 2225 uint16_t bitRevLength; /**< bit reversal table length. */
<> 139:856d2700e60b 2226 } arm_cfft_instance_q15;
<> 139:856d2700e60b 2227
<> 139:856d2700e60b 2228 void arm_cfft_q15(
<> 139:856d2700e60b 2229 const arm_cfft_instance_q15 * S,
<> 139:856d2700e60b 2230 q15_t * p1,
<> 139:856d2700e60b 2231 uint8_t ifftFlag,
<> 139:856d2700e60b 2232 uint8_t bitReverseFlag);
<> 139:856d2700e60b 2233
<> 139:856d2700e60b 2234 /**
<> 139:856d2700e60b 2235 * @brief Instance structure for the fixed-point CFFT/CIFFT function.
<> 139:856d2700e60b 2236 */
<> 139:856d2700e60b 2237
<> 139:856d2700e60b 2238 typedef struct
<> 139:856d2700e60b 2239 {
<> 139:856d2700e60b 2240 uint16_t fftLen; /**< length of the FFT. */
<> 139:856d2700e60b 2241 const q31_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 139:856d2700e60b 2242 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 139:856d2700e60b 2243 uint16_t bitRevLength; /**< bit reversal table length. */
<> 139:856d2700e60b 2244 } arm_cfft_instance_q31;
<> 139:856d2700e60b 2245
<> 139:856d2700e60b 2246 void arm_cfft_q31(
<> 139:856d2700e60b 2247 const arm_cfft_instance_q31 * S,
<> 139:856d2700e60b 2248 q31_t * p1,
<> 139:856d2700e60b 2249 uint8_t ifftFlag,
<> 139:856d2700e60b 2250 uint8_t bitReverseFlag);
<> 139:856d2700e60b 2251
<> 139:856d2700e60b 2252 /**
<> 139:856d2700e60b 2253 * @brief Instance structure for the floating-point CFFT/CIFFT function.
<> 139:856d2700e60b 2254 */
<> 139:856d2700e60b 2255
<> 139:856d2700e60b 2256 typedef struct
<> 139:856d2700e60b 2257 {
<> 139:856d2700e60b 2258 uint16_t fftLen; /**< length of the FFT. */
<> 139:856d2700e60b 2259 const float32_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 139:856d2700e60b 2260 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 139:856d2700e60b 2261 uint16_t bitRevLength; /**< bit reversal table length. */
<> 139:856d2700e60b 2262 } arm_cfft_instance_f32;
<> 139:856d2700e60b 2263
<> 139:856d2700e60b 2264 void arm_cfft_f32(
<> 139:856d2700e60b 2265 const arm_cfft_instance_f32 * S,
<> 139:856d2700e60b 2266 float32_t * p1,
<> 139:856d2700e60b 2267 uint8_t ifftFlag,
<> 139:856d2700e60b 2268 uint8_t bitReverseFlag);
<> 139:856d2700e60b 2269
<> 139:856d2700e60b 2270 /**
<> 139:856d2700e60b 2271 * @brief Instance structure for the Q15 RFFT/RIFFT function.
<> 139:856d2700e60b 2272 */
<> 139:856d2700e60b 2273
<> 139:856d2700e60b 2274 typedef struct
<> 139:856d2700e60b 2275 {
<> 139:856d2700e60b 2276 uint32_t fftLenReal; /**< length of the real FFT. */
<> 139:856d2700e60b 2277 uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
<> 139:856d2700e60b 2278 uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
<> 139:856d2700e60b 2279 uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 139:856d2700e60b 2280 q15_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
<> 139:856d2700e60b 2281 q15_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
<> 139:856d2700e60b 2282 const arm_cfft_instance_q15 *pCfft; /**< points to the complex FFT instance. */
<> 139:856d2700e60b 2283 } arm_rfft_instance_q15;
<> 139:856d2700e60b 2284
<> 139:856d2700e60b 2285 arm_status arm_rfft_init_q15(
<> 139:856d2700e60b 2286 arm_rfft_instance_q15 * S,
<> 139:856d2700e60b 2287 uint32_t fftLenReal,
<> 139:856d2700e60b 2288 uint32_t ifftFlagR,
<> 139:856d2700e60b 2289 uint32_t bitReverseFlag);
<> 139:856d2700e60b 2290
<> 139:856d2700e60b 2291 void arm_rfft_q15(
<> 139:856d2700e60b 2292 const arm_rfft_instance_q15 * S,
<> 139:856d2700e60b 2293 q15_t * pSrc,
<> 139:856d2700e60b 2294 q15_t * pDst);
<> 139:856d2700e60b 2295
<> 139:856d2700e60b 2296 /**
<> 139:856d2700e60b 2297 * @brief Instance structure for the Q31 RFFT/RIFFT function.
<> 139:856d2700e60b 2298 */
<> 139:856d2700e60b 2299
<> 139:856d2700e60b 2300 typedef struct
<> 139:856d2700e60b 2301 {
<> 139:856d2700e60b 2302 uint32_t fftLenReal; /**< length of the real FFT. */
<> 139:856d2700e60b 2303 uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
<> 139:856d2700e60b 2304 uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
<> 139:856d2700e60b 2305 uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 139:856d2700e60b 2306 q31_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
<> 139:856d2700e60b 2307 q31_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
<> 139:856d2700e60b 2308 const arm_cfft_instance_q31 *pCfft; /**< points to the complex FFT instance. */
<> 139:856d2700e60b 2309 } arm_rfft_instance_q31;
<> 139:856d2700e60b 2310
<> 139:856d2700e60b 2311 arm_status arm_rfft_init_q31(
<> 139:856d2700e60b 2312 arm_rfft_instance_q31 * S,
<> 139:856d2700e60b 2313 uint32_t fftLenReal,
<> 139:856d2700e60b 2314 uint32_t ifftFlagR,
<> 139:856d2700e60b 2315 uint32_t bitReverseFlag);
<> 139:856d2700e60b 2316
<> 139:856d2700e60b 2317 void arm_rfft_q31(
<> 139:856d2700e60b 2318 const arm_rfft_instance_q31 * S,
<> 139:856d2700e60b 2319 q31_t * pSrc,
<> 139:856d2700e60b 2320 q31_t * pDst);
<> 139:856d2700e60b 2321
<> 139:856d2700e60b 2322 /**
<> 139:856d2700e60b 2323 * @brief Instance structure for the floating-point RFFT/RIFFT function.
<> 139:856d2700e60b 2324 */
<> 139:856d2700e60b 2325
<> 139:856d2700e60b 2326 typedef struct
<> 139:856d2700e60b 2327 {
<> 139:856d2700e60b 2328 uint32_t fftLenReal; /**< length of the real FFT. */
<> 139:856d2700e60b 2329 uint16_t fftLenBy2; /**< length of the complex FFT. */
<> 139:856d2700e60b 2330 uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
<> 139:856d2700e60b 2331 uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
<> 139:856d2700e60b 2332 uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 139:856d2700e60b 2333 float32_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
<> 139:856d2700e60b 2334 float32_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
<> 139:856d2700e60b 2335 arm_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */
<> 139:856d2700e60b 2336 } arm_rfft_instance_f32;
<> 139:856d2700e60b 2337
<> 139:856d2700e60b 2338 arm_status arm_rfft_init_f32(
<> 139:856d2700e60b 2339 arm_rfft_instance_f32 * S,
<> 139:856d2700e60b 2340 arm_cfft_radix4_instance_f32 * S_CFFT,
<> 139:856d2700e60b 2341 uint32_t fftLenReal,
<> 139:856d2700e60b 2342 uint32_t ifftFlagR,
<> 139:856d2700e60b 2343 uint32_t bitReverseFlag);
<> 139:856d2700e60b 2344
<> 139:856d2700e60b 2345 void arm_rfft_f32(
<> 139:856d2700e60b 2346 const arm_rfft_instance_f32 * S,
<> 139:856d2700e60b 2347 float32_t * pSrc,
<> 139:856d2700e60b 2348 float32_t * pDst);
<> 139:856d2700e60b 2349
<> 139:856d2700e60b 2350 /**
<> 139:856d2700e60b 2351 * @brief Instance structure for the floating-point RFFT/RIFFT function.
<> 139:856d2700e60b 2352 */
<> 139:856d2700e60b 2353
<> 139:856d2700e60b 2354 typedef struct
<> 139:856d2700e60b 2355 {
<> 139:856d2700e60b 2356 arm_cfft_instance_f32 Sint; /**< Internal CFFT structure. */
<> 139:856d2700e60b 2357 uint16_t fftLenRFFT; /**< length of the real sequence */
<> 139:856d2700e60b 2358 float32_t * pTwiddleRFFT; /**< Twiddle factors real stage */
<> 139:856d2700e60b 2359 } arm_rfft_fast_instance_f32 ;
<> 139:856d2700e60b 2360
<> 139:856d2700e60b 2361 arm_status arm_rfft_fast_init_f32 (
<> 139:856d2700e60b 2362 arm_rfft_fast_instance_f32 * S,
<> 139:856d2700e60b 2363 uint16_t fftLen);
<> 139:856d2700e60b 2364
<> 139:856d2700e60b 2365 void arm_rfft_fast_f32(
<> 139:856d2700e60b 2366 arm_rfft_fast_instance_f32 * S,
<> 139:856d2700e60b 2367 float32_t * p, float32_t * pOut,
<> 139:856d2700e60b 2368 uint8_t ifftFlag);
<> 139:856d2700e60b 2369
<> 139:856d2700e60b 2370 /**
<> 139:856d2700e60b 2371 * @brief Instance structure for the floating-point DCT4/IDCT4 function.
<> 139:856d2700e60b 2372 */
<> 139:856d2700e60b 2373
<> 139:856d2700e60b 2374 typedef struct
<> 139:856d2700e60b 2375 {
<> 139:856d2700e60b 2376 uint16_t N; /**< length of the DCT4. */
<> 139:856d2700e60b 2377 uint16_t Nby2; /**< half of the length of the DCT4. */
<> 139:856d2700e60b 2378 float32_t normalize; /**< normalizing factor. */
<> 139:856d2700e60b 2379 float32_t *pTwiddle; /**< points to the twiddle factor table. */
<> 139:856d2700e60b 2380 float32_t *pCosFactor; /**< points to the cosFactor table. */
<> 139:856d2700e60b 2381 arm_rfft_instance_f32 *pRfft; /**< points to the real FFT instance. */
<> 139:856d2700e60b 2382 arm_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */
<> 139:856d2700e60b 2383 } arm_dct4_instance_f32;
<> 139:856d2700e60b 2384
<> 139:856d2700e60b 2385 /**
<> 139:856d2700e60b 2386 * @brief Initialization function for the floating-point DCT4/IDCT4.
<> 139:856d2700e60b 2387 * @param[in,out] *S points to an instance of floating-point DCT4/IDCT4 structure.
<> 139:856d2700e60b 2388 * @param[in] *S_RFFT points to an instance of floating-point RFFT/RIFFT structure.
<> 139:856d2700e60b 2389 * @param[in] *S_CFFT points to an instance of floating-point CFFT/CIFFT structure.
<> 139:856d2700e60b 2390 * @param[in] N length of the DCT4.
<> 139:856d2700e60b 2391 * @param[in] Nby2 half of the length of the DCT4.
<> 139:856d2700e60b 2392 * @param[in] normalize normalizing factor.
<> 139:856d2700e60b 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.
<> 139:856d2700e60b 2394 */
<> 139:856d2700e60b 2395
<> 139:856d2700e60b 2396 arm_status arm_dct4_init_f32(
<> 139:856d2700e60b 2397 arm_dct4_instance_f32 * S,
<> 139:856d2700e60b 2398 arm_rfft_instance_f32 * S_RFFT,
<> 139:856d2700e60b 2399 arm_cfft_radix4_instance_f32 * S_CFFT,
<> 139:856d2700e60b 2400 uint16_t N,
<> 139:856d2700e60b 2401 uint16_t Nby2,
<> 139:856d2700e60b 2402 float32_t normalize);
<> 139:856d2700e60b 2403
<> 139:856d2700e60b 2404 /**
<> 139:856d2700e60b 2405 * @brief Processing function for the floating-point DCT4/IDCT4.
<> 139:856d2700e60b 2406 * @param[in] *S points to an instance of the floating-point DCT4/IDCT4 structure.
<> 139:856d2700e60b 2407 * @param[in] *pState points to state buffer.
<> 139:856d2700e60b 2408 * @param[in,out] *pInlineBuffer points to the in-place input and output buffer.
<> 139:856d2700e60b 2409 * @return none.
<> 139:856d2700e60b 2410 */
<> 139:856d2700e60b 2411
<> 139:856d2700e60b 2412 void arm_dct4_f32(
<> 139:856d2700e60b 2413 const arm_dct4_instance_f32 * S,
<> 139:856d2700e60b 2414 float32_t * pState,
<> 139:856d2700e60b 2415 float32_t * pInlineBuffer);
<> 139:856d2700e60b 2416
<> 139:856d2700e60b 2417 /**
<> 139:856d2700e60b 2418 * @brief Instance structure for the Q31 DCT4/IDCT4 function.
<> 139:856d2700e60b 2419 */
<> 139:856d2700e60b 2420
<> 139:856d2700e60b 2421 typedef struct
<> 139:856d2700e60b 2422 {
<> 139:856d2700e60b 2423 uint16_t N; /**< length of the DCT4. */
<> 139:856d2700e60b 2424 uint16_t Nby2; /**< half of the length of the DCT4. */
<> 139:856d2700e60b 2425 q31_t normalize; /**< normalizing factor. */
<> 139:856d2700e60b 2426 q31_t *pTwiddle; /**< points to the twiddle factor table. */
<> 139:856d2700e60b 2427 q31_t *pCosFactor; /**< points to the cosFactor table. */
<> 139:856d2700e60b 2428 arm_rfft_instance_q31 *pRfft; /**< points to the real FFT instance. */
<> 139:856d2700e60b 2429 arm_cfft_radix4_instance_q31 *pCfft; /**< points to the complex FFT instance. */
<> 139:856d2700e60b 2430 } arm_dct4_instance_q31;
<> 139:856d2700e60b 2431
<> 139:856d2700e60b 2432 /**
<> 139:856d2700e60b 2433 * @brief Initialization function for the Q31 DCT4/IDCT4.
<> 139:856d2700e60b 2434 * @param[in,out] *S points to an instance of Q31 DCT4/IDCT4 structure.
<> 139:856d2700e60b 2435 * @param[in] *S_RFFT points to an instance of Q31 RFFT/RIFFT structure
<> 139:856d2700e60b 2436 * @param[in] *S_CFFT points to an instance of Q31 CFFT/CIFFT structure
<> 139:856d2700e60b 2437 * @param[in] N length of the DCT4.
<> 139:856d2700e60b 2438 * @param[in] Nby2 half of the length of the DCT4.
<> 139:856d2700e60b 2439 * @param[in] normalize normalizing factor.
<> 139:856d2700e60b 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.
<> 139:856d2700e60b 2441 */
<> 139:856d2700e60b 2442
<> 139:856d2700e60b 2443 arm_status arm_dct4_init_q31(
<> 139:856d2700e60b 2444 arm_dct4_instance_q31 * S,
<> 139:856d2700e60b 2445 arm_rfft_instance_q31 * S_RFFT,
<> 139:856d2700e60b 2446 arm_cfft_radix4_instance_q31 * S_CFFT,
<> 139:856d2700e60b 2447 uint16_t N,
<> 139:856d2700e60b 2448 uint16_t Nby2,
<> 139:856d2700e60b 2449 q31_t normalize);
<> 139:856d2700e60b 2450
<> 139:856d2700e60b 2451 /**
<> 139:856d2700e60b 2452 * @brief Processing function for the Q31 DCT4/IDCT4.
<> 139:856d2700e60b 2453 * @param[in] *S points to an instance of the Q31 DCT4 structure.
<> 139:856d2700e60b 2454 * @param[in] *pState points to state buffer.
<> 139:856d2700e60b 2455 * @param[in,out] *pInlineBuffer points to the in-place input and output buffer.
<> 139:856d2700e60b 2456 * @return none.
<> 139:856d2700e60b 2457 */
<> 139:856d2700e60b 2458
<> 139:856d2700e60b 2459 void arm_dct4_q31(
<> 139:856d2700e60b 2460 const arm_dct4_instance_q31 * S,
<> 139:856d2700e60b 2461 q31_t * pState,
<> 139:856d2700e60b 2462 q31_t * pInlineBuffer);
<> 139:856d2700e60b 2463
<> 139:856d2700e60b 2464 /**
<> 139:856d2700e60b 2465 * @brief Instance structure for the Q15 DCT4/IDCT4 function.
<> 139:856d2700e60b 2466 */
<> 139:856d2700e60b 2467
<> 139:856d2700e60b 2468 typedef struct
<> 139:856d2700e60b 2469 {
<> 139:856d2700e60b 2470 uint16_t N; /**< length of the DCT4. */
<> 139:856d2700e60b 2471 uint16_t Nby2; /**< half of the length of the DCT4. */
<> 139:856d2700e60b 2472 q15_t normalize; /**< normalizing factor. */
<> 139:856d2700e60b 2473 q15_t *pTwiddle; /**< points to the twiddle factor table. */
<> 139:856d2700e60b 2474 q15_t *pCosFactor; /**< points to the cosFactor table. */
<> 139:856d2700e60b 2475 arm_rfft_instance_q15 *pRfft; /**< points to the real FFT instance. */
<> 139:856d2700e60b 2476 arm_cfft_radix4_instance_q15 *pCfft; /**< points to the complex FFT instance. */
<> 139:856d2700e60b 2477 } arm_dct4_instance_q15;
<> 139:856d2700e60b 2478
<> 139:856d2700e60b 2479 /**
<> 139:856d2700e60b 2480 * @brief Initialization function for the Q15 DCT4/IDCT4.
<> 139:856d2700e60b 2481 * @param[in,out] *S points to an instance of Q15 DCT4/IDCT4 structure.
<> 139:856d2700e60b 2482 * @param[in] *S_RFFT points to an instance of Q15 RFFT/RIFFT structure.
<> 139:856d2700e60b 2483 * @param[in] *S_CFFT points to an instance of Q15 CFFT/CIFFT structure.
<> 139:856d2700e60b 2484 * @param[in] N length of the DCT4.
<> 139:856d2700e60b 2485 * @param[in] Nby2 half of the length of the DCT4.
<> 139:856d2700e60b 2486 * @param[in] normalize normalizing factor.
<> 139:856d2700e60b 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.
<> 139:856d2700e60b 2488 */
<> 139:856d2700e60b 2489
<> 139:856d2700e60b 2490 arm_status arm_dct4_init_q15(
<> 139:856d2700e60b 2491 arm_dct4_instance_q15 * S,
<> 139:856d2700e60b 2492 arm_rfft_instance_q15 * S_RFFT,
<> 139:856d2700e60b 2493 arm_cfft_radix4_instance_q15 * S_CFFT,
<> 139:856d2700e60b 2494 uint16_t N,
<> 139:856d2700e60b 2495 uint16_t Nby2,
<> 139:856d2700e60b 2496 q15_t normalize);
<> 139:856d2700e60b 2497
<> 139:856d2700e60b 2498 /**
<> 139:856d2700e60b 2499 * @brief Processing function for the Q15 DCT4/IDCT4.
<> 139:856d2700e60b 2500 * @param[in] *S points to an instance of the Q15 DCT4 structure.
<> 139:856d2700e60b 2501 * @param[in] *pState points to state buffer.
<> 139:856d2700e60b 2502 * @param[in,out] *pInlineBuffer points to the in-place input and output buffer.
<> 139:856d2700e60b 2503 * @return none.
<> 139:856d2700e60b 2504 */
<> 139:856d2700e60b 2505
<> 139:856d2700e60b 2506 void arm_dct4_q15(
<> 139:856d2700e60b 2507 const arm_dct4_instance_q15 * S,
<> 139:856d2700e60b 2508 q15_t * pState,
<> 139:856d2700e60b 2509 q15_t * pInlineBuffer);
<> 139:856d2700e60b 2510
<> 139:856d2700e60b 2511 /**
<> 139:856d2700e60b 2512 * @brief Floating-point vector addition.
<> 139:856d2700e60b 2513 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 2514 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 2515 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2516 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2517 * @return none.
<> 139:856d2700e60b 2518 */
<> 139:856d2700e60b 2519
<> 139:856d2700e60b 2520 void arm_add_f32(
<> 139:856d2700e60b 2521 float32_t * pSrcA,
<> 139:856d2700e60b 2522 float32_t * pSrcB,
<> 139:856d2700e60b 2523 float32_t * pDst,
<> 139:856d2700e60b 2524 uint32_t blockSize);
<> 139:856d2700e60b 2525
<> 139:856d2700e60b 2526 /**
<> 139:856d2700e60b 2527 * @brief Q7 vector addition.
<> 139:856d2700e60b 2528 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 2529 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 2530 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2531 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2532 * @return none.
<> 139:856d2700e60b 2533 */
<> 139:856d2700e60b 2534
<> 139:856d2700e60b 2535 void arm_add_q7(
<> 139:856d2700e60b 2536 q7_t * pSrcA,
<> 139:856d2700e60b 2537 q7_t * pSrcB,
<> 139:856d2700e60b 2538 q7_t * pDst,
<> 139:856d2700e60b 2539 uint32_t blockSize);
<> 139:856d2700e60b 2540
<> 139:856d2700e60b 2541 /**
<> 139:856d2700e60b 2542 * @brief Q15 vector addition.
<> 139:856d2700e60b 2543 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 2544 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 2545 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2546 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2547 * @return none.
<> 139:856d2700e60b 2548 */
<> 139:856d2700e60b 2549
<> 139:856d2700e60b 2550 void arm_add_q15(
<> 139:856d2700e60b 2551 q15_t * pSrcA,
<> 139:856d2700e60b 2552 q15_t * pSrcB,
<> 139:856d2700e60b 2553 q15_t * pDst,
<> 139:856d2700e60b 2554 uint32_t blockSize);
<> 139:856d2700e60b 2555
<> 139:856d2700e60b 2556 /**
<> 139:856d2700e60b 2557 * @brief Q31 vector addition.
<> 139:856d2700e60b 2558 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 2559 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 2560 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2561 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2562 * @return none.
<> 139:856d2700e60b 2563 */
<> 139:856d2700e60b 2564
<> 139:856d2700e60b 2565 void arm_add_q31(
<> 139:856d2700e60b 2566 q31_t * pSrcA,
<> 139:856d2700e60b 2567 q31_t * pSrcB,
<> 139:856d2700e60b 2568 q31_t * pDst,
<> 139:856d2700e60b 2569 uint32_t blockSize);
<> 139:856d2700e60b 2570
<> 139:856d2700e60b 2571 /**
<> 139:856d2700e60b 2572 * @brief Floating-point vector subtraction.
<> 139:856d2700e60b 2573 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 2574 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 2575 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2576 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2577 * @return none.
<> 139:856d2700e60b 2578 */
<> 139:856d2700e60b 2579
<> 139:856d2700e60b 2580 void arm_sub_f32(
<> 139:856d2700e60b 2581 float32_t * pSrcA,
<> 139:856d2700e60b 2582 float32_t * pSrcB,
<> 139:856d2700e60b 2583 float32_t * pDst,
<> 139:856d2700e60b 2584 uint32_t blockSize);
<> 139:856d2700e60b 2585
<> 139:856d2700e60b 2586 /**
<> 139:856d2700e60b 2587 * @brief Q7 vector subtraction.
<> 139:856d2700e60b 2588 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 2589 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 2590 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2591 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2592 * @return none.
<> 139:856d2700e60b 2593 */
<> 139:856d2700e60b 2594
<> 139:856d2700e60b 2595 void arm_sub_q7(
<> 139:856d2700e60b 2596 q7_t * pSrcA,
<> 139:856d2700e60b 2597 q7_t * pSrcB,
<> 139:856d2700e60b 2598 q7_t * pDst,
<> 139:856d2700e60b 2599 uint32_t blockSize);
<> 139:856d2700e60b 2600
<> 139:856d2700e60b 2601 /**
<> 139:856d2700e60b 2602 * @brief Q15 vector subtraction.
<> 139:856d2700e60b 2603 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 2604 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 2605 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2606 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2607 * @return none.
<> 139:856d2700e60b 2608 */
<> 139:856d2700e60b 2609
<> 139:856d2700e60b 2610 void arm_sub_q15(
<> 139:856d2700e60b 2611 q15_t * pSrcA,
<> 139:856d2700e60b 2612 q15_t * pSrcB,
<> 139:856d2700e60b 2613 q15_t * pDst,
<> 139:856d2700e60b 2614 uint32_t blockSize);
<> 139:856d2700e60b 2615
<> 139:856d2700e60b 2616 /**
<> 139:856d2700e60b 2617 * @brief Q31 vector subtraction.
<> 139:856d2700e60b 2618 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 2619 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 2620 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2621 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2622 * @return none.
<> 139:856d2700e60b 2623 */
<> 139:856d2700e60b 2624
<> 139:856d2700e60b 2625 void arm_sub_q31(
<> 139:856d2700e60b 2626 q31_t * pSrcA,
<> 139:856d2700e60b 2627 q31_t * pSrcB,
<> 139:856d2700e60b 2628 q31_t * pDst,
<> 139:856d2700e60b 2629 uint32_t blockSize);
<> 139:856d2700e60b 2630
<> 139:856d2700e60b 2631 /**
<> 139:856d2700e60b 2632 * @brief Multiplies a floating-point vector by a scalar.
<> 139:856d2700e60b 2633 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 2634 * @param[in] scale scale factor to be applied
<> 139:856d2700e60b 2635 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2636 * @param[in] blockSize number of samples in the vector
<> 139:856d2700e60b 2637 * @return none.
<> 139:856d2700e60b 2638 */
<> 139:856d2700e60b 2639
<> 139:856d2700e60b 2640 void arm_scale_f32(
<> 139:856d2700e60b 2641 float32_t * pSrc,
<> 139:856d2700e60b 2642 float32_t scale,
<> 139:856d2700e60b 2643 float32_t * pDst,
<> 139:856d2700e60b 2644 uint32_t blockSize);
<> 139:856d2700e60b 2645
<> 139:856d2700e60b 2646 /**
<> 139:856d2700e60b 2647 * @brief Multiplies a Q7 vector by a scalar.
<> 139:856d2700e60b 2648 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 2649 * @param[in] scaleFract fractional portion of the scale value
<> 139:856d2700e60b 2650 * @param[in] shift number of bits to shift the result by
<> 139:856d2700e60b 2651 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2652 * @param[in] blockSize number of samples in the vector
<> 139:856d2700e60b 2653 * @return none.
<> 139:856d2700e60b 2654 */
<> 139:856d2700e60b 2655
<> 139:856d2700e60b 2656 void arm_scale_q7(
<> 139:856d2700e60b 2657 q7_t * pSrc,
<> 139:856d2700e60b 2658 q7_t scaleFract,
<> 139:856d2700e60b 2659 int8_t shift,
<> 139:856d2700e60b 2660 q7_t * pDst,
<> 139:856d2700e60b 2661 uint32_t blockSize);
<> 139:856d2700e60b 2662
<> 139:856d2700e60b 2663 /**
<> 139:856d2700e60b 2664 * @brief Multiplies a Q15 vector by a scalar.
<> 139:856d2700e60b 2665 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 2666 * @param[in] scaleFract fractional portion of the scale value
<> 139:856d2700e60b 2667 * @param[in] shift number of bits to shift the result by
<> 139:856d2700e60b 2668 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2669 * @param[in] blockSize number of samples in the vector
<> 139:856d2700e60b 2670 * @return none.
<> 139:856d2700e60b 2671 */
<> 139:856d2700e60b 2672
<> 139:856d2700e60b 2673 void arm_scale_q15(
<> 139:856d2700e60b 2674 q15_t * pSrc,
<> 139:856d2700e60b 2675 q15_t scaleFract,
<> 139:856d2700e60b 2676 int8_t shift,
<> 139:856d2700e60b 2677 q15_t * pDst,
<> 139:856d2700e60b 2678 uint32_t blockSize);
<> 139:856d2700e60b 2679
<> 139:856d2700e60b 2680 /**
<> 139:856d2700e60b 2681 * @brief Multiplies a Q31 vector by a scalar.
<> 139:856d2700e60b 2682 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 2683 * @param[in] scaleFract fractional portion of the scale value
<> 139:856d2700e60b 2684 * @param[in] shift number of bits to shift the result by
<> 139:856d2700e60b 2685 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2686 * @param[in] blockSize number of samples in the vector
<> 139:856d2700e60b 2687 * @return none.
<> 139:856d2700e60b 2688 */
<> 139:856d2700e60b 2689
<> 139:856d2700e60b 2690 void arm_scale_q31(
<> 139:856d2700e60b 2691 q31_t * pSrc,
<> 139:856d2700e60b 2692 q31_t scaleFract,
<> 139:856d2700e60b 2693 int8_t shift,
<> 139:856d2700e60b 2694 q31_t * pDst,
<> 139:856d2700e60b 2695 uint32_t blockSize);
<> 139:856d2700e60b 2696
<> 139:856d2700e60b 2697 /**
<> 139:856d2700e60b 2698 * @brief Q7 vector absolute value.
<> 139:856d2700e60b 2699 * @param[in] *pSrc points to the input buffer
<> 139:856d2700e60b 2700 * @param[out] *pDst points to the output buffer
<> 139:856d2700e60b 2701 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2702 * @return none.
<> 139:856d2700e60b 2703 */
<> 139:856d2700e60b 2704
<> 139:856d2700e60b 2705 void arm_abs_q7(
<> 139:856d2700e60b 2706 q7_t * pSrc,
<> 139:856d2700e60b 2707 q7_t * pDst,
<> 139:856d2700e60b 2708 uint32_t blockSize);
<> 139:856d2700e60b 2709
<> 139:856d2700e60b 2710 /**
<> 139:856d2700e60b 2711 * @brief Floating-point vector absolute value.
<> 139:856d2700e60b 2712 * @param[in] *pSrc points to the input buffer
<> 139:856d2700e60b 2713 * @param[out] *pDst points to the output buffer
<> 139:856d2700e60b 2714 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2715 * @return none.
<> 139:856d2700e60b 2716 */
<> 139:856d2700e60b 2717
<> 139:856d2700e60b 2718 void arm_abs_f32(
<> 139:856d2700e60b 2719 float32_t * pSrc,
<> 139:856d2700e60b 2720 float32_t * pDst,
<> 139:856d2700e60b 2721 uint32_t blockSize);
<> 139:856d2700e60b 2722
<> 139:856d2700e60b 2723 /**
<> 139:856d2700e60b 2724 * @brief Q15 vector absolute value.
<> 139:856d2700e60b 2725 * @param[in] *pSrc points to the input buffer
<> 139:856d2700e60b 2726 * @param[out] *pDst points to the output buffer
<> 139:856d2700e60b 2727 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2728 * @return none.
<> 139:856d2700e60b 2729 */
<> 139:856d2700e60b 2730
<> 139:856d2700e60b 2731 void arm_abs_q15(
<> 139:856d2700e60b 2732 q15_t * pSrc,
<> 139:856d2700e60b 2733 q15_t * pDst,
<> 139:856d2700e60b 2734 uint32_t blockSize);
<> 139:856d2700e60b 2735
<> 139:856d2700e60b 2736 /**
<> 139:856d2700e60b 2737 * @brief Q31 vector absolute value.
<> 139:856d2700e60b 2738 * @param[in] *pSrc points to the input buffer
<> 139:856d2700e60b 2739 * @param[out] *pDst points to the output buffer
<> 139:856d2700e60b 2740 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2741 * @return none.
<> 139:856d2700e60b 2742 */
<> 139:856d2700e60b 2743
<> 139:856d2700e60b 2744 void arm_abs_q31(
<> 139:856d2700e60b 2745 q31_t * pSrc,
<> 139:856d2700e60b 2746 q31_t * pDst,
<> 139:856d2700e60b 2747 uint32_t blockSize);
<> 139:856d2700e60b 2748
<> 139:856d2700e60b 2749 /**
<> 139:856d2700e60b 2750 * @brief Dot product of floating-point vectors.
<> 139:856d2700e60b 2751 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 2752 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 2753 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2754 * @param[out] *result output result returned here
<> 139:856d2700e60b 2755 * @return none.
<> 139:856d2700e60b 2756 */
<> 139:856d2700e60b 2757
<> 139:856d2700e60b 2758 void arm_dot_prod_f32(
<> 139:856d2700e60b 2759 float32_t * pSrcA,
<> 139:856d2700e60b 2760 float32_t * pSrcB,
<> 139:856d2700e60b 2761 uint32_t blockSize,
<> 139:856d2700e60b 2762 float32_t * result);
<> 139:856d2700e60b 2763
<> 139:856d2700e60b 2764 /**
<> 139:856d2700e60b 2765 * @brief Dot product of Q7 vectors.
<> 139:856d2700e60b 2766 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 2767 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 2768 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2769 * @param[out] *result output result returned here
<> 139:856d2700e60b 2770 * @return none.
<> 139:856d2700e60b 2771 */
<> 139:856d2700e60b 2772
<> 139:856d2700e60b 2773 void arm_dot_prod_q7(
<> 139:856d2700e60b 2774 q7_t * pSrcA,
<> 139:856d2700e60b 2775 q7_t * pSrcB,
<> 139:856d2700e60b 2776 uint32_t blockSize,
<> 139:856d2700e60b 2777 q31_t * result);
<> 139:856d2700e60b 2778
<> 139:856d2700e60b 2779 /**
<> 139:856d2700e60b 2780 * @brief Dot product of Q15 vectors.
<> 139:856d2700e60b 2781 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 2782 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 2783 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2784 * @param[out] *result output result returned here
<> 139:856d2700e60b 2785 * @return none.
<> 139:856d2700e60b 2786 */
<> 139:856d2700e60b 2787
<> 139:856d2700e60b 2788 void arm_dot_prod_q15(
<> 139:856d2700e60b 2789 q15_t * pSrcA,
<> 139:856d2700e60b 2790 q15_t * pSrcB,
<> 139:856d2700e60b 2791 uint32_t blockSize,
<> 139:856d2700e60b 2792 q63_t * result);
<> 139:856d2700e60b 2793
<> 139:856d2700e60b 2794 /**
<> 139:856d2700e60b 2795 * @brief Dot product of Q31 vectors.
<> 139:856d2700e60b 2796 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 2797 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 2798 * @param[in] blockSize number of samples in each vector
<> 139:856d2700e60b 2799 * @param[out] *result output result returned here
<> 139:856d2700e60b 2800 * @return none.
<> 139:856d2700e60b 2801 */
<> 139:856d2700e60b 2802
<> 139:856d2700e60b 2803 void arm_dot_prod_q31(
<> 139:856d2700e60b 2804 q31_t * pSrcA,
<> 139:856d2700e60b 2805 q31_t * pSrcB,
<> 139:856d2700e60b 2806 uint32_t blockSize,
<> 139:856d2700e60b 2807 q63_t * result);
<> 139:856d2700e60b 2808
<> 139:856d2700e60b 2809 /**
<> 139:856d2700e60b 2810 * @brief Shifts the elements of a Q7 vector a specified number of bits.
<> 139:856d2700e60b 2811 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 2812 * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right.
<> 139:856d2700e60b 2813 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2814 * @param[in] blockSize number of samples in the vector
<> 139:856d2700e60b 2815 * @return none.
<> 139:856d2700e60b 2816 */
<> 139:856d2700e60b 2817
<> 139:856d2700e60b 2818 void arm_shift_q7(
<> 139:856d2700e60b 2819 q7_t * pSrc,
<> 139:856d2700e60b 2820 int8_t shiftBits,
<> 139:856d2700e60b 2821 q7_t * pDst,
<> 139:856d2700e60b 2822 uint32_t blockSize);
<> 139:856d2700e60b 2823
<> 139:856d2700e60b 2824 /**
<> 139:856d2700e60b 2825 * @brief Shifts the elements of a Q15 vector a specified number of bits.
<> 139:856d2700e60b 2826 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 2827 * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right.
<> 139:856d2700e60b 2828 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2829 * @param[in] blockSize number of samples in the vector
<> 139:856d2700e60b 2830 * @return none.
<> 139:856d2700e60b 2831 */
<> 139:856d2700e60b 2832
<> 139:856d2700e60b 2833 void arm_shift_q15(
<> 139:856d2700e60b 2834 q15_t * pSrc,
<> 139:856d2700e60b 2835 int8_t shiftBits,
<> 139:856d2700e60b 2836 q15_t * pDst,
<> 139:856d2700e60b 2837 uint32_t blockSize);
<> 139:856d2700e60b 2838
<> 139:856d2700e60b 2839 /**
<> 139:856d2700e60b 2840 * @brief Shifts the elements of a Q31 vector a specified number of bits.
<> 139:856d2700e60b 2841 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 2842 * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right.
<> 139:856d2700e60b 2843 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2844 * @param[in] blockSize number of samples in the vector
<> 139:856d2700e60b 2845 * @return none.
<> 139:856d2700e60b 2846 */
<> 139:856d2700e60b 2847
<> 139:856d2700e60b 2848 void arm_shift_q31(
<> 139:856d2700e60b 2849 q31_t * pSrc,
<> 139:856d2700e60b 2850 int8_t shiftBits,
<> 139:856d2700e60b 2851 q31_t * pDst,
<> 139:856d2700e60b 2852 uint32_t blockSize);
<> 139:856d2700e60b 2853
<> 139:856d2700e60b 2854 /**
<> 139:856d2700e60b 2855 * @brief Adds a constant offset to a floating-point vector.
<> 139:856d2700e60b 2856 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 2857 * @param[in] offset is the offset to be added
<> 139:856d2700e60b 2858 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2859 * @param[in] blockSize number of samples in the vector
<> 139:856d2700e60b 2860 * @return none.
<> 139:856d2700e60b 2861 */
<> 139:856d2700e60b 2862
<> 139:856d2700e60b 2863 void arm_offset_f32(
<> 139:856d2700e60b 2864 float32_t * pSrc,
<> 139:856d2700e60b 2865 float32_t offset,
<> 139:856d2700e60b 2866 float32_t * pDst,
<> 139:856d2700e60b 2867 uint32_t blockSize);
<> 139:856d2700e60b 2868
<> 139:856d2700e60b 2869 /**
<> 139:856d2700e60b 2870 * @brief Adds a constant offset to a Q7 vector.
<> 139:856d2700e60b 2871 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 2872 * @param[in] offset is the offset to be added
<> 139:856d2700e60b 2873 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2874 * @param[in] blockSize number of samples in the vector
<> 139:856d2700e60b 2875 * @return none.
<> 139:856d2700e60b 2876 */
<> 139:856d2700e60b 2877
<> 139:856d2700e60b 2878 void arm_offset_q7(
<> 139:856d2700e60b 2879 q7_t * pSrc,
<> 139:856d2700e60b 2880 q7_t offset,
<> 139:856d2700e60b 2881 q7_t * pDst,
<> 139:856d2700e60b 2882 uint32_t blockSize);
<> 139:856d2700e60b 2883
<> 139:856d2700e60b 2884 /**
<> 139:856d2700e60b 2885 * @brief Adds a constant offset to a Q15 vector.
<> 139:856d2700e60b 2886 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 2887 * @param[in] offset is the offset to be added
<> 139:856d2700e60b 2888 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2889 * @param[in] blockSize number of samples in the vector
<> 139:856d2700e60b 2890 * @return none.
<> 139:856d2700e60b 2891 */
<> 139:856d2700e60b 2892
<> 139:856d2700e60b 2893 void arm_offset_q15(
<> 139:856d2700e60b 2894 q15_t * pSrc,
<> 139:856d2700e60b 2895 q15_t offset,
<> 139:856d2700e60b 2896 q15_t * pDst,
<> 139:856d2700e60b 2897 uint32_t blockSize);
<> 139:856d2700e60b 2898
<> 139:856d2700e60b 2899 /**
<> 139:856d2700e60b 2900 * @brief Adds a constant offset to a Q31 vector.
<> 139:856d2700e60b 2901 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 2902 * @param[in] offset is the offset to be added
<> 139:856d2700e60b 2903 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2904 * @param[in] blockSize number of samples in the vector
<> 139:856d2700e60b 2905 * @return none.
<> 139:856d2700e60b 2906 */
<> 139:856d2700e60b 2907
<> 139:856d2700e60b 2908 void arm_offset_q31(
<> 139:856d2700e60b 2909 q31_t * pSrc,
<> 139:856d2700e60b 2910 q31_t offset,
<> 139:856d2700e60b 2911 q31_t * pDst,
<> 139:856d2700e60b 2912 uint32_t blockSize);
<> 139:856d2700e60b 2913
<> 139:856d2700e60b 2914 /**
<> 139:856d2700e60b 2915 * @brief Negates the elements of a floating-point vector.
<> 139:856d2700e60b 2916 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 2917 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2918 * @param[in] blockSize number of samples in the vector
<> 139:856d2700e60b 2919 * @return none.
<> 139:856d2700e60b 2920 */
<> 139:856d2700e60b 2921
<> 139:856d2700e60b 2922 void arm_negate_f32(
<> 139:856d2700e60b 2923 float32_t * pSrc,
<> 139:856d2700e60b 2924 float32_t * pDst,
<> 139:856d2700e60b 2925 uint32_t blockSize);
<> 139:856d2700e60b 2926
<> 139:856d2700e60b 2927 /**
<> 139:856d2700e60b 2928 * @brief Negates the elements of a Q7 vector.
<> 139:856d2700e60b 2929 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 2930 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2931 * @param[in] blockSize number of samples in the vector
<> 139:856d2700e60b 2932 * @return none.
<> 139:856d2700e60b 2933 */
<> 139:856d2700e60b 2934
<> 139:856d2700e60b 2935 void arm_negate_q7(
<> 139:856d2700e60b 2936 q7_t * pSrc,
<> 139:856d2700e60b 2937 q7_t * pDst,
<> 139:856d2700e60b 2938 uint32_t blockSize);
<> 139:856d2700e60b 2939
<> 139:856d2700e60b 2940 /**
<> 139:856d2700e60b 2941 * @brief Negates the elements of a Q15 vector.
<> 139:856d2700e60b 2942 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 2943 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2944 * @param[in] blockSize number of samples in the vector
<> 139:856d2700e60b 2945 * @return none.
<> 139:856d2700e60b 2946 */
<> 139:856d2700e60b 2947
<> 139:856d2700e60b 2948 void arm_negate_q15(
<> 139:856d2700e60b 2949 q15_t * pSrc,
<> 139:856d2700e60b 2950 q15_t * pDst,
<> 139:856d2700e60b 2951 uint32_t blockSize);
<> 139:856d2700e60b 2952
<> 139:856d2700e60b 2953 /**
<> 139:856d2700e60b 2954 * @brief Negates the elements of a Q31 vector.
<> 139:856d2700e60b 2955 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 2956 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 2957 * @param[in] blockSize number of samples in the vector
<> 139:856d2700e60b 2958 * @return none.
<> 139:856d2700e60b 2959 */
<> 139:856d2700e60b 2960
<> 139:856d2700e60b 2961 void arm_negate_q31(
<> 139:856d2700e60b 2962 q31_t * pSrc,
<> 139:856d2700e60b 2963 q31_t * pDst,
<> 139:856d2700e60b 2964 uint32_t blockSize);
<> 139:856d2700e60b 2965 /**
<> 139:856d2700e60b 2966 * @brief Copies the elements of a floating-point vector.
<> 139:856d2700e60b 2967 * @param[in] *pSrc input pointer
<> 139:856d2700e60b 2968 * @param[out] *pDst output pointer
<> 139:856d2700e60b 2969 * @param[in] blockSize number of samples to process
<> 139:856d2700e60b 2970 * @return none.
<> 139:856d2700e60b 2971 */
<> 139:856d2700e60b 2972 void arm_copy_f32(
<> 139:856d2700e60b 2973 float32_t * pSrc,
<> 139:856d2700e60b 2974 float32_t * pDst,
<> 139:856d2700e60b 2975 uint32_t blockSize);
<> 139:856d2700e60b 2976
<> 139:856d2700e60b 2977 /**
<> 139:856d2700e60b 2978 * @brief Copies the elements of a Q7 vector.
<> 139:856d2700e60b 2979 * @param[in] *pSrc input pointer
<> 139:856d2700e60b 2980 * @param[out] *pDst output pointer
<> 139:856d2700e60b 2981 * @param[in] blockSize number of samples to process
<> 139:856d2700e60b 2982 * @return none.
<> 139:856d2700e60b 2983 */
<> 139:856d2700e60b 2984 void arm_copy_q7(
<> 139:856d2700e60b 2985 q7_t * pSrc,
<> 139:856d2700e60b 2986 q7_t * pDst,
<> 139:856d2700e60b 2987 uint32_t blockSize);
<> 139:856d2700e60b 2988
<> 139:856d2700e60b 2989 /**
<> 139:856d2700e60b 2990 * @brief Copies the elements of a Q15 vector.
<> 139:856d2700e60b 2991 * @param[in] *pSrc input pointer
<> 139:856d2700e60b 2992 * @param[out] *pDst output pointer
<> 139:856d2700e60b 2993 * @param[in] blockSize number of samples to process
<> 139:856d2700e60b 2994 * @return none.
<> 139:856d2700e60b 2995 */
<> 139:856d2700e60b 2996 void arm_copy_q15(
<> 139:856d2700e60b 2997 q15_t * pSrc,
<> 139:856d2700e60b 2998 q15_t * pDst,
<> 139:856d2700e60b 2999 uint32_t blockSize);
<> 139:856d2700e60b 3000
<> 139:856d2700e60b 3001 /**
<> 139:856d2700e60b 3002 * @brief Copies the elements of a Q31 vector.
<> 139:856d2700e60b 3003 * @param[in] *pSrc input pointer
<> 139:856d2700e60b 3004 * @param[out] *pDst output pointer
<> 139:856d2700e60b 3005 * @param[in] blockSize number of samples to process
<> 139:856d2700e60b 3006 * @return none.
<> 139:856d2700e60b 3007 */
<> 139:856d2700e60b 3008 void arm_copy_q31(
<> 139:856d2700e60b 3009 q31_t * pSrc,
<> 139:856d2700e60b 3010 q31_t * pDst,
<> 139:856d2700e60b 3011 uint32_t blockSize);
<> 139:856d2700e60b 3012 /**
<> 139:856d2700e60b 3013 * @brief Fills a constant value into a floating-point vector.
<> 139:856d2700e60b 3014 * @param[in] value input value to be filled
<> 139:856d2700e60b 3015 * @param[out] *pDst output pointer
<> 139:856d2700e60b 3016 * @param[in] blockSize number of samples to process
<> 139:856d2700e60b 3017 * @return none.
<> 139:856d2700e60b 3018 */
<> 139:856d2700e60b 3019 void arm_fill_f32(
<> 139:856d2700e60b 3020 float32_t value,
<> 139:856d2700e60b 3021 float32_t * pDst,
<> 139:856d2700e60b 3022 uint32_t blockSize);
<> 139:856d2700e60b 3023
<> 139:856d2700e60b 3024 /**
<> 139:856d2700e60b 3025 * @brief Fills a constant value into a Q7 vector.
<> 139:856d2700e60b 3026 * @param[in] value input value to be filled
<> 139:856d2700e60b 3027 * @param[out] *pDst output pointer
<> 139:856d2700e60b 3028 * @param[in] blockSize number of samples to process
<> 139:856d2700e60b 3029 * @return none.
<> 139:856d2700e60b 3030 */
<> 139:856d2700e60b 3031 void arm_fill_q7(
<> 139:856d2700e60b 3032 q7_t value,
<> 139:856d2700e60b 3033 q7_t * pDst,
<> 139:856d2700e60b 3034 uint32_t blockSize);
<> 139:856d2700e60b 3035
<> 139:856d2700e60b 3036 /**
<> 139:856d2700e60b 3037 * @brief Fills a constant value into a Q15 vector.
<> 139:856d2700e60b 3038 * @param[in] value input value to be filled
<> 139:856d2700e60b 3039 * @param[out] *pDst output pointer
<> 139:856d2700e60b 3040 * @param[in] blockSize number of samples to process
<> 139:856d2700e60b 3041 * @return none.
<> 139:856d2700e60b 3042 */
<> 139:856d2700e60b 3043 void arm_fill_q15(
<> 139:856d2700e60b 3044 q15_t value,
<> 139:856d2700e60b 3045 q15_t * pDst,
<> 139:856d2700e60b 3046 uint32_t blockSize);
<> 139:856d2700e60b 3047
<> 139:856d2700e60b 3048 /**
<> 139:856d2700e60b 3049 * @brief Fills a constant value into a Q31 vector.
<> 139:856d2700e60b 3050 * @param[in] value input value to be filled
<> 139:856d2700e60b 3051 * @param[out] *pDst output pointer
<> 139:856d2700e60b 3052 * @param[in] blockSize number of samples to process
<> 139:856d2700e60b 3053 * @return none.
<> 139:856d2700e60b 3054 */
<> 139:856d2700e60b 3055 void arm_fill_q31(
<> 139:856d2700e60b 3056 q31_t value,
<> 139:856d2700e60b 3057 q31_t * pDst,
<> 139:856d2700e60b 3058 uint32_t blockSize);
<> 139:856d2700e60b 3059
<> 139:856d2700e60b 3060 /**
<> 139:856d2700e60b 3061 * @brief Convolution of floating-point sequences.
<> 139:856d2700e60b 3062 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3063 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3064 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3065 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3066 * @param[out] *pDst points to the location where the output result is written. Length srcALen+srcBLen-1.
<> 139:856d2700e60b 3067 * @return none.
<> 139:856d2700e60b 3068 */
<> 139:856d2700e60b 3069
<> 139:856d2700e60b 3070 void arm_conv_f32(
<> 139:856d2700e60b 3071 float32_t * pSrcA,
<> 139:856d2700e60b 3072 uint32_t srcALen,
<> 139:856d2700e60b 3073 float32_t * pSrcB,
<> 139:856d2700e60b 3074 uint32_t srcBLen,
<> 139:856d2700e60b 3075 float32_t * pDst);
<> 139:856d2700e60b 3076
<> 139:856d2700e60b 3077
<> 139:856d2700e60b 3078 /**
<> 139:856d2700e60b 3079 * @brief Convolution of Q15 sequences.
<> 139:856d2700e60b 3080 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3081 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3082 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3083 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3084 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 139:856d2700e60b 3085 * @param[in] *pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 139:856d2700e60b 3086 * @param[in] *pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
<> 139:856d2700e60b 3087 * @return none.
<> 139:856d2700e60b 3088 */
<> 139:856d2700e60b 3089
<> 139:856d2700e60b 3090
<> 139:856d2700e60b 3091 void arm_conv_opt_q15(
<> 139:856d2700e60b 3092 q15_t * pSrcA,
<> 139:856d2700e60b 3093 uint32_t srcALen,
<> 139:856d2700e60b 3094 q15_t * pSrcB,
<> 139:856d2700e60b 3095 uint32_t srcBLen,
<> 139:856d2700e60b 3096 q15_t * pDst,
<> 139:856d2700e60b 3097 q15_t * pScratch1,
<> 139:856d2700e60b 3098 q15_t * pScratch2);
<> 139:856d2700e60b 3099
<> 139:856d2700e60b 3100
<> 139:856d2700e60b 3101 /**
<> 139:856d2700e60b 3102 * @brief Convolution of Q15 sequences.
<> 139:856d2700e60b 3103 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3104 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3105 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3106 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3107 * @param[out] *pDst points to the location where the output result is written. Length srcALen+srcBLen-1.
<> 139:856d2700e60b 3108 * @return none.
<> 139:856d2700e60b 3109 */
<> 139:856d2700e60b 3110
<> 139:856d2700e60b 3111 void arm_conv_q15(
<> 139:856d2700e60b 3112 q15_t * pSrcA,
<> 139:856d2700e60b 3113 uint32_t srcALen,
<> 139:856d2700e60b 3114 q15_t * pSrcB,
<> 139:856d2700e60b 3115 uint32_t srcBLen,
<> 139:856d2700e60b 3116 q15_t * pDst);
<> 139:856d2700e60b 3117
<> 139:856d2700e60b 3118 /**
<> 139:856d2700e60b 3119 * @brief Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 139:856d2700e60b 3120 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3121 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3122 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3123 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3124 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 139:856d2700e60b 3125 * @return none.
<> 139:856d2700e60b 3126 */
<> 139:856d2700e60b 3127
<> 139:856d2700e60b 3128 void arm_conv_fast_q15(
<> 139:856d2700e60b 3129 q15_t * pSrcA,
<> 139:856d2700e60b 3130 uint32_t srcALen,
<> 139:856d2700e60b 3131 q15_t * pSrcB,
<> 139:856d2700e60b 3132 uint32_t srcBLen,
<> 139:856d2700e60b 3133 q15_t * pDst);
<> 139:856d2700e60b 3134
<> 139:856d2700e60b 3135 /**
<> 139:856d2700e60b 3136 * @brief Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 139:856d2700e60b 3137 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3138 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3139 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3140 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3141 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 139:856d2700e60b 3142 * @param[in] *pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 139:856d2700e60b 3143 * @param[in] *pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
<> 139:856d2700e60b 3144 * @return none.
<> 139:856d2700e60b 3145 */
<> 139:856d2700e60b 3146
<> 139:856d2700e60b 3147 void arm_conv_fast_opt_q15(
<> 139:856d2700e60b 3148 q15_t * pSrcA,
<> 139:856d2700e60b 3149 uint32_t srcALen,
<> 139:856d2700e60b 3150 q15_t * pSrcB,
<> 139:856d2700e60b 3151 uint32_t srcBLen,
<> 139:856d2700e60b 3152 q15_t * pDst,
<> 139:856d2700e60b 3153 q15_t * pScratch1,
<> 139:856d2700e60b 3154 q15_t * pScratch2);
<> 139:856d2700e60b 3155
<> 139:856d2700e60b 3156
<> 139:856d2700e60b 3157
<> 139:856d2700e60b 3158 /**
<> 139:856d2700e60b 3159 * @brief Convolution of Q31 sequences.
<> 139:856d2700e60b 3160 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3161 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3162 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3163 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3164 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 139:856d2700e60b 3165 * @return none.
<> 139:856d2700e60b 3166 */
<> 139:856d2700e60b 3167
<> 139:856d2700e60b 3168 void arm_conv_q31(
<> 139:856d2700e60b 3169 q31_t * pSrcA,
<> 139:856d2700e60b 3170 uint32_t srcALen,
<> 139:856d2700e60b 3171 q31_t * pSrcB,
<> 139:856d2700e60b 3172 uint32_t srcBLen,
<> 139:856d2700e60b 3173 q31_t * pDst);
<> 139:856d2700e60b 3174
<> 139:856d2700e60b 3175 /**
<> 139:856d2700e60b 3176 * @brief Convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 139:856d2700e60b 3177 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3178 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3179 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3180 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3181 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 139:856d2700e60b 3182 * @return none.
<> 139:856d2700e60b 3183 */
<> 139:856d2700e60b 3184
<> 139:856d2700e60b 3185 void arm_conv_fast_q31(
<> 139:856d2700e60b 3186 q31_t * pSrcA,
<> 139:856d2700e60b 3187 uint32_t srcALen,
<> 139:856d2700e60b 3188 q31_t * pSrcB,
<> 139:856d2700e60b 3189 uint32_t srcBLen,
<> 139:856d2700e60b 3190 q31_t * pDst);
<> 139:856d2700e60b 3191
<> 139:856d2700e60b 3192
<> 139:856d2700e60b 3193 /**
<> 139:856d2700e60b 3194 * @brief Convolution of Q7 sequences.
<> 139:856d2700e60b 3195 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3196 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3197 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3198 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3199 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 139:856d2700e60b 3200 * @param[in] *pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 139:856d2700e60b 3201 * @param[in] *pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen).
<> 139:856d2700e60b 3202 * @return none.
<> 139:856d2700e60b 3203 */
<> 139:856d2700e60b 3204
<> 139:856d2700e60b 3205 void arm_conv_opt_q7(
<> 139:856d2700e60b 3206 q7_t * pSrcA,
<> 139:856d2700e60b 3207 uint32_t srcALen,
<> 139:856d2700e60b 3208 q7_t * pSrcB,
<> 139:856d2700e60b 3209 uint32_t srcBLen,
<> 139:856d2700e60b 3210 q7_t * pDst,
<> 139:856d2700e60b 3211 q15_t * pScratch1,
<> 139:856d2700e60b 3212 q15_t * pScratch2);
<> 139:856d2700e60b 3213
<> 139:856d2700e60b 3214
<> 139:856d2700e60b 3215
<> 139:856d2700e60b 3216 /**
<> 139:856d2700e60b 3217 * @brief Convolution of Q7 sequences.
<> 139:856d2700e60b 3218 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3219 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3220 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3221 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3222 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 139:856d2700e60b 3223 * @return none.
<> 139:856d2700e60b 3224 */
<> 139:856d2700e60b 3225
<> 139:856d2700e60b 3226 void arm_conv_q7(
<> 139:856d2700e60b 3227 q7_t * pSrcA,
<> 139:856d2700e60b 3228 uint32_t srcALen,
<> 139:856d2700e60b 3229 q7_t * pSrcB,
<> 139:856d2700e60b 3230 uint32_t srcBLen,
<> 139:856d2700e60b 3231 q7_t * pDst);
<> 139:856d2700e60b 3232
<> 139:856d2700e60b 3233
<> 139:856d2700e60b 3234 /**
<> 139:856d2700e60b 3235 * @brief Partial convolution of floating-point sequences.
<> 139:856d2700e60b 3236 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3237 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3238 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3239 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3240 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3241 * @param[in] firstIndex is the first output sample to start with.
<> 139:856d2700e60b 3242 * @param[in] numPoints is the number of output points to be computed.
<> 139:856d2700e60b 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].
<> 139:856d2700e60b 3244 */
<> 139:856d2700e60b 3245
<> 139:856d2700e60b 3246 arm_status arm_conv_partial_f32(
<> 139:856d2700e60b 3247 float32_t * pSrcA,
<> 139:856d2700e60b 3248 uint32_t srcALen,
<> 139:856d2700e60b 3249 float32_t * pSrcB,
<> 139:856d2700e60b 3250 uint32_t srcBLen,
<> 139:856d2700e60b 3251 float32_t * pDst,
<> 139:856d2700e60b 3252 uint32_t firstIndex,
<> 139:856d2700e60b 3253 uint32_t numPoints);
<> 139:856d2700e60b 3254
<> 139:856d2700e60b 3255 /**
<> 139:856d2700e60b 3256 * @brief Partial convolution of Q15 sequences.
<> 139:856d2700e60b 3257 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3258 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3259 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3260 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3261 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3262 * @param[in] firstIndex is the first output sample to start with.
<> 139:856d2700e60b 3263 * @param[in] numPoints is the number of output points to be computed.
<> 139:856d2700e60b 3264 * @param[in] * pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 139:856d2700e60b 3265 * @param[in] * pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
<> 139:856d2700e60b 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].
<> 139:856d2700e60b 3267 */
<> 139:856d2700e60b 3268
<> 139:856d2700e60b 3269 arm_status arm_conv_partial_opt_q15(
<> 139:856d2700e60b 3270 q15_t * pSrcA,
<> 139:856d2700e60b 3271 uint32_t srcALen,
<> 139:856d2700e60b 3272 q15_t * pSrcB,
<> 139:856d2700e60b 3273 uint32_t srcBLen,
<> 139:856d2700e60b 3274 q15_t * pDst,
<> 139:856d2700e60b 3275 uint32_t firstIndex,
<> 139:856d2700e60b 3276 uint32_t numPoints,
<> 139:856d2700e60b 3277 q15_t * pScratch1,
<> 139:856d2700e60b 3278 q15_t * pScratch2);
<> 139:856d2700e60b 3279
<> 139:856d2700e60b 3280
<> 139:856d2700e60b 3281 /**
<> 139:856d2700e60b 3282 * @brief Partial convolution of Q15 sequences.
<> 139:856d2700e60b 3283 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3284 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3285 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3286 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3287 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3288 * @param[in] firstIndex is the first output sample to start with.
<> 139:856d2700e60b 3289 * @param[in] numPoints is the number of output points to be computed.
<> 139:856d2700e60b 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].
<> 139:856d2700e60b 3291 */
<> 139:856d2700e60b 3292
<> 139:856d2700e60b 3293 arm_status arm_conv_partial_q15(
<> 139:856d2700e60b 3294 q15_t * pSrcA,
<> 139:856d2700e60b 3295 uint32_t srcALen,
<> 139:856d2700e60b 3296 q15_t * pSrcB,
<> 139:856d2700e60b 3297 uint32_t srcBLen,
<> 139:856d2700e60b 3298 q15_t * pDst,
<> 139:856d2700e60b 3299 uint32_t firstIndex,
<> 139:856d2700e60b 3300 uint32_t numPoints);
<> 139:856d2700e60b 3301
<> 139:856d2700e60b 3302 /**
<> 139:856d2700e60b 3303 * @brief Partial convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 139:856d2700e60b 3304 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3305 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3306 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3307 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3308 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3309 * @param[in] firstIndex is the first output sample to start with.
<> 139:856d2700e60b 3310 * @param[in] numPoints is the number of output points to be computed.
<> 139:856d2700e60b 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].
<> 139:856d2700e60b 3312 */
<> 139:856d2700e60b 3313
<> 139:856d2700e60b 3314 arm_status arm_conv_partial_fast_q15(
<> 139:856d2700e60b 3315 q15_t * pSrcA,
<> 139:856d2700e60b 3316 uint32_t srcALen,
<> 139:856d2700e60b 3317 q15_t * pSrcB,
<> 139:856d2700e60b 3318 uint32_t srcBLen,
<> 139:856d2700e60b 3319 q15_t * pDst,
<> 139:856d2700e60b 3320 uint32_t firstIndex,
<> 139:856d2700e60b 3321 uint32_t numPoints);
<> 139:856d2700e60b 3322
<> 139:856d2700e60b 3323
<> 139:856d2700e60b 3324 /**
<> 139:856d2700e60b 3325 * @brief Partial convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 139:856d2700e60b 3326 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3327 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3328 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3329 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3330 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3331 * @param[in] firstIndex is the first output sample to start with.
<> 139:856d2700e60b 3332 * @param[in] numPoints is the number of output points to be computed.
<> 139:856d2700e60b 3333 * @param[in] * pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 139:856d2700e60b 3334 * @param[in] * pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
<> 139:856d2700e60b 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].
<> 139:856d2700e60b 3336 */
<> 139:856d2700e60b 3337
<> 139:856d2700e60b 3338 arm_status arm_conv_partial_fast_opt_q15(
<> 139:856d2700e60b 3339 q15_t * pSrcA,
<> 139:856d2700e60b 3340 uint32_t srcALen,
<> 139:856d2700e60b 3341 q15_t * pSrcB,
<> 139:856d2700e60b 3342 uint32_t srcBLen,
<> 139:856d2700e60b 3343 q15_t * pDst,
<> 139:856d2700e60b 3344 uint32_t firstIndex,
<> 139:856d2700e60b 3345 uint32_t numPoints,
<> 139:856d2700e60b 3346 q15_t * pScratch1,
<> 139:856d2700e60b 3347 q15_t * pScratch2);
<> 139:856d2700e60b 3348
<> 139:856d2700e60b 3349
<> 139:856d2700e60b 3350 /**
<> 139:856d2700e60b 3351 * @brief Partial convolution of Q31 sequences.
<> 139:856d2700e60b 3352 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3353 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3354 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3355 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3356 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3357 * @param[in] firstIndex is the first output sample to start with.
<> 139:856d2700e60b 3358 * @param[in] numPoints is the number of output points to be computed.
<> 139:856d2700e60b 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].
<> 139:856d2700e60b 3360 */
<> 139:856d2700e60b 3361
<> 139:856d2700e60b 3362 arm_status arm_conv_partial_q31(
<> 139:856d2700e60b 3363 q31_t * pSrcA,
<> 139:856d2700e60b 3364 uint32_t srcALen,
<> 139:856d2700e60b 3365 q31_t * pSrcB,
<> 139:856d2700e60b 3366 uint32_t srcBLen,
<> 139:856d2700e60b 3367 q31_t * pDst,
<> 139:856d2700e60b 3368 uint32_t firstIndex,
<> 139:856d2700e60b 3369 uint32_t numPoints);
<> 139:856d2700e60b 3370
<> 139:856d2700e60b 3371
<> 139:856d2700e60b 3372 /**
<> 139:856d2700e60b 3373 * @brief Partial convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 139:856d2700e60b 3374 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3375 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3376 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3377 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3378 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3379 * @param[in] firstIndex is the first output sample to start with.
<> 139:856d2700e60b 3380 * @param[in] numPoints is the number of output points to be computed.
<> 139:856d2700e60b 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].
<> 139:856d2700e60b 3382 */
<> 139:856d2700e60b 3383
<> 139:856d2700e60b 3384 arm_status arm_conv_partial_fast_q31(
<> 139:856d2700e60b 3385 q31_t * pSrcA,
<> 139:856d2700e60b 3386 uint32_t srcALen,
<> 139:856d2700e60b 3387 q31_t * pSrcB,
<> 139:856d2700e60b 3388 uint32_t srcBLen,
<> 139:856d2700e60b 3389 q31_t * pDst,
<> 139:856d2700e60b 3390 uint32_t firstIndex,
<> 139:856d2700e60b 3391 uint32_t numPoints);
<> 139:856d2700e60b 3392
<> 139:856d2700e60b 3393
<> 139:856d2700e60b 3394 /**
<> 139:856d2700e60b 3395 * @brief Partial convolution of Q7 sequences
<> 139:856d2700e60b 3396 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3397 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3398 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3399 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3400 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3401 * @param[in] firstIndex is the first output sample to start with.
<> 139:856d2700e60b 3402 * @param[in] numPoints is the number of output points to be computed.
<> 139:856d2700e60b 3403 * @param[in] *pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 139:856d2700e60b 3404 * @param[in] *pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen).
<> 139:856d2700e60b 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].
<> 139:856d2700e60b 3406 */
<> 139:856d2700e60b 3407
<> 139:856d2700e60b 3408 arm_status arm_conv_partial_opt_q7(
<> 139:856d2700e60b 3409 q7_t * pSrcA,
<> 139:856d2700e60b 3410 uint32_t srcALen,
<> 139:856d2700e60b 3411 q7_t * pSrcB,
<> 139:856d2700e60b 3412 uint32_t srcBLen,
<> 139:856d2700e60b 3413 q7_t * pDst,
<> 139:856d2700e60b 3414 uint32_t firstIndex,
<> 139:856d2700e60b 3415 uint32_t numPoints,
<> 139:856d2700e60b 3416 q15_t * pScratch1,
<> 139:856d2700e60b 3417 q15_t * pScratch2);
<> 139:856d2700e60b 3418
<> 139:856d2700e60b 3419
<> 139:856d2700e60b 3420 /**
<> 139:856d2700e60b 3421 * @brief Partial convolution of Q7 sequences.
<> 139:856d2700e60b 3422 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 3423 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 3424 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 3425 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 3426 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3427 * @param[in] firstIndex is the first output sample to start with.
<> 139:856d2700e60b 3428 * @param[in] numPoints is the number of output points to be computed.
<> 139:856d2700e60b 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].
<> 139:856d2700e60b 3430 */
<> 139:856d2700e60b 3431
<> 139:856d2700e60b 3432 arm_status arm_conv_partial_q7(
<> 139:856d2700e60b 3433 q7_t * pSrcA,
<> 139:856d2700e60b 3434 uint32_t srcALen,
<> 139:856d2700e60b 3435 q7_t * pSrcB,
<> 139:856d2700e60b 3436 uint32_t srcBLen,
<> 139:856d2700e60b 3437 q7_t * pDst,
<> 139:856d2700e60b 3438 uint32_t firstIndex,
<> 139:856d2700e60b 3439 uint32_t numPoints);
<> 139:856d2700e60b 3440
<> 139:856d2700e60b 3441
<> 139:856d2700e60b 3442
<> 139:856d2700e60b 3443 /**
<> 139:856d2700e60b 3444 * @brief Instance structure for the Q15 FIR decimator.
<> 139:856d2700e60b 3445 */
<> 139:856d2700e60b 3446
<> 139:856d2700e60b 3447 typedef struct
<> 139:856d2700e60b 3448 {
<> 139:856d2700e60b 3449 uint8_t M; /**< decimation factor. */
<> 139:856d2700e60b 3450 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 139:856d2700e60b 3451 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 139:856d2700e60b 3452 q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 139:856d2700e60b 3453 } arm_fir_decimate_instance_q15;
<> 139:856d2700e60b 3454
<> 139:856d2700e60b 3455 /**
<> 139:856d2700e60b 3456 * @brief Instance structure for the Q31 FIR decimator.
<> 139:856d2700e60b 3457 */
<> 139:856d2700e60b 3458
<> 139:856d2700e60b 3459 typedef struct
<> 139:856d2700e60b 3460 {
<> 139:856d2700e60b 3461 uint8_t M; /**< decimation factor. */
<> 139:856d2700e60b 3462 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 139:856d2700e60b 3463 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 139:856d2700e60b 3464 q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 139:856d2700e60b 3465
<> 139:856d2700e60b 3466 } arm_fir_decimate_instance_q31;
<> 139:856d2700e60b 3467
<> 139:856d2700e60b 3468 /**
<> 139:856d2700e60b 3469 * @brief Instance structure for the floating-point FIR decimator.
<> 139:856d2700e60b 3470 */
<> 139:856d2700e60b 3471
<> 139:856d2700e60b 3472 typedef struct
<> 139:856d2700e60b 3473 {
<> 139:856d2700e60b 3474 uint8_t M; /**< decimation factor. */
<> 139:856d2700e60b 3475 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 139:856d2700e60b 3476 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 139:856d2700e60b 3477 float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 139:856d2700e60b 3478
<> 139:856d2700e60b 3479 } arm_fir_decimate_instance_f32;
<> 139:856d2700e60b 3480
<> 139:856d2700e60b 3481
<> 139:856d2700e60b 3482
<> 139:856d2700e60b 3483 /**
<> 139:856d2700e60b 3484 * @brief Processing function for the floating-point FIR decimator.
<> 139:856d2700e60b 3485 * @param[in] *S points to an instance of the floating-point FIR decimator structure.
<> 139:856d2700e60b 3486 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 3487 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3488 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 3489 * @return none
<> 139:856d2700e60b 3490 */
<> 139:856d2700e60b 3491
<> 139:856d2700e60b 3492 void arm_fir_decimate_f32(
<> 139:856d2700e60b 3493 const arm_fir_decimate_instance_f32 * S,
<> 139:856d2700e60b 3494 float32_t * pSrc,
<> 139:856d2700e60b 3495 float32_t * pDst,
<> 139:856d2700e60b 3496 uint32_t blockSize);
<> 139:856d2700e60b 3497
<> 139:856d2700e60b 3498
<> 139:856d2700e60b 3499 /**
<> 139:856d2700e60b 3500 * @brief Initialization function for the floating-point FIR decimator.
<> 139:856d2700e60b 3501 * @param[in,out] *S points to an instance of the floating-point FIR decimator structure.
<> 139:856d2700e60b 3502 * @param[in] numTaps number of coefficients in the filter.
<> 139:856d2700e60b 3503 * @param[in] M decimation factor.
<> 139:856d2700e60b 3504 * @param[in] *pCoeffs points to the filter coefficients.
<> 139:856d2700e60b 3505 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 3506 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 3507 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 139:856d2700e60b 3508 * <code>blockSize</code> is not a multiple of <code>M</code>.
<> 139:856d2700e60b 3509 */
<> 139:856d2700e60b 3510
<> 139:856d2700e60b 3511 arm_status arm_fir_decimate_init_f32(
<> 139:856d2700e60b 3512 arm_fir_decimate_instance_f32 * S,
<> 139:856d2700e60b 3513 uint16_t numTaps,
<> 139:856d2700e60b 3514 uint8_t M,
<> 139:856d2700e60b 3515 float32_t * pCoeffs,
<> 139:856d2700e60b 3516 float32_t * pState,
<> 139:856d2700e60b 3517 uint32_t blockSize);
<> 139:856d2700e60b 3518
<> 139:856d2700e60b 3519 /**
<> 139:856d2700e60b 3520 * @brief Processing function for the Q15 FIR decimator.
<> 139:856d2700e60b 3521 * @param[in] *S points to an instance of the Q15 FIR decimator structure.
<> 139:856d2700e60b 3522 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 3523 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3524 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 3525 * @return none
<> 139:856d2700e60b 3526 */
<> 139:856d2700e60b 3527
<> 139:856d2700e60b 3528 void arm_fir_decimate_q15(
<> 139:856d2700e60b 3529 const arm_fir_decimate_instance_q15 * S,
<> 139:856d2700e60b 3530 q15_t * pSrc,
<> 139:856d2700e60b 3531 q15_t * pDst,
<> 139:856d2700e60b 3532 uint32_t blockSize);
<> 139:856d2700e60b 3533
<> 139:856d2700e60b 3534 /**
<> 139:856d2700e60b 3535 * @brief Processing function for the Q15 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
<> 139:856d2700e60b 3536 * @param[in] *S points to an instance of the Q15 FIR decimator structure.
<> 139:856d2700e60b 3537 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 3538 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3539 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 3540 * @return none
<> 139:856d2700e60b 3541 */
<> 139:856d2700e60b 3542
<> 139:856d2700e60b 3543 void arm_fir_decimate_fast_q15(
<> 139:856d2700e60b 3544 const arm_fir_decimate_instance_q15 * S,
<> 139:856d2700e60b 3545 q15_t * pSrc,
<> 139:856d2700e60b 3546 q15_t * pDst,
<> 139:856d2700e60b 3547 uint32_t blockSize);
<> 139:856d2700e60b 3548
<> 139:856d2700e60b 3549
<> 139:856d2700e60b 3550
<> 139:856d2700e60b 3551 /**
<> 139:856d2700e60b 3552 * @brief Initialization function for the Q15 FIR decimator.
<> 139:856d2700e60b 3553 * @param[in,out] *S points to an instance of the Q15 FIR decimator structure.
<> 139:856d2700e60b 3554 * @param[in] numTaps number of coefficients in the filter.
<> 139:856d2700e60b 3555 * @param[in] M decimation factor.
<> 139:856d2700e60b 3556 * @param[in] *pCoeffs points to the filter coefficients.
<> 139:856d2700e60b 3557 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 3558 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 3559 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 139:856d2700e60b 3560 * <code>blockSize</code> is not a multiple of <code>M</code>.
<> 139:856d2700e60b 3561 */
<> 139:856d2700e60b 3562
<> 139:856d2700e60b 3563 arm_status arm_fir_decimate_init_q15(
<> 139:856d2700e60b 3564 arm_fir_decimate_instance_q15 * S,
<> 139:856d2700e60b 3565 uint16_t numTaps,
<> 139:856d2700e60b 3566 uint8_t M,
<> 139:856d2700e60b 3567 q15_t * pCoeffs,
<> 139:856d2700e60b 3568 q15_t * pState,
<> 139:856d2700e60b 3569 uint32_t blockSize);
<> 139:856d2700e60b 3570
<> 139:856d2700e60b 3571 /**
<> 139:856d2700e60b 3572 * @brief Processing function for the Q31 FIR decimator.
<> 139:856d2700e60b 3573 * @param[in] *S points to an instance of the Q31 FIR decimator structure.
<> 139:856d2700e60b 3574 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 3575 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3576 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 3577 * @return none
<> 139:856d2700e60b 3578 */
<> 139:856d2700e60b 3579
<> 139:856d2700e60b 3580 void arm_fir_decimate_q31(
<> 139:856d2700e60b 3581 const arm_fir_decimate_instance_q31 * S,
<> 139:856d2700e60b 3582 q31_t * pSrc,
<> 139:856d2700e60b 3583 q31_t * pDst,
<> 139:856d2700e60b 3584 uint32_t blockSize);
<> 139:856d2700e60b 3585
<> 139:856d2700e60b 3586 /**
<> 139:856d2700e60b 3587 * @brief Processing function for the Q31 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
<> 139:856d2700e60b 3588 * @param[in] *S points to an instance of the Q31 FIR decimator structure.
<> 139:856d2700e60b 3589 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 3590 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3591 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 3592 * @return none
<> 139:856d2700e60b 3593 */
<> 139:856d2700e60b 3594
<> 139:856d2700e60b 3595 void arm_fir_decimate_fast_q31(
<> 139:856d2700e60b 3596 arm_fir_decimate_instance_q31 * S,
<> 139:856d2700e60b 3597 q31_t * pSrc,
<> 139:856d2700e60b 3598 q31_t * pDst,
<> 139:856d2700e60b 3599 uint32_t blockSize);
<> 139:856d2700e60b 3600
<> 139:856d2700e60b 3601
<> 139:856d2700e60b 3602 /**
<> 139:856d2700e60b 3603 * @brief Initialization function for the Q31 FIR decimator.
<> 139:856d2700e60b 3604 * @param[in,out] *S points to an instance of the Q31 FIR decimator structure.
<> 139:856d2700e60b 3605 * @param[in] numTaps number of coefficients in the filter.
<> 139:856d2700e60b 3606 * @param[in] M decimation factor.
<> 139:856d2700e60b 3607 * @param[in] *pCoeffs points to the filter coefficients.
<> 139:856d2700e60b 3608 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 3609 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 3610 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 139:856d2700e60b 3611 * <code>blockSize</code> is not a multiple of <code>M</code>.
<> 139:856d2700e60b 3612 */
<> 139:856d2700e60b 3613
<> 139:856d2700e60b 3614 arm_status arm_fir_decimate_init_q31(
<> 139:856d2700e60b 3615 arm_fir_decimate_instance_q31 * S,
<> 139:856d2700e60b 3616 uint16_t numTaps,
<> 139:856d2700e60b 3617 uint8_t M,
<> 139:856d2700e60b 3618 q31_t * pCoeffs,
<> 139:856d2700e60b 3619 q31_t * pState,
<> 139:856d2700e60b 3620 uint32_t blockSize);
<> 139:856d2700e60b 3621
<> 139:856d2700e60b 3622
<> 139:856d2700e60b 3623
<> 139:856d2700e60b 3624 /**
<> 139:856d2700e60b 3625 * @brief Instance structure for the Q15 FIR interpolator.
<> 139:856d2700e60b 3626 */
<> 139:856d2700e60b 3627
<> 139:856d2700e60b 3628 typedef struct
<> 139:856d2700e60b 3629 {
<> 139:856d2700e60b 3630 uint8_t L; /**< upsample factor. */
<> 139:856d2700e60b 3631 uint16_t phaseLength; /**< length of each polyphase filter component. */
<> 139:856d2700e60b 3632 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
<> 139:856d2700e60b 3633 q15_t *pState; /**< points to the state variable array. The array is of length blockSize+phaseLength-1. */
<> 139:856d2700e60b 3634 } arm_fir_interpolate_instance_q15;
<> 139:856d2700e60b 3635
<> 139:856d2700e60b 3636 /**
<> 139:856d2700e60b 3637 * @brief Instance structure for the Q31 FIR interpolator.
<> 139:856d2700e60b 3638 */
<> 139:856d2700e60b 3639
<> 139:856d2700e60b 3640 typedef struct
<> 139:856d2700e60b 3641 {
<> 139:856d2700e60b 3642 uint8_t L; /**< upsample factor. */
<> 139:856d2700e60b 3643 uint16_t phaseLength; /**< length of each polyphase filter component. */
<> 139:856d2700e60b 3644 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
<> 139:856d2700e60b 3645 q31_t *pState; /**< points to the state variable array. The array is of length blockSize+phaseLength-1. */
<> 139:856d2700e60b 3646 } arm_fir_interpolate_instance_q31;
<> 139:856d2700e60b 3647
<> 139:856d2700e60b 3648 /**
<> 139:856d2700e60b 3649 * @brief Instance structure for the floating-point FIR interpolator.
<> 139:856d2700e60b 3650 */
<> 139:856d2700e60b 3651
<> 139:856d2700e60b 3652 typedef struct
<> 139:856d2700e60b 3653 {
<> 139:856d2700e60b 3654 uint8_t L; /**< upsample factor. */
<> 139:856d2700e60b 3655 uint16_t phaseLength; /**< length of each polyphase filter component. */
<> 139:856d2700e60b 3656 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
<> 139:856d2700e60b 3657 float32_t *pState; /**< points to the state variable array. The array is of length phaseLength+numTaps-1. */
<> 139:856d2700e60b 3658 } arm_fir_interpolate_instance_f32;
<> 139:856d2700e60b 3659
<> 139:856d2700e60b 3660
<> 139:856d2700e60b 3661 /**
<> 139:856d2700e60b 3662 * @brief Processing function for the Q15 FIR interpolator.
<> 139:856d2700e60b 3663 * @param[in] *S points to an instance of the Q15 FIR interpolator structure.
<> 139:856d2700e60b 3664 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 3665 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 3666 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 3667 * @return none.
<> 139:856d2700e60b 3668 */
<> 139:856d2700e60b 3669
<> 139:856d2700e60b 3670 void arm_fir_interpolate_q15(
<> 139:856d2700e60b 3671 const arm_fir_interpolate_instance_q15 * S,
<> 139:856d2700e60b 3672 q15_t * pSrc,
<> 139:856d2700e60b 3673 q15_t * pDst,
<> 139:856d2700e60b 3674 uint32_t blockSize);
<> 139:856d2700e60b 3675
<> 139:856d2700e60b 3676
<> 139:856d2700e60b 3677 /**
<> 139:856d2700e60b 3678 * @brief Initialization function for the Q15 FIR interpolator.
<> 139:856d2700e60b 3679 * @param[in,out] *S points to an instance of the Q15 FIR interpolator structure.
<> 139:856d2700e60b 3680 * @param[in] L upsample factor.
<> 139:856d2700e60b 3681 * @param[in] numTaps number of filter coefficients in the filter.
<> 139:856d2700e60b 3682 * @param[in] *pCoeffs points to the filter coefficient buffer.
<> 139:856d2700e60b 3683 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 3684 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 3685 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 139:856d2700e60b 3686 * the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</code>.
<> 139:856d2700e60b 3687 */
<> 139:856d2700e60b 3688
<> 139:856d2700e60b 3689 arm_status arm_fir_interpolate_init_q15(
<> 139:856d2700e60b 3690 arm_fir_interpolate_instance_q15 * S,
<> 139:856d2700e60b 3691 uint8_t L,
<> 139:856d2700e60b 3692 uint16_t numTaps,
<> 139:856d2700e60b 3693 q15_t * pCoeffs,
<> 139:856d2700e60b 3694 q15_t * pState,
<> 139:856d2700e60b 3695 uint32_t blockSize);
<> 139:856d2700e60b 3696
<> 139:856d2700e60b 3697 /**
<> 139:856d2700e60b 3698 * @brief Processing function for the Q31 FIR interpolator.
<> 139:856d2700e60b 3699 * @param[in] *S points to an instance of the Q15 FIR interpolator structure.
<> 139:856d2700e60b 3700 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 3701 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 3702 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 3703 * @return none.
<> 139:856d2700e60b 3704 */
<> 139:856d2700e60b 3705
<> 139:856d2700e60b 3706 void arm_fir_interpolate_q31(
<> 139:856d2700e60b 3707 const arm_fir_interpolate_instance_q31 * S,
<> 139:856d2700e60b 3708 q31_t * pSrc,
<> 139:856d2700e60b 3709 q31_t * pDst,
<> 139:856d2700e60b 3710 uint32_t blockSize);
<> 139:856d2700e60b 3711
<> 139:856d2700e60b 3712 /**
<> 139:856d2700e60b 3713 * @brief Initialization function for the Q31 FIR interpolator.
<> 139:856d2700e60b 3714 * @param[in,out] *S points to an instance of the Q31 FIR interpolator structure.
<> 139:856d2700e60b 3715 * @param[in] L upsample factor.
<> 139:856d2700e60b 3716 * @param[in] numTaps number of filter coefficients in the filter.
<> 139:856d2700e60b 3717 * @param[in] *pCoeffs points to the filter coefficient buffer.
<> 139:856d2700e60b 3718 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 3719 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 3720 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 139:856d2700e60b 3721 * the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</code>.
<> 139:856d2700e60b 3722 */
<> 139:856d2700e60b 3723
<> 139:856d2700e60b 3724 arm_status arm_fir_interpolate_init_q31(
<> 139:856d2700e60b 3725 arm_fir_interpolate_instance_q31 * S,
<> 139:856d2700e60b 3726 uint8_t L,
<> 139:856d2700e60b 3727 uint16_t numTaps,
<> 139:856d2700e60b 3728 q31_t * pCoeffs,
<> 139:856d2700e60b 3729 q31_t * pState,
<> 139:856d2700e60b 3730 uint32_t blockSize);
<> 139:856d2700e60b 3731
<> 139:856d2700e60b 3732
<> 139:856d2700e60b 3733 /**
<> 139:856d2700e60b 3734 * @brief Processing function for the floating-point FIR interpolator.
<> 139:856d2700e60b 3735 * @param[in] *S points to an instance of the floating-point FIR interpolator structure.
<> 139:856d2700e60b 3736 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 3737 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 3738 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 3739 * @return none.
<> 139:856d2700e60b 3740 */
<> 139:856d2700e60b 3741
<> 139:856d2700e60b 3742 void arm_fir_interpolate_f32(
<> 139:856d2700e60b 3743 const arm_fir_interpolate_instance_f32 * S,
<> 139:856d2700e60b 3744 float32_t * pSrc,
<> 139:856d2700e60b 3745 float32_t * pDst,
<> 139:856d2700e60b 3746 uint32_t blockSize);
<> 139:856d2700e60b 3747
<> 139:856d2700e60b 3748 /**
<> 139:856d2700e60b 3749 * @brief Initialization function for the floating-point FIR interpolator.
<> 139:856d2700e60b 3750 * @param[in,out] *S points to an instance of the floating-point FIR interpolator structure.
<> 139:856d2700e60b 3751 * @param[in] L upsample factor.
<> 139:856d2700e60b 3752 * @param[in] numTaps number of filter coefficients in the filter.
<> 139:856d2700e60b 3753 * @param[in] *pCoeffs points to the filter coefficient buffer.
<> 139:856d2700e60b 3754 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 3755 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 3756 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 139:856d2700e60b 3757 * the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</code>.
<> 139:856d2700e60b 3758 */
<> 139:856d2700e60b 3759
<> 139:856d2700e60b 3760 arm_status arm_fir_interpolate_init_f32(
<> 139:856d2700e60b 3761 arm_fir_interpolate_instance_f32 * S,
<> 139:856d2700e60b 3762 uint8_t L,
<> 139:856d2700e60b 3763 uint16_t numTaps,
<> 139:856d2700e60b 3764 float32_t * pCoeffs,
<> 139:856d2700e60b 3765 float32_t * pState,
<> 139:856d2700e60b 3766 uint32_t blockSize);
<> 139:856d2700e60b 3767
<> 139:856d2700e60b 3768 /**
<> 139:856d2700e60b 3769 * @brief Instance structure for the high precision Q31 Biquad cascade filter.
<> 139:856d2700e60b 3770 */
<> 139:856d2700e60b 3771
<> 139:856d2700e60b 3772 typedef struct
<> 139:856d2700e60b 3773 {
<> 139:856d2700e60b 3774 uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 139:856d2700e60b 3775 q63_t *pState; /**< points to the array of state coefficients. The array is of length 4*numStages. */
<> 139:856d2700e60b 3776 q31_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
<> 139:856d2700e60b 3777 uint8_t postShift; /**< additional shift, in bits, applied to each output sample. */
<> 139:856d2700e60b 3778
<> 139:856d2700e60b 3779 } arm_biquad_cas_df1_32x64_ins_q31;
<> 139:856d2700e60b 3780
<> 139:856d2700e60b 3781
<> 139:856d2700e60b 3782 /**
<> 139:856d2700e60b 3783 * @param[in] *S points to an instance of the high precision Q31 Biquad cascade filter structure.
<> 139:856d2700e60b 3784 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 3785 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3786 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 3787 * @return none.
<> 139:856d2700e60b 3788 */
<> 139:856d2700e60b 3789
<> 139:856d2700e60b 3790 void arm_biquad_cas_df1_32x64_q31(
<> 139:856d2700e60b 3791 const arm_biquad_cas_df1_32x64_ins_q31 * S,
<> 139:856d2700e60b 3792 q31_t * pSrc,
<> 139:856d2700e60b 3793 q31_t * pDst,
<> 139:856d2700e60b 3794 uint32_t blockSize);
<> 139:856d2700e60b 3795
<> 139:856d2700e60b 3796
<> 139:856d2700e60b 3797 /**
<> 139:856d2700e60b 3798 * @param[in,out] *S points to an instance of the high precision Q31 Biquad cascade filter structure.
<> 139:856d2700e60b 3799 * @param[in] numStages number of 2nd order stages in the filter.
<> 139:856d2700e60b 3800 * @param[in] *pCoeffs points to the filter coefficients.
<> 139:856d2700e60b 3801 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 3802 * @param[in] postShift shift to be applied to the output. Varies according to the coefficients format
<> 139:856d2700e60b 3803 * @return none
<> 139:856d2700e60b 3804 */
<> 139:856d2700e60b 3805
<> 139:856d2700e60b 3806 void arm_biquad_cas_df1_32x64_init_q31(
<> 139:856d2700e60b 3807 arm_biquad_cas_df1_32x64_ins_q31 * S,
<> 139:856d2700e60b 3808 uint8_t numStages,
<> 139:856d2700e60b 3809 q31_t * pCoeffs,
<> 139:856d2700e60b 3810 q63_t * pState,
<> 139:856d2700e60b 3811 uint8_t postShift);
<> 139:856d2700e60b 3812
<> 139:856d2700e60b 3813
<> 139:856d2700e60b 3814
<> 139:856d2700e60b 3815 /**
<> 139:856d2700e60b 3816 * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
<> 139:856d2700e60b 3817 */
<> 139:856d2700e60b 3818
<> 139:856d2700e60b 3819 typedef struct
<> 139:856d2700e60b 3820 {
<> 139:856d2700e60b 3821 uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 139:856d2700e60b 3822 float32_t *pState; /**< points to the array of state coefficients. The array is of length 2*numStages. */
<> 139:856d2700e60b 3823 float32_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
<> 139:856d2700e60b 3824 } arm_biquad_cascade_df2T_instance_f32;
<> 139:856d2700e60b 3825
<> 139:856d2700e60b 3826
<> 139:856d2700e60b 3827
<> 139:856d2700e60b 3828 /**
<> 139:856d2700e60b 3829 * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
<> 139:856d2700e60b 3830 */
<> 139:856d2700e60b 3831
<> 139:856d2700e60b 3832 typedef struct
<> 139:856d2700e60b 3833 {
<> 139:856d2700e60b 3834 uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 139:856d2700e60b 3835 float32_t *pState; /**< points to the array of state coefficients. The array is of length 4*numStages. */
<> 139:856d2700e60b 3836 float32_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
<> 139:856d2700e60b 3837 } arm_biquad_cascade_stereo_df2T_instance_f32;
<> 139:856d2700e60b 3838
<> 139:856d2700e60b 3839
<> 139:856d2700e60b 3840
<> 139:856d2700e60b 3841 /**
<> 139:856d2700e60b 3842 * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
<> 139:856d2700e60b 3843 */
<> 139:856d2700e60b 3844
<> 139:856d2700e60b 3845 typedef struct
<> 139:856d2700e60b 3846 {
<> 139:856d2700e60b 3847 uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 139:856d2700e60b 3848 float64_t *pState; /**< points to the array of state coefficients. The array is of length 2*numStages. */
<> 139:856d2700e60b 3849 float64_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
<> 139:856d2700e60b 3850 } arm_biquad_cascade_df2T_instance_f64;
<> 139:856d2700e60b 3851
<> 139:856d2700e60b 3852
<> 139:856d2700e60b 3853 /**
<> 139:856d2700e60b 3854 * @brief Processing function for the floating-point transposed direct form II Biquad cascade filter.
<> 139:856d2700e60b 3855 * @param[in] *S points to an instance of the filter data structure.
<> 139:856d2700e60b 3856 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 3857 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3858 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 3859 * @return none.
<> 139:856d2700e60b 3860 */
<> 139:856d2700e60b 3861
<> 139:856d2700e60b 3862 void arm_biquad_cascade_df2T_f32(
<> 139:856d2700e60b 3863 const arm_biquad_cascade_df2T_instance_f32 * S,
<> 139:856d2700e60b 3864 float32_t * pSrc,
<> 139:856d2700e60b 3865 float32_t * pDst,
<> 139:856d2700e60b 3866 uint32_t blockSize);
<> 139:856d2700e60b 3867
<> 139:856d2700e60b 3868
<> 139:856d2700e60b 3869 /**
<> 139:856d2700e60b 3870 * @brief Processing function for the floating-point transposed direct form II Biquad cascade filter. 2 channels
<> 139:856d2700e60b 3871 * @param[in] *S points to an instance of the filter data structure.
<> 139:856d2700e60b 3872 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 3873 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3874 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 3875 * @return none.
<> 139:856d2700e60b 3876 */
<> 139:856d2700e60b 3877
<> 139:856d2700e60b 3878 void arm_biquad_cascade_stereo_df2T_f32(
<> 139:856d2700e60b 3879 const arm_biquad_cascade_stereo_df2T_instance_f32 * S,
<> 139:856d2700e60b 3880 float32_t * pSrc,
<> 139:856d2700e60b 3881 float32_t * pDst,
<> 139:856d2700e60b 3882 uint32_t blockSize);
<> 139:856d2700e60b 3883
<> 139:856d2700e60b 3884 /**
<> 139:856d2700e60b 3885 * @brief Processing function for the floating-point transposed direct form II Biquad cascade filter.
<> 139:856d2700e60b 3886 * @param[in] *S points to an instance of the filter data structure.
<> 139:856d2700e60b 3887 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 3888 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 3889 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 3890 * @return none.
<> 139:856d2700e60b 3891 */
<> 139:856d2700e60b 3892
<> 139:856d2700e60b 3893 void arm_biquad_cascade_df2T_f64(
<> 139:856d2700e60b 3894 const arm_biquad_cascade_df2T_instance_f64 * S,
<> 139:856d2700e60b 3895 float64_t * pSrc,
<> 139:856d2700e60b 3896 float64_t * pDst,
<> 139:856d2700e60b 3897 uint32_t blockSize);
<> 139:856d2700e60b 3898
<> 139:856d2700e60b 3899
<> 139:856d2700e60b 3900 /**
<> 139:856d2700e60b 3901 * @brief Initialization function for the floating-point transposed direct form II Biquad cascade filter.
<> 139:856d2700e60b 3902 * @param[in,out] *S points to an instance of the filter data structure.
<> 139:856d2700e60b 3903 * @param[in] numStages number of 2nd order stages in the filter.
<> 139:856d2700e60b 3904 * @param[in] *pCoeffs points to the filter coefficients.
<> 139:856d2700e60b 3905 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 3906 * @return none
<> 139:856d2700e60b 3907 */
<> 139:856d2700e60b 3908
<> 139:856d2700e60b 3909 void arm_biquad_cascade_df2T_init_f32(
<> 139:856d2700e60b 3910 arm_biquad_cascade_df2T_instance_f32 * S,
<> 139:856d2700e60b 3911 uint8_t numStages,
<> 139:856d2700e60b 3912 float32_t * pCoeffs,
<> 139:856d2700e60b 3913 float32_t * pState);
<> 139:856d2700e60b 3914
<> 139:856d2700e60b 3915
<> 139:856d2700e60b 3916 /**
<> 139:856d2700e60b 3917 * @brief Initialization function for the floating-point transposed direct form II Biquad cascade filter.
<> 139:856d2700e60b 3918 * @param[in,out] *S points to an instance of the filter data structure.
<> 139:856d2700e60b 3919 * @param[in] numStages number of 2nd order stages in the filter.
<> 139:856d2700e60b 3920 * @param[in] *pCoeffs points to the filter coefficients.
<> 139:856d2700e60b 3921 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 3922 * @return none
<> 139:856d2700e60b 3923 */
<> 139:856d2700e60b 3924
<> 139:856d2700e60b 3925 void arm_biquad_cascade_stereo_df2T_init_f32(
<> 139:856d2700e60b 3926 arm_biquad_cascade_stereo_df2T_instance_f32 * S,
<> 139:856d2700e60b 3927 uint8_t numStages,
<> 139:856d2700e60b 3928 float32_t * pCoeffs,
<> 139:856d2700e60b 3929 float32_t * pState);
<> 139:856d2700e60b 3930
<> 139:856d2700e60b 3931
<> 139:856d2700e60b 3932 /**
<> 139:856d2700e60b 3933 * @brief Initialization function for the floating-point transposed direct form II Biquad cascade filter.
<> 139:856d2700e60b 3934 * @param[in,out] *S points to an instance of the filter data structure.
<> 139:856d2700e60b 3935 * @param[in] numStages number of 2nd order stages in the filter.
<> 139:856d2700e60b 3936 * @param[in] *pCoeffs points to the filter coefficients.
<> 139:856d2700e60b 3937 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 3938 * @return none
<> 139:856d2700e60b 3939 */
<> 139:856d2700e60b 3940
<> 139:856d2700e60b 3941 void arm_biquad_cascade_df2T_init_f64(
<> 139:856d2700e60b 3942 arm_biquad_cascade_df2T_instance_f64 * S,
<> 139:856d2700e60b 3943 uint8_t numStages,
<> 139:856d2700e60b 3944 float64_t * pCoeffs,
<> 139:856d2700e60b 3945 float64_t * pState);
<> 139:856d2700e60b 3946
<> 139:856d2700e60b 3947
<> 139:856d2700e60b 3948
<> 139:856d2700e60b 3949 /**
<> 139:856d2700e60b 3950 * @brief Instance structure for the Q15 FIR lattice filter.
<> 139:856d2700e60b 3951 */
<> 139:856d2700e60b 3952
<> 139:856d2700e60b 3953 typedef struct
<> 139:856d2700e60b 3954 {
<> 139:856d2700e60b 3955 uint16_t numStages; /**< number of filter stages. */
<> 139:856d2700e60b 3956 q15_t *pState; /**< points to the state variable array. The array is of length numStages. */
<> 139:856d2700e60b 3957 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
<> 139:856d2700e60b 3958 } arm_fir_lattice_instance_q15;
<> 139:856d2700e60b 3959
<> 139:856d2700e60b 3960 /**
<> 139:856d2700e60b 3961 * @brief Instance structure for the Q31 FIR lattice filter.
<> 139:856d2700e60b 3962 */
<> 139:856d2700e60b 3963
<> 139:856d2700e60b 3964 typedef struct
<> 139:856d2700e60b 3965 {
<> 139:856d2700e60b 3966 uint16_t numStages; /**< number of filter stages. */
<> 139:856d2700e60b 3967 q31_t *pState; /**< points to the state variable array. The array is of length numStages. */
<> 139:856d2700e60b 3968 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
<> 139:856d2700e60b 3969 } arm_fir_lattice_instance_q31;
<> 139:856d2700e60b 3970
<> 139:856d2700e60b 3971 /**
<> 139:856d2700e60b 3972 * @brief Instance structure for the floating-point FIR lattice filter.
<> 139:856d2700e60b 3973 */
<> 139:856d2700e60b 3974
<> 139:856d2700e60b 3975 typedef struct
<> 139:856d2700e60b 3976 {
<> 139:856d2700e60b 3977 uint16_t numStages; /**< number of filter stages. */
<> 139:856d2700e60b 3978 float32_t *pState; /**< points to the state variable array. The array is of length numStages. */
<> 139:856d2700e60b 3979 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
<> 139:856d2700e60b 3980 } arm_fir_lattice_instance_f32;
<> 139:856d2700e60b 3981
<> 139:856d2700e60b 3982 /**
<> 139:856d2700e60b 3983 * @brief Initialization function for the Q15 FIR lattice filter.
<> 139:856d2700e60b 3984 * @param[in] *S points to an instance of the Q15 FIR lattice structure.
<> 139:856d2700e60b 3985 * @param[in] numStages number of filter stages.
<> 139:856d2700e60b 3986 * @param[in] *pCoeffs points to the coefficient buffer. The array is of length numStages.
<> 139:856d2700e60b 3987 * @param[in] *pState points to the state buffer. The array is of length numStages.
<> 139:856d2700e60b 3988 * @return none.
<> 139:856d2700e60b 3989 */
<> 139:856d2700e60b 3990
<> 139:856d2700e60b 3991 void arm_fir_lattice_init_q15(
<> 139:856d2700e60b 3992 arm_fir_lattice_instance_q15 * S,
<> 139:856d2700e60b 3993 uint16_t numStages,
<> 139:856d2700e60b 3994 q15_t * pCoeffs,
<> 139:856d2700e60b 3995 q15_t * pState);
<> 139:856d2700e60b 3996
<> 139:856d2700e60b 3997
<> 139:856d2700e60b 3998 /**
<> 139:856d2700e60b 3999 * @brief Processing function for the Q15 FIR lattice filter.
<> 139:856d2700e60b 4000 * @param[in] *S points to an instance of the Q15 FIR lattice structure.
<> 139:856d2700e60b 4001 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 4002 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 4003 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4004 * @return none.
<> 139:856d2700e60b 4005 */
<> 139:856d2700e60b 4006 void arm_fir_lattice_q15(
<> 139:856d2700e60b 4007 const arm_fir_lattice_instance_q15 * S,
<> 139:856d2700e60b 4008 q15_t * pSrc,
<> 139:856d2700e60b 4009 q15_t * pDst,
<> 139:856d2700e60b 4010 uint32_t blockSize);
<> 139:856d2700e60b 4011
<> 139:856d2700e60b 4012 /**
<> 139:856d2700e60b 4013 * @brief Initialization function for the Q31 FIR lattice filter.
<> 139:856d2700e60b 4014 * @param[in] *S points to an instance of the Q31 FIR lattice structure.
<> 139:856d2700e60b 4015 * @param[in] numStages number of filter stages.
<> 139:856d2700e60b 4016 * @param[in] *pCoeffs points to the coefficient buffer. The array is of length numStages.
<> 139:856d2700e60b 4017 * @param[in] *pState points to the state buffer. The array is of length numStages.
<> 139:856d2700e60b 4018 * @return none.
<> 139:856d2700e60b 4019 */
<> 139:856d2700e60b 4020
<> 139:856d2700e60b 4021 void arm_fir_lattice_init_q31(
<> 139:856d2700e60b 4022 arm_fir_lattice_instance_q31 * S,
<> 139:856d2700e60b 4023 uint16_t numStages,
<> 139:856d2700e60b 4024 q31_t * pCoeffs,
<> 139:856d2700e60b 4025 q31_t * pState);
<> 139:856d2700e60b 4026
<> 139:856d2700e60b 4027
<> 139:856d2700e60b 4028 /**
<> 139:856d2700e60b 4029 * @brief Processing function for the Q31 FIR lattice filter.
<> 139:856d2700e60b 4030 * @param[in] *S points to an instance of the Q31 FIR lattice structure.
<> 139:856d2700e60b 4031 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 4032 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 4033 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4034 * @return none.
<> 139:856d2700e60b 4035 */
<> 139:856d2700e60b 4036
<> 139:856d2700e60b 4037 void arm_fir_lattice_q31(
<> 139:856d2700e60b 4038 const arm_fir_lattice_instance_q31 * S,
<> 139:856d2700e60b 4039 q31_t * pSrc,
<> 139:856d2700e60b 4040 q31_t * pDst,
<> 139:856d2700e60b 4041 uint32_t blockSize);
<> 139:856d2700e60b 4042
<> 139:856d2700e60b 4043 /**
<> 139:856d2700e60b 4044 * @brief Initialization function for the floating-point FIR lattice filter.
<> 139:856d2700e60b 4045 * @param[in] *S points to an instance of the floating-point FIR lattice structure.
<> 139:856d2700e60b 4046 * @param[in] numStages number of filter stages.
<> 139:856d2700e60b 4047 * @param[in] *pCoeffs points to the coefficient buffer. The array is of length numStages.
<> 139:856d2700e60b 4048 * @param[in] *pState points to the state buffer. The array is of length numStages.
<> 139:856d2700e60b 4049 * @return none.
<> 139:856d2700e60b 4050 */
<> 139:856d2700e60b 4051
<> 139:856d2700e60b 4052 void arm_fir_lattice_init_f32(
<> 139:856d2700e60b 4053 arm_fir_lattice_instance_f32 * S,
<> 139:856d2700e60b 4054 uint16_t numStages,
<> 139:856d2700e60b 4055 float32_t * pCoeffs,
<> 139:856d2700e60b 4056 float32_t * pState);
<> 139:856d2700e60b 4057
<> 139:856d2700e60b 4058 /**
<> 139:856d2700e60b 4059 * @brief Processing function for the floating-point FIR lattice filter.
<> 139:856d2700e60b 4060 * @param[in] *S points to an instance of the floating-point FIR lattice structure.
<> 139:856d2700e60b 4061 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 4062 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 4063 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4064 * @return none.
<> 139:856d2700e60b 4065 */
<> 139:856d2700e60b 4066
<> 139:856d2700e60b 4067 void arm_fir_lattice_f32(
<> 139:856d2700e60b 4068 const arm_fir_lattice_instance_f32 * S,
<> 139:856d2700e60b 4069 float32_t * pSrc,
<> 139:856d2700e60b 4070 float32_t * pDst,
<> 139:856d2700e60b 4071 uint32_t blockSize);
<> 139:856d2700e60b 4072
<> 139:856d2700e60b 4073 /**
<> 139:856d2700e60b 4074 * @brief Instance structure for the Q15 IIR lattice filter.
<> 139:856d2700e60b 4075 */
<> 139:856d2700e60b 4076 typedef struct
<> 139:856d2700e60b 4077 {
<> 139:856d2700e60b 4078 uint16_t numStages; /**< number of stages in the filter. */
<> 139:856d2700e60b 4079 q15_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
<> 139:856d2700e60b 4080 q15_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
<> 139:856d2700e60b 4081 q15_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
<> 139:856d2700e60b 4082 } arm_iir_lattice_instance_q15;
<> 139:856d2700e60b 4083
<> 139:856d2700e60b 4084 /**
<> 139:856d2700e60b 4085 * @brief Instance structure for the Q31 IIR lattice filter.
<> 139:856d2700e60b 4086 */
<> 139:856d2700e60b 4087 typedef struct
<> 139:856d2700e60b 4088 {
<> 139:856d2700e60b 4089 uint16_t numStages; /**< number of stages in the filter. */
<> 139:856d2700e60b 4090 q31_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
<> 139:856d2700e60b 4091 q31_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
<> 139:856d2700e60b 4092 q31_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
<> 139:856d2700e60b 4093 } arm_iir_lattice_instance_q31;
<> 139:856d2700e60b 4094
<> 139:856d2700e60b 4095 /**
<> 139:856d2700e60b 4096 * @brief Instance structure for the floating-point IIR lattice filter.
<> 139:856d2700e60b 4097 */
<> 139:856d2700e60b 4098 typedef struct
<> 139:856d2700e60b 4099 {
<> 139:856d2700e60b 4100 uint16_t numStages; /**< number of stages in the filter. */
<> 139:856d2700e60b 4101 float32_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
<> 139:856d2700e60b 4102 float32_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
<> 139:856d2700e60b 4103 float32_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
<> 139:856d2700e60b 4104 } arm_iir_lattice_instance_f32;
<> 139:856d2700e60b 4105
<> 139:856d2700e60b 4106 /**
<> 139:856d2700e60b 4107 * @brief Processing function for the floating-point IIR lattice filter.
<> 139:856d2700e60b 4108 * @param[in] *S points to an instance of the floating-point IIR lattice structure.
<> 139:856d2700e60b 4109 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 4110 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 4111 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4112 * @return none.
<> 139:856d2700e60b 4113 */
<> 139:856d2700e60b 4114
<> 139:856d2700e60b 4115 void arm_iir_lattice_f32(
<> 139:856d2700e60b 4116 const arm_iir_lattice_instance_f32 * S,
<> 139:856d2700e60b 4117 float32_t * pSrc,
<> 139:856d2700e60b 4118 float32_t * pDst,
<> 139:856d2700e60b 4119 uint32_t blockSize);
<> 139:856d2700e60b 4120
<> 139:856d2700e60b 4121 /**
<> 139:856d2700e60b 4122 * @brief Initialization function for the floating-point IIR lattice filter.
<> 139:856d2700e60b 4123 * @param[in] *S points to an instance of the floating-point IIR lattice structure.
<> 139:856d2700e60b 4124 * @param[in] numStages number of stages in the filter.
<> 139:856d2700e60b 4125 * @param[in] *pkCoeffs points to the reflection coefficient buffer. The array is of length numStages.
<> 139:856d2700e60b 4126 * @param[in] *pvCoeffs points to the ladder coefficient buffer. The array is of length numStages+1.
<> 139:856d2700e60b 4127 * @param[in] *pState points to the state buffer. The array is of length numStages+blockSize-1.
<> 139:856d2700e60b 4128 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4129 * @return none.
<> 139:856d2700e60b 4130 */
<> 139:856d2700e60b 4131
<> 139:856d2700e60b 4132 void arm_iir_lattice_init_f32(
<> 139:856d2700e60b 4133 arm_iir_lattice_instance_f32 * S,
<> 139:856d2700e60b 4134 uint16_t numStages,
<> 139:856d2700e60b 4135 float32_t * pkCoeffs,
<> 139:856d2700e60b 4136 float32_t * pvCoeffs,
<> 139:856d2700e60b 4137 float32_t * pState,
<> 139:856d2700e60b 4138 uint32_t blockSize);
<> 139:856d2700e60b 4139
<> 139:856d2700e60b 4140
<> 139:856d2700e60b 4141 /**
<> 139:856d2700e60b 4142 * @brief Processing function for the Q31 IIR lattice filter.
<> 139:856d2700e60b 4143 * @param[in] *S points to an instance of the Q31 IIR lattice structure.
<> 139:856d2700e60b 4144 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 4145 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 4146 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4147 * @return none.
<> 139:856d2700e60b 4148 */
<> 139:856d2700e60b 4149
<> 139:856d2700e60b 4150 void arm_iir_lattice_q31(
<> 139:856d2700e60b 4151 const arm_iir_lattice_instance_q31 * S,
<> 139:856d2700e60b 4152 q31_t * pSrc,
<> 139:856d2700e60b 4153 q31_t * pDst,
<> 139:856d2700e60b 4154 uint32_t blockSize);
<> 139:856d2700e60b 4155
<> 139:856d2700e60b 4156
<> 139:856d2700e60b 4157 /**
<> 139:856d2700e60b 4158 * @brief Initialization function for the Q31 IIR lattice filter.
<> 139:856d2700e60b 4159 * @param[in] *S points to an instance of the Q31 IIR lattice structure.
<> 139:856d2700e60b 4160 * @param[in] numStages number of stages in the filter.
<> 139:856d2700e60b 4161 * @param[in] *pkCoeffs points to the reflection coefficient buffer. The array is of length numStages.
<> 139:856d2700e60b 4162 * @param[in] *pvCoeffs points to the ladder coefficient buffer. The array is of length numStages+1.
<> 139:856d2700e60b 4163 * @param[in] *pState points to the state buffer. The array is of length numStages+blockSize.
<> 139:856d2700e60b 4164 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4165 * @return none.
<> 139:856d2700e60b 4166 */
<> 139:856d2700e60b 4167
<> 139:856d2700e60b 4168 void arm_iir_lattice_init_q31(
<> 139:856d2700e60b 4169 arm_iir_lattice_instance_q31 * S,
<> 139:856d2700e60b 4170 uint16_t numStages,
<> 139:856d2700e60b 4171 q31_t * pkCoeffs,
<> 139:856d2700e60b 4172 q31_t * pvCoeffs,
<> 139:856d2700e60b 4173 q31_t * pState,
<> 139:856d2700e60b 4174 uint32_t blockSize);
<> 139:856d2700e60b 4175
<> 139:856d2700e60b 4176
<> 139:856d2700e60b 4177 /**
<> 139:856d2700e60b 4178 * @brief Processing function for the Q15 IIR lattice filter.
<> 139:856d2700e60b 4179 * @param[in] *S points to an instance of the Q15 IIR lattice structure.
<> 139:856d2700e60b 4180 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 4181 * @param[out] *pDst points to the block of output data.
<> 139:856d2700e60b 4182 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4183 * @return none.
<> 139:856d2700e60b 4184 */
<> 139:856d2700e60b 4185
<> 139:856d2700e60b 4186 void arm_iir_lattice_q15(
<> 139:856d2700e60b 4187 const arm_iir_lattice_instance_q15 * S,
<> 139:856d2700e60b 4188 q15_t * pSrc,
<> 139:856d2700e60b 4189 q15_t * pDst,
<> 139:856d2700e60b 4190 uint32_t blockSize);
<> 139:856d2700e60b 4191
<> 139:856d2700e60b 4192
<> 139:856d2700e60b 4193 /**
<> 139:856d2700e60b 4194 * @brief Initialization function for the Q15 IIR lattice filter.
<> 139:856d2700e60b 4195 * @param[in] *S points to an instance of the fixed-point Q15 IIR lattice structure.
<> 139:856d2700e60b 4196 * @param[in] numStages number of stages in the filter.
<> 139:856d2700e60b 4197 * @param[in] *pkCoeffs points to reflection coefficient buffer. The array is of length numStages.
<> 139:856d2700e60b 4198 * @param[in] *pvCoeffs points to ladder coefficient buffer. The array is of length numStages+1.
<> 139:856d2700e60b 4199 * @param[in] *pState points to state buffer. The array is of length numStages+blockSize.
<> 139:856d2700e60b 4200 * @param[in] blockSize number of samples to process per call.
<> 139:856d2700e60b 4201 * @return none.
<> 139:856d2700e60b 4202 */
<> 139:856d2700e60b 4203
<> 139:856d2700e60b 4204 void arm_iir_lattice_init_q15(
<> 139:856d2700e60b 4205 arm_iir_lattice_instance_q15 * S,
<> 139:856d2700e60b 4206 uint16_t numStages,
<> 139:856d2700e60b 4207 q15_t * pkCoeffs,
<> 139:856d2700e60b 4208 q15_t * pvCoeffs,
<> 139:856d2700e60b 4209 q15_t * pState,
<> 139:856d2700e60b 4210 uint32_t blockSize);
<> 139:856d2700e60b 4211
<> 139:856d2700e60b 4212 /**
<> 139:856d2700e60b 4213 * @brief Instance structure for the floating-point LMS filter.
<> 139:856d2700e60b 4214 */
<> 139:856d2700e60b 4215
<> 139:856d2700e60b 4216 typedef struct
<> 139:856d2700e60b 4217 {
<> 139:856d2700e60b 4218 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 139:856d2700e60b 4219 float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 139:856d2700e60b 4220 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 139:856d2700e60b 4221 float32_t mu; /**< step size that controls filter coefficient updates. */
<> 139:856d2700e60b 4222 } arm_lms_instance_f32;
<> 139:856d2700e60b 4223
<> 139:856d2700e60b 4224 /**
<> 139:856d2700e60b 4225 * @brief Processing function for floating-point LMS filter.
<> 139:856d2700e60b 4226 * @param[in] *S points to an instance of the floating-point LMS filter structure.
<> 139:856d2700e60b 4227 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 4228 * @param[in] *pRef points to the block of reference data.
<> 139:856d2700e60b 4229 * @param[out] *pOut points to the block of output data.
<> 139:856d2700e60b 4230 * @param[out] *pErr points to the block of error data.
<> 139:856d2700e60b 4231 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4232 * @return none.
<> 139:856d2700e60b 4233 */
<> 139:856d2700e60b 4234
<> 139:856d2700e60b 4235 void arm_lms_f32(
<> 139:856d2700e60b 4236 const arm_lms_instance_f32 * S,
<> 139:856d2700e60b 4237 float32_t * pSrc,
<> 139:856d2700e60b 4238 float32_t * pRef,
<> 139:856d2700e60b 4239 float32_t * pOut,
<> 139:856d2700e60b 4240 float32_t * pErr,
<> 139:856d2700e60b 4241 uint32_t blockSize);
<> 139:856d2700e60b 4242
<> 139:856d2700e60b 4243 /**
<> 139:856d2700e60b 4244 * @brief Initialization function for floating-point LMS filter.
<> 139:856d2700e60b 4245 * @param[in] *S points to an instance of the floating-point LMS filter structure.
<> 139:856d2700e60b 4246 * @param[in] numTaps number of filter coefficients.
<> 139:856d2700e60b 4247 * @param[in] *pCoeffs points to the coefficient buffer.
<> 139:856d2700e60b 4248 * @param[in] *pState points to state buffer.
<> 139:856d2700e60b 4249 * @param[in] mu step size that controls filter coefficient updates.
<> 139:856d2700e60b 4250 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4251 * @return none.
<> 139:856d2700e60b 4252 */
<> 139:856d2700e60b 4253
<> 139:856d2700e60b 4254 void arm_lms_init_f32(
<> 139:856d2700e60b 4255 arm_lms_instance_f32 * S,
<> 139:856d2700e60b 4256 uint16_t numTaps,
<> 139:856d2700e60b 4257 float32_t * pCoeffs,
<> 139:856d2700e60b 4258 float32_t * pState,
<> 139:856d2700e60b 4259 float32_t mu,
<> 139:856d2700e60b 4260 uint32_t blockSize);
<> 139:856d2700e60b 4261
<> 139:856d2700e60b 4262 /**
<> 139:856d2700e60b 4263 * @brief Instance structure for the Q15 LMS filter.
<> 139:856d2700e60b 4264 */
<> 139:856d2700e60b 4265
<> 139:856d2700e60b 4266 typedef struct
<> 139:856d2700e60b 4267 {
<> 139:856d2700e60b 4268 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 139:856d2700e60b 4269 q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 139:856d2700e60b 4270 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 139:856d2700e60b 4271 q15_t mu; /**< step size that controls filter coefficient updates. */
<> 139:856d2700e60b 4272 uint32_t postShift; /**< bit shift applied to coefficients. */
<> 139:856d2700e60b 4273 } arm_lms_instance_q15;
<> 139:856d2700e60b 4274
<> 139:856d2700e60b 4275
<> 139:856d2700e60b 4276 /**
<> 139:856d2700e60b 4277 * @brief Initialization function for the Q15 LMS filter.
<> 139:856d2700e60b 4278 * @param[in] *S points to an instance of the Q15 LMS filter structure.
<> 139:856d2700e60b 4279 * @param[in] numTaps number of filter coefficients.
<> 139:856d2700e60b 4280 * @param[in] *pCoeffs points to the coefficient buffer.
<> 139:856d2700e60b 4281 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 4282 * @param[in] mu step size that controls filter coefficient updates.
<> 139:856d2700e60b 4283 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4284 * @param[in] postShift bit shift applied to coefficients.
<> 139:856d2700e60b 4285 * @return none.
<> 139:856d2700e60b 4286 */
<> 139:856d2700e60b 4287
<> 139:856d2700e60b 4288 void arm_lms_init_q15(
<> 139:856d2700e60b 4289 arm_lms_instance_q15 * S,
<> 139:856d2700e60b 4290 uint16_t numTaps,
<> 139:856d2700e60b 4291 q15_t * pCoeffs,
<> 139:856d2700e60b 4292 q15_t * pState,
<> 139:856d2700e60b 4293 q15_t mu,
<> 139:856d2700e60b 4294 uint32_t blockSize,
<> 139:856d2700e60b 4295 uint32_t postShift);
<> 139:856d2700e60b 4296
<> 139:856d2700e60b 4297 /**
<> 139:856d2700e60b 4298 * @brief Processing function for Q15 LMS filter.
<> 139:856d2700e60b 4299 * @param[in] *S points to an instance of the Q15 LMS filter structure.
<> 139:856d2700e60b 4300 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 4301 * @param[in] *pRef points to the block of reference data.
<> 139:856d2700e60b 4302 * @param[out] *pOut points to the block of output data.
<> 139:856d2700e60b 4303 * @param[out] *pErr points to the block of error data.
<> 139:856d2700e60b 4304 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4305 * @return none.
<> 139:856d2700e60b 4306 */
<> 139:856d2700e60b 4307
<> 139:856d2700e60b 4308 void arm_lms_q15(
<> 139:856d2700e60b 4309 const arm_lms_instance_q15 * S,
<> 139:856d2700e60b 4310 q15_t * pSrc,
<> 139:856d2700e60b 4311 q15_t * pRef,
<> 139:856d2700e60b 4312 q15_t * pOut,
<> 139:856d2700e60b 4313 q15_t * pErr,
<> 139:856d2700e60b 4314 uint32_t blockSize);
<> 139:856d2700e60b 4315
<> 139:856d2700e60b 4316
<> 139:856d2700e60b 4317 /**
<> 139:856d2700e60b 4318 * @brief Instance structure for the Q31 LMS filter.
<> 139:856d2700e60b 4319 */
<> 139:856d2700e60b 4320
<> 139:856d2700e60b 4321 typedef struct
<> 139:856d2700e60b 4322 {
<> 139:856d2700e60b 4323 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 139:856d2700e60b 4324 q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 139:856d2700e60b 4325 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 139:856d2700e60b 4326 q31_t mu; /**< step size that controls filter coefficient updates. */
<> 139:856d2700e60b 4327 uint32_t postShift; /**< bit shift applied to coefficients. */
<> 139:856d2700e60b 4328
<> 139:856d2700e60b 4329 } arm_lms_instance_q31;
<> 139:856d2700e60b 4330
<> 139:856d2700e60b 4331 /**
<> 139:856d2700e60b 4332 * @brief Processing function for Q31 LMS filter.
<> 139:856d2700e60b 4333 * @param[in] *S points to an instance of the Q15 LMS filter structure.
<> 139:856d2700e60b 4334 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 4335 * @param[in] *pRef points to the block of reference data.
<> 139:856d2700e60b 4336 * @param[out] *pOut points to the block of output data.
<> 139:856d2700e60b 4337 * @param[out] *pErr points to the block of error data.
<> 139:856d2700e60b 4338 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4339 * @return none.
<> 139:856d2700e60b 4340 */
<> 139:856d2700e60b 4341
<> 139:856d2700e60b 4342 void arm_lms_q31(
<> 139:856d2700e60b 4343 const arm_lms_instance_q31 * S,
<> 139:856d2700e60b 4344 q31_t * pSrc,
<> 139:856d2700e60b 4345 q31_t * pRef,
<> 139:856d2700e60b 4346 q31_t * pOut,
<> 139:856d2700e60b 4347 q31_t * pErr,
<> 139:856d2700e60b 4348 uint32_t blockSize);
<> 139:856d2700e60b 4349
<> 139:856d2700e60b 4350 /**
<> 139:856d2700e60b 4351 * @brief Initialization function for Q31 LMS filter.
<> 139:856d2700e60b 4352 * @param[in] *S points to an instance of the Q31 LMS filter structure.
<> 139:856d2700e60b 4353 * @param[in] numTaps number of filter coefficients.
<> 139:856d2700e60b 4354 * @param[in] *pCoeffs points to coefficient buffer.
<> 139:856d2700e60b 4355 * @param[in] *pState points to state buffer.
<> 139:856d2700e60b 4356 * @param[in] mu step size that controls filter coefficient updates.
<> 139:856d2700e60b 4357 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4358 * @param[in] postShift bit shift applied to coefficients.
<> 139:856d2700e60b 4359 * @return none.
<> 139:856d2700e60b 4360 */
<> 139:856d2700e60b 4361
<> 139:856d2700e60b 4362 void arm_lms_init_q31(
<> 139:856d2700e60b 4363 arm_lms_instance_q31 * S,
<> 139:856d2700e60b 4364 uint16_t numTaps,
<> 139:856d2700e60b 4365 q31_t * pCoeffs,
<> 139:856d2700e60b 4366 q31_t * pState,
<> 139:856d2700e60b 4367 q31_t mu,
<> 139:856d2700e60b 4368 uint32_t blockSize,
<> 139:856d2700e60b 4369 uint32_t postShift);
<> 139:856d2700e60b 4370
<> 139:856d2700e60b 4371 /**
<> 139:856d2700e60b 4372 * @brief Instance structure for the floating-point normalized LMS filter.
<> 139:856d2700e60b 4373 */
<> 139:856d2700e60b 4374
<> 139:856d2700e60b 4375 typedef struct
<> 139:856d2700e60b 4376 {
<> 139:856d2700e60b 4377 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 139:856d2700e60b 4378 float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 139:856d2700e60b 4379 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 139:856d2700e60b 4380 float32_t mu; /**< step size that control filter coefficient updates. */
<> 139:856d2700e60b 4381 float32_t energy; /**< saves previous frame energy. */
<> 139:856d2700e60b 4382 float32_t x0; /**< saves previous input sample. */
<> 139:856d2700e60b 4383 } arm_lms_norm_instance_f32;
<> 139:856d2700e60b 4384
<> 139:856d2700e60b 4385 /**
<> 139:856d2700e60b 4386 * @brief Processing function for floating-point normalized LMS filter.
<> 139:856d2700e60b 4387 * @param[in] *S points to an instance of the floating-point normalized LMS filter structure.
<> 139:856d2700e60b 4388 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 4389 * @param[in] *pRef points to the block of reference data.
<> 139:856d2700e60b 4390 * @param[out] *pOut points to the block of output data.
<> 139:856d2700e60b 4391 * @param[out] *pErr points to the block of error data.
<> 139:856d2700e60b 4392 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4393 * @return none.
<> 139:856d2700e60b 4394 */
<> 139:856d2700e60b 4395
<> 139:856d2700e60b 4396 void arm_lms_norm_f32(
<> 139:856d2700e60b 4397 arm_lms_norm_instance_f32 * S,
<> 139:856d2700e60b 4398 float32_t * pSrc,
<> 139:856d2700e60b 4399 float32_t * pRef,
<> 139:856d2700e60b 4400 float32_t * pOut,
<> 139:856d2700e60b 4401 float32_t * pErr,
<> 139:856d2700e60b 4402 uint32_t blockSize);
<> 139:856d2700e60b 4403
<> 139:856d2700e60b 4404 /**
<> 139:856d2700e60b 4405 * @brief Initialization function for floating-point normalized LMS filter.
<> 139:856d2700e60b 4406 * @param[in] *S points to an instance of the floating-point LMS filter structure.
<> 139:856d2700e60b 4407 * @param[in] numTaps number of filter coefficients.
<> 139:856d2700e60b 4408 * @param[in] *pCoeffs points to coefficient buffer.
<> 139:856d2700e60b 4409 * @param[in] *pState points to state buffer.
<> 139:856d2700e60b 4410 * @param[in] mu step size that controls filter coefficient updates.
<> 139:856d2700e60b 4411 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4412 * @return none.
<> 139:856d2700e60b 4413 */
<> 139:856d2700e60b 4414
<> 139:856d2700e60b 4415 void arm_lms_norm_init_f32(
<> 139:856d2700e60b 4416 arm_lms_norm_instance_f32 * S,
<> 139:856d2700e60b 4417 uint16_t numTaps,
<> 139:856d2700e60b 4418 float32_t * pCoeffs,
<> 139:856d2700e60b 4419 float32_t * pState,
<> 139:856d2700e60b 4420 float32_t mu,
<> 139:856d2700e60b 4421 uint32_t blockSize);
<> 139:856d2700e60b 4422
<> 139:856d2700e60b 4423
<> 139:856d2700e60b 4424 /**
<> 139:856d2700e60b 4425 * @brief Instance structure for the Q31 normalized LMS filter.
<> 139:856d2700e60b 4426 */
<> 139:856d2700e60b 4427 typedef struct
<> 139:856d2700e60b 4428 {
<> 139:856d2700e60b 4429 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 139:856d2700e60b 4430 q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 139:856d2700e60b 4431 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 139:856d2700e60b 4432 q31_t mu; /**< step size that controls filter coefficient updates. */
<> 139:856d2700e60b 4433 uint8_t postShift; /**< bit shift applied to coefficients. */
<> 139:856d2700e60b 4434 q31_t *recipTable; /**< points to the reciprocal initial value table. */
<> 139:856d2700e60b 4435 q31_t energy; /**< saves previous frame energy. */
<> 139:856d2700e60b 4436 q31_t x0; /**< saves previous input sample. */
<> 139:856d2700e60b 4437 } arm_lms_norm_instance_q31;
<> 139:856d2700e60b 4438
<> 139:856d2700e60b 4439 /**
<> 139:856d2700e60b 4440 * @brief Processing function for Q31 normalized LMS filter.
<> 139:856d2700e60b 4441 * @param[in] *S points to an instance of the Q31 normalized LMS filter structure.
<> 139:856d2700e60b 4442 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 4443 * @param[in] *pRef points to the block of reference data.
<> 139:856d2700e60b 4444 * @param[out] *pOut points to the block of output data.
<> 139:856d2700e60b 4445 * @param[out] *pErr points to the block of error data.
<> 139:856d2700e60b 4446 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4447 * @return none.
<> 139:856d2700e60b 4448 */
<> 139:856d2700e60b 4449
<> 139:856d2700e60b 4450 void arm_lms_norm_q31(
<> 139:856d2700e60b 4451 arm_lms_norm_instance_q31 * S,
<> 139:856d2700e60b 4452 q31_t * pSrc,
<> 139:856d2700e60b 4453 q31_t * pRef,
<> 139:856d2700e60b 4454 q31_t * pOut,
<> 139:856d2700e60b 4455 q31_t * pErr,
<> 139:856d2700e60b 4456 uint32_t blockSize);
<> 139:856d2700e60b 4457
<> 139:856d2700e60b 4458 /**
<> 139:856d2700e60b 4459 * @brief Initialization function for Q31 normalized LMS filter.
<> 139:856d2700e60b 4460 * @param[in] *S points to an instance of the Q31 normalized LMS filter structure.
<> 139:856d2700e60b 4461 * @param[in] numTaps number of filter coefficients.
<> 139:856d2700e60b 4462 * @param[in] *pCoeffs points to coefficient buffer.
<> 139:856d2700e60b 4463 * @param[in] *pState points to state buffer.
<> 139:856d2700e60b 4464 * @param[in] mu step size that controls filter coefficient updates.
<> 139:856d2700e60b 4465 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4466 * @param[in] postShift bit shift applied to coefficients.
<> 139:856d2700e60b 4467 * @return none.
<> 139:856d2700e60b 4468 */
<> 139:856d2700e60b 4469
<> 139:856d2700e60b 4470 void arm_lms_norm_init_q31(
<> 139:856d2700e60b 4471 arm_lms_norm_instance_q31 * S,
<> 139:856d2700e60b 4472 uint16_t numTaps,
<> 139:856d2700e60b 4473 q31_t * pCoeffs,
<> 139:856d2700e60b 4474 q31_t * pState,
<> 139:856d2700e60b 4475 q31_t mu,
<> 139:856d2700e60b 4476 uint32_t blockSize,
<> 139:856d2700e60b 4477 uint8_t postShift);
<> 139:856d2700e60b 4478
<> 139:856d2700e60b 4479 /**
<> 139:856d2700e60b 4480 * @brief Instance structure for the Q15 normalized LMS filter.
<> 139:856d2700e60b 4481 */
<> 139:856d2700e60b 4482
<> 139:856d2700e60b 4483 typedef struct
<> 139:856d2700e60b 4484 {
<> 139:856d2700e60b 4485 uint16_t numTaps; /**< Number of coefficients in the filter. */
<> 139:856d2700e60b 4486 q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 139:856d2700e60b 4487 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 139:856d2700e60b 4488 q15_t mu; /**< step size that controls filter coefficient updates. */
<> 139:856d2700e60b 4489 uint8_t postShift; /**< bit shift applied to coefficients. */
<> 139:856d2700e60b 4490 q15_t *recipTable; /**< Points to the reciprocal initial value table. */
<> 139:856d2700e60b 4491 q15_t energy; /**< saves previous frame energy. */
<> 139:856d2700e60b 4492 q15_t x0; /**< saves previous input sample. */
<> 139:856d2700e60b 4493 } arm_lms_norm_instance_q15;
<> 139:856d2700e60b 4494
<> 139:856d2700e60b 4495 /**
<> 139:856d2700e60b 4496 * @brief Processing function for Q15 normalized LMS filter.
<> 139:856d2700e60b 4497 * @param[in] *S points to an instance of the Q15 normalized LMS filter structure.
<> 139:856d2700e60b 4498 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 4499 * @param[in] *pRef points to the block of reference data.
<> 139:856d2700e60b 4500 * @param[out] *pOut points to the block of output data.
<> 139:856d2700e60b 4501 * @param[out] *pErr points to the block of error data.
<> 139:856d2700e60b 4502 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4503 * @return none.
<> 139:856d2700e60b 4504 */
<> 139:856d2700e60b 4505
<> 139:856d2700e60b 4506 void arm_lms_norm_q15(
<> 139:856d2700e60b 4507 arm_lms_norm_instance_q15 * S,
<> 139:856d2700e60b 4508 q15_t * pSrc,
<> 139:856d2700e60b 4509 q15_t * pRef,
<> 139:856d2700e60b 4510 q15_t * pOut,
<> 139:856d2700e60b 4511 q15_t * pErr,
<> 139:856d2700e60b 4512 uint32_t blockSize);
<> 139:856d2700e60b 4513
<> 139:856d2700e60b 4514
<> 139:856d2700e60b 4515 /**
<> 139:856d2700e60b 4516 * @brief Initialization function for Q15 normalized LMS filter.
<> 139:856d2700e60b 4517 * @param[in] *S points to an instance of the Q15 normalized LMS filter structure.
<> 139:856d2700e60b 4518 * @param[in] numTaps number of filter coefficients.
<> 139:856d2700e60b 4519 * @param[in] *pCoeffs points to coefficient buffer.
<> 139:856d2700e60b 4520 * @param[in] *pState points to state buffer.
<> 139:856d2700e60b 4521 * @param[in] mu step size that controls filter coefficient updates.
<> 139:856d2700e60b 4522 * @param[in] blockSize number of samples to process.
<> 139:856d2700e60b 4523 * @param[in] postShift bit shift applied to coefficients.
<> 139:856d2700e60b 4524 * @return none.
<> 139:856d2700e60b 4525 */
<> 139:856d2700e60b 4526
<> 139:856d2700e60b 4527 void arm_lms_norm_init_q15(
<> 139:856d2700e60b 4528 arm_lms_norm_instance_q15 * S,
<> 139:856d2700e60b 4529 uint16_t numTaps,
<> 139:856d2700e60b 4530 q15_t * pCoeffs,
<> 139:856d2700e60b 4531 q15_t * pState,
<> 139:856d2700e60b 4532 q15_t mu,
<> 139:856d2700e60b 4533 uint32_t blockSize,
<> 139:856d2700e60b 4534 uint8_t postShift);
<> 139:856d2700e60b 4535
<> 139:856d2700e60b 4536 /**
<> 139:856d2700e60b 4537 * @brief Correlation of floating-point sequences.
<> 139:856d2700e60b 4538 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 4539 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 4540 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 4541 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 4542 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 139:856d2700e60b 4543 * @return none.
<> 139:856d2700e60b 4544 */
<> 139:856d2700e60b 4545
<> 139:856d2700e60b 4546 void arm_correlate_f32(
<> 139:856d2700e60b 4547 float32_t * pSrcA,
<> 139:856d2700e60b 4548 uint32_t srcALen,
<> 139:856d2700e60b 4549 float32_t * pSrcB,
<> 139:856d2700e60b 4550 uint32_t srcBLen,
<> 139:856d2700e60b 4551 float32_t * pDst);
<> 139:856d2700e60b 4552
<> 139:856d2700e60b 4553
<> 139:856d2700e60b 4554 /**
<> 139:856d2700e60b 4555 * @brief Correlation of Q15 sequences
<> 139:856d2700e60b 4556 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 4557 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 4558 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 4559 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 4560 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 139:856d2700e60b 4561 * @param[in] *pScratch points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 139:856d2700e60b 4562 * @return none.
<> 139:856d2700e60b 4563 */
<> 139:856d2700e60b 4564 void arm_correlate_opt_q15(
<> 139:856d2700e60b 4565 q15_t * pSrcA,
<> 139:856d2700e60b 4566 uint32_t srcALen,
<> 139:856d2700e60b 4567 q15_t * pSrcB,
<> 139:856d2700e60b 4568 uint32_t srcBLen,
<> 139:856d2700e60b 4569 q15_t * pDst,
<> 139:856d2700e60b 4570 q15_t * pScratch);
<> 139:856d2700e60b 4571
<> 139:856d2700e60b 4572
<> 139:856d2700e60b 4573 /**
<> 139:856d2700e60b 4574 * @brief Correlation of Q15 sequences.
<> 139:856d2700e60b 4575 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 4576 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 4577 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 4578 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 4579 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 139:856d2700e60b 4580 * @return none.
<> 139:856d2700e60b 4581 */
<> 139:856d2700e60b 4582
<> 139:856d2700e60b 4583 void arm_correlate_q15(
<> 139:856d2700e60b 4584 q15_t * pSrcA,
<> 139:856d2700e60b 4585 uint32_t srcALen,
<> 139:856d2700e60b 4586 q15_t * pSrcB,
<> 139:856d2700e60b 4587 uint32_t srcBLen,
<> 139:856d2700e60b 4588 q15_t * pDst);
<> 139:856d2700e60b 4589
<> 139:856d2700e60b 4590 /**
<> 139:856d2700e60b 4591 * @brief Correlation of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
<> 139:856d2700e60b 4592 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 4593 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 4594 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 4595 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 4596 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 139:856d2700e60b 4597 * @return none.
<> 139:856d2700e60b 4598 */
<> 139:856d2700e60b 4599
<> 139:856d2700e60b 4600 void arm_correlate_fast_q15(
<> 139:856d2700e60b 4601 q15_t * pSrcA,
<> 139:856d2700e60b 4602 uint32_t srcALen,
<> 139:856d2700e60b 4603 q15_t * pSrcB,
<> 139:856d2700e60b 4604 uint32_t srcBLen,
<> 139:856d2700e60b 4605 q15_t * pDst);
<> 139:856d2700e60b 4606
<> 139:856d2700e60b 4607
<> 139:856d2700e60b 4608
<> 139:856d2700e60b 4609 /**
<> 139:856d2700e60b 4610 * @brief Correlation of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
<> 139:856d2700e60b 4611 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 4612 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 4613 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 4614 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 4615 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 139:856d2700e60b 4616 * @param[in] *pScratch points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 139:856d2700e60b 4617 * @return none.
<> 139:856d2700e60b 4618 */
<> 139:856d2700e60b 4619
<> 139:856d2700e60b 4620 void arm_correlate_fast_opt_q15(
<> 139:856d2700e60b 4621 q15_t * pSrcA,
<> 139:856d2700e60b 4622 uint32_t srcALen,
<> 139:856d2700e60b 4623 q15_t * pSrcB,
<> 139:856d2700e60b 4624 uint32_t srcBLen,
<> 139:856d2700e60b 4625 q15_t * pDst,
<> 139:856d2700e60b 4626 q15_t * pScratch);
<> 139:856d2700e60b 4627
<> 139:856d2700e60b 4628 /**
<> 139:856d2700e60b 4629 * @brief Correlation of Q31 sequences.
<> 139:856d2700e60b 4630 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 4631 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 4632 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 4633 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 4634 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 139:856d2700e60b 4635 * @return none.
<> 139:856d2700e60b 4636 */
<> 139:856d2700e60b 4637
<> 139:856d2700e60b 4638 void arm_correlate_q31(
<> 139:856d2700e60b 4639 q31_t * pSrcA,
<> 139:856d2700e60b 4640 uint32_t srcALen,
<> 139:856d2700e60b 4641 q31_t * pSrcB,
<> 139:856d2700e60b 4642 uint32_t srcBLen,
<> 139:856d2700e60b 4643 q31_t * pDst);
<> 139:856d2700e60b 4644
<> 139:856d2700e60b 4645 /**
<> 139:856d2700e60b 4646 * @brief Correlation of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 139:856d2700e60b 4647 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 4648 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 4649 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 4650 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 4651 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 139:856d2700e60b 4652 * @return none.
<> 139:856d2700e60b 4653 */
<> 139:856d2700e60b 4654
<> 139:856d2700e60b 4655 void arm_correlate_fast_q31(
<> 139:856d2700e60b 4656 q31_t * pSrcA,
<> 139:856d2700e60b 4657 uint32_t srcALen,
<> 139:856d2700e60b 4658 q31_t * pSrcB,
<> 139:856d2700e60b 4659 uint32_t srcBLen,
<> 139:856d2700e60b 4660 q31_t * pDst);
<> 139:856d2700e60b 4661
<> 139:856d2700e60b 4662
<> 139:856d2700e60b 4663
<> 139:856d2700e60b 4664 /**
<> 139:856d2700e60b 4665 * @brief Correlation of Q7 sequences.
<> 139:856d2700e60b 4666 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 4667 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 4668 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 4669 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 4670 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 139:856d2700e60b 4671 * @param[in] *pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 139:856d2700e60b 4672 * @param[in] *pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen).
<> 139:856d2700e60b 4673 * @return none.
<> 139:856d2700e60b 4674 */
<> 139:856d2700e60b 4675
<> 139:856d2700e60b 4676 void arm_correlate_opt_q7(
<> 139:856d2700e60b 4677 q7_t * pSrcA,
<> 139:856d2700e60b 4678 uint32_t srcALen,
<> 139:856d2700e60b 4679 q7_t * pSrcB,
<> 139:856d2700e60b 4680 uint32_t srcBLen,
<> 139:856d2700e60b 4681 q7_t * pDst,
<> 139:856d2700e60b 4682 q15_t * pScratch1,
<> 139:856d2700e60b 4683 q15_t * pScratch2);
<> 139:856d2700e60b 4684
<> 139:856d2700e60b 4685
<> 139:856d2700e60b 4686 /**
<> 139:856d2700e60b 4687 * @brief Correlation of Q7 sequences.
<> 139:856d2700e60b 4688 * @param[in] *pSrcA points to the first input sequence.
<> 139:856d2700e60b 4689 * @param[in] srcALen length of the first input sequence.
<> 139:856d2700e60b 4690 * @param[in] *pSrcB points to the second input sequence.
<> 139:856d2700e60b 4691 * @param[in] srcBLen length of the second input sequence.
<> 139:856d2700e60b 4692 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 139:856d2700e60b 4693 * @return none.
<> 139:856d2700e60b 4694 */
<> 139:856d2700e60b 4695
<> 139:856d2700e60b 4696 void arm_correlate_q7(
<> 139:856d2700e60b 4697 q7_t * pSrcA,
<> 139:856d2700e60b 4698 uint32_t srcALen,
<> 139:856d2700e60b 4699 q7_t * pSrcB,
<> 139:856d2700e60b 4700 uint32_t srcBLen,
<> 139:856d2700e60b 4701 q7_t * pDst);
<> 139:856d2700e60b 4702
<> 139:856d2700e60b 4703
<> 139:856d2700e60b 4704 /**
<> 139:856d2700e60b 4705 * @brief Instance structure for the floating-point sparse FIR filter.
<> 139:856d2700e60b 4706 */
<> 139:856d2700e60b 4707 typedef struct
<> 139:856d2700e60b 4708 {
<> 139:856d2700e60b 4709 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 139:856d2700e60b 4710 uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
<> 139:856d2700e60b 4711 float32_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
<> 139:856d2700e60b 4712 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 139:856d2700e60b 4713 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
<> 139:856d2700e60b 4714 int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
<> 139:856d2700e60b 4715 } arm_fir_sparse_instance_f32;
<> 139:856d2700e60b 4716
<> 139:856d2700e60b 4717 /**
<> 139:856d2700e60b 4718 * @brief Instance structure for the Q31 sparse FIR filter.
<> 139:856d2700e60b 4719 */
<> 139:856d2700e60b 4720
<> 139:856d2700e60b 4721 typedef struct
<> 139:856d2700e60b 4722 {
<> 139:856d2700e60b 4723 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 139:856d2700e60b 4724 uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
<> 139:856d2700e60b 4725 q31_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
<> 139:856d2700e60b 4726 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 139:856d2700e60b 4727 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
<> 139:856d2700e60b 4728 int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
<> 139:856d2700e60b 4729 } arm_fir_sparse_instance_q31;
<> 139:856d2700e60b 4730
<> 139:856d2700e60b 4731 /**
<> 139:856d2700e60b 4732 * @brief Instance structure for the Q15 sparse FIR filter.
<> 139:856d2700e60b 4733 */
<> 139:856d2700e60b 4734
<> 139:856d2700e60b 4735 typedef struct
<> 139:856d2700e60b 4736 {
<> 139:856d2700e60b 4737 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 139:856d2700e60b 4738 uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
<> 139:856d2700e60b 4739 q15_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
<> 139:856d2700e60b 4740 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 139:856d2700e60b 4741 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
<> 139:856d2700e60b 4742 int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
<> 139:856d2700e60b 4743 } arm_fir_sparse_instance_q15;
<> 139:856d2700e60b 4744
<> 139:856d2700e60b 4745 /**
<> 139:856d2700e60b 4746 * @brief Instance structure for the Q7 sparse FIR filter.
<> 139:856d2700e60b 4747 */
<> 139:856d2700e60b 4748
<> 139:856d2700e60b 4749 typedef struct
<> 139:856d2700e60b 4750 {
<> 139:856d2700e60b 4751 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 139:856d2700e60b 4752 uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
<> 139:856d2700e60b 4753 q7_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
<> 139:856d2700e60b 4754 q7_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 139:856d2700e60b 4755 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
<> 139:856d2700e60b 4756 int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
<> 139:856d2700e60b 4757 } arm_fir_sparse_instance_q7;
<> 139:856d2700e60b 4758
<> 139:856d2700e60b 4759 /**
<> 139:856d2700e60b 4760 * @brief Processing function for the floating-point sparse FIR filter.
<> 139:856d2700e60b 4761 * @param[in] *S points to an instance of the floating-point sparse FIR structure.
<> 139:856d2700e60b 4762 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 4763 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 4764 * @param[in] *pScratchIn points to a temporary buffer of size blockSize.
<> 139:856d2700e60b 4765 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 4766 * @return none.
<> 139:856d2700e60b 4767 */
<> 139:856d2700e60b 4768
<> 139:856d2700e60b 4769 void arm_fir_sparse_f32(
<> 139:856d2700e60b 4770 arm_fir_sparse_instance_f32 * S,
<> 139:856d2700e60b 4771 float32_t * pSrc,
<> 139:856d2700e60b 4772 float32_t * pDst,
<> 139:856d2700e60b 4773 float32_t * pScratchIn,
<> 139:856d2700e60b 4774 uint32_t blockSize);
<> 139:856d2700e60b 4775
<> 139:856d2700e60b 4776 /**
<> 139:856d2700e60b 4777 * @brief Initialization function for the floating-point sparse FIR filter.
<> 139:856d2700e60b 4778 * @param[in,out] *S points to an instance of the floating-point sparse FIR structure.
<> 139:856d2700e60b 4779 * @param[in] numTaps number of nonzero coefficients in the filter.
<> 139:856d2700e60b 4780 * @param[in] *pCoeffs points to the array of filter coefficients.
<> 139:856d2700e60b 4781 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 4782 * @param[in] *pTapDelay points to the array of offset times.
<> 139:856d2700e60b 4783 * @param[in] maxDelay maximum offset time supported.
<> 139:856d2700e60b 4784 * @param[in] blockSize number of samples that will be processed per block.
<> 139:856d2700e60b 4785 * @return none
<> 139:856d2700e60b 4786 */
<> 139:856d2700e60b 4787
<> 139:856d2700e60b 4788 void arm_fir_sparse_init_f32(
<> 139:856d2700e60b 4789 arm_fir_sparse_instance_f32 * S,
<> 139:856d2700e60b 4790 uint16_t numTaps,
<> 139:856d2700e60b 4791 float32_t * pCoeffs,
<> 139:856d2700e60b 4792 float32_t * pState,
<> 139:856d2700e60b 4793 int32_t * pTapDelay,
<> 139:856d2700e60b 4794 uint16_t maxDelay,
<> 139:856d2700e60b 4795 uint32_t blockSize);
<> 139:856d2700e60b 4796
<> 139:856d2700e60b 4797 /**
<> 139:856d2700e60b 4798 * @brief Processing function for the Q31 sparse FIR filter.
<> 139:856d2700e60b 4799 * @param[in] *S points to an instance of the Q31 sparse FIR structure.
<> 139:856d2700e60b 4800 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 4801 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 4802 * @param[in] *pScratchIn points to a temporary buffer of size blockSize.
<> 139:856d2700e60b 4803 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 4804 * @return none.
<> 139:856d2700e60b 4805 */
<> 139:856d2700e60b 4806
<> 139:856d2700e60b 4807 void arm_fir_sparse_q31(
<> 139:856d2700e60b 4808 arm_fir_sparse_instance_q31 * S,
<> 139:856d2700e60b 4809 q31_t * pSrc,
<> 139:856d2700e60b 4810 q31_t * pDst,
<> 139:856d2700e60b 4811 q31_t * pScratchIn,
<> 139:856d2700e60b 4812 uint32_t blockSize);
<> 139:856d2700e60b 4813
<> 139:856d2700e60b 4814 /**
<> 139:856d2700e60b 4815 * @brief Initialization function for the Q31 sparse FIR filter.
<> 139:856d2700e60b 4816 * @param[in,out] *S points to an instance of the Q31 sparse FIR structure.
<> 139:856d2700e60b 4817 * @param[in] numTaps number of nonzero coefficients in the filter.
<> 139:856d2700e60b 4818 * @param[in] *pCoeffs points to the array of filter coefficients.
<> 139:856d2700e60b 4819 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 4820 * @param[in] *pTapDelay points to the array of offset times.
<> 139:856d2700e60b 4821 * @param[in] maxDelay maximum offset time supported.
<> 139:856d2700e60b 4822 * @param[in] blockSize number of samples that will be processed per block.
<> 139:856d2700e60b 4823 * @return none
<> 139:856d2700e60b 4824 */
<> 139:856d2700e60b 4825
<> 139:856d2700e60b 4826 void arm_fir_sparse_init_q31(
<> 139:856d2700e60b 4827 arm_fir_sparse_instance_q31 * S,
<> 139:856d2700e60b 4828 uint16_t numTaps,
<> 139:856d2700e60b 4829 q31_t * pCoeffs,
<> 139:856d2700e60b 4830 q31_t * pState,
<> 139:856d2700e60b 4831 int32_t * pTapDelay,
<> 139:856d2700e60b 4832 uint16_t maxDelay,
<> 139:856d2700e60b 4833 uint32_t blockSize);
<> 139:856d2700e60b 4834
<> 139:856d2700e60b 4835 /**
<> 139:856d2700e60b 4836 * @brief Processing function for the Q15 sparse FIR filter.
<> 139:856d2700e60b 4837 * @param[in] *S points to an instance of the Q15 sparse FIR structure.
<> 139:856d2700e60b 4838 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 4839 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 4840 * @param[in] *pScratchIn points to a temporary buffer of size blockSize.
<> 139:856d2700e60b 4841 * @param[in] *pScratchOut points to a temporary buffer of size blockSize.
<> 139:856d2700e60b 4842 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 4843 * @return none.
<> 139:856d2700e60b 4844 */
<> 139:856d2700e60b 4845
<> 139:856d2700e60b 4846 void arm_fir_sparse_q15(
<> 139:856d2700e60b 4847 arm_fir_sparse_instance_q15 * S,
<> 139:856d2700e60b 4848 q15_t * pSrc,
<> 139:856d2700e60b 4849 q15_t * pDst,
<> 139:856d2700e60b 4850 q15_t * pScratchIn,
<> 139:856d2700e60b 4851 q31_t * pScratchOut,
<> 139:856d2700e60b 4852 uint32_t blockSize);
<> 139:856d2700e60b 4853
<> 139:856d2700e60b 4854
<> 139:856d2700e60b 4855 /**
<> 139:856d2700e60b 4856 * @brief Initialization function for the Q15 sparse FIR filter.
<> 139:856d2700e60b 4857 * @param[in,out] *S points to an instance of the Q15 sparse FIR structure.
<> 139:856d2700e60b 4858 * @param[in] numTaps number of nonzero coefficients in the filter.
<> 139:856d2700e60b 4859 * @param[in] *pCoeffs points to the array of filter coefficients.
<> 139:856d2700e60b 4860 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 4861 * @param[in] *pTapDelay points to the array of offset times.
<> 139:856d2700e60b 4862 * @param[in] maxDelay maximum offset time supported.
<> 139:856d2700e60b 4863 * @param[in] blockSize number of samples that will be processed per block.
<> 139:856d2700e60b 4864 * @return none
<> 139:856d2700e60b 4865 */
<> 139:856d2700e60b 4866
<> 139:856d2700e60b 4867 void arm_fir_sparse_init_q15(
<> 139:856d2700e60b 4868 arm_fir_sparse_instance_q15 * S,
<> 139:856d2700e60b 4869 uint16_t numTaps,
<> 139:856d2700e60b 4870 q15_t * pCoeffs,
<> 139:856d2700e60b 4871 q15_t * pState,
<> 139:856d2700e60b 4872 int32_t * pTapDelay,
<> 139:856d2700e60b 4873 uint16_t maxDelay,
<> 139:856d2700e60b 4874 uint32_t blockSize);
<> 139:856d2700e60b 4875
<> 139:856d2700e60b 4876 /**
<> 139:856d2700e60b 4877 * @brief Processing function for the Q7 sparse FIR filter.
<> 139:856d2700e60b 4878 * @param[in] *S points to an instance of the Q7 sparse FIR structure.
<> 139:856d2700e60b 4879 * @param[in] *pSrc points to the block of input data.
<> 139:856d2700e60b 4880 * @param[out] *pDst points to the block of output data
<> 139:856d2700e60b 4881 * @param[in] *pScratchIn points to a temporary buffer of size blockSize.
<> 139:856d2700e60b 4882 * @param[in] *pScratchOut points to a temporary buffer of size blockSize.
<> 139:856d2700e60b 4883 * @param[in] blockSize number of input samples to process per call.
<> 139:856d2700e60b 4884 * @return none.
<> 139:856d2700e60b 4885 */
<> 139:856d2700e60b 4886
<> 139:856d2700e60b 4887 void arm_fir_sparse_q7(
<> 139:856d2700e60b 4888 arm_fir_sparse_instance_q7 * S,
<> 139:856d2700e60b 4889 q7_t * pSrc,
<> 139:856d2700e60b 4890 q7_t * pDst,
<> 139:856d2700e60b 4891 q7_t * pScratchIn,
<> 139:856d2700e60b 4892 q31_t * pScratchOut,
<> 139:856d2700e60b 4893 uint32_t blockSize);
<> 139:856d2700e60b 4894
<> 139:856d2700e60b 4895 /**
<> 139:856d2700e60b 4896 * @brief Initialization function for the Q7 sparse FIR filter.
<> 139:856d2700e60b 4897 * @param[in,out] *S points to an instance of the Q7 sparse FIR structure.
<> 139:856d2700e60b 4898 * @param[in] numTaps number of nonzero coefficients in the filter.
<> 139:856d2700e60b 4899 * @param[in] *pCoeffs points to the array of filter coefficients.
<> 139:856d2700e60b 4900 * @param[in] *pState points to the state buffer.
<> 139:856d2700e60b 4901 * @param[in] *pTapDelay points to the array of offset times.
<> 139:856d2700e60b 4902 * @param[in] maxDelay maximum offset time supported.
<> 139:856d2700e60b 4903 * @param[in] blockSize number of samples that will be processed per block.
<> 139:856d2700e60b 4904 * @return none
<> 139:856d2700e60b 4905 */
<> 139:856d2700e60b 4906
<> 139:856d2700e60b 4907 void arm_fir_sparse_init_q7(
<> 139:856d2700e60b 4908 arm_fir_sparse_instance_q7 * S,
<> 139:856d2700e60b 4909 uint16_t numTaps,
<> 139:856d2700e60b 4910 q7_t * pCoeffs,
<> 139:856d2700e60b 4911 q7_t * pState,
<> 139:856d2700e60b 4912 int32_t * pTapDelay,
<> 139:856d2700e60b 4913 uint16_t maxDelay,
<> 139:856d2700e60b 4914 uint32_t blockSize);
<> 139:856d2700e60b 4915
<> 139:856d2700e60b 4916
<> 139:856d2700e60b 4917 /*
<> 139:856d2700e60b 4918 * @brief Floating-point sin_cos function.
<> 139:856d2700e60b 4919 * @param[in] theta input value in degrees
<> 139:856d2700e60b 4920 * @param[out] *pSinVal points to the processed sine output.
<> 139:856d2700e60b 4921 * @param[out] *pCosVal points to the processed cos output.
<> 139:856d2700e60b 4922 * @return none.
<> 139:856d2700e60b 4923 */
<> 139:856d2700e60b 4924
<> 139:856d2700e60b 4925 void arm_sin_cos_f32(
<> 139:856d2700e60b 4926 float32_t theta,
<> 139:856d2700e60b 4927 float32_t * pSinVal,
<> 139:856d2700e60b 4928 float32_t * pCcosVal);
<> 139:856d2700e60b 4929
<> 139:856d2700e60b 4930 /*
<> 139:856d2700e60b 4931 * @brief Q31 sin_cos function.
<> 139:856d2700e60b 4932 * @param[in] theta scaled input value in degrees
<> 139:856d2700e60b 4933 * @param[out] *pSinVal points to the processed sine output.
<> 139:856d2700e60b 4934 * @param[out] *pCosVal points to the processed cosine output.
<> 139:856d2700e60b 4935 * @return none.
<> 139:856d2700e60b 4936 */
<> 139:856d2700e60b 4937
<> 139:856d2700e60b 4938 void arm_sin_cos_q31(
<> 139:856d2700e60b 4939 q31_t theta,
<> 139:856d2700e60b 4940 q31_t * pSinVal,
<> 139:856d2700e60b 4941 q31_t * pCosVal);
<> 139:856d2700e60b 4942
<> 139:856d2700e60b 4943
<> 139:856d2700e60b 4944 /**
<> 139:856d2700e60b 4945 * @brief Floating-point complex conjugate.
<> 139:856d2700e60b 4946 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 4947 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 4948 * @param[in] numSamples number of complex samples in each vector
<> 139:856d2700e60b 4949 * @return none.
<> 139:856d2700e60b 4950 */
<> 139:856d2700e60b 4951
<> 139:856d2700e60b 4952 void arm_cmplx_conj_f32(
<> 139:856d2700e60b 4953 float32_t * pSrc,
<> 139:856d2700e60b 4954 float32_t * pDst,
<> 139:856d2700e60b 4955 uint32_t numSamples);
<> 139:856d2700e60b 4956
<> 139:856d2700e60b 4957 /**
<> 139:856d2700e60b 4958 * @brief Q31 complex conjugate.
<> 139:856d2700e60b 4959 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 4960 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 4961 * @param[in] numSamples number of complex samples in each vector
<> 139:856d2700e60b 4962 * @return none.
<> 139:856d2700e60b 4963 */
<> 139:856d2700e60b 4964
<> 139:856d2700e60b 4965 void arm_cmplx_conj_q31(
<> 139:856d2700e60b 4966 q31_t * pSrc,
<> 139:856d2700e60b 4967 q31_t * pDst,
<> 139:856d2700e60b 4968 uint32_t numSamples);
<> 139:856d2700e60b 4969
<> 139:856d2700e60b 4970 /**
<> 139:856d2700e60b 4971 * @brief Q15 complex conjugate.
<> 139:856d2700e60b 4972 * @param[in] *pSrc points to the input vector
<> 139:856d2700e60b 4973 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 4974 * @param[in] numSamples number of complex samples in each vector
<> 139:856d2700e60b 4975 * @return none.
<> 139:856d2700e60b 4976 */
<> 139:856d2700e60b 4977
<> 139:856d2700e60b 4978 void arm_cmplx_conj_q15(
<> 139:856d2700e60b 4979 q15_t * pSrc,
<> 139:856d2700e60b 4980 q15_t * pDst,
<> 139:856d2700e60b 4981 uint32_t numSamples);
<> 139:856d2700e60b 4982
<> 139:856d2700e60b 4983
<> 139:856d2700e60b 4984
<> 139:856d2700e60b 4985 /**
<> 139:856d2700e60b 4986 * @brief Floating-point complex magnitude squared
<> 139:856d2700e60b 4987 * @param[in] *pSrc points to the complex input vector
<> 139:856d2700e60b 4988 * @param[out] *pDst points to the real output vector
<> 139:856d2700e60b 4989 * @param[in] numSamples number of complex samples in the input vector
<> 139:856d2700e60b 4990 * @return none.
<> 139:856d2700e60b 4991 */
<> 139:856d2700e60b 4992
<> 139:856d2700e60b 4993 void arm_cmplx_mag_squared_f32(
<> 139:856d2700e60b 4994 float32_t * pSrc,
<> 139:856d2700e60b 4995 float32_t * pDst,
<> 139:856d2700e60b 4996 uint32_t numSamples);
<> 139:856d2700e60b 4997
<> 139:856d2700e60b 4998 /**
<> 139:856d2700e60b 4999 * @brief Q31 complex magnitude squared
<> 139:856d2700e60b 5000 * @param[in] *pSrc points to the complex input vector
<> 139:856d2700e60b 5001 * @param[out] *pDst points to the real output vector
<> 139:856d2700e60b 5002 * @param[in] numSamples number of complex samples in the input vector
<> 139:856d2700e60b 5003 * @return none.
<> 139:856d2700e60b 5004 */
<> 139:856d2700e60b 5005
<> 139:856d2700e60b 5006 void arm_cmplx_mag_squared_q31(
<> 139:856d2700e60b 5007 q31_t * pSrc,
<> 139:856d2700e60b 5008 q31_t * pDst,
<> 139:856d2700e60b 5009 uint32_t numSamples);
<> 139:856d2700e60b 5010
<> 139:856d2700e60b 5011 /**
<> 139:856d2700e60b 5012 * @brief Q15 complex magnitude squared
<> 139:856d2700e60b 5013 * @param[in] *pSrc points to the complex input vector
<> 139:856d2700e60b 5014 * @param[out] *pDst points to the real output vector
<> 139:856d2700e60b 5015 * @param[in] numSamples number of complex samples in the input vector
<> 139:856d2700e60b 5016 * @return none.
<> 139:856d2700e60b 5017 */
<> 139:856d2700e60b 5018
<> 139:856d2700e60b 5019 void arm_cmplx_mag_squared_q15(
<> 139:856d2700e60b 5020 q15_t * pSrc,
<> 139:856d2700e60b 5021 q15_t * pDst,
<> 139:856d2700e60b 5022 uint32_t numSamples);
<> 139:856d2700e60b 5023
<> 139:856d2700e60b 5024
<> 139:856d2700e60b 5025 /**
<> 139:856d2700e60b 5026 * @ingroup groupController
<> 139:856d2700e60b 5027 */
<> 139:856d2700e60b 5028
<> 139:856d2700e60b 5029 /**
<> 139:856d2700e60b 5030 * @defgroup PID PID Motor Control
<> 139:856d2700e60b 5031 *
<> 139:856d2700e60b 5032 * A Proportional Integral Derivative (PID) controller is a generic feedback control
<> 139:856d2700e60b 5033 * loop mechanism widely used in industrial control systems.
<> 139:856d2700e60b 5034 * A PID controller is the most commonly used type of feedback controller.
<> 139:856d2700e60b 5035 *
<> 139:856d2700e60b 5036 * This set of functions implements (PID) controllers
<> 139:856d2700e60b 5037 * for Q15, Q31, and floating-point data types. The functions operate on a single sample
<> 139:856d2700e60b 5038 * of data and each call to the function returns a single processed value.
<> 139:856d2700e60b 5039 * <code>S</code> points to an instance of the PID control data structure. <code>in</code>
<> 139:856d2700e60b 5040 * is the input sample value. The functions return the output value.
<> 139:856d2700e60b 5041 *
<> 139:856d2700e60b 5042 * \par Algorithm:
<> 139:856d2700e60b 5043 * <pre>
<> 139:856d2700e60b 5044 * y[n] = y[n-1] + A0 * x[n] + A1 * x[n-1] + A2 * x[n-2]
<> 139:856d2700e60b 5045 * A0 = Kp + Ki + Kd
<> 139:856d2700e60b 5046 * A1 = (-Kp ) - (2 * Kd )
<> 139:856d2700e60b 5047 * A2 = Kd </pre>
<> 139:856d2700e60b 5048 *
<> 139:856d2700e60b 5049 * \par
<> 139:856d2700e60b 5050 * where \c Kp is proportional constant, \c Ki is Integral constant and \c Kd is Derivative constant
<> 139:856d2700e60b 5051 *
<> 139:856d2700e60b 5052 * \par
<> 139:856d2700e60b 5053 * \image html PID.gif "Proportional Integral Derivative Controller"
<> 139:856d2700e60b 5054 *
<> 139:856d2700e60b 5055 * \par
<> 139:856d2700e60b 5056 * The PID controller calculates an "error" value as the difference between
<> 139:856d2700e60b 5057 * the measured output and the reference input.
<> 139:856d2700e60b 5058 * The controller attempts to minimize the error by adjusting the process control inputs.
<> 139:856d2700e60b 5059 * The proportional value determines the reaction to the current error,
<> 139:856d2700e60b 5060 * the integral value determines the reaction based on the sum of recent errors,
<> 139:856d2700e60b 5061 * and the derivative value determines the reaction based on the rate at which the error has been changing.
<> 139:856d2700e60b 5062 *
<> 139:856d2700e60b 5063 * \par Instance Structure
<> 139:856d2700e60b 5064 * The Gains A0, A1, A2 and state variables for a PID controller are stored together in an instance data structure.
<> 139:856d2700e60b 5065 * A separate instance structure must be defined for each PID Controller.
<> 139:856d2700e60b 5066 * There are separate instance structure declarations for each of the 3 supported data types.
<> 139:856d2700e60b 5067 *
<> 139:856d2700e60b 5068 * \par Reset Functions
<> 139:856d2700e60b 5069 * There is also an associated reset function for each data type which clears the state array.
<> 139:856d2700e60b 5070 *
<> 139:856d2700e60b 5071 * \par Initialization Functions
<> 139:856d2700e60b 5072 * There is also an associated initialization function for each data type.
<> 139:856d2700e60b 5073 * The initialization function performs the following operations:
<> 139:856d2700e60b 5074 * - Initializes the Gains A0, A1, A2 from Kp,Ki, Kd gains.
<> 139:856d2700e60b 5075 * - Zeros out the values in the state buffer.
<> 139:856d2700e60b 5076 *
<> 139:856d2700e60b 5077 * \par
<> 139:856d2700e60b 5078 * Instance structure cannot be placed into a const data section and it is recommended to use the initialization function.
<> 139:856d2700e60b 5079 *
<> 139:856d2700e60b 5080 * \par Fixed-Point Behavior
<> 139:856d2700e60b 5081 * Care must be taken when using the fixed-point versions of the PID Controller functions.
<> 139:856d2700e60b 5082 * In particular, the overflow and saturation behavior of the accumulator used in each function must be considered.
<> 139:856d2700e60b 5083 * Refer to the function specific documentation below for usage guidelines.
<> 139:856d2700e60b 5084 */
<> 139:856d2700e60b 5085
<> 139:856d2700e60b 5086 /**
<> 139:856d2700e60b 5087 * @addtogroup PID
<> 139:856d2700e60b 5088 * @{
<> 139:856d2700e60b 5089 */
<> 139:856d2700e60b 5090
<> 139:856d2700e60b 5091 /**
<> 139:856d2700e60b 5092 * @brief Process function for the floating-point PID Control.
<> 139:856d2700e60b 5093 * @param[in,out] *S is an instance of the floating-point PID Control structure
<> 139:856d2700e60b 5094 * @param[in] in input sample to process
<> 139:856d2700e60b 5095 * @return out processed output sample.
<> 139:856d2700e60b 5096 */
<> 139:856d2700e60b 5097
<> 139:856d2700e60b 5098
<> 139:856d2700e60b 5099 static __INLINE float32_t arm_pid_f32(
<> 139:856d2700e60b 5100 arm_pid_instance_f32 * S,
<> 139:856d2700e60b 5101 float32_t in)
<> 139:856d2700e60b 5102 {
<> 139:856d2700e60b 5103 float32_t out;
<> 139:856d2700e60b 5104
<> 139:856d2700e60b 5105 /* y[n] = y[n-1] + A0 * x[n] + A1 * x[n-1] + A2 * x[n-2] */
<> 139:856d2700e60b 5106 out = (S->A0 * in) +
<> 139:856d2700e60b 5107 (S->A1 * S->state[0]) + (S->A2 * S->state[1]) + (S->state[2]);
<> 139:856d2700e60b 5108
<> 139:856d2700e60b 5109 /* Update state */
<> 139:856d2700e60b 5110 S->state[1] = S->state[0];
<> 139:856d2700e60b 5111 S->state[0] = in;
<> 139:856d2700e60b 5112 S->state[2] = out;
<> 139:856d2700e60b 5113
<> 139:856d2700e60b 5114 /* return to application */
<> 139:856d2700e60b 5115 return (out);
<> 139:856d2700e60b 5116
<> 139:856d2700e60b 5117 }
<> 139:856d2700e60b 5118
<> 139:856d2700e60b 5119 /**
<> 139:856d2700e60b 5120 * @brief Process function for the Q31 PID Control.
<> 139:856d2700e60b 5121 * @param[in,out] *S points to an instance of the Q31 PID Control structure
<> 139:856d2700e60b 5122 * @param[in] in input sample to process
<> 139:856d2700e60b 5123 * @return out processed output sample.
<> 139:856d2700e60b 5124 *
<> 139:856d2700e60b 5125 * <b>Scaling and Overflow Behavior:</b>
<> 139:856d2700e60b 5126 * \par
<> 139:856d2700e60b 5127 * The function is implemented using an internal 64-bit accumulator.
<> 139:856d2700e60b 5128 * The accumulator has a 2.62 format and maintains full precision of the intermediate multiplication results but provides only a single guard bit.
<> 139:856d2700e60b 5129 * Thus, if the accumulator result overflows it wraps around rather than clip.
<> 139:856d2700e60b 5130 * In order to avoid overflows completely the input signal must be scaled down by 2 bits as there are four additions.
<> 139:856d2700e60b 5131 * After all multiply-accumulates are performed, the 2.62 accumulator is truncated to 1.32 format and then saturated to 1.31 format.
<> 139:856d2700e60b 5132 */
<> 139:856d2700e60b 5133
<> 139:856d2700e60b 5134 static __INLINE q31_t arm_pid_q31(
<> 139:856d2700e60b 5135 arm_pid_instance_q31 * S,
<> 139:856d2700e60b 5136 q31_t in)
<> 139:856d2700e60b 5137 {
<> 139:856d2700e60b 5138 q63_t acc;
<> 139:856d2700e60b 5139 q31_t out;
<> 139:856d2700e60b 5140
<> 139:856d2700e60b 5141 /* acc = A0 * x[n] */
<> 139:856d2700e60b 5142 acc = (q63_t) S->A0 * in;
<> 139:856d2700e60b 5143
<> 139:856d2700e60b 5144 /* acc += A1 * x[n-1] */
<> 139:856d2700e60b 5145 acc += (q63_t) S->A1 * S->state[0];
<> 139:856d2700e60b 5146
<> 139:856d2700e60b 5147 /* acc += A2 * x[n-2] */
<> 139:856d2700e60b 5148 acc += (q63_t) S->A2 * S->state[1];
<> 139:856d2700e60b 5149
<> 139:856d2700e60b 5150 /* convert output to 1.31 format to add y[n-1] */
<> 139:856d2700e60b 5151 out = (q31_t) (acc >> 31u);
<> 139:856d2700e60b 5152
<> 139:856d2700e60b 5153 /* out += y[n-1] */
<> 139:856d2700e60b 5154 out += S->state[2];
<> 139:856d2700e60b 5155
<> 139:856d2700e60b 5156 /* Update state */
<> 139:856d2700e60b 5157 S->state[1] = S->state[0];
<> 139:856d2700e60b 5158 S->state[0] = in;
<> 139:856d2700e60b 5159 S->state[2] = out;
<> 139:856d2700e60b 5160
<> 139:856d2700e60b 5161 /* return to application */
<> 139:856d2700e60b 5162 return (out);
<> 139:856d2700e60b 5163
<> 139:856d2700e60b 5164 }
<> 139:856d2700e60b 5165
<> 139:856d2700e60b 5166 /**
<> 139:856d2700e60b 5167 * @brief Process function for the Q15 PID Control.
<> 139:856d2700e60b 5168 * @param[in,out] *S points to an instance of the Q15 PID Control structure
<> 139:856d2700e60b 5169 * @param[in] in input sample to process
<> 139:856d2700e60b 5170 * @return out processed output sample.
<> 139:856d2700e60b 5171 *
<> 139:856d2700e60b 5172 * <b>Scaling and Overflow Behavior:</b>
<> 139:856d2700e60b 5173 * \par
<> 139:856d2700e60b 5174 * The function is implemented using a 64-bit internal accumulator.
<> 139:856d2700e60b 5175 * Both Gains and state variables are represented in 1.15 format and multiplications yield a 2.30 result.
<> 139:856d2700e60b 5176 * The 2.30 intermediate results are accumulated in a 64-bit accumulator in 34.30 format.
<> 139:856d2700e60b 5177 * There is no risk of internal overflow with this approach and the full precision of intermediate multiplications is preserved.
<> 139:856d2700e60b 5178 * After all additions have been performed, the accumulator is truncated to 34.15 format by discarding low 15 bits.
<> 139:856d2700e60b 5179 * Lastly, the accumulator is saturated to yield a result in 1.15 format.
<> 139:856d2700e60b 5180 */
<> 139:856d2700e60b 5181
<> 139:856d2700e60b 5182 static __INLINE q15_t arm_pid_q15(
<> 139:856d2700e60b 5183 arm_pid_instance_q15 * S,
<> 139:856d2700e60b 5184 q15_t in)
<> 139:856d2700e60b 5185 {
<> 139:856d2700e60b 5186 q63_t acc;
<> 139:856d2700e60b 5187 q15_t out;
<> 139:856d2700e60b 5188
<> 139:856d2700e60b 5189 #ifndef ARM_MATH_CM0_FAMILY
<> 139:856d2700e60b 5190 __SIMD32_TYPE *vstate;
<> 139:856d2700e60b 5191
<> 139:856d2700e60b 5192 /* Implementation of PID controller */
<> 139:856d2700e60b 5193
<> 139:856d2700e60b 5194 /* acc = A0 * x[n] */
<> 139:856d2700e60b 5195 acc = (q31_t) __SMUAD(S->A0, in);
<> 139:856d2700e60b 5196
<> 139:856d2700e60b 5197 /* acc += A1 * x[n-1] + A2 * x[n-2] */
<> 139:856d2700e60b 5198 vstate = __SIMD32_CONST(S->state);
<> 139:856d2700e60b 5199 acc = __SMLALD(S->A1, (q31_t) *vstate, acc);
<> 139:856d2700e60b 5200
<> 139:856d2700e60b 5201 #else
<> 139:856d2700e60b 5202 /* acc = A0 * x[n] */
<> 139:856d2700e60b 5203 acc = ((q31_t) S->A0) * in;
<> 139:856d2700e60b 5204
<> 139:856d2700e60b 5205 /* acc += A1 * x[n-1] + A2 * x[n-2] */
<> 139:856d2700e60b 5206 acc += (q31_t) S->A1 * S->state[0];
<> 139:856d2700e60b 5207 acc += (q31_t) S->A2 * S->state[1];
<> 139:856d2700e60b 5208
<> 139:856d2700e60b 5209 #endif
<> 139:856d2700e60b 5210
<> 139:856d2700e60b 5211 /* acc += y[n-1] */
<> 139:856d2700e60b 5212 acc += (q31_t) S->state[2] << 15;
<> 139:856d2700e60b 5213
<> 139:856d2700e60b 5214 /* saturate the output */
<> 139:856d2700e60b 5215 out = (q15_t) (__SSAT((acc >> 15), 16));
<> 139:856d2700e60b 5216
<> 139:856d2700e60b 5217 /* Update state */
<> 139:856d2700e60b 5218 S->state[1] = S->state[0];
<> 139:856d2700e60b 5219 S->state[0] = in;
<> 139:856d2700e60b 5220 S->state[2] = out;
<> 139:856d2700e60b 5221
<> 139:856d2700e60b 5222 /* return to application */
<> 139:856d2700e60b 5223 return (out);
<> 139:856d2700e60b 5224
<> 139:856d2700e60b 5225 }
<> 139:856d2700e60b 5226
<> 139:856d2700e60b 5227 /**
<> 139:856d2700e60b 5228 * @} end of PID group
<> 139:856d2700e60b 5229 */
<> 139:856d2700e60b 5230
<> 139:856d2700e60b 5231
<> 139:856d2700e60b 5232 /**
<> 139:856d2700e60b 5233 * @brief Floating-point matrix inverse.
<> 139:856d2700e60b 5234 * @param[in] *src points to the instance of the input floating-point matrix structure.
<> 139:856d2700e60b 5235 * @param[out] *dst points to the instance of the output floating-point matrix structure.
<> 139:856d2700e60b 5236 * @return The function returns ARM_MATH_SIZE_MISMATCH, if the dimensions do not match.
<> 139:856d2700e60b 5237 * If the input matrix is singular (does not have an inverse), then the algorithm terminates and returns error status ARM_MATH_SINGULAR.
<> 139:856d2700e60b 5238 */
<> 139:856d2700e60b 5239
<> 139:856d2700e60b 5240 arm_status arm_mat_inverse_f32(
<> 139:856d2700e60b 5241 const arm_matrix_instance_f32 * src,
<> 139:856d2700e60b 5242 arm_matrix_instance_f32 * dst);
<> 139:856d2700e60b 5243
<> 139:856d2700e60b 5244
<> 139:856d2700e60b 5245 /**
<> 139:856d2700e60b 5246 * @brief Floating-point matrix inverse.
<> 139:856d2700e60b 5247 * @param[in] *src points to the instance of the input floating-point matrix structure.
<> 139:856d2700e60b 5248 * @param[out] *dst points to the instance of the output floating-point matrix structure.
<> 139:856d2700e60b 5249 * @return The function returns ARM_MATH_SIZE_MISMATCH, if the dimensions do not match.
<> 139:856d2700e60b 5250 * If the input matrix is singular (does not have an inverse), then the algorithm terminates and returns error status ARM_MATH_SINGULAR.
<> 139:856d2700e60b 5251 */
<> 139:856d2700e60b 5252
<> 139:856d2700e60b 5253 arm_status arm_mat_inverse_f64(
<> 139:856d2700e60b 5254 const arm_matrix_instance_f64 * src,
<> 139:856d2700e60b 5255 arm_matrix_instance_f64 * dst);
<> 139:856d2700e60b 5256
<> 139:856d2700e60b 5257
<> 139:856d2700e60b 5258
<> 139:856d2700e60b 5259 /**
<> 139:856d2700e60b 5260 * @ingroup groupController
<> 139:856d2700e60b 5261 */
<> 139:856d2700e60b 5262
<> 139:856d2700e60b 5263
<> 139:856d2700e60b 5264 /**
<> 139:856d2700e60b 5265 * @defgroup clarke Vector Clarke Transform
<> 139:856d2700e60b 5266 * Forward Clarke transform converts the instantaneous stator phases into a two-coordinate time invariant vector.
<> 139:856d2700e60b 5267 * Generally the Clarke transform uses three-phase currents <code>Ia, Ib and Ic</code> to calculate currents
<> 139:856d2700e60b 5268 * in the two-phase orthogonal stator axis <code>Ialpha</code> and <code>Ibeta</code>.
<> 139:856d2700e60b 5269 * When <code>Ialpha</code> is superposed with <code>Ia</code> as shown in the figure below
<> 139:856d2700e60b 5270 * \image html clarke.gif Stator current space vector and its components in (a,b).
<> 139:856d2700e60b 5271 * and <code>Ia + Ib + Ic = 0</code>, in this condition <code>Ialpha</code> and <code>Ibeta</code>
<> 139:856d2700e60b 5272 * can be calculated using only <code>Ia</code> and <code>Ib</code>.
<> 139:856d2700e60b 5273 *
<> 139:856d2700e60b 5274 * The function operates on a single sample of data and each call to the function returns the processed output.
<> 139:856d2700e60b 5275 * The library provides separate functions for Q31 and floating-point data types.
<> 139:856d2700e60b 5276 * \par Algorithm
<> 139:856d2700e60b 5277 * \image html clarkeFormula.gif
<> 139:856d2700e60b 5278 * where <code>Ia</code> and <code>Ib</code> are the instantaneous stator phases and
<> 139:856d2700e60b 5279 * <code>pIalpha</code> and <code>pIbeta</code> are the two coordinates of time invariant vector.
<> 139:856d2700e60b 5280 * \par Fixed-Point Behavior
<> 139:856d2700e60b 5281 * Care must be taken when using the Q31 version of the Clarke transform.
<> 139:856d2700e60b 5282 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
<> 139:856d2700e60b 5283 * Refer to the function specific documentation below for usage guidelines.
<> 139:856d2700e60b 5284 */
<> 139:856d2700e60b 5285
<> 139:856d2700e60b 5286 /**
<> 139:856d2700e60b 5287 * @addtogroup clarke
<> 139:856d2700e60b 5288 * @{
<> 139:856d2700e60b 5289 */
<> 139:856d2700e60b 5290
<> 139:856d2700e60b 5291 /**
<> 139:856d2700e60b 5292 *
<> 139:856d2700e60b 5293 * @brief Floating-point Clarke transform
<> 139:856d2700e60b 5294 * @param[in] Ia input three-phase coordinate <code>a</code>
<> 139:856d2700e60b 5295 * @param[in] Ib input three-phase coordinate <code>b</code>
<> 139:856d2700e60b 5296 * @param[out] *pIalpha points to output two-phase orthogonal vector axis alpha
<> 139:856d2700e60b 5297 * @param[out] *pIbeta points to output two-phase orthogonal vector axis beta
<> 139:856d2700e60b 5298 * @return none.
<> 139:856d2700e60b 5299 */
<> 139:856d2700e60b 5300
<> 139:856d2700e60b 5301 static __INLINE void arm_clarke_f32(
<> 139:856d2700e60b 5302 float32_t Ia,
<> 139:856d2700e60b 5303 float32_t Ib,
<> 139:856d2700e60b 5304 float32_t * pIalpha,
<> 139:856d2700e60b 5305 float32_t * pIbeta)
<> 139:856d2700e60b 5306 {
<> 139:856d2700e60b 5307 /* Calculate pIalpha using the equation, pIalpha = Ia */
<> 139:856d2700e60b 5308 *pIalpha = Ia;
<> 139:856d2700e60b 5309
<> 139:856d2700e60b 5310 /* Calculate pIbeta using the equation, pIbeta = (1/sqrt(3)) * Ia + (2/sqrt(3)) * Ib */
<> 139:856d2700e60b 5311 *pIbeta =
<> 139:856d2700e60b 5312 ((float32_t) 0.57735026919 * Ia + (float32_t) 1.15470053838 * Ib);
<> 139:856d2700e60b 5313
<> 139:856d2700e60b 5314 }
<> 139:856d2700e60b 5315
<> 139:856d2700e60b 5316 /**
<> 139:856d2700e60b 5317 * @brief Clarke transform for Q31 version
<> 139:856d2700e60b 5318 * @param[in] Ia input three-phase coordinate <code>a</code>
<> 139:856d2700e60b 5319 * @param[in] Ib input three-phase coordinate <code>b</code>
<> 139:856d2700e60b 5320 * @param[out] *pIalpha points to output two-phase orthogonal vector axis alpha
<> 139:856d2700e60b 5321 * @param[out] *pIbeta points to output two-phase orthogonal vector axis beta
<> 139:856d2700e60b 5322 * @return none.
<> 139:856d2700e60b 5323 *
<> 139:856d2700e60b 5324 * <b>Scaling and Overflow Behavior:</b>
<> 139:856d2700e60b 5325 * \par
<> 139:856d2700e60b 5326 * The function is implemented using an internal 32-bit accumulator.
<> 139:856d2700e60b 5327 * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
<> 139:856d2700e60b 5328 * There is saturation on the addition, hence there is no risk of overflow.
<> 139:856d2700e60b 5329 */
<> 139:856d2700e60b 5330
<> 139:856d2700e60b 5331 static __INLINE void arm_clarke_q31(
<> 139:856d2700e60b 5332 q31_t Ia,
<> 139:856d2700e60b 5333 q31_t Ib,
<> 139:856d2700e60b 5334 q31_t * pIalpha,
<> 139:856d2700e60b 5335 q31_t * pIbeta)
<> 139:856d2700e60b 5336 {
<> 139:856d2700e60b 5337 q31_t product1, product2; /* Temporary variables used to store intermediate results */
<> 139:856d2700e60b 5338
<> 139:856d2700e60b 5339 /* Calculating pIalpha from Ia by equation pIalpha = Ia */
<> 139:856d2700e60b 5340 *pIalpha = Ia;
<> 139:856d2700e60b 5341
<> 139:856d2700e60b 5342 /* Intermediate product is calculated by (1/(sqrt(3)) * Ia) */
<> 139:856d2700e60b 5343 product1 = (q31_t) (((q63_t) Ia * 0x24F34E8B) >> 30);
<> 139:856d2700e60b 5344
<> 139:856d2700e60b 5345 /* Intermediate product is calculated by (2/sqrt(3) * Ib) */
<> 139:856d2700e60b 5346 product2 = (q31_t) (((q63_t) Ib * 0x49E69D16) >> 30);
<> 139:856d2700e60b 5347
<> 139:856d2700e60b 5348 /* pIbeta is calculated by adding the intermediate products */
<> 139:856d2700e60b 5349 *pIbeta = __QADD(product1, product2);
<> 139:856d2700e60b 5350 }
<> 139:856d2700e60b 5351
<> 139:856d2700e60b 5352 /**
<> 139:856d2700e60b 5353 * @} end of clarke group
<> 139:856d2700e60b 5354 */
<> 139:856d2700e60b 5355
<> 139:856d2700e60b 5356 /**
<> 139:856d2700e60b 5357 * @brief Converts the elements of the Q7 vector to Q31 vector.
<> 139:856d2700e60b 5358 * @param[in] *pSrc input pointer
<> 139:856d2700e60b 5359 * @param[out] *pDst output pointer
<> 139:856d2700e60b 5360 * @param[in] blockSize number of samples to process
<> 139:856d2700e60b 5361 * @return none.
<> 139:856d2700e60b 5362 */
<> 139:856d2700e60b 5363 void arm_q7_to_q31(
<> 139:856d2700e60b 5364 q7_t * pSrc,
<> 139:856d2700e60b 5365 q31_t * pDst,
<> 139:856d2700e60b 5366 uint32_t blockSize);
<> 139:856d2700e60b 5367
<> 139:856d2700e60b 5368
<> 139:856d2700e60b 5369
<> 139:856d2700e60b 5370
<> 139:856d2700e60b 5371 /**
<> 139:856d2700e60b 5372 * @ingroup groupController
<> 139:856d2700e60b 5373 */
<> 139:856d2700e60b 5374
<> 139:856d2700e60b 5375 /**
<> 139:856d2700e60b 5376 * @defgroup inv_clarke Vector Inverse Clarke Transform
<> 139:856d2700e60b 5377 * Inverse Clarke transform converts the two-coordinate time invariant vector into instantaneous stator phases.
<> 139:856d2700e60b 5378 *
<> 139:856d2700e60b 5379 * The function operates on a single sample of data and each call to the function returns the processed output.
<> 139:856d2700e60b 5380 * The library provides separate functions for Q31 and floating-point data types.
<> 139:856d2700e60b 5381 * \par Algorithm
<> 139:856d2700e60b 5382 * \image html clarkeInvFormula.gif
<> 139:856d2700e60b 5383 * where <code>pIa</code> and <code>pIb</code> are the instantaneous stator phases and
<> 139:856d2700e60b 5384 * <code>Ialpha</code> and <code>Ibeta</code> are the two coordinates of time invariant vector.
<> 139:856d2700e60b 5385 * \par Fixed-Point Behavior
<> 139:856d2700e60b 5386 * Care must be taken when using the Q31 version of the Clarke transform.
<> 139:856d2700e60b 5387 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
<> 139:856d2700e60b 5388 * Refer to the function specific documentation below for usage guidelines.
<> 139:856d2700e60b 5389 */
<> 139:856d2700e60b 5390
<> 139:856d2700e60b 5391 /**
<> 139:856d2700e60b 5392 * @addtogroup inv_clarke
<> 139:856d2700e60b 5393 * @{
<> 139:856d2700e60b 5394 */
<> 139:856d2700e60b 5395
<> 139:856d2700e60b 5396 /**
<> 139:856d2700e60b 5397 * @brief Floating-point Inverse Clarke transform
<> 139:856d2700e60b 5398 * @param[in] Ialpha input two-phase orthogonal vector axis alpha
<> 139:856d2700e60b 5399 * @param[in] Ibeta input two-phase orthogonal vector axis beta
<> 139:856d2700e60b 5400 * @param[out] *pIa points to output three-phase coordinate <code>a</code>
<> 139:856d2700e60b 5401 * @param[out] *pIb points to output three-phase coordinate <code>b</code>
<> 139:856d2700e60b 5402 * @return none.
<> 139:856d2700e60b 5403 */
<> 139:856d2700e60b 5404
<> 139:856d2700e60b 5405
<> 139:856d2700e60b 5406 static __INLINE void arm_inv_clarke_f32(
<> 139:856d2700e60b 5407 float32_t Ialpha,
<> 139:856d2700e60b 5408 float32_t Ibeta,
<> 139:856d2700e60b 5409 float32_t * pIa,
<> 139:856d2700e60b 5410 float32_t * pIb)
<> 139:856d2700e60b 5411 {
<> 139:856d2700e60b 5412 /* Calculating pIa from Ialpha by equation pIa = Ialpha */
<> 139:856d2700e60b 5413 *pIa = Ialpha;
<> 139:856d2700e60b 5414
<> 139:856d2700e60b 5415 /* Calculating pIb from Ialpha and Ibeta by equation pIb = -(1/2) * Ialpha + (sqrt(3)/2) * Ibeta */
<> 139:856d2700e60b 5416 *pIb = -0.5 * Ialpha + (float32_t) 0.8660254039 *Ibeta;
<> 139:856d2700e60b 5417
<> 139:856d2700e60b 5418 }
<> 139:856d2700e60b 5419
<> 139:856d2700e60b 5420 /**
<> 139:856d2700e60b 5421 * @brief Inverse Clarke transform for Q31 version
<> 139:856d2700e60b 5422 * @param[in] Ialpha input two-phase orthogonal vector axis alpha
<> 139:856d2700e60b 5423 * @param[in] Ibeta input two-phase orthogonal vector axis beta
<> 139:856d2700e60b 5424 * @param[out] *pIa points to output three-phase coordinate <code>a</code>
<> 139:856d2700e60b 5425 * @param[out] *pIb points to output three-phase coordinate <code>b</code>
<> 139:856d2700e60b 5426 * @return none.
<> 139:856d2700e60b 5427 *
<> 139:856d2700e60b 5428 * <b>Scaling and Overflow Behavior:</b>
<> 139:856d2700e60b 5429 * \par
<> 139:856d2700e60b 5430 * The function is implemented using an internal 32-bit accumulator.
<> 139:856d2700e60b 5431 * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
<> 139:856d2700e60b 5432 * There is saturation on the subtraction, hence there is no risk of overflow.
<> 139:856d2700e60b 5433 */
<> 139:856d2700e60b 5434
<> 139:856d2700e60b 5435 static __INLINE void arm_inv_clarke_q31(
<> 139:856d2700e60b 5436 q31_t Ialpha,
<> 139:856d2700e60b 5437 q31_t Ibeta,
<> 139:856d2700e60b 5438 q31_t * pIa,
<> 139:856d2700e60b 5439 q31_t * pIb)
<> 139:856d2700e60b 5440 {
<> 139:856d2700e60b 5441 q31_t product1, product2; /* Temporary variables used to store intermediate results */
<> 139:856d2700e60b 5442
<> 139:856d2700e60b 5443 /* Calculating pIa from Ialpha by equation pIa = Ialpha */
<> 139:856d2700e60b 5444 *pIa = Ialpha;
<> 139:856d2700e60b 5445
<> 139:856d2700e60b 5446 /* Intermediate product is calculated by (1/(2*sqrt(3)) * Ia) */
<> 139:856d2700e60b 5447 product1 = (q31_t) (((q63_t) (Ialpha) * (0x40000000)) >> 31);
<> 139:856d2700e60b 5448
<> 139:856d2700e60b 5449 /* Intermediate product is calculated by (1/sqrt(3) * pIb) */
<> 139:856d2700e60b 5450 product2 = (q31_t) (((q63_t) (Ibeta) * (0x6ED9EBA1)) >> 31);
<> 139:856d2700e60b 5451
<> 139:856d2700e60b 5452 /* pIb is calculated by subtracting the products */
<> 139:856d2700e60b 5453 *pIb = __QSUB(product2, product1);
<> 139:856d2700e60b 5454
<> 139:856d2700e60b 5455 }
<> 139:856d2700e60b 5456
<> 139:856d2700e60b 5457 /**
<> 139:856d2700e60b 5458 * @} end of inv_clarke group
<> 139:856d2700e60b 5459 */
<> 139:856d2700e60b 5460
<> 139:856d2700e60b 5461 /**
<> 139:856d2700e60b 5462 * @brief Converts the elements of the Q7 vector to Q15 vector.
<> 139:856d2700e60b 5463 * @param[in] *pSrc input pointer
<> 139:856d2700e60b 5464 * @param[out] *pDst output pointer
<> 139:856d2700e60b 5465 * @param[in] blockSize number of samples to process
<> 139:856d2700e60b 5466 * @return none.
<> 139:856d2700e60b 5467 */
<> 139:856d2700e60b 5468 void arm_q7_to_q15(
<> 139:856d2700e60b 5469 q7_t * pSrc,
<> 139:856d2700e60b 5470 q15_t * pDst,
<> 139:856d2700e60b 5471 uint32_t blockSize);
<> 139:856d2700e60b 5472
<> 139:856d2700e60b 5473
<> 139:856d2700e60b 5474
<> 139:856d2700e60b 5475 /**
<> 139:856d2700e60b 5476 * @ingroup groupController
<> 139:856d2700e60b 5477 */
<> 139:856d2700e60b 5478
<> 139:856d2700e60b 5479 /**
<> 139:856d2700e60b 5480 * @defgroup park Vector Park Transform
<> 139:856d2700e60b 5481 *
<> 139:856d2700e60b 5482 * Forward Park transform converts the input two-coordinate vector to flux and torque components.
<> 139:856d2700e60b 5483 * The Park transform can be used to realize the transformation of the <code>Ialpha</code> and the <code>Ibeta</code> currents
<> 139:856d2700e60b 5484 * from the stationary to the moving reference frame and control the spatial relationship between
<> 139:856d2700e60b 5485 * the stator vector current and rotor flux vector.
<> 139:856d2700e60b 5486 * If we consider the d axis aligned with the rotor flux, the diagram below shows the
<> 139:856d2700e60b 5487 * current vector and the relationship from the two reference frames:
<> 139:856d2700e60b 5488 * \image html park.gif "Stator current space vector and its component in (a,b) and in the d,q rotating reference frame"
<> 139:856d2700e60b 5489 *
<> 139:856d2700e60b 5490 * The function operates on a single sample of data and each call to the function returns the processed output.
<> 139:856d2700e60b 5491 * The library provides separate functions for Q31 and floating-point data types.
<> 139:856d2700e60b 5492 * \par Algorithm
<> 139:856d2700e60b 5493 * \image html parkFormula.gif
<> 139:856d2700e60b 5494 * where <code>Ialpha</code> and <code>Ibeta</code> are the stator vector components,
<> 139:856d2700e60b 5495 * <code>pId</code> and <code>pIq</code> are rotor vector components and <code>cosVal</code> and <code>sinVal</code> are the
<> 139:856d2700e60b 5496 * cosine and sine values of theta (rotor flux position).
<> 139:856d2700e60b 5497 * \par Fixed-Point Behavior
<> 139:856d2700e60b 5498 * Care must be taken when using the Q31 version of the Park transform.
<> 139:856d2700e60b 5499 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
<> 139:856d2700e60b 5500 * Refer to the function specific documentation below for usage guidelines.
<> 139:856d2700e60b 5501 */
<> 139:856d2700e60b 5502
<> 139:856d2700e60b 5503 /**
<> 139:856d2700e60b 5504 * @addtogroup park
<> 139:856d2700e60b 5505 * @{
<> 139:856d2700e60b 5506 */
<> 139:856d2700e60b 5507
<> 139:856d2700e60b 5508 /**
<> 139:856d2700e60b 5509 * @brief Floating-point Park transform
<> 139:856d2700e60b 5510 * @param[in] Ialpha input two-phase vector coordinate alpha
<> 139:856d2700e60b 5511 * @param[in] Ibeta input two-phase vector coordinate beta
<> 139:856d2700e60b 5512 * @param[out] *pId points to output rotor reference frame d
<> 139:856d2700e60b 5513 * @param[out] *pIq points to output rotor reference frame q
<> 139:856d2700e60b 5514 * @param[in] sinVal sine value of rotation angle theta
<> 139:856d2700e60b 5515 * @param[in] cosVal cosine value of rotation angle theta
<> 139:856d2700e60b 5516 * @return none.
<> 139:856d2700e60b 5517 *
<> 139:856d2700e60b 5518 * The function implements the forward Park transform.
<> 139:856d2700e60b 5519 *
<> 139:856d2700e60b 5520 */
<> 139:856d2700e60b 5521
<> 139:856d2700e60b 5522 static __INLINE void arm_park_f32(
<> 139:856d2700e60b 5523 float32_t Ialpha,
<> 139:856d2700e60b 5524 float32_t Ibeta,
<> 139:856d2700e60b 5525 float32_t * pId,
<> 139:856d2700e60b 5526 float32_t * pIq,
<> 139:856d2700e60b 5527 float32_t sinVal,
<> 139:856d2700e60b 5528 float32_t cosVal)
<> 139:856d2700e60b 5529 {
<> 139:856d2700e60b 5530 /* Calculate pId using the equation, pId = Ialpha * cosVal + Ibeta * sinVal */
<> 139:856d2700e60b 5531 *pId = Ialpha * cosVal + Ibeta * sinVal;
<> 139:856d2700e60b 5532
<> 139:856d2700e60b 5533 /* Calculate pIq using the equation, pIq = - Ialpha * sinVal + Ibeta * cosVal */
<> 139:856d2700e60b 5534 *pIq = -Ialpha * sinVal + Ibeta * cosVal;
<> 139:856d2700e60b 5535
<> 139:856d2700e60b 5536 }
<> 139:856d2700e60b 5537
<> 139:856d2700e60b 5538 /**
<> 139:856d2700e60b 5539 * @brief Park transform for Q31 version
<> 139:856d2700e60b 5540 * @param[in] Ialpha input two-phase vector coordinate alpha
<> 139:856d2700e60b 5541 * @param[in] Ibeta input two-phase vector coordinate beta
<> 139:856d2700e60b 5542 * @param[out] *pId points to output rotor reference frame d
<> 139:856d2700e60b 5543 * @param[out] *pIq points to output rotor reference frame q
<> 139:856d2700e60b 5544 * @param[in] sinVal sine value of rotation angle theta
<> 139:856d2700e60b 5545 * @param[in] cosVal cosine value of rotation angle theta
<> 139:856d2700e60b 5546 * @return none.
<> 139:856d2700e60b 5547 *
<> 139:856d2700e60b 5548 * <b>Scaling and Overflow Behavior:</b>
<> 139:856d2700e60b 5549 * \par
<> 139:856d2700e60b 5550 * The function is implemented using an internal 32-bit accumulator.
<> 139:856d2700e60b 5551 * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
<> 139:856d2700e60b 5552 * There is saturation on the addition and subtraction, hence there is no risk of overflow.
<> 139:856d2700e60b 5553 */
<> 139:856d2700e60b 5554
<> 139:856d2700e60b 5555
<> 139:856d2700e60b 5556 static __INLINE void arm_park_q31(
<> 139:856d2700e60b 5557 q31_t Ialpha,
<> 139:856d2700e60b 5558 q31_t Ibeta,
<> 139:856d2700e60b 5559 q31_t * pId,
<> 139:856d2700e60b 5560 q31_t * pIq,
<> 139:856d2700e60b 5561 q31_t sinVal,
<> 139:856d2700e60b 5562 q31_t cosVal)
<> 139:856d2700e60b 5563 {
<> 139:856d2700e60b 5564 q31_t product1, product2; /* Temporary variables used to store intermediate results */
<> 139:856d2700e60b 5565 q31_t product3, product4; /* Temporary variables used to store intermediate results */
<> 139:856d2700e60b 5566
<> 139:856d2700e60b 5567 /* Intermediate product is calculated by (Ialpha * cosVal) */
<> 139:856d2700e60b 5568 product1 = (q31_t) (((q63_t) (Ialpha) * (cosVal)) >> 31);
<> 139:856d2700e60b 5569
<> 139:856d2700e60b 5570 /* Intermediate product is calculated by (Ibeta * sinVal) */
<> 139:856d2700e60b 5571 product2 = (q31_t) (((q63_t) (Ibeta) * (sinVal)) >> 31);
<> 139:856d2700e60b 5572
<> 139:856d2700e60b 5573
<> 139:856d2700e60b 5574 /* Intermediate product is calculated by (Ialpha * sinVal) */
<> 139:856d2700e60b 5575 product3 = (q31_t) (((q63_t) (Ialpha) * (sinVal)) >> 31);
<> 139:856d2700e60b 5576
<> 139:856d2700e60b 5577 /* Intermediate product is calculated by (Ibeta * cosVal) */
<> 139:856d2700e60b 5578 product4 = (q31_t) (((q63_t) (Ibeta) * (cosVal)) >> 31);
<> 139:856d2700e60b 5579
<> 139:856d2700e60b 5580 /* Calculate pId by adding the two intermediate products 1 and 2 */
<> 139:856d2700e60b 5581 *pId = __QADD(product1, product2);
<> 139:856d2700e60b 5582
<> 139:856d2700e60b 5583 /* Calculate pIq by subtracting the two intermediate products 3 from 4 */
<> 139:856d2700e60b 5584 *pIq = __QSUB(product4, product3);
<> 139:856d2700e60b 5585 }
<> 139:856d2700e60b 5586
<> 139:856d2700e60b 5587 /**
<> 139:856d2700e60b 5588 * @} end of park group
<> 139:856d2700e60b 5589 */
<> 139:856d2700e60b 5590
<> 139:856d2700e60b 5591 /**
<> 139:856d2700e60b 5592 * @brief Converts the elements of the Q7 vector to floating-point vector.
<> 139:856d2700e60b 5593 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 5594 * @param[out] *pDst is output pointer
<> 139:856d2700e60b 5595 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 5596 * @return none.
<> 139:856d2700e60b 5597 */
<> 139:856d2700e60b 5598 void arm_q7_to_float(
<> 139:856d2700e60b 5599 q7_t * pSrc,
<> 139:856d2700e60b 5600 float32_t * pDst,
<> 139:856d2700e60b 5601 uint32_t blockSize);
<> 139:856d2700e60b 5602
<> 139:856d2700e60b 5603
<> 139:856d2700e60b 5604 /**
<> 139:856d2700e60b 5605 * @ingroup groupController
<> 139:856d2700e60b 5606 */
<> 139:856d2700e60b 5607
<> 139:856d2700e60b 5608 /**
<> 139:856d2700e60b 5609 * @defgroup inv_park Vector Inverse Park transform
<> 139:856d2700e60b 5610 * Inverse Park transform converts the input flux and torque components to two-coordinate vector.
<> 139:856d2700e60b 5611 *
<> 139:856d2700e60b 5612 * The function operates on a single sample of data and each call to the function returns the processed output.
<> 139:856d2700e60b 5613 * The library provides separate functions for Q31 and floating-point data types.
<> 139:856d2700e60b 5614 * \par Algorithm
<> 139:856d2700e60b 5615 * \image html parkInvFormula.gif
<> 139:856d2700e60b 5616 * where <code>pIalpha</code> and <code>pIbeta</code> are the stator vector components,
<> 139:856d2700e60b 5617 * <code>Id</code> and <code>Iq</code> are rotor vector components and <code>cosVal</code> and <code>sinVal</code> are the
<> 139:856d2700e60b 5618 * cosine and sine values of theta (rotor flux position).
<> 139:856d2700e60b 5619 * \par Fixed-Point Behavior
<> 139:856d2700e60b 5620 * Care must be taken when using the Q31 version of the Park transform.
<> 139:856d2700e60b 5621 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
<> 139:856d2700e60b 5622 * Refer to the function specific documentation below for usage guidelines.
<> 139:856d2700e60b 5623 */
<> 139:856d2700e60b 5624
<> 139:856d2700e60b 5625 /**
<> 139:856d2700e60b 5626 * @addtogroup inv_park
<> 139:856d2700e60b 5627 * @{
<> 139:856d2700e60b 5628 */
<> 139:856d2700e60b 5629
<> 139:856d2700e60b 5630 /**
<> 139:856d2700e60b 5631 * @brief Floating-point Inverse Park transform
<> 139:856d2700e60b 5632 * @param[in] Id input coordinate of rotor reference frame d
<> 139:856d2700e60b 5633 * @param[in] Iq input coordinate of rotor reference frame q
<> 139:856d2700e60b 5634 * @param[out] *pIalpha points to output two-phase orthogonal vector axis alpha
<> 139:856d2700e60b 5635 * @param[out] *pIbeta points to output two-phase orthogonal vector axis beta
<> 139:856d2700e60b 5636 * @param[in] sinVal sine value of rotation angle theta
<> 139:856d2700e60b 5637 * @param[in] cosVal cosine value of rotation angle theta
<> 139:856d2700e60b 5638 * @return none.
<> 139:856d2700e60b 5639 */
<> 139:856d2700e60b 5640
<> 139:856d2700e60b 5641 static __INLINE void arm_inv_park_f32(
<> 139:856d2700e60b 5642 float32_t Id,
<> 139:856d2700e60b 5643 float32_t Iq,
<> 139:856d2700e60b 5644 float32_t * pIalpha,
<> 139:856d2700e60b 5645 float32_t * pIbeta,
<> 139:856d2700e60b 5646 float32_t sinVal,
<> 139:856d2700e60b 5647 float32_t cosVal)
<> 139:856d2700e60b 5648 {
<> 139:856d2700e60b 5649 /* Calculate pIalpha using the equation, pIalpha = Id * cosVal - Iq * sinVal */
<> 139:856d2700e60b 5650 *pIalpha = Id * cosVal - Iq * sinVal;
<> 139:856d2700e60b 5651
<> 139:856d2700e60b 5652 /* Calculate pIbeta using the equation, pIbeta = Id * sinVal + Iq * cosVal */
<> 139:856d2700e60b 5653 *pIbeta = Id * sinVal + Iq * cosVal;
<> 139:856d2700e60b 5654
<> 139:856d2700e60b 5655 }
<> 139:856d2700e60b 5656
<> 139:856d2700e60b 5657
<> 139:856d2700e60b 5658 /**
<> 139:856d2700e60b 5659 * @brief Inverse Park transform for Q31 version
<> 139:856d2700e60b 5660 * @param[in] Id input coordinate of rotor reference frame d
<> 139:856d2700e60b 5661 * @param[in] Iq input coordinate of rotor reference frame q
<> 139:856d2700e60b 5662 * @param[out] *pIalpha points to output two-phase orthogonal vector axis alpha
<> 139:856d2700e60b 5663 * @param[out] *pIbeta points to output two-phase orthogonal vector axis beta
<> 139:856d2700e60b 5664 * @param[in] sinVal sine value of rotation angle theta
<> 139:856d2700e60b 5665 * @param[in] cosVal cosine value of rotation angle theta
<> 139:856d2700e60b 5666 * @return none.
<> 139:856d2700e60b 5667 *
<> 139:856d2700e60b 5668 * <b>Scaling and Overflow Behavior:</b>
<> 139:856d2700e60b 5669 * \par
<> 139:856d2700e60b 5670 * The function is implemented using an internal 32-bit accumulator.
<> 139:856d2700e60b 5671 * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
<> 139:856d2700e60b 5672 * There is saturation on the addition, hence there is no risk of overflow.
<> 139:856d2700e60b 5673 */
<> 139:856d2700e60b 5674
<> 139:856d2700e60b 5675
<> 139:856d2700e60b 5676 static __INLINE void arm_inv_park_q31(
<> 139:856d2700e60b 5677 q31_t Id,
<> 139:856d2700e60b 5678 q31_t Iq,
<> 139:856d2700e60b 5679 q31_t * pIalpha,
<> 139:856d2700e60b 5680 q31_t * pIbeta,
<> 139:856d2700e60b 5681 q31_t sinVal,
<> 139:856d2700e60b 5682 q31_t cosVal)
<> 139:856d2700e60b 5683 {
<> 139:856d2700e60b 5684 q31_t product1, product2; /* Temporary variables used to store intermediate results */
<> 139:856d2700e60b 5685 q31_t product3, product4; /* Temporary variables used to store intermediate results */
<> 139:856d2700e60b 5686
<> 139:856d2700e60b 5687 /* Intermediate product is calculated by (Id * cosVal) */
<> 139:856d2700e60b 5688 product1 = (q31_t) (((q63_t) (Id) * (cosVal)) >> 31);
<> 139:856d2700e60b 5689
<> 139:856d2700e60b 5690 /* Intermediate product is calculated by (Iq * sinVal) */
<> 139:856d2700e60b 5691 product2 = (q31_t) (((q63_t) (Iq) * (sinVal)) >> 31);
<> 139:856d2700e60b 5692
<> 139:856d2700e60b 5693
<> 139:856d2700e60b 5694 /* Intermediate product is calculated by (Id * sinVal) */
<> 139:856d2700e60b 5695 product3 = (q31_t) (((q63_t) (Id) * (sinVal)) >> 31);
<> 139:856d2700e60b 5696
<> 139:856d2700e60b 5697 /* Intermediate product is calculated by (Iq * cosVal) */
<> 139:856d2700e60b 5698 product4 = (q31_t) (((q63_t) (Iq) * (cosVal)) >> 31);
<> 139:856d2700e60b 5699
<> 139:856d2700e60b 5700 /* Calculate pIalpha by using the two intermediate products 1 and 2 */
<> 139:856d2700e60b 5701 *pIalpha = __QSUB(product1, product2);
<> 139:856d2700e60b 5702
<> 139:856d2700e60b 5703 /* Calculate pIbeta by using the two intermediate products 3 and 4 */
<> 139:856d2700e60b 5704 *pIbeta = __QADD(product4, product3);
<> 139:856d2700e60b 5705
<> 139:856d2700e60b 5706 }
<> 139:856d2700e60b 5707
<> 139:856d2700e60b 5708 /**
<> 139:856d2700e60b 5709 * @} end of Inverse park group
<> 139:856d2700e60b 5710 */
<> 139:856d2700e60b 5711
<> 139:856d2700e60b 5712
<> 139:856d2700e60b 5713 /**
<> 139:856d2700e60b 5714 * @brief Converts the elements of the Q31 vector to floating-point vector.
<> 139:856d2700e60b 5715 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 5716 * @param[out] *pDst is output pointer
<> 139:856d2700e60b 5717 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 5718 * @return none.
<> 139:856d2700e60b 5719 */
<> 139:856d2700e60b 5720 void arm_q31_to_float(
<> 139:856d2700e60b 5721 q31_t * pSrc,
<> 139:856d2700e60b 5722 float32_t * pDst,
<> 139:856d2700e60b 5723 uint32_t blockSize);
<> 139:856d2700e60b 5724
<> 139:856d2700e60b 5725 /**
<> 139:856d2700e60b 5726 * @ingroup groupInterpolation
<> 139:856d2700e60b 5727 */
<> 139:856d2700e60b 5728
<> 139:856d2700e60b 5729 /**
<> 139:856d2700e60b 5730 * @defgroup LinearInterpolate Linear Interpolation
<> 139:856d2700e60b 5731 *
<> 139:856d2700e60b 5732 * Linear interpolation is a method of curve fitting using linear polynomials.
<> 139:856d2700e60b 5733 * Linear interpolation works by effectively drawing a straight line between two neighboring samples and returning the appropriate point along that line
<> 139:856d2700e60b 5734 *
<> 139:856d2700e60b 5735 * \par
<> 139:856d2700e60b 5736 * \image html LinearInterp.gif "Linear interpolation"
<> 139:856d2700e60b 5737 *
<> 139:856d2700e60b 5738 * \par
<> 139:856d2700e60b 5739 * A Linear Interpolate function calculates an output value(y), for the input(x)
<> 139:856d2700e60b 5740 * using linear interpolation of the input values x0, x1( nearest input values) and the output values y0 and y1(nearest output values)
<> 139:856d2700e60b 5741 *
<> 139:856d2700e60b 5742 * \par Algorithm:
<> 139:856d2700e60b 5743 * <pre>
<> 139:856d2700e60b 5744 * y = y0 + (x - x0) * ((y1 - y0)/(x1-x0))
<> 139:856d2700e60b 5745 * where x0, x1 are nearest values of input x
<> 139:856d2700e60b 5746 * y0, y1 are nearest values to output y
<> 139:856d2700e60b 5747 * </pre>
<> 139:856d2700e60b 5748 *
<> 139:856d2700e60b 5749 * \par
<> 139:856d2700e60b 5750 * This set of functions implements Linear interpolation process
<> 139:856d2700e60b 5751 * for Q7, Q15, Q31, and floating-point data types. The functions operate on a single
<> 139:856d2700e60b 5752 * sample of data and each call to the function returns a single processed value.
<> 139:856d2700e60b 5753 * <code>S</code> points to an instance of the Linear Interpolate function data structure.
<> 139:856d2700e60b 5754 * <code>x</code> is the input sample value. The functions returns the output value.
<> 139:856d2700e60b 5755 *
<> 139:856d2700e60b 5756 * \par
<> 139:856d2700e60b 5757 * if x is outside of the table boundary, Linear interpolation returns first value of the table
<> 139:856d2700e60b 5758 * if x is below input range and returns last value of table if x is above range.
<> 139:856d2700e60b 5759 */
<> 139:856d2700e60b 5760
<> 139:856d2700e60b 5761 /**
<> 139:856d2700e60b 5762 * @addtogroup LinearInterpolate
<> 139:856d2700e60b 5763 * @{
<> 139:856d2700e60b 5764 */
<> 139:856d2700e60b 5765
<> 139:856d2700e60b 5766 /**
<> 139:856d2700e60b 5767 * @brief Process function for the floating-point Linear Interpolation Function.
<> 139:856d2700e60b 5768 * @param[in,out] *S is an instance of the floating-point Linear Interpolation structure
<> 139:856d2700e60b 5769 * @param[in] x input sample to process
<> 139:856d2700e60b 5770 * @return y processed output sample.
<> 139:856d2700e60b 5771 *
<> 139:856d2700e60b 5772 */
<> 139:856d2700e60b 5773
<> 139:856d2700e60b 5774 static __INLINE float32_t arm_linear_interp_f32(
<> 139:856d2700e60b 5775 arm_linear_interp_instance_f32 * S,
<> 139:856d2700e60b 5776 float32_t x)
<> 139:856d2700e60b 5777 {
<> 139:856d2700e60b 5778
<> 139:856d2700e60b 5779 float32_t y;
<> 139:856d2700e60b 5780 float32_t x0, x1; /* Nearest input values */
<> 139:856d2700e60b 5781 float32_t y0, y1; /* Nearest output values */
<> 139:856d2700e60b 5782 float32_t xSpacing = S->xSpacing; /* spacing between input values */
<> 139:856d2700e60b 5783 int32_t i; /* Index variable */
<> 139:856d2700e60b 5784 float32_t *pYData = S->pYData; /* pointer to output table */
<> 139:856d2700e60b 5785
<> 139:856d2700e60b 5786 /* Calculation of index */
<> 139:856d2700e60b 5787 i = (int32_t) ((x - S->x1) / xSpacing);
<> 139:856d2700e60b 5788
<> 139:856d2700e60b 5789 if(i < 0)
<> 139:856d2700e60b 5790 {
<> 139:856d2700e60b 5791 /* Iniatilize output for below specified range as least output value of table */
<> 139:856d2700e60b 5792 y = pYData[0];
<> 139:856d2700e60b 5793 }
<> 139:856d2700e60b 5794 else if((uint32_t)i >= S->nValues)
<> 139:856d2700e60b 5795 {
<> 139:856d2700e60b 5796 /* Iniatilize output for above specified range as last output value of table */
<> 139:856d2700e60b 5797 y = pYData[S->nValues - 1];
<> 139:856d2700e60b 5798 }
<> 139:856d2700e60b 5799 else
<> 139:856d2700e60b 5800 {
<> 139:856d2700e60b 5801 /* Calculation of nearest input values */
<> 139:856d2700e60b 5802 x0 = S->x1 + i * xSpacing;
<> 139:856d2700e60b 5803 x1 = S->x1 + (i + 1) * xSpacing;
<> 139:856d2700e60b 5804
<> 139:856d2700e60b 5805 /* Read of nearest output values */
<> 139:856d2700e60b 5806 y0 = pYData[i];
<> 139:856d2700e60b 5807 y1 = pYData[i + 1];
<> 139:856d2700e60b 5808
<> 139:856d2700e60b 5809 /* Calculation of output */
<> 139:856d2700e60b 5810 y = y0 + (x - x0) * ((y1 - y0) / (x1 - x0));
<> 139:856d2700e60b 5811
<> 139:856d2700e60b 5812 }
<> 139:856d2700e60b 5813
<> 139:856d2700e60b 5814 /* returns output value */
<> 139:856d2700e60b 5815 return (y);
<> 139:856d2700e60b 5816 }
<> 139:856d2700e60b 5817
<> 139:856d2700e60b 5818 /**
<> 139:856d2700e60b 5819 *
<> 139:856d2700e60b 5820 * @brief Process function for the Q31 Linear Interpolation Function.
<> 139:856d2700e60b 5821 * @param[in] *pYData pointer to Q31 Linear Interpolation table
<> 139:856d2700e60b 5822 * @param[in] x input sample to process
<> 139:856d2700e60b 5823 * @param[in] nValues number of table values
<> 139:856d2700e60b 5824 * @return y processed output sample.
<> 139:856d2700e60b 5825 *
<> 139:856d2700e60b 5826 * \par
<> 139:856d2700e60b 5827 * Input sample <code>x</code> is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part.
<> 139:856d2700e60b 5828 * This function can support maximum of table size 2^12.
<> 139:856d2700e60b 5829 *
<> 139:856d2700e60b 5830 */
<> 139:856d2700e60b 5831
<> 139:856d2700e60b 5832
<> 139:856d2700e60b 5833 static __INLINE q31_t arm_linear_interp_q31(
<> 139:856d2700e60b 5834 q31_t * pYData,
<> 139:856d2700e60b 5835 q31_t x,
<> 139:856d2700e60b 5836 uint32_t nValues)
<> 139:856d2700e60b 5837 {
<> 139:856d2700e60b 5838 q31_t y; /* output */
<> 139:856d2700e60b 5839 q31_t y0, y1; /* Nearest output values */
<> 139:856d2700e60b 5840 q31_t fract; /* fractional part */
<> 139:856d2700e60b 5841 int32_t index; /* Index to read nearest output values */
<> 139:856d2700e60b 5842
<> 139:856d2700e60b 5843 /* Input is in 12.20 format */
<> 139:856d2700e60b 5844 /* 12 bits for the table index */
<> 139:856d2700e60b 5845 /* Index value calculation */
<> 139:856d2700e60b 5846 index = ((x & 0xFFF00000) >> 20);
<> 139:856d2700e60b 5847
<> 139:856d2700e60b 5848 if(index >= (int32_t)(nValues - 1))
<> 139:856d2700e60b 5849 {
<> 139:856d2700e60b 5850 return (pYData[nValues - 1]);
<> 139:856d2700e60b 5851 }
<> 139:856d2700e60b 5852 else if(index < 0)
<> 139:856d2700e60b 5853 {
<> 139:856d2700e60b 5854 return (pYData[0]);
<> 139:856d2700e60b 5855 }
<> 139:856d2700e60b 5856 else
<> 139:856d2700e60b 5857 {
<> 139:856d2700e60b 5858
<> 139:856d2700e60b 5859 /* 20 bits for the fractional part */
<> 139:856d2700e60b 5860 /* shift left by 11 to keep fract in 1.31 format */
<> 139:856d2700e60b 5861 fract = (x & 0x000FFFFF) << 11;
<> 139:856d2700e60b 5862
<> 139:856d2700e60b 5863 /* Read two nearest output values from the index in 1.31(q31) format */
<> 139:856d2700e60b 5864 y0 = pYData[index];
<> 139:856d2700e60b 5865 y1 = pYData[index + 1u];
<> 139:856d2700e60b 5866
<> 139:856d2700e60b 5867 /* Calculation of y0 * (1-fract) and y is in 2.30 format */
<> 139:856d2700e60b 5868 y = ((q31_t) ((q63_t) y0 * (0x7FFFFFFF - fract) >> 32));
<> 139:856d2700e60b 5869
<> 139:856d2700e60b 5870 /* Calculation of y0 * (1-fract) + y1 *fract and y is in 2.30 format */
<> 139:856d2700e60b 5871 y += ((q31_t) (((q63_t) y1 * fract) >> 32));
<> 139:856d2700e60b 5872
<> 139:856d2700e60b 5873 /* Convert y to 1.31 format */
<> 139:856d2700e60b 5874 return (y << 1u);
<> 139:856d2700e60b 5875
<> 139:856d2700e60b 5876 }
<> 139:856d2700e60b 5877
<> 139:856d2700e60b 5878 }
<> 139:856d2700e60b 5879
<> 139:856d2700e60b 5880 /**
<> 139:856d2700e60b 5881 *
<> 139:856d2700e60b 5882 * @brief Process function for the Q15 Linear Interpolation Function.
<> 139:856d2700e60b 5883 * @param[in] *pYData pointer to Q15 Linear Interpolation table
<> 139:856d2700e60b 5884 * @param[in] x input sample to process
<> 139:856d2700e60b 5885 * @param[in] nValues number of table values
<> 139:856d2700e60b 5886 * @return y processed output sample.
<> 139:856d2700e60b 5887 *
<> 139:856d2700e60b 5888 * \par
<> 139:856d2700e60b 5889 * Input sample <code>x</code> is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part.
<> 139:856d2700e60b 5890 * This function can support maximum of table size 2^12.
<> 139:856d2700e60b 5891 *
<> 139:856d2700e60b 5892 */
<> 139:856d2700e60b 5893
<> 139:856d2700e60b 5894
<> 139:856d2700e60b 5895 static __INLINE q15_t arm_linear_interp_q15(
<> 139:856d2700e60b 5896 q15_t * pYData,
<> 139:856d2700e60b 5897 q31_t x,
<> 139:856d2700e60b 5898 uint32_t nValues)
<> 139:856d2700e60b 5899 {
<> 139:856d2700e60b 5900 q63_t y; /* output */
<> 139:856d2700e60b 5901 q15_t y0, y1; /* Nearest output values */
<> 139:856d2700e60b 5902 q31_t fract; /* fractional part */
<> 139:856d2700e60b 5903 int32_t index; /* Index to read nearest output values */
<> 139:856d2700e60b 5904
<> 139:856d2700e60b 5905 /* Input is in 12.20 format */
<> 139:856d2700e60b 5906 /* 12 bits for the table index */
<> 139:856d2700e60b 5907 /* Index value calculation */
<> 139:856d2700e60b 5908 index = ((x & 0xFFF00000) >> 20u);
<> 139:856d2700e60b 5909
<> 139:856d2700e60b 5910 if(index >= (int32_t)(nValues - 1))
<> 139:856d2700e60b 5911 {
<> 139:856d2700e60b 5912 return (pYData[nValues - 1]);
<> 139:856d2700e60b 5913 }
<> 139:856d2700e60b 5914 else if(index < 0)
<> 139:856d2700e60b 5915 {
<> 139:856d2700e60b 5916 return (pYData[0]);
<> 139:856d2700e60b 5917 }
<> 139:856d2700e60b 5918 else
<> 139:856d2700e60b 5919 {
<> 139:856d2700e60b 5920 /* 20 bits for the fractional part */
<> 139:856d2700e60b 5921 /* fract is in 12.20 format */
<> 139:856d2700e60b 5922 fract = (x & 0x000FFFFF);
<> 139:856d2700e60b 5923
<> 139:856d2700e60b 5924 /* Read two nearest output values from the index */
<> 139:856d2700e60b 5925 y0 = pYData[index];
<> 139:856d2700e60b 5926 y1 = pYData[index + 1u];
<> 139:856d2700e60b 5927
<> 139:856d2700e60b 5928 /* Calculation of y0 * (1-fract) and y is in 13.35 format */
<> 139:856d2700e60b 5929 y = ((q63_t) y0 * (0xFFFFF - fract));
<> 139:856d2700e60b 5930
<> 139:856d2700e60b 5931 /* Calculation of (y0 * (1-fract) + y1 * fract) and y is in 13.35 format */
<> 139:856d2700e60b 5932 y += ((q63_t) y1 * (fract));
<> 139:856d2700e60b 5933
<> 139:856d2700e60b 5934 /* convert y to 1.15 format */
<> 139:856d2700e60b 5935 return (y >> 20);
<> 139:856d2700e60b 5936 }
<> 139:856d2700e60b 5937
<> 139:856d2700e60b 5938
<> 139:856d2700e60b 5939 }
<> 139:856d2700e60b 5940
<> 139:856d2700e60b 5941 /**
<> 139:856d2700e60b 5942 *
<> 139:856d2700e60b 5943 * @brief Process function for the Q7 Linear Interpolation Function.
<> 139:856d2700e60b 5944 * @param[in] *pYData pointer to Q7 Linear Interpolation table
<> 139:856d2700e60b 5945 * @param[in] x input sample to process
<> 139:856d2700e60b 5946 * @param[in] nValues number of table values
<> 139:856d2700e60b 5947 * @return y processed output sample.
<> 139:856d2700e60b 5948 *
<> 139:856d2700e60b 5949 * \par
<> 139:856d2700e60b 5950 * Input sample <code>x</code> is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part.
<> 139:856d2700e60b 5951 * This function can support maximum of table size 2^12.
<> 139:856d2700e60b 5952 */
<> 139:856d2700e60b 5953
<> 139:856d2700e60b 5954
<> 139:856d2700e60b 5955 static __INLINE q7_t arm_linear_interp_q7(
<> 139:856d2700e60b 5956 q7_t * pYData,
<> 139:856d2700e60b 5957 q31_t x,
<> 139:856d2700e60b 5958 uint32_t nValues)
<> 139:856d2700e60b 5959 {
<> 139:856d2700e60b 5960 q31_t y; /* output */
<> 139:856d2700e60b 5961 q7_t y0, y1; /* Nearest output values */
<> 139:856d2700e60b 5962 q31_t fract; /* fractional part */
<> 139:856d2700e60b 5963 uint32_t index; /* Index to read nearest output values */
<> 139:856d2700e60b 5964
<> 139:856d2700e60b 5965 /* Input is in 12.20 format */
<> 139:856d2700e60b 5966 /* 12 bits for the table index */
<> 139:856d2700e60b 5967 /* Index value calculation */
<> 139:856d2700e60b 5968 if (x < 0)
<> 139:856d2700e60b 5969 {
<> 139:856d2700e60b 5970 return (pYData[0]);
<> 139:856d2700e60b 5971 }
<> 139:856d2700e60b 5972 index = (x >> 20) & 0xfff;
<> 139:856d2700e60b 5973
<> 139:856d2700e60b 5974
<> 139:856d2700e60b 5975 if(index >= (nValues - 1))
<> 139:856d2700e60b 5976 {
<> 139:856d2700e60b 5977 return (pYData[nValues - 1]);
<> 139:856d2700e60b 5978 }
<> 139:856d2700e60b 5979 else
<> 139:856d2700e60b 5980 {
<> 139:856d2700e60b 5981
<> 139:856d2700e60b 5982 /* 20 bits for the fractional part */
<> 139:856d2700e60b 5983 /* fract is in 12.20 format */
<> 139:856d2700e60b 5984 fract = (x & 0x000FFFFF);
<> 139:856d2700e60b 5985
<> 139:856d2700e60b 5986 /* Read two nearest output values from the index and are in 1.7(q7) format */
<> 139:856d2700e60b 5987 y0 = pYData[index];
<> 139:856d2700e60b 5988 y1 = pYData[index + 1u];
<> 139:856d2700e60b 5989
<> 139:856d2700e60b 5990 /* Calculation of y0 * (1-fract ) and y is in 13.27(q27) format */
<> 139:856d2700e60b 5991 y = ((y0 * (0xFFFFF - fract)));
<> 139:856d2700e60b 5992
<> 139:856d2700e60b 5993 /* Calculation of y1 * fract + y0 * (1-fract) and y is in 13.27(q27) format */
<> 139:856d2700e60b 5994 y += (y1 * fract);
<> 139:856d2700e60b 5995
<> 139:856d2700e60b 5996 /* convert y to 1.7(q7) format */
<> 139:856d2700e60b 5997 return (y >> 20u);
<> 139:856d2700e60b 5998
<> 139:856d2700e60b 5999 }
<> 139:856d2700e60b 6000
<> 139:856d2700e60b 6001 }
<> 139:856d2700e60b 6002 /**
<> 139:856d2700e60b 6003 * @} end of LinearInterpolate group
<> 139:856d2700e60b 6004 */
<> 139:856d2700e60b 6005
<> 139:856d2700e60b 6006 /**
<> 139:856d2700e60b 6007 * @brief Fast approximation to the trigonometric sine function for floating-point data.
<> 139:856d2700e60b 6008 * @param[in] x input value in radians.
<> 139:856d2700e60b 6009 * @return sin(x).
<> 139:856d2700e60b 6010 */
<> 139:856d2700e60b 6011
<> 139:856d2700e60b 6012 float32_t arm_sin_f32(
<> 139:856d2700e60b 6013 float32_t x);
<> 139:856d2700e60b 6014
<> 139:856d2700e60b 6015 /**
<> 139:856d2700e60b 6016 * @brief Fast approximation to the trigonometric sine function for Q31 data.
<> 139:856d2700e60b 6017 * @param[in] x Scaled input value in radians.
<> 139:856d2700e60b 6018 * @return sin(x).
<> 139:856d2700e60b 6019 */
<> 139:856d2700e60b 6020
<> 139:856d2700e60b 6021 q31_t arm_sin_q31(
<> 139:856d2700e60b 6022 q31_t x);
<> 139:856d2700e60b 6023
<> 139:856d2700e60b 6024 /**
<> 139:856d2700e60b 6025 * @brief Fast approximation to the trigonometric sine function for Q15 data.
<> 139:856d2700e60b 6026 * @param[in] x Scaled input value in radians.
<> 139:856d2700e60b 6027 * @return sin(x).
<> 139:856d2700e60b 6028 */
<> 139:856d2700e60b 6029
<> 139:856d2700e60b 6030 q15_t arm_sin_q15(
<> 139:856d2700e60b 6031 q15_t x);
<> 139:856d2700e60b 6032
<> 139:856d2700e60b 6033 /**
<> 139:856d2700e60b 6034 * @brief Fast approximation to the trigonometric cosine function for floating-point data.
<> 139:856d2700e60b 6035 * @param[in] x input value in radians.
<> 139:856d2700e60b 6036 * @return cos(x).
<> 139:856d2700e60b 6037 */
<> 139:856d2700e60b 6038
<> 139:856d2700e60b 6039 float32_t arm_cos_f32(
<> 139:856d2700e60b 6040 float32_t x);
<> 139:856d2700e60b 6041
<> 139:856d2700e60b 6042 /**
<> 139:856d2700e60b 6043 * @brief Fast approximation to the trigonometric cosine function for Q31 data.
<> 139:856d2700e60b 6044 * @param[in] x Scaled input value in radians.
<> 139:856d2700e60b 6045 * @return cos(x).
<> 139:856d2700e60b 6046 */
<> 139:856d2700e60b 6047
<> 139:856d2700e60b 6048 q31_t arm_cos_q31(
<> 139:856d2700e60b 6049 q31_t x);
<> 139:856d2700e60b 6050
<> 139:856d2700e60b 6051 /**
<> 139:856d2700e60b 6052 * @brief Fast approximation to the trigonometric cosine function for Q15 data.
<> 139:856d2700e60b 6053 * @param[in] x Scaled input value in radians.
<> 139:856d2700e60b 6054 * @return cos(x).
<> 139:856d2700e60b 6055 */
<> 139:856d2700e60b 6056
<> 139:856d2700e60b 6057 q15_t arm_cos_q15(
<> 139:856d2700e60b 6058 q15_t x);
<> 139:856d2700e60b 6059
<> 139:856d2700e60b 6060
<> 139:856d2700e60b 6061 /**
<> 139:856d2700e60b 6062 * @ingroup groupFastMath
<> 139:856d2700e60b 6063 */
<> 139:856d2700e60b 6064
<> 139:856d2700e60b 6065
<> 139:856d2700e60b 6066 /**
<> 139:856d2700e60b 6067 * @defgroup SQRT Square Root
<> 139:856d2700e60b 6068 *
<> 139:856d2700e60b 6069 * Computes the square root of a number.
<> 139:856d2700e60b 6070 * There are separate functions for Q15, Q31, and floating-point data types.
<> 139:856d2700e60b 6071 * The square root function is computed using the Newton-Raphson algorithm.
<> 139:856d2700e60b 6072 * This is an iterative algorithm of the form:
<> 139:856d2700e60b 6073 * <pre>
<> 139:856d2700e60b 6074 * x1 = x0 - f(x0)/f'(x0)
<> 139:856d2700e60b 6075 * </pre>
<> 139:856d2700e60b 6076 * where <code>x1</code> is the current estimate,
<> 139:856d2700e60b 6077 * <code>x0</code> is the previous estimate, and
<> 139:856d2700e60b 6078 * <code>f'(x0)</code> is the derivative of <code>f()</code> evaluated at <code>x0</code>.
<> 139:856d2700e60b 6079 * For the square root function, the algorithm reduces to:
<> 139:856d2700e60b 6080 * <pre>
<> 139:856d2700e60b 6081 * x0 = in/2 [initial guess]
<> 139:856d2700e60b 6082 * x1 = 1/2 * ( x0 + in / x0) [each iteration]
<> 139:856d2700e60b 6083 * </pre>
<> 139:856d2700e60b 6084 */
<> 139:856d2700e60b 6085
<> 139:856d2700e60b 6086
<> 139:856d2700e60b 6087 /**
<> 139:856d2700e60b 6088 * @addtogroup SQRT
<> 139:856d2700e60b 6089 * @{
<> 139:856d2700e60b 6090 */
<> 139:856d2700e60b 6091
<> 139:856d2700e60b 6092 /**
<> 139:856d2700e60b 6093 * @brief Floating-point square root function.
<> 139:856d2700e60b 6094 * @param[in] in input value.
<> 139:856d2700e60b 6095 * @param[out] *pOut square root of input value.
<> 139:856d2700e60b 6096 * @return The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUMENT_ERROR if
<> 139:856d2700e60b 6097 * <code>in</code> is negative value and returns zero output for negative values.
<> 139:856d2700e60b 6098 */
<> 139:856d2700e60b 6099
<> 139:856d2700e60b 6100 static __INLINE arm_status arm_sqrt_f32(
<> 139:856d2700e60b 6101 float32_t in,
<> 139:856d2700e60b 6102 float32_t * pOut)
<> 139:856d2700e60b 6103 {
<> 139:856d2700e60b 6104 if(in >= 0.0f)
<> 139:856d2700e60b 6105 {
<> 139:856d2700e60b 6106
<> 139:856d2700e60b 6107 // #if __FPU_USED
<> 139:856d2700e60b 6108 #if (__FPU_USED == 1) && defined ( __CC_ARM )
<> 139:856d2700e60b 6109 *pOut = __sqrtf(in);
<> 139:856d2700e60b 6110 #else
<> 139:856d2700e60b 6111 *pOut = sqrtf(in);
<> 139:856d2700e60b 6112 #endif
<> 139:856d2700e60b 6113
<> 139:856d2700e60b 6114 return (ARM_MATH_SUCCESS);
<> 139:856d2700e60b 6115 }
<> 139:856d2700e60b 6116 else
<> 139:856d2700e60b 6117 {
<> 139:856d2700e60b 6118 *pOut = 0.0f;
<> 139:856d2700e60b 6119 return (ARM_MATH_ARGUMENT_ERROR);
<> 139:856d2700e60b 6120 }
<> 139:856d2700e60b 6121
<> 139:856d2700e60b 6122 }
<> 139:856d2700e60b 6123
<> 139:856d2700e60b 6124
<> 139:856d2700e60b 6125 /**
<> 139:856d2700e60b 6126 * @brief Q31 square root function.
<> 139:856d2700e60b 6127 * @param[in] in input value. The range of the input value is [0 +1) or 0x00000000 to 0x7FFFFFFF.
<> 139:856d2700e60b 6128 * @param[out] *pOut square root of input value.
<> 139:856d2700e60b 6129 * @return The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUMENT_ERROR if
<> 139:856d2700e60b 6130 * <code>in</code> is negative value and returns zero output for negative values.
<> 139:856d2700e60b 6131 */
<> 139:856d2700e60b 6132 arm_status arm_sqrt_q31(
<> 139:856d2700e60b 6133 q31_t in,
<> 139:856d2700e60b 6134 q31_t * pOut);
<> 139:856d2700e60b 6135
<> 139:856d2700e60b 6136 /**
<> 139:856d2700e60b 6137 * @brief Q15 square root function.
<> 139:856d2700e60b 6138 * @param[in] in input value. The range of the input value is [0 +1) or 0x0000 to 0x7FFF.
<> 139:856d2700e60b 6139 * @param[out] *pOut square root of input value.
<> 139:856d2700e60b 6140 * @return The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUMENT_ERROR if
<> 139:856d2700e60b 6141 * <code>in</code> is negative value and returns zero output for negative values.
<> 139:856d2700e60b 6142 */
<> 139:856d2700e60b 6143 arm_status arm_sqrt_q15(
<> 139:856d2700e60b 6144 q15_t in,
<> 139:856d2700e60b 6145 q15_t * pOut);
<> 139:856d2700e60b 6146
<> 139:856d2700e60b 6147 /**
<> 139:856d2700e60b 6148 * @} end of SQRT group
<> 139:856d2700e60b 6149 */
<> 139:856d2700e60b 6150
<> 139:856d2700e60b 6151
<> 139:856d2700e60b 6152
<> 139:856d2700e60b 6153
<> 139:856d2700e60b 6154
<> 139:856d2700e60b 6155
<> 139:856d2700e60b 6156 /**
<> 139:856d2700e60b 6157 * @brief floating-point Circular write function.
<> 139:856d2700e60b 6158 */
<> 139:856d2700e60b 6159
<> 139:856d2700e60b 6160 static __INLINE void arm_circularWrite_f32(
<> 139:856d2700e60b 6161 int32_t * circBuffer,
<> 139:856d2700e60b 6162 int32_t L,
<> 139:856d2700e60b 6163 uint16_t * writeOffset,
<> 139:856d2700e60b 6164 int32_t bufferInc,
<> 139:856d2700e60b 6165 const int32_t * src,
<> 139:856d2700e60b 6166 int32_t srcInc,
<> 139:856d2700e60b 6167 uint32_t blockSize)
<> 139:856d2700e60b 6168 {
<> 139:856d2700e60b 6169 uint32_t i = 0u;
<> 139:856d2700e60b 6170 int32_t wOffset;
<> 139:856d2700e60b 6171
<> 139:856d2700e60b 6172 /* Copy the value of Index pointer that points
<> 139:856d2700e60b 6173 * to the current location where the input samples to be copied */
<> 139:856d2700e60b 6174 wOffset = *writeOffset;
<> 139:856d2700e60b 6175
<> 139:856d2700e60b 6176 /* Loop over the blockSize */
<> 139:856d2700e60b 6177 i = blockSize;
<> 139:856d2700e60b 6178
<> 139:856d2700e60b 6179 while(i > 0u)
<> 139:856d2700e60b 6180 {
<> 139:856d2700e60b 6181 /* copy the input sample to the circular buffer */
<> 139:856d2700e60b 6182 circBuffer[wOffset] = *src;
<> 139:856d2700e60b 6183
<> 139:856d2700e60b 6184 /* Update the input pointer */
<> 139:856d2700e60b 6185 src += srcInc;
<> 139:856d2700e60b 6186
<> 139:856d2700e60b 6187 /* Circularly update wOffset. Watch out for positive and negative value */
<> 139:856d2700e60b 6188 wOffset += bufferInc;
<> 139:856d2700e60b 6189 if(wOffset >= L)
<> 139:856d2700e60b 6190 wOffset -= L;
<> 139:856d2700e60b 6191
<> 139:856d2700e60b 6192 /* Decrement the loop counter */
<> 139:856d2700e60b 6193 i--;
<> 139:856d2700e60b 6194 }
<> 139:856d2700e60b 6195
<> 139:856d2700e60b 6196 /* Update the index pointer */
<> 139:856d2700e60b 6197 *writeOffset = wOffset;
<> 139:856d2700e60b 6198 }
<> 139:856d2700e60b 6199
<> 139:856d2700e60b 6200
<> 139:856d2700e60b 6201
<> 139:856d2700e60b 6202 /**
<> 139:856d2700e60b 6203 * @brief floating-point Circular Read function.
<> 139:856d2700e60b 6204 */
<> 139:856d2700e60b 6205 static __INLINE void arm_circularRead_f32(
<> 139:856d2700e60b 6206 int32_t * circBuffer,
<> 139:856d2700e60b 6207 int32_t L,
<> 139:856d2700e60b 6208 int32_t * readOffset,
<> 139:856d2700e60b 6209 int32_t bufferInc,
<> 139:856d2700e60b 6210 int32_t * dst,
<> 139:856d2700e60b 6211 int32_t * dst_base,
<> 139:856d2700e60b 6212 int32_t dst_length,
<> 139:856d2700e60b 6213 int32_t dstInc,
<> 139:856d2700e60b 6214 uint32_t blockSize)
<> 139:856d2700e60b 6215 {
<> 139:856d2700e60b 6216 uint32_t i = 0u;
<> 139:856d2700e60b 6217 int32_t rOffset, dst_end;
<> 139:856d2700e60b 6218
<> 139:856d2700e60b 6219 /* Copy the value of Index pointer that points
<> 139:856d2700e60b 6220 * to the current location from where the input samples to be read */
<> 139:856d2700e60b 6221 rOffset = *readOffset;
<> 139:856d2700e60b 6222 dst_end = (int32_t) (dst_base + dst_length);
<> 139:856d2700e60b 6223
<> 139:856d2700e60b 6224 /* Loop over the blockSize */
<> 139:856d2700e60b 6225 i = blockSize;
<> 139:856d2700e60b 6226
<> 139:856d2700e60b 6227 while(i > 0u)
<> 139:856d2700e60b 6228 {
<> 139:856d2700e60b 6229 /* copy the sample from the circular buffer to the destination buffer */
<> 139:856d2700e60b 6230 *dst = circBuffer[rOffset];
<> 139:856d2700e60b 6231
<> 139:856d2700e60b 6232 /* Update the input pointer */
<> 139:856d2700e60b 6233 dst += dstInc;
<> 139:856d2700e60b 6234
<> 139:856d2700e60b 6235 if(dst == (int32_t *) dst_end)
<> 139:856d2700e60b 6236 {
<> 139:856d2700e60b 6237 dst = dst_base;
<> 139:856d2700e60b 6238 }
<> 139:856d2700e60b 6239
<> 139:856d2700e60b 6240 /* Circularly update rOffset. Watch out for positive and negative value */
<> 139:856d2700e60b 6241 rOffset += bufferInc;
<> 139:856d2700e60b 6242
<> 139:856d2700e60b 6243 if(rOffset >= L)
<> 139:856d2700e60b 6244 {
<> 139:856d2700e60b 6245 rOffset -= L;
<> 139:856d2700e60b 6246 }
<> 139:856d2700e60b 6247
<> 139:856d2700e60b 6248 /* Decrement the loop counter */
<> 139:856d2700e60b 6249 i--;
<> 139:856d2700e60b 6250 }
<> 139:856d2700e60b 6251
<> 139:856d2700e60b 6252 /* Update the index pointer */
<> 139:856d2700e60b 6253 *readOffset = rOffset;
<> 139:856d2700e60b 6254 }
<> 139:856d2700e60b 6255
<> 139:856d2700e60b 6256 /**
<> 139:856d2700e60b 6257 * @brief Q15 Circular write function.
<> 139:856d2700e60b 6258 */
<> 139:856d2700e60b 6259
<> 139:856d2700e60b 6260 static __INLINE void arm_circularWrite_q15(
<> 139:856d2700e60b 6261 q15_t * circBuffer,
<> 139:856d2700e60b 6262 int32_t L,
<> 139:856d2700e60b 6263 uint16_t * writeOffset,
<> 139:856d2700e60b 6264 int32_t bufferInc,
<> 139:856d2700e60b 6265 const q15_t * src,
<> 139:856d2700e60b 6266 int32_t srcInc,
<> 139:856d2700e60b 6267 uint32_t blockSize)
<> 139:856d2700e60b 6268 {
<> 139:856d2700e60b 6269 uint32_t i = 0u;
<> 139:856d2700e60b 6270 int32_t wOffset;
<> 139:856d2700e60b 6271
<> 139:856d2700e60b 6272 /* Copy the value of Index pointer that points
<> 139:856d2700e60b 6273 * to the current location where the input samples to be copied */
<> 139:856d2700e60b 6274 wOffset = *writeOffset;
<> 139:856d2700e60b 6275
<> 139:856d2700e60b 6276 /* Loop over the blockSize */
<> 139:856d2700e60b 6277 i = blockSize;
<> 139:856d2700e60b 6278
<> 139:856d2700e60b 6279 while(i > 0u)
<> 139:856d2700e60b 6280 {
<> 139:856d2700e60b 6281 /* copy the input sample to the circular buffer */
<> 139:856d2700e60b 6282 circBuffer[wOffset] = *src;
<> 139:856d2700e60b 6283
<> 139:856d2700e60b 6284 /* Update the input pointer */
<> 139:856d2700e60b 6285 src += srcInc;
<> 139:856d2700e60b 6286
<> 139:856d2700e60b 6287 /* Circularly update wOffset. Watch out for positive and negative value */
<> 139:856d2700e60b 6288 wOffset += bufferInc;
<> 139:856d2700e60b 6289 if(wOffset >= L)
<> 139:856d2700e60b 6290 wOffset -= L;
<> 139:856d2700e60b 6291
<> 139:856d2700e60b 6292 /* Decrement the loop counter */
<> 139:856d2700e60b 6293 i--;
<> 139:856d2700e60b 6294 }
<> 139:856d2700e60b 6295
<> 139:856d2700e60b 6296 /* Update the index pointer */
<> 139:856d2700e60b 6297 *writeOffset = wOffset;
<> 139:856d2700e60b 6298 }
<> 139:856d2700e60b 6299
<> 139:856d2700e60b 6300
<> 139:856d2700e60b 6301
<> 139:856d2700e60b 6302 /**
<> 139:856d2700e60b 6303 * @brief Q15 Circular Read function.
<> 139:856d2700e60b 6304 */
<> 139:856d2700e60b 6305 static __INLINE void arm_circularRead_q15(
<> 139:856d2700e60b 6306 q15_t * circBuffer,
<> 139:856d2700e60b 6307 int32_t L,
<> 139:856d2700e60b 6308 int32_t * readOffset,
<> 139:856d2700e60b 6309 int32_t bufferInc,
<> 139:856d2700e60b 6310 q15_t * dst,
<> 139:856d2700e60b 6311 q15_t * dst_base,
<> 139:856d2700e60b 6312 int32_t dst_length,
<> 139:856d2700e60b 6313 int32_t dstInc,
<> 139:856d2700e60b 6314 uint32_t blockSize)
<> 139:856d2700e60b 6315 {
<> 139:856d2700e60b 6316 uint32_t i = 0;
<> 139:856d2700e60b 6317 int32_t rOffset, dst_end;
<> 139:856d2700e60b 6318
<> 139:856d2700e60b 6319 /* Copy the value of Index pointer that points
<> 139:856d2700e60b 6320 * to the current location from where the input samples to be read */
<> 139:856d2700e60b 6321 rOffset = *readOffset;
<> 139:856d2700e60b 6322
<> 139:856d2700e60b 6323 dst_end = (int32_t) (dst_base + dst_length);
<> 139:856d2700e60b 6324
<> 139:856d2700e60b 6325 /* Loop over the blockSize */
<> 139:856d2700e60b 6326 i = blockSize;
<> 139:856d2700e60b 6327
<> 139:856d2700e60b 6328 while(i > 0u)
<> 139:856d2700e60b 6329 {
<> 139:856d2700e60b 6330 /* copy the sample from the circular buffer to the destination buffer */
<> 139:856d2700e60b 6331 *dst = circBuffer[rOffset];
<> 139:856d2700e60b 6332
<> 139:856d2700e60b 6333 /* Update the input pointer */
<> 139:856d2700e60b 6334 dst += dstInc;
<> 139:856d2700e60b 6335
<> 139:856d2700e60b 6336 if(dst == (q15_t *) dst_end)
<> 139:856d2700e60b 6337 {
<> 139:856d2700e60b 6338 dst = dst_base;
<> 139:856d2700e60b 6339 }
<> 139:856d2700e60b 6340
<> 139:856d2700e60b 6341 /* Circularly update wOffset. Watch out for positive and negative value */
<> 139:856d2700e60b 6342 rOffset += bufferInc;
<> 139:856d2700e60b 6343
<> 139:856d2700e60b 6344 if(rOffset >= L)
<> 139:856d2700e60b 6345 {
<> 139:856d2700e60b 6346 rOffset -= L;
<> 139:856d2700e60b 6347 }
<> 139:856d2700e60b 6348
<> 139:856d2700e60b 6349 /* Decrement the loop counter */
<> 139:856d2700e60b 6350 i--;
<> 139:856d2700e60b 6351 }
<> 139:856d2700e60b 6352
<> 139:856d2700e60b 6353 /* Update the index pointer */
<> 139:856d2700e60b 6354 *readOffset = rOffset;
<> 139:856d2700e60b 6355 }
<> 139:856d2700e60b 6356
<> 139:856d2700e60b 6357
<> 139:856d2700e60b 6358 /**
<> 139:856d2700e60b 6359 * @brief Q7 Circular write function.
<> 139:856d2700e60b 6360 */
<> 139:856d2700e60b 6361
<> 139:856d2700e60b 6362 static __INLINE void arm_circularWrite_q7(
<> 139:856d2700e60b 6363 q7_t * circBuffer,
<> 139:856d2700e60b 6364 int32_t L,
<> 139:856d2700e60b 6365 uint16_t * writeOffset,
<> 139:856d2700e60b 6366 int32_t bufferInc,
<> 139:856d2700e60b 6367 const q7_t * src,
<> 139:856d2700e60b 6368 int32_t srcInc,
<> 139:856d2700e60b 6369 uint32_t blockSize)
<> 139:856d2700e60b 6370 {
<> 139:856d2700e60b 6371 uint32_t i = 0u;
<> 139:856d2700e60b 6372 int32_t wOffset;
<> 139:856d2700e60b 6373
<> 139:856d2700e60b 6374 /* Copy the value of Index pointer that points
<> 139:856d2700e60b 6375 * to the current location where the input samples to be copied */
<> 139:856d2700e60b 6376 wOffset = *writeOffset;
<> 139:856d2700e60b 6377
<> 139:856d2700e60b 6378 /* Loop over the blockSize */
<> 139:856d2700e60b 6379 i = blockSize;
<> 139:856d2700e60b 6380
<> 139:856d2700e60b 6381 while(i > 0u)
<> 139:856d2700e60b 6382 {
<> 139:856d2700e60b 6383 /* copy the input sample to the circular buffer */
<> 139:856d2700e60b 6384 circBuffer[wOffset] = *src;
<> 139:856d2700e60b 6385
<> 139:856d2700e60b 6386 /* Update the input pointer */
<> 139:856d2700e60b 6387 src += srcInc;
<> 139:856d2700e60b 6388
<> 139:856d2700e60b 6389 /* Circularly update wOffset. Watch out for positive and negative value */
<> 139:856d2700e60b 6390 wOffset += bufferInc;
<> 139:856d2700e60b 6391 if(wOffset >= L)
<> 139:856d2700e60b 6392 wOffset -= L;
<> 139:856d2700e60b 6393
<> 139:856d2700e60b 6394 /* Decrement the loop counter */
<> 139:856d2700e60b 6395 i--;
<> 139:856d2700e60b 6396 }
<> 139:856d2700e60b 6397
<> 139:856d2700e60b 6398 /* Update the index pointer */
<> 139:856d2700e60b 6399 *writeOffset = wOffset;
<> 139:856d2700e60b 6400 }
<> 139:856d2700e60b 6401
<> 139:856d2700e60b 6402
<> 139:856d2700e60b 6403
<> 139:856d2700e60b 6404 /**
<> 139:856d2700e60b 6405 * @brief Q7 Circular Read function.
<> 139:856d2700e60b 6406 */
<> 139:856d2700e60b 6407 static __INLINE void arm_circularRead_q7(
<> 139:856d2700e60b 6408 q7_t * circBuffer,
<> 139:856d2700e60b 6409 int32_t L,
<> 139:856d2700e60b 6410 int32_t * readOffset,
<> 139:856d2700e60b 6411 int32_t bufferInc,
<> 139:856d2700e60b 6412 q7_t * dst,
<> 139:856d2700e60b 6413 q7_t * dst_base,
<> 139:856d2700e60b 6414 int32_t dst_length,
<> 139:856d2700e60b 6415 int32_t dstInc,
<> 139:856d2700e60b 6416 uint32_t blockSize)
<> 139:856d2700e60b 6417 {
<> 139:856d2700e60b 6418 uint32_t i = 0;
<> 139:856d2700e60b 6419 int32_t rOffset, dst_end;
<> 139:856d2700e60b 6420
<> 139:856d2700e60b 6421 /* Copy the value of Index pointer that points
<> 139:856d2700e60b 6422 * to the current location from where the input samples to be read */
<> 139:856d2700e60b 6423 rOffset = *readOffset;
<> 139:856d2700e60b 6424
<> 139:856d2700e60b 6425 dst_end = (int32_t) (dst_base + dst_length);
<> 139:856d2700e60b 6426
<> 139:856d2700e60b 6427 /* Loop over the blockSize */
<> 139:856d2700e60b 6428 i = blockSize;
<> 139:856d2700e60b 6429
<> 139:856d2700e60b 6430 while(i > 0u)
<> 139:856d2700e60b 6431 {
<> 139:856d2700e60b 6432 /* copy the sample from the circular buffer to the destination buffer */
<> 139:856d2700e60b 6433 *dst = circBuffer[rOffset];
<> 139:856d2700e60b 6434
<> 139:856d2700e60b 6435 /* Update the input pointer */
<> 139:856d2700e60b 6436 dst += dstInc;
<> 139:856d2700e60b 6437
<> 139:856d2700e60b 6438 if(dst == (q7_t *) dst_end)
<> 139:856d2700e60b 6439 {
<> 139:856d2700e60b 6440 dst = dst_base;
<> 139:856d2700e60b 6441 }
<> 139:856d2700e60b 6442
<> 139:856d2700e60b 6443 /* Circularly update rOffset. Watch out for positive and negative value */
<> 139:856d2700e60b 6444 rOffset += bufferInc;
<> 139:856d2700e60b 6445
<> 139:856d2700e60b 6446 if(rOffset >= L)
<> 139:856d2700e60b 6447 {
<> 139:856d2700e60b 6448 rOffset -= L;
<> 139:856d2700e60b 6449 }
<> 139:856d2700e60b 6450
<> 139:856d2700e60b 6451 /* Decrement the loop counter */
<> 139:856d2700e60b 6452 i--;
<> 139:856d2700e60b 6453 }
<> 139:856d2700e60b 6454
<> 139:856d2700e60b 6455 /* Update the index pointer */
<> 139:856d2700e60b 6456 *readOffset = rOffset;
<> 139:856d2700e60b 6457 }
<> 139:856d2700e60b 6458
<> 139:856d2700e60b 6459
<> 139:856d2700e60b 6460 /**
<> 139:856d2700e60b 6461 * @brief Sum of the squares of the elements of a Q31 vector.
<> 139:856d2700e60b 6462 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6463 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6464 * @param[out] *pResult is output value.
<> 139:856d2700e60b 6465 * @return none.
<> 139:856d2700e60b 6466 */
<> 139:856d2700e60b 6467
<> 139:856d2700e60b 6468 void arm_power_q31(
<> 139:856d2700e60b 6469 q31_t * pSrc,
<> 139:856d2700e60b 6470 uint32_t blockSize,
<> 139:856d2700e60b 6471 q63_t * pResult);
<> 139:856d2700e60b 6472
<> 139:856d2700e60b 6473 /**
<> 139:856d2700e60b 6474 * @brief Sum of the squares of the elements of a floating-point vector.
<> 139:856d2700e60b 6475 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6476 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6477 * @param[out] *pResult is output value.
<> 139:856d2700e60b 6478 * @return none.
<> 139:856d2700e60b 6479 */
<> 139:856d2700e60b 6480
<> 139:856d2700e60b 6481 void arm_power_f32(
<> 139:856d2700e60b 6482 float32_t * pSrc,
<> 139:856d2700e60b 6483 uint32_t blockSize,
<> 139:856d2700e60b 6484 float32_t * pResult);
<> 139:856d2700e60b 6485
<> 139:856d2700e60b 6486 /**
<> 139:856d2700e60b 6487 * @brief Sum of the squares of the elements of a Q15 vector.
<> 139:856d2700e60b 6488 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6489 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6490 * @param[out] *pResult is output value.
<> 139:856d2700e60b 6491 * @return none.
<> 139:856d2700e60b 6492 */
<> 139:856d2700e60b 6493
<> 139:856d2700e60b 6494 void arm_power_q15(
<> 139:856d2700e60b 6495 q15_t * pSrc,
<> 139:856d2700e60b 6496 uint32_t blockSize,
<> 139:856d2700e60b 6497 q63_t * pResult);
<> 139:856d2700e60b 6498
<> 139:856d2700e60b 6499 /**
<> 139:856d2700e60b 6500 * @brief Sum of the squares of the elements of a Q7 vector.
<> 139:856d2700e60b 6501 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6502 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6503 * @param[out] *pResult is output value.
<> 139:856d2700e60b 6504 * @return none.
<> 139:856d2700e60b 6505 */
<> 139:856d2700e60b 6506
<> 139:856d2700e60b 6507 void arm_power_q7(
<> 139:856d2700e60b 6508 q7_t * pSrc,
<> 139:856d2700e60b 6509 uint32_t blockSize,
<> 139:856d2700e60b 6510 q31_t * pResult);
<> 139:856d2700e60b 6511
<> 139:856d2700e60b 6512 /**
<> 139:856d2700e60b 6513 * @brief Mean value of a Q7 vector.
<> 139:856d2700e60b 6514 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6515 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6516 * @param[out] *pResult is output value.
<> 139:856d2700e60b 6517 * @return none.
<> 139:856d2700e60b 6518 */
<> 139:856d2700e60b 6519
<> 139:856d2700e60b 6520 void arm_mean_q7(
<> 139:856d2700e60b 6521 q7_t * pSrc,
<> 139:856d2700e60b 6522 uint32_t blockSize,
<> 139:856d2700e60b 6523 q7_t * pResult);
<> 139:856d2700e60b 6524
<> 139:856d2700e60b 6525 /**
<> 139:856d2700e60b 6526 * @brief Mean value of a Q15 vector.
<> 139:856d2700e60b 6527 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6528 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6529 * @param[out] *pResult is output value.
<> 139:856d2700e60b 6530 * @return none.
<> 139:856d2700e60b 6531 */
<> 139:856d2700e60b 6532 void arm_mean_q15(
<> 139:856d2700e60b 6533 q15_t * pSrc,
<> 139:856d2700e60b 6534 uint32_t blockSize,
<> 139:856d2700e60b 6535 q15_t * pResult);
<> 139:856d2700e60b 6536
<> 139:856d2700e60b 6537 /**
<> 139:856d2700e60b 6538 * @brief Mean value of a Q31 vector.
<> 139:856d2700e60b 6539 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6540 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6541 * @param[out] *pResult is output value.
<> 139:856d2700e60b 6542 * @return none.
<> 139:856d2700e60b 6543 */
<> 139:856d2700e60b 6544 void arm_mean_q31(
<> 139:856d2700e60b 6545 q31_t * pSrc,
<> 139:856d2700e60b 6546 uint32_t blockSize,
<> 139:856d2700e60b 6547 q31_t * pResult);
<> 139:856d2700e60b 6548
<> 139:856d2700e60b 6549 /**
<> 139:856d2700e60b 6550 * @brief Mean value of a floating-point vector.
<> 139:856d2700e60b 6551 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6552 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6553 * @param[out] *pResult is output value.
<> 139:856d2700e60b 6554 * @return none.
<> 139:856d2700e60b 6555 */
<> 139:856d2700e60b 6556 void arm_mean_f32(
<> 139:856d2700e60b 6557 float32_t * pSrc,
<> 139:856d2700e60b 6558 uint32_t blockSize,
<> 139:856d2700e60b 6559 float32_t * pResult);
<> 139:856d2700e60b 6560
<> 139:856d2700e60b 6561 /**
<> 139:856d2700e60b 6562 * @brief Variance of the elements of a floating-point vector.
<> 139:856d2700e60b 6563 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6564 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6565 * @param[out] *pResult is output value.
<> 139:856d2700e60b 6566 * @return none.
<> 139:856d2700e60b 6567 */
<> 139:856d2700e60b 6568
<> 139:856d2700e60b 6569 void arm_var_f32(
<> 139:856d2700e60b 6570 float32_t * pSrc,
<> 139:856d2700e60b 6571 uint32_t blockSize,
<> 139:856d2700e60b 6572 float32_t * pResult);
<> 139:856d2700e60b 6573
<> 139:856d2700e60b 6574 /**
<> 139:856d2700e60b 6575 * @brief Variance of the elements of a Q31 vector.
<> 139:856d2700e60b 6576 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6577 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6578 * @param[out] *pResult is output value.
<> 139:856d2700e60b 6579 * @return none.
<> 139:856d2700e60b 6580 */
<> 139:856d2700e60b 6581
<> 139:856d2700e60b 6582 void arm_var_q31(
<> 139:856d2700e60b 6583 q31_t * pSrc,
<> 139:856d2700e60b 6584 uint32_t blockSize,
<> 139:856d2700e60b 6585 q31_t * pResult);
<> 139:856d2700e60b 6586
<> 139:856d2700e60b 6587 /**
<> 139:856d2700e60b 6588 * @brief Variance of the elements of a Q15 vector.
<> 139:856d2700e60b 6589 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6590 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6591 * @param[out] *pResult is output value.
<> 139:856d2700e60b 6592 * @return none.
<> 139:856d2700e60b 6593 */
<> 139:856d2700e60b 6594
<> 139:856d2700e60b 6595 void arm_var_q15(
<> 139:856d2700e60b 6596 q15_t * pSrc,
<> 139:856d2700e60b 6597 uint32_t blockSize,
<> 139:856d2700e60b 6598 q15_t * pResult);
<> 139:856d2700e60b 6599
<> 139:856d2700e60b 6600 /**
<> 139:856d2700e60b 6601 * @brief Root Mean Square of the elements of a floating-point vector.
<> 139:856d2700e60b 6602 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6603 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6604 * @param[out] *pResult is output value.
<> 139:856d2700e60b 6605 * @return none.
<> 139:856d2700e60b 6606 */
<> 139:856d2700e60b 6607
<> 139:856d2700e60b 6608 void arm_rms_f32(
<> 139:856d2700e60b 6609 float32_t * pSrc,
<> 139:856d2700e60b 6610 uint32_t blockSize,
<> 139:856d2700e60b 6611 float32_t * pResult);
<> 139:856d2700e60b 6612
<> 139:856d2700e60b 6613 /**
<> 139:856d2700e60b 6614 * @brief Root Mean Square of the elements of a Q31 vector.
<> 139:856d2700e60b 6615 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6616 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6617 * @param[out] *pResult is output value.
<> 139:856d2700e60b 6618 * @return none.
<> 139:856d2700e60b 6619 */
<> 139:856d2700e60b 6620
<> 139:856d2700e60b 6621 void arm_rms_q31(
<> 139:856d2700e60b 6622 q31_t * pSrc,
<> 139:856d2700e60b 6623 uint32_t blockSize,
<> 139:856d2700e60b 6624 q31_t * pResult);
<> 139:856d2700e60b 6625
<> 139:856d2700e60b 6626 /**
<> 139:856d2700e60b 6627 * @brief Root Mean Square of the elements of a Q15 vector.
<> 139:856d2700e60b 6628 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6629 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6630 * @param[out] *pResult is output value.
<> 139:856d2700e60b 6631 * @return none.
<> 139:856d2700e60b 6632 */
<> 139:856d2700e60b 6633
<> 139:856d2700e60b 6634 void arm_rms_q15(
<> 139:856d2700e60b 6635 q15_t * pSrc,
<> 139:856d2700e60b 6636 uint32_t blockSize,
<> 139:856d2700e60b 6637 q15_t * pResult);
<> 139:856d2700e60b 6638
<> 139:856d2700e60b 6639 /**
<> 139:856d2700e60b 6640 * @brief Standard deviation of the elements of a floating-point vector.
<> 139:856d2700e60b 6641 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6642 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6643 * @param[out] *pResult is output value.
<> 139:856d2700e60b 6644 * @return none.
<> 139:856d2700e60b 6645 */
<> 139:856d2700e60b 6646
<> 139:856d2700e60b 6647 void arm_std_f32(
<> 139:856d2700e60b 6648 float32_t * pSrc,
<> 139:856d2700e60b 6649 uint32_t blockSize,
<> 139:856d2700e60b 6650 float32_t * pResult);
<> 139:856d2700e60b 6651
<> 139:856d2700e60b 6652 /**
<> 139:856d2700e60b 6653 * @brief Standard deviation of the elements of a Q31 vector.
<> 139:856d2700e60b 6654 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6655 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6656 * @param[out] *pResult is output value.
<> 139:856d2700e60b 6657 * @return none.
<> 139:856d2700e60b 6658 */
<> 139:856d2700e60b 6659
<> 139:856d2700e60b 6660 void arm_std_q31(
<> 139:856d2700e60b 6661 q31_t * pSrc,
<> 139:856d2700e60b 6662 uint32_t blockSize,
<> 139:856d2700e60b 6663 q31_t * pResult);
<> 139:856d2700e60b 6664
<> 139:856d2700e60b 6665 /**
<> 139:856d2700e60b 6666 * @brief Standard deviation of the elements of a Q15 vector.
<> 139:856d2700e60b 6667 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6668 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6669 * @param[out] *pResult is output value.
<> 139:856d2700e60b 6670 * @return none.
<> 139:856d2700e60b 6671 */
<> 139:856d2700e60b 6672
<> 139:856d2700e60b 6673 void arm_std_q15(
<> 139:856d2700e60b 6674 q15_t * pSrc,
<> 139:856d2700e60b 6675 uint32_t blockSize,
<> 139:856d2700e60b 6676 q15_t * pResult);
<> 139:856d2700e60b 6677
<> 139:856d2700e60b 6678 /**
<> 139:856d2700e60b 6679 * @brief Floating-point complex magnitude
<> 139:856d2700e60b 6680 * @param[in] *pSrc points to the complex input vector
<> 139:856d2700e60b 6681 * @param[out] *pDst points to the real output vector
<> 139:856d2700e60b 6682 * @param[in] numSamples number of complex samples in the input vector
<> 139:856d2700e60b 6683 * @return none.
<> 139:856d2700e60b 6684 */
<> 139:856d2700e60b 6685
<> 139:856d2700e60b 6686 void arm_cmplx_mag_f32(
<> 139:856d2700e60b 6687 float32_t * pSrc,
<> 139:856d2700e60b 6688 float32_t * pDst,
<> 139:856d2700e60b 6689 uint32_t numSamples);
<> 139:856d2700e60b 6690
<> 139:856d2700e60b 6691 /**
<> 139:856d2700e60b 6692 * @brief Q31 complex magnitude
<> 139:856d2700e60b 6693 * @param[in] *pSrc points to the complex input vector
<> 139:856d2700e60b 6694 * @param[out] *pDst points to the real output vector
<> 139:856d2700e60b 6695 * @param[in] numSamples number of complex samples in the input vector
<> 139:856d2700e60b 6696 * @return none.
<> 139:856d2700e60b 6697 */
<> 139:856d2700e60b 6698
<> 139:856d2700e60b 6699 void arm_cmplx_mag_q31(
<> 139:856d2700e60b 6700 q31_t * pSrc,
<> 139:856d2700e60b 6701 q31_t * pDst,
<> 139:856d2700e60b 6702 uint32_t numSamples);
<> 139:856d2700e60b 6703
<> 139:856d2700e60b 6704 /**
<> 139:856d2700e60b 6705 * @brief Q15 complex magnitude
<> 139:856d2700e60b 6706 * @param[in] *pSrc points to the complex input vector
<> 139:856d2700e60b 6707 * @param[out] *pDst points to the real output vector
<> 139:856d2700e60b 6708 * @param[in] numSamples number of complex samples in the input vector
<> 139:856d2700e60b 6709 * @return none.
<> 139:856d2700e60b 6710 */
<> 139:856d2700e60b 6711
<> 139:856d2700e60b 6712 void arm_cmplx_mag_q15(
<> 139:856d2700e60b 6713 q15_t * pSrc,
<> 139:856d2700e60b 6714 q15_t * pDst,
<> 139:856d2700e60b 6715 uint32_t numSamples);
<> 139:856d2700e60b 6716
<> 139:856d2700e60b 6717 /**
<> 139:856d2700e60b 6718 * @brief Q15 complex dot product
<> 139:856d2700e60b 6719 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 6720 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 6721 * @param[in] numSamples number of complex samples in each vector
<> 139:856d2700e60b 6722 * @param[out] *realResult real part of the result returned here
<> 139:856d2700e60b 6723 * @param[out] *imagResult imaginary part of the result returned here
<> 139:856d2700e60b 6724 * @return none.
<> 139:856d2700e60b 6725 */
<> 139:856d2700e60b 6726
<> 139:856d2700e60b 6727 void arm_cmplx_dot_prod_q15(
<> 139:856d2700e60b 6728 q15_t * pSrcA,
<> 139:856d2700e60b 6729 q15_t * pSrcB,
<> 139:856d2700e60b 6730 uint32_t numSamples,
<> 139:856d2700e60b 6731 q31_t * realResult,
<> 139:856d2700e60b 6732 q31_t * imagResult);
<> 139:856d2700e60b 6733
<> 139:856d2700e60b 6734 /**
<> 139:856d2700e60b 6735 * @brief Q31 complex dot product
<> 139:856d2700e60b 6736 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 6737 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 6738 * @param[in] numSamples number of complex samples in each vector
<> 139:856d2700e60b 6739 * @param[out] *realResult real part of the result returned here
<> 139:856d2700e60b 6740 * @param[out] *imagResult imaginary part of the result returned here
<> 139:856d2700e60b 6741 * @return none.
<> 139:856d2700e60b 6742 */
<> 139:856d2700e60b 6743
<> 139:856d2700e60b 6744 void arm_cmplx_dot_prod_q31(
<> 139:856d2700e60b 6745 q31_t * pSrcA,
<> 139:856d2700e60b 6746 q31_t * pSrcB,
<> 139:856d2700e60b 6747 uint32_t numSamples,
<> 139:856d2700e60b 6748 q63_t * realResult,
<> 139:856d2700e60b 6749 q63_t * imagResult);
<> 139:856d2700e60b 6750
<> 139:856d2700e60b 6751 /**
<> 139:856d2700e60b 6752 * @brief Floating-point complex dot product
<> 139:856d2700e60b 6753 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 6754 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 6755 * @param[in] numSamples number of complex samples in each vector
<> 139:856d2700e60b 6756 * @param[out] *realResult real part of the result returned here
<> 139:856d2700e60b 6757 * @param[out] *imagResult imaginary part of the result returned here
<> 139:856d2700e60b 6758 * @return none.
<> 139:856d2700e60b 6759 */
<> 139:856d2700e60b 6760
<> 139:856d2700e60b 6761 void arm_cmplx_dot_prod_f32(
<> 139:856d2700e60b 6762 float32_t * pSrcA,
<> 139:856d2700e60b 6763 float32_t * pSrcB,
<> 139:856d2700e60b 6764 uint32_t numSamples,
<> 139:856d2700e60b 6765 float32_t * realResult,
<> 139:856d2700e60b 6766 float32_t * imagResult);
<> 139:856d2700e60b 6767
<> 139:856d2700e60b 6768 /**
<> 139:856d2700e60b 6769 * @brief Q15 complex-by-real multiplication
<> 139:856d2700e60b 6770 * @param[in] *pSrcCmplx points to the complex input vector
<> 139:856d2700e60b 6771 * @param[in] *pSrcReal points to the real input vector
<> 139:856d2700e60b 6772 * @param[out] *pCmplxDst points to the complex output vector
<> 139:856d2700e60b 6773 * @param[in] numSamples number of samples in each vector
<> 139:856d2700e60b 6774 * @return none.
<> 139:856d2700e60b 6775 */
<> 139:856d2700e60b 6776
<> 139:856d2700e60b 6777 void arm_cmplx_mult_real_q15(
<> 139:856d2700e60b 6778 q15_t * pSrcCmplx,
<> 139:856d2700e60b 6779 q15_t * pSrcReal,
<> 139:856d2700e60b 6780 q15_t * pCmplxDst,
<> 139:856d2700e60b 6781 uint32_t numSamples);
<> 139:856d2700e60b 6782
<> 139:856d2700e60b 6783 /**
<> 139:856d2700e60b 6784 * @brief Q31 complex-by-real multiplication
<> 139:856d2700e60b 6785 * @param[in] *pSrcCmplx points to the complex input vector
<> 139:856d2700e60b 6786 * @param[in] *pSrcReal points to the real input vector
<> 139:856d2700e60b 6787 * @param[out] *pCmplxDst points to the complex output vector
<> 139:856d2700e60b 6788 * @param[in] numSamples number of samples in each vector
<> 139:856d2700e60b 6789 * @return none.
<> 139:856d2700e60b 6790 */
<> 139:856d2700e60b 6791
<> 139:856d2700e60b 6792 void arm_cmplx_mult_real_q31(
<> 139:856d2700e60b 6793 q31_t * pSrcCmplx,
<> 139:856d2700e60b 6794 q31_t * pSrcReal,
<> 139:856d2700e60b 6795 q31_t * pCmplxDst,
<> 139:856d2700e60b 6796 uint32_t numSamples);
<> 139:856d2700e60b 6797
<> 139:856d2700e60b 6798 /**
<> 139:856d2700e60b 6799 * @brief Floating-point complex-by-real multiplication
<> 139:856d2700e60b 6800 * @param[in] *pSrcCmplx points to the complex input vector
<> 139:856d2700e60b 6801 * @param[in] *pSrcReal points to the real input vector
<> 139:856d2700e60b 6802 * @param[out] *pCmplxDst points to the complex output vector
<> 139:856d2700e60b 6803 * @param[in] numSamples number of samples in each vector
<> 139:856d2700e60b 6804 * @return none.
<> 139:856d2700e60b 6805 */
<> 139:856d2700e60b 6806
<> 139:856d2700e60b 6807 void arm_cmplx_mult_real_f32(
<> 139:856d2700e60b 6808 float32_t * pSrcCmplx,
<> 139:856d2700e60b 6809 float32_t * pSrcReal,
<> 139:856d2700e60b 6810 float32_t * pCmplxDst,
<> 139:856d2700e60b 6811 uint32_t numSamples);
<> 139:856d2700e60b 6812
<> 139:856d2700e60b 6813 /**
<> 139:856d2700e60b 6814 * @brief Minimum value of a Q7 vector.
<> 139:856d2700e60b 6815 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6816 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6817 * @param[out] *result is output pointer
<> 139:856d2700e60b 6818 * @param[in] index is the array index of the minimum value in the input buffer.
<> 139:856d2700e60b 6819 * @return none.
<> 139:856d2700e60b 6820 */
<> 139:856d2700e60b 6821
<> 139:856d2700e60b 6822 void arm_min_q7(
<> 139:856d2700e60b 6823 q7_t * pSrc,
<> 139:856d2700e60b 6824 uint32_t blockSize,
<> 139:856d2700e60b 6825 q7_t * result,
<> 139:856d2700e60b 6826 uint32_t * index);
<> 139:856d2700e60b 6827
<> 139:856d2700e60b 6828 /**
<> 139:856d2700e60b 6829 * @brief Minimum value of a Q15 vector.
<> 139:856d2700e60b 6830 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6831 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6832 * @param[out] *pResult is output pointer
<> 139:856d2700e60b 6833 * @param[in] *pIndex is the array index of the minimum value in the input buffer.
<> 139:856d2700e60b 6834 * @return none.
<> 139:856d2700e60b 6835 */
<> 139:856d2700e60b 6836
<> 139:856d2700e60b 6837 void arm_min_q15(
<> 139:856d2700e60b 6838 q15_t * pSrc,
<> 139:856d2700e60b 6839 uint32_t blockSize,
<> 139:856d2700e60b 6840 q15_t * pResult,
<> 139:856d2700e60b 6841 uint32_t * pIndex);
<> 139:856d2700e60b 6842
<> 139:856d2700e60b 6843 /**
<> 139:856d2700e60b 6844 * @brief Minimum value of a Q31 vector.
<> 139:856d2700e60b 6845 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6846 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6847 * @param[out] *pResult is output pointer
<> 139:856d2700e60b 6848 * @param[out] *pIndex is the array index of the minimum value in the input buffer.
<> 139:856d2700e60b 6849 * @return none.
<> 139:856d2700e60b 6850 */
<> 139:856d2700e60b 6851 void arm_min_q31(
<> 139:856d2700e60b 6852 q31_t * pSrc,
<> 139:856d2700e60b 6853 uint32_t blockSize,
<> 139:856d2700e60b 6854 q31_t * pResult,
<> 139:856d2700e60b 6855 uint32_t * pIndex);
<> 139:856d2700e60b 6856
<> 139:856d2700e60b 6857 /**
<> 139:856d2700e60b 6858 * @brief Minimum value of a floating-point vector.
<> 139:856d2700e60b 6859 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 6860 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 6861 * @param[out] *pResult is output pointer
<> 139:856d2700e60b 6862 * @param[out] *pIndex is the array index of the minimum value in the input buffer.
<> 139:856d2700e60b 6863 * @return none.
<> 139:856d2700e60b 6864 */
<> 139:856d2700e60b 6865
<> 139:856d2700e60b 6866 void arm_min_f32(
<> 139:856d2700e60b 6867 float32_t * pSrc,
<> 139:856d2700e60b 6868 uint32_t blockSize,
<> 139:856d2700e60b 6869 float32_t * pResult,
<> 139:856d2700e60b 6870 uint32_t * pIndex);
<> 139:856d2700e60b 6871
<> 139:856d2700e60b 6872 /**
<> 139:856d2700e60b 6873 * @brief Maximum value of a Q7 vector.
<> 139:856d2700e60b 6874 * @param[in] *pSrc points to the input buffer
<> 139:856d2700e60b 6875 * @param[in] blockSize length of the input vector
<> 139:856d2700e60b 6876 * @param[out] *pResult maximum value returned here
<> 139:856d2700e60b 6877 * @param[out] *pIndex index of maximum value returned here
<> 139:856d2700e60b 6878 * @return none.
<> 139:856d2700e60b 6879 */
<> 139:856d2700e60b 6880
<> 139:856d2700e60b 6881 void arm_max_q7(
<> 139:856d2700e60b 6882 q7_t * pSrc,
<> 139:856d2700e60b 6883 uint32_t blockSize,
<> 139:856d2700e60b 6884 q7_t * pResult,
<> 139:856d2700e60b 6885 uint32_t * pIndex);
<> 139:856d2700e60b 6886
<> 139:856d2700e60b 6887 /**
<> 139:856d2700e60b 6888 * @brief Maximum value of a Q15 vector.
<> 139:856d2700e60b 6889 * @param[in] *pSrc points to the input buffer
<> 139:856d2700e60b 6890 * @param[in] blockSize length of the input vector
<> 139:856d2700e60b 6891 * @param[out] *pResult maximum value returned here
<> 139:856d2700e60b 6892 * @param[out] *pIndex index of maximum value returned here
<> 139:856d2700e60b 6893 * @return none.
<> 139:856d2700e60b 6894 */
<> 139:856d2700e60b 6895
<> 139:856d2700e60b 6896 void arm_max_q15(
<> 139:856d2700e60b 6897 q15_t * pSrc,
<> 139:856d2700e60b 6898 uint32_t blockSize,
<> 139:856d2700e60b 6899 q15_t * pResult,
<> 139:856d2700e60b 6900 uint32_t * pIndex);
<> 139:856d2700e60b 6901
<> 139:856d2700e60b 6902 /**
<> 139:856d2700e60b 6903 * @brief Maximum value of a Q31 vector.
<> 139:856d2700e60b 6904 * @param[in] *pSrc points to the input buffer
<> 139:856d2700e60b 6905 * @param[in] blockSize length of the input vector
<> 139:856d2700e60b 6906 * @param[out] *pResult maximum value returned here
<> 139:856d2700e60b 6907 * @param[out] *pIndex index of maximum value returned here
<> 139:856d2700e60b 6908 * @return none.
<> 139:856d2700e60b 6909 */
<> 139:856d2700e60b 6910
<> 139:856d2700e60b 6911 void arm_max_q31(
<> 139:856d2700e60b 6912 q31_t * pSrc,
<> 139:856d2700e60b 6913 uint32_t blockSize,
<> 139:856d2700e60b 6914 q31_t * pResult,
<> 139:856d2700e60b 6915 uint32_t * pIndex);
<> 139:856d2700e60b 6916
<> 139:856d2700e60b 6917 /**
<> 139:856d2700e60b 6918 * @brief Maximum value of a floating-point vector.
<> 139:856d2700e60b 6919 * @param[in] *pSrc points to the input buffer
<> 139:856d2700e60b 6920 * @param[in] blockSize length of the input vector
<> 139:856d2700e60b 6921 * @param[out] *pResult maximum value returned here
<> 139:856d2700e60b 6922 * @param[out] *pIndex index of maximum value returned here
<> 139:856d2700e60b 6923 * @return none.
<> 139:856d2700e60b 6924 */
<> 139:856d2700e60b 6925
<> 139:856d2700e60b 6926 void arm_max_f32(
<> 139:856d2700e60b 6927 float32_t * pSrc,
<> 139:856d2700e60b 6928 uint32_t blockSize,
<> 139:856d2700e60b 6929 float32_t * pResult,
<> 139:856d2700e60b 6930 uint32_t * pIndex);
<> 139:856d2700e60b 6931
<> 139:856d2700e60b 6932 /**
<> 139:856d2700e60b 6933 * @brief Q15 complex-by-complex multiplication
<> 139:856d2700e60b 6934 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 6935 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 6936 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 6937 * @param[in] numSamples number of complex samples in each vector
<> 139:856d2700e60b 6938 * @return none.
<> 139:856d2700e60b 6939 */
<> 139:856d2700e60b 6940
<> 139:856d2700e60b 6941 void arm_cmplx_mult_cmplx_q15(
<> 139:856d2700e60b 6942 q15_t * pSrcA,
<> 139:856d2700e60b 6943 q15_t * pSrcB,
<> 139:856d2700e60b 6944 q15_t * pDst,
<> 139:856d2700e60b 6945 uint32_t numSamples);
<> 139:856d2700e60b 6946
<> 139:856d2700e60b 6947 /**
<> 139:856d2700e60b 6948 * @brief Q31 complex-by-complex multiplication
<> 139:856d2700e60b 6949 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 6950 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 6951 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 6952 * @param[in] numSamples number of complex samples in each vector
<> 139:856d2700e60b 6953 * @return none.
<> 139:856d2700e60b 6954 */
<> 139:856d2700e60b 6955
<> 139:856d2700e60b 6956 void arm_cmplx_mult_cmplx_q31(
<> 139:856d2700e60b 6957 q31_t * pSrcA,
<> 139:856d2700e60b 6958 q31_t * pSrcB,
<> 139:856d2700e60b 6959 q31_t * pDst,
<> 139:856d2700e60b 6960 uint32_t numSamples);
<> 139:856d2700e60b 6961
<> 139:856d2700e60b 6962 /**
<> 139:856d2700e60b 6963 * @brief Floating-point complex-by-complex multiplication
<> 139:856d2700e60b 6964 * @param[in] *pSrcA points to the first input vector
<> 139:856d2700e60b 6965 * @param[in] *pSrcB points to the second input vector
<> 139:856d2700e60b 6966 * @param[out] *pDst points to the output vector
<> 139:856d2700e60b 6967 * @param[in] numSamples number of complex samples in each vector
<> 139:856d2700e60b 6968 * @return none.
<> 139:856d2700e60b 6969 */
<> 139:856d2700e60b 6970
<> 139:856d2700e60b 6971 void arm_cmplx_mult_cmplx_f32(
<> 139:856d2700e60b 6972 float32_t * pSrcA,
<> 139:856d2700e60b 6973 float32_t * pSrcB,
<> 139:856d2700e60b 6974 float32_t * pDst,
<> 139:856d2700e60b 6975 uint32_t numSamples);
<> 139:856d2700e60b 6976
<> 139:856d2700e60b 6977 /**
<> 139:856d2700e60b 6978 * @brief Converts the elements of the floating-point vector to Q31 vector.
<> 139:856d2700e60b 6979 * @param[in] *pSrc points to the floating-point input vector
<> 139:856d2700e60b 6980 * @param[out] *pDst points to the Q31 output vector
<> 139:856d2700e60b 6981 * @param[in] blockSize length of the input vector
<> 139:856d2700e60b 6982 * @return none.
<> 139:856d2700e60b 6983 */
<> 139:856d2700e60b 6984 void arm_float_to_q31(
<> 139:856d2700e60b 6985 float32_t * pSrc,
<> 139:856d2700e60b 6986 q31_t * pDst,
<> 139:856d2700e60b 6987 uint32_t blockSize);
<> 139:856d2700e60b 6988
<> 139:856d2700e60b 6989 /**
<> 139:856d2700e60b 6990 * @brief Converts the elements of the floating-point vector to Q15 vector.
<> 139:856d2700e60b 6991 * @param[in] *pSrc points to the floating-point input vector
<> 139:856d2700e60b 6992 * @param[out] *pDst points to the Q15 output vector
<> 139:856d2700e60b 6993 * @param[in] blockSize length of the input vector
<> 139:856d2700e60b 6994 * @return none
<> 139:856d2700e60b 6995 */
<> 139:856d2700e60b 6996 void arm_float_to_q15(
<> 139:856d2700e60b 6997 float32_t * pSrc,
<> 139:856d2700e60b 6998 q15_t * pDst,
<> 139:856d2700e60b 6999 uint32_t blockSize);
<> 139:856d2700e60b 7000
<> 139:856d2700e60b 7001 /**
<> 139:856d2700e60b 7002 * @brief Converts the elements of the floating-point vector to Q7 vector.
<> 139:856d2700e60b 7003 * @param[in] *pSrc points to the floating-point input vector
<> 139:856d2700e60b 7004 * @param[out] *pDst points to the Q7 output vector
<> 139:856d2700e60b 7005 * @param[in] blockSize length of the input vector
<> 139:856d2700e60b 7006 * @return none
<> 139:856d2700e60b 7007 */
<> 139:856d2700e60b 7008 void arm_float_to_q7(
<> 139:856d2700e60b 7009 float32_t * pSrc,
<> 139:856d2700e60b 7010 q7_t * pDst,
<> 139:856d2700e60b 7011 uint32_t blockSize);
<> 139:856d2700e60b 7012
<> 139:856d2700e60b 7013
<> 139:856d2700e60b 7014 /**
<> 139:856d2700e60b 7015 * @brief Converts the elements of the Q31 vector to Q15 vector.
<> 139:856d2700e60b 7016 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 7017 * @param[out] *pDst is output pointer
<> 139:856d2700e60b 7018 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 7019 * @return none.
<> 139:856d2700e60b 7020 */
<> 139:856d2700e60b 7021 void arm_q31_to_q15(
<> 139:856d2700e60b 7022 q31_t * pSrc,
<> 139:856d2700e60b 7023 q15_t * pDst,
<> 139:856d2700e60b 7024 uint32_t blockSize);
<> 139:856d2700e60b 7025
<> 139:856d2700e60b 7026 /**
<> 139:856d2700e60b 7027 * @brief Converts the elements of the Q31 vector to Q7 vector.
<> 139:856d2700e60b 7028 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 7029 * @param[out] *pDst is output pointer
<> 139:856d2700e60b 7030 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 7031 * @return none.
<> 139:856d2700e60b 7032 */
<> 139:856d2700e60b 7033 void arm_q31_to_q7(
<> 139:856d2700e60b 7034 q31_t * pSrc,
<> 139:856d2700e60b 7035 q7_t * pDst,
<> 139:856d2700e60b 7036 uint32_t blockSize);
<> 139:856d2700e60b 7037
<> 139:856d2700e60b 7038 /**
<> 139:856d2700e60b 7039 * @brief Converts the elements of the Q15 vector to floating-point vector.
<> 139:856d2700e60b 7040 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 7041 * @param[out] *pDst is output pointer
<> 139:856d2700e60b 7042 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 7043 * @return none.
<> 139:856d2700e60b 7044 */
<> 139:856d2700e60b 7045 void arm_q15_to_float(
<> 139:856d2700e60b 7046 q15_t * pSrc,
<> 139:856d2700e60b 7047 float32_t * pDst,
<> 139:856d2700e60b 7048 uint32_t blockSize);
<> 139:856d2700e60b 7049
<> 139:856d2700e60b 7050
<> 139:856d2700e60b 7051 /**
<> 139:856d2700e60b 7052 * @brief Converts the elements of the Q15 vector to Q31 vector.
<> 139:856d2700e60b 7053 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 7054 * @param[out] *pDst is output pointer
<> 139:856d2700e60b 7055 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 7056 * @return none.
<> 139:856d2700e60b 7057 */
<> 139:856d2700e60b 7058 void arm_q15_to_q31(
<> 139:856d2700e60b 7059 q15_t * pSrc,
<> 139:856d2700e60b 7060 q31_t * pDst,
<> 139:856d2700e60b 7061 uint32_t blockSize);
<> 139:856d2700e60b 7062
<> 139:856d2700e60b 7063
<> 139:856d2700e60b 7064 /**
<> 139:856d2700e60b 7065 * @brief Converts the elements of the Q15 vector to Q7 vector.
<> 139:856d2700e60b 7066 * @param[in] *pSrc is input pointer
<> 139:856d2700e60b 7067 * @param[out] *pDst is output pointer
<> 139:856d2700e60b 7068 * @param[in] blockSize is the number of samples to process
<> 139:856d2700e60b 7069 * @return none.
<> 139:856d2700e60b 7070 */
<> 139:856d2700e60b 7071 void arm_q15_to_q7(
<> 139:856d2700e60b 7072 q15_t * pSrc,
<> 139:856d2700e60b 7073 q7_t * pDst,
<> 139:856d2700e60b 7074 uint32_t blockSize);
<> 139:856d2700e60b 7075
<> 139:856d2700e60b 7076
<> 139:856d2700e60b 7077 /**
<> 139:856d2700e60b 7078 * @ingroup groupInterpolation
<> 139:856d2700e60b 7079 */
<> 139:856d2700e60b 7080
<> 139:856d2700e60b 7081 /**
<> 139:856d2700e60b 7082 * @defgroup BilinearInterpolate Bilinear Interpolation
<> 139:856d2700e60b 7083 *
<> 139:856d2700e60b 7084 * Bilinear interpolation is an extension of linear interpolation applied to a two dimensional grid.
<> 139:856d2700e60b 7085 * The underlying function <code>f(x, y)</code> is sampled on a regular grid and the interpolation process
<> 139:856d2700e60b 7086 * determines values between the grid points.
<> 139:856d2700e60b 7087 * Bilinear interpolation is equivalent to two step linear interpolation, first in the x-dimension and then in the y-dimension.
<> 139:856d2700e60b 7088 * Bilinear interpolation is often used in image processing to rescale images.
<> 139:856d2700e60b 7089 * The CMSIS DSP library provides bilinear interpolation functions for Q7, Q15, Q31, and floating-point data types.
<> 139:856d2700e60b 7090 *
<> 139:856d2700e60b 7091 * <b>Algorithm</b>
<> 139:856d2700e60b 7092 * \par
<> 139:856d2700e60b 7093 * The instance structure used by the bilinear interpolation functions describes a two dimensional data table.
<> 139:856d2700e60b 7094 * For floating-point, the instance structure is defined as:
<> 139:856d2700e60b 7095 * <pre>
<> 139:856d2700e60b 7096 * typedef struct
<> 139:856d2700e60b 7097 * {
<> 139:856d2700e60b 7098 * uint16_t numRows;
<> 139:856d2700e60b 7099 * uint16_t numCols;
<> 139:856d2700e60b 7100 * float32_t *pData;
<> 139:856d2700e60b 7101 * } arm_bilinear_interp_instance_f32;
<> 139:856d2700e60b 7102 * </pre>
<> 139:856d2700e60b 7103 *
<> 139:856d2700e60b 7104 * \par
<> 139:856d2700e60b 7105 * where <code>numRows</code> specifies the number of rows in the table;
<> 139:856d2700e60b 7106 * <code>numCols</code> specifies the number of columns in the table;
<> 139:856d2700e60b 7107 * and <code>pData</code> points to an array of size <code>numRows*numCols</code> values.
<> 139:856d2700e60b 7108 * The data table <code>pTable</code> is organized in row order and the supplied data values fall on integer indexes.
<> 139:856d2700e60b 7109 * That is, table element (x,y) is located at <code>pTable[x + y*numCols]</code> where x and y are integers.
<> 139:856d2700e60b 7110 *
<> 139:856d2700e60b 7111 * \par
<> 139:856d2700e60b 7112 * Let <code>(x, y)</code> specify the desired interpolation point. Then define:
<> 139:856d2700e60b 7113 * <pre>
<> 139:856d2700e60b 7114 * XF = floor(x)
<> 139:856d2700e60b 7115 * YF = floor(y)
<> 139:856d2700e60b 7116 * </pre>
<> 139:856d2700e60b 7117 * \par
<> 139:856d2700e60b 7118 * The interpolated output point is computed as:
<> 139:856d2700e60b 7119 * <pre>
<> 139:856d2700e60b 7120 * f(x, y) = f(XF, YF) * (1-(x-XF)) * (1-(y-YF))
<> 139:856d2700e60b 7121 * + f(XF+1, YF) * (x-XF)*(1-(y-YF))
<> 139:856d2700e60b 7122 * + f(XF, YF+1) * (1-(x-XF))*(y-YF)
<> 139:856d2700e60b 7123 * + f(XF+1, YF+1) * (x-XF)*(y-YF)
<> 139:856d2700e60b 7124 * </pre>
<> 139:856d2700e60b 7125 * Note that the coordinates (x, y) contain integer and fractional components.
<> 139:856d2700e60b 7126 * The integer components specify which portion of the table to use while the
<> 139:856d2700e60b 7127 * fractional components control the interpolation processor.
<> 139:856d2700e60b 7128 *
<> 139:856d2700e60b 7129 * \par
<> 139:856d2700e60b 7130 * if (x,y) are outside of the table boundary, Bilinear interpolation returns zero output.
<> 139:856d2700e60b 7131 */
<> 139:856d2700e60b 7132
<> 139:856d2700e60b 7133 /**
<> 139:856d2700e60b 7134 * @addtogroup BilinearInterpolate
<> 139:856d2700e60b 7135 * @{
<> 139:856d2700e60b 7136 */
<> 139:856d2700e60b 7137
<> 139:856d2700e60b 7138 /**
<> 139:856d2700e60b 7139 *
<> 139:856d2700e60b 7140 * @brief Floating-point bilinear interpolation.
<> 139:856d2700e60b 7141 * @param[in,out] *S points to an instance of the interpolation structure.
<> 139:856d2700e60b 7142 * @param[in] X interpolation coordinate.
<> 139:856d2700e60b 7143 * @param[in] Y interpolation coordinate.
<> 139:856d2700e60b 7144 * @return out interpolated value.
<> 139:856d2700e60b 7145 */
<> 139:856d2700e60b 7146
<> 139:856d2700e60b 7147
<> 139:856d2700e60b 7148 static __INLINE float32_t arm_bilinear_interp_f32(
<> 139:856d2700e60b 7149 const arm_bilinear_interp_instance_f32 * S,
<> 139:856d2700e60b 7150 float32_t X,
<> 139:856d2700e60b 7151 float32_t Y)
<> 139:856d2700e60b 7152 {
<> 139:856d2700e60b 7153 float32_t out;
<> 139:856d2700e60b 7154 float32_t f00, f01, f10, f11;
<> 139:856d2700e60b 7155 float32_t *pData = S->pData;
<> 139:856d2700e60b 7156 int32_t xIndex, yIndex, index;
<> 139:856d2700e60b 7157 float32_t xdiff, ydiff;
<> 139:856d2700e60b 7158 float32_t b1, b2, b3, b4;
<> 139:856d2700e60b 7159
<> 139:856d2700e60b 7160 xIndex = (int32_t) X;
<> 139:856d2700e60b 7161 yIndex = (int32_t) Y;
<> 139:856d2700e60b 7162
<> 139:856d2700e60b 7163 /* Care taken for table outside boundary */
<> 139:856d2700e60b 7164 /* Returns zero output when values are outside table boundary */
<> 139:856d2700e60b 7165 if(xIndex < 0 || xIndex > (S->numRows - 1) || yIndex < 0
<> 139:856d2700e60b 7166 || yIndex > (S->numCols - 1))
<> 139:856d2700e60b 7167 {
<> 139:856d2700e60b 7168 return (0);
<> 139:856d2700e60b 7169 }
<> 139:856d2700e60b 7170
<> 139:856d2700e60b 7171 /* Calculation of index for two nearest points in X-direction */
<> 139:856d2700e60b 7172 index = (xIndex - 1) + (yIndex - 1) * S->numCols;
<> 139:856d2700e60b 7173
<> 139:856d2700e60b 7174
<> 139:856d2700e60b 7175 /* Read two nearest points in X-direction */
<> 139:856d2700e60b 7176 f00 = pData[index];
<> 139:856d2700e60b 7177 f01 = pData[index + 1];
<> 139:856d2700e60b 7178
<> 139:856d2700e60b 7179 /* Calculation of index for two nearest points in Y-direction */
<> 139:856d2700e60b 7180 index = (xIndex - 1) + (yIndex) * S->numCols;
<> 139:856d2700e60b 7181
<> 139:856d2700e60b 7182
<> 139:856d2700e60b 7183 /* Read two nearest points in Y-direction */
<> 139:856d2700e60b 7184 f10 = pData[index];
<> 139:856d2700e60b 7185 f11 = pData[index + 1];
<> 139:856d2700e60b 7186
<> 139:856d2700e60b 7187 /* Calculation of intermediate values */
<> 139:856d2700e60b 7188 b1 = f00;
<> 139:856d2700e60b 7189 b2 = f01 - f00;
<> 139:856d2700e60b 7190 b3 = f10 - f00;
<> 139:856d2700e60b 7191 b4 = f00 - f01 - f10 + f11;
<> 139:856d2700e60b 7192
<> 139:856d2700e60b 7193 /* Calculation of fractional part in X */
<> 139:856d2700e60b 7194 xdiff = X - xIndex;
<> 139:856d2700e60b 7195
<> 139:856d2700e60b 7196 /* Calculation of fractional part in Y */
<> 139:856d2700e60b 7197 ydiff = Y - yIndex;
<> 139:856d2700e60b 7198
<> 139:856d2700e60b 7199 /* Calculation of bi-linear interpolated output */
<> 139:856d2700e60b 7200 out = b1 + b2 * xdiff + b3 * ydiff + b4 * xdiff * ydiff;
<> 139:856d2700e60b 7201
<> 139:856d2700e60b 7202 /* return to application */
<> 139:856d2700e60b 7203 return (out);
<> 139:856d2700e60b 7204
<> 139:856d2700e60b 7205 }
<> 139:856d2700e60b 7206
<> 139:856d2700e60b 7207 /**
<> 139:856d2700e60b 7208 *
<> 139:856d2700e60b 7209 * @brief Q31 bilinear interpolation.
<> 139:856d2700e60b 7210 * @param[in,out] *S points to an instance of the interpolation structure.
<> 139:856d2700e60b 7211 * @param[in] X interpolation coordinate in 12.20 format.
<> 139:856d2700e60b 7212 * @param[in] Y interpolation coordinate in 12.20 format.
<> 139:856d2700e60b 7213 * @return out interpolated value.
<> 139:856d2700e60b 7214 */
<> 139:856d2700e60b 7215
<> 139:856d2700e60b 7216 static __INLINE q31_t arm_bilinear_interp_q31(
<> 139:856d2700e60b 7217 arm_bilinear_interp_instance_q31 * S,
<> 139:856d2700e60b 7218 q31_t X,
<> 139:856d2700e60b 7219 q31_t Y)
<> 139:856d2700e60b 7220 {
<> 139:856d2700e60b 7221 q31_t out; /* Temporary output */
<> 139:856d2700e60b 7222 q31_t acc = 0; /* output */
<> 139:856d2700e60b 7223 q31_t xfract, yfract; /* X, Y fractional parts */
<> 139:856d2700e60b 7224 q31_t x1, x2, y1, y2; /* Nearest output values */
<> 139:856d2700e60b 7225 int32_t rI, cI; /* Row and column indices */
<> 139:856d2700e60b 7226 q31_t *pYData = S->pData; /* pointer to output table values */
<> 139:856d2700e60b 7227 uint32_t nCols = S->numCols; /* num of rows */
<> 139:856d2700e60b 7228
<> 139:856d2700e60b 7229
<> 139:856d2700e60b 7230 /* Input is in 12.20 format */
<> 139:856d2700e60b 7231 /* 12 bits for the table index */
<> 139:856d2700e60b 7232 /* Index value calculation */
<> 139:856d2700e60b 7233 rI = ((X & 0xFFF00000) >> 20u);
<> 139:856d2700e60b 7234
<> 139:856d2700e60b 7235 /* Input is in 12.20 format */
<> 139:856d2700e60b 7236 /* 12 bits for the table index */
<> 139:856d2700e60b 7237 /* Index value calculation */
<> 139:856d2700e60b 7238 cI = ((Y & 0xFFF00000) >> 20u);
<> 139:856d2700e60b 7239
<> 139:856d2700e60b 7240 /* Care taken for table outside boundary */
<> 139:856d2700e60b 7241 /* Returns zero output when values are outside table boundary */
<> 139:856d2700e60b 7242 if(rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
<> 139:856d2700e60b 7243 {
<> 139:856d2700e60b 7244 return (0);
<> 139:856d2700e60b 7245 }
<> 139:856d2700e60b 7246
<> 139:856d2700e60b 7247 /* 20 bits for the fractional part */
<> 139:856d2700e60b 7248 /* shift left xfract by 11 to keep 1.31 format */
<> 139:856d2700e60b 7249 xfract = (X & 0x000FFFFF) << 11u;
<> 139:856d2700e60b 7250
<> 139:856d2700e60b 7251 /* Read two nearest output values from the index */
<> 139:856d2700e60b 7252 x1 = pYData[(rI) + nCols * (cI)];
<> 139:856d2700e60b 7253 x2 = pYData[(rI) + nCols * (cI) + 1u];
<> 139:856d2700e60b 7254
<> 139:856d2700e60b 7255 /* 20 bits for the fractional part */
<> 139:856d2700e60b 7256 /* shift left yfract by 11 to keep 1.31 format */
<> 139:856d2700e60b 7257 yfract = (Y & 0x000FFFFF) << 11u;
<> 139:856d2700e60b 7258
<> 139:856d2700e60b 7259 /* Read two nearest output values from the index */
<> 139:856d2700e60b 7260 y1 = pYData[(rI) + nCols * (cI + 1)];
<> 139:856d2700e60b 7261 y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
<> 139:856d2700e60b 7262
<> 139:856d2700e60b 7263 /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 3.29(q29) format */
<> 139:856d2700e60b 7264 out = ((q31_t) (((q63_t) x1 * (0x7FFFFFFF - xfract)) >> 32));
<> 139:856d2700e60b 7265 acc = ((q31_t) (((q63_t) out * (0x7FFFFFFF - yfract)) >> 32));
<> 139:856d2700e60b 7266
<> 139:856d2700e60b 7267 /* x2 * (xfract) * (1-yfract) in 3.29(q29) and adding to acc */
<> 139:856d2700e60b 7268 out = ((q31_t) ((q63_t) x2 * (0x7FFFFFFF - yfract) >> 32));
<> 139:856d2700e60b 7269 acc += ((q31_t) ((q63_t) out * (xfract) >> 32));
<> 139:856d2700e60b 7270
<> 139:856d2700e60b 7271 /* y1 * (1 - xfract) * (yfract) in 3.29(q29) and adding to acc */
<> 139:856d2700e60b 7272 out = ((q31_t) ((q63_t) y1 * (0x7FFFFFFF - xfract) >> 32));
<> 139:856d2700e60b 7273 acc += ((q31_t) ((q63_t) out * (yfract) >> 32));
<> 139:856d2700e60b 7274
<> 139:856d2700e60b 7275 /* y2 * (xfract) * (yfract) in 3.29(q29) and adding to acc */
<> 139:856d2700e60b 7276 out = ((q31_t) ((q63_t) y2 * (xfract) >> 32));
<> 139:856d2700e60b 7277 acc += ((q31_t) ((q63_t) out * (yfract) >> 32));
<> 139:856d2700e60b 7278
<> 139:856d2700e60b 7279 /* Convert acc to 1.31(q31) format */
<> 139:856d2700e60b 7280 return (acc << 2u);
<> 139:856d2700e60b 7281
<> 139:856d2700e60b 7282 }
<> 139:856d2700e60b 7283
<> 139:856d2700e60b 7284 /**
<> 139:856d2700e60b 7285 * @brief Q15 bilinear interpolation.
<> 139:856d2700e60b 7286 * @param[in,out] *S points to an instance of the interpolation structure.
<> 139:856d2700e60b 7287 * @param[in] X interpolation coordinate in 12.20 format.
<> 139:856d2700e60b 7288 * @param[in] Y interpolation coordinate in 12.20 format.
<> 139:856d2700e60b 7289 * @return out interpolated value.
<> 139:856d2700e60b 7290 */
<> 139:856d2700e60b 7291
<> 139:856d2700e60b 7292 static __INLINE q15_t arm_bilinear_interp_q15(
<> 139:856d2700e60b 7293 arm_bilinear_interp_instance_q15 * S,
<> 139:856d2700e60b 7294 q31_t X,
<> 139:856d2700e60b 7295 q31_t Y)
<> 139:856d2700e60b 7296 {
<> 139:856d2700e60b 7297 q63_t acc = 0; /* output */
<> 139:856d2700e60b 7298 q31_t out; /* Temporary output */
<> 139:856d2700e60b 7299 q15_t x1, x2, y1, y2; /* Nearest output values */
<> 139:856d2700e60b 7300 q31_t xfract, yfract; /* X, Y fractional parts */
<> 139:856d2700e60b 7301 int32_t rI, cI; /* Row and column indices */
<> 139:856d2700e60b 7302 q15_t *pYData = S->pData; /* pointer to output table values */
<> 139:856d2700e60b 7303 uint32_t nCols = S->numCols; /* num of rows */
<> 139:856d2700e60b 7304
<> 139:856d2700e60b 7305 /* Input is in 12.20 format */
<> 139:856d2700e60b 7306 /* 12 bits for the table index */
<> 139:856d2700e60b 7307 /* Index value calculation */
<> 139:856d2700e60b 7308 rI = ((X & 0xFFF00000) >> 20);
<> 139:856d2700e60b 7309
<> 139:856d2700e60b 7310 /* Input is in 12.20 format */
<> 139:856d2700e60b 7311 /* 12 bits for the table index */
<> 139:856d2700e60b 7312 /* Index value calculation */
<> 139:856d2700e60b 7313 cI = ((Y & 0xFFF00000) >> 20);
<> 139:856d2700e60b 7314
<> 139:856d2700e60b 7315 /* Care taken for table outside boundary */
<> 139:856d2700e60b 7316 /* Returns zero output when values are outside table boundary */
<> 139:856d2700e60b 7317 if(rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
<> 139:856d2700e60b 7318 {
<> 139:856d2700e60b 7319 return (0);
<> 139:856d2700e60b 7320 }
<> 139:856d2700e60b 7321
<> 139:856d2700e60b 7322 /* 20 bits for the fractional part */
<> 139:856d2700e60b 7323 /* xfract should be in 12.20 format */
<> 139:856d2700e60b 7324 xfract = (X & 0x000FFFFF);
<> 139:856d2700e60b 7325
<> 139:856d2700e60b 7326 /* Read two nearest output values from the index */
<> 139:856d2700e60b 7327 x1 = pYData[(rI) + nCols * (cI)];
<> 139:856d2700e60b 7328 x2 = pYData[(rI) + nCols * (cI) + 1u];
<> 139:856d2700e60b 7329
<> 139:856d2700e60b 7330
<> 139:856d2700e60b 7331 /* 20 bits for the fractional part */
<> 139:856d2700e60b 7332 /* yfract should be in 12.20 format */
<> 139:856d2700e60b 7333 yfract = (Y & 0x000FFFFF);
<> 139:856d2700e60b 7334
<> 139:856d2700e60b 7335 /* Read two nearest output values from the index */
<> 139:856d2700e60b 7336 y1 = pYData[(rI) + nCols * (cI + 1)];
<> 139:856d2700e60b 7337 y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
<> 139:856d2700e60b 7338
<> 139:856d2700e60b 7339 /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 13.51 format */
<> 139:856d2700e60b 7340
<> 139:856d2700e60b 7341 /* x1 is in 1.15(q15), xfract in 12.20 format and out is in 13.35 format */
<> 139:856d2700e60b 7342 /* convert 13.35 to 13.31 by right shifting and out is in 1.31 */
<> 139:856d2700e60b 7343 out = (q31_t) (((q63_t) x1 * (0xFFFFF - xfract)) >> 4u);
<> 139:856d2700e60b 7344 acc = ((q63_t) out * (0xFFFFF - yfract));
<> 139:856d2700e60b 7345
<> 139:856d2700e60b 7346 /* x2 * (xfract) * (1-yfract) in 1.51 and adding to acc */
<> 139:856d2700e60b 7347 out = (q31_t) (((q63_t) x2 * (0xFFFFF - yfract)) >> 4u);
<> 139:856d2700e60b 7348 acc += ((q63_t) out * (xfract));
<> 139:856d2700e60b 7349
<> 139:856d2700e60b 7350 /* y1 * (1 - xfract) * (yfract) in 1.51 and adding to acc */
<> 139:856d2700e60b 7351 out = (q31_t) (((q63_t) y1 * (0xFFFFF - xfract)) >> 4u);
<> 139:856d2700e60b 7352 acc += ((q63_t) out * (yfract));
<> 139:856d2700e60b 7353
<> 139:856d2700e60b 7354 /* y2 * (xfract) * (yfract) in 1.51 and adding to acc */
<> 139:856d2700e60b 7355 out = (q31_t) (((q63_t) y2 * (xfract)) >> 4u);
<> 139:856d2700e60b 7356 acc += ((q63_t) out * (yfract));
<> 139:856d2700e60b 7357
<> 139:856d2700e60b 7358 /* acc is in 13.51 format and down shift acc by 36 times */
<> 139:856d2700e60b 7359 /* Convert out to 1.15 format */
<> 139:856d2700e60b 7360 return (acc >> 36);
<> 139:856d2700e60b 7361
<> 139:856d2700e60b 7362 }
<> 139:856d2700e60b 7363
<> 139:856d2700e60b 7364 /**
<> 139:856d2700e60b 7365 * @brief Q7 bilinear interpolation.
<> 139:856d2700e60b 7366 * @param[in,out] *S points to an instance of the interpolation structure.
<> 139:856d2700e60b 7367 * @param[in] X interpolation coordinate in 12.20 format.
<> 139:856d2700e60b 7368 * @param[in] Y interpolation coordinate in 12.20 format.
<> 139:856d2700e60b 7369 * @return out interpolated value.
<> 139:856d2700e60b 7370 */
<> 139:856d2700e60b 7371
<> 139:856d2700e60b 7372 static __INLINE q7_t arm_bilinear_interp_q7(
<> 139:856d2700e60b 7373 arm_bilinear_interp_instance_q7 * S,
<> 139:856d2700e60b 7374 q31_t X,
<> 139:856d2700e60b 7375 q31_t Y)
<> 139:856d2700e60b 7376 {
<> 139:856d2700e60b 7377 q63_t acc = 0; /* output */
<> 139:856d2700e60b 7378 q31_t out; /* Temporary output */
<> 139:856d2700e60b 7379 q31_t xfract, yfract; /* X, Y fractional parts */
<> 139:856d2700e60b 7380 q7_t x1, x2, y1, y2; /* Nearest output values */
<> 139:856d2700e60b 7381 int32_t rI, cI; /* Row and column indices */
<> 139:856d2700e60b 7382 q7_t *pYData = S->pData; /* pointer to output table values */
<> 139:856d2700e60b 7383 uint32_t nCols = S->numCols; /* num of rows */
<> 139:856d2700e60b 7384
<> 139:856d2700e60b 7385 /* Input is in 12.20 format */
<> 139:856d2700e60b 7386 /* 12 bits for the table index */
<> 139:856d2700e60b 7387 /* Index value calculation */
<> 139:856d2700e60b 7388 rI = ((X & 0xFFF00000) >> 20);
<> 139:856d2700e60b 7389
<> 139:856d2700e60b 7390 /* Input is in 12.20 format */
<> 139:856d2700e60b 7391 /* 12 bits for the table index */
<> 139:856d2700e60b 7392 /* Index value calculation */
<> 139:856d2700e60b 7393 cI = ((Y & 0xFFF00000) >> 20);
<> 139:856d2700e60b 7394
<> 139:856d2700e60b 7395 /* Care taken for table outside boundary */
<> 139:856d2700e60b 7396 /* Returns zero output when values are outside table boundary */
<> 139:856d2700e60b 7397 if(rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
<> 139:856d2700e60b 7398 {
<> 139:856d2700e60b 7399 return (0);
<> 139:856d2700e60b 7400 }
<> 139:856d2700e60b 7401
<> 139:856d2700e60b 7402 /* 20 bits for the fractional part */
<> 139:856d2700e60b 7403 /* xfract should be in 12.20 format */
<> 139:856d2700e60b 7404 xfract = (X & 0x000FFFFF);
<> 139:856d2700e60b 7405
<> 139:856d2700e60b 7406 /* Read two nearest output values from the index */
<> 139:856d2700e60b 7407 x1 = pYData[(rI) + nCols * (cI)];
<> 139:856d2700e60b 7408 x2 = pYData[(rI) + nCols * (cI) + 1u];
<> 139:856d2700e60b 7409
<> 139:856d2700e60b 7410
<> 139:856d2700e60b 7411 /* 20 bits for the fractional part */
<> 139:856d2700e60b 7412 /* yfract should be in 12.20 format */
<> 139:856d2700e60b 7413 yfract = (Y & 0x000FFFFF);
<> 139:856d2700e60b 7414
<> 139:856d2700e60b 7415 /* Read two nearest output values from the index */
<> 139:856d2700e60b 7416 y1 = pYData[(rI) + nCols * (cI + 1)];
<> 139:856d2700e60b 7417 y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
<> 139:856d2700e60b 7418
<> 139:856d2700e60b 7419 /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 16.47 format */
<> 139:856d2700e60b 7420 out = ((x1 * (0xFFFFF - xfract)));
<> 139:856d2700e60b 7421 acc = (((q63_t) out * (0xFFFFF - yfract)));
<> 139:856d2700e60b 7422
<> 139:856d2700e60b 7423 /* x2 * (xfract) * (1-yfract) in 2.22 and adding to acc */
<> 139:856d2700e60b 7424 out = ((x2 * (0xFFFFF - yfract)));
<> 139:856d2700e60b 7425 acc += (((q63_t) out * (xfract)));
<> 139:856d2700e60b 7426
<> 139:856d2700e60b 7427 /* y1 * (1 - xfract) * (yfract) in 2.22 and adding to acc */
<> 139:856d2700e60b 7428 out = ((y1 * (0xFFFFF - xfract)));
<> 139:856d2700e60b 7429 acc += (((q63_t) out * (yfract)));
<> 139:856d2700e60b 7430
<> 139:856d2700e60b 7431 /* y2 * (xfract) * (yfract) in 2.22 and adding to acc */
<> 139:856d2700e60b 7432 out = ((y2 * (yfract)));
<> 139:856d2700e60b 7433 acc += (((q63_t) out * (xfract)));
<> 139:856d2700e60b 7434
<> 139:856d2700e60b 7435 /* acc in 16.47 format and down shift by 40 to convert to 1.7 format */
<> 139:856d2700e60b 7436 return (acc >> 40);
<> 139:856d2700e60b 7437
<> 139:856d2700e60b 7438 }
<> 139:856d2700e60b 7439
<> 139:856d2700e60b 7440 /**
<> 139:856d2700e60b 7441 * @} end of BilinearInterpolate group
<> 139:856d2700e60b 7442 */
<> 139:856d2700e60b 7443
<> 139:856d2700e60b 7444
<> 139:856d2700e60b 7445 //SMMLAR
<> 139:856d2700e60b 7446 #define multAcc_32x32_keep32_R(a, x, y) \
<> 139:856d2700e60b 7447 a = (q31_t) (((((q63_t) a) << 32) + ((q63_t) x * y) + 0x80000000LL ) >> 32)
<> 139:856d2700e60b 7448
<> 139:856d2700e60b 7449 //SMMLSR
<> 139:856d2700e60b 7450 #define multSub_32x32_keep32_R(a, x, y) \
<> 139:856d2700e60b 7451 a = (q31_t) (((((q63_t) a) << 32) - ((q63_t) x * y) + 0x80000000LL ) >> 32)
<> 139:856d2700e60b 7452
<> 139:856d2700e60b 7453 //SMMULR
<> 139:856d2700e60b 7454 #define mult_32x32_keep32_R(a, x, y) \
<> 139:856d2700e60b 7455 a = (q31_t) (((q63_t) x * y + 0x80000000LL ) >> 32)
<> 139:856d2700e60b 7456
<> 139:856d2700e60b 7457 //SMMLA
<> 139:856d2700e60b 7458 #define multAcc_32x32_keep32(a, x, y) \
<> 139:856d2700e60b 7459 a += (q31_t) (((q63_t) x * y) >> 32)
<> 139:856d2700e60b 7460
<> 139:856d2700e60b 7461 //SMMLS
<> 139:856d2700e60b 7462 #define multSub_32x32_keep32(a, x, y) \
<> 139:856d2700e60b 7463 a -= (q31_t) (((q63_t) x * y) >> 32)
<> 139:856d2700e60b 7464
<> 139:856d2700e60b 7465 //SMMUL
<> 139:856d2700e60b 7466 #define mult_32x32_keep32(a, x, y) \
<> 139:856d2700e60b 7467 a = (q31_t) (((q63_t) x * y ) >> 32)
<> 139:856d2700e60b 7468
<> 139:856d2700e60b 7469
<> 139:856d2700e60b 7470 #if defined ( __CC_ARM ) //Keil
<> 139:856d2700e60b 7471
<> 139:856d2700e60b 7472 //Enter low optimization region - place directly above function definition
<> 139:856d2700e60b 7473 #ifdef ARM_MATH_CM4
<> 139:856d2700e60b 7474 #define LOW_OPTIMIZATION_ENTER \
<> 139:856d2700e60b 7475 _Pragma ("push") \
<> 139:856d2700e60b 7476 _Pragma ("O1")
<> 139:856d2700e60b 7477 #else
<> 139:856d2700e60b 7478 #define LOW_OPTIMIZATION_ENTER
<> 139:856d2700e60b 7479 #endif
<> 139:856d2700e60b 7480
<> 139:856d2700e60b 7481 //Exit low optimization region - place directly after end of function definition
<> 139:856d2700e60b 7482 #ifdef ARM_MATH_CM4
<> 139:856d2700e60b 7483 #define LOW_OPTIMIZATION_EXIT \
<> 139:856d2700e60b 7484 _Pragma ("pop")
<> 139:856d2700e60b 7485 #else
<> 139:856d2700e60b 7486 #define LOW_OPTIMIZATION_EXIT
<> 139:856d2700e60b 7487 #endif
<> 139:856d2700e60b 7488
<> 139:856d2700e60b 7489 //Enter low optimization region - place directly above function definition
<> 139:856d2700e60b 7490 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
<> 139:856d2700e60b 7491
<> 139:856d2700e60b 7492 //Exit low optimization region - place directly after end of function definition
<> 139:856d2700e60b 7493 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 139:856d2700e60b 7494
<> 139:856d2700e60b 7495 #elif defined(__ICCARM__) //IAR
<> 139:856d2700e60b 7496
<> 139:856d2700e60b 7497 //Enter low optimization region - place directly above function definition
<> 139:856d2700e60b 7498 #ifdef ARM_MATH_CM4
<> 139:856d2700e60b 7499 #define LOW_OPTIMIZATION_ENTER \
<> 139:856d2700e60b 7500 _Pragma ("optimize=low")
<> 139:856d2700e60b 7501 #else
<> 139:856d2700e60b 7502 #define LOW_OPTIMIZATION_ENTER
<> 139:856d2700e60b 7503 #endif
<> 139:856d2700e60b 7504
<> 139:856d2700e60b 7505 //Exit low optimization region - place directly after end of function definition
<> 139:856d2700e60b 7506 #define LOW_OPTIMIZATION_EXIT
<> 139:856d2700e60b 7507
<> 139:856d2700e60b 7508 //Enter low optimization region - place directly above function definition
<> 139:856d2700e60b 7509 #ifdef ARM_MATH_CM4
<> 139:856d2700e60b 7510 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER \
<> 139:856d2700e60b 7511 _Pragma ("optimize=low")
<> 139:856d2700e60b 7512 #else
<> 139:856d2700e60b 7513 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
<> 139:856d2700e60b 7514 #endif
<> 139:856d2700e60b 7515
<> 139:856d2700e60b 7516 //Exit low optimization region - place directly after end of function definition
<> 139:856d2700e60b 7517 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 139:856d2700e60b 7518
<> 139:856d2700e60b 7519 #elif defined(__GNUC__)
<> 139:856d2700e60b 7520
<> 139:856d2700e60b 7521 #define LOW_OPTIMIZATION_ENTER __attribute__(( optimize("-O1") ))
<> 139:856d2700e60b 7522
<> 139:856d2700e60b 7523 #define LOW_OPTIMIZATION_EXIT
<> 139:856d2700e60b 7524
<> 139:856d2700e60b 7525 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
<> 139:856d2700e60b 7526
<> 139:856d2700e60b 7527 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 139:856d2700e60b 7528
<> 139:856d2700e60b 7529 #elif defined(__CSMC__) // Cosmic
<> 139:856d2700e60b 7530
<> 139:856d2700e60b 7531 #define LOW_OPTIMIZATION_ENTER
<> 139:856d2700e60b 7532 #define LOW_OPTIMIZATION_EXIT
<> 139:856d2700e60b 7533 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
<> 139:856d2700e60b 7534 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 139:856d2700e60b 7535
<> 139:856d2700e60b 7536 #elif defined(__TASKING__) // TASKING
<> 139:856d2700e60b 7537
<> 139:856d2700e60b 7538 #define LOW_OPTIMIZATION_ENTER
<> 139:856d2700e60b 7539 #define LOW_OPTIMIZATION_EXIT
<> 139:856d2700e60b 7540 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
<> 139:856d2700e60b 7541 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 139:856d2700e60b 7542
<> 139:856d2700e60b 7543 #endif
<> 139:856d2700e60b 7544
<> 139:856d2700e60b 7545
<> 139:856d2700e60b 7546 #ifdef __cplusplus
<> 139:856d2700e60b 7547 }
<> 139:856d2700e60b 7548 #endif
<> 139:856d2700e60b 7549
<> 139:856d2700e60b 7550
<> 139:856d2700e60b 7551 #endif /* _ARM_MATH_H */
<> 139:856d2700e60b 7552
<> 139:856d2700e60b 7553 /**
<> 139:856d2700e60b 7554 *
<> 139:856d2700e60b 7555 * End of file.
<> 139:856d2700e60b 7556 */