Hi all, 

thank you for your advise. I looked through the Makefile and struggled at : 
LIBS = libstm32f4.a -lg -lnosys -lm 
I could not find anything about these options . What are they doing? 

I tried to optimize the Code for arm-Cpus with the usage of arm_math.h instead 
of math.h. Alone the replacement of the sine and cosine functions could achieve 
a speedup of 10%. Other optimizations are not so easy., but the usage of e.g. 
loop unrolled vector multiplications should provide another nice speed up. 
Another big optimization potential is in the kis_fft_functions. I saw that the 
other open-source audio-codec Opus provide special compiler-options for 
arm-cpus for that functions. Do you plan to perform further optimizations ? 

Thanks in advance, 
Stefan 

----- Ursprüngliche Mail ----- 
Von: "Andy Wood" <[email protected]> 
An: "[email protected]" 
<[email protected]> 
Gesendet: Montag, 9. März 2015 14:49:28 GMT +01:00 
Amsterdam/Berlin/Bern/Rom/Stockholm/Wien 
Betreff: Re: [Freetel-codec2] Codec 2 on ARM M4 



Make sure you have optimisation set to -Ofast or -O3 and benchmark it to check 
what is the fastest in your particular compiler. 

See https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html 

Andy. 




> Date: Mon, 9 Mar 2015 20:38:25 +1030 
> From: [email protected] 
> To: [email protected] 
> Subject: Re: [Freetel-codec2] Codec 2 on ARM M4 
> 
> Hi Stefan, 
> 
> I'm surprised that a 120MHz CPU is struggling, as we only used a 
> fraction (maybe 50%) of the 168MHz ST32F4. 
> 
> Nothing special for the STM32F4, I re-organised some C code, used single 
> prec trig functions (cosf, sinf etc) and that is now all part of the 
> regular Codec 2 code in the src directory that runs on all platforms. 
> Didn't even end up using the STM fft library as in my unit tests it was 
> slower than kiss fft (although I may have screwed up there). 
> 
> You can see the gcc options in codec2-dev/stm32/Makefile. 
> 
> Sue you have hard float enabled for your uC? 
> 
> - David 
> 
> On 09/03/15 18:26, Stefan Ereth wrote: 
> > Hi all, 
> > 
> > I'm trying to port codec2 to a Freescale microcontroller. This board has 
> > 120 MHz CPU and a floating point unit. At the moment I would need 110% CPU 
> > speed for decoding codec2 in real time. In the YouTube Video "Embedding 
> > Codec 2: open source speech coding on a low-cost microcontroller" David 
> > Rowe presented an implementation on a STM32F4 with encoding and decoding in 
> > real-time. He mentioned that some optimizations are needed for this 
> > processing speed. I couldn't find something like that in the stm32 folder, 
> > but some switches over defines for calculations in time- or 
> > frequency-domain in the processing chain. Also the filter length could be 
> > reduced for low perfomance cpus. 
> > 
> > Are there optimised settings for microcontrollers? 
> > Do you use arm_math.h for arm specific sin/cos/fft functions? 
> > 
> > 
> > Thanks in advance, 
> > Stefan 
> > 
> > ------------------------------------------------------------------------------
> >  
> > Dive into the World of Parallel Programming The Go Parallel Website, 
> > sponsored 
> > by Intel and developed in partnership with Slashdot Media, is your hub for 
> > all 
> > things parallel software development, from weekly thought leadership blogs 
> > to 
> > news, videos, case studies, tutorials and more. Take a look and join the 
> > conversation now. http://goparallel.sourceforge.net/ 
> > _______________________________________________ 
> > Freetel-codec2 mailing list 
> > [email protected] 
> > https://lists.sourceforge.net/lists/listinfo/freetel-codec2 
> > 
> 
> ------------------------------------------------------------------------------
>  
> Dive into the World of Parallel Programming The Go Parallel Website, 
> sponsored 
> by Intel and developed in partnership with Slashdot Media, is your hub for 
> all 
> things parallel software development, from weekly thought leadership blogs to 
> news, videos, case studies, tutorials and more. Take a look and join the 
> conversation now. http://goparallel.sourceforge.net/ 
> _______________________________________________ 
> Freetel-codec2 mailing list 
> [email protected] 
> https://lists.sourceforge.net/lists/listinfo/freetel-codec2 

_______________________________________________ Freetel-codec2 mailing list 
[email protected] 
https://lists.sourceforge.net/lists/listinfo/freetel-codec2
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Freetel-codec2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freetel-codec2

Reply via email to