summaryrefslogtreecommitdiffstats
path: root/apps/codecs/libspeex/nb_celp.c
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2007-10-22 12:03:03 +0000
committerThom Johansen <thomj@rockbox.org>2007-10-22 12:03:03 +0000
commitba482642f2aeeeaa39fd22f68b908fc09b6f63ac (patch)
treece73c66341f23a23d6c8b481dacced04349e5dc0 /apps/codecs/libspeex/nb_celp.c
parent12d1ff912c1f1d292bf91f29f7896882360424aa (diff)
downloadrockbox-ba482642f2aeeeaa39fd22f68b908fc09b6f63ac.tar.gz
rockbox-ba482642f2aeeeaa39fd22f68b908fc09b6f63ac.zip
Fix ultra-wideband mode. Disable big parts of the encoder stuff for a smaller binary.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15263 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libspeex/nb_celp.c')
-rw-r--r--apps/codecs/libspeex/nb_celp.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/apps/codecs/libspeex/nb_celp.c b/apps/codecs/libspeex/nb_celp.c
index 6047bd42aa..0798ffbcf4 100644
--- a/apps/codecs/libspeex/nb_celp.c
+++ b/apps/codecs/libspeex/nb_celp.c
@@ -108,8 +108,8 @@ const float exc_gain_quant_scal1[2]={0.70469f, 1.05127f};
#define sqr(x) ((x)*(x))
extern const spx_word16_t lpc_window[];
-
-void *nb_encoder_init(const SpeexMode *m)
+#if 0
+void *nb_encoder_init(const speexmode *m)
{
EncState *st;
const SpeexNBMode *mode;
@@ -1023,6 +1023,19 @@ int nb_encode(void *state, void *vin, SpeexBits *bits)
return 1;
}
+#else
+void *nb_encoder_init(const SpeexMode *m)
+{
+ return NULL;
+}
+void nb_encoder_destroy(void *state)
+{
+}
+int nb_encode(void *state, void *vin, SpeexBits *bits)
+{
+ return 1;
+}
+#endif
static DecState global_decstate IBSS_ATTR;
@@ -1033,9 +1046,11 @@ void *nb_decoder_init(const SpeexMode *m)
int i;
mode=(const SpeexNBMode*)m->mode;
- /* st = (DecState *)speex_alloc(sizeof(DecState)); */
+/*
+ st = (DecState *)speex_alloc(sizeof(DecState));
if (!st)
return NULL;
+*/
#if defined(VAR_ARRAYS) || defined (USE_ALLOCA)
st->stack = NULL;
#else
@@ -1740,6 +1755,7 @@ int nb_decode(void *state, SpeexBits *bits, void *vout)
return 0;
}
+#if 0
int nb_encoder_ctl(void *state, int request, void *ptr)
{
EncState *st;
@@ -1935,6 +1951,12 @@ int nb_encoder_ctl(void *state, int request, void *ptr)
}
return 0;
}
+#else
+int nb_encoder_ctl(void *state, int request, void *ptr)
+{
+ return 0;
+}
+#endif
int nb_decoder_ctl(void *state, int request, void *ptr)
{