summaryrefslogtreecommitdiff
path: root/apps/codecs/libspeex/fftwrap.c
diff options
context:
space:
mode:
authorDan Everton <dan@iocaine.org>2007-02-10 11:44:26 +0000
committerDan Everton <dan@iocaine.org>2007-02-10 11:44:26 +0000
commit7bf62e8da66ca8ff0acc2702f92ea4fe06eb94b1 (patch)
treec9db4558a73ae3094839c4655fa0b8ebc2231c56 /apps/codecs/libspeex/fftwrap.c
parent51587512635a8b19e6a5f19a20074d0d4d1f17da (diff)
downloadrockbox-7bf62e8da66ca8ff0acc2702f92ea4fe06eb94b1.zip
rockbox-7bf62e8da66ca8ff0acc2702f92ea4fe06eb94b1.tar.gz
rockbox-7bf62e8da66ca8ff0acc2702f92ea4fe06eb94b1.tar.bz2
rockbox-7bf62e8da66ca8ff0acc2702f92ea4fe06eb94b1.tar.xz
* Sync Speex codec with Speex SVN revision 12449 (roughly Speex 1.2beta1).
* Redo the changes required to make Speex compile in Rockbox. Should be a bit easier to keep in sync with Speex SVN now. * Fix name of Speex library in codecs Makefile. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12254 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libspeex/fftwrap.c')
-rw-r--r--apps/codecs/libspeex/fftwrap.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/codecs/libspeex/fftwrap.c b/apps/codecs/libspeex/fftwrap.c
index df56580..a108640 100644
--- a/apps/codecs/libspeex/fftwrap.c
+++ b/apps/codecs/libspeex/fftwrap.c
@@ -41,7 +41,6 @@
#include "misc.h"
-#include "math_approx.h"
#define MAX_FFT_SIZE 2048
@@ -65,7 +64,7 @@ static int maximize_range(spx_word16_t *in, spx_word16_t *out, spx_word16_t boun
}
for (i=0;i<len;i++)
{
- out[i] = in[i] << shift;
+ out[i] = SHL16(in[i], shift);
}
return shift;
}
@@ -75,7 +74,7 @@ static void renorm_range(spx_word16_t *in, spx_word16_t *out, int shift, int len
int i;
for (i=0;i<len;i++)
{
- out[i] = (in[i] + (1<<(shift-1))) >> shift;
+ out[i] = PSHR16(in[i], shift);
}
}
#endif
@@ -104,8 +103,8 @@ void spx_fft(void *table, float *in, float *out)
if (in==out)
{
int i;
- speex_warning("FFT should not be done in-place");
float scale = 1./((struct drft_lookup *)table)->n;
+ speex_warning("FFT should not be done in-place");
for (i=0;i<((struct drft_lookup *)table)->n;i++)
out[i] = scale*in[i];
} else {
@@ -121,7 +120,6 @@ void spx_ifft(void *table, float *in, float *out)
{
if (in==out)
{
- int i;
speex_warning("FFT should not be done in-place");
} else {
int i;