From 5ae7ac49f08a179e4f054d99fcfc9dce78d26e58 Mon Sep 17 00:00:00 2001 From: hkuang Date: Thu, 7 Nov 2013 15:50:31 -0800 Subject: Roll latest libvpx into Android. The lastest libvpx just added multithread tile decoding support. Checkout is from master: abdefeaa89a0908327518e5ca75c935c66b2e1aa Bug:11576718 Change-Id: Icbe5430633e179b8dc6d419e280ad7ebd3cad4a0 --- libvpx/build/make/Makefile | 4 ++++ libvpx/build/make/configure.sh | 29 ++++++++++++++++++++++++++--- libvpx/build/make/rtcd.sh | 10 ++++++++-- libvpx/build/make/thumb.pm | 2 +- 4 files changed, 39 insertions(+), 6 deletions(-) (limited to 'libvpx/build/make') 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]", -- cgit v1.2.3