diff options
Diffstat (limited to 'apps/codecs/libspeex')
-rw-r--r-- | apps/codecs/libspeex/cb_search.c | 3 | ||||
-rw-r--r-- | apps/codecs/libspeex/nb_celp.c | 15 |
2 files changed, 7 insertions, 11 deletions
diff --git a/apps/codecs/libspeex/cb_search.c b/apps/codecs/libspeex/cb_search.c index f9ff0a6784..35fe3a2f67 100644 --- a/apps/codecs/libspeex/cb_search.c +++ b/apps/codecs/libspeex/cb_search.c | |||
@@ -529,14 +529,13 @@ spx_int32_t *seed | |||
529 | VARDECL(int *ind); | 529 | VARDECL(int *ind); |
530 | VARDECL(int *signs); | 530 | VARDECL(int *signs); |
531 | const signed char *shape_cb; | 531 | const signed char *shape_cb; |
532 | int shape_cb_size, subvect_size, nb_subvect; | 532 | int subvect_size, nb_subvect; |
533 | const split_cb_params *params; | 533 | const split_cb_params *params; |
534 | int have_sign; | 534 | int have_sign; |
535 | 535 | ||
536 | params = (const split_cb_params *) par; | 536 | params = (const split_cb_params *) par; |
537 | subvect_size = params->subvect_size; | 537 | subvect_size = params->subvect_size; |
538 | nb_subvect = params->nb_subvect; | 538 | nb_subvect = params->nb_subvect; |
539 | shape_cb_size = 1<<params->shape_bits; | ||
540 | shape_cb = params->shape_cb; | 539 | shape_cb = params->shape_cb; |
541 | have_sign = params->have_sign; | 540 | have_sign = params->have_sign; |
542 | 541 | ||
diff --git a/apps/codecs/libspeex/nb_celp.c b/apps/codecs/libspeex/nb_celp.c index 90a5d1e991..98f5e2e240 100644 --- a/apps/codecs/libspeex/nb_celp.c +++ b/apps/codecs/libspeex/nb_celp.c | |||
@@ -1001,12 +1001,13 @@ void *nb_decoder_init(const SpeexMode *m) | |||
1001 | } | 1001 | } |
1002 | 1002 | ||
1003 | void nb_decoder_destroy(void *state) | 1003 | void nb_decoder_destroy(void *state) |
1004 | { | 1004 | { |
1005 | #if !(defined(VAR_ARRAYS) || defined (USE_ALLOCA)) | ||
1005 | DecState *st; | 1006 | DecState *st; |
1006 | st=(DecState*)state; | 1007 | st=(DecState*)state; |
1007 | |||
1008 | #if !(defined(VAR_ARRAYS) || defined (USE_ALLOCA)) | ||
1009 | speex_free_scratch(st->stack); | 1008 | speex_free_scratch(st->stack); |
1009 | #else | ||
1010 | (void)state; | ||
1010 | #endif | 1011 | #endif |
1011 | /* | 1012 | /* |
1012 | speex_free (st->excBuf); | 1013 | speex_free (st->excBuf); |
@@ -1315,7 +1316,6 @@ int nb_decode(void *state, SpeexBits *bits, void *vout) | |||
1315 | { | 1316 | { |
1316 | int offset; | 1317 | int offset; |
1317 | spx_word16_t *exc; | 1318 | spx_word16_t *exc; |
1318 | spx_word16_t *sp; | ||
1319 | spx_word16_t *innov_save = NULL; | 1319 | spx_word16_t *innov_save = NULL; |
1320 | spx_word16_t tmp; | 1320 | spx_word16_t tmp; |
1321 | 1321 | ||
@@ -1323,8 +1323,7 @@ int nb_decode(void *state, SpeexBits *bits, void *vout) | |||
1323 | offset = st->subframeSize*sub; | 1323 | offset = st->subframeSize*sub; |
1324 | /* Excitation */ | 1324 | /* Excitation */ |
1325 | exc=st->exc+offset; | 1325 | exc=st->exc+offset; |
1326 | /* Original signal */ | 1326 | |
1327 | sp=out+offset; | ||
1328 | if (st->innov_save) | 1327 | if (st->innov_save) |
1329 | innov_save = st->innov_save+offset; | 1328 | innov_save = st->innov_save+offset; |
1330 | 1329 | ||
@@ -1517,13 +1516,11 @@ int nb_decode(void *state, SpeexBits *bits, void *vout) | |||
1517 | { | 1516 | { |
1518 | int offset; | 1517 | int offset; |
1519 | spx_word16_t *sp; | 1518 | spx_word16_t *sp; |
1520 | spx_word16_t *exc; | 1519 | |
1521 | /* Offset relative to start of frame */ | 1520 | /* Offset relative to start of frame */ |
1522 | offset = st->subframeSize*sub; | 1521 | offset = st->subframeSize*sub; |
1523 | /* Original signal */ | 1522 | /* Original signal */ |
1524 | sp=out+offset; | 1523 | sp=out+offset; |
1525 | /* Excitation */ | ||
1526 | exc=st->exc+offset; | ||
1527 | 1524 | ||
1528 | /* LSP interpolation (quantized and unquantized) */ | 1525 | /* LSP interpolation (quantized and unquantized) */ |
1529 | lsp_interpolate(st->old_qlsp, qlsp, interp_qlsp, st->lpcSize, sub, st->nbSubframes); | 1526 | lsp_interpolate(st->old_qlsp, qlsp, interp_qlsp, st->lpcSize, sub, st->nbSubframes); |