82 q31_t sum, acc0, acc1, acc2, acc3;
83 q31_t x0, x1, x2, x3, c0;
84 uint32_t j, k, count, check, blkCnt;
85 int32_t blockSize1, blockSize2, blockSize3;
90 if((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u))))
101 if(srcALen >= srcBLen)
125 check = firstIndex + numPoints;
126 blockSize3 = ((int32_t)check > (int32_t)srcALen) ? (int32_t)check - (int32_t)srcALen : 0;
127 blockSize3 = ((int32_t)firstIndex > (int32_t)srcALen - 1) ? blockSize3 - (int32_t)firstIndex + (int32_t)srcALen : blockSize3;
128 blockSize1 = (((int32_t) srcBLen - 1) - (int32_t) firstIndex);
129 blockSize1 = (blockSize1 > 0) ? ((check > (srcBLen - 1u)) ? blockSize1 :
130 (int32_t) numPoints) : 0;
131 blockSize2 = (int32_t) check - ((blockSize3 + blockSize1) +
132 (int32_t) firstIndex);
133 blockSize2 = (blockSize2 > 0) ? blockSize2 : 0;
146 pOut = pDst + firstIndex;
162 count = 1u + firstIndex;
168 pSrc2 = pIn2 + firstIndex;
176 while(blockSize1 > 0)
190 ((
q63_t) * px++ * (*py--))) >> 32);
194 ((
q63_t) * px++ * (*py--))) >> 32);
198 ((
q63_t) * px++ * (*py--))) >> 32);
202 ((
q63_t) * px++ * (*py--))) >> 32);
216 ((
q63_t) * px++ * (*py--))) >> 32);
247 if((int32_t)firstIndex - (int32_t)srcBLen + 1 > 0)
249 px = pIn1 + firstIndex - srcBLen + 1;
257 pSrc2 = pIn2 + (srcBLen - 1u);
273 blkCnt = ((uint32_t) blockSize2 >> 2u);
303 acc0 = (
q31_t) ((((
q63_t) acc0 << 32) + ((q63_t) x0 * c0)) >> 32);
306 acc1 = (
q31_t) ((((
q63_t) acc1 << 32) + ((q63_t) x1 * c0)) >> 32);
309 acc2 = (
q31_t) ((((
q63_t) acc2 << 32) + ((q63_t) x2 * c0)) >> 32);
312 acc3 = (
q31_t) ((((
q63_t) acc3 << 32) + ((q63_t) x3 * c0)) >> 32);
322 acc0 = (
q31_t) ((((
q63_t) acc0 << 32) + ((q63_t) x1 * c0)) >> 32);
324 acc1 = (
q31_t) ((((
q63_t) acc1 << 32) + ((q63_t) x2 * c0)) >> 32);
326 acc2 = (
q31_t) ((((
q63_t) acc2 << 32) + ((q63_t) x3 * c0)) >> 32);
328 acc3 = (
q31_t) ((((
q63_t) acc3 << 32) + ((q63_t) x0 * c0)) >> 32);
338 acc0 = (
q31_t) ((((
q63_t) acc0 << 32) + ((q63_t) x2 * c0)) >> 32);
340 acc1 = (
q31_t) ((((
q63_t) acc1 << 32) + ((q63_t) x3 * c0)) >> 32);
342 acc2 = (
q31_t) ((((
q63_t) acc2 << 32) + ((q63_t) x0 * c0)) >> 32);
344 acc3 = (
q31_t) ((((
q63_t) acc3 << 32) + ((q63_t) x1 * c0)) >> 32);
354 acc0 = (
q31_t) ((((
q63_t) acc0 << 32) + ((q63_t) x3 * c0)) >> 32);
356 acc1 = (
q31_t) ((((
q63_t) acc1 << 32) + ((q63_t) x0 * c0)) >> 32);
358 acc2 = (
q31_t) ((((
q63_t) acc2 << 32) + ((q63_t) x1 * c0)) >> 32);
360 acc3 = (
q31_t) ((((
q63_t) acc3 << 32) + ((q63_t) x2 * c0)) >> 32);
379 acc0 = (
q31_t) ((((
q63_t) acc0 << 32) + ((q63_t) x0 * c0)) >> 32);
381 acc1 = (
q31_t) ((((
q63_t) acc1 << 32) + ((q63_t) x1 * c0)) >> 32);
383 acc2 = (
q31_t) ((((
q63_t) acc2 << 32) + ((q63_t) x2 * c0)) >> 32);
385 acc3 = (
q31_t) ((((
q63_t) acc3 << 32) + ((q63_t) x3 * c0)) >> 32);
397 *pOut++ = (
q31_t) (acc0 << 1);
398 *pOut++ = (
q31_t) (acc1 << 1);
399 *pOut++ = (
q31_t) (acc2 << 1);
400 *pOut++ = (
q31_t) (acc3 << 1);
415 blkCnt = (uint32_t) blockSize2 % 0x4u;
431 ((
q63_t) * px++ * (*py--))) >> 32);
433 ((
q63_t) * px++ * (*py--))) >> 32);
435 ((
q63_t) * px++ * (*py--))) >> 32);
437 ((
q63_t) * px++ * (*py--))) >> 32);
451 ((
q63_t) * px++ * (*py--))) >> 32);
475 blkCnt = (uint32_t) blockSize2;
489 ((
q63_t) * px++ * (*py--))) >> 32);
524 count = srcBLen - 1u;
527 pSrc1 = (pIn1 + srcALen) - (srcBLen - 1u);
531 pSrc2 = pIn2 + (srcBLen - 1u);
538 while(blockSize3 > 0)
552 ((
q63_t) * px++ * (*py--))) >> 32);
556 ((
q63_t) * px++ * (*py--))) >> 32);
560 ((
q63_t) * px++ * (*py--))) >> 32);
564 ((
q63_t) * px++ * (*py--))) >> 32);
579 ((
q63_t) * px++ * (*py--))) >> 32);
int64_t q63_t
64-bit fractional data type in 1.63 format.
arm_status arm_conv_partial_fast_q31(q31_t *pSrcA, uint32_t srcALen, q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst, uint32_t firstIndex, uint32_t numPoints)
Partial convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4.
int32_t q31_t
32-bit fractional data type in 1.31 format.
arm_status
Error status returned by some functions in the library.