Browse Source

treewide: Enable VFP/NEON optimizations for aarch64

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>
lilik-openwrt-22.03
Jeffery To 5 years ago
parent
commit
dec17eb36c
5 changed files with 19 additions and 9 deletions
  1. +3
    -2
      libs/libpng/Makefile
  2. +2
    -2
      libs/opus/Makefile
  3. +1
    -2
      libs/speexdsp/Makefile
  4. +9
    -2
      multimedia/ffmpeg/Makefile
  5. +4
    -1
      sound/mpg123/Makefile

+ 3
- 2
libs/libpng/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libpng PKG_NAME:=libpng
PKG_VERSION:=1.6.37 PKG_VERSION:=1.6.37
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@SF/libpng PKG_SOURCE_URL:=@SF/libpng
@ -40,7 +40,8 @@ TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \ CONFIGURE_ARGS += \
--enable-shared \ --enable-shared \
--enable-static \ --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 define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/bin $(INSTALL_DIR) $(1)/usr/bin


+ 2
- 2
libs/opus/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=opus PKG_NAME:=opus
PKG_VERSION:=1.3.1 PKG_VERSION:=1.3.1
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://archive.mozilla.org/pub/opus PKG_SOURCE_URL:=https://archive.mozilla.org/pub/opus
@ -47,7 +47,7 @@ ifeq ($(CONFIG_SOFT_FLOAT),y)
--enable-fixed-point --enable-fixed-point
endif endif
ifneq ($(findstring neon,$(CONFIG_CPU_TYPE)),)
ifneq ($(findstring neon,$(CONFIG_CPU_TYPE))$(findstring aarch64,$(CONFIG_ARCH)),)
CONFIGURE_ARGS+= \ CONFIGURE_ARGS+= \
--enable-fixed-point --enable-fixed-point
endif endif


+ 1
- 2
libs/speexdsp/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=speexdsp PKG_NAME:=speexdsp
PKG_VERSION:=1.2.0 PKG_VERSION:=1.2.0
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://downloads.us.xiph.org/releases/speex/ PKG_SOURCE_URL:=https://downloads.us.xiph.org/releases/speex/
@ -60,7 +60,6 @@ CONFIGURE_ARGS += \
--enable-shared \ --enable-shared \
--enable-static \ --enable-static \
--disable-examples \ --disable-examples \
$(if $(CONFIG_aarch64),--disable-neon) \
$(if $(CONFIG_SOFT_FLOAT),--enable-fixed-point --disable-float-api) $(if $(CONFIG_SOFT_FLOAT),--enable-fixed-point --disable-float-api)
$(eval $(call BuildPackage,libspeexdsp)) $(eval $(call BuildPackage,libspeexdsp))

+ 9
- 2
multimedia/ffmpeg/Makefile View File

@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ffmpeg PKG_NAME:=ffmpeg
PKG_VERSION:=4.2.2 PKG_VERSION:=4.2.2
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://ffmpeg.org/releases/ PKG_SOURCE_URL:=https://ffmpeg.org/releases/
@ -411,7 +411,7 @@ FFMPEG_CONFIGURE+= \
--disable-fast-unaligned \ --disable-fast-unaligned \
--disable-runtime-cpudetect --disable-runtime-cpudetect
else ifneq ($(findstring arm,$(CONFIG_ARCH)),)
else ifneq ($(findstring arm,$(CONFIG_ARCH))$(findstring aarch64,$(CONFIG_ARCH)),)
FFMPEG_CONFIGURE+= \ FFMPEG_CONFIGURE+= \
--disable-runtime-cpudetect --disable-runtime-cpudetect
# XXX: GitHub issue 3320 ppc cpu with fpu but no altivec (WNDR4700) # XXX: GitHub issue 3320 ppc cpu with fpu but no altivec (WNDR4700)
@ -438,6 +438,13 @@ ifneq ($(findstring arm,$(CONFIG_ARCH)),)
endif endif
endif endif
ifneq ($(findstring aarch64,$(CONFIG_ARCH)),)
FFMPEG_CONFIGURE+= \
--enable-lto \
--enable-neon \
--enable-vfp
endif
ifeq ($(ARCH),x86_64) ifeq ($(ARCH),x86_64)
FFMPEG_CONFIGURE+= --enable-lto FFMPEG_CONFIGURE+= --enable-lto
endif endif


+ 4
- 1
sound/mpg123/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=mpg123 PKG_NAME:=mpg123
PKG_VERSION:=1.25.13 PKG_VERSION:=1.25.13
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/mpg123 PKG_SOURCE_URL:=@SF/mpg123
@ -70,6 +70,9 @@ ifeq ($(CONFIG_SOFT_FLOAT),y)
else ifneq ($(findstring neon,$(CONFIG_CPU_TYPE)),) else ifneq ($(findstring neon,$(CONFIG_CPU_TYPE)),)
CONFIGURE_ARGS+= \ CONFIGURE_ARGS+= \
--with-cpu=arm_fpu --with-cpu=arm_fpu
else ifneq ($(findstring aarch64,$(CONFIG_ARCH)),)
CONFIGURE_ARGS+= \
--with-cpu=aarch64
else else
CONFIGURE_ARGS+= \ CONFIGURE_ARGS+= \
--with-cpu=generic_fpu --with-cpu=generic_fpu


Loading…
Cancel
Save