forked from len0rd/rockbox
Speex encoder specially tailored to create voice UI snippets. Small fixups to libspeex to allow it to be built.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15640 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
88c4748a4b
commit
65458ee71c
9 changed files with 332 additions and 4 deletions
|
|
@ -14,7 +14,7 @@ ifdef APPEXTRA
|
|||
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
|
||||
endif
|
||||
|
||||
SPEEXOPTS = -DHAVE_CONFIG_H -DSPEEX_DISABLE_ENCODER
|
||||
SPEEXOPTS = -DHAVE_CONFIG_H -DSPEEX_DISABLE_ENCODER -DROCKBOX
|
||||
|
||||
# We're faster on ARM-targets with -O1 instead of -O2
|
||||
ifeq ($(CPU),arm)
|
||||
|
|
|
|||
|
|
@ -24,12 +24,22 @@ speex.c
|
|||
speex_callbacks.c
|
||||
speex_header.c
|
||||
#ifndef ROCKBOX_VOICE_CODEC
|
||||
#ifndef ROCKBOX_VOICE_ENCODER
|
||||
oggframing.c
|
||||
#endif
|
||||
stereo.c
|
||||
#endif
|
||||
#ifdef ROCKBOX_VOICE_ENCODER
|
||||
lpc.c
|
||||
vbr.c
|
||||
vq.c
|
||||
window.c
|
||||
resample.c
|
||||
#else
|
||||
#ifdef CPU_COLDFIRE
|
||||
filters_cf.S
|
||||
ltp_cf.S
|
||||
#elif defined(CPU_ARM)
|
||||
filters_arm4.S
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ void speex_bits_rewind(SpeexBits *bits)
|
|||
bits->overflow=0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
#ifndef SPEEX_VOICE_ENCODER
|
||||
void speex_bits_read_from(SpeexBits *bits, char *chars, int len)
|
||||
{
|
||||
int i;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,16 @@
|
|||
#ifndef ROCKBOX_VOICE_ENCODER
|
||||
#include "../codec.h"
|
||||
#include "autoconf.h"
|
||||
#else
|
||||
#define ICODE_ATTR
|
||||
#define IDATA_ATTR
|
||||
#define IBSS_ATTR
|
||||
#define ICONST_ATTR
|
||||
#endif
|
||||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
#ifndef ROCKBOX_VOICE_ENCODER
|
||||
/* Make use of ARM4E assembly optimizations */
|
||||
#if defined(CPU_ARM)
|
||||
#define ARM4_ASM
|
||||
|
|
@ -15,6 +23,7 @@
|
|||
|
||||
/* Make use of Blackfin assembly optimizations */
|
||||
/* #undef BFIN_ASM */
|
||||
#endif /* ROCKBOX_VOICE_ENCODER */
|
||||
|
||||
/* Disable wideband codec */
|
||||
/* #undef DISABLE_WIDEBAND */
|
||||
|
|
@ -28,8 +37,13 @@
|
|||
/* Debug fixed-point implementation */
|
||||
/* #undef FIXED_DEBUG */
|
||||
|
||||
#ifndef ROCKBOX_VOICE_ENCODER
|
||||
/* Compile target codec as fixed point */
|
||||
#define FIXED_POINT
|
||||
#else
|
||||
/* Compile voice clip encoder as floating point */
|
||||
#define FLOATING_POINT
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
/* #undef HAVE_DLFCN_H */
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@
|
|||
#ifndef SPEEX_ROCKBOX_H
|
||||
#define SPEEX_ROCKBOX_H
|
||||
|
||||
/* We don't want all this stuff if we're building encoder */
|
||||
#ifndef ROCKBOX_VOICE_ENCODER
|
||||
|
||||
#include "../codec.h"
|
||||
#include "../lib/codeclib.h"
|
||||
|
||||
|
|
@ -106,5 +109,7 @@ static inline void _speex_putc(int ch, void *file)
|
|||
//printf("%c", ch);
|
||||
}
|
||||
|
||||
#endif /* ROCKBOX_VOICE_ENCODER */
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
/** Convert little endian */
|
||||
static inline spx_int32_t le_int(spx_int32_t i)
|
||||
{
|
||||
#if 1
|
||||
#ifdef ROCKBOX
|
||||
return letoh32(i);
|
||||
#elif !defined(__LITTLE_ENDIAN__) && ( defined(WORDS_BIGENDIAN) || defined(__BIG_ENDIAN__) )
|
||||
spx_uint32_t ui, ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue