Add compilation options to use the Pi's FPU and vector unit. This lessens CPU usage greatly

master
Christophe Jacquet 2014-04-19 23:25:13 +02:00
rodzic aa9d43f4ae
commit d199a74b2a
2 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -99,8 +99,8 @@ Reception works perfectly with all the devices above. RDS Surveyor reports no gr
CPU usage is as follows:
* without audio: 9%
* with mono audio: 42%
* with stereo audio: 54%
* with mono audio: 33%
* with stereo audio: 40%
CPU usage increases dramatically when adding audio because the program has to upsample the (unspecified) sample rate of the input audio file to 228 kHz, its internal operating sample rate. Doing so, it has to apply an FIR filter, which is costly.
@ -135,4 +135,4 @@ The samples are played by `pi_fm_rds.c` that is adapted from Richard Hirst's [Pi
--------
© [Christophe Jacquet](http://www.jacquet80.eu/) (F8FTK), 2014. Released under the GNU GPL v3.
© [Christophe Jacquet](http://www.jacquet80.eu/) (F8FTK), 2014. Released under the GNU GPL v3.

Wyświetl plik

@ -1,5 +1,5 @@
CC = gcc
CFLAGS = -Wall -std=gnu99 -c -g -O2
CFLAGS = -Wall -std=gnu99 -c -g -O3 -march=armv6 -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -ffast-math
app: rds.o waveforms.o pi_fm_rds.o fm_mpx.o
$(CC) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o -lm -lsndfile