07-16-2012, 04:10 PM | #16 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
[root@kindle sound]# ./ffttest-arm
Testing a 64-point FFT. 1:1 mapping; no reorder required. SNR: 14167370.493333 (71.512893 dB) Mean energy in: 0.989857 out_test: 0.989554 out_ref: 0.989579 Timing FFT speed... 8.90 us per 64-point FFT, or 14.39 Mbps with QPSK, or 30.75 insns per point on a 220MHz SA-1100. Yeah baby. happy days. Ill post a how-to once I test it out |
07-16-2012, 04:19 PM | #17 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Also noted for the future:
http://www.nr.com/public-domain.html Public Domain Software In general, the Numerical Recipes routines are NOT in the public domain, and are NOT available for use without a valid license. However, a few small parts of Numerical Recipes have been put into the public domain. These can be freely copied and redistributed: Utility files for C: * nrutil.c * nrutil.h * complex.c * complex.h Wavelet routines in C: * wt1.c * daub4.c * pwt.c * pwtset.c * wtn.c |
Advert | |
|
07-16-2012, 04:21 PM | #18 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Hmm.
bash-4.1$ arm-none-linux-gnueabi-gcc -O3 -march=armv6j -mtune=arm1136jf-s -mfpu=vfp -fomit-frame-pointer -o ffttest-arm radix4fft.c testfft.c testmain.c -lm Any way to squeeze a bit more performance out of that in terms of compilation? *Goes and googles things.* Well -03 from http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html looks to be as good as it gets - I vaguely recall someone posting a nice set of args but that could have been for the K5. Cheers. Last edited by twobob; 07-16-2012 at 04:46 PM. Reason: added resolution |
07-16-2012, 04:32 PM | #19 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
|
|
07-16-2012, 04:38 PM | #20 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
|
Advert | |
|
07-16-2012, 04:55 PM | #21 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Okay so some perfomance feedback.
Using my current Load test program [root@kindle sound]# ./Balsamic noise.wav Spoiler:
I get results: Before and after load applied during results Ill format in a bit Spoiler:
I thought it would be worse... Last edited by twobob; 07-16-2012 at 04:57 PM. Reason: ADDED LOAD START |
07-16-2012, 05:42 PM | #22 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Now you need to DISPLAY that FFT on the screen. Where is the spectrographic waterfall display?
Last edited by geekmaster; 07-16-2012 at 06:24 PM. |
07-16-2012, 06:07 PM | #23 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
The ones above should be a "one size fits all" set, executable by all. Question: Are you running that under the emulator I posted or on the real hardware? Question: GCC does not generate mixed 32/16 bit code for arm by default, have you tried enabling mixed code generation (thumb)? Note: the K3 only does thumb, the K4&K5 does thumb-2 Question: Do you want me to post the armv7l (K4/K5) emulator along with the armv6l that is already posted? |
|
07-16-2012, 06:19 PM | #24 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Extract the code to generate the lookup tables, write them (the tables) to disk. Then just mmap them in when needed since they are constant data. If that helps, then let me know, I will lookup the objcopy magic-foo to turn the binary tables into an elf-object that you can link into the code section of the program. Bad idea, seems that bin2c is the currently recommended way. ****** Viral Warning ******* That code carries the GPL virus. The other code I suggested is BSD licensed. Last edited by knc1; 07-16-2012 at 06:45 PM. |
|
07-16-2012, 08:39 PM | #25 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
bin2c
Attached, source and static-arm build of bin2c.
If I type any more in this post, the post will be longer than the source code. Build notes: Code:
(armv6l:1) /home # gcc --static --static-libgcc -O2 -o bin2c bin2c.c (armv6l:1) /home # ldd bin2c not a dynamic executable (armv6l:1) /home # strip --strip-unneeded bin2c (armv6l:1) /home # tar -czf bin2c-static-arm.tar.gz bin2c bin2c.c |
07-16-2012, 08:45 PM | #26 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Regarding gcc optimization, I read a report awhile back about an automated test that tried to find the best combination of gcc options to get the best optimization (by analyzing code build time, code size, and code speed), and the surprising results were that MOST of the optimization options did absolutely NOTHING (no changes to generated code). In the end after all that study, they recommended just using -O3, as I recall.
Of course, that was for x86 code, so gcc code generation for other architectures may vary. That test was also version-specific, and things may have changed since then. The main point was to not expect much performance gain from most of the optimization settings available in gcc (in that particular test environment). Also, the ARM FPU is not noted for speed, so integer math may outperform it in some cases. Vector processing looks interesting though (and there are nice co-processors in the i.MX508 used in the K4/K5 that could help as well). Last edited by geekmaster; 07-16-2012 at 09:13 PM. |
07-16-2012, 09:21 PM | #27 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Both -O3 and -Os where larger. Might have been different if I fiddled with the options, but did not feel the cost/benefit was worth the effort on something a person uses twice a decade. |
|
07-16-2012, 10:04 PM | #28 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
I concur about the GPL. I'll see if I can grab/implement something else then. It was as much the actual implementation of something that works (rather than theoretical ports) that attracted me. Looking at something end - to - end may give me inspiration / education - to get the other ports done.
I have no less than 10 different - not - quite - working - implementations to sift through and analyse - this was a nice solution to shove some numbers in for now. If the GPL becomes an issue then sobeit. Worst ways I will contact the author and see what shakes after a decade. *notes drool on keyboard* - note to self - remember to go to bed before passing out. Thanks for the feedback guys. and the tool. Much appreciated. bedtime Last edited by twobob; 07-16-2012 at 10:06 PM. |
07-16-2012, 10:13 PM | #29 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
One working should make the others easier to understand. We don't want to lose track that the original Ardino code was for both fft and ifft. If we are going to have that 64 band equalizer on our Kindles, we will need both. Or many other special effects that can be done on the fft before being put back into the time domain with the ifft. Like voice disguising, so we can make crank calls over VoIP on our e-book. One of the (late in the day) references mentions that ifft only differs in the sign of e - meaning the fft only needs one more lookup table to get an ifft out of it. When I wake up tomorrow, will see if I can spot that reference again. |
|
07-16-2012, 10:27 PM | #30 | |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
README:
Quote:
"Want an inverse FFT ? If you look closely at the formula for the FFT, you'll see that the only difference between an FFT and its inverse is the sign in the exponent of e. This means that *by reordering the output alone* you can turn an FFT into its inverse. Again, it's been over three years since I wrote this code, but have a look at TransTable in testmain.c for more hints. My gut feeling is that you need the "In-place IFFT table". thanks M. Yeah that was pretty much my thought process - look for the gaps to get the more relevant code happening. The very dark room is made considerably brighter by even the dimmest of lights. Have a great night |
|
Tags |
code, future, kindle |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
QR code for MR | Donnageddon | Lounge | 81 | 10-04-2011 06:28 PM |
Some code help | Gray Eminence | Sigil | 3 | 12-31-2010 09:18 AM |
Let's create a source code repository for DR 800 related code? | jraf | iRex | 3 | 03-11-2010 12:26 PM |
Some help with code | Crusader | ePub | 5 | 01-01-2010 10:23 PM |
Hi all — and see the code | sigizmund | Introduce Yourself | 2 | 12-18-2009 02:53 AM |