1
0
Fork 0
forked from len0rd/rockbox

FFT Plugin: Revamp the main code to rid it of 64-bit math. Use 32-bit kiss_fft_scalar because 16-bit integers are generally a poor choice for computation on-target. Simplify display code to speed it up. Add logarithmic frequency display (need keymappings, guessed on some). On dual-core, perform FFT on COP. Add some support function to fixedpoint.c. ... and stuff.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26470 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2010-06-02 08:34:10 +00:00
parent bbe6c5a5e2
commit 30e2f42c82
6 changed files with 999 additions and 788 deletions

File diff suppressed because it is too large Load diff

View file

@ -18,10 +18,10 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
fixed or floating point complex numbers. It also delares the kf_ internal functions.
*/
static kiss_fft_cpx *scratchbuf=NULL;
static size_t nscratchbuf=0;
static kiss_fft_cpx *tmpbuf=NULL;
static size_t ntmpbuf=0;
static kiss_fft_cpx *scratchbuf SHAREDBSS_ATTR = NULL;
static size_t nscratchbuf SHAREDBSS_ATTR = 0;
static kiss_fft_cpx *tmpbuf SHAREDBSS_ATTR = NULL;
static size_t ntmpbuf SHAREDBSS_ATTR = 0;
#define CHECKBUF(buf,nbuf,n) \
do { \

View file

@ -31,7 +31,7 @@ extern "C" {
#ifdef FIXED_POINT
#include <inttypes.h>
# if (FIXED_POINT == 32)
# if 1 /* 16-bit data is _slow_ on devices (FIXED_POINT == 32) */
# define kiss_fft_scalar int32_t
# else
# define kiss_fft_scalar int16_t

View file

@ -48,12 +48,11 @@ kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem,size_t * lenme
for (i = 0; i < nfft/2; ++i) {
/*double phase =
-3.14159265358979323846264338327 * ((double) (i+1) / nfft + .5);*/
if (inverse_fft)
{
if (inverse_fft) {
DEBUGF("Inverse FFT not implemented!"); /*phase *= -1;*/
}
}
kf_cexp_round (st->super_twiddles+i, i+1, nfft);
kf_cexp_round (st->super_twiddles+i, i+1, nfft);
}
return st;
}