[Speex-dev] Blackfin port on Visual DSP, Michael Shatz ?

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Wed Nov 21 07:33:49 PST 2007


> No I didn't know this macro.
> 
> According to the sources, I understand it's destined to compilers supporting
> run-time size for local arrays on the stack.
> 
> But this is not documented (API or user manual), and does not appear in any
> header file.
> It should appear at least in arch.h, commented and defaulting to #undef...

Actually, it's meant to be auto-detected by the configure script, which
is why I didn't bother. But I guess I'll put that on my documentation
TODO list.

> BTW, do you have figures on the stack-usage of the different Speex modules ?

Stack usage for the codec depends a lot on the actual options used. Can
range from 2 kB to maybe around 10 kB. As for other modules, they don't
use much stack because most of the temporary variables are allocated in
the state (fixing this is also on todo list).

> I compiled 1.2beta1, beta2, and the SVN from yesterday.
> Beta1 works fine, but starting from beta2, the sound is scrambled...
> Of course, project options are identical.
> 
> Did you change something in the API ?
> Do I need to initialize extra things ?

Can you test with testenc just to make sure? The only thing I can think
of is that some of the assembly that got written/modified between beta1
and beta2 broke it (maybe it's just for VDSP). Could you try doing a
bisection in svn and pinpoint which commit is causing problems?

> I noticed a very interesting thing: the echo-cancellation totally removes
> this problem !!!

You mean that the codec works if you add the echo canceller??? Could be
a memory issue...

> How can I help you debug this thing ?
> My platform is Blackfin fixed-point on visual DSP.
> I can't use the debug-out on VDSP (too slow), but my custom-board has IP and
> RS232 interfaces which could help.

Forget about the debugger. As long as you have one version that works
and one that doesn't, the easiest is to just bisect until you find the
commit that breaks things. At that point, the problem should be obvious
(my commits are generally small).

> Actually performance is not my priority for the moment,
> as long as Encoder + Echo cancellation + UDP + Decoder runs in real-time
> on a 400 MHz BF-537.
> (I'll see later if I can use a slower processor)

Shouldn't be a problem.

>>> Jean-Marc, I don't want to come back on the debate, but I think you 
>>> should include the VDSP architecture.
>> What do you mean by "the VDSP architecture"?
> 
> The Visual DSP++ assembler/compiler/linker tools.

What does that (adding support) involve?

> I also need the echo-cancellation.
> and actually I don't know in which files it's implemented !

echo canceller is mdf.c and if you was additional suppression of the
remaining echo, it's preprocess.c

> So I just renamed the variables/members to "bnk".
> Can you include these modifications ?

I'll put that on the todo as well.

> BTW, everything is in the /libspeex directory...
> It does not look like we have 2 projects.
> Moreover you also have examples in this directory.
> Most users using IDEs are not familiar with make-files
> and don't know what files to include in their projects.
> (already seen this on the mailing-list)
> 
> Maybe you should split it into:
> /libspeex
> /libspeexdsp
> /tests

There's still a bit of cleanup left to do here. Actually, many of the
header files are shared, so I'm still not sure what to do. todo...

Cheers,

	Jean-Marc


More information about the Speex-dev mailing list