[speex-dev] Port to uClinux

Jean-Marc Valin jean-marc.valin at hermes.usherb.ca
Sun May 18 18:28:09 PDT 2003


OK, what happens is that I try to allocate one big chunk of memory, so
that no other allocation is needed in run-time. The biggest part of that
memory is used for a custom stack I use everywhere because C doesn't
allow variable-length stack arrays. The sizes I used will work for all
configurations (any mode/bit-rate/complexity), but if you're only
interested in a subset, you can probably reduce these values.

        Jean-Marc

Le sam 17/05/2003 à 17:00, Ico Doornekamp a écrit :
> 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 should be for a particular bitrate / quality /
> etc ?
> 
> Regards,
> 
> /Ico

-- 
Jean-Marc Valin, M.Sc.A.
LABORIUS (http://www.gel.usherb.ca/laborius)
Université de Sherbrooke, Québec, Canada

<p>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Ceci est une partie de message numériquement signée
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20030518/fd10459c/signature.pgp


More information about the Speex-dev mailing list