<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Jean-Marc,</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">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.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">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.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Thanks,</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Andy<BR><BR><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca><BR>To: Andy Ngo <ndno72-speex@yahoo.com><BR>Cc: speex-dev@xiph.org<BR>Sent: Wednesday, December 12, 2007 3:52:33 PM<BR>Subject: Re: [Speex-dev] 4kbps sounds robotic on TMS320C64<BR><BR>> I'm currently working on the TI DaVinci processor, which has an<BR>> ARM926 processor and a TMS320C64+ DSP in it. I have been using Speex<BR>> 6kbps (narrowband, quality=2, complexity=1, perceptual_enh=0) on the<BR>> DSP C64+ side without any issues; the voice sounds very good for such<BR>> a low bandwidth requirement. However, recently, I tried out the<BR>> 4kbps mode (changing quality to 1) on the DSP and it sounds robotic;<BR>> if I ported the same 4kbps code to use on the ARM926 (GPP) side of<BR>> the DaVinci, it sounds fine (no robotic artifacts).
<BR><BR>I assume both builds had fixed-point enabled, right?<BR><BR>> So this leads me<BR>> to think somehow the Speex code is not working properly for 4kbps<BR>> (and lower) on the DSP C64+ processor side (6kbps sounds good as<BR>> mentioned above). I followed the ti speex_C64_test trunk example<BR>> packaged with the Speex code; I used the example config.h and<BR>> Makefile for my build. Am I doing something wrong with the<BR>> compilation of the Speex code for the DSP C64+? I tried changing the<BR>> complexity to 10 and turning on perceptual enhancement and it still<BR>> sounds robotic; again, like I mentioned above, the ARM side sounds<BR>> fine with the 4kbps mode. Please advise. Thanks.<BR><BR>It's strange that it would happen on the C64, which AFAIK is a 32-bit<BR>DSP. Did you test all rates and found 4 kbps to be the only one<BR>problematic? If possible, can you try encoding on one and
decoding on<BR>the other, just to see whether the problem is when the encoder or the<BR>decoder? Also, just in case it helps (but I doubt it),<BR><BR>try editing fixed_generic.h and change:<BR>#define SHL32(a,shift) ((a) << (shift))<BR>to<BR>#define SHL32(a,shift) ((spx_int32_t)(a) << (spx_int32_t)(shift))<BR><BR>Cheers,<BR><BR> Jean-Marc<BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR></DIV></div></body></html>