demantz / RFAnalyzer

Spectrum Analyzer for Android using the HackRF
GNU General Public License v2.0
853 stars 206 forks source link

To enhance performance by change Java FFTs to native FFTs #41

Open james34602 opened 7 years ago

james34602 commented 7 years ago

My experience tell that use a high performance native FFT libraries will grant performance. The following repository is my experiment on two different microphone/custom signal source audio spectrum analyzer application in Android, both use native method to perform FFT, one of them use native to perform extra audio filtering, especially repository one have significant performance gain from change KissFFT to Ne10 FFT. My concern is slow FFT will use more CPU cycle to perform calculations, hence drain battery faster.

  1. https://github.com/james34602/AudioAnalyzer
  2. https://github.com/james34602/audio-analyzer-for-android Compile tested and confirm worked on armeabi-v7a(with NEON/without NEON) and x86 platform.
aneitzel commented 7 years ago

Hi,

sounds good! Is a android APK avialable for download?

2016-10-19 8:54 GMT+02:00 James Fung notifications@github.com:

My experience tell that use a high performance native FFT libraries will grant performance. The following repository is my experiment on two different microphone/custom signal source audio spectrum analyzer application in Android, both use native method to perform FFT, one of them use native to perform extra audio filtering, especially repository one have significant performance gain from change KissFFT to Ne10 FFT. My concern is slow FFT will use more CPU cycle to perform calculations, hence drain battery faster.

  1. https://github.com/james34602/AudioAnalyzer
  2. https://github.com/james34602/audio-analyzer-for-android Compile tested and confirm worked on armeabi-v7a(with NEON/without) and x86 platform.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/demantz/RFAnalyzer/issues/41, or mute the thread https://github.com/notifications/unsubscribe-auth/AJXimBjYsQBIFh7aRIqc5a7BQQu1of4Vks5q1b6wgaJpZM4Kan0P .

james34602 commented 7 years ago

Yeah, I uploaded it, all of it contain armeabi-v7a and x86 libs

  1. https://github.com/james34602/AudioAnalyzer/releases
  2. https://github.com/james34602/audio-analyzer-for-android/releases
pavlus commented 7 years ago

Actually, there is a project by Dennis Mantz to implement DSP on RenderScript (https://github.com/demantz/android_dsp_lib), which may increase perfromance even more than native libraries, but it currently doesn't support FFT and Dennis thinks it's not ready to be built into RF Analyzer yet (https://github.com/demantz/android_dsp_lib/issues/1#issuecomment-68638074). I'm going to work on FFT and some more filters support with it in my fork, when I'm done with HiQSDR support and reworked pipeline for decimation-demodulation.

james34602 commented 7 years ago

I hope to see FFT using RenderScript. Graphic display using RS is great, but use it as 'standard' computation, which performance gain maybe controversy and device depend. But I will try to modify RFAnalyzer into native FFT calculation.

pavlus commented 7 years ago

yes, that's why i'm trying to rewrite current code to be more independent from other parts, I hope, I'll be able to to maximally "pluginize" app, so user just could install library on their phone and new options appear (I'd like things like opengl renderer, different realizations of dsp, user filters, demodulators, decoders, etc), so user could just install your lib, go to settings and select newly appeared"Native FFT"