Bug 113527 - Add a FFT implementation using kissfft in FFTFrame
Summary: Add a FFT implementation using kissfft in FFTFrame
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: 528+ (Nightly build)
Hardware: Android Android
: P4 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-28 12:17 PDT by Alex KUOCH
Modified: 2013-04-05 10:18 PDT (History)
4 users (show)

See Also:


Attachments
Patch (19.65 KB, patch)
2013-04-04 13:05 PDT, Alex KUOCH
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex KUOCH 2013-03-28 12:17:55 PDT
This is the first step to enable WebAudio on Android.
Adding an extra FFT implementation using kissfft in FFTFrame.
The kissfft patch code could be found under :
https://www.codeaurora.org/patches/quic/webtech/1602-kissfft-add-neon-optimized-routines.patch

Expected results:
This change should be seamless as used specifically for Android OS
Comment 1 Raymond Toy 2013-04-02 11:04:29 PDT
(In reply to comment #0)
> This is the first step to enable WebAudio on Android.
> Adding an extra FFT implementation using kissfft in FFTFrame.
> The kissfft patch code could be found under :
> https://www.codeaurora.org/patches/quic/webtech/1602-kissfft-add-neon-optimized-routines.patch
> 
> Expected results:
> This change should be seamless as used specifically for Android OS

Thanks for the link and patch.  I ran some tests using your KissFFT implementation on a Galaxy Nexus phone and compared the results with https://code.google.com/p/webrtc/source/browse#svn%2Fdeps%2Fthird_party%2Fopenmax.

My tests show that KissFFT runs about half as the OpenMAX implementation.
Comment 2 Alex KUOCH 2013-04-03 07:09:31 PDT
(In reply to comment #1)

Thx for the feedback, could you detail "runs about half as" . Do you mean slower or faster ? 

Thx

Alex

> (In reply to comment #0)
> > This is the first step to enable WebAudio on Android.
> > Adding an extra FFT implementation using kissfft in FFTFrame.
> > The kissfft patch code could be found under :
> > https://www.codeaurora.org/patches/quic/webtech/1602-kissfft-add-neon-optimized-routines.patch
> > 
> > Expected results:
> > This change should be seamless as used specifically for Android OS
> 
> Thanks for the link and patch.  I ran some tests using your KissFFT implementation on a Galaxy Nexus phone and compared the results with https://code.google.com/p/webrtc/source/browse#svn%2Fdeps%2Fthird_party%2Fopenmax.
> 
> My tests show that KissFFT runs about half as the OpenMAX implementation.
Comment 3 Raymond Toy 2013-04-03 09:44:35 PDT
(In reply to comment #2)
> (In reply to comment #1)
> 
> Thx for the feedback, could you detail "runs about half as" . Do you mean slower or faster ?

Sorry, that confuses me too.  To be concrete, a 1024-point complex float FFT takes 190 us with KissFFT and 89.8 us with OpenMAX on a Galaxy Nexus phone.  The ratio of KissFFT times to OpenMAX times is roughly 2 for all the orders I tried.  If the KissFFT times don't make sense to you, please let me know.  Perhaps I made a mistake in compiling it.


> 
> Thx
> 
> Alex
> 
> > (In reply to comment #0)
> > > This is the first step to enable WebAudio on Android.
> > > Adding an extra FFT implementation using kissfft in FFTFrame.
> > > The kissfft patch code could be found under :
> > > https://www.codeaurora.org/patches/quic/webtech/1602-kissfft-add-neon-optimized-routines.patch
> > > 
> > > Expected results:
> > > This change should be seamless as used specifically for Android OS
> > 
> > Thanks for the link and patch.  I ran some tests using your KissFFT implementation on a Galaxy Nexus phone and compared the results with https://code.google.com/p/webrtc/source/browse#svn%2Fdeps%2Fthird_party%2Fopenmax.
> > 
> > My tests show that KissFFT runs about half as the OpenMAX implementation.
Comment 4 Alex KUOCH 2013-04-03 14:01:22 PDT
(In reply to comment #3)

Could you confirm that those numbers had the NEON flag enabled ?
Also, the performance of the FFT was not a concern in this case as I needed the functionality which was not available at the time I started this work. SO I don't have currently accurate numbers as you do. I really appreciate your feedback on the performance.

> (In reply to comment #2)
> > (In reply to comment #1)
> > 
> > Thx for the feedback, could you detail "runs about half as" . Do you mean slower or faster ?
> 
> Sorry, that confuses me too.  To be concrete, a 1024-point complex float FFT takes 190 us with KissFFT and 89.8 us with OpenMAX on a Galaxy Nexus phone.  The ratio of KissFFT times to OpenMAX times is roughly 2 for all the orders I tried.  If the KissFFT times don't make sense to you, please let me know.  Perhaps I made a mistake in compiling it.
> 
> 
> > 
> > Thx
> > 
> > Alex
> > 
> > > (In reply to comment #0)
> > > > This is the first step to enable WebAudio on Android.
> > > > Adding an extra FFT implementation using kissfft in FFTFrame.
> > > > The kissfft patch code could be found under :
> > > > https://www.codeaurora.org/patches/quic/webtech/1602-kissfft-add-neon-optimized-routines.patch
> > > > 
> > > > Expected results:
> > > > This change should be seamless as used specifically for Android OS
> > > 
> > > Thanks for the link and patch.  I ran some tests using your KissFFT implementation on a Galaxy Nexus phone and compared the results with https://code.google.com/p/webrtc/source/browse#svn%2Fdeps%2Fthird_party%2Fopenmax.
> > > 
> > > My tests show that KissFFT runs about half as the OpenMAX implementation.
Comment 5 Raymond Toy 2013-04-03 16:04:42 PDT
(In reply to comment #4)
> (In reply to comment #3)
> 
> Could you confirm that those numbers had the NEON flag enabled ?

The build had -mfpu=neon and -D__ARM_HAVE_NEON.  

> Also, the performance of the FFT was not a concern in this case as I needed the functionality which was not available at the time I started this work. SO I don't have currently accurate numbers as you do. I really appreciate your feedback on the performance.

Thanks for the info.

> 
> > (In reply to comment #2)
> > > (In reply to comment #1)
> > > 
> > > Thx for the feedback, could you detail "runs about half as" . Do you mean slower or faster ?
> > 
> > Sorry, that confuses me too.  To be concrete, a 1024-point complex float FFT takes 190 us with KissFFT and 89.8 us with OpenMAX on a Galaxy Nexus phone.  The ratio of KissFFT times to OpenMAX times is roughly 2 for all the orders I tried.  If the KissFFT times don't make sense to you, please let me know.  Perhaps I made a mistake in compiling it.
> > 
> > 
> > > 
> > > Thx
> > > 
> > > Alex
> > > 
> > > > (In reply to comment #0)
> > > > > This is the first step to enable WebAudio on Android.
> > > > > Adding an extra FFT implementation using kissfft in FFTFrame.
> > > > > The kissfft patch code could be found under :
> > > > > https://www.codeaurora.org/patches/quic/webtech/1602-kissfft-add-neon-optimized-routines.patch
> > > > > 
> > > > > Expected results:
> > > > > This change should be seamless as used specifically for Android OS
> > > > 
> > > > Thanks for the link and patch.  I ran some tests using your KissFFT implementation on a Galaxy Nexus phone and compared the results with https://code.google.com/p/webrtc/source/browse#svn%2Fdeps%2Fthird_party%2Fopenmax.
> > > > 
> > > > My tests show that KissFFT runs about half as the OpenMAX implementation.
Comment 6 Alex KUOCH 2013-04-04 13:05:38 PDT
Created attachment 196509 [details]
Patch
Comment 7 Raymond Toy 2013-04-05 09:15:58 PDT
(In reply to comment #6)
> Created an attachment (id=196509) [details]
> Patch

Given that https://bugs.webkit.org/show_bug.cgi?id=109755 has landed, will that work for you instead of using KissFFT?
Comment 8 Alex KUOCH 2013-04-05 10:06:11 PDT
Yes definitively,

Thx for for the patch.

(In reply to comment #7)
> (In reply to comment #6)
> > Created an attachment (id=196509) [details] [details]
> > Patch
> 
> Given that https://bugs.webkit.org/show_bug.cgi?id=109755 has landed, will that work for you instead of using KissFFT?
Comment 9 Raymond Toy 2013-04-05 10:08:38 PDT
(In reply to comment #8)
> Yes definitively,

Great!  Closing this bug, then.

> 
> Thx for for the patch.
> 
> (In reply to comment #7)
> > (In reply to comment #6)
> > > Created an attachment (id=196509) [details] [details] [details]
> > > Patch
> > 
> > Given that https://bugs.webkit.org/show_bug.cgi?id=109755 has landed, will that work for you instead of using KissFFT?
Comment 10 Alexey Proskuryakov 2013-04-05 10:12:33 PDT
Comment on attachment 196509 [details]
Patch

Clearing review flag in a resolved bug.