[x264-devel] [PATCH 3/6] vsx: Prepare to have different files for VSX and old Altivec
Luca Barbato
lu_zero at gentoo.org
Tue Nov 1 23:16:15 CET 2016
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
---
Makefile | 6 ++++++
configure | 19 ++++++++++++++++---
2 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index d0b1633..3f41bc5 100644
--- a/Makefile
+++ b/Makefile
@@ -108,9 +108,15 @@ endif
# AltiVec optims
ifeq ($(SYS_ARCH),PPC)
ifneq ($(AS),)
+ifeq ($(HAVE_VSX),yes)
SRCS += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c \
common/ppc/quant.c common/ppc/deblock.c \
common/ppc/predict.c
+else
+SRCS += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c \
+ common/ppc/quant.c common/ppc/deblock.c \
+ common/ppc/predict.c
+endif
endif
endif
diff --git a/configure b/configure
index 346a580..fd5c209 100755
--- a/configure
+++ b/configure
@@ -357,6 +357,7 @@ chroma_format="all"
compiler="GNU"
compiler_style="GNU"
opencl="yes"
+vsx="auto"
CFLAGS="$CFLAGS -Wall -I. -I\$(SRCPATH)"
LDFLAGS="$LDFLAGS"
@@ -474,6 +475,9 @@ for opt do
--host=*)
host="$optarg"
;;
+ --disable-vsx)
+ vsx="no"
+ ;;
--disable-opencl)
opencl="no"
;;
@@ -737,9 +741,13 @@ case $host_cpu in
CFLAGS="$CFLAGS -maltivec -mabi=altivec"
define HAVE_ALTIVEC_H
fi
- if cc_check "" "-mvsx" ; then
- CFLAGS="$CFLAGS -mvsx"
- define HAVE_VSX
+ if [ "$vsx" != "no" ] ; then
+ vsx="no"
+ if cc_check "" "-mvsx" ; then
+ CFLAGS="$CFLAGS -mvsx"
+ define HAVE_VSX
+ vsx="yes"
+ fi
fi
fi
;;
@@ -792,6 +800,10 @@ case $host_cpu in
;;
esac
+if [ "$vsx" != "yes" ] ; then
+ vsx="no"
+fi
+
if [ $SYS = WINDOWS ]; then
if ! rc_check "0 RCDATA {0}" ; then
RC=""
@@ -1396,6 +1408,7 @@ PROF_GEN_LD=$PROF_GEN_LD
PROF_USE_CC=$PROF_USE_CC
PROF_USE_LD=$PROF_USE_LD
HAVE_OPENCL=$opencl
+HAVE_VSX=$vsx
EOF
if [ $compiler_style = MS ]; then
--
2.9.2
More information about the x264-devel
mailing list