[Speex-dev] Speex on TI C6x, Problem with TI C5x Patch

Jean-Marc Valin Jean-Marc.Valin at USherbrooke.ca
Wed May 25 23:51:58 PDT 2005


> For the persistent storage, the only change that I have made is to 
> MAX_CHARS_PER_FRAME, which is set to 2000 in bits.c.  I changed bits.c to 
> set this value only if it was not already defined, and then put my own, much 
> smaller value in config.h.

Actually, I just remembered that you don't even need to redefine
MAX_CHARS_PER_FRAME. All you have to do is use the
speex_bits_init_buffer() call, which allows you to explicitly tell Speex
where you want the data copied. 

> For the scratch stack, I replace the fixed values in nb_encoder_init and 
> nb_decoder_init with constants that I defined in config.h.  Jamey Hicks 
> original C5x patch had some test code in stack_alloc.h to detect working 
> stack overflow.  Maybe something similar could be done to measure the peak 
> stack usage, enabled by a debug switch.  Then, for a space critical 
> application, it would be easy to measure the stack requirement for a given 
> operating mode, and set the size (manually) accordingly.

Regarding the stack, I have just added macros that allow you to set it:
NB_ENC_STACK, NB_DEC_STACK, SB_ENC_STACK, SB_DEC_STACK.

	Jean-Marc

-- 
Jean-Marc Valin <Jean-Marc.Valin at USherbrooke.ca>
Université de Sherbrooke



More information about the Speex-dev mailing list