Add patch to fix log2f problems with latest android ndk.
This commit is contained in:
parent
9a0ad7cd86
commit
f0bd8976ba
2 changed files with 46 additions and 1 deletions
6
Makefile
6
Makefile
|
@ -156,7 +156,7 @@ clean-ffmpeg:
|
||||||
|
|
||||||
#x264
|
#x264
|
||||||
ifeq ($(BUILD_X264), 1)
|
ifeq ($(BUILD_X264), 1)
|
||||||
BUILD_X264_DEPS=$(X264_BUILD_DIR)/arm/libx264.a
|
BUILD_X264_DEPS=$(X264_SRC_DIR)/log2f_fix_patch_applied.txt $(X264_BUILD_DIR)/arm/libx264.a
|
||||||
ifeq ($(BUILD_FOR_X86), 1)
|
ifeq ($(BUILD_FOR_X86), 1)
|
||||||
BUILD_X264_DEPS+=$(X264_BUILD_DIR)/x86/libx264.a
|
BUILD_X264_DEPS+=$(X264_BUILD_DIR)/x86/libx264.a
|
||||||
endif
|
endif
|
||||||
|
@ -166,6 +166,10 @@ X264_CONFIGURE_OPTIONS=
|
||||||
X264_ARM_CONFIGURE_OPTIONS=--host=arm-none-linux-gnueabi --sysroot=$(ARM_SYSROOT) --cross-prefix=$(ARM_TOOLCHAIN_PATH) --enable-pic
|
X264_ARM_CONFIGURE_OPTIONS=--host=arm-none-linux-gnueabi --sysroot=$(ARM_SYSROOT) --cross-prefix=$(ARM_TOOLCHAIN_PATH) --enable-pic
|
||||||
X264_X86_CONFIGURE_OPTIONS=--host=i686-linux-gnueabi --sysroot=$(X86_SYSROOT) --cross-prefix=$(X86_TOOLCHAIN_PATH)
|
X264_X86_CONFIGURE_OPTIONS=--host=i686-linux-gnueabi --sysroot=$(X86_SYSROOT) --cross-prefix=$(X86_TOOLCHAIN_PATH)
|
||||||
|
|
||||||
|
$(X264_SRC_DIR)/log2f_fix_patch_applied.txt:
|
||||||
|
@patch -p0 < $(TOPDIR)/patches/x264_log2f_fix.patch
|
||||||
|
touch $@
|
||||||
|
|
||||||
$(X264_BUILD_DIR)/arm/libx264.a:
|
$(X264_BUILD_DIR)/arm/libx264.a:
|
||||||
mkdir -p $(X264_BUILD_DIR)/arm && \
|
mkdir -p $(X264_BUILD_DIR)/arm && \
|
||||||
cd $(X264_SRC_DIR) && \
|
cd $(X264_SRC_DIR) && \
|
||||||
|
|
41
patches/x264_log2f_fix.patch
Normal file
41
patches/x264_log2f_fix.patch
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
diff -urN submodules/externals/x264/common/osdep.h.orig submodules/externals/x264/common/osdep.h
|
||||||
|
--- submodules/externals/x264/common/osdep.h.orig 2014-02-06 13:56:59.243663951 +0100
|
||||||
|
+++ submodules/externals/x264/common/osdep.h 2014-02-06 13:57:17.215685078 +0100
|
||||||
|
@@ -35,11 +35,6 @@
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
-#if !HAVE_LOG2F
|
||||||
|
-#define log2f(x) (logf(x)/0.693147180559945f)
|
||||||
|
-#define log2(x) (log(x)/0.693147180559945)
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <io.h> // _setmode()
|
||||||
|
#include <fcntl.h> // _O_BINARY
|
||||||
|
@@ -55,6 +60,11 @@
|
||||||
|
#include <math.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#if !HAVE_LOG2F
|
||||||
|
+#define log2f(x) (logf(x)/0.693147180559945f)
|
||||||
|
+#define log2(x) (log(x)/0.693147180559945)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#if (defined(__GNUC__) || defined(__INTEL_COMPILER)) && (ARCH_X86 || ARCH_X86_64)
|
||||||
|
#define HAVE_X86_INLINE_ASM 1
|
||||||
|
#endif
|
||||||
|
diff -urN submodules/externals/x264/configure.orig submodules/externals/x264/configure
|
||||||
|
--- submodules/externals/x264/configure.orig 2014-02-06 13:56:59.231663937 +0100
|
||||||
|
+++ submodules/externals/x264/configure 2014-02-06 13:57:17.219685083 +0100
|
||||||
|
@@ -816,10 +816,6 @@
|
||||||
|
fi
|
||||||
|
[ "$thread" != "no" ] && define HAVE_THREAD
|
||||||
|
|
||||||
|
-if cc_check "math.h" "-Werror" "return log2f(2);" ; then
|
||||||
|
- define HAVE_LOG2F
|
||||||
|
-fi
|
||||||
|
-
|
||||||
|
if [ "$vis" = "yes" ] ; then
|
||||||
|
save_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS -I/usr/X11R6/include"
|
Loading…
Reference in a new issue