3

Are there any Android's API's, that implement the Fourier Transform using the device's DSP? Or are there any API's that permit using the device's DSP?

Thanks.

rcs
  • 67,191
  • 22
  • 172
  • 153
Chris
  • 327
  • 2
  • 6
  • 22
  • Check this post: http://stackoverflow.com/questions/4885578/fast-fourier-transformation-in-java Hope it can help you! – Dimitris Makris Sep 01 '11 at 10:34
  • Hello Dimitris thank for your response, but the problem it's not the FFT implementation, the problem is the way of this implementation. I can't consume cpu time with FFT calculation. I don't know how is the JTransform's consumption, but maybe I can use it. Thanks – Chris Sep 01 '11 at 11:20

4 Answers4

3

No, there is no public API for performing hardware accelerated FFT.

You can optimize native code by targeting the armeabi-v7a ABI in order to use the FPU. That's very useful for floating point FFT.

See CPU-ARCH-ABIS in the docs/ directory of the Android NDK.

olivierg
  • 10,200
  • 4
  • 30
  • 33
2

Sorry this is a bit late, but if you want to calculate the Fourier transform in Android for a real or complex number you are better off using either jTransfrom or libgdx.FFT. libgdx uses KissFFT backend, not quite sure what jTransform uses.

Check out this example on how to implement libgdx:

http://www.digiphd.com/android-java-simple-fft-libgdx/

Hope this helps.

digiphd
  • 2,319
  • 3
  • 23
  • 22
1

Firstly, not all devices have a DSP. Most in fact just have a CPU and GPU.

As of today, you probably can't really do what you want without a custom ROM/firmware. The good news is that they are working on it. Look at Renderscript which is available starting with Honeycomb. It currently only runs on CPUs (though it can use multiple cores), but the plan is for a future release to allow execution on the GPU (and maybe DSP) as well, with little-to-no code changes on your part. See this post for more info.

Joel F
  • 2,591
  • 1
  • 19
  • 17
0

Visualiyer is said to be able to export FFT from audio playing :

http://developer.android.com/reference/android/media/audiofx/Visualizer.html

but it is certainly not that what you like.

Konstantin Pribluda
  • 12,329
  • 1
  • 30
  • 35
  • Hello Konstantin, thanks for your quickly response, but I need the data of teh Fourier Transform, so I need calculate it. I could implements the FFT on a native code, but, I'll consume a lot CPU. If I could to access to device's DSP, I'll free the CPU of the FFT calculation. – Chris Sep 01 '11 at 11:09
  • I doubt that there is exposed API to do this. – Konstantin Pribluda Sep 01 '11 at 12:12