[Speex-dev] speex on TI C5x fixed-point DSP

Jamey Hicks jamey.hicks at hp.com
Thu Sep 16 13:53:00 PDT 2004


Greetings,

I've just started porting speex to a TI C5509 DSP.  It doesn't look like 
it's going to be too painful, but there are a couple of quirks about the 
C5x.

1) chars are 16 bits because memory addresses are for 16bit words
2) ints and short are also 16 bits (so sizeof(char) = sizeof(short) = 
sizeof(int) = 1)
3) the c5x is essentially big endian

My plan is to change int and unsigned int to int32_t and uint32_t where 
32 bit ints are needed, such as in the stream header.

I'm attaching a patch that updates bits.c to work with 16bit chars, 
renaming "byte" to "char" and using macros BYTES_PER_CHAR, 
BITS_PER_CHAR, and LOG2_BITS_PER_CHAR to keep the code portable between 
8-bit chars and 16-bit chars.  Other than compiling, I have not tested 
this code but I wanted a style check before going too far down this path.

I hope that these changes or suitable reworking of them will be 
acceptable into the Speex code.

Jamey Hicks
HP Labs

-------------- next part --------------
A non-text attachment was scrubbed...
Name: speex-1.1.6-bits.patch
Type: text/x-patch
Size: 14132 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20040916/aa6c4c08/speex-1.1.6-bits.bin


More information about the Speex-dev mailing list