[Speex-dev] Would be nice to conditionally compile out coding modes and code tables...

Miles, Stewart SMiles at activision.com
Wed Dec 13 11:28:31 PST 2006

I'm only using the narrow-band encoder on my embedded system and have
removed all references to the wide-band and ultra-wide band encoder
functions and tables.  They will be pulled in by the linker due to the
references made by the structures in modes.c.  Attached is a replacement
modes.c for compiling out modes that are not in use for anyone who's

Also, I've removed the dynamic memory allocation of the encoder and
decoder.  To do this I had to determine the required size of the encoder
and decoder states since i'm working on a fixed memory platform I simply
handle the worst case, see the attached statesize.h.   Now I can do this
sort of thing...

MyDecoderClass decoders[5];

.. will means all of my decoder states are contiguous and quick to DMA.
It also improves cache consistency when the input buffers are placed in

Would be nice for functionality like this to make it into the main line
of code.

I hope this is useful to someone,
Stewart Miles

This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: modes.c
Type: application/octet-stream
Size: 17769 bytes
Desc: modes.c
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20061213/3d4eb8ee/modes-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: statesize.h
Type: application/octet-stream
Size: 1703 bytes
Desc: statesize.h
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20061213/3d4eb8ee/statesize-0001.obj

More information about the Speex-dev mailing list