diff options
author | flim <flim@google.com> | 2016-01-26 14:33:44 +0100 |
---|---|---|
committer | flim <flim@google.com> | 2016-03-04 17:40:32 +0100 |
commit | c91ee5b5642fcc4969150f73d5f6848f88bf1638 (patch) | |
tree | 900cb39b975dfed729e37e5810fef61fd92d7a70 /celt/modes.c | |
parent | 1391dbf0ccd121ce7a49d30e2142d36c8d404990 (diff) | |
download | libopus-c91ee5b5642fcc4969150f73d5f6848f88bf1638.tar.gz |
Upgrade Opus to v1.1.2android-wear-n-preview-3android-wear-n-preview-1android-n-preview-3
Change-Id: I8211751bab026ab236a612c6e0873f8bdbcd6c98
Diffstat (limited to 'celt/modes.c')
-rw-r--r-- | celt/modes.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/celt/modes.c b/celt/modes.c index 42e68e1c..911686e9 100644 --- a/celt/modes.c +++ b/celt/modes.c @@ -37,6 +37,7 @@ #include "os_support.h" #include "stack_alloc.h" #include "quant_bands.h" +#include "cpu_support.h" static const opus_int16 eband5ms[] = { /*0 200 400 600 800 1k 1.2 1.4 1.6 2k 2.4 2.8 3.2 4k 4.8 5.6 6.8 8k 9.6 12k 15.6 */ @@ -229,6 +230,7 @@ CELTMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error) opus_val16 *window; opus_int16 *logN; int LM; + int arch = opus_select_arch(); ALLOC_STACK; #if !defined(VAR_ARRAYS) && !defined(USE_ALLOCA) if (global_stack==NULL) @@ -389,7 +391,7 @@ CELTMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error) compute_pulse_cache(mode, mode->maxLM); if (clt_mdct_init(&mode->mdct, 2*mode->shortMdctSize*mode->nbShortMdcts, - mode->maxLM) == 0) + mode->maxLM, arch) == 0) goto failure; if (error) @@ -408,6 +410,8 @@ failure: #ifdef CUSTOM_MODES void opus_custom_mode_destroy(CELTMode *mode) { + int arch = opus_select_arch(); + if (mode == NULL) return; #ifndef CUSTOM_MODES_ONLY @@ -431,7 +435,7 @@ void opus_custom_mode_destroy(CELTMode *mode) opus_free((opus_int16*)mode->cache.index); opus_free((unsigned char*)mode->cache.bits); opus_free((unsigned char*)mode->cache.caps); - clt_mdct_clear(&mode->mdct); + clt_mdct_clear(&mode->mdct, arch); opus_free((CELTMode *)mode); } |