summaryrefslogtreecommitdiff
path: root/apps/codecs/libspeex/nb_celp.c
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2007-11-01 21:30:51 +0000
committerThom Johansen <thomj@rockbox.org>2007-11-01 21:30:51 +0000
commitbf1b7f131c933b83afe62f01c200366e4e2e37f3 (patch)
treea9ab90e6a01df357b7a8649d8e626a47e1678f64 /apps/codecs/libspeex/nb_celp.c
parent6d88717f6949587908ec08affa07d06239c3bae1 (diff)
downloadrockbox-bf1b7f131c933b83afe62f01c200366e4e2e37f3.tar.gz
rockbox-bf1b7f131c933b83afe62f01c200366e4e2e37f3.zip
First attempt at ifdeffing out as much of the encoder stuff as possible from Speex. Gives a smaller binary and allows me to remove a couple more files from SOURCES.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15394 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libspeex/nb_celp.c')
-rw-r--r--apps/codecs/libspeex/nb_celp.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/apps/codecs/libspeex/nb_celp.c b/apps/codecs/libspeex/nb_celp.c
index aab0b722dc..50e1b11372 100644
--- a/apps/codecs/libspeex/nb_celp.c
+++ b/apps/codecs/libspeex/nb_celp.c
@@ -109,8 +109,8 @@ const float exc_gain_quant_scal1[2]={0.70469f, 1.05127f};
109#define sqr(x) ((x)*(x)) 109#define sqr(x) ((x)*(x))
110 110
111extern const spx_word16_t lpc_window[]; 111extern const spx_word16_t lpc_window[];
112#if 0 112#ifndef SPEEX_DISABLE_ENCODER
113void *nb_encoder_init(const speexmode *m) 113void *nb_encoder_init(const SpeexMode *m)
114{ 114{
115 EncState *st; 115 EncState *st;
116 const SpeexNBMode *mode; 116 const SpeexNBMode *mode;
@@ -1024,18 +1024,6 @@ int nb_encode(void *state, void *vin, SpeexBits *bits)
1024 1024
1025 return 1; 1025 return 1;
1026} 1026}
1027#else
1028void *nb_encoder_init(const SpeexMode *m)
1029{
1030 return NULL;
1031}
1032void nb_encoder_destroy(void *state)
1033{
1034}
1035int nb_encode(void *state, void *vin, SpeexBits *bits)
1036{
1037 return 1;
1038}
1039#endif 1027#endif
1040 1028
1041static DecState global_decstate IBSS_ATTR; 1029static DecState global_decstate IBSS_ATTR;
@@ -1763,7 +1751,7 @@ int nb_decode(void *state, SpeexBits *bits, void *vout)
1763 return 0; 1751 return 0;
1764} 1752}
1765 1753
1766#if 0 1754#ifndef SPEEX_DISABLE_ENCODER
1767int nb_encoder_ctl(void *state, int request, void *ptr) 1755int nb_encoder_ctl(void *state, int request, void *ptr)
1768{ 1756{
1769 EncState *st; 1757 EncState *st;
@@ -1959,11 +1947,6 @@ int nb_encoder_ctl(void *state, int request, void *ptr)
1959 } 1947 }
1960 return 0; 1948 return 0;
1961} 1949}
1962#else
1963int nb_encoder_ctl(void *state, int request, void *ptr)
1964{
1965 return 0;
1966}
1967#endif 1950#endif
1968 1951
1969int nb_decoder_ctl(void *state, int request, void *ptr) 1952int nb_decoder_ctl(void *state, int request, void *ptr)