Changeset 2916a33 in rtems
- Timestamp:
-
01/12/16 13:20:29
(6 years ago)
- Author:
- Sebastian Huber <sebastian.huber@…>
- Branches:
- 5, master
- Children:
- b32a9cd
- Parents:
- bbccdb5
- git-author:
- Sebastian Huber <sebastian.huber@…> (01/12/16 13:20:29)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (01/19/16 07:36:19)
- Message:
-
bsps/arm: Update CMSIS/Include
Remove duplicate and outdated files.
- Location:
- c/src/lib/libbsp/arm
-
Files:
-
- 7 added
- 16 deleted
- 10 moved
Legend:
- Unmodified
- Added
- Removed
-
rbbccdb5
|
r2916a33
|
|
2 | 2 | * Copyright (C) 2010-2014 ARM Limited. All rights reserved. |
3 | 3 | * |
4 | | * $Date: 19. March 2015 |
5 | | * $Revision: V.1.4.5 |
| 4 | * $Date: 19. October 2015 |
| 5 | * $Revision: V.1.4.5 a |
6 | 6 | * |
7 | 7 | * Project: CMSIS DSP Library |
… |
… |
|
47 | 47 | extern const q15_t armRecipTableQ15[64]; |
48 | 48 | extern const q31_t armRecipTableQ31[64]; |
49 | | //extern const q31_t realCoefAQ31[1024]; |
50 | | //extern const q31_t realCoefBQ31[1024]; |
| 49 | /* extern const q31_t realCoefAQ31[1024]; */ |
| 50 | /* extern const q31_t realCoefBQ31[1024]; */ |
51 | 51 | extern const float32_t twiddleCoef_16[32]; |
52 | 52 | extern const float32_t twiddleCoef_32[64]; |
-
rbbccdb5
|
r2916a33
|
|
2 | 2 | * Copyright (C) 2010-2015 ARM Limited. All rights reserved. |
3 | 3 | * |
4 | | * $Date: 19. March 2015 |
5 | | * $Revision: V.1.4.5 |
| 4 | * $Date: 20. October 2015 |
| 5 | * $Revision: V1.4.5 b |
6 | 6 | * |
7 | | * Project: CMSIS DSP Library |
8 | | * Title: arm_math.h |
| 7 | * Project: CMSIS DSP Library |
| 8 | * Title: arm_math.h |
9 | 9 | * |
10 | | * Description: Public header file for CMSIS DSP Library |
| 10 | * Description: Public header file for CMSIS DSP Library |
11 | 11 | * |
12 | 12 | * Target Processor: Cortex-M7/Cortex-M4/Cortex-M3/Cortex-M0 |
… |
… |
|
289 | 289 | #define _ARM_MATH_H |
290 | 290 | |
| 291 | /* ignore some GCC warnings */ |
| 292 | #if defined ( __GNUC__ ) |
| 293 | #pragma GCC diagnostic push |
| 294 | #pragma GCC diagnostic ignored "-Wsign-conversion" |
| 295 | #pragma GCC diagnostic ignored "-Wconversion" |
| 296 | #pragma GCC diagnostic ignored "-Wunused-parameter" |
| 297 | #endif |
| 298 | |
291 | 299 | #define __CMSIS_GENERIC /* disable NVIC and Systick functions */ |
292 | 300 | |
… |
… |
|
299 | 307 | #elif defined (ARM_MATH_CM0) |
300 | 308 | #include "core_cm0.h" |
301 | | #define ARM_MATH_CM0_FAMILY |
302 | | #elif defined (ARM_MATH_CM0PLUS) |
303 | | #include "core_cm0plus.h" |
| 309 | #define ARM_MATH_CM0_FAMILY |
| 310 | #elif defined (ARM_MATH_CM0PLUS) |
| 311 | #include "core_cm0plus.h" |
304 | 312 | #define ARM_MATH_CM0_FAMILY |
305 | 313 | #else |
… |
… |
|
310 | 318 | #include "string.h" |
311 | 319 | #include "math.h" |
312 | | #ifdef __cplusplus |
| 320 | #ifdef __cplusplus |
313 | 321 | extern "C" |
314 | 322 | { |
… |
… |
|
320 | 328 | */ |
321 | 329 | |
322 | | #define DELTA_Q31 (0x100) |
323 | | #define DELTA_Q15 0x5 |
324 | | #define INDEX_MASK 0x0000003F |
| 330 | #define DELTA_Q31 (0x100) |
| 331 | #define DELTA_Q15 0x5 |
| 332 | #define INDEX_MASK 0x0000003F |
325 | 333 | #ifndef PI |
326 | | #define PI 3.14159265358979f |
| 334 | #define PI 3.14159265358979f |
327 | 335 | #endif |
328 | 336 | |
… |
… |
|
336 | 344 | #define CONTROLLER_Q31_SHIFT (32 - 9) |
337 | 345 | #define TABLE_SIZE 256 |
338 | | #define TABLE_SPACING_Q31 0x400000 |
339 | | #define TABLE_SPACING_Q15 0x80 |
| 346 | #define TABLE_SPACING_Q31 0x400000 |
| 347 | #define TABLE_SPACING_Q15 0x80 |
340 | 348 | |
341 | 349 | /** |
… |
… |
|
344 | 352 | /* 1.31(q31) Fixed value of 2/360 */ |
345 | 353 | /* -1 to +1 is divided into 360 values so total spacing is (2/360) */ |
346 | | #define INPUT_SPACING 0xB60B61 |
| 354 | #define INPUT_SPACING 0xB60B61 |
347 | 355 | |
348 | 356 | /** |
… |
… |
|
357 | 365 | #define ALIGN4 __align(4) |
358 | 366 | #endif |
359 | | #endif /* #ifndef UNALIGNED_SUPPORT_DISABLE */ |
| 367 | #endif /* #ifndef UNALIGNED_SUPPORT_DISABLE */ |
360 | 368 | |
361 | 369 | /** |
… |
… |
|
410 | 418 | #define __SIMD32_TYPE int32_t __packed |
411 | 419 | #define CMSIS_UNUSED __attribute__((unused)) |
| 420 | |
| 421 | #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) |
| 422 | #define __SIMD32_TYPE int32_t |
| 423 | #define CMSIS_UNUSED __attribute__((unused)) |
| 424 | |
| 425 | #elif defined __GNUC__ |
| 426 | #define __SIMD32_TYPE int32_t |
| 427 | #define CMSIS_UNUSED __attribute__((unused)) |
| 428 | |
412 | 429 | #elif defined __ICCARM__ |
413 | 430 | #define __SIMD32_TYPE int32_t __packed |
414 | 431 | #define CMSIS_UNUSED |
415 | | #elif defined __GNUC__ |
416 | | #define __SIMD32_TYPE int32_t |
417 | | #define CMSIS_UNUSED __attribute__((unused)) |
418 | | #elif defined __CSMC__ /* Cosmic */ |
| 432 | |
| 433 | #elif defined __CSMC__ |
419 | 434 | #define __SIMD32_TYPE int32_t |
420 | 435 | #define CMSIS_UNUSED |
| 436 | |
421 | 437 | #elif defined __TASKING__ |
422 | 438 | #define __SIMD32_TYPE __unaligned int32_t |
423 | 439 | #define CMSIS_UNUSED |
| 440 | |
424 | 441 | #else |
425 | 442 | #error Unknown compiler |
426 | 443 | #endif |
427 | 444 | |
428 | | #define __SIMD32(addr) (*(__SIMD32_TYPE **) & (addr)) |
| 445 | #define __SIMD32(addr) (*(__SIMD32_TYPE **) & (addr)) |
429 | 446 | #define __SIMD32_CONST(addr) ((__SIMD32_TYPE *)(addr)) |
430 | | |
431 | 447 | #define _SIMD32_OFFSET(addr) (*(__SIMD32_TYPE *) (addr)) |
432 | | |
433 | | #define __SIMD64(addr) (*(int64_t **) & (addr)) |
| 448 | #define __SIMD64(addr) (*(int64_t **) & (addr)) |
434 | 449 | |
435 | 450 | #if defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY) |
… |
… |
|
450 | 465 | #ifndef ARM_MATH_BIG_ENDIAN |
451 | 466 | |
452 | | #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v0) << 0) & (int32_t)0x000000FF) | \ |
453 | | (((int32_t)(v1) << 8) & (int32_t)0x0000FF00) | \ |
454 | | (((int32_t)(v2) << 16) & (int32_t)0x00FF0000) | \ |
455 | | (((int32_t)(v3) << 24) & (int32_t)0xFF000000) ) |
| 467 | #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v0) << 0) & (int32_t)0x000000FF) | \ |
| 468 | (((int32_t)(v1) << 8) & (int32_t)0x0000FF00) | \ |
| 469 | (((int32_t)(v2) << 16) & (int32_t)0x00FF0000) | \ |
| 470 | (((int32_t)(v3) << 24) & (int32_t)0xFF000000) ) |
456 | 471 | #else |
457 | 472 | |
458 | | #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v3) << 0) & (int32_t)0x000000FF) | \ |
459 | | (((int32_t)(v2) << 8) & (int32_t)0x0000FF00) | \ |
460 | | (((int32_t)(v1) << 16) & (int32_t)0x00FF0000) | \ |
461 | | (((int32_t)(v0) << 24) & (int32_t)0xFF000000) ) |
| 473 | #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v3) << 0) & (int32_t)0x000000FF) | \ |
| 474 | (((int32_t)(v2) << 8) & (int32_t)0x0000FF00) | \ |
| 475 | (((int32_t)(v1) << 16) & (int32_t)0x00FF0000) | \ |
| 476 | (((int32_t)(v0) << 24) & (int32_t)0xFF000000) ) |
462 | 477 | |
463 | 478 | #endif |
… |
… |
|
516 | 531 | } |
517 | 532 | |
518 | | |
519 | | //#if defined (ARM_MATH_CM0_FAMILY) && defined ( __CC_ARM ) |
520 | | //#define __CLZ __clz |
521 | | //#endif |
522 | | |
523 | | //note: function can be removed when all toolchain support __CLZ for Cortex-M0 |
| 533 | /* |
| 534 | #if defined (ARM_MATH_CM0_FAMILY) && defined ( __CC_ARM ) |
| 535 | #define __CLZ __clz |
| 536 | #endif |
| 537 | */ |
| 538 | /* note: function can be removed when all toolchain support __CLZ for Cortex-M0 */ |
524 | 539 | #if defined (ARM_MATH_CM0_FAMILY) && ((defined (__ICCARM__)) ) |
525 | | |
526 | 540 | static __INLINE uint32_t __CLZ( |
527 | 541 | q31_t data); |
528 | | |
529 | 542 | |
530 | 543 | static __INLINE uint32_t __CLZ( |
… |
… |
|
541 | 554 | |
542 | 555 | return (count); |
543 | | |
544 | 556 | } |
545 | | |
546 | 557 | #endif |
547 | 558 | |
… |
… |
|
555 | 566 | q31_t * pRecipTable) |
556 | 567 | { |
557 | | |
558 | | uint32_t out, tempVal; |
| 568 | q31_t out; |
| 569 | uint32_t tempVal; |
559 | 570 | uint32_t index, i; |
560 | 571 | uint32_t signBits; |
… |
… |
|
562 | 573 | if(in > 0) |
563 | 574 | { |
564 | | signBits = __CLZ(in) - 1; |
| 575 | signBits = ((uint32_t) (__CLZ( in) - 1)); |
565 | 576 | } |
566 | 577 | else |
567 | 578 | { |
568 | | signBits = __CLZ(-in) - 1; |
| 579 | signBits = ((uint32_t) (__CLZ(-in) - 1)); |
569 | 580 | } |
570 | 581 | |
571 | 582 | /* Convert input sample to 1.31 format */ |
572 | | in = in << signBits; |
| 583 | in = (in << signBits); |
573 | 584 | |
574 | 585 | /* calculation of index for initial approximated Val */ |
575 | | index = (uint32_t) (in >> 24u); |
| 586 | index = (uint32_t)(in >> 24); |
576 | 587 | index = (index & INDEX_MASK); |
577 | 588 | |
… |
… |
|
583 | 594 | for (i = 0u; i < 2u; i++) |
584 | 595 | { |
585 | | tempVal = (q31_t) (((q63_t) in * out) >> 31u); |
586 | | tempVal = 0x7FFFFFFF - tempVal; |
| 596 | tempVal = (uint32_t) (((q63_t) in * out) >> 31); |
| 597 | tempVal = 0x7FFFFFFFu - tempVal; |
587 | 598 | /* 1.31 with exp 1 */ |
588 | | //out = (q31_t) (((q63_t) out * tempVal) >> 30u); |
589 | | out = (q31_t) clip_q63_to_q31(((q63_t) out * tempVal) >> 30u); |
| 599 | /* out = (q31_t) (((q63_t) out * tempVal) >> 30); */ |
| 600 | out = clip_q63_to_q31(((q63_t) out * tempVal) >> 30); |
590 | 601 | } |
591 | 602 | |
… |
… |
|
595 | 606 | /* return num of signbits of out = 1/in value */ |
596 | 607 | return (signBits + 1u); |
597 | | |
598 | 608 | } |
| 609 | |
599 | 610 | |
600 | 611 | /** |
… |
… |
|
606 | 617 | q15_t * pRecipTable) |
607 | 618 | { |
608 | | |
609 | | uint32_t out = 0, tempVal = 0; |
| 619 | q15_t out = 0; |
| 620 | uint32_t tempVal = 0; |
610 | 621 | uint32_t index = 0, i = 0; |
611 | 622 | uint32_t signBits = 0; |
… |
… |
|
613 | 624 | if(in > 0) |
614 | 625 | { |
615 | | signBits = __CLZ(in) - 17; |
| 626 | signBits = ((uint32_t)(__CLZ( in) - 17)); |
616 | 627 | } |
617 | 628 | else |
618 | 629 | { |
619 | | signBits = __CLZ(-in) - 17; |
| 630 | signBits = ((uint32_t)(__CLZ(-in) - 17)); |
620 | 631 | } |
621 | 632 | |
622 | 633 | /* Convert input sample to 1.15 format */ |
623 | | in = in << signBits; |
| 634 | in = (in << signBits); |
624 | 635 | |
625 | 636 | /* calculation of index for initial approximated Val */ |
626 | | index = in >> 8; |
| 637 | index = (uint32_t)(in >> 8); |
627 | 638 | index = (index & INDEX_MASK); |
628 | 639 | |
… |
… |
|
632 | 643 | /* calculation of reciprocal value */ |
633 | 644 | /* running approximation for two iterations */ |
634 | | for (i = 0; i < 2; i++) |
| 645 | for (i = 0u; i < 2u; i++) |
635 | 646 | { |
636 | | tempVal = (q15_t) (((q31_t) in * out) >> 15); |
637 | | tempVal = 0x7FFF - tempVal; |
| 647 | tempVal = (uint32_t) (((q31_t) in * out) >> 15); |
| 648 | tempVal = 0x7FFFu - tempVal; |
638 | 649 | /* 1.15 with exp 1 */ |
639 | 650 | out = (q15_t) (((q31_t) out * tempVal) >> 14); |
| 651 | /* out = clip_q31_to_q15(((q31_t) out * tempVal) >> 14); */ |
640 | 652 | } |
641 | 653 | |
… |
… |
|
645 | 657 | /* return num of signbits of out = 1/in value */ |
646 | 658 | return (signBits + 1); |
647 | | |
648 | 659 | } |
649 | 660 | |
… |
… |
|
653 | 664 | */ |
654 | 665 | #if defined(ARM_MATH_CM0_FAMILY) |
655 | | |
656 | 666 | static __INLINE q31_t __SSAT( |
657 | 667 | q31_t x, |
… |
… |
|
686 | 696 | } |
687 | 697 | return (x); |
688 | | |
689 | | |
690 | 698 | } |
691 | | |
692 | 699 | #endif /* end of ARM_MATH_CM0_FAMILY */ |
693 | | |
694 | 700 | |
695 | 701 | |
… |
… |
|
702 | 708 | * @brief C custom defined QADD8 for M3 and M0 processors |
703 | 709 | */ |
704 | | static __INLINE q31_t __QADD8( |
705 | | q31_t x, |
706 | | q31_t y) |
707 | | { |
708 | | |
709 | | q31_t sum; |
710 | | q7_t r, s, t, u; |
711 | | |
712 | | r = (q7_t) x; |
713 | | s = (q7_t) y; |
714 | | |
715 | | r = __SSAT((q31_t) (r + s), 8); |
716 | | s = __SSAT(((q31_t) (((x << 16) >> 24) + ((y << 16) >> 24))), 8); |
717 | | t = __SSAT(((q31_t) (((x << 8) >> 24) + ((y << 8) >> 24))), 8); |
718 | | u = __SSAT(((q31_t) ((x >> 24) + (y >> 24))), 8); |
719 | | |
720 | | sum = |
721 | | (((q31_t) u << 24) & 0xFF000000) | (((q31_t) t << 16) & 0x00FF0000) | |
722 | | (((q31_t) s << 8) & 0x0000FF00) | (r & 0x000000FF); |
723 | | |
724 | | return sum; |
725 | | |
| 710 | static __INLINE uint32_t __QADD8( |
| 711 | uint32_t x, |
| 712 | uint32_t y) |
| 713 | { |
| 714 | q31_t r, s, t, u; |
| 715 | |
| 716 | r = __SSAT(((((q31_t)x << 24) >> 24) + (((q31_t)y << 24) >> 24)), 8) & (int32_t)0x000000FF; |
| 717 | s = __SSAT(((((q31_t)x << 16) >> 24) + (((q31_t)y << 16) >> 24)), 8) & (int32_t)0x000000FF; |
| 718 | t = __SSAT(((((q31_t)x << 8) >> 24) + (((q31_t)y << 8) >> 24)), 8) & (int32_t)0x000000FF; |
| 719 | u = __SSAT(((((q31_t)x ) >> 24) + (((q31_t)y ) >> 24)), 8) & (int32_t)0x000000FF; |
| 720 | |
| 721 | return ((uint32_t)((u << 24) | (t << 16) | (s << 8) | (r ))); |
726 | 722 | } |
| 723 | |
727 | 724 | |
728 | 725 | /* |
729 | 726 | * @brief C custom defined QSUB8 for M3 and M0 processors |
730 | 727 | */ |
731 | | static __INLINE q31_t __QSUB8( |
732 | | q31_t x, |
733 | | q31_t y) |
734 | | { |
735 | | |
736 | | q31_t sum; |
| 728 | static __INLINE uint32_t __QSUB8( |
| 729 | uint32_t x, |
| 730 | uint32_t y) |
| 731 | { |
737 | 732 | q31_t r, s, t, u; |
738 | 733 | |
739 | | r = (q7_t) x; |
740 | | s = (q7_t) y; |
741 | | |
742 | | r = __SSAT((r - s), 8); |
743 | | s = __SSAT(((q31_t) (((x << 16) >> 24) - ((y << 16) >> 24))), 8) << 8; |
744 | | t = __SSAT(((q31_t) (((x << 8) >> 24) - ((y << 8) >> 24))), 8) << 16; |
745 | | u = __SSAT(((q31_t) ((x >> 24) - (y >> 24))), 8) << 24; |
746 | | |
747 | | sum = |
748 | | (u & 0xFF000000) | (t & 0x00FF0000) | (s & 0x0000FF00) | (r & |
749 | | 0x000000FF); |
750 | | |
751 | | return sum; |
| 734 | r = __SSAT(((((q31_t)x << 24) >> 24) - (((q31_t)y << 24) >> 24)), 8) & (int32_t)0x000000FF; |
| 735 | s = __SSAT(((((q31_t)x << 16) >> 24) - (((q31_t)y << 16) >> 24)), 8) & (int32_t)0x000000FF; |
| 736 | t = __SSAT(((((q31_t)x << 8) >> 24) - (((q31_t)y << 8) >> 24)), 8) & (int32_t)0x000000FF; |
| 737 | u = __SSAT(((((q31_t)x ) >> 24) - (((q31_t)y ) >> 24)), 8) & (int32_t)0x000000FF; |
| 738 | |
| 739 | return ((uint32_t)((u << 24) | (t << 16) | (s << 8) | (r ))); |
752 | 740 | } |
| 741 | |
753 | 742 | |
754 | 743 | /* |
755 | 744 | * @brief C custom defined QADD16 for M3 and M0 processors |
756 | 745 | */ |
757 | | |
758 | | /* |
759 | | * @brief C custom defined QADD16 for M3 and M0 processors |
760 | | */ |
761 | | static __INLINE q31_t __QADD16( |
762 | | q31_t x, |
763 | | q31_t y) |
764 | | { |
765 | | |
766 | | q31_t sum; |
767 | | q31_t r, s; |
768 | | |
769 | | r = (q15_t) x; |
770 | | s = (q15_t) y; |
771 | | |
772 | | r = __SSAT(r + s, 16); |
773 | | s = __SSAT(((q31_t) ((x >> 16) + (y >> 16))), 16) << 16; |
774 | | |
775 | | sum = (s & 0xFFFF0000) | (r & 0x0000FFFF); |
776 | | |
777 | | return sum; |
778 | | |
| 746 | static __INLINE uint32_t __QADD16( |
| 747 | uint32_t x, |
| 748 | uint32_t y) |
| 749 | { |
| 750 | /* q31_t r, s; without initialisation 'arm_offset_q15 test' fails but 'intrinsic' tests pass! for armCC */ |
| 751 | q31_t r = 0, s = 0; |
| 752 | |
| 753 | r = __SSAT(((((q31_t)x << 16) >> 16) + (((q31_t)y << 16) >> 16)), 16) & (int32_t)0x0000FFFF; |
| 754 | s = __SSAT(((((q31_t)x ) >> 16) + (((q31_t)y ) >> 16)), 16) & (int32_t)0x0000FFFF; |
| 755 | |
| 756 | return ((uint32_t)((s << 16) | (r ))); |
779 | 757 | } |
| 758 | |
780 | 759 | |
781 | 760 | /* |
782 | 761 | * @brief C custom defined SHADD16 for M3 and M0 processors |
783 | 762 | */ |
784 | | static __INLINE q31_t __SHADD16( |
785 | | q31_t x, |
786 | | q31_t y) |
787 | | { |
788 | | |
789 | | q31_t sum; |
| 763 | static __INLINE uint32_t __SHADD16( |
| 764 | uint32_t x, |
| 765 | uint32_t y) |
| 766 | { |
790 | 767 | q31_t r, s; |
791 | 768 | |
792 | | r = (q15_t) x; |
793 | | s = (q15_t) y; |
794 | | |
795 | | r = ((r >> 1) + (s >> 1)); |
796 | | s = ((q31_t) ((x >> 17) + (y >> 17))) << 16; |
797 | | |
798 | | sum = (s & 0xFFFF0000) | (r & 0x0000FFFF); |
799 | | |
800 | | return sum; |
801 | | |
| 769 | r = (((((q31_t)x << 16) >> 16) + (((q31_t)y << 16) >> 16)) >> 1) & (int32_t)0x0000FFFF; |
| 770 | s = (((((q31_t)x ) >> 16) + (((q31_t)y ) >> 16)) >> 1) & (int32_t)0x0000FFFF; |
| 771 | |
| 772 | return ((uint32_t)((s << 16) | (r ))); |
802 | 773 | } |
| 774 | |
803 | 775 | |
804 | 776 | /* |
805 | 777 | * @brief C custom defined QSUB16 for M3 and M0 processors |
806 | 778 | */ |
807 | | static __INLINE q31_t __QSUB16( |
808 | | q31_t x, |
809 | | q31_t y) |
810 | | { |
811 | | |
812 | | q31_t sum; |
| 779 | static __INLINE uint32_t __QSUB16( |
| 780 | uint32_t x, |
| 781 | uint32_t y) |
| 782 | { |
813 | 783 | q31_t r, s; |
814 | 784 | |
815 | | r = (q15_t) x; |
816 | | s = (q15_t) y; |
817 | | |
818 | | r = __SSAT(r - s, 16); |
819 | | s = __SSAT(((q31_t) ((x >> 16) - (y >> 16))), 16) << 16; |
820 | | |
821 | | sum = (s & 0xFFFF0000) | (r & 0x0000FFFF); |
822 | | |
823 | | return sum; |
| 785 | r = __SSAT(((((q31_t)x << 16) >> 16) - (((q31_t)y << 16) >> 16)), 16) & (int32_t)0x0000FFFF; |
| 786 | s = __SSAT(((((q31_t)x ) >> 16) - (((q31_t)y ) >> 16)), 16) & (int32_t)0x0000FFFF; |
| 787 | |
| 788 | return ((uint32_t)((s << 16) | (r ))); |
824 | 789 | } |
| 790 | |
825 | 791 | |
826 | 792 | /* |
827 | 793 | * @brief C custom defined SHSUB16 for M3 and M0 processors |
828 | 794 | */ |
829 | | static __INLINE q31_t __SHSUB16( |
830 | | q31_t x, |
831 | | q31_t y) |
832 | | { |
833 | | |
834 | | q31_t diff; |
| 795 | static __INLINE uint32_t __SHSUB16( |
| 796 | uint32_t x, |
| 797 | uint32_t y) |
| 798 | { |
835 | 799 | q31_t r, s; |
836 | 800 | |
837 | | r = (q15_t) x; |
838 | | s = (q15_t) y; |
839 | | |
840 | | r = ((r >> 1) - (s >> 1)); |
841 | | s = (((x >> 17) - (y >> 17)) << 16); |
842 | | |
843 | | diff = (s & 0xFFFF0000) | (r & 0x0000FFFF); |
844 | | |
845 | | return diff; |
| 801 | r = (((((q31_t)x << 16) >> 16) - (((q31_t)y << 16) >> 16)) >> 1) & (int32_t)0x0000FFFF; |
| 802 | s = (((((q31_t)x ) >> 16) - (((q31_t)y ) >> 16)) >> 1) & (int32_t)0x0000FFFF; |
| 803 | |
| 804 | return ((uint32_t)((s << 16) | (r ))); |
846 | 805 | } |
| 806 | |
847 | 807 | |
848 | 808 | /* |
849 | 809 | * @brief C custom defined QASX for M3 and M0 processors |
850 | 810 | */ |
851 | | static __INLINE q31_t __QASX( |
852 | | q31_t x, |
853 | | q31_t y) |
854 | | { |
855 | | |
856 | | q31_t sum = 0; |
857 | | |
858 | | sum = |
859 | | ((sum + |
860 | | clip_q31_to_q15((q31_t) ((q15_t) (x >> 16) + (q15_t) y))) << 16) + |
861 | | clip_q31_to_q15((q31_t) ((q15_t) x - (q15_t) (y >> 16))); |
862 | | |
863 | | return sum; |
| 811 | static __INLINE uint32_t __QASX( |
| 812 | uint32_t x, |
| 813 | uint32_t y) |
| 814 | { |
| 815 | q31_t r, s; |
| 816 | |
| 817 | r = __SSAT(((((q31_t)x << 16) >> 16) - (((q31_t)y ) >> 16)), 16) & (int32_t)0x0000FFFF; |
| 818 | s = __SSAT(((((q31_t)x ) >> 16) + (((q31_t)y << 16) >> 16)), 16) & (int32_t)0x0000FFFF; |
| 819 | |
| 820 | return ((uint32_t)((s << 16) | (r ))); |
864 | 821 | } |
| 822 | |
865 | 823 | |
866 | 824 | /* |
867 | 825 | * @brief C custom defined SHASX for M3 and M0 processors |
868 | 826 | */ |
869 | | static __INLINE q31_t __SHASX( |
870 | | q31_t x, |
871 | | q31_t y) |
872 | | { |
873 | | |
874 | | q31_t sum; |
| 827 | static __INLINE uint32_t __SHASX( |
| 828 | uint32_t x, |
| 829 | uint32_t y) |
| 830 | { |
875 | 831 | q31_t r, s; |
876 | 832 | |
877 | | r = (q15_t) x; |
878 | | s = (q15_t) y; |
879 | | |
880 | | r = ((r >> 1) - (y >> 17)); |
881 | | s = (((x >> 17) + (s >> 1)) << 16); |
882 | | |
883 | | sum = (s & 0xFFFF0000) | (r & 0x0000FFFF); |
884 | | |
885 | | return sum; |
| 833 | r = (((((q31_t)x << 16) >> 16) - (((q31_t)y ) >> 16)) >> 1) & (int32_t)0x0000FFFF; |
| 834 | s = (((((q31_t)x ) >> 16) + (((q31_t)y << 16) >> 16)) >> 1) & (int32_t)0x0000FFFF; |
| 835 | |
| 836 | return ((uint32_t)((s << 16) | (r ))); |
886 | 837 | } |
887 | 838 | |
… |
… |
|
890 | 841 | * @brief C custom defined QSAX for M3 and M0 processors |
891 | 842 | */ |
892 | | static __INLINE q31_t __QSAX( |
893 | | q31_t x, |
894 | | q31_t y) |
895 | | { |
896 | | |
897 | | q31_t sum = 0; |
898 | | |
899 | | sum = |
900 | | ((sum + |
901 | | clip_q31_to_q15((q31_t) ((q15_t) (x >> 16) - (q15_t) y))) << 16) + |
902 | | clip_q31_to_q15((q31_t) ((q15_t) x + (q15_t) (y >> 16))); |
903 | | |
904 | | return sum; |
| 843 | static __INLINE uint32_t __QSAX( |
| 844 | uint32_t x, |
| 845 | uint32_t y) |
| 846 | { |
| 847 | q31_t r, s; |
| 848 | |
| 849 | r = __SSAT(((((q31_t)x << 16) >> 16) + (((q31_t)y ) >> 16)), 16) & (int32_t)0x0000FFFF; |
| 850 | s = __SSAT(((((q31_t)x ) >> 16) - (((q31_t)y << 16) >> 16)), 16) & (int32_t)0x0000FFFF; |
| 851 | |
| 852 | return ((uint32_t)((s << 16) | (r ))); |
905 | 853 | } |
| 854 | |
906 | 855 | |
907 | 856 | /* |
908 | 857 | * @brief C custom defined SHSAX for M3 and M0 processors |
909 | 858 | */ |
910 | | static __INLINE q31_t __SHSAX( |
911 | | q31_t x, |
912 | | q31_t y) |
913 | | { |
914 | | |
915 | | q31_t sum; |
| 859 | static __INLINE uint32_t __SHSAX( |
| 860 | uint32_t x, |
| 861 | uint32_t y) |
| 862 | { |
916 | 863 | q31_t r, s; |
917 | 864 | |
918 | | r = (q15_t) x; |
919 | | s = (q15_t) y; |
920 | | |
921 | | r = ((r >> 1) + (y >> 17)); |
922 | | s = (((x >> 17) - (s >> 1)) << 16); |
923 | | |
924 | | sum = (s & 0xFFFF0000) | (r & 0x0000FFFF); |
925 | | |
926 | | return sum; |
| 865 | r = (((((q31_t)x << 16) >> 16) + (((q31_t)y ) >> 16)) >> 1) & (int32_t)0x0000FFFF; |
| 866 | s = (((((q31_t)x ) >> 16) - (((q31_t)y << 16) >> 16)) >> 1) & (int32_t)0x0000FFFF; |
| 867 | |
| 868 | return ((uint32_t)((s << 16) | (r ))); |
927 | 869 | } |
| 870 | |
928 | 871 | |
929 | 872 | /* |
930 | 873 | * @brief C custom defined SMUSDX for M3 and M0 processors |
931 | 874 | */ |
932 | | static __INLINE q31_t __SMUSDX( |
933 | | q31_t x, |
934 | | q31_t y) |
935 | | { |
936 | | |
937 | | return ((q31_t) (((q15_t) x * (q15_t) (y >> 16)) - |
938 | | ((q15_t) (x >> 16) * (q15_t) y))); |
| 875 | static __INLINE uint32_t __SMUSDX( |
| 876 | uint32_t x, |
| 877 | uint32_t y) |
| 878 | { |
| 879 | return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y ) >> 16)) - |
| 880 | ((((q31_t)x ) >> 16) * (((q31_t)y << 16) >> 16)) )); |
939 | 881 | } |
940 | 882 | |
… |
… |
|
942 | 884 | * @brief C custom defined SMUADX for M3 and M0 processors |
943 | 885 | */ |
944 | | static __INLINE q31_t __SMUADX( |
945 | | q31_t x, |
946 | | q31_t y) |
947 | | { |
948 | | |
949 | | return ((q31_t) (((q15_t) x * (q15_t) (y >> 16)) + |
950 | | ((q15_t) (x >> 16) * (q15_t) y))); |
| 886 | static __INLINE uint32_t __SMUADX( |
| 887 | uint32_t x, |
| 888 | uint32_t y) |
| 889 | { |
| 890 | return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y ) >> 16)) + |
| 891 | ((((q31_t)x ) >> 16) * (((q31_t)y << 16) >> 16)) )); |
951 | 892 | } |
| 893 | |
952 | 894 | |
953 | 895 | /* |
954 | 896 | * @brief C custom defined QADD for M3 and M0 processors |
955 | 897 | */ |
956 | | static __INLINE q31_t __QADD( |
957 | | q31_t x, |
958 | | q31_t y) |
959 | | { |
960 | | return clip_q63_to_q31((q63_t) x + y); |
| 898 | static __INLINE int32_t __QADD( |
| 899 | int32_t x, |
| 900 | int32_t y) |
| 901 | { |
| 902 | return ((int32_t)(clip_q63_to_q31((q63_t)x + (q31_t)y))); |
961 | 903 | } |
| 904 | |
962 | 905 | |
963 | 906 | /* |
964 | 907 | * @brief C custom defined QSUB for M3 and M0 processors |
965 | 908 | */ |
966 | | static __INLINE q31_t __QSUB( |
967 | | q31_t x, |
968 | | q31_t y) |
969 | | { |
970 | | return clip_q63_to_q31((q63_t) x - y); |
| 909 | static __INLINE int32_t __QSUB( |
| 910 | int32_t x, |
| 911 | int32_t y) |
| 912 | { |
| 913 | return ((int32_t)(clip_q63_to_q31((q63_t)x - (q31_t)y))); |
971 | 914 | } |
| 915 | |
972 | 916 | |
973 | 917 | /* |
974 | 918 | * @brief C custom defined SMLAD for M3 and M0 processors |
975 | 919 | */ |
976 | | static __INLINE q31_t __SMLAD( |
977 | | q31_t x, |
978 | | q31_t y, |
979 | | q31_t sum) |
980 | | { |
981 | | |
982 | | return (sum + ((q15_t) (x >> 16) * (q15_t) (y >> 16)) + |
983 | | ((q15_t) x * (q15_t) y)); |
| 920 | static __INLINE uint32_t __SMLAD( |
| 921 | uint32_t x, |
| 922 | uint32_t y, |
| 923 | uint32_t sum) |
| 924 | { |
| 925 | return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y << 16) >> 16)) + |
| 926 | ((((q31_t)x ) >> 16) * (((q31_t)y ) >> 16)) + |
| 927 | ( ((q31_t)sum ) ) )); |
984 | 928 | } |
| 929 | |
985 | 930 | |
986 | 931 | /* |
987 | 932 | * @brief C custom defined SMLADX for M3 and M0 processors |
988 | 933 | */ |
989 | | static __INLINE q31_t __SMLADX( |
990 | | q31_t x, |
991 | | q31_t y, |
992 | | q31_t sum) |
993 | | { |
994 | | |
995 | | return (sum + ((q15_t) (x >> 16) * (q15_t) (y)) + |
996 | | ((q15_t) x * (q15_t) (y >> 16))); |
| 934 | static __INLINE uint32_t __SMLADX( |
| 935 | uint32_t x, |
| 936 | uint32_t y, |
| 937 | uint32_t sum) |
| 938 | { |
| 939 | return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y ) >> 16)) + |
| 940 | ((((q31_t)x ) >> 16) * (((q31_t)y << 16) >> 16)) + |
| 941 | ( ((q31_t)sum ) ) )); |
997 | 942 | } |
| 943 | |
998 | 944 | |
999 | 945 | /* |
1000 | 946 | * @brief C custom defined SMLSDX for M3 and M0 processors |
1001 | 947 | */ |
1002 | | static __INLINE q31_t __SMLSDX( |
1003 | | q31_t x, |
1004 | | q31_t y, |
1005 | | q31_t sum) |
1006 | | { |
1007 | | |
1008 | | return (sum - ((q15_t) (x >> 16) * (q15_t) (y)) + |
1009 | | ((q15_t) x * (q15_t) (y >> 16))); |
| 948 | static __INLINE uint32_t __SMLSDX( |
| 949 | uint32_t x, |
| 950 | uint32_t y, |
| 951 | uint32_t sum) |
| 952 | { |
| 953 | return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y ) >> 16)) - |
| 954 | ((((q31_t)x ) >> 16) * (((q31_t)y << 16) >> 16)) + |
| 955 | ( ((q31_t)sum ) ) )); |
1010 | 956 | } |
| 957 | |
1011 | 958 | |
1012 | 959 | /* |
1013 | 960 | * @brief C custom defined SMLALD for M3 and M0 processors |
1014 | 961 | */ |
1015 | | static __INLINE q63_t __SMLALD( |
1016 | | q31_t x, |
1017 | | q31_t y, |
1018 | | q63_t sum) |
1019 | | { |
1020 | | |
1021 | | return (sum + ((q15_t) (x >> 16) * (q15_t) (y >> 16)) + |
1022 | | ((q15_t) x * (q15_t) y)); |
| 962 | static __INLINE uint64_t __SMLALD( |
| 963 | uint32_t x, |
| 964 | uint32_t y, |
| 965 | uint64_t sum) |
| 966 | { |
| 967 | /* return (sum + ((q15_t) (x >> 16) * (q15_t) (y >> 16)) + ((q15_t) x * (q15_t) y)); */ |
| 968 | return ((uint64_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y << 16) >> 16)) + |
| 969 | ((((q31_t)x ) >> 16) * (((q31_t)y ) >> 16)) + |
| 970 | ( ((q63_t)sum ) ) )); |
1023 | 971 | } |
| 972 | |
1024 | 973 | |
1025 | 974 | /* |
1026 | 975 | * @brief C custom defined SMLALDX for M3 and M0 processors |
1027 | 976 | */ |
1028 | | static __INLINE q63_t __SMLALDX( |
1029 | | q31_t x, |
1030 | | q31_t y, |
1031 | | q63_t sum) |
1032 | | { |
1033 | | |
1034 | | return (sum + ((q15_t) (x >> 16) * (q15_t) y)) + |
1035 | | ((q15_t) x * (q15_t) (y >> 16)); |
| 977 | static __INLINE uint64_t __SMLALDX( |
| 978 | uint32_t x, |
| 979 | uint32_t y, |
| 980 | uint64_t sum) |
| 981 | { |
| 982 | /* return (sum + ((q15_t) (x >> 16) * (q15_t) y)) + ((q15_t) x * (q15_t) (y >> 16)); */ |
| 983 | return ((uint64_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y ) >> 16)) + |
| 984 | ((((q31_t)x ) >> 16) * (((q31_t)y << 16) >> 16)) + |
| 985 | ( ((q63_t)sum ) ) )); |
1036 | 986 | } |
| 987 | |
1037 | 988 | |
1038 | 989 | /* |
1039 | 990 | * @brief C custom defined SMUAD for M3 and M0 processors |
1040 | 991 | */ |
1041 | | static __INLINE q31_t __SMUAD( |
1042 | | q31_t x, |
1043 | | q31_t y) |
1044 | | { |
1045 | | |
1046 | | return (((x >> 16) * (y >> 16)) + |
1047 | | (((x << 16) >> 16) * ((y << 16) >> 16))); |
| 992 | static __INLINE uint32_t __SMUAD( |
| 993 | uint32_t x, |
| 994 | uint32_t y) |
| 995 | { |
| 996 | return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y << 16) >> 16)) + |
| 997 | ((((q31_t)x ) >> 16) * (((q31_t)y ) >> 16)) )); |
1048 | 998 | } |
| 999 | |
1049 | 1000 | |
1050 | 1001 | /* |
1051 | 1002 | * @brief C custom defined SMUSD for M3 and M0 processors |
1052 | 1003 | */ |
1053 | | static __INLINE q31_t __SMUSD( |
1054 | | q31_t x, |
1055 | | q31_t y) |
1056 | | { |
1057 | | |
1058 | | return (-((x >> 16) * (y >> 16)) + |
1059 | | (((x << 16) >> 16) * ((y << 16) >> 16))); |
| 1004 | static __INLINE uint32_t __SMUSD( |
| 1005 | uint32_t x, |
| 1006 | uint32_t y) |
| 1007 | { |
| 1008 | return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y << 16) >> 16)) - |
| 1009 | ((((q31_t)x ) >> 16) * (((q31_t)y ) >> 16)) )); |
1060 | 1010 | } |
1061 | 1011 | |
… |
… |
|
1064 | 1014 | * @brief C custom defined SXTB16 for M3 and M0 processors |
1065 | 1015 | */ |
1066 | | static __INLINE q31_t __SXTB16( |
1067 | | q31_t x) |
1068 | | { |
1069 | | |
1070 | | return ((((x << 24) >> 24) & 0x0000FFFF) | |
1071 | | (((x << 8) >> 8) & 0xFFFF0000)); |
| 1016 | static __INLINE uint32_t __SXTB16( |
| 1017 | uint32_t x) |
| 1018 | { |
| 1019 | return ((uint32_t)(((((q31_t)x << 24) >> 24) & (q31_t)0x0000FFFF) | |
| 1020 | ((((q31_t)x << 8) >> 8) & (q31_t)0xFFFF0000) )); |
1072 | 1021 | } |
1073 | | |
1074 | 1022 | |
1075 | 1023 | #endif /* defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY) */ |
… |
… |
|
1119 | 1067 | /** |
1120 | 1068 | * @brief Processing function for the Q7 FIR filter. |
1121 | | * @param[in] *S points to an instance of the Q7 FIR filter structure. |
1122 | | * @param[in] *pSrc points to the block of input data. |
1123 | | * @param[out] *pDst points to the block of output data. |
1124 | | * @param[in] blockSize number of samples to process. |
1125 | | * @return none. |
| 1069 | * @param[in] S points to an instance of the Q7 FIR filter structure. |
| 1070 | * @param[in] pSrc points to the block of input data. |
| 1071 | * @param[out] pDst points to the block of output data. |
| 1072 | * @param[in] blockSize number of samples to process. |
1126 | 1073 | */ |
1127 | 1074 | void arm_fir_q7( |
… |
… |
|
1134 | 1081 | /** |
1135 | 1082 | * @brief Initialization function for the Q7 FIR filter. |
1136 | | * @param[in,out] *S points to an instance of the Q7 FIR structure. |
1137 | | * @param[in] numTaps Number of filter coefficients in the filter. |
1138 | | * @param[in] *pCoeffs points to the filter coefficients. |
1139 | | * @param[in] *pState points to the state buffer. |
1140 | | * @param[in] blockSize number of samples that are processed. |
1141 | | * @return none |
| 1083 | * @param[in,out] S points to an instance of the Q7 FIR structure. |
| 1084 | * @param[in] numTaps Number of filter coefficients in the filter. |
| 1085 | * @param[in] pCoeffs points to the filter coefficients. |
| 1086 | * @param[in] pState points to the state buffer. |
| 1087 | * @param[in] blockSize number of samples that are processed. |
1142 | 1088 | */ |
1143 | 1089 | void arm_fir_init_q7( |
… |
… |
|
1151 | 1097 | /** |
1152 | 1098 | * @brief Processing function for the Q15 FIR filter. |
1153 | | * @param[in] *S points to an instance of the Q15 FIR structure. |
1154 | | * @param[in] *pSrc points to the block of input data. |
1155 | | * @param[out] *pDst points to the block of output data. |
1156 | | * @param[in] blockSize number of samples to process. |
1157 | | * @return none. |
| 1099 | * @param[in] S points to an instance of the Q15 FIR structure. |
| 1100 | * @param[in] pSrc points to the block of input data. |
| 1101 | * @param[out] pDst points to the block of output data. |
| 1102 | * @param[in] blockSize number of samples to process. |
1158 | 1103 | */ |
1159 | 1104 | void arm_fir_q15( |
… |
… |
|
1163 | 1108 | uint32_t blockSize); |
1164 | 1109 | |
| 1110 | |
1165 | 1111 | /** |
1166 | 1112 | * @brief Processing function for the fast Q15 FIR filter for Cortex-M3 and Cortex-M4. |
1167 | | * @param[in] *S points to an instance of the Q15 FIR filter structure. |
1168 | | * @param[in] *pSrc points to the block of input data. |
1169 | | * @param[out] *pDst points to the block of output data. |
1170 | | * @param[in] blockSize number of samples to process. |
1171 | | * @return none. |
| 1113 | * @param[in] S points to an instance of the Q15 FIR filter structure. |
| 1114 | * @param[in] pSrc points to the block of input data. |
| 1115 | * @param[out] pDst points to the block of output data. |
| 1116 | * @param[in] blockSize number of samples to process. |
1172 | 1117 | */ |
1173 | 1118 | void arm_fir_fast_q15( |
… |
… |
|
1177 | 1122 | uint32_t blockSize); |
1178 | 1123 | |
| 1124 | |
1179 | 1125 | /** |
1180 | 1126 | * @brief Initialization function for the Q15 FIR filter. |
1181 | | * @param[in,out] *S points to an instance of the Q15 FIR filter structure. |
1182 | | * @param[in] numTaps Number of filter coefficients in the filter. Must be even and greater than or equal to 4. |
1183 | | * @param[in] *pCoeffs points to the filter coefficients. |
1184 | | * @param[in] *pState points to the state buffer. |
1185 | | * @param[in] blockSize number of samples that are processed at a time. |
| 1127 | * @param[in,out] S points to an instance of the Q15 FIR filter structure. |
| 1128 | * @param[in] numTaps Number of filter coefficients in the filter. Must be even and greater than or equal to 4. |
| 1129 | * @param[in] pCoeffs points to the filter coefficients. |
| 1130 | * @param[in] pState points to the state buffer. |
| 1131 | * @param[in] blockSize number of samples that are processed at a time. |
1186 | 1132 | * @return The function returns ARM_MATH_SUCCESS if initialization was successful or ARM_MATH_ARGUMENT_ERROR if |
1187 | 1133 | * <code>numTaps</code> is not a supported value. |
1188 | 1134 | */ |
1189 | | |
1190 | 1135 | arm_status arm_fir_init_q15( |
1191 | 1136 | arm_fir_instance_q15 * S, |
… |
… |
|
1195 | 1140 | uint32_t blockSize); |
1196 | 1141 | |
| 1142 | |
1197 | 1143 | /** |
1198 | 1144 | * @brief Processing function for the Q31 FIR filter. |
1199 | | * @param[in] *S points to an instance of the Q31 FIR filter structure. |
1200 | | * @param[in] *pSrc points to the block of input data. |
1201 | | * @param[out] *pDst points to the block of output data. |
1202 | | * @param[in] blockSize number of samples to process. |
1203 | | * @return none. |
| 1145 | * @param[in] S points to an instance of the Q31 FIR filter structure. |
| 1146 | * @param[in] pSrc points to the block of input data. |
| 1147 | * @param[out] pDst points to the block of output data. |
| 1148 | * @param[in] blockSize number of samples to process. |
1204 | 1149 | */ |
1205 | 1150 | void arm_fir_q31( |
… |
… |
|
1209 | 1154 | uint32_t blockSize); |
1210 | 1155 | |
| 1156 | |
1211 | 1157 | /** |
1212 | 1158 | * @brief Processing function for the fast Q31 FIR filter for Cortex-M3 and Cortex-M4. |
1213 | | * @param[in] *S points to an instance of the Q31 FIR structure. |
1214 | | * @param[in] *pSrc points to the block of input data. |
1215 | | * @param[out] *pDst points to the block of output data. |
1216 | | * @param[in] blockSize number of samples to process. |
1217 | | * @return none. |
| 1159 | * @param[in] S points to an instance of the Q31 FIR structure. |
| 1160 | * @param[in] pSrc points to the block of input data. |
| 1161 | * @param[out] pDst points to the block of output data. |
| 1162 | * @param[in] blockSize number of samples to process. |
1218 | 1163 | */ |
1219 | 1164 | void arm_fir_fast_q31( |
… |
… |
|
1223 | 1168 | uint32_t blockSize); |
1224 | 1169 | |
| 1170 | |
1225 | 1171 | /** |
1226 | 1172 | * @brief Initialization function for the Q31 FIR filter. |
1227 | | * @param[in,out] *S points to an instance of the Q31 FIR structure. |
1228 | | * @param[in] numTaps Number of filter coefficients in the filter. |
1229 | | * @param[in] *pCoeffs points to the filter coefficients. |
1230 | | * @param[in] *pState points to the state buffer. |
1231 | | * @param[in] blockSize number of samples that are processed at a time. |
1232 | | * @return none. |
| 1173 | * @param[in,out] S points to an instance of the Q31 FIR structure. |
| 1174 | * @param[in] numTaps Number of filter coefficients in the filter. |
| 1175 | * @param[in] pCoeffs points to the filter coefficients. |
| 1176 | * @param[in] pState points to the state buffer. |
| 1177 | * @param[in] blockSize number of samples that are processed at a time. |
1233 | 1178 | */ |
1234 | 1179 | void arm_fir_init_q31( |
… |
… |
|
1239 | 1184 | uint32_t blockSize); |
1240 | 1185 | |
| 1186 | |
1241 | 1187 | /** |
1242 | 1188 | * @brief Processing function for the floating-point FIR filter. |
1243 | | * @param[in] *S points to an instance of the floating-point FIR structure. |
1244 | | * @param[in] *pSrc points to the block of input data. |
1245 | | * @param[out] *pDst points to the block of output data. |
1246 | | * @param[in] blockSize number of samples to process. |
1247 | | * @return none. |
| 1189 | * @param[in] S points to an instance of the floating-point FIR structure. |
| 1190 | * @param[in] pSrc points to the block of input data. |
| 1191 | * @param[out] pDst points to the block of output data. |
| 1192 | * @param[in] blockSize number of samples to process. |
1248 | 1193 | */ |
1249 | 1194 | void arm_fir_f32( |
… |
… |
|
1253 | 1198 | uint32_t blockSize); |
1254 | 1199 | |
| 1200 | |
1255 | 1201 | /** |
1256 | 1202 | * @brief Initialization function for the floating-point FIR filter. |
1257 | | * @param[in,out] *S points to an instance of the floating-point FIR filter structure. |
1258 | | * @param[in] numTaps Number of filter coefficients in the filter. |
1259 | | * @param[in] *pCoeffs points to the filter coefficients. |
1260 | | * @param[in] *pState points to the state buffer. |
1261 | | * @param[in] blockSize number of samples that are processed at a time. |
1262 | | * @return none. |
| 1203 | * @param[in,out] S points to an instance of the floating-point FIR filter structure. |
| 1204 | * @param[in] numTaps Number of filter coefficients in the filter. |
| 1205 | * @param[in] pCoeffs points to the filter coefficients. |
| 1206 | * @param[in] pState points to the state buffer. |
| 1207 | * @param[in] blockSize number of samples that are processed at a time. |
1263 | 1208 | */ |
1264 | 1209 | void arm_fir_init_f32( |
… |
… |
|
1275 | 1220 | typedef struct |
1276 | 1221 | { |
1277 | | int8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */ |
1278 | | q15_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */ |
1279 | | q15_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */ |
1280 | | int8_t postShift; /**< Additional shift, in bits, applied to each output sample. */ |
1281 | | |
| 1222 | int8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */ |
| 1223 | q15_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */ |
| 1224 | q15_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */ |
| 1225 | int8_t postShift; /**< Additional shift, in bits, applied to each output sample. */ |
1282 | 1226 | } arm_biquad_casd_df1_inst_q15; |
1283 | | |
1284 | 1227 | |
1285 | 1228 | /** |
… |
… |
|
1292 | 1235 | q31_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */ |
1293 | 1236 | uint8_t postShift; /**< Additional shift, in bits, applied to each output sample. */ |
1294 | | |
1295 | 1237 | } arm_biquad_casd_df1_inst_q31; |
1296 | 1238 | |
… |
… |
|
1300 | 1242 | typedef struct |
1301 | 1243 | { |
1302 | | uint32_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */ |
1303 | | float32_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */ |
1304 | | float32_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */ |
1305 | | |
1306 | | |
| 1244 | uint32_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */ |
| 1245 | float32_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */ |
| 1246 | float32_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */ |
1307 | 1247 | } arm_biquad_casd_df1_inst_f32; |
1308 | 1248 | |
1309 | 1249 | |
1310 | | |
1311 | 1250 | /** |
1312 | 1251 | * @brief Processing function for the Q15 Biquad cascade filter. |
1313 | | * @param[in] *S points to an instance of the Q15 Biquad cascade structure. |
1314 | | * @param[in] *pSrc points to the block of input data. |
1315 | | * @param[out] *pDst points to the block of output data. |
1316 | | * @param[in] blockSize number of samples to process. |
1317 | | * @return none. |
1318 | | */ |
1319 | | |
| 1252 | * @param[in] S points to an instance of the Q15 Biquad cascade structure. |
| 1253 | * @param[in] pSrc points to the block of input data. |
| 1254 | * @param[out] pDst points to the block of output data. |
| 1255 | * @param[in] blockSize number of samples to process. |
| 1256 | */ |
1320 | 1257 | void arm_biquad_cascade_df1_q15( |
1321 | 1258 | const arm_biquad_casd_df1_inst_q15 * S, |
… |
… |
|
1324 | 1261 | uint32_t blockSize); |
1325 | 1262 | |
| 1263 | |
1326 | 1264 | /** |
1327 | 1265 | * @brief Initialization function for the Q15 Biquad cascade filter. |
1328 | | * @param[in,out] *S points to an instance of the Q15 Biquad cascade structure. |
1329 | | * @param[in] numStages number of 2nd order stages in the filter. |
1330 | | * @param[in] *pCoeffs points to the filter coefficients. |
1331 | | * @param[in] *pState points to the state buffer. |
1332 | | * @param[in] postShift Shift to be applied to the output. Varies according to the coefficients format |
1333 | | * @return none |
1334 | | */ |
1335 | | |
| 1266 | * @param[in,out] S points to an instance of the Q15 Biquad cascade structure. |
| 1267 | * @param[in] numStages number of 2nd order stages in the filter. |
| 1268 | * @param[in] pCoeffs points to the filter coefficients. |
| 1269 | * @param[in] pState points to the state buffer. |
| 1270 | * @param[in] postShift Shift to be applied to the output. Varies according to the coefficients format |
| 1271 | */ |
1336 | 1272 | void arm_biquad_cascade_df1_init_q15( |
1337 | 1273 | arm_biquad_casd_df1_inst_q15 * S, |
… |
… |
|
1344 | 1280 | /** |
1345 | 1281 | * @brief Fast but less precise processing function for the Q15 Biquad cascade filter for Cortex-M3 and Cortex-M4. |
1346 | | * @param[in] *S points to an instance of the Q15 Biquad cascade structure. |
1347 | | * @param[in] *pSrc points to the block of input data. |
1348 | | * @param[out] *pDst points to the block of output data. |
1349 | | * @param[in] blockSize number of samples to process. |
1350 | | * @return none. |
1351 | | */ |
1352 | | |
| 1282 | * @param[in] S points to an instance of the Q15 Biquad cascade structure. |
| 1283 | * @param[in] pSrc points to the block of input data. |
| 1284 | * @param[out] pDst points to the block of output data. |
| 1285 | * @param[in] blockSize number of samples to process. |
| 1286 | */ |
1353 | 1287 | void arm_biquad_cascade_df1_fast_q15( |
1354 | 1288 | const arm_biquad_casd_df1_inst_q15 * S, |
… |
… |
|
1360 | 1294 | /** |
1361 | 1295 | * @brief Processing function for the Q31 Biquad cascade filter |
1362 | | * @param[in] *S points to an instance of the Q31 Biquad cascade structure. |
1363 | | * @param[in] *pSrc points to the block of input data. |
1364 | | * @param[out] *pDst points to the block of output data. |
| 1296 | * @param[in] S points to an instance of the Q31 Biquad cascade structure. |
| 1297 | * @param[in] pSrc points to the block of input data. |
| 1298 | * @param[out] pDst points to the block of output data. |
1365 | 1299 | * @param[in] blockSize number of samples to process. |
1366 | | * @return none. |
1367 | | */ |
1368 | | |
| 1300 | */ |
1369 | 1301 | void arm_biquad_cascade_df1_q31( |
1370 | 1302 | const arm_biquad_casd_df1_inst_q31 * S, |
… |
… |
|
1373 | 1305 | uint32_t blockSize); |
1374 | 1306 | |
| 1307 | |
1375 | 1308 | /** |
1376 | 1309 | * @brief Fast but less precise processing function for the Q31 Biquad cascade filter for Cortex-M3 and Cortex-M4. |
1377 | | * @param[in] *S points to an instance of the Q31 Biquad cascade structure. |
1378 | | * @param[in] *pSrc points to the block of input data. |
1379 | | * @param[out] *pDst points to the block of output data. |
| 1310 | * @param[in] S points to an instance of the Q31 Biquad cascade structure. |
| 1311 | * @param[in] pSrc points to the block of input data. |
| 1312 | * @param[out] pDst points to the block of output data. |
1380 | 1313 | * @param[in] blockSize number of samples to process. |
1381 | | * @return none. |
1382 | | */ |
1383 | | |
| 1314 | */ |
1384 | 1315 | void arm_biquad_cascade_df1_fast_q31( |
1385 | 1316 | const arm_biquad_casd_df1_inst_q31 * S, |
… |
… |
|
1388 | 1319 | uint32_t blockSize); |
1389 | 1320 | |
| 1321 | |
1390 | 1322 | /** |
1391 | 1323 | * @brief Initialization function for the Q31 Biquad cascade filter. |
1392 | | * @param[in,out] *S points to an instance of the Q31 Biquad cascade structure. |
1393 | | * @param[in] numStages number of 2nd order stages in the filter. |
1394 | | * @param[in] *pCoeffs points to the filter coefficients. |
1395 | | * @param[in] *pState points to the state buffer. |
1396 | | * @param[in] postShift Shift to be applied to the output. Varies according to the coefficients format |
1397 | | * @return none |
1398 | | */ |
1399 | | |
| 1324 | * @param[in,out] S points to an instance of the Q31 Biquad cascade structure. |
| 1325 | * @param[in] numStages number of 2nd order stages in the filter. |
| 1326 | * @param[in] pCoeffs points to the filter coefficients. |
| 1327 | * @param[in] pState points to the state buffer. |
| 1328 | * @param[in] postShift Shift to be applied to the output. Varies according to the coefficients format |
| 1329 | */ |
1400 | 1330 | void arm_biquad_cascade_df1_init_q31( |
1401 | 1331 | arm_biquad_casd_df1_inst_q31 * S, |
… |
… |
|
1405 | 1335 | int8_t postShift); |
1406 | 1336 | |
| 1337 | |
1407 | 1338 | /** |
1408 | 1339 | * @brief Processing function for the floating-point Biquad cascade filter. |
1409 | | * @param[in] *S points to an instance of the floating-point Biquad cascade structure. |
1410 | | * @param[in] *pSrc points to the block of input data. |
1411 | | * @param[out] *pDst points to the block of output data. |
| 1340 | * @param[in] S points to an instance of the floating-point Biquad cascade structure. |
| 1341 | * @param[in] pSrc points to the block of input data. |
| 1342 | * @param[out] pDst points to the block of output data. |
1412 | 1343 | * @param[in] blockSize number of samples to process. |
1413 | | * @return none. |
1414 | | */ |
1415 | | |
| 1344 | */ |
1416 | 1345 | void arm_biquad_cascade_df1_f32( |
1417 | 1346 | const arm_biquad_casd_df1_inst_f32 * S, |
… |
… |
|
1420 | 1349 | uint32_t blockSize); |
1421 | 1350 | |
| 1351 | |
1422 | 1352 | /** |
1423 | 1353 | * @brief Initialization function for the floating-point Biquad cascade filter. |
1424 | | * @param[in,out] *S points to an instance of the floating-point Biquad cascade structure. |
1425 | | * @param[in] numStages number of 2nd order stages in the filter. |
1426 | | * @param[in] *pCoeffs points to the filter coefficients. |
1427 | | * @param[in] *pState points to the state buffer. |
1428 | | * @return none |
1429 | | */ |
1430 | | |
| 1354 | * @param[in,out] S points to an instance of the floating-point Biquad cascade structure. |
| 1355 | * @param[in] numStages number of 2nd order stages in the filter. |
| 1356 | * @param[in] pCoeffs points to the filter coefficients. |
| 1357 | * @param[in] pState points to the state buffer. |
| 1358 | */ |
1431 | 1359 | void arm_biquad_cascade_df1_init_f32( |
1432 | 1360 | arm_biquad_casd_df1_inst_f32 * S, |
… |
… |
|
1439 | 1367 | * @brief Instance structure for the floating-point matrix structure. |
1440 | 1368 | */ |
1441 | | |
1442 | 1369 | typedef struct |
1443 | 1370 | { |
… |
… |
|
1451 | 1378 | * @brief Instance structure for the floating-point matrix structure. |
1452 | 1379 | */ |
1453 | | |
1454 | 1380 | typedef struct |
1455 | 1381 | { |
… |
… |
|
1462 | 1388 | * @brief Instance structure for the Q15 matrix structure. |
1463 | 1389 | */ |
1464 | | |
1465 | 1390 | typedef struct |
1466 | 1391 | { |
… |
… |
|
1468 | 1393 | uint16_t numCols; /**< number of columns of the matrix. */ |
1469 | 1394 | q15_t *pData; /**< points to the data of the matrix. */ |
1470 | | |
1471 | 1395 | } arm_matrix_instance_q15; |
1472 | 1396 | |
… |
… |
|
1474 | 1398 | * @brief Instance structure for the Q31 matrix structure. |
1475 | 1399 | */ |
1476 | | |
1477 | 1400 | typedef struct |
1478 | 1401 | { |
… |
… |
|
1480 | 1403 | uint16_t numCols; /**< number of columns of the matrix. */ |
1481 | 1404 | q31_t *pData; /**< points to the data of the matrix. */ |
1482 | | |
1483 | 1405 | } arm_matrix_instance_q31; |
1484 | 1406 | |
1485 | 1407 | |
1486 | | |
1487 | 1408 | /** |
1488 | 1409 | * @brief Floating-point matrix addition. |
1489 | | * @param[in] *pSrcA points to the first input matrix structure |
1490 | | * @param[in] *pSrcB points to the second input matrix structure |
1491 | | * @param[out] *pDst points to output matrix structure |
| 1410 | * @param[in] pSrcA points to the first input matrix structure |
| 1411 | * @param[in] pSrcB points to the second input matrix structure |
| 1412 | * @param[out] pDst points to output matrix structure |
1492 | 1413 | * @return The function returns either |
1493 | 1414 | * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1494 | 1415 | */ |
1495 | | |
1496 | 1416 | arm_status arm_mat_add_f32( |
1497 | 1417 | const arm_matrix_instance_f32 * pSrcA, |
… |
… |
|
1499 | 1419 | arm_matrix_instance_f32 * pDst); |
1500 | 1420 | |
| 1421 | |
1501 | 1422 | /** |
1502 | 1423 | * @brief Q15 matrix addition. |
1503 | | * @param[in] *pSrcA points to the first input matrix structure |
1504 | | * @param[in] *pSrcB points to the second input matrix structure |
1505 | | * @param[out] *pDst points to output matrix structure |
| 1424 | * @param[in] pSrcA points to the first input matrix structure |
| 1425 | * @param[in] pSrcB points to the second input matrix structure |
| 1426 | * @param[out] pDst points to output matrix structure |
1506 | 1427 | * @return The function returns either |
1507 | 1428 | * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1508 | 1429 | */ |
1509 | | |
1510 | 1430 | arm_status arm_mat_add_q15( |
1511 | 1431 | const arm_matrix_instance_q15 * pSrcA, |
… |
… |
|
1513 | 1433 | arm_matrix_instance_q15 * pDst); |
1514 | 1434 | |
| 1435 | |
1515 | 1436 | /** |
1516 | 1437 | * @brief Q31 matrix addition. |
1517 | | * @param[in] *pSrcA points to the first input matrix structure |
1518 | | * @param[in] *pSrcB points to the second input matrix structure |
1519 | | * @param[out] *pDst points to output matrix structure |
| 1438 | * @param[in] pSrcA points to the first input matrix structure |
| 1439 | * @param[in] pSrcB points to the second input matrix structure |
| 1440 | * @param[out] pDst points to output matrix structure |
1520 | 1441 | * @return The function returns either |
1521 | 1442 | * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1522 | 1443 | */ |
1523 | | |
1524 | 1444 | arm_status arm_mat_add_q31( |
1525 | 1445 | const arm_matrix_instance_q31 * pSrcA, |
… |
… |
|
1527 | 1447 | arm_matrix_instance_q31 * pDst); |
1528 | 1448 | |
| 1449 | |
1529 | 1450 | /** |
1530 | 1451 | * @brief Floating-point, complex, matrix multiplication. |
1531 | | * @param[in] *pSrcA points to the first input matrix structure |
1532 | | * @param[in] *pSrcB points to the second input matrix structure |
1533 | | * @param[out] *pDst points to output matrix structure |
| 1452 | * @param[in] pSrcA points to the first input matrix structure |
| 1453 | * @param[in] pSrcB points to the second input matrix structure |
| 1454 | * @param[out] pDst points to output matrix structure |
1534 | 1455 | * @return The function returns either |
1535 | 1456 | * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1536 | 1457 | */ |
1537 | | |
1538 | 1458 | arm_status arm_mat_cmplx_mult_f32( |
1539 | 1459 | const arm_matrix_instance_f32 * pSrcA, |
… |
… |
|
1541 | 1461 | arm_matrix_instance_f32 * pDst); |
1542 | 1462 | |
| 1463 | |
1543 | 1464 | /** |
1544 | 1465 | * @brief Q15, complex, matrix multiplication. |
1545 | | * @param[in] *pSrcA points to the first input matrix structure |
1546 | | * @param[in] *pSrcB points to the second input matrix structure |
1547 | | * @param[out] *pDst points to output matrix structure |
| 1466 | * @param[in] pSrcA points to the first input matrix structure |
| 1467 | * @param[in] pSrcB points to the second input matrix structure |
| 1468 | * @param[out] pDst points to output matrix structure |
1548 | 1469 | * @return The function returns either |
1549 | 1470 | * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1550 | 1471 | */ |
1551 | | |
1552 | 1472 | arm_status arm_mat_cmplx_mult_q15( |
1553 | 1473 | const arm_matrix_instance_q15 * pSrcA, |
… |
… |
|
1556 | 1476 | q15_t * pScratch); |
1557 | 1477 | |
| 1478 | |
1558 | 1479 | /** |
1559 | 1480 | * @brief Q31, complex, matrix multiplication. |
1560 | | * @param[in] *pSrcA points to the first input matrix structure |
1561 | | * @param[in] *pSrcB points to the second input matrix structure |
1562 | | * @param[out] *pDst points to output matrix structure |
| 1481 | * @param[in] pSrcA points to the first input matrix structure |
| 1482 | * @param[in] pSrcB points to the second input matrix structure |
| 1483 | * @param[out] pDst points to output matrix structure |
1563 | 1484 | * @return The function returns either |
1564 | 1485 | * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1565 | 1486 | */ |
1566 | | |
1567 | 1487 | arm_status arm_mat_cmplx_mult_q31( |
1568 | 1488 | const arm_matrix_instance_q31 * pSrcA, |
… |
… |
|
1573 | 1493 | /** |
1574 | 1494 | * @brief Floating-point matrix transpose. |
1575 | | * @param[in] *pSrc points to the input matrix |
1576 | | * @param[out] *pDst points to the output matrix |
1577 | | * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code> |
| 1495 | * @param[in] pSrc points to the input matrix |
| 1496 | * @param[out] pDst points to the output matrix |
| 1497 | * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code> |
1578 | 1498 | * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1579 | 1499 | */ |
1580 | | |
1581 | 1500 | arm_status arm_mat_trans_f32( |
1582 | 1501 | const arm_matrix_instance_f32 * pSrc, |
… |
… |
|
1586 | 1505 | /** |
1587 | 1506 | * @brief Q15 matrix transpose. |
1588 | | * @param[in] *pSrc points to the input matrix |
1589 | | * @param[out] *pDst points to the output matrix |
1590 | | * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code> |
| 1507 | * @param[in] pSrc points to the input matrix |
| 1508 | * @param[out] pDst points to the output matrix |
| 1509 | * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code> |
1591 | 1510 | * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1592 | 1511 | */ |
1593 | | |
1594 | 1512 | arm_status arm_mat_trans_q15( |
1595 | 1513 | const arm_matrix_instance_q15 * pSrc, |
1596 | 1514 | arm_matrix_instance_q15 * pDst); |
1597 | 1515 | |
| 1516 | |
1598 | 1517 | /** |
1599 | 1518 | * @brief Q31 matrix transpose. |
1600 | | * @param[in] *pSrc points to the input matrix |
1601 | | * @param[out] *pDst points to the output matrix |
1602 | | * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code> |
| 1519 | * @param[in] pSrc points to the input matrix |
| 1520 | * @param[out] pDst points to the output matrix |
| 1521 | * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code> |
1603 | 1522 | * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1604 | 1523 | */ |
1605 | | |
1606 | 1524 | arm_status arm_mat_trans_q31( |
1607 | 1525 | const arm_matrix_instance_q31 * pSrc, |
… |
… |
|
1611 | 1529 | /** |
1612 | 1530 | * @brief Floating-point matrix multiplication |
1613 | | * @param[in] *pSrcA points to the first input matrix structure |
1614 | | * @param[in] *pSrcB points to the second input matrix structure |
1615 | | * @param[out] *pDst points to output matrix structure |
| 1531 | * @param[in] pSrcA points to the first input matrix structure |
| 1532 | * @param[in] pSrcB points to the second input matrix structure |
| 1533 | * @param[out] pDst points to output matrix structure |
1616 | 1534 | * @return The function returns either |
1617 | 1535 | * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1618 | 1536 | */ |
1619 | | |
1620 | 1537 | arm_status arm_mat_mult_f32( |
1621 | 1538 | const arm_matrix_instance_f32 * pSrcA, |
… |
… |
|
1623 | 1540 | arm_matrix_instance_f32 * pDst); |
1624 | 1541 | |
| 1542 | |
1625 | 1543 | /** |
1626 | 1544 | * @brief Q15 matrix multiplication |
1627 | | * @param[in] *pSrcA points to the first input matrix structure |
1628 | | * @param[in] *pSrcB points to the second input matrix structure |
1629 | | * @param[out] *pDst points to output matrix structure |
1630 | | * @param[in] *pState points to the array for storing intermediate results |
| 1545 | * @param[in] pSrcA points to the first input matrix structure |
| 1546 | * @param[in] pSrcB points to the second input matrix structure |
| 1547 | * @param[out] pDst points to output matrix structure |
| 1548 | * @param[in] pState points to the array for storing intermediate results |
1631 | 1549 | * @return The function returns either |
1632 | 1550 | * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1633 | 1551 | */ |
1634 | | |
1635 | 1552 | arm_status arm_mat_mult_q15( |
1636 | 1553 | const arm_matrix_instance_q15 * pSrcA, |
… |
… |
|
1639 | 1556 | q15_t * pState); |
1640 | 1557 | |
| 1558 | |
1641 | 1559 | /** |
1642 | 1560 | * @brief Q15 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4 |
1643 | | * @param[in] *pSrcA points to the first input matrix structure |
1644 | | * @param[in] *pSrcB points to the second input matrix structure |
1645 | | * @param[out] *pDst points to output matrix structure |
1646 | | * @param[in] *pState points to the array for storing intermediate results |
| 1561 | * @param[in] pSrcA points to the first input matrix structure |
| 1562 | * @param[in] pSrcB points to the second input matrix structure |
| 1563 | * @param[out] pDst points to output matrix structure |
| 1564 | * @param[in] pState points to the array for storing intermediate results |
1647 | 1565 | * @return The function returns either |
1648 | 1566 | * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1649 | 1567 | */ |
1650 | | |
1651 | 1568 | arm_status arm_mat_mult_fast_q15( |
1652 | 1569 | const arm_matrix_instance_q15 * pSrcA, |
… |
… |
|
1655 | 1572 | q15_t * pState); |
1656 | 1573 | |
| 1574 | |
1657 | 1575 | /** |
1658 | 1576 | * @brief Q31 matrix multiplication |
1659 | | * @param[in] *pSrcA points to the first input matrix structure |
1660 | | * @param[in] *pSrcB points to the second input matrix structure |
1661 | | * @param[out] *pDst points to output matrix structure |
| 1577 | * @param[in] pSrcA points to the first input matrix structure |
| 1578 | * @param[in] pSrcB points to the second input matrix structure |
| 1579 | * @param[out] pDst points to output matrix structure |
1662 | 1580 | * @return The function returns either |
1663 | 1581 | * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1664 | 1582 | */ |
1665 | | |
1666 | 1583 | arm_status arm_mat_mult_q31( |
1667 | 1584 | const arm_matrix_instance_q31 * pSrcA, |
… |
… |
|
1669 | 1586 | arm_matrix_instance_q31 * pDst); |
1670 | 1587 | |
| 1588 | |
1671 | 1589 | /** |
1672 | 1590 | * @brief Q31 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4 |
1673 | | * @param[in] *pSrcA points to the first input matrix structure |
1674 | | * @param[in] *pSrcB points to the second input matrix structure |
1675 | | * @param[out] *pDst points to output matrix structure |
| 1591 | * @param[in] pSrcA points to the first input matrix structure |
| 1592 | * @param[in] pSrcB points to the second input matrix structure |
| 1593 | * @param[out] pDst points to output matrix structure |
1676 | 1594 | * @return The function returns either |
1677 | 1595 | * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1678 | 1596 | */ |
1679 | | |
1680 | 1597 | arm_status arm_mat_mult_fast_q31( |
1681 | 1598 | const arm_matrix_instance_q31 * pSrcA, |
… |
… |
|
1686 | 1603 | /** |
1687 | 1604 | * @brief Floating-point matrix subtraction |
1688 | | * @param[in] *pSrcA points to the first input matrix structure |
1689 | | * @param[in] *pSrcB points to the second input matrix structure |
1690 | | * @param[out] *pDst points to output matrix structure |
| 1605 | * @param[in] pSrcA points to the first input matrix structure |
| 1606 | * @param[in] pSrcB points to the second input matrix structure |
| 1607 | * @param[out] pDst points to output matrix structure |
1691 | 1608 | * @return The function returns either |
1692 | 1609 | * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1693 | 1610 | */ |
1694 | | |
1695 | 1611 | arm_status arm_mat_sub_f32( |
1696 | 1612 | const arm_matrix_instance_f32 * pSrcA, |
… |
… |
|
1698 | 1614 | arm_matrix_instance_f32 * pDst); |
1699 | 1615 | |
| 1616 | |
1700 | 1617 | /** |
1701 | 1618 | * @brief Q15 matrix subtraction |
1702 | | * @param[in] *pSrcA points to the first input matrix structure |
1703 | | * @param[in] *pSrcB points to the second input matrix structure |
1704 | | * @param[out] *pDst points to output matrix structure |
| 1619 | * @param[in] pSrcA points to the first input matrix structure |
| 1620 | * @param[in] pSrcB points to the second input matrix structure |
| 1621 | * @param[out] pDst points to output matrix structure |
1705 | 1622 | * @return The function returns either |
1706 | 1623 | * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1707 | 1624 | */ |
1708 | | |
1709 | 1625 | arm_status arm_mat_sub_q15( |
1710 | 1626 | const arm_matrix_instance_q15 * pSrcA, |
… |
… |
|
1712 | 1628 | arm_matrix_instance_q15 * pDst); |
1713 | 1629 | |
| 1630 | |
1714 | 1631 | /** |
1715 | 1632 | * @brief Q31 matrix subtraction |
1716 | | * @param[in] *pSrcA points to the first input matrix structure |
1717 | | * @param[in] *pSrcB points to the second input matrix structure |
1718 | | * @param[out] *pDst points to output matrix structure |
| 1633 | * @param[in] pSrcA points to the first input matrix structure |
| 1634 | * @param[in] pSrcB points to the second input matrix structure |
| 1635 | * @param[out] pDst points to output matrix structure |
1719 | 1636 | * @return The function returns either |
1720 | 1637 | * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1721 | 1638 | */ |
1722 | | |
1723 | 1639 | arm_status arm_mat_sub_q31( |
1724 | 1640 | const arm_matrix_instance_q31 * pSrcA, |
… |
… |
|
1726 | 1642 | arm_matrix_instance_q31 * pDst); |
1727 | 1643 | |
| 1644 | |
1728 | 1645 | /** |
1729 | 1646 | * @brief Floating-point matrix scaling. |
1730 | | * @param[in] *pSrc points to the input matrix |
1731 | | * @param[in] scale scale factor |
1732 | | * @param[out] *pDst points to the output matrix |
| 1647 | * @param[in] pSrc points to the input matrix |
| 1648 | * @param[in] scale scale factor |
| 1649 | * @param[out] pDst points to the output matrix |
1733 | 1650 | * @return The function returns either |
1734 | 1651 | * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1735 | 1652 | */ |
1736 | | |
1737 | 1653 | arm_status arm_mat_scale_f32( |
1738 | 1654 | const arm_matrix_instance_f32 * pSrc, |
… |
… |
|
1740 | 1656 | arm_matrix_instance_f32 * pDst); |
1741 | 1657 | |
| 1658 | |
1742 | 1659 | /** |
1743 | 1660 | * @brief Q15 matrix scaling. |
1744 | | * @param[in] *pSrc points to input matrix |
1745 | | * @param[in] scaleFract fractional portion of the scale factor |
1746 | | * @param[in] shift number of bits to shift the result by |
1747 | | * @param[out] *pDst points to output matrix |
| 1661 | * @param[in] pSrc points to input matrix |
| 1662 | * @param[in] scaleFract fractional portion of the scale factor |
| 1663 | * @param[in] shift number of bits to shift the result by |
| 1664 | * @param[out] pDst points to output matrix |
1748 | 1665 | * @return The function returns either |
1749 | 1666 | * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1750 | 1667 | */ |
1751 | | |
1752 | 1668 | arm_status arm_mat_scale_q15( |
1753 | 1669 | const arm_matrix_instance_q15 * pSrc, |
… |
… |
|
1756 | 1672 | arm_matrix_instance_q15 * pDst); |
1757 | 1673 | |
| 1674 | |
1758 | 1675 | /** |
1759 | 1676 | * @brief Q31 matrix scaling. |
1760 | | * @param[in] *pSrc points to input matrix |
1761 | | * @param[in] scaleFract fractional portion of the scale factor |
1762 | | * @param[in] shift number of bits to shift the result by |
1763 | | * @param[out] *pDst points to output matrix structure |
| 1677 | * @param[in] pSrc points to input matrix |
| 1678 | * @param[in] scaleFract fractional portion of the scale factor |
| 1679 | * @param[in] shift number of bits to shift the result by |
| 1680 | * @param[out] pDst points to output matrix structure |
1764 | 1681 | * @return The function returns either |
1765 | 1682 | * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking. |
1766 | 1683 | */ |
1767 | | |
1768 | 1684 | arm_status arm_mat_scale_q31( |
1769 | 1685 | const arm_matrix_instance_q31 * pSrc, |
… |
… |
|
1775 | 1691 | /** |
1776 | 1692 | * @brief Q31 matrix initialization. |
1777 | | * @param[in,out] *S points to an instance of the floating-point matrix structure. |
1778 | | * @param[in] nRows number of rows in the matrix. |
1779 | | * @param[in] nColumns number of columns in the matrix. |
1780 | | * @param[in] *pData points to the matrix data array. |
1781 | | * @return none |
1782 | | */ |
1783 | | |
| 1693 | * @param[in,out] S points to an instance of the floating-point matrix structure. |
| 1694 | * @param[in] nRows number of rows in the matrix. |
| 1695 | * @param[in] nColumns number of columns in the matrix. |
| 1696 | * @param[in] pData points to the matrix data array. |
| 1697 | */ |
1784 | 1698 | void arm_mat_init_q31( |
1785 | 1699 | arm_matrix_instance_q31 * S, |
… |
… |
|
1788 | 1702 | q31_t * pData); |
1789 | 1703 | |
| 1704 | |
1790 | 1705 | /** |
1791 | 1706 | * @brief Q15 matrix initialization. |
1792 | | * @param[in,out] *S points to an instance of the floating-point matrix structure. |
1793 | | * @param[in] nRows number of rows in the matrix. |
1794 | | * @param[in] nColumns number of columns in the matrix. |
1795 | | * @param[in] *pData points to the matrix data array. |
1796 | | * @return none |
1797 | | */ |
1798 | | |
| 1707 | * @param[in,out] S points to an instance of the floating-point matrix structure. |
| 1708 | * @param[in] nRows number of rows in the matrix. |
| 1709 | * @param[in] nColumns number of columns in the matrix. |
| 1710 | * @param[in] pData points to the matrix data array. |
| 1711 | */ |
1799 | 1712 | void arm_mat_init_q15( |
1800 | 1713 | arm_matrix_instance_q15 * S, |
… |
… |
|
1803 | 1716 | q15_t * pData); |
1804 | 1717 | |
| 1718 | |
1805 | 1719 | /** |
1806 | 1720 | * @brief Floating-point matrix initialization. |
1807 | | * @param[in,out] *S points to an instance of the floating-point matrix structure. |
1808 | | * @param[in] nRows number of rows in the matrix. |
1809 | | * @param[in] nColumns number of columns in the matrix. |
1810 | | * @param[in] *pData points to the matrix data array. |
1811 | | * @return none |
1812 | | */ |
1813 | | |
| 1721 | * @param[in,out] S points to an instance of the floating-point matrix structure. |
| 1722 | * @param[in] nRows number of rows in the matrix. |
| 1723 | * @param[in] nColumns number of columns in the matrix. |
| 1724 | * @param[in] pData points to the matrix data array. |
| 1725 | */ |
1814 | 1726 | void arm_mat_init_f32( |
1815 | 1727 | arm_matrix_instance_f32 * S, |
… |
… |
|
1825 | 1737 | typedef struct |
1826 | 1738 | { |
1827 | | q15_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */ |
| 1739 | q15_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */ |
1828 | 1740 | #ifdef ARM_MATH_CM0_FAMILY |
1829 | 1741 | q15_t A1; |
… |
… |
|
1832 | 1744 | q31_t A1; /**< The derived gain A1 = -Kp - 2Kd | Kd.*/ |
1833 | 1745 | #endif |
1834 | | q15_t state[3]; /**< The state array of length 3. */ |
| 1746 | q15_t state[3]; /**< The state array of length 3. */ |
1835 | 1747 | q15_t Kp; /**< The proportional gain. */ |
1836 | 1748 | q15_t Ki; /**< The integral gain. */ |
… |
… |
|
1850 | 1762 | q31_t Ki; /**< The integral gain. */ |
1851 | 1763 | q31_t Kd; /**< The derivative gain. */ |
1852 | | |
1853 | 1764 | } arm_pid_instance_q31; |
1854 | 1765 | |
… |
… |
|
1862 | 1773 | float32_t A2; /**< The derived gain, A2 = Kd . */ |
1863 | 1774 | float32_t state[3]; /**< The state array of length 3. */ |
1864 | | float32_t Kp; /**< The proportional gain. */ |
1865 | | float32_t Ki; /**< The integral gain. */ |
1866 | | float32_t Kd; /**< The derivative gain. */ |
| 1775 | float32_t Kp; /**< The proportional gain. */ |
| 1776 | float32_t Ki; /**< The integral gain. */ |
| 1777 | float32_t Kd; /**< The derivative gain. */ |
1867 | 1778 | } arm_pid_instance_f32; |
1868 | 1779 | |
… |
… |
|
1871 | 1782 | /** |
1872 | 1783 | * @brief Initialization function for the floating-point PID Control. |
1873 | | * @param[in,out] *S points to an instance of the PID structure. |
| 1784 | * @param[in,out] S points to an instance of the PID structure. |
1874 | 1785 | * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state. |
1875 | | * @return none. |
1876 | 1786 | */ |
1877 | 1787 | void arm_pid_init_f32( |
… |
… |
|
1879 | 1789 | int32_t resetStateFlag); |
1880 | 1790 | |
| 1791 | |
1881 | 1792 | /** |
1882 | 1793 | * @brief Reset function for the floating-point PID Control. |
1883 | | * @param[in,out] *S is an instance of the floating-point PID Control structure |
1884 | | * @return none |
| 1794 | * @param[in,out] S is an instance of the floating-point PID Control structure |
1885 | 1795 | */ |
1886 | 1796 | void arm_pid_reset_f32( |
… |
… |
|
1890 | 1800 | /** |
1891 | 1801 | * @brief Initialization function for the Q31 PID Control. |
1892 | | * @param[in,out] *S points to an instance of the Q15 PID structure. |
| 1802 | * @param[in,out] S points to an instance of the Q15 PID structure. |
1893 | 1803 | * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state. |
1894 | | * @return none. |
1895 | 1804 | */ |
1896 | 1805 | void arm_pid_init_q31( |
… |
… |
|
1901 | 1810 | /** |
1902 | 1811 | * @brief Reset function for the Q31 PID Control. |
1903 | | * @param[in,out] *S points to an instance of the Q31 PID Control structure |
1904 | | * @return none |
| 1812 | * @param[in,out] S points to an instance of the Q31 PID Control structure |
1905 | 1813 | */ |
1906 | 1814 | |
… |
… |
|
1908 | 1816 | arm_pid_instance_q31 * S); |
1909 | 1817 | |
| 1818 | |
1910 | 1819 | /** |
1911 | 1820 | * @brief Initialization function for the Q15 PID Control. |
1912 | | * @param[in,out] *S points to an instance of the Q15 PID structure. |
1913 | | * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state. |
1914 | | * @return none. |
| 1821 | * @param[in,out] S points to an instance of the Q15 PID structure. |
| 1822 | * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state. |
1915 | 1823 | */ |
1916 | 1824 | void arm_pid_init_q15( |
… |
… |
|
1918 | 1826 | int32_t resetStateFlag); |
1919 | 1827 | |
| 1828 | |
1920 | 1829 | /** |
1921 | 1830 | * @brief Reset function for the Q15 PID Control. |
1922 | | * @param[in,out] *S points to an instance of the q15 PID Control structure |
1923 | | * @return none |
| 1831 | * @param[in,out] S points to an instance of the q15 PID Control structure |
1924 | 1832 | */ |
1925 | 1833 | void arm_pid_reset_q15( |
… |
… |
|
1941 | 1849 | * @brief Instance structure for the floating-point bilinear interpolation function. |
1942 | 1850 | */ |
1943 | | |
1944 | 1851 | typedef struct |
1945 | 1852 | { |
… |
… |
|
1952 | 1859 | * @brief Instance structure for the Q31 bilinear interpolation function. |
1953 | 1860 | */ |
1954 | | |
1955 | 1861 | typedef struct |
1956 | 1862 | { |
… |
… |
|
1963 | 1869 | * @brief Instance structure for the Q15 bilinear interpolation function. |
1964 | 1870 | */ |
1965 | | |
1966 | 1871 | typedef struct |
1967 | 1872 | { |
… |
… |
|
1974 | 1879 | * @brief Instance structure for the Q15 bilinear interpolation function. |
1975 | 1880 | */ |
1976 | | |
1977 | 1881 | typedef struct |
1978 | 1882 | { |
1979 | 1883 | uint16_t numRows; /**< number of rows in the data table. */ |
1980 | 1884 | uint16_t numCols; /**< number of columns in the data table. */ |
1981 | | q7_t *pData; /**< points to the data table. */ |
| 1885 | q7_t *pData; /**< points to the data table. */ |
1982 | 1886 | } arm_bilinear_interp_instance_q7; |
1983 | 1887 | |
… |
… |
|
1985 | 1889 | /** |
1986 | 1890 | * @brief Q7 vector multiplication. |
1987 | | * @param[in] *pSrcA points to the first input vector |
1988 | | * @param[in] *pSrcB points to the second input vector |
1989 | | * @param[out] *pDst points to the output vector |
1990 | | * @param[in] blockSize number of samples in each vector |
1991 | | * @return none. |
1992 | | */ |
1993 | | |
| 1891 | * @param[in] pSrcA points to the first input vector |
| 1892 | * @param[in] pSrcB points to the second input vector |
| 1893 | * @param[out] pDst points to the output vector |
| 1894 | * @param[in] blockSize number of samples in each vector |
| 1895 | */ |
1994 | 1896 | void arm_mult_q7( |
1995 | 1897 | q7_t * pSrcA, |
… |
… |
|
1998 | 1900 | uint32_t blockSize); |
1999 | 1901 | |
| 1902 | |
2000 | 1903 | /** |
2001 | 1904 | * @brief Q15 vector multiplication. |
2002 | | * @param[in] *pSrcA points to the first input vector |
2003 | | * @param[in] *pSrcB points to the second input vector |
2004 | | * @param[out] *pDst points to the output vector |
2005 | | * @param[in] blockSize number of samples in each vector |
2006 | | * @return none. |
2007 | | */ |
2008 | | |
| 1905 | * @param[in] pSrcA points to the first input vector |
| 1906 | * @param[in] pSrcB points to the second input vector |
| 1907 | * @param[out] pDst points to the output vector |
| 1908 | * @param[in] blockSize number of samples in each vector |
| 1909 | */ |
2009 | 1910 | void arm_mult_q15( |
2010 | 1911 | q15_t * pSrcA, |
… |
… |
|
2013 | 1914 | uint32_t blockSize); |
2014 | 1915 | |
| 1916 | |
2015 | 1917 | /** |
2016 | 1918 | * @brief Q31 vector multiplication. |
2017 | | * @param[in] *pSrcA points to the first input vector |
2018 | | * @param[in] *pSrcB points to the second input vector |
2019 | | * @param[out] *pDst points to the output vector |
2020 | | * @param[in] blockSize number of samples in each vector |
2021 | | * @return none. |
2022 | | */ |
2023 | | |
| 1919 | * @param[in] pSrcA points to the first input vector |
| 1920 | * @param[in] pSrcB points to the second input vector |
| 1921 | * @param[out] pDst points to the output vector |
| 1922 | * @param[in] blockSize number of samples in each vector |
| 1923 | */ |
2024 | 1924 | void arm_mult_q31( |
2025 | 1925 | q31_t * pSrcA, |
… |
… |
|
2028 | 1928 | uint32_t blockSize); |
2029 | 1929 | |
| 1930 | |
2030 | 1931 | /** |
2031 | 1932 | * @brief Floating-point vector multiplication. |
2032 | | * @param[in] *pSrcA points to the first input vector |
2033 | | * @param[in] *pSrcB points to the second input vector |
2034 | | * @param[out] *pDst points to the output vector |
2035 | | * @param[in] blockSize number of samples in each vector |
2036 | | * @return none. |
2037 | | */ |
2038 | | |
| 1933 | * @param[in] pSrcA points to the first input vector |
| 1934 | * @param[in] pSrcB points to the second input vector |
| 1935 | * @param[out] pDst points to the output vector |
| 1936 | * @param[in] blockSize number of samples in each vector |
| 1937 | */ |
2039 | 1938 | void arm_mult_f32( |
2040 | 1939 | float32_t * pSrcA, |
… |
… |
|
2044 | 1943 | |
2045 | 1944 | |
2046 | | |
2047 | | |
2048 | | |
2049 | | |
2050 | 1945 | /** |
2051 | 1946 | * @brief Instance structure for the Q15 CFFT/CIFFT function. |
2052 | 1947 | */ |
2053 | | |
2054 | 1948 | typedef struct |
2055 | 1949 | { |
… |
… |
|
2057 | 1951 | uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */ |
2058 | 1952 | uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */ |
2059 | | q15_t *pTwiddle; /**< points to the Sin twiddle factor table. */ |
| 1953 | q15_t *pTwiddle; /**< points to the Sin twiddle factor table. */ |
2060 | 1954 | uint16_t *pBitRevTable; /**< points to the bit reversal table. */ |
2061 | 1955 | uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */ |
… |
… |
|
2076 | 1970 | |
2077 | 1971 | |
2078 | | |
2079 | 1972 | /** |
2080 | 1973 | * @brief Instance structure for the Q15 CFFT/CIFFT function. |
2081 | 1974 | */ |
2082 | | |
2083 | 1975 | typedef struct |
2084 | 1976 | { |
… |
… |
|
2107 | 1999 | * @brief Instance structure for the Radix-2 Q31 CFFT/CIFFT function. |
2108 | 2000 | */ |
2109 | | |
2110 | 2001 | typedef struct |
2111 | 2002 | { |
… |
… |
|
2113 | 2004 | uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */ |
2114 | 2005 | uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */ |
2115 | | q31_t *pTwiddle; /**< points to the Twiddle factor table. */ |
| 2006 | q31_t *pTwiddle; /**< points to the Twiddle factor table. */ |
2116 | 2007 | uint16_t *pBitRevTable; /**< points to the bit reversal table. */ |
2117 | 2008 | uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */ |
… |
… |
|
2134 | 2025 | * @brief Instance structure for the Q31 CFFT/CIFFT function. |
2135 | 2026 | */ |
2136 | | |
2137 | 2027 | typedef struct |
2138 | 2028 | { |
… |
… |
|
2161 | 2051 | * @brief Instance structure for the floating-point CFFT/CIFFT function. |
2162 | 2052 | */ |
2163 | | |
2164 | 2053 | typedef struct |
2165 | 2054 | { |
… |
… |
|
2171 | 2060 | uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */ |
2172 | 2061 | uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */ |
2173 | | float32_t onebyfftLen; /**< value of 1/fftLen. */ |
| 2062 | float32_t onebyfftLen; /**< value of 1/fftLen. */ |
2174 | 2063 | } arm_cfft_radix2_instance_f32; |
2175 | 2064 | |
… |
… |
|
2189 | 2078 | * @brief Instance structure for the floating-point CFFT/CIFFT function. |
2190 | 2079 | */ |
2191 | | |
2192 | 2080 | typedef struct |
2193 | 2081 | { |
… |
… |
|
2199 | 2087 | uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */ |
2200 | 2088 | uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */ |
2201 | | float32_t onebyfftLen; /**< value of 1/fftLen. */ |
| 2089 | float32_t onebyfftLen; /**< value of 1/fftLen. */ |
2202 | 2090 | } arm_cfft_radix4_instance_f32; |
2203 | 2091 | |
… |
… |
|
2217 | 2105 | * @brief Instance structure for the fixed-point CFFT/CIFFT function. |
2218 | 2106 | */ |
2219 | | |
2220 | 2107 | typedef struct |
2221 | 2108 | { |
… |
… |
|
2235 | 2122 | * @brief Instance structure for the fixed-point CFFT/CIFFT function. |
2236 | 2123 | */ |
2237 | | |
2238 | 2124 | typedef struct |
2239 | 2125 | { |
… |
… |
|
2253 | 2139 | * @brief Instance structure for the floating-point CFFT/CIFFT function. |
2254 | 2140 | */ |
2255 | | |
2256 | 2141 | typedef struct |
2257 | 2142 | { |
… |
… |
|
2271 | 2156 | * @brief Instance structure for the Q15 RFFT/RIFFT function. |
2272 | 2157 | */ |
2273 | | |
2274 | 2158 | typedef struct |
2275 | 2159 | { |
… |
… |
|
2297 | 2181 | * @brief Instance structure for the Q31 RFFT/RIFFT function. |
2298 | 2182 | */ |
2299 | | |
2300 | 2183 | typedef struct |
2301 | 2184 | { |
… |
… |
|
2323 | 2206 | * @brief Instance structure for the floating-point RFFT/RIFFT function. |
2324 | 2207 | */ |
2325 | | |
2326 | 2208 | typedef struct |
2327 | 2209 | { |
… |
… |
|
2351 | 2233 | * @brief Instance structure for the floating-point RFFT/RIFFT function. |
2352 | 2234 | */ |
2353 | | |
2354 | 2235 | typedef struct |
2355 | 2236 | { |
2356 | 2237 | arm_cfft_instance_f32 Sint; /**< Internal CFFT structure. */ |
2357 | | uint16_t fftLenRFFT; /**< length of the real sequence */ |
2358 | | float32_t * pTwiddleRFFT; /**< Twiddle factors real stage */ |
| 2238 | uint16_t fftLenRFFT; /**< length of the real sequence */ |
| 2239 | float32_t * pTwiddleRFFT; /**< Twiddle factors real stage */ |
2359 | 2240 | } arm_rfft_fast_instance_f32 ; |
2360 | 2241 | |
2361 | 2242 | arm_status arm_rfft_fast_init_f32 ( |
2362 | | arm_rfft_fast_instance_f32 * S, |
2363 | | uint16_t fftLen); |
| 2243 | arm_rfft_fast_instance_f32 * S, |
| 2244 | uint16_t fftLen); |
2364 | 2245 | |
2365 | 2246 | void arm_rfft_fast_f32( |
… |
… |
|
2371 | 2252 | * @brief Instance structure for the floating-point DCT4/IDCT4 function. |
2372 | 2253 | */ |
2373 | | |
2374 | 2254 | typedef struct |
2375 | 2255 | { |
2376 | | uint16_t N; /**< length of the DCT4. */ |
2377 | | uint16_t Nby2; /**< half of the length of the DCT4. */ |
2378 | | float32_t normalize; /**< normalizing factor. */ |
2379 | | float32_t *pTwiddle; /**< points to the twiddle factor table. */ |
2380 | | float32_t *pCosFactor; /**< points to the cosFactor table. */ |
| 2256 | uint16_t N; /**< length of the DCT4. */ |
| 2257 | uint16_t Nby2; /**< half of the length of the DCT4. */ |
| 2258 | float32_t normalize; /**< normalizing factor. */ |
| 2259 | float32_t *pTwiddle; /**< points to the twiddle factor table. */ |
| 2260 | float32_t *pCosFactor; /**< points to the cosFactor table. */ |
2381 | 2261 | arm_rfft_instance_f32 *pRfft; /**< points to the real FFT instance. */ |
2382 | 2262 | arm_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */ |
2383 | 2263 | } arm_dct4_instance_f32; |
2384 | 2264 | |
| 2265 | |
2385 | 2266 | /** |
2386 | 2267 | * @brief Initialization function for the floating-point DCT4/IDCT4. |
2387 | | * @param[in,out] *S points to an instance of floating-point DCT4/IDCT4 structure. |
2388 | | * @param[in] *S_RFFT points to an instance of floating-point RFFT/RIFFT structure. |
2389 | | * @param[in] *S_CFFT points to an instance of floating-point CFFT/CIFFT structure. |
| 2268 | * @param[in,out] S points to an instance of floating-point DCT4/IDCT4 structure. |
| 2269 | * @param[in] S_RFFT points to an instance of floating-point RFFT/RIFFT structure. |
| 2270 | * @param[in] S_CFFT points to an instance of floating-point CFFT/CIFFT structure. |
2390 | 2271 | * @param[in] N length of the DCT4. |
2391 | 2272 | * @param[in] Nby2 half of the length of the DCT4. |
2392 | 2273 | * @param[in] normalize normalizing factor. |
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. |
2394 | | */ |
2395 | | |
| 2274 | * @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. |
| 2275 | */ |
2396 | 2276 | arm_status arm_dct4_init_f32( |
2397 | 2277 | arm_dct4_instance_f32 * S, |
… |
… |
|
2402 | 2282 | float32_t normalize); |
2403 | 2283 | |
| 2284 | |
2404 | 2285 | /** |
2405 | 2286 | * @brief Processing function for the floating-point DCT4/IDCT4. |
2406 | | * @param[in] *S points to an instance of the floating-point DCT4/IDCT4 structure. |
2407 | | * @param[in] *pState points to state buffer. |
2408 | | * @param[in,out] *pInlineBuffer points to the in-place input and output buffer. |
2409 | | * @return none. |
2410 | | */ |
2411 | | |
| 2287 | * @param[in] S points to an instance of the floating-point DCT4/IDCT4 structure. |
| 2288 | * @param[in] pState points to state buffer. |
| 2289 | * @param[in,out] pInlineBuffer points to the in-place input and output buffer. |
| 2290 | */ |
2412 | 2291 | void arm_dct4_f32( |
2413 | 2292 | const arm_dct4_instance_f32 * S, |
… |
… |
|
2415 | 2294 | float32_t * pInlineBuffer); |
2416 | 2295 | |
| 2296 | |
2417 | 2297 | /** |
2418 | 2298 | * @brief Instance structure for the Q31 DCT4/IDCT4 function. |
2419 | 2299 | */ |
2420 | | |
2421 | 2300 | typedef struct |
2422 | 2301 | { |
2423 | | uint16_t N; /**< length of the DCT4. */ |
2424 | | uint16_t Nby2; /**< half of the length of the DCT4. */ |
2425 | | q31_t normalize; /**< normalizing factor. */ |
2426 | | q31_t *pTwiddle; /**< points to the twiddle factor table. */ |
2427 | | q31_t *pCosFactor; /**< points to the cosFactor table. */ |
| 2302 | uint16_t N; /**< length of the DCT4. */ |
| 2303 | uint16_t Nby2; /**< half of the length of the DCT4. */ |
| 2304 | q31_t normalize; /**< normalizing factor. */ |
| 2305 | q31_t *pTwiddle; /**< points to the twiddle factor table. */ |
| 2306 | q31_t *pCosFactor; /**< points to the cosFactor table. */ |
2428 | 2307 | arm_rfft_instance_q31 *pRfft; /**< points to the real FFT instance. */ |
2429 | 2308 | arm_cfft_radix4_instance_q31 *pCfft; /**< points to the complex FFT instance. */ |
2430 | 2309 | } arm_dct4_instance_q31; |
2431 | 2310 | |
| 2311 | |
2432 | 2312 | /** |
2433 | 2313 | * @brief Initialization function for the Q31 DCT4/IDCT4. |
2434 | | * @param[in,out] *S points to an instance of Q31 DCT4/IDCT4 structure. |
2435 | | * @param[in] *S_RFFT points to an instance of Q31 RFFT/RIFFT structure |
2436 | | * @param[in] *S_CFFT points to an instance of Q31 CFFT/CIFFT structure |
| 2314 | * @param[in,out] S points to an instance of Q31 DCT4/IDCT4 structure. |
| 2315 | * @param[in] S_RFFT points to an instance of Q31 RFFT/RIFFT structure |
| 2316 | * @param[in] S_CFFT points to an instance of Q31 CFFT/CIFFT structure |
2437 | 2317 | * @param[in] N length of the DCT4. |
2438 | 2318 | * @param[in] Nby2 half of the length of the DCT4. |
2439 | 2319 | * @param[in] normalize normalizing factor. |
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. |
2441 | | */ |
2442 | | |
| 2320 | * @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. |
| 2321 | */ |
2443 | 2322 | arm_status arm_dct4_init_q31( |
2444 | 2323 | arm_dct4_instance_q31 * S, |
… |
… |
|
2449 | 2328 | q31_t normalize); |
2450 | 2329 | |
| 2330 | |
2451 | 2331 | /** |
2452 | 2332 | * @brief Processing function for the Q31 DCT4/IDCT4. |
2453 | | * @param[in] *S points to an instance of the Q31 DCT4 structure. |
2454 | | * @param[in] *pState points to state buffer. |
2455 | | * @param[in,out] *pInlineBuffer points to the in-place input and output buffer. |
2456 | | * @return none. |
2457 | | */ |
2458 | | |
| 2333 | * @param[in] S points to an instance of the Q31 DCT4 structure. |
| 2334 | * @param[in] pState points to state buffer. |
| 2335 | * @param[in,out] pInlineBuffer points to the in-place input and output buffer. |
| 2336 | */ |
2459 | 2337 | void arm_dct4_q31( |
2460 | 2338 | const arm_dct4_instance_q31 * S, |
… |
… |
|
2462 | 2340 | q31_t * pInlineBuffer); |
2463 | 2341 | |
| 2342 | |
2464 | 2343 | /** |
2465 | 2344 | * @brief Instance structure for the Q15 DCT4/IDCT4 function. |
2466 | 2345 | */ |
2467 | | |
2468 | 2346 | typedef struct |
2469 | 2347 | { |
2470 | | uint16_t N; /**< length of the DCT4. */ |
2471 | | uint16_t Nby2; /**< half of the length of the DCT4. */ |
2472 | | q15_t normalize; /**< normalizing factor. */ |
2473 | | q15_t *pTwiddle; /**< points to the twiddle factor table. */ |
2474 | | q15_t *pCosFactor; /**< points to the cosFactor table. */ |
| 2348 | uint16_t N; /**< length of the DCT4. */ |
| 2349 | uint16_t Nby2; /**< half of the length of the DCT4. */ |
| 2350 | q15_t normalize; /**< normalizing factor. */ |
| 2351 | q15_t *pTwiddle; /**< points to the twiddle factor table. */ |
| 2352 | q15_t *pCosFactor; /**< points to the cosFactor table. */ |
2475 | 2353 | arm_rfft_instance_q15 *pRfft; /**< points to the real FFT instance. */ |
2476 | 2354 | arm_cfft_radix4_instance_q15 *pCfft; /**< points to the complex FFT instance. */ |
2477 | 2355 | } arm_dct4_instance_q15; |
2478 | 2356 | |
| 2357 | |
2479 | 2358 | /** |
2480 | 2359 | * @brief Initialization function for the Q15 DCT4/IDCT4. |
2481 | | * @param[in,out] *S points to an instance of Q15 DCT4/IDCT4 structure. |
2482 | | * @param[in] *S_RFFT points to an instance of Q15 RFFT/RIFFT structure. |
2483 | | * @param[in] *S_CFFT points to an instance of Q15 CFFT/CIFFT structure. |
| 2360 | * @param[in,out] S points to an instance of Q15 DCT4/IDCT4 structure. |
| 2361 | * @param[in] S_RFFT points to an instance of Q15 RFFT/RIFFT structure. |
| 2362 | * @param[in] S_CFFT points to an instance of Q15 CFFT/CIFFT structure. |
2484 | 2363 | * @param[in] N length of the DCT4. |
2485 | 2364 | * @param[in] Nby2 half of the length of the DCT4. |
2486 | 2365 | * @param[in] normalize normalizing factor. |
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. |
2488 | | */ |
2489 | | |
| 2366 | * @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. |
| 2367 | */ |
2490 | 2368 | arm_status arm_dct4_init_q15( |
2491 | 2369 | arm_dct4_instance_q15 * S, |
… |
… |
|
2496 | 2374 | q15_t normalize); |
2497 | 2375 | |
| 2376 | |
2498 | 2377 | /** |
2499 | 2378 | * @brief Processing function for the Q15 DCT4/IDCT4. |
2500 | | * @param[in] *S points to an instance of the Q15 DCT4 structure. |
2501 | | * @param[in] *pState points to state buffer. |
2502 | | * @param[in,out] *pInlineBuffer points to the in-place input and output buffer. |
2503 | | * @return none. |
2504 | | */ |
2505 | | |
| 2379 | * @param[in] S points to an instance of the Q15 DCT4 structure. |
| 2380 | * @param[in] pState points to state buffer. |
| 2381 | * @param[in,out] pInlineBuffer points to the in-place input and output buffer. |
| 2382 | */ |
2506 | 2383 | void arm_dct4_q15( |
2507 | 2384 | const arm_dct4_instance_q15 * S, |
… |
… |
|
2509 | 2386 | q15_t * pInlineBuffer); |
2510 | 2387 | |
| 2388 | |
2511 | 2389 | /** |
2512 | 2390 | * @brief Floating-point vector addition. |
2513 | | * @param[in] *pSrcA points to the first input vector |
2514 | | * @param[in] *pSrcB points to the second input vector |
2515 | | * @param[out] *pDst points to the output vector |
2516 | | * @param[in] blockSize number of samples in each vector |
2517 | | * @return none. |
2518 | | */ |
2519 | | |
| 2391 | * @param[in] pSrcA points to the first input vector |
| 2392 | * @param[in] pSrcB points to the second input vector |
| 2393 | * @param[out] pDst points to the output vector |
| 2394 | * @param[in] blockSize number of samples in each vector |
| 2395 | */ |
2520 | 2396 | void arm_add_f32( |
2521 | 2397 | float32_t * pSrcA, |
… |
… |
|
2524 | 2400 | uint32_t blockSize); |
2525 | 2401 | |
| 2402 | |
2526 | 2403 | /** |
2527 | 2404 | * @brief Q7 vector addition. |
2528 | | * @param[in] *pSrcA points to the first input vector |
2529 | | * @param[in] *pSrcB points to the second input vector |
2530 | | * @param[out] *pDst points to the output vector |
2531 | | * @param[in] blockSize number of samples in each vector |
2532 | | * @return none. |
2533 | | */ |
2534 | | |
| 2405 | * @param[in] pSrcA points to the first input vector |
| 2406 | * @param[in] pSrcB points to the second input vector |
| 2407 | * @param[out] pDst points to the output vector |
| 2408 | * @param[in] blockSize number of samples in each vector |
| 2409 | */ |
2535 | 2410 | void arm_add_q7( |
2536 | 2411 | q7_t * pSrcA, |
… |
… |
|
2539 | 2414 | uint32_t blockSize); |
2540 | 2415 | |
| 2416 | |
2541 | 2417 | /** |
2542 | 2418 | * @brief Q15 vector addition. |
2543 | | * @param[in] *pSrcA points to the first input vector |
2544 | | * @param[in] *pSrcB points to the second input vector |
2545 | | * @param[out] *pDst points to the output vector |
2546 | | * @param[in] blockSize number of samples in each vector |
2547 | | * @return none. |
2548 | | */ |
2549 | | |
| 2419 | * @param[in] pSrcA points to the first input vector |
| 2420 | * @param[in] pSrcB points to the second input vector |
| 2421 | * @param[out] pDst points to the output vector |
| 2422 | * @param[in] blockSize number of samples in each vector |
| 2423 | */ |
2550 | 2424 | void arm_add_q15( |
2551 | 2425 | q15_t * pSrcA, |
… |
… |
|
2554 | 2428 | uint32_t blockSize); |
2555 | 2429 | |
| 2430 | |
2556 | 2431 | /** |
2557 | 2432 | * @brief Q31 vector addition. |
2558 | | * @param[in] *pSrcA points to the first input vector |
2559 | | * @param[in] *pSrcB points to the second input vector |
2560 | | * @param[out] *pDst points to the output vector |
2561 | | * @param[in] blockSize number of samples in each vector |
2562 | | * @return none. |
2563 | | */ |
2564 | | |
| 2433 | * @param[in] pSrcA points to the first input vector |
| 2434 | * @param[in] pSrcB points to the second input vector |
| 2435 | * @param[out] pDst points to the output vector |
| 2436 | * @param[in] blockSize number of samples in each vector |
| 2437 | */ |
2565 | 2438 | void arm_add_q31( |
2566 | 2439 | q31_t * pSrcA, |
… |
… |
|
2569 | 2442 | uint32_t blockSize); |
2570 | 2443 | |
| 2444 | |
2571 | 2445 | /** |
2572 | 2446 | * @brief Floating-point vector subtraction. |
2573 | | * @param[in] *pSrcA points to the first input vector |
2574 | | * @param[in] *pSrcB points to the second input vector |
2575 | | * @param[out] *pDst points to the output vector |
2576 | | * @param[in] blockSize number of samples in each vector |
2577 | | * @return none. |
2578 | | */ |
2579 | | |
| 2447 | * @param[in] pSrcA points to the first input vector |
| 2448 | * @param[in] pSrcB points to the second input vector |
| 2449 | * @param[out] pDst points to the output vector |
| 2450 | * @param[in] blockSize number of samples in each vector |
| 2451 | */ |
2580 | 2452 | void arm_sub_f32( |
2581 | 2453 | float32_t * pSrcA, |
… |
… |
|
2584 | 2456 | uint32_t blockSize); |
2585 | 2457 | |
| 2458 | |
2586 | 2459 | /** |
2587 | 2460 | * @brief Q7 vector subtraction. |
2588 | | * @param[in] *pSrcA points to the first input vector |
2589 | | * @param[in] *pSrcB points to the second input vector |
2590 | | * @param[out] *pDst points to the output vector |
2591 | | * @param[in] blockSize number of samples in each vector |
2592 | | * @return none. |
2593 | | */ |
2594 | | |
| 2461 | * @param[in] pSrcA points to the first input vector |
| 2462 | * @param[in] pSrcB points to the second input vector |
| 2463 | * @param[out] pDst points to the output vector |
| 2464 | * @param[in] blockSize number of samples in each vector |
| 2465 | */ |
2595 | 2466 | void arm_sub_q7( |
2596 | 2467 | q7_t * pSrcA, |
… |
… |
|
2599 | 2470 | uint32_t blockSize); |
2600 | 2471 | |
| 2472 | |
2601 | 2473 | /** |
2602 | 2474 | * @brief Q15 vector subtraction. |
2603 | | * @param[in] *pSrcA points to the first input vector |
2604 | | * @param[in] *pSrcB points to the second input vector |
2605 | | * @param[out] *pDst points to the output vector |
2606 | | * @param[in] blockSize number of samples in each vector |
2607 | | * @return none. |
2608 | | */ |
2609 | | |
| 2475 | * @param[in] pSrcA points to the first input vector |
| 2476 | * @param[in] pSrcB points to the second input vector |
| 2477 | * @param[out] pDst points to the output vector |
| 2478 | * @param[in] blockSize number of samples in each vector |
| 2479 | */ |
2610 | 2480 | void arm_sub_q15( |
2611 | 2481 | q15_t * pSrcA, |
… |
… |
|
2614 | 2484 | uint32_t blockSize); |
2615 | 2485 | |
| 2486 | |
2616 | 2487 | /** |
2617 | 2488 | * @brief Q31 vector subtraction. |
2618 | | * @param[in] *pSrcA points to the first input vector |
2619 | | * @param[in] *pSrcB points to the second input vector |
2620 | | * @param[out] *pDst points to the output vector |
2621 | | * @param[in] blockSize number of samples in each vector |
2622 | | * @return none. |
2623 | | */ |
2624 | | |
| 2489 | * @param[in] pSrcA points to the first input vector |
| 2490 | * @param[in] pSrcB points to the second input vector |
| 2491 | * @param[out] pDst points to the output vector |
| 2492 | * @param[in] blockSize number of samples in each vector |
| 2493 | */ |
2625 | 2494 | void arm_sub_q31( |
2626 | 2495 | q31_t * pSrcA, |
… |
… |
|
2629 | 2498 | uint32_t blockSize); |
2630 | 2499 | |
| 2500 | |
2631 | 2501 | /** |
2632 | 2502 | * @brief Multiplies a floating-point vector by a scalar. |
2633 | | * @param[in] *pSrc points to the input vector |
2634 | | * @param[in] scale scale factor to be applied |
2635 | | * @param[out] *pDst points to the output vector |
2636 | | * @param[in] blockSize number of samples in the vector |
2637 | | * @return none. |
2638 | | */ |
2639 | | |
| 2503 | * @param[in] pSrc points to the input vector |
| 2504 | * @param[in] scale scale factor to be applied |
| 2505 | * @param[out] pDst points to the output vector |
| 2506 | * @param[in] blockSize number of samples in the vector |
| 2507 | */ |
2640 | 2508 | void arm_scale_f32( |
2641 | 2509 | float32_t * pSrc, |
… |
… |
|
2644 | 2512 | uint32_t blockSize); |
2645 | 2513 | |
| 2514 | |
2646 | 2515 | /** |
2647 | 2516 | * @brief Multiplies a Q7 vector by a scalar. |
2648 | | * @param[in] *pSrc points to the input vector |
2649 | | * @param[in] scaleFract fractional portion of the scale value |
2650 | | * @param[in] shift number of bits to shift the result by |
2651 | | * @param[out] *pDst points to the output vector |
2652 | | * @param[in] blockSize number of samples in the vector |
2653 | | * @return none. |
2654 | | */ |
2655 | | |
| 2517 | * @param[in] pSrc points to the input vector |
| 2518 | * @param[in] scaleFract fractional portion of the scale value |
| 2519 | * @param[in] shift number of bits to shift the result by |
| 2520 | * @param[out] pDst points to the output vector |
| 2521 | * @param[in] blockSize number of samples in the vector |
| 2522 | */ |
2656 | 2523 | void arm_scale_q7( |
2657 | 2524 | q7_t * pSrc, |
… |
… |
|
2661 | 2528 | uint32_t blockSize); |
2662 | 2529 | |
| 2530 | |
2663 | 2531 | /** |
2664 | 2532 | * @brief Multiplies a Q15 vector by a scalar. |
2665 | | * @param[in] *pSrc points to the input vector |
2666 | | * @param[in] scaleFract fractional portion of the scale value |
2667 | | * @param[in] shift number of bits to shift the result by |
2668 | | * @param[out] *pDst points to the output vector |
2669 | | * @param[in] blockSize number of samples in the vector |
2670 | | * @return none. |
2671 | | */ |
2672 | | |
| 2533 | * @param[in] pSrc points to the input vector |
| 2534 | * @param[in] scaleFract fractional portion of the scale value |
| 2535 | * @param[in] shift number of bits to shift the result by |
| 2536 | * @param[out] pDst points to the output vector |
| 2537 | * @param[in] blockSize number of samples in the vector |
| 2538 | */ |
2673 | 2539 | void arm_scale_q15( |
2674 | 2540 | q15_t * pSrc, |
… |
… |
|
2678 | 2544 | uint32_t blockSize); |
2679 | 2545 | |
| 2546 | |
2680 | 2547 | /** |
2681 | 2548 | * @brief Multiplies a Q31 vector by a scalar. |
2682 | | * @param[in] *pSrc points to the input vector |
2683 | | * @param[in] scaleFract fractional portion of the scale value |
2684 | | * @param[in] shift number of bits to shift the result by |
2685 | | * @param[out] *pDst points to the output vector |
2686 | | * @param[in] blockSize number of samples in the vector |
2687 | | * @return none. |
2688 | | */ |
2689 | | |
| 2549 | * @param[in] pSrc points to the input vector |
| 2550 | * @param[in] scaleFract fractional portion of the scale value |
| 2551 | * @param[in] shift number of bits to shift the result by |
| 2552 | * @param[out] pDst points to the output vector |
| 2553 | * @param[in] blockSize number of samples in the vector |
| 2554 | */ |
2690 | 2555 | void arm_scale_q31( |
2691 | 2556 | q31_t * pSrc, |
… |
… |
|
2695 | 2560 | uint32_t blockSize); |
2696 | 2561 | |
| 2562 | |
2697 | 2563 | /** |
2698 | 2564 | * @brief Q7 vector absolute value. |
2699 | | * @param[in] *pSrc points to the input buffer |
2700 | | * @param[out] *pDst points to the output buffer |
2701 | | * @param[in] blockSize number of samples in each vector |
2702 | | * @return none. |
2703 | | */ |
2704 | | |
| 2565 | * @param[in] pSrc points to the input buffer |
| 2566 | * @param[out] pDst points to the output buffer |
| 2567 | * @param[in] blockSize number of samples in each vector |
| 2568 | */ |
2705 | 2569 | void arm_abs_q7( |
2706 | 2570 | q7_t * pSrc, |
… |
… |
|
2708 | 2572 | uint32_t blockSize); |
2709 | 2573 | |
| 2574 | |
2710 | 2575 | /** |
2711 | 2576 | * @brief Floating-point vector absolute value. |
2712 | | * @param[in] *pSrc points to the input buffer |
2713 | | * @param[out] *pDst points to the output buffer |
2714 | | * @param[in] blockSize number of samples in each vector |
2715 | | * @return none. |
2716 | | */ |
2717 | | |
| 2577 | * @param[in] pSrc points to the input buffer |
| 2578 | * @param[out] pDst points to the output buffer |
| 2579 | * @param[in] blockSize number of samples in each vector |
| 2580 | */ |
2718 | 2581 | void arm_abs_f32( |
2719 | 2582 | float32_t * pSrc, |
… |
… |
|
2721 | 2584 | uint32_t blockSize); |
2722 | 2585 | |
| 2586 | |
2723 | 2587 | /** |
2724 | 2588 | * @brief Q15 vector absolute value. |
2725 | | * @param[in] *pSrc points to the input buffer |
2726 | | * @param[out] *pDst points to the output buffer |
2727 | | * @param[in] blockSize number of samples in each vector |
2728 | | * @return none. |
2729 | | */ |
2730 | | |
| 2589 | * @param[in] pSrc points to the input buffer |
| 2590 | * @param[out] pDst points to the output buffer |
| 2591 | * @param[in] blockSize number of samples in each vector |
| 2592 | */ |
2731 | 2593 | void arm_abs_q15( |
2732 | 2594 | q15_t * pSrc, |
… |
… |
|
2734 | 2596 | uint32_t blockSize); |
2735 | 2597 | |
| 2598 | |
2736 | 2599 | /** |
2737 | 2600 | * @brief Q31 vector absolute value. |
2738 | | * @param[in] *pSrc points to the input buffer |
2739 | | * @param[out] *pDst points to the output buffer |
2740 | | * @param[in] blockSize number of samples in each vector |
2741 | | * @return none. |
2742 | | */ |
2743 | | |
| 2601 | * @param[in] pSrc points to the input buffer |
| 2602 | * @param[out] pDst points to the output buffer |
| 2603 | * @param[in] blockSize number of samples in each vector |
| 2604 | */ |
2744 | 2605 | void arm_abs_q31( |
2745 | 2606 | q31_t * pSrc, |
… |
… |
|
2747 | 2608 | uint32_t blockSize); |
2748 | 2609 | |
| 2610 | |
2749 | 2611 | /** |
2750 | 2612 | * @brief Dot product of floating-point vectors. |
2751 | | * @param[in] *pSrcA points to the first input vector |
2752 | | * @param[in] *pSrcB points to the second input vector |
2753 | | * @param[in] blockSize number of samples in each vector |
2754 | | * @param[out] *result output result returned here |
2755 | | * @return none. |
2756 | | */ |
2757 | | |
| 2613 | * @param[in] pSrcA points to the first input vector |
| 2614 | * @param[in] pSrcB points to the second input vector |
| 2615 | * @param[in] blockSize number of samples in each vector |
| 2616 | * @param[out] result output result returned here |
| 2617 | */ |
2758 | 2618 | void arm_dot_prod_f32( |
2759 | 2619 | float32_t * pSrcA, |
… |
… |
|
2762 | 2622 | float32_t * result); |
2763 | 2623 | |
| 2624 | |
2764 | 2625 | /** |
2765 | 2626 | * @brief Dot product of Q7 vectors. |
2766 | | * @param[in] *pSrcA points to the first input vector |
2767 | | * @param[in] *pSrcB points to the second input vector |
2768 | | * @param[in] blockSize number of samples in each vector |
2769 | | * @param[out] *result output result returned here |
2770 | | * @return none. |
2771 | | */ |
2772 | | |
| 2627 | * @param[in] pSrcA points to the first input vector |
| 2628 | * @param[in] pSrcB points to the second input vector |
| 2629 | * @param[in] blockSize number of samples in each vector |
| 2630 | * @param[out] result output result returned here |
| 2631 | */ |
2773 | 2632 | void arm_dot_prod_q7( |
2774 | 2633 | q7_t * pSrcA, |
… |
… |
|
2777 | 2636 | q31_t * result); |
2778 | 2637 | |
| 2638 | |
2779 | 2639 | /** |
2780 | 2640 | * @brief Dot product of Q15 vectors. |
2781 | | * @param[in] *pSrcA points to the first input vector |
2782 | | * @param[in] *pSrcB points to the second input vector |
2783 | | * @param[in] blockSize number of samples in each vector |
2784 | | * @param[out] *result output result returned here |
2785 | | * @return none. |
2786 | | */ |
2787 | | |
| 2641 | * @param[in] pSrcA points to the first input vector |
| 2642 | * @param[in] pSrcB points to the second input vector |
| 2643 | * @param[in] blockSize number of samples in each vector |
| 2644 | * @param[out] result output result returned here |
| 2645 | */ |
2788 | 2646 | void arm_dot_prod_q15( |
2789 | 2647 | q15_t * pSrcA, |
… |
… |
|
2792 | 2650 | q63_t * result); |
2793 | 2651 | |
| 2652 | |
2794 | 2653 | /** |
2795 | 2654 | * @brief Dot product of Q31 vectors. |
2796 | | * @param[in] *pSrcA points to the first input vector |
2797 | | * @param[in] *pSrcB points to the second input vector |
2798 | | * @param[in] blockSize number of samples in each vector |
2799 | | * @param[out] *result output result returned here |
2800 | | * @return none. |
2801 | | */ |
2802 | | |
| 2655 | * @param[in] pSrcA points to the first input vector |
| 2656 | * @param[in] pSrcB points to the second input vector |
| 2657 | * @param[in] blockSize number of samples in each vector |
| 2658 | * @param[out] result output result returned here |
| 2659 | */ |
2803 | 2660 | void arm_dot_prod_q31( |
2804 | 2661 | q31_t * pSrcA, |
… |
… |
|
2807 | 2664 | q63_t * result); |
2808 | 2665 | |
| 2666 | |
2809 | 2667 | /** |
2810 | 2668 | * @brief Shifts the elements of a Q7 vector a specified number of bits. |
2811 | | * @param[in] *pSrc points to the input vector |
2812 | | * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right. |
2813 | | * @param[out] *pDst points to the output vector |
2814 | | * @param[in] blockSize number of samples in the vector |
2815 | | * @return none. |
2816 | | */ |
2817 | | |
| 2669 | * @param[in] pSrc points to the input vector |
| 2670 | * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right. |
| 2671 | * @param[out] pDst points to the output vector |
| 2672 | * @param[in] blockSize number of samples in the vector |
| 2673 | */ |
2818 | 2674 | void arm_shift_q7( |
2819 | 2675 | q7_t * pSrc, |
… |
… |
|
2822 | 2678 | uint32_t blockSize); |
2823 | 2679 | |
| 2680 | |
2824 | 2681 | /** |
2825 | 2682 | * @brief Shifts the elements of a Q15 vector a specified number of bits. |
2826 | | * @param[in] *pSrc points to the input vector |
2827 | | * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right. |
2828 | | * @param[out] *pDst points to the output vector |
2829 | | * @param[in] blockSize number of samples in the vector |
2830 | | * @return none. |
2831 | | */ |
2832 | | |
| 2683 | * @param[in] pSrc points to the input vector |
| 2684 | * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right. |
| 2685 | * @param[out] pDst points to the output vector |
| 2686 | * @param[in] blockSize number of samples in the vector |
| 2687 | */ |
2833 | 2688 | void arm_shift_q15( |
2834 | 2689 | q15_t * pSrc, |
… |
… |
|
2837 | 2692 | uint32_t blockSize); |
2838 | 2693 | |
| 2694 | |
2839 | 2695 | /** |
2840 | 2696 | * @brief Shifts the elements of a Q31 vector a specified number of bits. |
2841 | | * @param[in] *pSrc points to the input vector |
2842 | | * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right. |
2843 | | * @param[out] *pDst points to the output vector |
2844 | | * @param[in] blockSize number of samples in the vector |
2845 | | * @return none. |
2846 | | */ |
2847 | | |
| 2697 | * @param[in] pSrc points to the input vector |
| 2698 | * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right. |
| 2699 | * @param[out] pDst points to the output vector |
| 2700 | * @param[in] blockSize number of samples in the vector |
| 2701 | */ |
2848 | 2702 | void arm_shift_q31( |
2849 | 2703 | q31_t * pSrc, |
… |
… |
|
2852 | 2706 | uint32_t blockSize); |
2853 | 2707 | |
| 2708 | |
2854 | 2709 | /** |
2855 | 2710 | * @brief Adds a constant offset to a floating-point vector. |
2856 | | * @param[in] *pSrc points to the input vector |
2857 | | * @param[in] offset is the offset to be added |
2858 | | * @param[out] *pDst points to the output vector |
2859 | | * @param[in] blockSize number of samples in the vector |
2860 | | * @return none. |
2861 | | */ |
2862 | | |
| 2711 | * @param[in] pSrc points to the input vector |
| 2712 | * @param[in] offset is the offset to be added |
| 2713 | * @param[out] pDst points to the output vector |
| 2714 | * @param[in] blockSize number of samples in the vector |
| 2715 | */ |
2863 | 2716 | void arm_offset_f32( |
2864 | 2717 | float32_t * pSrc, |
… |
… |
|
2867 | 2720 | uint32_t blockSize); |
2868 | 2721 | |
| 2722 | |
2869 | 2723 | /** |
2870 | 2724 | * @brief Adds a constant offset to a Q7 vector. |
2871 | | * @param[in] *pSrc points to the input vector |
2872 | | * @param[in] offset is the offset to be added |
2873 | | * @param[out] *pDst points to the output vector |
2874 | | * @param[in] blockSize number of samples in the vector |
2875 | | * @return none. |
2876 | | */ |
2877 | | |
| 2725 | * @param[in] pSrc points to the input vector |
| 2726 | * @param[in] offset is the offset to be added |
| 2727 | * @param[out] pDst points to the output vector |
| 2728 | * @param[in] blockSize number of samples in the vector |
| 2729 | */ |
2878 | 2730 | void arm_offset_q7( |
2879 | 2731 | q7_t * pSrc, |
… |
… |
|
2882 | 2734 | uint32_t blockSize); |
2883 | 2735 | |
| 2736 | |
2884 | 2737 | /** |
2885 | 2738 | * @brief Adds a constant offset to a Q15 vector. |
2886 | | * @param[in] *pSrc points to the input vector |
2887 | | * @param[in] offset is the offset to be added |
2888 | | * @param[out] *pDst points to the output vector |
2889 | | * @param[in] blockSize number of samples in the vector |
2890 | | * @return none. |
2891 | | */ |
2892 | | |
| 2739 | * @param[in] pSrc points to the input vector |
| 2740 | * @param[in] offset is the offset to be added |
| 2741 | * @param[out] pDst points to the output vector |
| 2742 | * @param[in] blockSize number of samples in the vector |
| 2743 | */ |
2893 | 2744 | void arm_offset_q15( |
2894 | 2745 | q15_t * pSrc, |
… |
… |
|
2897 | 2748 | uint32_t blockSize); |
2898 | 2749 | |
| 2750 | |
2899 | 2751 | /** |
2900 | 2752 | * @brief Adds a constant offset to a Q31 vector. |
2901 | | * @param[in] *pSrc points to the input vector |
2902 | | * @param[in] offset is the offset to be added |
2903 | | * @param[out] *pDst points to the output vector |
2904 | | * @param[in] blockSize number of samples in the vector |
2905 | | * @return none. |
2906 | | */ |
2907 | | |
| 2753 | * @param[in] pSrc points to the input vector |
| 2754 | * @param[in] offset is the offset to be added |
| 2755 | * @param[out] pDst points to the output vector |
| 2756 | * @param[in] blockSize number of samples in the vector |
| 2757 | */ |
2908 | 2758 | void arm_offset_q31( |
2909 | 2759 | q31_t * pSrc, |
… |
… |
|
2912 | 2762 | uint32_t blockSize); |
2913 | 2763 | |
| 2764 | |
2914 | 2765 | /** |
2915 | 2766 | * @brief Negates the elements of a floating-point vector. |
2916 | | * @param[in] *pSrc points to the input vector |
2917 | | * @param[out] *pDst points to the output vector |
2918 | | * @param[in] blockSize number of samples in the vector |
2919 | | * @return none. |
2920 | | */ |
2921 | | |
| 2767 | * @param[in] pSrc points to the input vector |
| 2768 | * @param[out] pDst points to the output vector |
| 2769 | * @param[in] blockSize number of samples in the vector |
| 2770 | */ |
2922 | 2771 | void arm_negate_f32( |
2923 | 2772 | float32_t * pSrc, |
… |
… |
|
2925 | 2774 | uint32_t blockSize); |
2926 | 2775 | |
| 2776 | |
2927 | 2777 | /** |
2928 | 2778 | * @brief Negates the elements of a Q7 vector. |
2929 | | * @param[in] *pSrc points to the input vector |
2930 | | * @param[out] *pDst points to the output vector |
2931 | | * @param[in] blockSize number of samples in the vector |
2932 | | * @return none. |
2933 | | */ |
2934 | | |
| 2779 | * @param[in] pSrc points to the input vector |
| 2780 | * @param[out] pDst points to the output vector |
| 2781 | * @param[in] blockSize number of samples in the vector |
| 2782 | */ |
2935 | 2783 | void arm_negate_q7( |
2936 | 2784 | q7_t * pSrc, |
… |
… |
|
2938 | 2786 | uint32_t blockSize); |
2939 | 2787 | |
| 2788 | |
2940 | 2789 | /** |
2941 | 2790 | * @brief Negates the elements of a Q15 vector. |
2942 | | * @param[in] *pSrc points to the input vector |
2943 | | * @param[out] *pDst points to the output vector |
2944 | | * @param[in] blockSize number of samples in the vector |
2945 | | * @return none. |
2946 | | */ |
2947 | | |
| 2791 | * @param[in] pSrc points to the input vector |
| 2792 | * @param[out] pDst points to the output vector |
| 2793 | * @param[in] blockSize number of samples in the vector |
| 2794 | */ |
2948 | 2795 | void arm_negate_q15( |
2949 | 2796 | q15_t * pSrc, |
… |
… |
|
2951 | 2798 | uint32_t blockSize); |
2952 | 2799 | |
| 2800 | |
2953 | 2801 | /** |
2954 | 2802 | * @brief Negates the elements of a Q31 vector. |
2955 | | * @param[in] *pSrc points to the input vector |
2956 | | * @param[out] *pDst points to the output vector |
2957 | | * @param[in] blockSize number of samples in the vector |
2958 | | * @return none. |
2959 | | */ |
2960 | | |
| 2803 | * @param[in] pSrc points to the input vector |
| 2804 | * @param[out] pDst points to the output vector |
| 2805 | * @param[in] blockSize number of samples in the vector |
| 2806 | */ |
2961 | 2807 | void arm_negate_q31( |
2962 | 2808 | q31_t * pSrc, |
2963 | 2809 | q31_t * pDst, |
2964 | 2810 | uint32_t blockSize); |
| 2811 | |
| 2812 | |
2965 | 2813 | /** |
2966 | 2814 | * @brief Copies the elements of a floating-point vector. |
2967 | | * @param[in] *pSrc input pointer |
2968 | | * @param[out] *pDst output pointer |
2969 | | * @param[in] blockSize number of samples to process |
2970 | | * @return none. |
| 2815 | * @param[in] pSrc input pointer |
| 2816 | * @param[out] pDst output pointer |
| 2817 | * @param[in] blockSize number of samples to process |
2971 | 2818 | */ |
2972 | 2819 | void arm_copy_f32( |
… |
… |
|
2975 | 2822 | uint32_t blockSize); |
2976 | 2823 | |
| 2824 | |
2977 | 2825 | /** |
2978 | 2826 | * @brief Copies the elements of a Q7 vector. |
2979 | | * @param[in] *pSrc input pointer |
2980 | | * @param[out] *pDst output pointer |
2981 | | * @param[in] blockSize number of samples to process |
2982 | | * @return none. |
| 2827 | * @param[in] pSrc input pointer |
| 2828 | * @param[out] pDst output pointer |
| 2829 | * @param[in] blockSize number of samples to process |
2983 | 2830 | */ |
2984 | 2831 | void arm_copy_q7( |
… |
… |
|
2987 | 2834 | uint32_t blockSize); |
2988 | 2835 | |
| 2836 | |
2989 | 2837 | /** |
2990 | 2838 | * @brief Copies the elements of a Q15 vector. |
2991 | | * @param[in] *pSrc input pointer |
2992 | | * @param[out] *pDst output pointer |
2993 | | * @param[in] blockSize number of samples to process |
2994 | | * @return none. |
| 2839 | * @param[in] pSrc input pointer |
| 2840 | * @param[out] pDst output pointer |
| 2841 | * @param[in] blockSize number of samples to process |
2995 | 2842 | */ |
2996 | 2843 | void arm_copy_q15( |
… |
… |
|
2999 | 2846 | uint32_t blockSize); |
3000 | 2847 | |
| 2848 | |
3001 | 2849 | /** |
3002 | 2850 | * @brief Copies the elements of a Q31 vector. |
3003 | | * @param[in] *pSrc input pointer |
3004 | | * @param[out] *pDst output pointer |
3005 | | * @param[in] blockSize number of samples to process |
3006 | | * @return none. |
| 2851 | * @param[in] pSrc input pointer |
| 2852 | * @param[out] pDst output pointer |
| 2853 | * @param[in] blockSize number of samples to process |
3007 | 2854 | */ |
3008 | 2855 | void arm_copy_q31( |
… |
… |
|
3010 | 2857 | q31_t * pDst, |
3011 | 2858 | uint32_t blockSize); |
| 2859 | |
| 2860 | |
3012 | 2861 | /** |
3013 | 2862 | * @brief Fills a constant value into a floating-point vector. |
3014 | | * @param[in] value input value to be filled |
3015 | | * @param[out] *pDst output pointer |
3016 | | * @param[in] blockSize number of samples to process |
3017 | | * @return none. |
| 2863 | * @param[in] value input value to be filled |
| 2864 | * @param[out] pDst output pointer |
| 2865 | * @param[in] blockSize number of samples to process |
3018 | 2866 | */ |
3019 | 2867 | void arm_fill_f32( |
… |
… |
|
3022 | 2870 | uint32_t blockSize); |
3023 | 2871 | |
| 2872 | |
3024 | 2873 | /** |
3025 | 2874 | * @brief Fills a constant value into a Q7 vector. |
3026 | | * @param[in] value input value to be filled |
3027 | | * @param[out] *pDst output pointer |
3028 | | * @param[in] blockSize number of samples to process |
3029 | | * @return none. |
| 2875 | * @param[in] value input value to be filled |
| 2876 | * @param[out] pDst output pointer |
| 2877 | * @param[in] blockSize number of samples to process |
3030 | 2878 | */ |
3031 | 2879 | void arm_fill_q7( |
… |
… |
|
3034 | 2882 | uint32_t blockSize); |
3035 | 2883 | |
| 2884 | |
3036 | 2885 | /** |
3037 | 2886 | * @brief Fills a constant value into a Q15 vector. |
3038 | | * @param[in] value input value to be filled |
3039 | | * @param[out] *pDst output pointer |
3040 | | * @param[in] blockSize number of samples to process |
3041 | | * @return none. |
| 2887 | * @param[in] value input value to be filled |
| 2888 | * @param[out] pDst output pointer |
| 2889 | * @param[in] blockSize number of samples to process |
3042 | 2890 | */ |
3043 | 2891 | void arm_fill_q15( |
… |
… |
|
3046 | 2894 | uint32_t blockSize); |
3047 | 2895 | |
| 2896 | |
3048 | 2897 | /** |
3049 | 2898 | * @brief Fills a constant value into a Q31 vector. |
3050 | | * @param[in] value input value to be filled |
3051 | | * @param[out] *pDst output pointer |
3052 | | * @param[in] blockSize number of samples to process |
3053 | | * @return none. |
| 2899 | * @param[in] value input value to be filled |
| 2900 | * @param[out] pDst output pointer |
| 2901 | * @param[in] blockSize number of samples to process |
3054 | 2902 | */ |
3055 | 2903 | void arm_fill_q31( |
… |
… |
|
3058 | 2906 | uint32_t blockSize); |
3059 | 2907 | |
| 2908 | |
3060 | 2909 | /** |
3061 | 2910 | * @brief Convolution of floating-point sequences. |
3062 | | * @param[in] *pSrcA points to the first input sequence. |
3063 | | * @param[in] srcALen length of the first input sequence. |
3064 | | * @param[in] *pSrcB points to the second input sequence. |
3065 | | * @param[in] srcBLen length of the second input sequence. |
3066 | | * @param[out] *pDst points to the location where the output result is written. Length srcALen+srcBLen-1. |
3067 | | * @return none. |
| 2911 | * @param[in] pSrcA points to the first input sequence. |
| 2912 | * @param[in] srcALen length of the first input sequence. |
| 2913 | * @param[in] pSrcB points to the second input sequence. |
| 2914 | * @param[in] srcBLen length of the second input sequence. |
| 2915 | * @param[out] pDst points to the location where the output result is written. Length srcALen+srcBLen-1. |
3068 | 2916 | */ |
3069 | | |
3070 | 2917 | void arm_conv_f32( |
3071 | 2918 | float32_t * pSrcA, |
… |
… |
|
3078 | 2925 | /** |
3079 | 2926 | * @brief Convolution of Q15 sequences. |
3080 | | * @param[in] *pSrcA points to the first input sequence. |
3081 | | * @param[in] srcALen length of the first input sequence. |
3082 | | * @param[in] *pSrcB points to the second input sequence. |
3083 | | * @param[in] srcBLen length of the second input sequence. |
3084 | | * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1. |
3085 | | * @param[in] *pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
3086 | | * @param[in] *pScratch2 points to scratch buffer of size min(srcALen, srcBLen). |
3087 | | * @return none. |
3088 | | */ |
3089 | | |
3090 | | |
| 2927 | * @param[in] pSrcA points to the first input sequence. |
| 2928 | * @param[in] srcALen length of the first input sequence. |
| 2929 | * @param[in] pSrcB points to the second input sequence. |
| 2930 | * @param[in] srcBLen length of the second input sequence. |
| 2931 | * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1. |
| 2932 | * @param[in] pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
| 2933 | * @param[in] pScratch2 points to scratch buffer of size min(srcALen, srcBLen). |
| 2934 | */ |
3091 | 2935 | void arm_conv_opt_q15( |
3092 | 2936 | q15_t * pSrcA, |
… |
… |
|
3101 | 2945 | /** |
3102 | 2946 | * @brief Convolution of Q15 sequences. |
3103 | | * @param[in] *pSrcA points to the first input sequence. |
3104 | | * @param[in] srcALen length of the first input sequence. |
3105 | | * @param[in] *pSrcB points to the second input sequence. |
3106 | | * @param[in] srcBLen length of the second input sequence. |
3107 | | * @param[out] *pDst points to the location where the output result is written. Length srcALen+srcBLen-1. |
3108 | | * @return none. |
| 2947 | * @param[in] pSrcA points to the first input sequence. |
| 2948 | * @param[in] srcALen length of the first input sequence. |
| 2949 | * @param[in] pSrcB points to the second input sequence. |
| 2950 | * @param[in] srcBLen length of the second input sequence. |
| 2951 | * @param[out] pDst points to the location where the output result is written. Length srcALen+srcBLen-1. |
3109 | 2952 | */ |
3110 | | |
3111 | 2953 | void arm_conv_q15( |
3112 | 2954 | q15_t * pSrcA, |
… |
… |
|
3116 | 2958 | q15_t * pDst); |
3117 | 2959 | |
| 2960 | |
3118 | 2961 | /** |
3119 | 2962 | * @brief Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4 |
3120 | | * @param[in] *pSrcA points to the first input sequence. |
3121 | | * @param[in] srcALen length of the first input sequence. |
3122 | | * @param[in] *pSrcB points to the second input sequence. |
3123 | | * @param[in] srcBLen length of the second input sequence. |
3124 | | * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1. |
3125 | | * @return none. |
3126 | | */ |
3127 | | |
| 2963 | * @param[in] pSrcA points to the first input sequence. |
| 2964 | * @param[in] srcALen length of the first input sequence. |
| 2965 | * @param[in] pSrcB points to the second input sequence. |
| 2966 | * @param[in] srcBLen length of the second input sequence. |
| 2967 | * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1. |
| 2968 | */ |
3128 | 2969 | void arm_conv_fast_q15( |
3129 | | q15_t * pSrcA, |
3130 | | uint32_t srcALen, |
3131 | | q15_t * pSrcB, |
3132 | | uint32_t srcBLen, |
3133 | | q15_t * pDst); |
| 2970 | q15_t * pSrcA, |
| 2971 | uint32_t srcALen, |
| 2972 | q15_t * pSrcB, |
| 2973 | uint32_t srcBLen, |
| 2974 | q15_t * pDst); |
| 2975 | |
3134 | 2976 | |
3135 | 2977 | /** |
3136 | 2978 | * @brief Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4 |
3137 | | * @param[in] *pSrcA points to the first input sequence. |
3138 | | * @param[in] srcALen length of the first input sequence. |
3139 | | * @param[in] *pSrcB points to the second input sequence. |
3140 | | * @param[in] srcBLen length of the second input sequence. |
3141 | | * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1. |
3142 | | * @param[in] *pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
3143 | | * @param[in] *pScratch2 points to scratch buffer of size min(srcALen, srcBLen). |
3144 | | * @return none. |
3145 | | */ |
3146 | | |
| 2979 | * @param[in] pSrcA points to the first input sequence. |
| 2980 | * @param[in] srcALen length of the first input sequence. |
| 2981 | * @param[in] pSrcB points to the second input sequence. |
| 2982 | * @param[in] srcBLen length of the second input sequence. |
| 2983 | * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1. |
| 2984 | * @param[in] pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
| 2985 | * @param[in] pScratch2 points to scratch buffer of size min(srcALen, srcBLen). |
| 2986 | */ |
3147 | 2987 | void arm_conv_fast_opt_q15( |
3148 | 2988 | q15_t * pSrcA, |
… |
… |
|
3155 | 2995 | |
3156 | 2996 | |
3157 | | |
3158 | 2997 | /** |
3159 | 2998 | * @brief Convolution of Q31 sequences. |
3160 | | * @param[in] *pSrcA points to the first input sequence. |
3161 | | * @param[in] srcALen length of the first input sequence. |
3162 | | * @param[in] *pSrcB points to the second input sequence. |
3163 | | * @param[in] srcBLen length of the second input sequence. |
3164 | | * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1. |
3165 | | * @return none. |
3166 | | */ |
3167 | | |
| 2999 | * @param[in] pSrcA points to the first input sequence. |
| 3000 | * @param[in] srcALen length of the first input sequence. |
| 3001 | * @param[in] pSrcB points to the second input sequence. |
| 3002 | * @param[in] srcBLen length of the second input sequence. |
| 3003 | * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1. |
| 3004 | */ |
3168 | 3005 | void arm_conv_q31( |
3169 | 3006 | q31_t * pSrcA, |
… |
… |
|
3173 | 3010 | q31_t * pDst); |
3174 | 3011 | |
| 3012 | |
3175 | 3013 | /** |
3176 | 3014 | * @brief Convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4 |
3177 | | * @param[in] *pSrcA points to the first input sequence. |
3178 | | * @param[in] srcALen length of the first input sequence. |
3179 | | * @param[in] *pSrcB points to the second input sequence. |
3180 | | * @param[in] srcBLen length of the second input sequence. |
3181 | | * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1. |
3182 | | * @return none. |
3183 | | */ |
3184 | | |
| 3015 | * @param[in] pSrcA points to the first input sequence. |
| 3016 | * @param[in] srcALen length of the first input sequence. |
| 3017 | * @param[in] pSrcB points to the second input sequence. |
| 3018 | * @param[in] srcBLen length of the second input sequence. |
| 3019 | * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1. |
| 3020 | */ |
3185 | 3021 | void arm_conv_fast_q31( |
3186 | 3022 | q31_t * pSrcA, |
… |
… |
|
3193 | 3029 | /** |
3194 | 3030 | * @brief Convolution of Q7 sequences. |
3195 | | * @param[in] *pSrcA points to the first input sequence. |
3196 | | * @param[in] srcALen length of the first input sequence. |
3197 | | * @param[in] *pSrcB points to the second input sequence. |
3198 | | * @param[in] srcBLen length of the second input sequence. |
3199 | | * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1. |
3200 | | * @param[in] *pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
3201 | | * @param[in] *pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen). |
3202 | | * @return none. |
3203 | | */ |
3204 | | |
| 3031 | * @param[in] pSrcA points to the first input sequence. |
| 3032 | * @param[in] srcALen length of the first input sequence. |
| 3033 | * @param[in] pSrcB points to the second input sequence. |
| 3034 | * @param[in] srcBLen length of the second input sequence. |
| 3035 | * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1. |
| 3036 | * @param[in] pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
| 3037 | * @param[in] pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen). |
| 3038 | */ |
3205 | 3039 | void arm_conv_opt_q7( |
3206 | 3040 | q7_t * pSrcA, |
… |
… |
|
3213 | 3047 | |
3214 | 3048 | |
3215 | | |
3216 | 3049 | /** |
3217 | 3050 | * @brief Convolution of Q7 sequences. |
3218 | | * @param[in] *pSrcA points to the first input sequence. |
3219 | | * @param[in] srcALen length of the first input sequence. |
3220 | | * @param[in] *pSrcB points to the second input sequence. |
3221 | | * @param[in] srcBLen length of the second input sequence. |
3222 | | * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1. |
3223 | | * @return none. |
3224 | | */ |
3225 | | |
| 3051 | * @param[in] pSrcA points to the first input sequence. |
| 3052 | * @param[in] srcALen length of the first input sequence. |
| 3053 | * @param[in] pSrcB points to the second input sequence. |
| 3054 | * @param[in] srcBLen length of the second input sequence. |
| 3055 | * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1. |
| 3056 | */ |
3226 | 3057 | void arm_conv_q7( |
3227 | 3058 | q7_t * pSrcA, |
… |
… |
|
3234 | 3065 | /** |
3235 | 3066 | * @brief Partial convolution of floating-point sequences. |
3236 | | * @param[in] *pSrcA points to the first input sequence. |
3237 | | * @param[in] srcALen length of the first input sequence. |
3238 | | * @param[in] *pSrcB points to the second input sequence. |
3239 | | * @param[in] srcBLen length of the second input sequence. |
3240 | | * @param[out] *pDst points to the block of output data |
3241 | | * @param[in] firstIndex is the first output sample to start with. |
3242 | | * @param[in] numPoints is the number of output points to be computed. |
| 3067 | * @param[in] pSrcA points to the first input sequence. |
| 3068 | * @param[in] srcALen length of the first input sequence. |
| 3069 | * @param[in] pSrcB points to the second input sequence. |
| 3070 | * @param[in] srcBLen length of the second input sequence. |
| 3071 | * @param[out] pDst points to the block of output data |
| 3072 | * @param[in] firstIndex is the first output sample to start with. |
| 3073 | * @param[in] numPoints is the number of output points to be computed. |
3243 | 3074 | * @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]. |
3244 | 3075 | */ |
3245 | | |
3246 | 3076 | arm_status arm_conv_partial_f32( |
3247 | 3077 | float32_t * pSrcA, |
… |
… |
|
3253 | 3083 | uint32_t numPoints); |
3254 | 3084 | |
3255 | | /** |
| 3085 | |
| 3086 | /** |
3256 | 3087 | * @brief Partial convolution of Q15 sequences. |
3257 | | * @param[in] *pSrcA points to the first input sequence. |
3258 | | * @param[in] srcALen length of the first input sequence. |
3259 | | * @param[in] *pSrcB points to the second input sequence. |
3260 | | * @param[in] srcBLen length of the second input sequence. |
3261 | | * @param[out] *pDst points to the block of output data |
3262 | | * @param[in] firstIndex is the first output sample to start with. |
3263 | | * @param[in] numPoints is the number of output points to be computed. |
3264 | | * @param[in] * pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
3265 | | * @param[in] * pScratch2 points to scratch buffer of size min(srcALen, srcBLen). |
| 3088 | * @param[in] pSrcA points to the first input sequence. |
| 3089 | * @param[in] srcALen length of the first input sequence. |
| 3090 | * @param[in] pSrcB points to the second input sequence. |
| 3091 | * @param[in] srcBLen length of the second input sequence. |
| 3092 | * @param[out] pDst points to the block of output data |
| 3093 | * @param[in] firstIndex is the first output sample to start with. |
| 3094 | * @param[in] numPoints is the number of output points to be computed. |
| 3095 | * @param[in] pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
| 3096 | * @param[in] pScratch2 points to scratch buffer of size min(srcALen, srcBLen). |
3266 | 3097 | * @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]. |
3267 | 3098 | */ |
3268 | | |
3269 | 3099 | arm_status arm_conv_partial_opt_q15( |
3270 | 3100 | q15_t * pSrcA, |
… |
… |
|
3279 | 3109 | |
3280 | 3110 | |
3281 | | /** |
| 3111 | /** |
3282 | 3112 | * @brief Partial convolution of Q15 sequences. |
3283 | | * @param[in] *pSrcA points to the first input sequence. |
3284 | | * @param[in] srcALen length of the first input sequence. |
3285 | | * @param[in] *pSrcB points to the second input sequence. |
3286 | | * @param[in] srcBLen length of the second input sequence. |
3287 | | * @param[out] *pDst points to the block of output data |
3288 | | * @param[in] firstIndex is the first output sample to start with. |
3289 | | * @param[in] numPoints is the number of output points to be computed. |
| 3113 | * @param[in] pSrcA points to the first input sequence. |
| 3114 | * @param[in] srcALen length of the first input sequence. |
| 3115 | * @param[in] pSrcB points to the second input sequence. |
| 3116 | * @param[in] srcBLen length of the second input sequence. |
| 3117 | * @param[out] pDst points to the block of output data |
| 3118 | * @param[in] firstIndex is the first output sample to start with. |
| 3119 | * @param[in] numPoints is the number of output points to be computed. |
3290 | 3120 | * @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]. |
3291 | 3121 | */ |
3292 | | |
3293 | 3122 | arm_status arm_conv_partial_q15( |
3294 | 3123 | q15_t * pSrcA, |
… |
… |
|
3300 | 3129 | uint32_t numPoints); |
3301 | 3130 | |
| 3131 | |
3302 | 3132 | /** |
3303 | 3133 | * @brief Partial convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4 |
3304 | | * @param[in] *pSrcA points to the first input sequence. |
3305 | | * @param[in] srcALen length of the first input sequence. |
3306 | | * @param[in] *pSrcB points to the second input sequence. |
3307 | | * @param[in] srcBLen length of the second input sequence. |
3308 | | * @param[out] *pDst points to the block of output data |
3309 | | * @param[in] firstIndex is the first output sample to start with. |
3310 | | * @param[in] numPoints is the number of output points to be computed. |
| 3134 | * @param[in] pSrcA points to the first input sequence. |
| 3135 | * @param[in] srcALen length of the first input sequence. |
| 3136 | * @param[in] pSrcB points to the second input sequence. |
| 3137 | * @param[in] srcBLen length of the second input sequence. |
| 3138 | * @param[out] pDst points to the block of output data |
| 3139 | * @param[in] firstIndex is the first output sample to start with. |
| 3140 | * @param[in] numPoints is the number of output points to be computed. |
3311 | 3141 | * @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]. |
3312 | 3142 | */ |
3313 | | |
3314 | 3143 | arm_status arm_conv_partial_fast_q15( |
3315 | | q15_t * pSrcA, |
3316 | | uint32_t srcALen, |
3317 | | q15_t * pSrcB, |
3318 | | uint32_t srcBLen, |
3319 | | q15_t * pDst, |
3320 | | uint32_t firstIndex, |
3321 | | uint32_t numPoints); |
| 3144 | q15_t * pSrcA, |
| 3145 | uint32_t srcALen, |
| 3146 | q15_t * pSrcB, |
| 3147 | uint32_t srcBLen, |
| 3148 | q15_t * pDst, |
| 3149 | uint32_t firstIndex, |
| 3150 | uint32_t numPoints); |
3322 | 3151 | |
3323 | 3152 | |
3324 | 3153 | /** |
3325 | 3154 | * @brief Partial convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4 |
3326 | | * @param[in] *pSrcA points to the first input sequence. |
3327 | | * @param[in] srcALen length of the first input sequence. |
3328 | | * @param[in] *pSrcB points to the second input sequence. |
3329 | | * @param[in] srcBLen length of the second input sequence. |
3330 | | * @param[out] *pDst points to the block of output data |
3331 | | * @param[in] firstIndex is the first output sample to start with. |
3332 | | * @param[in] numPoints is the number of output points to be computed. |
3333 | | * @param[in] * pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
3334 | | * @param[in] * pScratch2 points to scratch buffer of size min(srcALen, srcBLen). |
| 3155 | * @param[in] pSrcA points to the first input sequence. |
| 3156 | * @param[in] srcALen length of the first input sequence. |
| 3157 | * @param[in] pSrcB points to the second input sequence. |
| 3158 | * @param[in] srcBLen length of the second input sequence. |
| 3159 | * @param[out] pDst points to the block of output data |
| 3160 | * @param[in] firstIndex is the first output sample to start with. |
| 3161 | * @param[in] numPoints is the number of output points to be computed. |
| 3162 | * @param[in] pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
| 3163 | * @param[in] pScratch2 points to scratch buffer of size min(srcALen, srcBLen). |
3335 | 3164 | * @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]. |
3336 | 3165 | */ |
3337 | | |
3338 | 3166 | arm_status arm_conv_partial_fast_opt_q15( |
3339 | 3167 | q15_t * pSrcA, |
… |
… |
|
3350 | 3178 | /** |
3351 | 3179 | * @brief Partial convolution of Q31 sequences. |
3352 | | * @param[in] *pSrcA points to the first input sequence. |
3353 | | * @param[in] srcALen length of the first input sequence. |
3354 | | * @param[in] *pSrcB points to the second input sequence. |
3355 | | * @param[in] srcBLen length of the second input sequence. |
3356 | | * @param[out] *pDst points to the block of output data |
3357 | | * @param[in] firstIndex is the first output sample to start with. |
3358 | | * @param[in] numPoints is the number of output points to be computed. |
| 3180 | * @param[in] pSrcA points to the first input sequence. |
| 3181 | * @param[in] srcALen length of the first input sequence. |
| 3182 | * @param[in] pSrcB points to the second input sequence. |
| 3183 | * @param[in] srcBLen length of the second input sequence. |
| 3184 | * @param[out] pDst points to the block of output data |
| 3185 | * @param[in] firstIndex is the first output sample to start with. |
| 3186 | * @param[in] numPoints is the number of output points to be computed. |
3359 | 3187 | * @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]. |
3360 | 3188 | */ |
3361 | | |
3362 | 3189 | arm_status arm_conv_partial_q31( |
3363 | 3190 | q31_t * pSrcA, |
… |
… |
|
3372 | 3199 | /** |
3373 | 3200 | * @brief Partial convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4 |
3374 | | * @param[in] *pSrcA points to the first input sequence. |
3375 | | * @param[in] srcALen length of the first input sequence. |
3376 | | * @param[in] *pSrcB points to the second input sequence. |
3377 | | * @param[in] srcBLen length of the second input sequence. |
3378 | | * @param[out] *pDst points to the block of output data |
3379 | | * @param[in] firstIndex is the first output sample to start with. |
3380 | | * @param[in] numPoints is the number of output points to be computed. |
| 3201 | * @param[in] pSrcA points to the first input sequence. |
| 3202 | * @param[in] srcALen length of the first input sequence. |
| 3203 | * @param[in] pSrcB points to the second input sequence. |
| 3204 | * @param[in] srcBLen length of the second input sequence. |
| 3205 | * @param[out] pDst points to the block of output data |
| 3206 | * @param[in] firstIndex is the first output sample to start with. |
| 3207 | * @param[in] numPoints is the number of output points to be computed. |
3381 | 3208 | * @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]. |
3382 | 3209 | */ |
3383 | | |
3384 | 3210 | arm_status arm_conv_partial_fast_q31( |
3385 | 3211 | q31_t * pSrcA, |
… |
… |
|
3394 | 3220 | /** |
3395 | 3221 | * @brief Partial convolution of Q7 sequences |
3396 | | * @param[in] *pSrcA points to the first input sequence. |
3397 | | * @param[in] srcALen length of the first input sequence. |
3398 | | * @param[in] *pSrcB points to the second input sequence. |
3399 | | * @param[in] srcBLen length of the second input sequence. |
3400 | | * @param[out] *pDst points to the block of output data |
3401 | | * @param[in] firstIndex is the first output sample to start with. |
3402 | | * @param[in] numPoints is the number of output points to be computed. |
3403 | | * @param[in] *pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
3404 | | * @param[in] *pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen). |
| 3222 | * @param[in] pSrcA points to the first input sequence. |
| 3223 | * @param[in] srcALen length of the first input sequence. |
| 3224 | * @param[in] pSrcB points to the second input sequence. |
| 3225 | * @param[in] srcBLen length of the second input sequence. |
| 3226 | * @param[out] pDst points to the block of output data |
| 3227 | * @param[in] firstIndex is the first output sample to start with. |
| 3228 | * @param[in] numPoints is the number of output points to be computed. |
| 3229 | * @param[in] pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
| 3230 | * @param[in] pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen). |
3405 | 3231 | * @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]. |
3406 | 3232 | */ |
3407 | | |
3408 | 3233 | arm_status arm_conv_partial_opt_q7( |
3409 | 3234 | q7_t * pSrcA, |
… |
… |
|
3420 | 3245 | /** |
3421 | 3246 | * @brief Partial convolution of Q7 sequences. |
3422 | | * @param[in] *pSrcA points to the first input sequence. |
3423 | | * @param[in] srcALen length of the first input sequence. |
3424 | | * @param[in] *pSrcB points to the second input sequence. |
3425 | | * @param[in] srcBLen length of the second input sequence. |
3426 | | * @param[out] *pDst points to the block of output data |
3427 | | * @param[in] firstIndex is the first output sample to start with. |
3428 | | * @param[in] numPoints is the number of output points to be computed. |
| 3247 | * @param[in] pSrcA points to the first input sequence. |
| 3248 | * @param[in] srcALen length of the first input sequence. |
| 3249 | * @param[in] pSrcB points to the second input sequence. |
| 3250 | * @param[in] srcBLen length of the second input sequence. |
| 3251 | * @param[out] pDst points to the block of output data |
| 3252 | * @param[in] firstIndex is the first output sample to start with. |
| 3253 | * @param[in] numPoints is the number of output points to be computed. |
3429 | 3254 | * @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]. |
3430 | 3255 | */ |
3431 | | |
3432 | 3256 | arm_status arm_conv_partial_q7( |
3433 | 3257 | q7_t * pSrcA, |
… |
… |
|
3440 | 3264 | |
3441 | 3265 | |
3442 | | |
3443 | 3266 | /** |
3444 | 3267 | * @brief Instance structure for the Q15 FIR decimator. |
3445 | 3268 | */ |
3446 | | |
3447 | | typedef struct |
3448 | | { |
3449 | | uint8_t M; /**< decimation factor. */ |
3450 | | uint16_t numTaps; /**< number of coefficients in the filter. */ |
3451 | | q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/ |
3452 | | q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */ |
3453 | | } arm_fir_decimate_instance_q15; |
3454 | | |
3455 | | /** |
3456 | | * @brief Instance structure for the Q31 FIR decimator. |
3457 | | */ |
3458 | | |
3459 | 3269 | typedef struct |
3460 | 3270 | { |
3461 | 3271 | uint8_t M; /**< decimation factor. */ |
3462 | 3272 | uint16_t numTaps; /**< number of coefficients in the filter. */ |
3463 | | q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/ |
3464 | | q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */ |
3465 | | |
| 3273 | q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/ |
| 3274 | q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */ |
| 3275 | } arm_fir_decimate_instance_q15; |
| 3276 | |
| 3277 | /** |
| 3278 | * @brief Instance structure for the Q31 FIR decimator. |
| 3279 | */ |
| 3280 | typedef struct |
| 3281 | { |
| 3282 | uint8_t M; /**< decimation factor. */ |
| 3283 | uint16_t numTaps; /**< number of coefficients in the filter. */ |
| 3284 | q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/ |
| 3285 | q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */ |
3466 | 3286 | } arm_fir_decimate_instance_q31; |
3467 | 3287 | |
… |
… |
|
3469 | 3289 | * @brief Instance structure for the floating-point FIR decimator. |
3470 | 3290 | */ |
3471 | | |
3472 | 3291 | typedef struct |
3473 | 3292 | { |
3474 | | uint8_t M; /**< decimation factor. */ |
3475 | | uint16_t numTaps; /**< number of coefficients in the filter. */ |
3476 | | float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/ |
3477 | | float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */ |
3478 | | |
| 3293 | uint8_t M; /**< decimation factor. */ |
| 3294 | uint16_t numTaps; /**< number of coefficients in the filter. */ |
| 3295 | float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/ |
| 3296 | float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */ |
3479 | 3297 | } arm_fir_decimate_instance_f32; |
3480 | 3298 | |
3481 | 3299 | |
3482 | | |
3483 | 3300 | /** |
3484 | 3301 | * @brief Processing function for the floating-point FIR decimator. |
3485 | | * @param[in] *S points to an instance of the floating-point FIR decimator structure. |
3486 | | * @param[in] *pSrc points to the block of input data. |
3487 | | * @param[out] *pDst points to the block of output data |
3488 | | * @param[in] blockSize number of input samples to process per call. |
3489 | | * @return none |
3490 | | */ |
3491 | | |
| 3302 | * @param[in] S points to an instance of the floating-point FIR decimator structure. |
| 3303 | * @param[in] pSrc points to the block of input data. |
| 3304 | * @param[out] pDst points to the block of output data |
| 3305 | * @param[in] blockSize number of input samples to process per call. |
| 3306 | */ |
3492 | 3307 | void arm_fir_decimate_f32( |
3493 | 3308 | const arm_fir_decimate_instance_f32 * S, |
… |
… |
|
3499 | 3314 | /** |
3500 | 3315 | * @brief Initialization function for the floating-point FIR decimator. |
3501 | | * @param[in,out] *S points to an instance of the floating-point FIR decimator structure. |
3502 | | * @param[in] numTaps number of coefficients in the filter. |
3503 | | * @param[in] M decimation factor. |
3504 | | * @param[in] *pCoeffs points to the filter coefficients. |
3505 | | * @param[in] *pState points to the state buffer. |
3506 | | * @param[in] blockSize number of input samples to process per call. |
| 3316 | * @param[in,out] S points to an instance of the floating-point FIR decimator structure. |
| 3317 | * @param[in] numTaps number of coefficients in the filter. |
| 3318 | * @param[in] M decimation factor. |
| 3319 | * @param[in] pCoeffs points to the filter coefficients. |
| 3320 | * @param[in] pState points to the state buffer. |
| 3321 | * @param[in] blockSize number of input samples to process per call. |
3507 | 3322 | * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if |
3508 | 3323 | * <code>blockSize</code> is not a multiple of <code>M</code>. |
3509 | 3324 | */ |
3510 | | |
3511 | 3325 | arm_status arm_fir_decimate_init_f32( |
3512 | 3326 | arm_fir_decimate_instance_f32 * S, |
… |
… |
|
3517 | 3331 | uint32_t blockSize); |
3518 | 3332 | |
| 3333 | |
3519 | 3334 | /** |
3520 | 3335 | * @brief Processing function for the Q15 FIR decimator. |
3521 | | * @param[in] *S points to an instance of the Q15 FIR decimator structure. |
3522 | | * @param[in] *pSrc points to the block of input data. |
3523 | | * @param[out] *pDst points to the block of output data |
3524 | | * @param[in] blockSize number of input samples to process per call. |
3525 | | * @return none |
3526 | | */ |
3527 | | |
| 3336 | * @param[in] S points to an instance of the Q15 FIR decimator structure. |
| 3337 | * @param[in] pSrc points to the block of input data. |
| 3338 | * @param[out] pDst points to the block of output data |
| 3339 | * @param[in] blockSize number of input samples to process per call. |
| 3340 | */ |
3528 | 3341 | void arm_fir_decimate_q15( |
3529 | 3342 | const arm_fir_decimate_instance_q15 * S, |
… |
… |
|
3532 | 3345 | uint32_t blockSize); |
3533 | 3346 | |
| 3347 | |
3534 | 3348 | /** |
3535 | 3349 | * @brief Processing function for the Q15 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4. |
3536 | | * @param[in] *S points to an instance of the Q15 FIR decimator structure. |
3537 | | * @param[in] *pSrc points to the block of input data. |
3538 | | * @param[out] *pDst points to the block of output data |
3539 | | * @param[in] blockSize number of input samples to process per call. |
3540 | | * @return none |
3541 | | */ |
3542 | | |
| 3350 | * @param[in] S points to an instance of the Q15 FIR decimator structure. |
| 3351 | * @param[in] pSrc points to the block of input data. |
| 3352 | * @param[out] pDst points to the block of output data |
| 3353 | * @param[in] blockSize number of input samples to process per call. |
| 3354 | */ |
3543 | 3355 | void arm_fir_decimate_fast_q15( |
3544 | 3356 | const arm_fir_decimate_instance_q15 * S, |
… |
… |
|
3548 | 3360 | |
3549 | 3361 | |
3550 | | |
3551 | 3362 | /** |
3552 | 3363 | * @brief Initialization function for the Q15 FIR decimator. |
3553 | | * @param[in,out] *S points to an instance of the Q15 FIR decimator structure. |
3554 | | * @param[in] numTaps number of coefficients in the filter. |
3555 | | * @param[in] M decimation factor. |
3556 | | * @param[in] *pCoeffs points to the filter coefficients. |
3557 | | * @param[in] *pState points to the state buffer. |
3558 | | * @param[in] blockSize number of input samples to process per call. |
| 3364 | * @param[in,out] S points to an instance of the Q15 FIR decimator structure. |
| 3365 | * @param[in] numTaps number of coefficients in the filter. |
| 3366 | * @param[in] M decimation factor. |
| 3367 | * @param[in] pCoeffs points to the filter coefficients. |
| 3368 | * @param[in] pState points to the state buffer. |
| 3369 | * @param[in] blockSize number of input samples to process per call. |
3559 | 3370 | * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if |
3560 | 3371 | * <code>blockSize</code> is not a multiple of <code>M</code>. |
3561 | 3372 | */ |
3562 | | |
3563 | 3373 | arm_status arm_fir_decimate_init_q15( |
3564 | 3374 | arm_fir_decimate_instance_q15 * S, |
… |
… |
|
3569 | 3379 | uint32_t blockSize); |
3570 | 3380 | |
| 3381 | |
3571 | 3382 | /** |
3572 | 3383 | * @brief Processing function for the Q31 FIR decimator. |
3573 | | * @param[in] *S points to an instance of the Q31 FIR decimator structure. |
3574 | | * @param[in] *pSrc points to the block of input data. |
3575 | | * @param[out] *pDst points to the block of output data |
| 3384 | * @param[in] S points to an instance of the Q31 FIR decimator structure. |
| 3385 | * @param[in] pSrc points to the block of input data. |
| 3386 | * @param[out] pDst points to the block of output data |
3576 | 3387 | * @param[in] blockSize number of input samples to process per call. |
3577 | | * @return none |
3578 | | */ |
3579 | | |
| 3388 | */ |
3580 | 3389 | void arm_fir_decimate_q31( |
3581 | 3390 | const arm_fir_decimate_instance_q31 * S, |
… |
… |
|
3586 | 3395 | /** |
3587 | 3396 | * @brief Processing function for the Q31 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4. |
3588 | | * @param[in] *S points to an instance of the Q31 FIR decimator structure. |
3589 | | * @param[in] *pSrc points to the block of input data. |
3590 | | * @param[out] *pDst points to the block of output data |
3591 | | * @param[in] blockSize number of input samples to process per call. |
3592 | | * @return none |
3593 | | */ |
3594 | | |
| 3397 | * @param[in] S points to an instance of the Q31 FIR decimator structure. |
| 3398 | * @param[in] pSrc points to the block of input data. |
| 3399 | * @param[out] pDst points to the block of output data |
| 3400 | * @param[in] blockSize number of input samples to process per call. |
| 3401 | */ |
3595 | 3402 | void arm_fir_decimate_fast_q31( |
3596 | 3403 | arm_fir_decimate_instance_q31 * S, |
… |
… |
|
3602 | 3409 | /** |
3603 | 3410 | * @brief Initialization function for the Q31 FIR decimator. |
3604 | | * @param[in,out] *S points to an instance of the Q31 FIR decimator structure. |
3605 | | * @param[in] numTaps number of coefficients in the filter. |
3606 | | * @param[in] M decimation factor. |
3607 | | * @param[in] *pCoeffs points to the filter coefficients. |
3608 | | * @param[in] *pState points to the state buffer. |
3609 | | * @param[in] blockSize number of input samples to process per call. |
| 3411 | * @param[in,out] S points to an instance of the Q31 FIR decimator structure. |
| 3412 | * @param[in] numTaps number of coefficients in the filter. |
| 3413 | * @param[in] M decimation factor. |
| 3414 | * @param[in] pCoeffs points to the filter coefficients. |
| 3415 | * @param[in] pState points to the state buffer. |
| 3416 | * @param[in] blockSize number of input samples to process per call. |
3610 | 3417 | * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if |
3611 | 3418 | * <code>blockSize</code> is not a multiple of <code>M</code>. |
3612 | 3419 | */ |
3613 | | |
3614 | 3420 | arm_status arm_fir_decimate_init_q31( |
3615 | 3421 | arm_fir_decimate_instance_q31 * S, |
… |
… |
|
3621 | 3427 | |
3622 | 3428 | |
3623 | | |
3624 | 3429 | /** |
3625 | 3430 | * @brief Instance structure for the Q15 FIR interpolator. |
3626 | 3431 | */ |
3627 | | |
3628 | 3432 | typedef struct |
3629 | 3433 | { |
… |
… |
|
3637 | 3441 | * @brief Instance structure for the Q31 FIR interpolator. |
3638 | 3442 | */ |
3639 | | |
3640 | 3443 | typedef struct |
3641 | 3444 | { |
3642 | 3445 | uint8_t L; /**< upsample factor. */ |
3643 | 3446 | uint16_t phaseLength; /**< length of each polyphase filter component. */ |
3644 | | q31_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */ |
3645 | | q31_t *pState; /**< points to the state variable array. The array is of length blockSize+phaseLength-1. */ |
| 3447 | q31_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */ |
| 3448 | q31_t *pState; /**< points to the state variable array. The array is of length blockSize+phaseLength-1. */ |
3646 | 3449 | } arm_fir_interpolate_instance_q31; |
3647 | 3450 | |
… |
… |
|
3649 | 3452 | * @brief Instance structure for the floating-point FIR interpolator. |
3650 | 3453 | */ |
3651 | | |
3652 | 3454 | typedef struct |
3653 | 3455 | { |
3654 | 3456 | uint8_t L; /**< upsample factor. */ |
3655 | 3457 | uint16_t phaseLength; /**< length of each polyphase filter component. */ |
3656 | | float32_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */ |
3657 | | float32_t *pState; /**< points to the state variable array. The array is of length phaseLength+numTaps-1. */ |
| 3458 | float32_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */ |
| 3459 | float32_t *pState; /**< points to the state variable array. The array is of length phaseLength+numTaps-1. */ |
3658 | 3460 | } arm_fir_interpolate_instance_f32; |
3659 | 3461 | |
… |
… |
|
3661 | 3463 | /** |
3662 | 3464 | * @brief Processing function for the Q15 FIR interpolator. |
3663 | | * @param[in] *S points to an instance of the Q15 FIR interpolator structure. |
3664 | | * @param[in] *pSrc points to the block of input data. |
3665 | | * @param[out] *pDst points to the block of output data. |
3666 | | * @param[in] blockSize number of input samples to process per call. |
3667 | | * @return none. |
3668 | | */ |
3669 | | |
| 3465 | * @param[in] S points to an instance of the Q15 FIR interpolator structure. |
| 3466 | * @param[in] pSrc points to the block of input data. |
| 3467 | * @param[out] pDst points to the block of output data. |
| 3468 | * @param[in] blockSize number of input samples to process per call. |
| 3469 | */ |
3670 | 3470 | void arm_fir_interpolate_q15( |
3671 | 3471 | const arm_fir_interpolate_instance_q15 * S, |
… |
… |
|
3677 | 3477 | /** |
3678 | 3478 | * @brief Initialization function for the Q15 FIR interpolator. |
3679 | | * @param[in,out] *S points to an instance of the Q15 FIR interpolator structure. |
3680 | | * @param[in] L upsample factor. |
3681 | | * @param[in] numTaps number of filter coefficients in the filter. |
3682 | | * @param[in] *pCoeffs points to the filter coefficient buffer. |
3683 | | * @param[in] *pState points to the state buffer. |
3684 | | * @param[in] blockSize number of input samples to process per call. |
| 3479 | * @param[in,out] S points to an instance of the Q15 FIR interpolator structure. |
| 3480 | * @param[in] L upsample factor. |
| 3481 | * @param[in] numTaps number of filter coefficients in the filter. |
| 3482 | * @param[in] pCoeffs points to the filter coefficient buffer. |
| 3483 | * @param[in] pState points to the state buffer. |
| 3484 | * @param[in] blockSize number of input samples to process per call. |
3685 | 3485 | * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if |
3686 | 3486 | * the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</code>. |
3687 | 3487 | */ |
3688 | | |
3689 | 3488 | arm_status arm_fir_interpolate_init_q15( |
3690 | 3489 | arm_fir_interpolate_instance_q15 * S, |
… |
… |
|
3695 | 3494 | uint32_t blockSize); |
3696 | 3495 | |
| 3496 | |
3697 | 3497 | /** |
3698 | 3498 | * @brief Processing function for the Q31 FIR interpolator. |
3699 | | * @param[in] *S points to an instance of the Q15 FIR interpolator structure. |
3700 | | * @param[in] *pSrc points to the block of input data. |
3701 | | * @param[out] *pDst points to the block of output data. |
3702 | | * @param[in] blockSize number of input samples to process per call. |
3703 | | * @return none. |
3704 | | */ |
3705 | | |
| 3499 | * @param[in] S points to an instance of the Q15 FIR interpolator structure. |
| 3500 | * @param[in] pSrc points to the block of input data. |
| 3501 | * @param[out] pDst points to the block of output data. |
| 3502 | * @param[in] blockSize number of input samples to process per call. |
| 3503 | */ |
3706 | 3504 | void arm_fir_interpolate_q31( |
3707 | 3505 | const arm_fir_interpolate_instance_q31 * S, |
… |
… |
|
3710 | 3508 | uint32_t blockSize); |
3711 | 3509 | |
| 3510 | |
3712 | 3511 | /** |
3713 | 3512 | * @brief Initialization function for the Q31 FIR interpolator. |
3714 | | * @param[in,out] *S points to an instance of the Q31 FIR interpolator structure. |
3715 | | * @param[in] L upsample factor. |
3716 | | * @param[in] numTaps number of filter coefficients in the filter. |
3717 | | * @param[in] *pCoeffs points to the filter coefficient buffer. |
3718 | | * @param[in] *pState points to the state buffer. |
3719 | | * @param[in] blockSize number of input samples to process per call. |
| 3513 | * @param[in,out] S points to an instance of the Q31 FIR interpolator structure. |
| 3514 | * @param[in] L upsample factor. |
| 3515 | * @param[in] numTaps number of filter coefficients in the filter. |
| 3516 | * @param[in] pCoeffs points to the filter coefficient buffer. |
| 3517 | * @param[in] pState points to the state buffer. |
| 3518 | * @param[in] blockSize number of input samples to process per call. |
3720 | 3519 | * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if |
3721 | 3520 | * the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</code>. |
3722 | 3521 | */ |
3723 | | |
3724 | 3522 | arm_status arm_fir_interpolate_init_q31( |
3725 | 3523 | arm_fir_interpolate_instance_q31 * S, |
… |
… |
|
3733 | 3531 | /** |
3734 | 3532 | * @brief Processing function for the floating-point FIR interpolator. |
3735 | | * @param[in] *S points to an instance of the floating-point FIR interpolator structure. |
3736 | | * @param[in] *pSrc points to the block of input data. |
3737 | | * @param[out] *pDst points to the block of output data. |
3738 | | * @param[in] blockSize number of input samples to process per call. |
3739 | | * @return none. |
3740 | | */ |
3741 | | |
| 3533 | * @param[in] S points to an instance of the floating-point FIR interpolator structure. |
| 3534 | * @param[in] pSrc points to the block of input data. |
| 3535 | * @param[out] pDst points to the block of output data. |
| 3536 | * @param[in] blockSize number of input samples to process per call. |
| 3537 | */ |
3742 | 3538 | void arm_fir_interpolate_f32( |
3743 | 3539 | const arm_fir_interpolate_instance_f32 * S, |
… |
… |
|
3746 | 3542 | uint32_t blockSize); |
3747 | 3543 | |
| 3544 | |
3748 | 3545 | /** |
3749 | 3546 | * @brief Initialization function for the floating-point FIR interpolator. |
3750 | | * @param[in,out] *S points to an instance of the floating-point FIR interpolator structure. |
3751 | | * @param[in] L upsample factor. |
3752 | | * @param[in] numTaps number of filter coefficients in the filter. |
3753 | | * @param[in] *pCoeffs points to the filter coefficient buffer. |
3754 | | * @param[in] *pState points to the state buffer. |
3755 | | * @param[in] blockSize number of input samples to process per call. |
| 3547 | * @param[in,out] S points to an instance of the floating-point FIR interpolator structure. |
| 3548 | * @param[in] L upsample factor. |
| 3549 | * @param[in] numTaps number of filter coefficients in the filter. |
| 3550 | * @param[in] pCoeffs points to the filter coefficient buffer. |
| 3551 | * @param[in] pState points to the state buffer. |
| 3552 | * @param[in] blockSize number of input samples to process per call. |
3756 | 3553 | * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if |
3757 | 3554 | * the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</code>. |
3758 | 3555 | */ |
3759 | | |
3760 | 3556 | arm_status arm_fir_interpolate_init_f32( |
3761 | 3557 | arm_fir_interpolate_instance_f32 * S, |
… |
… |
|
3766 | 3562 | uint32_t blockSize); |
3767 | 3563 | |
| 3564 | |
3768 | 3565 | /** |
3769 | 3566 | * @brief Instance structure for the high precision Q31 Biquad cascade filter. |
3770 | 3567 | */ |
3771 | | |
3772 | 3568 | typedef struct |
3773 | 3569 | { |
… |
… |
|
3776 | 3572 | q31_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */ |
3777 | 3573 | uint8_t postShift; /**< additional shift, in bits, applied to each output sample. */ |
3778 | | |
3779 | 3574 | } arm_biquad_cas_df1_32x64_ins_q31; |
3780 | 3575 | |
3781 | 3576 | |
3782 | 3577 | /** |
3783 | | * @param[in] *S points to an instance of the high precision Q31 Biquad cascade filter structure. |
3784 | | * @param[in] *pSrc points to the block of input data. |
3785 | | * @param[out] *pDst points to the block of output data |
3786 | | * @param[in] blockSize number of samples to process. |
3787 | | * @return none. |
3788 | | */ |
3789 | | |
| 3578 | * @param[in] S points to an instance of the high precision Q31 Biquad cascade filter structure. |
| 3579 | * @param[in] pSrc points to the block of input data. |
| 3580 | * @param[out] pDst points to the block of output data |
| 3581 | * @param[in] blockSize number of samples to process. |
| 3582 | */ |
3790 | 3583 | void arm_biquad_cas_df1_32x64_q31( |
3791 | 3584 | const arm_biquad_cas_df1_32x64_ins_q31 * S, |
… |
… |
|
3796 | 3589 | |
3797 | 3590 | /** |
3798 | | * @param[in,out] *S points to an instance of the high precision Q31 Biquad cascade filter structure. |
3799 | | * @param[in] numStages number of 2nd order stages in the filter. |
3800 | | * @param[in] *pCoeffs points to the filter coefficients. |
3801 | | * @param[in] *pState points to the state buffer. |
3802 | | * @param[in] postShift shift to be applied to the output. Varies according to the coefficients format |
3803 | | * @return none |
3804 | | */ |
3805 | | |
| 3591 | * @param[in,out] S points to an instance of the high precision Q31 Biquad cascade filter structure. |
| 3592 | * @param[in] numStages number of 2nd order stages in the filter. |
| 3593 | * @param[in] pCoeffs points to the filter coefficients. |
| 3594 | * @param[in] pState points to the state buffer. |
| 3595 | * @param[in] postShift shift to be applied to the output. Varies according to the coefficients format |
| 3596 | */ |
3806 | 3597 | void arm_biquad_cas_df1_32x64_init_q31( |
3807 | 3598 | arm_biquad_cas_df1_32x64_ins_q31 * S, |
… |
… |
|
3812 | 3603 | |
3813 | 3604 | |
3814 | | |
3815 | 3605 | /** |
3816 | 3606 | * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter. |
3817 | 3607 | */ |
3818 | | |
3819 | 3608 | typedef struct |
3820 | 3609 | { |
… |
… |
|
3824 | 3613 | } arm_biquad_cascade_df2T_instance_f32; |
3825 | 3614 | |
3826 | | |
3827 | | |
3828 | 3615 | /** |
3829 | 3616 | * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter. |
3830 | 3617 | */ |
3831 | | |
3832 | 3618 | typedef struct |
3833 | 3619 | { |
… |
… |
|
3837 | 3623 | } arm_biquad_cascade_stereo_df2T_instance_f32; |
3838 | 3624 | |
3839 | | |
3840 | | |
3841 | 3625 | /** |
3842 | 3626 | * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter. |
3843 | 3627 | */ |
3844 | | |
3845 | 3628 | typedef struct |
3846 | 3629 | { |
… |
… |
|
3853 | 3636 | /** |
3854 | 3637 | * @brief Processing function for the floating-point transposed direct form II Biquad cascade filter. |
3855 | | * @param[in] *S points to an instance of the filter data structure. |
3856 | | * @param[in] *pSrc points to the block of input data. |
3857 | | * @param[out] *pDst points to the block of output data |
3858 | | * @param[in] blockSize number of samples to process. |
3859 | | * @return none. |
3860 | | */ |
3861 | | |
| 3638 | * @param[in] S points to an instance of the filter data structure. |
| 3639 | * @param[in] pSrc points to the block of input data. |
| 3640 | * @param[out] pDst points to the block of output data |
| 3641 | * @param[in] blockSize number of samples to process. |
| 3642 | */ |
3862 | 3643 | void arm_biquad_cascade_df2T_f32( |
3863 | 3644 | const arm_biquad_cascade_df2T_instance_f32 * S, |
… |
… |
|
3869 | 3650 | /** |
3870 | 3651 | * @brief Processing function for the floating-point transposed direct form II Biquad cascade filter. 2 channels |
3871 | | * @param[in] *S points to an instance of the filter data structure. |
3872 | | * @param[in] *pSrc points to the block of input data. |
3873 | | * @param[out] *pDst points to the block of output data |
3874 | | * @param[in] blockSize number of samples to process. |
3875 | | * @return none. |
3876 | | */ |
3877 | | |
| 3652 | * @param[in] S points to an instance of the filter data structure. |
| 3653 | * @param[in] pSrc points to the block of input data. |
| 3654 | * @param[out] pDst points to the block of output data |
| 3655 | * @param[in] blockSize number of samples to process. |
| 3656 | */ |
3878 | 3657 | void arm_biquad_cascade_stereo_df2T_f32( |
3879 | 3658 | const arm_biquad_cascade_stereo_df2T_instance_f32 * S, |
… |
… |
|
3882 | 3661 | uint32_t blockSize); |
3883 | 3662 | |
| 3663 | |
3884 | 3664 | /** |
3885 | 3665 | * @brief Processing function for the floating-point transposed direct form II Biquad cascade filter. |
3886 | | * @param[in] *S points to an instance of the filter data structure. |
3887 | | * @param[in] *pSrc points to the block of input data. |
3888 | | * @param[out] *pDst points to the block of output data |
3889 | | * @param[in] blockSize number of samples to process. |
3890 | | * @return none. |
3891 | | */ |
3892 | | |
| 3666 | * @param[in] S points to an instance of the filter data structure. |
| 3667 | * @param[in] pSrc points to the block of input data. |
| 3668 | * @param[out] pDst points to the block of output data |
| 3669 | * @param[in] blockSize number of samples to process. |
| 3670 | */ |
3893 | 3671 | void arm_biquad_cascade_df2T_f64( |
3894 | 3672 | const arm_biquad_cascade_df2T_instance_f64 * S, |
… |
… |
|
3900 | 3678 | /** |
3901 | 3679 | * @brief Initialization function for the floating-point transposed direct form II Biquad cascade filter. |
3902 | | * @param[in,out] *S points to an instance of the filter data structure. |
3903 | | * @param[in] numStages number of 2nd order stages in the filter. |
3904 | | * @param[in] *pCoeffs points to the filter coefficients. |
3905 | | * @param[in] *pState points to the state buffer. |
3906 | | * @return none |
3907 | | */ |
3908 | | |
| 3680 | * @param[in,out] S points to an instance of the filter data structure. |
| 3681 | * @param[in] numStages number of 2nd order stages in the filter. |
| 3682 | * @param[in] pCoeffs points to the filter coefficients. |
| 3683 | * @param[in] pState points to the state buffer. |
| 3684 | */ |
3909 | 3685 | void arm_biquad_cascade_df2T_init_f32( |
3910 | 3686 | arm_biquad_cascade_df2T_instance_f32 * S, |
… |
… |
|
3916 | 3692 | /** |
3917 | 3693 | * @brief Initialization function for the floating-point transposed direct form II Biquad cascade filter. |
3918 | | * @param[in,out] *S points to an instance of the filter data structure. |
3919 | | * @param[in] numStages number of 2nd order stages in the filter. |
3920 | | * @param[in] *pCoeffs points to the filter coefficients. |
3921 | | * @param[in] *pState points to the state buffer. |
3922 | | * @return none |
3923 | | */ |
3924 | | |
| 3694 | * @param[in,out] S points to an instance of the filter data structure. |
| 3695 | * @param[in] numStages number of 2nd order stages in the filter. |
| 3696 | * @param[in] pCoeffs points to the filter coefficients. |
| 3697 | * @param[in] pState points to the state buffer. |
| 3698 | */ |
3925 | 3699 | void arm_biquad_cascade_stereo_df2T_init_f32( |
3926 | 3700 | arm_biquad_cascade_stereo_df2T_instance_f32 * S, |
… |
… |
|
3932 | 3706 | /** |
3933 | 3707 | * @brief Initialization function for the floating-point transposed direct form II Biquad cascade filter. |
3934 | | * @param[in,out] *S points to an instance of the filter data structure. |
3935 | | * @param[in] numStages number of 2nd order stages in the filter. |
3936 | | * @param[in] *pCoeffs points to the filter coefficients. |
3937 | | * @param[in] *pState points to the state buffer. |
3938 | | * @return none |
3939 | | */ |
3940 | | |
| 3708 | * @param[in,out] S points to an instance of the filter data structure. |
| 3709 | * @param[in] numStages number of 2nd order stages in the filter. |
| 3710 | * @param[in] pCoeffs points to the filter coefficients. |
| 3711 | * @param[in] pState points to the state buffer. |
| 3712 | */ |
3941 | 3713 | void arm_biquad_cascade_df2T_init_f64( |
3942 | 3714 | arm_biquad_cascade_df2T_instance_f64 * S, |
… |
… |
|
3946 | 3718 | |
3947 | 3719 | |
3948 | | |
3949 | 3720 | /** |
3950 | 3721 | * @brief Instance structure for the Q15 FIR lattice filter. |
3951 | 3722 | */ |
3952 | | |
3953 | 3723 | typedef struct |
3954 | 3724 | { |
3955 | | uint16_t numStages; /**< number of filter stages. */ |
3956 | | q15_t *pState; /**< points to the state variable array. The array is of length numStages. */ |
3957 | | q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */ |
| 3725 | uint16_t numStages; /**< number of filter stages. */ |
| 3726 | q15_t *pState; /**< points to the state variable array. The array is of length numStages. */ |
| 3727 | q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */ |
3958 | 3728 | } arm_fir_lattice_instance_q15; |
3959 | 3729 | |
… |
… |
|
3961 | 3731 | * @brief Instance structure for the Q31 FIR lattice filter. |
3962 | 3732 | */ |
3963 | | |
3964 | 3733 | typedef struct |
3965 | 3734 | { |
3966 | | uint16_t numStages; /**< number of filter stages. */ |
3967 | | q31_t *pState; /**< points to the state variable array. The array is of length numStages. */ |
3968 | | q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */ |
| 3735 | uint16_t numStages; /**< number of filter stages. */ |
| 3736 | q31_t *pState; /**< points to the state variable array. The array is of length numStages. */ |
| 3737 | q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */ |
3969 | 3738 | } arm_fir_lattice_instance_q31; |
3970 | 3739 | |
… |
… |
|
3972 | 3741 | * @brief Instance structure for the floating-point FIR lattice filter. |
3973 | 3742 | */ |
3974 | | |
3975 | 3743 | typedef struct |
3976 | 3744 | { |
… |
… |
|
3980 | 3748 | } arm_fir_lattice_instance_f32; |
3981 | 3749 | |
| 3750 | |
3982 | 3751 | /** |
3983 | 3752 | * @brief Initialization function for the Q15 FIR lattice filter. |
3984 | | * @param[in] *S points to an instance of the Q15 FIR lattice structure. |
| 3753 | * @param[in] S points to an instance of the Q15 FIR lattice structure. |
3985 | 3754 | * @param[in] numStages number of filter stages. |
3986 | | * @param[in] *pCoeffs points to the coefficient buffer. The array is of length numStages. |
3987 | | * @param[in] *pState points to the state buffer. The array is of length numStages. |
3988 | | * @return none. |
3989 | | */ |
3990 | | |
| 3755 | * @param[in] pCoeffs points to the coefficient buffer. The array is of length numStages. |
| 3756 | * @param[in] pState points to the state buffer. The array is of length numStages. |
| 3757 | */ |
3991 | 3758 | void arm_fir_lattice_init_q15( |
3992 | 3759 | arm_fir_lattice_instance_q15 * S, |
… |
… |
|
3998 | 3765 | /** |
3999 | 3766 | * @brief Processing function for the Q15 FIR lattice filter. |
4000 | | * @param[in] *S points to an instance of the Q15 FIR lattice structure. |
4001 | | * @param[in] *pSrc points to the block of input data. |
4002 | | * @param[out] *pDst points to the block of output data. |
4003 | | * @param[in] blockSize number of samples to process. |
4004 | | * @return none. |
| 3767 | * @param[in] S points to an instance of the Q15 FIR lattice structure. |
| 3768 | * @param[in] pSrc points to the block of input data. |
| 3769 | * @param[out] pDst points to the block of output data. |
| 3770 | * @param[in] blockSize number of samples to process. |
4005 | 3771 | */ |
4006 | 3772 | void arm_fir_lattice_q15( |
… |
… |
|
4010 | 3776 | uint32_t blockSize); |
4011 | 3777 | |
| 3778 | |
4012 | 3779 | /** |
4013 | 3780 | * @brief Initialization function for the Q31 FIR lattice filter. |
4014 | | * @param[in] *S points to an instance of the Q31 FIR lattice structure. |
| 3781 | * @param[in] S points to an instance of the Q31 FIR lattice structure. |
4015 | 3782 | * @param[in] numStages number of filter stages. |
4016 | | * @param[in] *pCoeffs points to the coefficient buffer. The array is of length numStages. |
4017 | | * @param[in] *pState points to the state buffer. The array is of length numStages. |
4018 | | * @return none. |
4019 | | */ |
4020 | | |
| 3783 | * @param[in] pCoeffs points to the coefficient buffer. The array is of length numStages. |
| 3784 | * @param[in] pState points to the state buffer. The array is of length numStages. |
| 3785 | */ |
4021 | 3786 | void arm_fir_lattice_init_q31( |
4022 | 3787 | arm_fir_lattice_instance_q31 * S, |
… |
… |
|
4028 | 3793 | /** |
4029 | 3794 | * @brief Processing function for the Q31 FIR lattice filter. |
4030 | | * @param[in] *S points to an instance of the Q31 FIR lattice structure. |
4031 | | * @param[in] *pSrc points to the block of input data. |
4032 | | * @param[out] *pDst points to the block of output data |
4033 | | * @param[in] blockSize number of samples to process. |
4034 | | * @return none. |
4035 | | */ |
4036 | | |
| 3795 | * @param[in] S points to an instance of the Q31 FIR lattice structure. |
| 3796 | * @param[in] pSrc points to the block of input data. |
| 3797 | * @param[out] pDst points to the block of output data |
| 3798 | * @param[in] blockSize number of samples to process. |
| 3799 | */ |
4037 | 3800 | void arm_fir_lattice_q31( |
4038 | 3801 | const arm_fir_lattice_instance_q31 * S, |
… |
… |
|
4041 | 3804 | uint32_t blockSize); |
4042 | 3805 | |
| 3806 | |
4043 | 3807 | /** |
4044 | 3808 | * @brief Initialization function for the floating-point FIR lattice filter. |
4045 | | * @param[in] *S points to an instance of the floating-point FIR lattice structure. |
| 3809 | * @param[in] S points to an instance of the floating-point FIR lattice structure. |
4046 | 3810 | * @param[in] numStages number of filter stages. |
4047 | | * @param[in] *pCoeffs points to the coefficient buffer. The array is of length numStages. |
4048 | | * @param[in] *pState points to the state buffer. The array is of length numStages. |
4049 | | * @return none. |
| 3811 | * @param[in] pCoeffs points to the coefficient buffer. The array is of length numStages. |
| 3812 | * @param[in] pState points to the state buffer. The array is of length numStages. |
4050 | 3813 | */ |
4051 | | |
4052 | 3814 | void arm_fir_lattice_init_f32( |
4053 | 3815 | arm_fir_lattice_instance_f32 * S, |
… |
… |
|
4056 | 3818 | float32_t * pState); |
4057 | 3819 | |
| 3820 | |
4058 | 3821 | /** |
4059 | 3822 | * @brief Processing function for the floating-point FIR lattice filter. |
4060 | | * @param[in] *S points to an instance of the floating-point FIR lattice structure. |
4061 | | * @param[in] *pSrc points to the block of input data. |
4062 | | * @param[out] *pDst points to the block of output data |
4063 | | * @param[in] blockSize number of samples to process. |
4064 | | * @return none. |
4065 | | */ |
4066 | | |
| 3823 | * @param[in] S points to an instance of the floating-point FIR lattice structure. |
| 3824 | * @param[in] pSrc points to the block of input data. |
| 3825 | * @param[out] pDst points to the block of output data |
| 3826 | * @param[in] blockSize number of samples to process. |
| 3827 | */ |
4067 | 3828 | void arm_fir_lattice_f32( |
4068 | 3829 | const arm_fir_lattice_instance_f32 * S, |
… |
… |
|
4071 | 3832 | uint32_t blockSize); |
4072 | 3833 | |
| 3834 | |
4073 | 3835 | /** |
4074 | 3836 | * @brief Instance structure for the Q15 IIR lattice filter. |
… |
… |
|
4076 | 3838 | typedef struct |
4077 | 3839 | { |
4078 | | uint16_t numStages; /**< number of stages in the filter. */ |
4079 | | q15_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */ |
4080 | | q15_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */ |
4081 | | q15_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */ |
| 3840 | uint16_t numStages; /**< number of stages in the filter. */ |
| 3841 | q15_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */ |
| 3842 | q15_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */ |
| 3843 | q15_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */ |
4082 | 3844 | } arm_iir_lattice_instance_q15; |
4083 | 3845 | |
… |
… |
|
4087 | 3849 | typedef struct |
4088 | 3850 | { |
4089 | | uint16_t numStages; /**< number of stages in the filter. */ |
4090 | | q31_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */ |
4091 | | q31_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */ |
4092 | | q31_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */ |
| 3851 | uint16_t numStages; /**< number of stages in the filter. */ |
| 3852 | q31_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */ |
| 3853 | q31_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */ |
| 3854 | q31_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */ |
4093 | 3855 | } arm_iir_lattice_instance_q31; |
4094 | 3856 | |
… |
… |
|
4098 | 3860 | typedef struct |
4099 | 3861 | { |
4100 | | uint16_t numStages; /**< number of stages in the filter. */ |
4101 | | float32_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */ |
4102 | | float32_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */ |
4103 | | float32_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */ |
| 3862 | uint16_t numStages; /**< number of stages in the filter. */ |
| 3863 | float32_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */ |
| 3864 | float32_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */ |
| 3865 | float32_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */ |
4104 | 3866 | } arm_iir_lattice_instance_f32; |
4105 | 3867 | |
| 3868 | |
4106 | 3869 | /** |
4107 | 3870 | * @brief Processing function for the floating-point IIR lattice filter. |
4108 | | * @param[in] *S points to an instance of the floating-point IIR lattice structure. |
4109 | | * @param[in] *pSrc points to the block of input data. |
4110 | | * @param[out] *pDst points to the block of output data. |
4111 | | * @param[in] blockSize number of samples to process. |
4112 | | * @return none. |
4113 | | */ |
4114 | | |
| 3871 | * @param[in] S points to an instance of the floating-point IIR lattice structure. |
| 3872 | * @param[in] pSrc points to the block of input data. |
| 3873 | * @param[out] pDst points to the block of output data. |
| 3874 | * @param[in] blockSize number of samples to process. |
| 3875 | */ |
4115 | 3876 | void arm_iir_lattice_f32( |
4116 | 3877 | const arm_iir_lattice_instance_f32 * S, |
… |
… |
|
4119 | 3880 | uint32_t blockSize); |
4120 | 3881 | |
| 3882 | |
4121 | 3883 | /** |
4122 | 3884 | * @brief Initialization function for the floating-point IIR lattice filter. |
4123 | | * @param[in] *S points to an instance of the floating-point IIR lattice structure. |
4124 | | * @param[in] numStages number of stages in the filter. |
4125 | | * @param[in] *pkCoeffs points to the reflection coefficient buffer. The array is of length numStages. |
4126 | | * @param[in] *pvCoeffs points to the ladder coefficient buffer. The array is of length numStages+1. |
4127 | | * @param[in] *pState points to the state buffer. The array is of length numStages+blockSize-1. |
4128 | | * @param[in] blockSize number of samples to process. |
4129 | | * @return none. |
4130 | | */ |
4131 | | |
| 3885 | * @param[in] S points to an instance of the floating-point IIR lattice structure. |
| 3886 | * @param[in] numStages number of stages in the filter. |
| 3887 | * @param[in] pkCoeffs points to the reflection coefficient buffer. The array is of length numStages. |
| 3888 | * @param[in] pvCoeffs points to the ladder coefficient buffer. The array is of length numStages+1. |
| 3889 | * @param[in] pState points to the state buffer. The array is of length numStages+blockSize-1. |
| 3890 | * @param[in] blockSize number of samples to process. |
| 3891 | */ |
4132 | 3892 | void arm_iir_lattice_init_f32( |
4133 | 3893 | arm_iir_lattice_instance_f32 * S, |
… |
… |
|
4141 | 3901 | /** |
4142 | 3902 | * @brief Processing function for the Q31 IIR lattice filter. |
4143 | | * @param[in] *S points to an instance of the Q31 IIR lattice structure. |
4144 | | * @param[in] *pSrc points to the block of input data. |
4145 | | * @param[out] *pDst points to the block of output data. |
4146 | | * @param[in] blockSize number of samples to process. |
4147 | | * @return none. |
4148 | | */ |
4149 | | |
| 3903 | * @param[in] S points to an instance of the Q31 IIR lattice structure. |
| 3904 | * @param[in] pSrc points to the block of input data. |
| 3905 | * @param[out] pDst points to the block of output data. |
| 3906 | * @param[in] blockSize number of samples to process. |
| 3907 | */ |
4150 | 3908 | void arm_iir_lattice_q31( |
4151 | 3909 | const arm_iir_lattice_instance_q31 * S, |
… |
… |
|
4157 | 3915 | /** |
4158 | 3916 | * @brief Initialization function for the Q31 IIR lattice filter. |
4159 | | * @param[in] *S points to an instance of the Q31 IIR lattice structure. |
4160 | | * @param[in] numStages number of stages in the filter. |
4161 | | * @param[in] *pkCoeffs points to the reflection coefficient buffer. The array is of length numStages. |
4162 | | * @param[in] *pvCoeffs points to the ladder coefficient buffer. The array is of length numStages+1. |
4163 | | * @param[in] *pState points to the state buffer. The array is of length numStages+blockSize. |
4164 | | * @param[in] blockSize number of samples to process. |
4165 | | * @return none. |
4166 | | */ |
4167 | | |
| 3917 | * @param[in] S points to an instance of the Q31 IIR lattice structure. |
| 3918 | * @param[in] numStages number of stages in the filter. |
| 3919 | * @param[in] pkCoeffs points to the reflection coefficient buffer. The array is of length numStages. |
| 3920 | * @param[in] pvCoeffs points to the ladder coefficient buffer. The array is of length numStages+1. |
| 3921 | * @param[in] pState points to the state buffer. The array is of length numStages+blockSize. |
| 3922 | * @param[in] blockSize number of samples to process. |
| 3923 | */ |
4168 | 3924 | void arm_iir_lattice_init_q31( |
4169 | 3925 | arm_iir_lattice_instance_q31 * S, |
… |
… |
|
4177 | 3933 | /** |
4178 | 3934 | * @brief Processing function for the Q15 IIR lattice filter. |
4179 | | * @param[in] *S points to an instance of the Q15 IIR lattice structure. |
4180 | | * @param[in] *pSrc points to the block of input data. |
4181 | | * @param[out] *pDst points to the block of output data. |
4182 | | * @param[in] blockSize number of samples to process. |
4183 | | * @return none. |
4184 | | */ |
4185 | | |
| 3935 | * @param[in] S points to an instance of the Q15 IIR lattice structure. |
| 3936 | * @param[in] pSrc points to the block of input data. |
| 3937 | * @param[out] pDst points to the block of output data. |
| 3938 | * @param[in] blockSize number of samples to process. |
| 3939 | */ |
4186 | 3940 | void arm_iir_lattice_q15( |
4187 | 3941 | const arm_iir_lattice_instance_q15 * S, |
… |
… |
|
4193 | 3947 | /** |
4194 | 3948 | * @brief Initialization function for the Q15 IIR lattice filter. |
4195 | | * @param[in] *S points to an instance of the fixed-point Q15 IIR lattice structure. |
| 3949 | * @param[in] S points to an instance of the fixed-point Q15 IIR lattice structure. |
4196 | 3950 | * @param[in] numStages number of stages in the filter. |
4197 | | * @param[in] *pkCoeffs points to reflection coefficient buffer. The array is of length numStages. |
4198 | | * @param[in] *pvCoeffs points to ladder coefficient buffer. The array is of length numStages+1. |
4199 | | * @param[in] *pState points to state buffer. The array is of length numStages+blockSize. |
4200 | | * @param[in] blockSize number of samples to process per call. |
4201 | | * @return none. |
| 3951 | * @param[in] pkCoeffs points to reflection coefficient buffer. The array is of length numStages. |
| 3952 | * @param[in] pvCoeffs points to ladder coefficient buffer. The array is of length numStages+1. |
| 3953 | * @param[in] pState points to state buffer. The array is of length numStages+blockSize. |
| 3954 | * @param[in] blockSize number of samples to process per call. |
4202 | 3955 | */ |
4203 | | |
4204 | 3956 | void arm_iir_lattice_init_q15( |
4205 | 3957 | arm_iir_lattice_instance_q15 * S, |
… |
… |
|
4210 | 3962 | uint32_t blockSize); |
4211 | 3963 | |
| 3964 | |
4212 | 3965 | /** |
4213 | 3966 | * @brief Instance structure for the floating-point LMS filter. |
4214 | 3967 | */ |
4215 | | |
4216 | 3968 | typedef struct |
4217 | 3969 | { |
… |
… |
|
4222 | 3974 | } arm_lms_instance_f32; |
4223 | 3975 | |
| 3976 | |
4224 | 3977 | /** |
4225 | 3978 | * @brief Processing function for floating-point LMS filter. |
4226 | | * @param[in] *S points to an instance of the floating-point LMS filter structure. |
4227 | | * @param[in] *pSrc points to the block of input data. |
4228 | | * @param[in] *pRef points to the block of reference data. |
4229 | | * @param[out] *pOut points to the block of output data. |
4230 | | * @param[out] *pErr points to the block of error data. |
4231 | | * @param[in] blockSize number of samples to process. |
4232 | | * @return none. |
4233 | | */ |
4234 | | |
| 3979 | * @param[in] S points to an instance of the floating-point LMS filter structure. |
| 3980 | * @param[in] pSrc points to the block of input data. |
| 3981 | * @param[in] pRef points to the block of reference data. |
| 3982 | * @param[out] pOut points to the block of output data. |
| 3983 | * @param[out] pErr points to the block of error data. |
| 3984 | * @param[in] blockSize number of samples to process. |
| 3985 | */ |
4235 | 3986 | void arm_lms_f32( |
4236 | 3987 | const arm_lms_instance_f32 * S, |
… |
… |
|
4241 | 3992 | uint32_t blockSize); |
4242 | 3993 | |
| 3994 | |
4243 | 3995 | /** |
4244 | 3996 | * @brief Initialization function for floating-point LMS filter. |
4245 | | * @param[in] *S points to an instance of the floating-point LMS filter structure. |
4246 | | * @param[in] numTaps number of filter coefficients. |
4247 | | * @param[in] *pCoeffs points to the coefficient buffer. |
4248 | | * @param[in] *pState points to state buffer. |
4249 | | * @param[in] mu step size that controls filter coefficient updates. |
4250 | | * @param[in] blockSize number of samples to process. |
4251 | | * @return none. |
4252 | | */ |
4253 | | |
| 3997 | * @param[in] S points to an instance of the floating-point LMS filter structure. |
| 3998 | * @param[in] numTaps number of filter coefficients. |
| 3999 | * @param[in] pCoeffs points to the coefficient buffer. |
| 4000 | * @param[in] pState points to state buffer. |
| 4001 | * @param[in] mu step size that controls filter coefficient updates. |
| 4002 | * @param[in] blockSize number of samples to process. |
| 4003 | */ |
4254 | 4004 | void arm_lms_init_f32( |
4255 | 4005 | arm_lms_instance_f32 * S, |
… |
… |
|
4260 | 4010 | uint32_t blockSize); |
4261 | 4011 | |
| 4012 | |
4262 | 4013 | /** |
4263 | 4014 | * @brief Instance structure for the Q15 LMS filter. |
4264 | 4015 | */ |
4265 | | |
4266 | 4016 | typedef struct |
4267 | 4017 | { |
… |
… |
|
4276 | 4026 | /** |
4277 | 4027 | * @brief Initialization function for the Q15 LMS filter. |
4278 | | * @param[in] *S points to an instance of the Q15 LMS filter structure. |
4279 | | * @param[in] numTaps number of filter coefficients. |
4280 | | * @param[in] *pCoeffs points to the coefficient buffer. |
4281 | | * @param[in] *pState points to the state buffer. |
4282 | | * @param[in] mu step size that controls filter coefficient updates. |
4283 | | * @param[in] blockSize number of samples to process. |
4284 | | * @param[in] postShift bit shift applied to coefficients. |
4285 | | * @return none. |
4286 | | */ |
4287 | | |
| 4028 | * @param[in] S points to an instance of the Q15 LMS filter structure. |
| 4029 | * @param[in] numTaps number of filter coefficients. |
| 4030 | * @param[in] pCoeffs points to the coefficient buffer. |
| 4031 | * @param[in] pState points to the state buffer. |
| 4032 | * @param[in] mu step size that controls filter coefficient updates. |
| 4033 | * @param[in] blockSize number of samples to process. |
| 4034 | * @param[in] postShift bit shift applied to coefficients. |
| 4035 | */ |
4288 | 4036 | void arm_lms_init_q15( |
4289 | 4037 | arm_lms_instance_q15 * S, |
… |
… |
|
4295 | 4043 | uint32_t postShift); |
4296 | 4044 | |
| 4045 | |
4297 | 4046 | /** |
4298 | 4047 | * @brief Processing function for Q15 LMS filter. |
4299 | | * @param[in] *S points to an instance of the Q15 LMS filter structure. |
4300 | | * @param[in] *pSrc points to the block of input data. |
4301 | | * @param[in] *pRef points to the block of reference data. |
4302 | | * @param[out] *pOut points to the block of output data. |
4303 | | * @param[out] *pErr points to the block of error data. |
4304 | | * @param[in] blockSize number of samples to process. |
4305 | | * @return none. |
4306 | | */ |
4307 | | |
| 4048 | * @param[in] S points to an instance of the Q15 LMS filter structure. |
| 4049 | * @param[in] pSrc points to the block of input data. |
| 4050 | * @param[in] pRef points to the block of reference data. |
| 4051 | * @param[out] pOut points to the block of output data. |
| 4052 | * @param[out] pErr points to the block of error data. |
| 4053 | * @param[in] blockSize number of samples to process. |
| 4054 | */ |
4308 | 4055 | void arm_lms_q15( |
4309 | 4056 | const arm_lms_instance_q15 * S, |
… |
… |
|
4318 | 4065 | * @brief Instance structure for the Q31 LMS filter. |
4319 | 4066 | */ |
4320 | | |
4321 | 4067 | typedef struct |
4322 | 4068 | { |
… |
… |
|
4326 | 4072 | q31_t mu; /**< step size that controls filter coefficient updates. */ |
4327 | 4073 | uint32_t postShift; /**< bit shift applied to coefficients. */ |
4328 | | |
4329 | 4074 | } arm_lms_instance_q31; |
4330 | 4075 | |
| 4076 | |
4331 | 4077 | /** |
4332 | 4078 | * @brief Processing function for Q31 LMS filter. |
4333 | | * @param[in] *S points to an instance of the Q15 LMS filter structure. |
4334 | | * @param[in] *pSrc points to the block of input data. |
4335 | | * @param[in] *pRef points to the block of reference data. |
4336 | | * @param[out] *pOut points to the block of output data. |
4337 | | * @param[out] *pErr points to the block of error data. |
4338 | | * @param[in] blockSize number of samples to process. |
4339 | | * @return none. |
4340 | | */ |
4341 | | |
| 4079 | * @param[in] S points to an instance of the Q15 LMS filter structure. |
| 4080 | * @param[in] pSrc points to the block of input data. |
| 4081 | * @param[in] pRef points to the block of reference data. |
| 4082 | * @param[out] pOut points to the block of output data. |
| 4083 | * @param[out] pErr points to the block of error data. |
| 4084 | * @param[in] blockSize number of samples to process. |
| 4085 | */ |
4342 | 4086 | void arm_lms_q31( |
4343 | 4087 | const arm_lms_instance_q31 * S, |
… |
… |
|
4348 | 4092 | uint32_t blockSize); |
4349 | 4093 | |
| 4094 | |
4350 | 4095 | /** |
4351 | 4096 | * @brief Initialization function for Q31 LMS filter. |
4352 | | * @param[in] *S points to an instance of the Q31 LMS filter structure. |
4353 | | * @param[in] numTaps number of filter coefficients. |
4354 | | * @param[in] *pCoeffs points to coefficient buffer. |
4355 | | * @param[in] *pState points to state buffer. |
4356 | | * @param[in] mu step size that controls filter coefficient updates. |
4357 | | * @param[in] blockSize number of samples to process. |
4358 | | * @param[in] postShift bit shift applied to coefficients. |
4359 | | * @return none. |
4360 | | */ |
4361 | | |
| 4097 | * @param[in] S points to an instance of the Q31 LMS filter structure. |
| 4098 | * @param[in] numTaps number of filter coefficients. |
| 4099 | * @param[in] pCoeffs points to coefficient buffer. |
| 4100 | * @param[in] pState points to state buffer. |
| 4101 | * @param[in] mu step size that controls filter coefficient updates. |
| 4102 | * @param[in] blockSize number of samples to process. |
| 4103 | * @param[in] postShift bit shift applied to coefficients. |
| 4104 | */ |
4362 | 4105 | void arm_lms_init_q31( |
4363 | 4106 | arm_lms_instance_q31 * S, |
… |
… |
|
4369 | 4112 | uint32_t postShift); |
4370 | 4113 | |
| 4114 | |
4371 | 4115 | /** |
4372 | 4116 | * @brief Instance structure for the floating-point normalized LMS filter. |
4373 | 4117 | */ |
4374 | | |
4375 | 4118 | typedef struct |
4376 | 4119 | { |
… |
… |
|
4378 | 4121 | float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */ |
4379 | 4122 | float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */ |
4380 | | float32_t mu; /**< step size that control filter coefficient updates. */ |
4381 | | float32_t energy; /**< saves previous frame energy. */ |
4382 | | float32_t x0; /**< saves previous input sample. */ |
| 4123 | float32_t mu; /**< step size that control filter coefficient updates. */ |
| 4124 | float32_t energy; /**< saves previous frame energy. */ |
| 4125 | float32_t x0; /**< saves previous input sample. */ |
4383 | 4126 | } arm_lms_norm_instance_f32; |
4384 | 4127 | |
| 4128 | |
4385 | 4129 | /** |
4386 | 4130 | * @brief Processing function for floating-point normalized LMS filter. |
4387 | | * @param[in] *S points to an instance of the floating-point normalized LMS filter structure. |
4388 | | * @param[in] *pSrc points to the block of input data. |
4389 | | * @param[in] *pRef points to the block of reference data. |
4390 | | * @param[out] *pOut points to the block of output data. |
4391 | | * @param[out] *pErr points to the block of error data. |
4392 | | * @param[in] blockSize number of samples to process. |
4393 | | * @return none. |
4394 | | */ |
4395 | | |
| 4131 | * @param[in] S points to an instance of the floating-point normalized LMS filter structure. |
| 4132 | * @param[in] pSrc points to the block of input data. |
| 4133 | * @param[in] pRef points to the block of reference data. |
| 4134 | * @param[out] pOut points to the block of output data. |
| 4135 | * @param[out] pErr points to the block of error data. |
| 4136 | * @param[in] blockSize number of samples to process. |
| 4137 | */ |
4396 | 4138 | void arm_lms_norm_f32( |
4397 | 4139 | arm_lms_norm_instance_f32 * S, |
… |
… |
|
4402 | 4144 | uint32_t blockSize); |
4403 | 4145 | |
| 4146 | |
4404 | 4147 | /** |
4405 | 4148 | * @brief Initialization function for floating-point normalized LMS filter. |
4406 | | * @param[in] *S points to an instance of the floating-point LMS filter structure. |
4407 | | * @param[in] numTaps number of filter coefficients. |
4408 | | * @param[in] *pCoeffs points to coefficient buffer. |
4409 | | * @param[in] *pState points to state buffer. |
4410 | | * @param[in] mu step size that controls filter coefficient updates. |
4411 | | * @param[in] blockSize number of samples to process. |
4412 | | * @return none. |
4413 | | */ |
4414 | | |
| 4149 | * @param[in] S points to an instance of the floating-point LMS filter structure. |
| 4150 | * @param[in] numTaps number of filter coefficients. |
| 4151 | * @param[in] pCoeffs points to coefficient buffer. |
| 4152 | * @param[in] pState points to state buffer. |
| 4153 | * @param[in] mu step size that controls filter coefficient updates. |
| 4154 | * @param[in] blockSize number of samples to process. |
| 4155 | */ |
4415 | 4156 | void arm_lms_norm_init_f32( |
4416 | 4157 | arm_lms_norm_instance_f32 * S, |
… |
… |
|
4437 | 4178 | } arm_lms_norm_instance_q31; |
4438 | 4179 | |
| 4180 | |
4439 | 4181 | /** |
4440 | 4182 | * @brief Processing function for Q31 normalized LMS filter. |
4441 | | * @param[in] *S points to an instance of the Q31 normalized LMS filter structure. |
4442 | | * @param[in] *pSrc points to the block of input data. |
4443 | | * @param[in] *pRef points to the block of reference data. |
4444 | | * @param[out] *pOut points to the block of output data. |
4445 | | * @param[out] *pErr points to the block of error data. |
4446 | | * @param[in] blockSize number of samples to process. |
4447 | | * @return none. |
4448 | | */ |
4449 | | |
| 4183 | * @param[in] S points to an instance of the Q31 normalized LMS filter structure. |
| 4184 | * @param[in] pSrc points to the block of input data. |
| 4185 | * @param[in] pRef points to the block of reference data. |
| 4186 | * @param[out] pOut points to the block of output data. |
| 4187 | * @param[out] pErr points to the block of error data. |
| 4188 | * @param[in] blockSize number of samples to process. |
| 4189 | */ |
4450 | 4190 | void arm_lms_norm_q31( |
4451 | 4191 | arm_lms_norm_instance_q31 * S, |
… |
… |
|
4456 | 4196 | uint32_t blockSize); |
4457 | 4197 | |
| 4198 | |
4458 | 4199 | /** |
4459 | 4200 | * @brief Initialization function for Q31 normalized LMS filter. |
4460 | | * @param[in] *S points to an instance of the Q31 normalized LMS filter structure. |
4461 | | * @param[in] numTaps number of filter coefficients. |
4462 | | * @param[in] *pCoeffs points to coefficient buffer. |
4463 | | * @param[in] *pState points to state buffer. |
4464 | | * @param[in] mu step size that controls filter coefficient updates. |
4465 | | * @param[in] blockSize number of samples to process. |
4466 | | * @param[in] postShift bit shift applied to coefficients. |
4467 | | * @return none. |
4468 | | */ |
4469 | | |
| 4201 | * @param[in] S points to an instance of the Q31 normalized LMS filter structure. |
| 4202 | * @param[in] numTaps number of filter coefficients. |
| 4203 | * @param[in] pCoeffs points to coefficient buffer. |
| 4204 | * @param[in] pState points to state buffer. |
| 4205 | * @param[in] mu step size that controls filter coefficient updates. |
| 4206 | * @param[in] blockSize number of samples to process. |
| 4207 | * @param[in] postShift bit shift applied to coefficients. |
| 4208 | */ |
4470 | 4209 | void arm_lms_norm_init_q31( |
4471 | 4210 | arm_lms_norm_instance_q31 * S, |
… |
… |
|
4477 | 4216 | uint8_t postShift); |
4478 | 4217 | |
| 4218 | |
4479 | 4219 | /** |
4480 | 4220 | * @brief Instance structure for the Q15 normalized LMS filter. |
4481 | 4221 | */ |
4482 | | |
4483 | 4222 | typedef struct |
4484 | 4223 | { |
4485 | | uint16_t numTaps; /**< Number of coefficients in the filter. */ |
| 4224 | uint16_t numTaps; /**< Number of coefficients in the filter. */ |
4486 | 4225 | q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */ |
4487 | 4226 | q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */ |
4488 | | q15_t mu; /**< step size that controls filter coefficient updates. */ |
4489 | | uint8_t postShift; /**< bit shift applied to coefficients. */ |
4490 | | q15_t *recipTable; /**< Points to the reciprocal initial value table. */ |
4491 | | q15_t energy; /**< saves previous frame energy. */ |
4492 | | q15_t x0; /**< saves previous input sample. */ |
| 4227 | q15_t mu; /**< step size that controls filter coefficient updates. */ |
| 4228 | uint8_t postShift; /**< bit shift applied to coefficients. */ |
| 4229 | q15_t *recipTable; /**< Points to the reciprocal initial value table. */ |
| 4230 | q15_t energy; /**< saves previous frame energy. */ |
| 4231 | q15_t x0; /**< saves previous input sample. */ |
4493 | 4232 | } arm_lms_norm_instance_q15; |
4494 | 4233 | |
| 4234 | |
4495 | 4235 | /** |
4496 | 4236 | * @brief Processing function for Q15 normalized LMS filter. |
4497 | | * @param[in] *S points to an instance of the Q15 normalized LMS filter structure. |
4498 | | * @param[in] *pSrc points to the block of input data. |
4499 | | * @param[in] *pRef points to the block of reference data. |
4500 | | * @param[out] *pOut points to the block of output data. |
4501 | | * @param[out] *pErr points to the block of error data. |
4502 | | * @param[in] blockSize number of samples to process. |
4503 | | * @return none. |
4504 | | */ |
4505 | | |
| 4237 | * @param[in] S points to an instance of the Q15 normalized LMS filter structure. |
| 4238 | * @param[in] pSrc points to the block of input data. |
| 4239 | * @param[in] pRef points to the block of reference data. |
| 4240 | * @param[out] pOut points to the block of output data. |
| 4241 | * @param[out] pErr points to the block of error data. |
| 4242 | * @param[in] blockSize number of samples to process. |
| 4243 | */ |
4506 | 4244 | void arm_lms_norm_q15( |
4507 | 4245 | arm_lms_norm_instance_q15 * S, |
… |
… |
|
4515 | 4253 | /** |
4516 | 4254 | * @brief Initialization function for Q15 normalized LMS filter. |
4517 | | * @param[in] *S points to an instance of the Q15 normalized LMS filter structure. |
4518 | | * @param[in] numTaps number of filter coefficients. |
4519 | | * @param[in] *pCoeffs points to coefficient buffer. |
4520 | | * @param[in] *pState points to state buffer. |
4521 | | * @param[in] mu step size that controls filter coefficient updates. |
4522 | | * @param[in] blockSize number of samples to process. |
4523 | | * @param[in] postShift bit shift applied to coefficients. |
4524 | | * @return none. |
4525 | | */ |
4526 | | |
| 4255 | * @param[in] S points to an instance of the Q15 normalized LMS filter structure. |
| 4256 | * @param[in] numTaps number of filter coefficients. |
| 4257 | * @param[in] pCoeffs points to coefficient buffer. |
| 4258 | * @param[in] pState points to state buffer. |
| 4259 | * @param[in] mu step size that controls filter coefficient updates. |
| 4260 | * @param[in] blockSize number of samples to process. |
| 4261 | * @param[in] postShift bit shift applied to coefficients. |
| 4262 | */ |
4527 | 4263 | void arm_lms_norm_init_q15( |
4528 | 4264 | arm_lms_norm_instance_q15 * S, |
… |
… |
|
4534 | 4270 | uint8_t postShift); |
4535 | 4271 | |
| 4272 | |
4536 | 4273 | /** |
4537 | 4274 | * @brief Correlation of floating-point sequences. |
4538 | | * @param[in] *pSrcA points to the first input sequence. |
4539 | | * @param[in] srcALen length of the first input sequence. |
4540 | | * @param[in] *pSrcB points to the second input sequence. |
4541 | | * @param[in] srcBLen length of the second input sequence. |
4542 | | * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
4543 | | * @return none. |
4544 | | */ |
4545 | | |
| 4275 | * @param[in] pSrcA points to the first input sequence. |
| 4276 | * @param[in] srcALen length of the first input sequence. |
| 4277 | * @param[in] pSrcB points to the second input sequence. |
| 4278 | * @param[in] srcBLen length of the second input sequence. |
| 4279 | * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
| 4280 | */ |
4546 | 4281 | void arm_correlate_f32( |
4547 | 4282 | float32_t * pSrcA, |
… |
… |
|
4554 | 4289 | /** |
4555 | 4290 | * @brief Correlation of Q15 sequences |
4556 | | * @param[in] *pSrcA points to the first input sequence. |
4557 | | * @param[in] srcALen length of the first input sequence. |
4558 | | * @param[in] *pSrcB points to the second input sequence. |
4559 | | * @param[in] srcBLen length of the second input sequence. |
4560 | | * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
4561 | | * @param[in] *pScratch points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
4562 | | * @return none. |
| 4291 | * @param[in] pSrcA points to the first input sequence. |
| 4292 | * @param[in] srcALen length of the first input sequence. |
| 4293 | * @param[in] pSrcB points to the second input sequence. |
| 4294 | * @param[in] srcBLen length of the second input sequence. |
| 4295 | * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
| 4296 | * @param[in] pScratch points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
4563 | 4297 | */ |
4564 | 4298 | void arm_correlate_opt_q15( |
… |
… |
|
4573 | 4307 | /** |
4574 | 4308 | * @brief Correlation of Q15 sequences. |
4575 | | * @param[in] *pSrcA points to the first input sequence. |
4576 | | * @param[in] srcALen length of the first input sequence. |
4577 | | * @param[in] *pSrcB points to the second input sequence. |
4578 | | * @param[in] srcBLen length of the second input sequence. |
4579 | | * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
4580 | | * @return none. |
| 4309 | * @param[in] pSrcA points to the first input sequence. |
| 4310 | * @param[in] srcALen length of the first input sequence. |
| 4311 | * @param[in] pSrcB points to the second input sequence. |
| 4312 | * @param[in] srcBLen length of the second input sequence. |
| 4313 | * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
4581 | 4314 | */ |
4582 | 4315 | |
… |
… |
|
4588 | 4321 | q15_t * pDst); |
4589 | 4322 | |
| 4323 | |
4590 | 4324 | /** |
4591 | 4325 | * @brief Correlation of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4. |
4592 | | * @param[in] *pSrcA points to the first input sequence. |
4593 | | * @param[in] srcALen length of the first input sequence. |
4594 | | * @param[in] *pSrcB points to the second input sequence. |
4595 | | * @param[in] srcBLen length of the second input sequence. |
4596 | | * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
4597 | | * @return none. |
| 4326 | * @param[in] pSrcA points to the first input sequence. |
| 4327 | * @param[in] srcALen length of the first input sequence. |
| 4328 | * @param[in] pSrcB points to the second input sequence. |
| 4329 | * @param[in] srcBLen length of the second input sequence. |
| 4330 | * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
4598 | 4331 | */ |
4599 | 4332 | |
4600 | 4333 | void arm_correlate_fast_q15( |
4601 | | q15_t * pSrcA, |
4602 | | uint32_t srcALen, |
4603 | | q15_t * pSrcB, |
4604 | | uint32_t srcBLen, |
4605 | | q15_t * pDst); |
4606 | | |
| 4334 | q15_t * pSrcA, |
| 4335 | uint32_t srcALen, |
| 4336 | q15_t * pSrcB, |
| 4337 | uint32_t srcBLen, |
| 4338 | q15_t * pDst); |
4607 | 4339 | |
4608 | 4340 | |
4609 | 4341 | /** |
4610 | 4342 | * @brief Correlation of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4. |
4611 | | * @param[in] *pSrcA points to the first input sequence. |
4612 | | * @param[in] srcALen length of the first input sequence. |
4613 | | * @param[in] *pSrcB points to the second input sequence. |
4614 | | * @param[in] srcBLen length of the second input sequence. |
4615 | | * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
4616 | | * @param[in] *pScratch points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
4617 | | * @return none. |
4618 | | */ |
4619 | | |
| 4343 | * @param[in] pSrcA points to the first input sequence. |
| 4344 | * @param[in] srcALen length of the first input sequence. |
| 4345 | * @param[in] pSrcB points to the second input sequence. |
| 4346 | * @param[in] srcBLen length of the second input sequence. |
| 4347 | * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
| 4348 | * @param[in] pScratch points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
| 4349 | */ |
4620 | 4350 | void arm_correlate_fast_opt_q15( |
4621 | 4351 | q15_t * pSrcA, |
… |
… |
|
4626 | 4356 | q15_t * pScratch); |
4627 | 4357 | |
| 4358 | |
4628 | 4359 | /** |
4629 | 4360 | * @brief Correlation of Q31 sequences. |
4630 | | * @param[in] *pSrcA points to the first input sequence. |
4631 | | * @param[in] srcALen length of the first input sequence. |
4632 | | * @param[in] *pSrcB points to the second input sequence. |
4633 | | * @param[in] srcBLen length of the second input sequence. |
4634 | | * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
4635 | | * @return none. |
4636 | | */ |
4637 | | |
| 4361 | * @param[in] pSrcA points to the first input sequence. |
| 4362 | * @param[in] srcALen length of the first input sequence. |
| 4363 | * @param[in] pSrcB points to the second input sequence. |
| 4364 | * @param[in] srcBLen length of the second input sequence. |
| 4365 | * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
| 4366 | */ |
4638 | 4367 | void arm_correlate_q31( |
4639 | 4368 | q31_t * pSrcA, |
… |
… |
|
4643 | 4372 | q31_t * pDst); |
4644 | 4373 | |
| 4374 | |
4645 | 4375 | /** |
4646 | 4376 | * @brief Correlation of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4 |
4647 | | * @param[in] *pSrcA points to the first input sequence. |
4648 | | * @param[in] srcALen length of the first input sequence. |
4649 | | * @param[in] *pSrcB points to the second input sequence. |
4650 | | * @param[in] srcBLen length of the second input sequence. |
4651 | | * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
4652 | | * @return none. |
4653 | | */ |
4654 | | |
| 4377 | * @param[in] pSrcA points to the first input sequence. |
| 4378 | * @param[in] srcALen length of the first input sequence. |
| 4379 | * @param[in] pSrcB points to the second input sequence. |
| 4380 | * @param[in] srcBLen length of the second input sequence. |
| 4381 | * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
| 4382 | */ |
4655 | 4383 | void arm_correlate_fast_q31( |
4656 | 4384 | q31_t * pSrcA, |
… |
… |
|
4661 | 4389 | |
4662 | 4390 | |
4663 | | |
4664 | 4391 | /** |
4665 | 4392 | * @brief Correlation of Q7 sequences. |
4666 | | * @param[in] *pSrcA points to the first input sequence. |
4667 | | * @param[in] srcALen length of the first input sequence. |
4668 | | * @param[in] *pSrcB points to the second input sequence. |
4669 | | * @param[in] srcBLen length of the second input sequence. |
4670 | | * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
4671 | | * @param[in] *pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
4672 | | * @param[in] *pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen). |
4673 | | * @return none. |
4674 | | */ |
4675 | | |
| 4393 | * @param[in] pSrcA points to the first input sequence. |
| 4394 | * @param[in] srcALen length of the first input sequence. |
| 4395 | * @param[in] pSrcB points to the second input sequence. |
| 4396 | * @param[in] srcBLen length of the second input sequence. |
| 4397 | * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
| 4398 | * @param[in] pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
| 4399 | * @param[in] pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen). |
| 4400 | */ |
4676 | 4401 | void arm_correlate_opt_q7( |
4677 | 4402 | q7_t * pSrcA, |
… |
… |
|
4686 | 4411 | /** |
4687 | 4412 | * @brief Correlation of Q7 sequences. |
4688 | | * @param[in] *pSrcA points to the first input sequence. |
4689 | | * @param[in] srcALen length of the first input sequence. |
4690 | | * @param[in] *pSrcB points to the second input sequence. |
4691 | | * @param[in] srcBLen length of the second input sequence. |
4692 | | * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
4693 | | * @return none. |
4694 | | */ |
4695 | | |
| 4413 | * @param[in] pSrcA points to the first input sequence. |
| 4414 | * @param[in] srcALen length of the first input sequence. |
| 4415 | * @param[in] pSrcB points to the second input sequence. |
| 4416 | * @param[in] srcBLen length of the second input sequence. |
| 4417 | * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1. |
| 4418 | */ |
4696 | 4419 | void arm_correlate_q7( |
4697 | 4420 | q7_t * pSrcA, |
… |
… |
|
4718 | 4441 | * @brief Instance structure for the Q31 sparse FIR filter. |
4719 | 4442 | */ |
4720 | | |
4721 | 4443 | typedef struct |
4722 | 4444 | { |
… |
… |
|
4732 | 4454 | * @brief Instance structure for the Q15 sparse FIR filter. |
4733 | 4455 | */ |
4734 | | |
4735 | 4456 | typedef struct |
4736 | 4457 | { |
… |
… |
|
4746 | 4467 | * @brief Instance structure for the Q7 sparse FIR filter. |
4747 | 4468 | */ |
4748 | | |
4749 | 4469 | typedef struct |
4750 | 4470 | { |
… |
… |
|
4757 | 4477 | } arm_fir_sparse_instance_q7; |
4758 | 4478 | |
| 4479 | |
4759 | 4480 | /** |
4760 | 4481 | * @brief Processing function for the floating-point sparse FIR filter. |
4761 | | * @param[in] *S points to an instance of the floating-point sparse FIR structure. |
4762 | | * @param[in] *pSrc points to the block of input data. |
4763 | | * @param[out] *pDst points to the block of output data |
4764 | | * @param[in] *pScratchIn points to a temporary buffer of size blockSize. |
| 4482 | * @param[in] S points to an instance of the floating-point sparse FIR structure. |
| 4483 | * @param[in] pSrc points to the block of input data. |
| 4484 | * @param[out] pDst points to the block of output data |
| 4485 | * @param[in] pScratchIn points to a temporary buffer of size blockSize. |
4765 | 4486 | * @param[in] blockSize number of input samples to process per call. |
4766 | | * @return none. |
4767 | | */ |
4768 | | |
| 4487 | */ |
4769 | 4488 | void arm_fir_sparse_f32( |
4770 | 4489 | arm_fir_sparse_instance_f32 * S, |
… |
… |
|
4774 | 4493 | uint32_t blockSize); |
4775 | 4494 | |
| 4495 | |
4776 | 4496 | /** |
4777 | 4497 | * @brief Initialization function for the floating-point sparse FIR filter. |
4778 | | * @param[in,out] *S points to an instance of the floating-point sparse FIR structure. |
| 4498 | * @param[in,out] S points to an instance of the floating-point sparse FIR structure. |
4779 | 4499 | * @param[in] numTaps number of nonzero coefficients in the filter. |
4780 | | * @param[in] *pCoeffs points to the array of filter coefficients. |
4781 | | * @param[in] *pState points to the state buffer. |
4782 | | * @param[in] *pTapDelay points to the array of offset times. |
| 4500 | * @param[in] pCoeffs points to the array of filter coefficients. |
| 4501 | * @param[in] pState points to the state buffer. |
| 4502 | * @param[in] pTapDelay points to the array of offset times. |
4783 | 4503 | * @param[in] maxDelay maximum offset time supported. |
4784 | 4504 | * @param[in] blockSize number of samples that will be processed per block. |
4785 | | * @return none |
4786 | | */ |
4787 | | |
| 4505 | */ |
4788 | 4506 | void arm_fir_sparse_init_f32( |
4789 | 4507 | arm_fir_sparse_instance_f32 * S, |
… |
… |
|
4795 | 4513 | uint32_t blockSize); |
4796 | 4514 | |
| 4515 | |
4797 | 4516 | /** |
4798 | 4517 | * @brief Processing function for the Q31 sparse FIR filter. |
4799 | | * @param[in] *S points to an instance of the Q31 sparse FIR structure. |
4800 | | * @param[in] *pSrc points to the block of input data. |
4801 | | * @param[out] *pDst points to the block of output data |
4802 | | * @param[in] *pScratchIn points to a temporary buffer of size blockSize. |
| 4518 | * @param[in] S points to an instance of the Q31 sparse FIR structure. |
| 4519 | * @param[in] pSrc points to the block of input data. |
| 4520 | * @param[out] pDst points to the block of output data |
| 4521 | * @param[in] pScratchIn points to a temporary buffer of size blockSize. |
4803 | 4522 | * @param[in] blockSize number of input samples to process per call. |
4804 | | * @return none. |
4805 | | */ |
4806 | | |
| 4523 | */ |
4807 | 4524 | void arm_fir_sparse_q31( |
4808 | 4525 | arm_fir_sparse_instance_q31 * S, |
… |
… |
|
4812 | 4529 | uint32_t blockSize); |
4813 | 4530 | |
| 4531 | |
4814 | 4532 | /** |
4815 | 4533 | * @brief Initialization function for the Q31 sparse FIR filter. |
4816 | | * @param[in,out] *S points to an instance of the Q31 sparse FIR structure. |
| 4534 | * @param[in,out] S points to an instance of the Q31 sparse FIR structure. |
4817 | 4535 | * @param[in] numTaps number of nonzero coefficients in the filter. |
4818 | | * @param[in] *pCoeffs points to the array of filter coefficients. |
4819 | | * @param[in] *pState points to the state buffer. |
4820 | | * @param[in] *pTapDelay points to the array of offset times. |
| 4536 | * @param[in] pCoeffs points to the array of filter coefficients. |
| 4537 | * @param[in] pState points to the state buffer. |
| 4538 | * @param[in] pTapDelay points to the array of offset times. |
4821 | 4539 | * @param[in] maxDelay maximum offset time supported. |
4822 | 4540 | * @param[in] blockSize number of samples that will be processed per block. |
4823 | | * @return none |
4824 | | */ |
4825 | | |
| 4541 | */ |
4826 | 4542 | void arm_fir_sparse_init_q31( |
4827 | 4543 | arm_fir_sparse_instance_q31 * S, |
… |
… |
|
4833 | 4549 | uint32_t blockSize); |
4834 | 4550 | |
| 4551 | |
4835 | 4552 | /** |
4836 | 4553 | * @brief Processing function for the Q15 sparse FIR filter. |
4837 | | * @param[in] *S points to an instance of the Q15 sparse FIR structure. |
4838 | | * @param[in] *pSrc points to the block of input data. |
4839 | | * @param[out] *pDst points to the block of output data |
4840 | | * @param[in] *pScratchIn points to a temporary buffer of size blockSize. |
4841 | | * @param[in] *pScratchOut points to a temporary buffer of size blockSize. |
| 4554 | * @param[in] S points to an instance of the Q15 sparse FIR structure. |
| 4555 | * @param[in] pSrc points to the block of input data. |
| 4556 | * @param[out] pDst points to the block of output data |
| 4557 | * @param[in] pScratchIn points to a temporary buffer of size blockSize. |
| 4558 | * @param[in] pScratchOut points to a temporary buffer of size blockSize. |
4842 | 4559 | * @param[in] blockSize number of input samples to process per call. |
4843 | | * @return none. |
4844 | | */ |
4845 | | |
| 4560 | */ |
4846 | 4561 | void arm_fir_sparse_q15( |
4847 | 4562 | arm_fir_sparse_instance_q15 * S, |
… |
… |
|
4855 | 4570 | /** |
4856 | 4571 | * @brief Initialization function for the Q15 sparse FIR filter. |
4857 | | * @param[in,out] *S points to an instance of the Q15 sparse FIR structure. |
| 4572 | * @param[in,out] S points to an instance of the Q15 sparse FIR structure. |
4858 | 4573 | * @param[in] numTaps number of nonzero coefficients in the filter. |
4859 | | * @param[in] *pCoeffs points to the array of filter coefficients. |
4860 | | * @param[in] *pState points to the state buffer. |
4861 | | * @param[in] *pTapDelay points to the array of offset times. |
| 4574 | * @param[in] pCoeffs points to the array of filter coefficients. |
| 4575 | * @param[in] pState points to the state buffer. |
| 4576 | * @param[in] pTapDelay points to the array of offset times. |
4862 | 4577 | * @param[in] maxDelay maximum offset time supported. |
4863 | 4578 | * @param[in] blockSize number of samples that will be processed per block. |
4864 | | * @return none |
4865 | | */ |
4866 | | |
| 4579 | */ |
4867 | 4580 | void arm_fir_sparse_init_q15( |
4868 | 4581 | arm_fir_sparse_instance_q15 * S, |
… |
… |
|
4874 | 4587 | uint32_t blockSize); |
4875 | 4588 | |
| 4589 | |
4876 | 4590 | /** |
4877 | 4591 | * @brief Processing function for the Q7 sparse FIR filter. |
4878 | | * @param[in] *S points to an instance of the Q7 sparse FIR structure. |
4879 | | * @param[in] *pSrc points to the block of input data. |
4880 | | * @param[out] *pDst points to the block of output data |
4881 | | * @param[in] *pScratchIn points to a temporary buffer of size blockSize. |
4882 | | * @param[in] *pScratchOut points to a temporary buffer of size blockSize. |
| 4592 | * @param[in] S points to an instance of the Q7 sparse FIR structure. |