[Speex-dev] How to create a compact Speex library

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Thu Apr 13 17:36:12 PDT 2006


> Sorry if this a repost but I want to create the
> smallest Speex library possible to be put in TI's
> TMS320 DSP.  I'm only interested in one configuration:
> 5.97 Kbps narrowband.  What part of source code can I
> remove?  Currently, when I compiled the version 1.1.12
> libspeex.a library with the TI TMS320 and
> Fixed-Integer options, I get around 522Kb. 

You mean kilo-bit or kilo-byte? The former is what I'd expect, so if
you're getting the latter, something's already wrong.

>  I would
> like to reduce it to as small as possible given my
> above 5.97 Kbps operating constraints (I don't need
> all the other extra features from Speex: jitter
> buffer, echo cancellation, etc).

First, try --disable-wideband (or define DISABLE_WIDEBAND). Then you can
start removing other stuff you don't need. To get rid of the echo
canceller, simply remove mdf.c. Then you can get rid of jitter.c,
preprocess.c, pcm_wrapper.c, smallft.c, ... Basically, if you remove the
file and it still works, then it wasn't needed. In addition to all the
files you can remove without the need to touch anything else, the
following can be disabled as long as you disable a bit of code:
- VBR (vbr.c and references to VBR in nb_celp.c)
- codebooks for other bit-rates: 
   * all exc_*.c files except exc_10_16_table.c
   * gain_table.c

There might be a few bits more that can be removed, but I think this
summarizes it well.

	Jean-Marc


More information about the Speex-dev mailing list