From fa971b142d794c9620b823d6b9d1937397c1f1e1 Mon Sep 17 00:00:00 2001 From: Thom Johansen Date: Fri, 26 Oct 2007 01:16:55 +0000 Subject: Sync with Speex SVN. Syntactic change in filters_cf.S. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15310 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libspeex/nb_celp.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'apps/codecs/libspeex/nb_celp.c') diff --git a/apps/codecs/libspeex/nb_celp.c b/apps/codecs/libspeex/nb_celp.c index 5d167a2aa3..aab0b722dc 100644 --- a/apps/codecs/libspeex/nb_celp.c +++ b/apps/codecs/libspeex/nb_celp.c @@ -47,6 +47,7 @@ #include "vbr.h" #include "misc.h" #include "math_approx.h" +#include "os_support.h" #include #ifdef VORBIS_PSYCHO @@ -1207,7 +1208,9 @@ static void nb_decode_lost(DecState *st, spx_word16_t *out, char *stack) st->pitch_gain_buf_idx = 0; } - +/* Just so we don't need to carry the complete wideband mode information */ +static const int wb_skip_table[8] = {0, 36, 112, 192, 352, 0, 0, 0}; + int nb_decode(void *state, SpeexBits *bits, void *vout) { DecState *st; @@ -1266,7 +1269,8 @@ int nb_decode(void *state, SpeexBits *bits, void *vout) int submode; int advance; advance = submode = speex_bits_unpack_unsigned(bits, SB_SUBMODE_BITS); - speex_mode_query(&speex_wb_mode, SPEEX_SUBMODE_BITS_PER_FRAME, &advance); + /*speex_mode_query(&speex_wb_mode, SPEEX_SUBMODE_BITS_PER_FRAME, &advance);*/ + advance = wb_skip_table[submode]; if (advance < 0) { speex_notify("Invalid mode encountered. The stream is corrupted."); @@ -1281,7 +1285,8 @@ int nb_decode(void *state, SpeexBits *bits, void *vout) if (wideband) { advance = submode = speex_bits_unpack_unsigned(bits, SB_SUBMODE_BITS); - speex_mode_query(&speex_wb_mode, SPEEX_SUBMODE_BITS_PER_FRAME, &advance); + /*speex_mode_query(&speex_wb_mode, SPEEX_SUBMODE_BITS_PER_FRAME, &advance);*/ + advance = wb_skip_table[submode]; if (advance < 0) { speex_notify("Invalid mode encountered. The stream is corrupted."); -- cgit