<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">Tried your fixed_generic.h change but that didn't help.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Andy<BR><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Andy Ngo &lt;ndno72-speex@yahoo.com&gt;<BR>To: Jean-Marc Valin &lt;jean-marc.valin@usherbrooke.ca&gt;<BR>Cc: speex-dev@xiph.org<BR>Sent: Wednesday, December 12, 2007 4:13:35 PM<BR>Subject: Re: [Speex-dev] 4kbps sounds robotic on TMS320C64<BR><BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">
<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">&nbsp;</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).&nbsp; I haven't tried anything lower than 4kbps; like I mentioned, 6kbps sounds fine so it's very strange.&nbsp; 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">&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">It seems to be in the encoder.&nbsp; On the ARM side, I encoded a 8Khz 16-bit mono sample&nbsp;in 4kbps mode, decoded it, and playback sounds fine.&nbsp; 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.&nbsp; I wonder if I'm missing some macros (#define 's) when compiling&nbsp;for the DSP side, but this can't be the case since 6kbps sounds fine.&nbsp; 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">&nbsp;</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 &lt;jean-marc.valin@usherbrooke.ca&gt;<BR>To: Andy Ngo &lt;ndno72-speex@yahoo.com&gt;<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>&gt; I'm currently working on the TI DaVinci processor, which has an<BR>&gt; ARM926 processor and a TMS320C64+ DSP in it.&nbsp; I have been using Speex<BR>&gt; 6kbps (narrowband, quality=2, complexity=1, perceptual_enh=0) on the<BR>&gt; DSP C64+ side without any issues; the voice sounds very good for such<BR>&gt; a low bandwidth requirement.&nbsp; However, recently, I tried out the<BR>&gt; 4kbps mode (changing quality to 1) on the DSP and it sounds robotic;<BR>&gt; if I ported the same 4kbps code to use on the ARM926 (GPP) side of<BR>&gt; the DaVinci, it sounds fine (no robotic artifacts).
 <BR><BR>I assume both builds had fixed-point enabled, right?<BR><BR>&gt; So this leads me<BR>&gt; to think somehow the Speex code is not working properly for 4kbps<BR>&gt; (and lower) on the DSP C64+ processor side (6kbps sounds good as<BR>&gt; mentioned above).&nbsp; I followed the ti speex_C64_test trunk example<BR>&gt; packaged with the Speex code; I used the example config.h and<BR>&gt; Makefile for my build.&nbsp; Am I doing something wrong with the<BR>&gt; compilation of the Speex code for the DSP C64+?&nbsp; I tried changing the<BR>&gt; complexity to 10 and turning on perceptual enhancement and it still<BR>&gt; sounds robotic; again, like I mentioned above, the ARM side sounds<BR>&gt; fine with the 4kbps mode.&nbsp; Please advise.&nbsp; 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) &lt;&lt; (shift))<BR>to<BR>#define SHL32(a,shift) ((spx_int32_t)(a) &lt;&lt; (spx_int32_t)(shift))<BR><BR>Cheers,<BR><BR>&nbsp;&nbsp;&nbsp; Jean-Marc<BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR></DIV></DIV></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR></DIV></div></body></html>