treewide: Enable VFP/NEON optimizations for aarch64 12169/head
authorJeffery To <jeffery.to@gmail.com>
Tue, 12 May 2020 08:03:07 +0000 (16:03 +0800)
committerJeffery To <jeffery.to@gmail.com>
Thu, 14 May 2020 14:45:07 +0000 (22:45 +0800)
For speexdsp, support for NEON on aarch64 was added in 1.2.0[1].

[1]: https://github.com/xiph/speexdsp/pull/8

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from commit dec17eb36c69435f97c6f5635dc57a76386db818)

libs/libpng/Makefile
libs/opus/Makefile
libs/speexdsp/Makefile
multimedia/ffmpeg/Makefile
sound/mpg123/Makefile

index 5e31a44b8005f4f158db51de3b18db14e188d478..7f9b175d64c45a3b0ffd7db4d61568122b63ff30 100644 (file)
@@ -40,7 +40,8 @@ TARGET_CFLAGS += $(FPIC)
 CONFIGURE_ARGS += \
        --enable-shared \
        --enable-static \
-       $(if $(findstring neon,$(CONFIG_CPU_TYPE)),--enable-hardware-optimizations=yes --enable-arm-neon=yes)
+       $(if $(findstring neon,$(CONFIG_CPU_TYPE))$(findstring aarch64,$(CONFIG_ARCH)), \
+               --enable-hardware-optimizations=yes --enable-arm-neon=yes)
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/bin
index 1c106128f3e31281a351772ea0fbe3f7e39278fc..02d9c50f0fa56773f10ada461c9943f70e0f5a80 100644 (file)
@@ -47,7 +47,7 @@ ifeq ($(CONFIG_SOFT_FLOAT),y)
                --enable-fixed-point
 endif
 
-ifneq ($(findstring neon,$(CONFIG_CPU_TYPE)),)
+ifneq ($(findstring neon,$(CONFIG_CPU_TYPE))$(findstring aarch64,$(CONFIG_ARCH)),)
        CONFIGURE_ARGS+= \
                --enable-fixed-point
 endif
index 284a1cab3e538bd1c57c6d71ed986b75d7347b01..14a350c3493caa9ff908d14e033f45c71792aa63 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=speexdsp
 PKG_VERSION:=1.2.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://downloads.us.xiph.org/releases/speex/
@@ -60,7 +60,6 @@ CONFIGURE_ARGS += \
        --enable-shared \
        --enable-static \
        --disable-examples \
-       $(if $(CONFIG_aarch64),--disable-neon) \
        $(if $(CONFIG_SOFT_FLOAT),--enable-fixed-point --disable-float-api)
 
 $(eval $(call BuildPackage,libspeexdsp))
index f0fece8e75c3aeca232ea350a2dbea41bea6da93..5e8a14861c500a79e75c5d0e5b5519bf1d05f4a8 100644 (file)
@@ -444,7 +444,7 @@ FFMPEG_CONFIGURE+= \
        --disable-fast-unaligned \
        --disable-runtime-cpudetect
 
-else ifneq ($(findstring arm,$(CONFIG_ARCH)),)
+else ifneq ($(findstring arm,$(CONFIG_ARCH))$(findstring aarch64,$(CONFIG_ARCH)),)
 FFMPEG_CONFIGURE+= \
        --disable-runtime-cpudetect
 # XXX: GitHub issue 3320 ppc cpu with fpu but no altivec (WNDR4700)
@@ -478,6 +478,13 @@ ifneq ($(findstring arm,$(CONFIG_ARCH)),)
        endif
 endif
 
+ifneq ($(findstring aarch64,$(CONFIG_ARCH)),)
+       FFMPEG_CONFIGURE+= \
+               --enable-lto \
+               --enable-neon \
+               --enable-vfp
+endif
+
 ifeq ($(ARCH),x86_64)
        FFMPEG_CONFIGURE+= --enable-lto
 endif
index 858ad15c9d51075c45c15662a1548aa494434120..7b4ab74eb6381886d44cb1dfdc2f581305375000 100644 (file)
@@ -70,6 +70,9 @@ ifeq ($(CONFIG_SOFT_FLOAT),y)
 else ifneq ($(findstring neon,$(CONFIG_CPU_TYPE)),)
        CONFIGURE_ARGS+= \
                --with-cpu=arm_fpu
+else ifneq ($(findstring aarch64,$(CONFIG_ARCH)),)
+       CONFIGURE_ARGS+= \
+               --with-cpu=aarch64
 else
        CONFIGURE_ARGS+= \
                --with-cpu=generic_fpu