[xiph-commits] r9183 - trunk/speex/libspeex
jm at motherfish-iii.xiph.org
jm at motherfish-iii.xiph.org
Mon Apr 25 11:21:57 PDT 2005
Author: jm
Date: 2005-04-25 11:21:55 -0700 (Mon, 25 Apr 2005)
New Revision: 9183
Modified:
trunk/speex/libspeex/sb_celp.c
Log:
pseudo-stack optional for wideband too
Modified: trunk/speex/libspeex/sb_celp.c
===================================================================
--- trunk/speex/libspeex/sb_celp.c 2005-04-25 08:21:22 UTC (rev 9182)
+++ trunk/speex/libspeex/sb_celp.c 2005-04-25 18:21:55 UTC (rev 9183)
@@ -216,11 +216,18 @@
SBEncState *st;
const SpeexSBMode *mode;
+#if defined(VAR_ARRAYS) || defined (USE_ALLOCA)
+ st = (SBEncState*)speex_alloc(sizeof(SBEncState));
+ st->stack = NULL;
+#else
st = (SBEncState*)speex_alloc(sizeof(SBEncState)+10000*sizeof(spx_sig_t));
+ st->stack = ((char*)st) + sizeof(SBEncState);
+#endif
+ if (!st)
+ return NULL;
st->mode = m;
mode = (const SpeexSBMode*)m->mode;
- st->stack = ((char*)st) + sizeof(SBEncState);
st->st_low = speex_encoder_init(mode->nb_mode);
st->full_frame_size = 2*mode->frameSize;
@@ -779,13 +786,20 @@
{
SBDecState *st;
const SpeexSBMode *mode;
+#if defined(VAR_ARRAYS) || defined (USE_ALLOCA)
+ st = (SBDecState*)speex_alloc(sizeof(SBDecState));
+ st->stack = NULL;
+#else
st = (SBDecState*)speex_alloc(sizeof(SBDecState)+6000*sizeof(spx_sig_t));
+ st->stack = ((char*)st) + sizeof(SBDecState);
+#endif
+ if (!st)
+ return NULL;
st->mode = m;
mode=(const SpeexSBMode*)m->mode;
st->encode_submode = 1;
- st->stack = ((char*)st) + sizeof(SBDecState);
More information about the commits
mailing list