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

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Thu Sep 16 23:29:07 PDT 2004

Hi Jamey,

Really cool to see Speex being ported to the C55xx and I'd be glad to
integrate the changes required in Speex (and the style's fine with me).
Here are a couple comments on the patch you sent (I looked at it, but
haven't compiled).

1) The changes you made to the pack un unpack functions would only work
if the 16-bit chars are "big endian" (relative to the two bytes in the
16-bit chars)
2) I would prefer spx_int16_t to int16_t. Eventually, part of that
should go in the configure script and the config.h
3) Not relative to this patch, but I think an important issue will be
what to do about the codebooks. All codebooks are stored as "signed
char", you'd be wasting lots of space on the C55xx unless you find a way
of packing everything.

Regarding 32 bit ints, I don't think they will be required much (except
for the header). I don't think there is any loop in the code that goes
past 2^15.


On jeu, 2004-09-16 at 16:53 -0400, Jamey Hicks wrote:
> 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
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev

More information about the Speex-dev mailing list