Add ARM NEON support for main build.

This commit is contained in:
notaz 2012-12-09 17:28:49 +02:00
parent 7d283ab48d
commit 16edc7c80e
4 changed files with 39 additions and 1 deletions

View File

@ -285,10 +285,17 @@ endif
ifeq ($(HAVE_SINC), 1)
OBJ += audio/sinc.o
ifeq ($(HAVE_NEON),1)
OBJ += audio/sinc_neon.o
endif
else
OBJ += audio/hermite.o
endif
OBJ += audio/utils.o
ifeq ($(HAVE_NEON),1)
OBJ += audio/utils_neon.o
endif
ifneq ($(V),1)
Q := @
@ -338,6 +345,10 @@ endif
$(Q)$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
@$(if $(Q), $(shell echo echo CC $<),)
%.o: %.S config.h config.mk $(HEADERS)
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
@$(if $(Q), $(shell echo echo CC $<),)
install: $(TARGET)
mkdir -p $(DESTDIR)$(PREFIX)/bin 2>/dev/null || /bin/true
mkdir -p $(DESTDIR)/etc 2>/dev/null || /bin/true

View File

@ -19,6 +19,10 @@
#include <stdint.h>
#include <stddef.h>
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#if defined(__SSE2__)
#define audio_convert_s16_to_float audio_convert_s16_to_float_SSE2
#define audio_convert_float_to_s16 audio_convert_float_to_s16_SSE2

View File

@ -183,9 +183,11 @@ check_lib STRL -lc strlcpy
check_pkgconf PYTHON python3
check_macro NEON __ARM_NEON__
add_define_make OS "$OS"
# Creates config.mk and config.h.
VARS="ALSA OSS OSS_BSD OSS_LIB AL RSOUND ROAR JACK COREAUDIO PULSE SDL OPENGL GLES VG EGL KMS GBM DRM DYLIB GETOPT_LONG THREADS CG XML SDL_IMAGE LIBPNG DYNAMIC FFMPEG AVCODEC AVFORMAT AVUTIL SWSCALE CONFIGFILE FREETYPE XVIDEO X11 XEXT XF86VM XINERAMA NETPLAY NETWORK_CMD STDIN_CMD COMMAND SOCKET_LEGACY FBO STRL PYTHON FFMPEG_ALLOC_CONTEXT3 FFMPEG_AVCODEC_OPEN2 FFMPEG_AVIO_OPEN FFMPEG_AVFORMAT_WRITE_HEADER FFMPEG_AVFORMAT_NEW_STREAM FFMPEG_AVCODEC_ENCODE_AUDIO2 FFMPEG_AVCODEC_ENCODE_VIDEO2 SINC BSV_MOVIE VIDEOCORE"
VARS="ALSA OSS OSS_BSD OSS_LIB AL RSOUND ROAR JACK COREAUDIO PULSE SDL OPENGL GLES VG EGL KMS GBM DRM DYLIB GETOPT_LONG THREADS CG XML SDL_IMAGE LIBPNG DYNAMIC FFMPEG AVCODEC AVFORMAT AVUTIL SWSCALE CONFIGFILE FREETYPE XVIDEO X11 XEXT XF86VM XINERAMA NETPLAY NETWORK_CMD STDIN_CMD COMMAND SOCKET_LEGACY FBO STRL PYTHON FFMPEG_ALLOC_CONTEXT3 FFMPEG_AVCODEC_OPEN2 FFMPEG_AVIO_OPEN FFMPEG_AVFORMAT_WRITE_HEADER FFMPEG_AVFORMAT_NEW_STREAM FFMPEG_AVCODEC_ENCODE_AUDIO2 FFMPEG_AVCODEC_ENCODE_VIDEO2 SINC BSV_MOVIE VIDEOCORE NEON"
create_config_make config.mk $VARS
create_config_header config.h $VARS

View File

@ -144,6 +144,27 @@ EOF
}
}
check_macro() #$1 = HAVE_$1 $2 = macro name
{ tmpval="$(eval echo \$HAVE_$1)"
[ "$tmpval" = 'no' ] && return 0
ECHOBUF="Checking presence of predefined macro $2"
# echo -n "Checking presence of predefined macro $2"
cat << EOF > "$TEMP_C"
#ifndef $2
#error $2 is not defined
#endif
int main(void) { return 0; }
EOF
answer='no'
"$CC" -o "$TEMP_EXE" "$TEMP_C" $CFLAGS $INCLUDE_DIRS >>config.log 2>&1 && answer='yes'
eval HAVE_$1="$answer"; echo "$ECHOBUF ... $answer"
rm "$TEMP_C" "$TEMP_EXE" >/dev/null 2>&1
[ "$tmpval" = 'yes' ] && [ "$answer" = 'no' ] && {
echo "Build assumed that $2 is defined, but it's not. Exiting ..."
exit 1
}
}
check_switch_c() #$1 = HAVE_$1 $2 = switch $3 = critical error message [checked only if non-empty]
{ ECHOBUF="Checking for availability of switch $2 in $CC"
# echo -n "Checking for availability of switch $2 in $CC "