[Speex-dev] How to create a compact Speex library
Jean-Marc.Valin at USherbrooke.ca
Fri Apr 14 16:30:35 PDT 2006
> I have not removed any files which require code changes, but I will have to
> look at Jean-Marc's tips about vbr.c, exc_*.c, and gain_table.c (thanks for
Basically, have a look at modes.c, which contains all the information
about each of the Speex modes (*_submode* structs). If you remove some
of these modes (and the other strucs they reference), then you can
eventually get rid of the corresponding codebooks. At 8 kbps, the only
codebooks you'll need are exc_10_32_table.c gain_table_lbr.c and
lsp_tables_nb.c (half of which can go if you remove lsp_quant_nb and
lsp_unquant_nb). As for vbr.c, what you need to remove in nb_celp.c is
pretty much the big block of code that starts with /*VBR stuff*/. Then
you can get rid of vbr.c.
> By the way, do you really care about the size of the .a file? My library is
> 467kbytes, but that is meaningless, because the library was built with
> symbol information. Looking at the map file, Speex (including my interface
> routines) takes about 41kbytes in .text and 16kbytes in .const. That does
> not include data memory, which is what Jean-Marc is working on now.
OK, I was a bit surprised to hear that the size was that big, but debug
info explains it. Last think, I recently (in svn) moved the lpc window
from the encoder state to static data in window.c. Could you add that to
your project files?
More information about the Speex-dev