summaryrefslogtreecommitdiff
path: root/apps/codecs/libspeex/nb_celp.c
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2007-10-26 01:16:55 +0000
committerThom Johansen <thomj@rockbox.org>2007-10-26 01:16:55 +0000
commitfa971b142d794c9620b823d6b9d1937397c1f1e1 (patch)
tree55565a0765c15be5d1df4cfb1c04dc92de50fe5d /apps/codecs/libspeex/nb_celp.c
parent14da611cd32d084813bb0d2e2318b81c3ea2953a (diff)
downloadrockbox-fa971b142d794c9620b823d6b9d1937397c1f1e1.tar.gz
rockbox-fa971b142d794c9620b823d6b9d1937397c1f1e1.zip
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
Diffstat (limited to 'apps/codecs/libspeex/nb_celp.c')
-rw-r--r--apps/codecs/libspeex/nb_celp.c11
1 files changed, 8 insertions, 3 deletions
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 @@
47#include "vbr.h" 47#include "vbr.h"
48#include "misc.h" 48#include "misc.h"
49#include "math_approx.h" 49#include "math_approx.h"
50#include "os_support.h"
50#include <speex/speex_callbacks.h> 51#include <speex/speex_callbacks.h>
51 52
52#ifdef VORBIS_PSYCHO 53#ifdef VORBIS_PSYCHO
@@ -1207,7 +1208,9 @@ static void nb_decode_lost(DecState *st, spx_word16_t *out, char *stack)
1207 st->pitch_gain_buf_idx = 0; 1208 st->pitch_gain_buf_idx = 0;
1208} 1209}
1209 1210
1210 1211/* Just so we don't need to carry the complete wideband mode information */
1212static const int wb_skip_table[8] = {0, 36, 112, 192, 352, 0, 0, 0};
1213
1211int nb_decode(void *state, SpeexBits *bits, void *vout) 1214int nb_decode(void *state, SpeexBits *bits, void *vout)
1212{ 1215{
1213 DecState *st; 1216 DecState *st;
@@ -1266,7 +1269,8 @@ int nb_decode(void *state, SpeexBits *bits, void *vout)
1266 int submode; 1269 int submode;
1267 int advance; 1270 int advance;
1268 advance = submode = speex_bits_unpack_unsigned(bits, SB_SUBMODE_BITS); 1271 advance = submode = speex_bits_unpack_unsigned(bits, SB_SUBMODE_BITS);
1269 speex_mode_query(&speex_wb_mode, SPEEX_SUBMODE_BITS_PER_FRAME, &advance); 1272 /*speex_mode_query(&speex_wb_mode, SPEEX_SUBMODE_BITS_PER_FRAME, &advance);*/
1273 advance = wb_skip_table[submode];
1270 if (advance < 0) 1274 if (advance < 0)
1271 { 1275 {
1272 speex_notify("Invalid mode encountered. The stream is corrupted."); 1276 speex_notify("Invalid mode encountered. The stream is corrupted.");
@@ -1281,7 +1285,8 @@ int nb_decode(void *state, SpeexBits *bits, void *vout)
1281 if (wideband) 1285 if (wideband)
1282 { 1286 {
1283 advance = submode = speex_bits_unpack_unsigned(bits, SB_SUBMODE_BITS); 1287 advance = submode = speex_bits_unpack_unsigned(bits, SB_SUBMODE_BITS);
1284 speex_mode_query(&speex_wb_mode, SPEEX_SUBMODE_BITS_PER_FRAME, &advance); 1288 /*speex_mode_query(&speex_wb_mode, SPEEX_SUBMODE_BITS_PER_FRAME, &advance);*/
1289 advance = wb_skip_table[submode];
1285 if (advance < 0) 1290 if (advance < 0)
1286 { 1291 {
1287 speex_notify("Invalid mode encountered. The stream is corrupted."); 1292 speex_notify("Invalid mode encountered. The stream is corrupted.");