[Speex-dev] 4kbps sounds robotic on TMS320C64

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Wed Dec 12 17:54:56 PST 2007

Andy Ngo wrote:
> Tried your fixed_generic.h change but that didn't help.

Can you try older versions (beta1 or beta2) and see if they work? BTW,
I'm assuming you're using beta3, if not try that first. If older
versions work and newer ones don't then the best way would be to track
down where the regression happened.



> Andy
> ----- Original Message ----
> From: Andy Ngo <ndno72-speex at yahoo.com>
> To: Jean-Marc Valin <jean-marc.valin at usherbrooke.ca>
> Cc: speex-dev at xiph.org
> Sent: Wednesday, December 12, 2007 4:13:35 PM
> Subject: Re: [Speex-dev] 4kbps sounds robotic on TMS320C64
> Jean-Marc,
> Yes, fixed-point is enabled (#define FIXED_POINT in config.h).  I
> haven't tried anything lower than 4kbps; like I mentioned, 6kbps sounds
> fine so it's very strange.  The only code I changed to get 4kbps was
> setting quality to 1 so that is the only difference in my test code
> between using 4kbps and 6kbps.
> It seems to be in the encoder.  On the ARM side, I encoded a 8Khz 16-bit
> mono sample in 4kbps mode, decoded it, and playback sounds fine.  When I
> took the same sample and encoded it in 4kpbs on the DSP side, then
> decoded it on the ARM side, playback sounds robotic.  I wonder if I'm
> missing some macros (#define 's) when compiling for the DSP side, but
> this can't be the case since 6kbps sounds fine.  I'll try your
> fixed_generic.h suggestion and let you know.
> Thanks,
> Andy
> ----- Original Message ----
> From: Jean-Marc Valin <jean-marc.valin at usherbrooke.ca>
> To: Andy Ngo <ndno72-speex at yahoo.com>
> Cc: speex-dev at xiph.org
> Sent: Wednesday, December 12, 2007 3:52:33 PM
> Subject: Re: [Speex-dev] 4kbps sounds robotic on TMS320C64
>> I'm currently working on the TI DaVinci processor, which has an
>> ARM926 processor and a TMS320C64+ DSP in it.  I have been using Speex
>> 6kbps (narrowband, quality=2, complexity=1, perceptual_enh=0) on the
>> DSP C64+ side without any issues; the voice sounds very good for such
>> a low bandwidth requirement.  However, recently, I tried out the
>> 4kbps mode (changing quality to 1) on the DSP and it sounds robotic;
>> if I ported the same 4kbps code to use on the ARM926 (GPP) side of
>> the DaVinci, it sounds fine (no robotic artifacts).
> I assume both builds had fixed-point enabled, right?
>> So this leads me
>> to think somehow the Speex code is not working properly for 4kbps
>> (and lower) on the DSP C64+ processor side (6kbps sounds good as
>> mentioned above).  I followed the ti speex_C64_test trunk example
>> packaged with the Speex code; I used the example config.h and
>> Makefile for my build.  Am I doing something wrong with the
>> compilation of the Speex code for the DSP C64+?  I tried changing the
>> complexity to 10 and turning on perceptual enhancement and it still
>> sounds robotic; again, like I mentioned above, the ARM side sounds
>> fine with the 4kbps mode.  Please advise.  Thanks.
> It's strange that it would happen on the C64, which AFAIK is a 32-bit
> DSP. Did you test all rates and found 4 kbps to be the only one
> problematic? If possible, can you try encoding on one and decoding on
> the other, just to see whether the problem is when the encoder or the
> decoder? Also, just in case it helps (but I doubt it),
> try editing fixed_generic.h and change:
> #define SHL32(a,shift) ((a) << (shift))
> to
> #define SHL32(a,shift) ((spx_int32_t)(a) << (spx_int32_t)(shift))
> Cheers,
>     Jean-Marc

More information about the Speex-dev mailing list