86 q7_t *pb = pScratchIn;
89 uint32_t delaySize = S->
maxDelay + blockSize;
92 uint32_t tapCnt, blkCnt;
93 q7_t coeff = *pCoeffs++;
94 q31_t *pScr2 = pScratchOut;
98 #ifndef ARM_MATH_CM0_FAMILY 102 q7_t in1, in2, in3, in4;
106 arm_circularWrite_q7(py, (int32_t) delaySize, &S->
stateIndex, 1, pSrc, 1,
113 readIndex = ((int32_t) S->
stateIndex - (int32_t) blockSize) - *pTapDelay++;
118 readIndex += (int32_t) delaySize;
125 arm_circularRead_q7(py, (int32_t) delaySize, &readIndex, 1, pb, pb,
126 (int32_t) blockSize, 1, blockSize);
136 blkCnt = blockSize >> 2;
141 *pScratchOut++ = ((
q31_t) * px++ * coeff);
142 *pScratchOut++ = ((
q31_t) * px++ * coeff);
143 *pScratchOut++ = ((
q31_t) * px++ * coeff);
144 *pScratchOut++ = ((
q31_t) * px++ * coeff);
152 blkCnt = blockSize % 0x4u;
157 *pScratchOut++ = ((
q31_t) * px++ * coeff);
168 readIndex = ((int32_t) S->
stateIndex - (int32_t) blockSize) - *pTapDelay++;
173 readIndex += (int32_t) delaySize;
177 tapCnt = (uint32_t) numTaps - 2u;
185 arm_circularRead_q7(py, (int32_t) delaySize, &readIndex, 1, pb, pb,
186 (int32_t) blockSize, 1, blockSize);
196 blkCnt = blockSize >> 2;
201 in = *pScratchOut + ((
q31_t) * px++ * coeff);
203 in = *pScratchOut + ((
q31_t) * px++ * coeff);
205 in = *pScratchOut + ((
q31_t) * px++ * coeff);
207 in = *pScratchOut + ((
q31_t) * px++ * coeff);
216 blkCnt = blockSize % 0x4u;
221 in = *pScratchOut + ((
q31_t) * px++ * coeff);
234 (int32_t) blockSize) - *pTapDelay++;
239 readIndex += (int32_t) delaySize;
252 arm_circularRead_q7(py, (int32_t) delaySize, &readIndex, 1, pb, pb,
253 (int32_t) blockSize, 1, blockSize);
263 blkCnt = blockSize >> 2;
268 in = *pScratchOut + ((
q31_t) * px++ * coeff);
270 in = *pScratchOut + ((
q31_t) * px++ * coeff);
272 in = *pScratchOut + ((
q31_t) * px++ * coeff);
274 in = *pScratchOut + ((
q31_t) * px++ * coeff);
283 blkCnt = blockSize % 0x4u;
288 in = *pScratchOut + ((
q31_t) * px++ * coeff);
298 blkCnt = blockSize >> 2;
302 in1 = (
q7_t) __SSAT(*pScr2++ >> 7, 8);
303 in2 = (
q7_t) __SSAT(*pScr2++ >> 7, 8);
304 in3 = (
q7_t) __SSAT(*pScr2++ >> 7, 8);
305 in4 = (
q7_t) __SSAT(*pScr2++ >> 7, 8);
315 blkCnt = blockSize % 0x4u;
319 *pOut++ = (
q7_t) __SSAT(*pScr2++ >> 7, 8);
331 arm_circularWrite_q7(py, (int32_t) delaySize, &S->
stateIndex, 1, pSrc, 1,
338 readIndex = ((int32_t) S->
stateIndex - (int32_t) blockSize) - *pTapDelay++;
343 readIndex += (int32_t) delaySize;
350 arm_circularRead_q7(py, (int32_t) delaySize, &readIndex, 1, pb, pb,
351 (int32_t) blockSize, 1, blockSize);
365 *pScratchOut++ = ((
q31_t) * px++ * coeff);
376 readIndex = ((int32_t) S->
stateIndex - (int32_t) blockSize) - *pTapDelay++;
381 readIndex += (int32_t) delaySize;
385 tapCnt = (uint32_t) numTaps - 2u;
393 arm_circularRead_q7(py, (int32_t) delaySize, &readIndex, 1, pb, pb,
394 (int32_t) blockSize, 1, blockSize);
408 in = *pScratchOut + ((
q31_t) * px++ * coeff);
421 ((int32_t) S->
stateIndex - (int32_t) blockSize) - *pTapDelay++;
426 readIndex += (int32_t) delaySize;
439 arm_circularRead_q7(py, (int32_t) delaySize, &readIndex, 1, pb, pb,
440 (int32_t) blockSize, 1, blockSize);
454 in = *pScratchOut + ((
q31_t) * px++ * coeff);
468 *pOut++ = (
q7_t) __SSAT(*pScr2++ >> 7, 8);
int8_t q7_t
8-bit fractional data type in 1.7 format.
#define __PACKq7(v0, v1, v2, v3)
definition to pack four 8 bit values.
Instance structure for the Q7 sparse FIR filter.
void arm_fir_sparse_q7(arm_fir_sparse_instance_q7 *S, q7_t *pSrc, q7_t *pDst, q7_t *pScratchIn, q31_t *pScratchOut, uint32_t blockSize)
Processing function for the Q7 sparse FIR filter.
#define __SIMD32(addr)
definition to read/write two 16 bit values.
int32_t q31_t
32-bit fractional data type in 1.31 format.