pseudo-stack no longer checks on every function entry whether it has been

allocated
This commit is contained in:
Jean-Marc Valin 2008-04-18 17:29:56 +10:00
parent ba8295241c
commit f7cec83c59
5 changed files with 14 additions and 5 deletions

View file

@ -37,6 +37,7 @@
#include "modes.h"
#include "rate.h"
#include "os_support.h"
#include "stack_alloc.h"
#ifdef STATIC_MODES
#include "static_modes.c"
@ -225,6 +226,7 @@ CELTMode EXPORT *celt_mode_create(celt_int32_t Fs, int channels, int frame_size,
const CELTMode *m = NULL;
CELTMode *mode=NULL;
int i;
ALLOC_STACK;
for (i=0;i<TOTAL_MODES;i++)
{
if (Fs == static_mode_list[i]->Fs &&
@ -250,6 +252,7 @@ CELTMode EXPORT *celt_mode_create(celt_int32_t Fs, int channels, int frame_size,
int i;
CELTMode *mode;
celt_word16_t *window;
ALLOC_STACK;
/* The good thing here is that permutation of the arguments will automatically be invalid */