1
0
Fork 0
forked from len0rd/rockbox

* 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
This commit is contained in:
Dan Everton 2007-02-10 11:44:26 +00:00
parent 5158751263
commit 7bf62e8da6
70 changed files with 4847 additions and 3314 deletions

View file

@ -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;