Commit fc714d1f authored by Philippe Gorley's avatar Philippe Gorley Committed by Adrien Béraud

android: add x264

Disable assembly on android x86_64 due to reloc errors.

Use x264 and FFmpeg's internal substitutes for log2 and log2f on android
32 bits.

Change-Id: I0c8b1a218d50b18e6340507e92ce481c4fedc75b
parent 7bdaca8a
From c9578eb29da666b71d6aab6fac79c26631bec603 Mon Sep 17 00:00:00 2001
From: philippegorley <gorley.philippe@gmail.com>
Date: Tue, 25 Jul 2017 13:00:19 -0400
Subject: [PATCH] use internal log2/log2f
---
configure | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 9b5789a..a44d8d6 100755
--- a/configure
+++ b/configure
@@ -1926,8 +1926,6 @@ MATH_FUNCS="
ldexpf
llrint
llrintf
- log2
- log2f
log10f
lrint
lrintf
@@ -6835,6 +6833,9 @@ print_config CONFIG_ "$config_files" $CONFIG_LIST \
$CONFIG_EXTRA \
$ALL_COMPONENTS \
+echo "#define HAVE_LOG2 0" >> $TMPH
+echo "#define HAVE_LOG2F 0" >> $TMPH
+
echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH
echo "endif # FFMPEG_CONFIG_MAK" >> config.mak
--
2.7.4
......@@ -211,6 +211,14 @@ ffmpeg: ffmpeg-$(FFMPEG_HASH).tar.gz .sum-ffmpeg
ifdef HAVE_MACOSX
$(APPLY) $(SRC)/ffmpeg/0004-add-avfcapture-device.patch
$(APPLY) $(SRC)/ffmpeg/0005-add-avfgrab-device.patch
endif
ifdef HAVE_ANDROID
ifeq ($(ARCH),arm)
$(APPLY) $(SRC)/ffmpeg/0001-use-internal-log2-log2f.patch
endif
ifeq ($(ARCH),i386)
$(APPLY) $(SRC)/ffmpeg/0001-use-internal-log2-log2f.patch
endif
endif
$(MOVE)
......
From 649b319cfa3fc9bb4b9a93264cff70c187336093 Mon Sep 17 00:00:00 2001
From: philippegorley <gorley.philippe@gmail.com>
Date: Fri, 28 Jul 2017 09:45:23 -0400
Subject: [PATCH] use internal log2f
---
configure | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index ec9389d..02b05c7 100755
--- a/configure
+++ b/configure
@@ -1033,9 +1033,9 @@ if [ "$thread" = "posix" ]; then
fi
[ "$thread" != "no" ] && define HAVE_THREAD
-if cc_check "math.h" "-Werror" "return log2f(2);" ; then
- define HAVE_LOG2F
-fi
+#if cc_check "math.h" "-Werror" "return log2f(2);" ; then
+ define HAVE_LOG2F 0
+#fi
if [ "$SYS" != "WINDOWS" ] && cpp_check "sys/mman.h unistd.h" "" "defined(MAP_PRIVATE)"; then
define HAVE_MMAP
--
2.7.4
......@@ -31,6 +31,13 @@ X264CONF += --cross-prefix="$(CROSS_COMPILE)"
endif
endif
# android x86_64 has reloc errors related to assembly optimizations
ifdef HAVE_ANDROID
ifeq ($(ARCH),x86_64)
X264CONF += --disable-asm
endif
endif
$(TARBALLS)/x264-$(X264_HASH).tar.xz:
$(call download_git,$(X264_GITURL),master,$(X264_HASH))
......@@ -44,6 +51,14 @@ x264: x264-$(X264_HASH).tar.xz .sum-x264
(cd $@-$(X264_HASH) && tar x $(if ${BATCH_MODE},,-v) --strip-components=1 -f ../$<)
ifdef HAVE_IOS
$(APPLY) $(SRC)/x264/remove-align.patch
endif
ifdef HAVE_ANDROID
ifeq ($(ARCH),arm)
$(APPLY) $(SRC)/x264/0001-use-internal-log2f.patch
endif
ifeq ($(ARCH),i386)
$(APPLY) $(SRC)/x264/0001-use-internal-log2f.patch
endif
endif
$(UPDATE_AUTOCONFIG)
$(MOVE)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment