summaryrefslogtreecommitdiff
path: root/drivers/opus/celt/modes.c
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-05-03 19:14:24 +0200
committerRémi Verschelde <remi@verschelde.fr>2016-05-03 19:14:24 +0200
commitc90bc695447b5d74227ed7c0d0bc19b7141dc835 (patch)
tree808af09d82e51698b9b7ba18795ba3a210a1d8f0 /drivers/opus/celt/modes.c
parent4e23ba5f37e21021c47e3aecf544afc9485e311b (diff)
parent7c59d819a7ebb936d51ca032e66a2489e4080d08 (diff)
Merge pull request #4532 from vnen/pr-update-opus-1.1.2
Update Opus driver to 1.1.2
Diffstat (limited to 'drivers/opus/celt/modes.c')
-rw-r--r--drivers/opus/celt/modes.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/opus/celt/modes.c b/drivers/opus/celt/modes.c
index aef2681443..d628f1468b 100644
--- a/drivers/opus/celt/modes.c
+++ b/drivers/opus/celt/modes.c
@@ -26,17 +26,15 @@
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/celt/celt.h"
-#include "opus/celt/opus_modes.h"
+#include "opus/celt/modes.h"
#include "opus/celt/rate.h"
#include "opus/celt/os_support.h"
#include "opus/celt/stack_alloc.h"
#include "opus/celt/quant_bands.h"
+#include "opus/celt/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 +227,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 +388,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 +407,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 +432,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);
}