[Speex-dev] DSP C5xx decode to pcm 16bit

Jim Crichton jim.crichton at comcast.net
Mon Apr 24 06:52:51 PDT 2006


Peter,

testenc-TI-C5x.c was derived from the standard example file libspeex/testenc.c, and it operates only at 8kbps.  I was preparing a patch for this file already, so I tried running 11kbps.  I found one bug, and I changed the file so that a few defines at the top are all that is needed to change rates.  I just submitted this patch this morning in another thread. 

To use the sample build in the simulator, you need to:

1.
#define DECODE_ONLY
#define TESTENC_BYTES_PER_FRAME 28  /* 11kbps */
#define TESTENC_QUALITY 5       /* 11 kbps */

If you have the original audio file and want to compare the result, then
#define CHECK_RESULT  /* Compares original file with encoded/decoder file */

2.  Change the filenames to the strings that you want.

Note that the number of bits/frame is 220, so there are four pad bits at the end of each frame (to 224 bits, which is 14 chars).  If your input file does not have these pad bits, then you will need to make some changes to the interface.  You would not call speex_bits_reset after each frame, and you would have to look into the bits structure to see how many bytes to write for the next frame (26 or 28), probably using speex_bits_read_whole_bytes.  I have never played with that myself.

Regards,

Jim Crichton
  ----- Original Message ----- 
  From: Peter Mlakar 
  To: speex-dev at xiph.org 
  Sent: Saturday, April 22, 2006 6:02 PM
  Subject: [Speex-dev] DSP C5xx decode to pcm 16bit


  I am wont to decode a speex 11kbps 8kHz 16bit to a raw data 8kHz 16bit LSB on a c5509.   

  Trying to understand the "testenc-TI-C5x.c" exsample, but it looks to me wary complicated.

  Is there more documentation for the exsample or a decoder exsample available?

   

  Can somebody help?



  Peter



------------------------------------------------------------------------------


  _______________________________________________
  Speex-dev mailing list
  Speex-dev at xiph.org
  http://lists.xiph.org/mailman/listinfo/speex-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20060424/a3c34331/attachment.html


More information about the Speex-dev mailing list