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

Stéphane Lesage stephane.lesage at ateis-international.com
Wed Nov 21 07:11:49 PST 2007

> -----Original Message-----
> From: Jean-Marc Valin [mailto:jean-marc.valin at usherbrooke.ca] 
> Sent: Wednesday, October 17, 2007 1:56 AM
> To: Stéphane Lesage
> Cc: speex-dev at xiph.org
> Subject: Re: [Speex-dev] Blackfin port on Visual DSP, Michael Shatz ?

Salut Jean-Marc,

After 1 month busy on other projects, I can finally answer you:
> Some things to check. Do you compile with VAR_ARRAYS? If not, 
> you can probably reduce the size of the managed stack. In 
> terms of data RAM, everything should fit into SRAM easily.

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...

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

> I've done some massive wideband RAM reduction in 1.2beta2. If 
> it's not working on Blackfin, then we'd need to investigate 
> that first.

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 ?

See myspeex.c code. It's pretty simple.

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

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.

> Depending on whether you're using all the 
> bit-rates, you might want to put only some of the codebooks 
> in SRAM (if you tell me what bit-rate, I can tell you which 
> codebooks you need).
> About code, it could be a bit more tricky and I don't know 
> whether everything can fit into SRAM.

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)

> > 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.

> > (there is also a problem with variables named "bank"
> > which is a compiler keyword...)
> You don't even need that part of the code actually. Try 
> getting the git/svn version where I actually did a split into 
> libspeex and libspeexdsp. The one you need is libspeex only.

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

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

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:

Stéphane Lesage
ATEIS International  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: myspeex.c
Type: application/octet-stream
Size: 1453 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20071121/3a00cf4e/myspeex.obj

More information about the Speex-dev mailing list