14

Which DSP library in C/C++ would you recommend? I will need it for real-time embedded systems. It'd be great to have sound signal processing accompany too, but not a mandatory. If you have knowledge of any DSP library, please kindly share.

BЈовић
  • 57,268
  • 38
  • 158
  • 253
Viet
  • 16,604
  • 31
  • 94
  • 134
  • Should it be open source, free or not? What processor do you use? – Kirill V. Lyadvinsky Nov 19 '09 at 07:01
  • Open source is not mandatory but good to have. We are thinking of AVR, ARM and even some middle range chips. Thanks for your reply. – Viet Nov 20 '09 at 16:28
  • Given the parts you mentioned, you may want to tag this "embedded" but you have used your tag quota, so I'll leave it to you to retag. I suggest that you don't need "DSP" and "digital-signal-processing" – Clifford Nov 23 '09 at 21:13
  • No point down-voting the question that was raised 8 years ago. It benefited many. Stop vandalism! – Viet Aug 11 '17 at 05:43

3 Answers3

8

We are thinking of AVR, ARM and even some middle range chips

Neither are particularly designed for DSP, but if your performance requirements are modest enough that may not be a problem. What do you need the DSP to do? I suggest that you choose your platform first and use the vendor's library since that will be optimised for the platform. If the vendor does not have a DSP library, then the part may not be a good DSP platform.

For example Microchip's dsPIC devices are microcontrollers with a DSP subsystem that gives good performance per MHz for DSP algorithms such as FIR and FFT, and Microchip provide a DSP library optimised for the part.

ST provide a DSP library for their STM32 parts. These are Cortex M3 devices rather than DSP, but the Harvard architecture and multiply-accumulate instruction make them capable enough in low-end applications such as motor control or speech-band audio processing. Technically since the DSP library is provided as source-code, it would probably port to any Thumb-2 instruction set device, but may not be licensed for such use. While at the same operating frequency these are considerably slower than dsPIC at DSP algorithms (when using optimised assembler libraries), they are faster in general at C code execution, but your mileage may vary, depending on the code and application.

Similarly Atmel provide a DSP library for their AVR32. I have no direct experience of this, but would expect comparable performance to a Cortex m3 device. Significantly perhaps, Atmel's library is far more extensive, and better documented that ST's.

If you want something faster that is not a pure DSP, consider Renesas's SH-2 devices, at an astonishing 2 MIPS per MHz, in many applications not being a dedicated DSP is not an issue, and some parts do have DSP extensions in any case. Again the vendor provides an optimised DSP library.

Other than these 'general-purpose-with-DSP-capability' devices, you might of course opt for a real DSP. TI produce a wide range of such devices from low-end to high. In my experience however, the development costs are high due to TI's high fees for its dev-tools, and many parts are a bit light on on-chip peripherals.

[UPDATE 23 Apri l2012] New STM32F4xx parts are Cortex-M4 based so include DSP and floating-point hardware. They have the same DSP library API as Cortex-M3 base STM32F1xx/F2xx parts but make use of the DSP core for better performance.

Clifford
  • 76,825
  • 12
  • 79
  • 145
  • These are not libraries. But a pitiful set of functions. ARM DSP lib is also too bad to use it. An example of good lib is http://aquila-dsp.org/ but you need a powerful core and powerful modern compiler to run it. – kyb Apr 03 '17 at 14:20
  • @kyb : If you have a suggestion, then you should post an answer. Clearly a library is "a set of functions" (pitiful or otherwise), I am not sure the statement of opinion is helpful or appropriate. Moreover eight years on, I am sure I too would give different advice! The site you linked to did not even exist when the question was asked. In fact today the question would almost certainly be closed as off topic. – Clifford Apr 03 '17 at 14:48
2

As Kirill said it depends on your requirements and platform.

For intel based machines Intel's Performance Primitives are brilliant. Fairly cheap too.

Goz
  • 58,120
  • 22
  • 114
  • 192
1

You can use Aquila, it's small and easy to use.

Aquila DSP Library

Arnab
  • 19
  • 1