search for: speex_alloc

Displaying 20 results from an estimated 57 matches for "speex_alloc".

2005 Jul 18
1
[PATCH] remove unused encoder buf in sb_celp.[hc]
diffed against http://svn.xiph.org/trunk/speex r9583 Index: libspeex/sb_celp.c =================================================================== --- libspeex/sb_celp.c (revision 9583) +++ libspeex/sb_celp.c (working copy) @@ -272,7 +272,6 @@ st->g0_mem=speex_alloc((QMF_ORDER)*sizeof(spx_word32_t)); st->g1_mem=speex_alloc((QMF_ORDER)*sizeof(spx_word32_t)); - st->buf=speex_alloc((st->windowSize)*sizeof(spx_sig_t)); st->excBuf=speex_alloc((st->bufSize)*sizeof(spx_sig_t)); st->exc = st->excBuf + st->bufSize - st->windowS...
2006 Aug 17
2
AEC on a TI C6x - has no effect
...trying these things, but the main problem that has been bothering >me recently is that the fixed-point algorithm works "sometimes". Meaning >that sometimes it will work well, and other times it will not work at >all. > >I think I've found the source of the problem. The speex_alloc() >function, called by speex_echo_state_init(), calls calloc() and returns >a zeroed array. On the other hand, the TI implementation (as it is if >you don't change the MANUAL_ALLOC define) replaces speex_alloc() with a >different version that doesn't use the heap but only alloca...
2008 Feb 19
4
Patch for Analog Devices compiler & fixed-point AGC
...terBank *bnk; /* Parameters */ int denoise_enabled; @@ -444,7 +444,7 @@ st->nbands = NB_BANDS; M = st->nbands; - st->bank = filterbank_new(M, sampling_rate, N, 1); + st->bnk = filterbank_new(M, sampling_rate, N, 1); st->frame = (spx_word16_t*)speex_alloc(2*N*sizeof(spx_word16_t)); st->window = (spx_word16_t*)speex_alloc(2*N*sizeof(spx_word16_t)); @@ -562,7 +562,7 @@ speex_free(st->outbuf); spx_fft_destroy(st->fft_lookup); - filterbank_destroy(st->bank); + filterbank_destroy(st->bnk); speex_free(st); } @@ -661...
2004 Aug 06
2
Port to uClinux
Hi, I'm trying a quick port of this terrific codec to uClinux, a Linux-derivate for mmu-less systems. I'm particulary interested in the alloc()'s the library does, and it's stack usage. In nb_celp.c I found two lines of code doing memory allocation : nb_celp.c: st = (EncState*)speex_alloc(sizeof(EncState)+8000*sizeof(float)); nb_celp.c: st = (DecState*)speex_alloc(sizeof(DecState)+4000*sizeof(float)); Where do these magic numbers 8000 and 4000 come from ? If I decrease those to 4000 and 2000, my test app still works (just lucky ?). Is there a way to know what the minimal size sho...
2005 Feb 19
2
memory usage
...urrently trying to port speex v1.1.6 to a microcontroller with very limited memory (<64Kbyte RAM). what I found when initialising the encoder, a chunk of 32Kb was attempted to be alloced, which failed: src/nb_celp.c: void *nb_encoder_init(const SpeexMode *m) { /* snip */ st = (EncState*)speex_alloc(sizeof(EncState)+8000*sizeof(spx_sig_t)); /* snip */ } same goes for the decoder: void *nb_decoder_init(const SpeexMode *m) { /* snip */ st = (DecState *)speex_alloc(sizeof(DecState)+4000*sizeof(spx_sig_t)); /* snip */ } I tried to reduce the stacksize from 8000/4000 to say 2000/100...
2006 Aug 16
3
AEC on a TI C6x - has no effect
> I followed your advice on running the trivial case. The float version > started cancelling sounds out within a second. The fixed point > version also worked, but took a little longer before the effect was > noticeable. Since I now realized the fixed point version might need a > little more tweaking than the float version, I started modifying some > things and ended up with the
2005 May 25
3
Speex on TI C6x, Problem with TI C5x Patch
...e to the application host >> with the size and scratch/persistent nature of each block. The host >> then does the memory allocating, and provides the pointers back to the >> application. > > I'm not familiar with XDAIS, but I would think you could just overload > the speex_alloc() and speex_free() functions, right? According to this standard, an allocate call is made to an algorithm, and the algorithm fills in a table of required blocks (size, alignment, and scratch/persistent type). The system allocates these blocks, and calls the algorithm init function, with the sa...
2006 May 10
0
Speex echo canceller on TI C55 DSP
...memory allocation to follow the same structure >> as >> the encoder/decoder, including the ability to override the malloc >> function. > >What do you mean here? misc.c provides the ability to override some functions, including the allocation and printing. fftwrap.c uses speex_alloc, then calls kiss_fftr_alloc, which calls kiss_fft_alloc, which calls KISS_FFT_MALLOC, which is defined as malloc in kiss_fft.h. It would make it more consistent to define KISS_FFT_MALLOC as speex_alloc. That is the only change that I would suggest here. I was not able to use the default spee...
2006 Aug 17
0
AEC on a TI C6x - has no effect
...ying these things, but the main problem that has been bothering >me recently is that the fixed-point algorithm works "sometimes". >Meaning that sometimes it will work well, and other times it will not >work at all. > >I think I've found the source of the problem. The speex_alloc() >function, called by speex_echo_state_init(), calls calloc() and returns >a zeroed array. On the other hand, the TI implementation (as it is if >you don't change the MANUAL_ALLOC define) replaces speex_alloc() with a >different version that doesn't use the heap but only al...
2005 May 25
3
Speex on TI C6x, Problem with TI C5x Patch
...GIN .002 #define LSP_DELTA1 .2 #define LSP_DELTA2 .05 #endif #define sqr(x) ((x)*(x)) void *nb_encoder_init(const SpeexMode *m) { EncState *st; const SpeexNBMode *mode; int i; mode=(const SpeexNBMode *)m->mode; #if defined(VAR_ARRAYS) || defined (USE_ALLOCA) st = (EncState*)speex_alloc(sizeof(EncState)); st->stack = NULL; #else st = (EncState*)speex_alloc(sizeof(EncState)+8000*sizeof(spx_sig_t)); st->stack = ((char*)st) + sizeof(EncState); #endif if (!st) return NULL; st->mode=m; st->frameSize = mode->frameSize; st->windowSize = st-&...
2006 Aug 17
0
AEC on a TI C6x - has no effect
Jean-Marc, I am trying these things, but the main problem that has been bothering me recently is that the fixed-point algorithm works "sometimes". Meaning that sometimes it will work well, and other times it will not work at all. I think I've found the source of the problem. The speex_alloc() function, called by speex_echo_state_init(), calls calloc() and returns a zeroed array. On the other hand, the TI implementation (as it is if you don't change the MANUAL_ALLOC define) replaces speex_alloc() with a different version that doesn't use the heap but only allocates memory from...
2007 Mar 14
2
Memory Allocation to St
Can anyone tell me why the size of st is defined as: st = (EncState*)speex_alloc(sizeof(EncState)+8000*sizeof(float)); Reference: nb_encode_init function. Specifically, I would like to know why 8000 floats are allocated? Thanks and regards, Vinay -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/s...
2005 Oct 16
3
Static linking without C runtime dependence?
Thanks Jean-Marc, >What you want is simply to override some of the functions in misc.c. I >made it easy to do by wrapping malloc() a speex_alloc() call. Aside from >what's in misc.c, the only other thing I use are some of the math >functions like cos(). That makes sense. But how does the DLL version, which is not linked to the C runtime, get access to C's transcendental like cos() ?? _____________________________________...
2005 May 24
2
Speex on TI C6x, Problem with TI C5x Patch
Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: maleout12may.wav Type: audio/wav Size: 95884 bytes Desc: not available Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20050524/57112d0c/maleout12may-0001.bin
2006 May 10
2
Speex echo canceller on TI C55 DSP
> Build 11387 produces the same result as my modified build 11343. Because of > compiler limitations in the TI tools, I did have to make modifications to > pseudofloat.h (separating return of float values) and nb_celp.c (adding > braces around a variable declaration in the middle of code). I have > attached a patch. You might prefer to do the nb_celp.c change in a >
2007 Sep 13
2
innov_save, what is it? why does it hurt me so?
hi, I am using speex1.2beta2 on a TI 54x on narrow band I have been trying to get speex to work for a while now, and it's been a real teeter-totter ride. For a long time I noticed that I will get a project to work and then without changing any code and programming it to an eprom/flash the project will not work. It turns out it was a value called innov_save. I found this bugger by zero
2006 Aug 15
1
AEC on a TI C6x - has no effect
For me, this was a memory allocation problem. I am using a private heap, and somewhere between build 11522 and 11700, the allocation for two large buffers was changed from calloc to speex_alloc (I am sure that this was a cleanup change, and I have not had a chance to locate it yet). This was overrunning my heap, and enlarging the heap solved the problem. I suspect that Itay is having a similar problem. - Jim ----- Original Message ----- From: "Jean-Marc Valin" <jean-ma...
2004 Aug 06
0
Port to uClinux
...rt of this terrific codec to uClinux, a Linux-derivate > for mmu-less systems. I'm particulary interested in the alloc()'s the > library does, and it's stack usage. > > In nb_celp.c I found two lines of code doing memory allocation : > > nb_celp.c: st = (EncState*)speex_alloc(sizeof(EncState)+8000*sizeof(float)); > nb_celp.c: st = (DecState*)speex_alloc(sizeof(DecState)+4000*sizeof(float)); > > Where do these magic numbers 8000 and 4000 come from ? If I decrease those > to 4000 and 2000, my test app still works (just lucky ?). Is there a way to > know...
2005 Feb 19
0
memory usage
...er with > very limited memory (<64Kbyte RAM). > > what I found when initialising the encoder, a chunk of 32Kb was > attempted to be alloced, which failed: > > src/nb_celp.c: > > void *nb_encoder_init(const SpeexMode *m) > { > /* snip */ > st = (EncState*)speex_alloc(sizeof(EncState)+8000*sizeof(spx_sig_t)); > /* snip */ > } > > > same goes for the decoder: > > void *nb_decoder_init(const SpeexMode *m) > { > /* snip */ > st = (DecState *)speex_alloc(sizeof(DecState)+4000*sizeof(spx_sig_t)); > /* snip */ > } &gt...
2006 Jan 31
1
Simple fix for Win32 using USE_ALLOCA
In speex_alloc.h The following code #ifdef USE_ALLOCA #include <alloca.h> #endif should be: #ifdef USE_ALLOCA #ifdef WIN32 #include <malloc.h> #else #include <alloca.h> #endif #endif for visual studio at least. Not sure about mingw Aron Rosenberg www.sightspeed.com