summaryrefslogtreecommitdiffstats
path: root/libvpx/build
diff options
context:
space:
mode:
Diffstat (limited to 'libvpx/build')
-rw-r--r--libvpx/build/make/Makefile4
-rwxr-xr-xlibvpx/build/make/configure.sh29
-rwxr-xr-xlibvpx/build/make/rtcd.sh10
-rw-r--r--libvpx/build/make/thumb.pm2
4 files changed, 39 insertions, 6 deletions
diff --git a/libvpx/build/make/Makefile b/libvpx/build/make/Makefile
index 7a25239..030c1b5 100644
--- a/libvpx/build/make/Makefile
+++ b/libvpx/build/make/Makefile
@@ -114,6 +114,10 @@ $(BUILD_PFX)%_ssse3.c.d: CFLAGS += -mssse3
$(BUILD_PFX)%_ssse3.c.o: CFLAGS += -mssse3
$(BUILD_PFX)%_sse4.c.d: CFLAGS += -msse4.1
$(BUILD_PFX)%_sse4.c.o: CFLAGS += -msse4.1
+$(BUILD_PFX)%_avx.c.d: CFLAGS += -mavx
+$(BUILD_PFX)%_avx.c.o: CFLAGS += -mavx
+$(BUILD_PFX)%_avx2.c.d: CFLAGS += -mavx2
+$(BUILD_PFX)%_avx2.c.o: CFLAGS += -mavx2
$(BUILD_PFX)%.c.d: %.c
$(if $(quiet),@echo " [DEP] $@")
diff --git a/libvpx/build/make/configure.sh b/libvpx/build/make/configure.sh
index bb7ab41..b43a4ec 100755
--- a/libvpx/build/make/configure.sh
+++ b/libvpx/build/make/configure.sh
@@ -1060,9 +1060,11 @@ EOF
CC=${CC:-icc}
LD=${LD:-icc}
setup_gnu_toolchain
- add_cflags -use-msasm -use-asm
- add_ldflags -i-static
- enabled x86_64 && add_cflags -ipo -no-prec-div -static -xSSE2 -axSSE2
+ add_cflags -use-msasm # remove -use-msasm too?
+ # add -no-intel-extensions to suppress warning #10237
+ # refer to http://software.intel.com/en-us/forums/topic/280199
+ add_ldflags -i-static -no-intel-extensions
+ enabled x86_64 && add_cflags -ipo -static -O3 -no-prec-div
enabled x86_64 && AR=xiar
case ${tune_cpu} in
atom*)
@@ -1089,6 +1091,15 @@ EOF
# Skip the check by setting AS arbitrarily
AS=msvs
msvs_arch_dir=x86-msvs
+ vc_version=${tgt_cc##vs}
+ case $vc_version in
+ 7|8|9)
+ echo "${tgt_cc} does not support avx/avx2, disabling....."
+ RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx --disable-avx2 "
+ soft_disable avx
+ soft_disable avx2
+ ;;
+ esac
;;
esac
@@ -1106,6 +1117,18 @@ EOF
soft_enable sse4_1
fi
+ if enabled gcc && ! disabled avx && ! check_cflags -mavx; then
+ RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx "
+ else
+ soft_enable avx
+ fi
+
+ if enabled gcc && ! disabled avx2 && ! check_cflags -mavx2; then
+ RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx2 "
+ else
+ soft_enable avx2
+ fi
+
case "${AS}" in
auto|"")
which nasm >/dev/null 2>&1 && AS=nasm
diff --git a/libvpx/build/make/rtcd.sh b/libvpx/build/make/rtcd.sh
index 6cc3684..2967b5a 100755
--- a/libvpx/build/make/rtcd.sh
+++ b/libvpx/build/make/rtcd.sh
@@ -290,9 +290,15 @@ static void setup_rtcd_internal(void)
{
$(set_function_pointers c $ALL_ARCHS)
#if HAVE_DSPR2
+#if CONFIG_VP8
void dsputil_static_init();
dsputil_static_init();
#endif
+#if CONFIG_VP9
+void vp9_dsputil_static_init();
+vp9_dsputil_static_init();
+#endif
+#endif
}
#endif
$(common_bottom)
@@ -321,11 +327,11 @@ EOF
require c
case $arch in
x86)
- ALL_ARCHS=$(filter mmx sse sse2 sse3 ssse3 sse4_1)
+ ALL_ARCHS=$(filter mmx sse sse2 sse3 ssse3 sse4_1 avx avx2)
x86
;;
x86_64)
- ALL_ARCHS=$(filter mmx sse sse2 sse3 ssse3 sse4_1)
+ ALL_ARCHS=$(filter mmx sse sse2 sse3 ssse3 sse4_1 avx avx2)
REQUIRES=${REQUIRES:-mmx sse sse2}
require $(filter $REQUIRES)
x86
diff --git a/libvpx/build/make/thumb.pm b/libvpx/build/make/thumb.pm
index f347287..e1f34c1 100644
--- a/libvpx/build/make/thumb.pm
+++ b/libvpx/build/make/thumb.pm
@@ -47,7 +47,7 @@ sub FixThumbInstructions($$)
# this is used, it's used for two subsequent load instructions,
# where a hand-written version of it could merge two subsequent
# add and sub instructions.
- s/^(\s*)((ldr|str)(ne)?)(\s+)(r\d+),\s*\[(\w+), -([^\]]+)\]/$1sub$4$5$7, $7, $8\n$1$2$5$6, [$7]\n$1add$4$5$7, $7, $8/g;
+ s/^(\s*)((ldr|str|pld)(ne)?)(\s+)(r\d+,\s*)?\[(\w+), -([^\]]+)\]/$1sub$4$5$7, $7, $8\n$1$2$5$6\[$7\]\n$1add$4$5$7, $7, $8/g;
# Convert register post indexing to a separate add instruction.
# This converts "ldrneb r9, [r0], r2" into "ldrneb r9, [r0]",