diff --git a/.gitmodules b/.gitmodules index d05d4ab10..ccf14f7ba 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,3 +25,6 @@ [submodule "submodules/externals/libswscale"] path = submodules/externals/libswscale url = git://git.ffmpeg.org/libswscale +[submodule "submodules/externals/x264"] + path = submodules/externals/x264 + url = git://git.videolan.org/x264.git diff --git a/jni/Android.mk b/jni/Android.mk index 22bd02fdf..8c4ef8067 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -19,6 +19,7 @@ include $(root-dir)/submodules/linphone/mediastreamer2/build/android/Android.mk ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) include $(root-dir)/submodules/msilbc/Android.mk include $(root-dir)/submodules/externals/build/ffmpeg/Android.mk +include $(root-dir)/submodules/externals/build/x264/Android.mk endif include $(root-dir)/submodules/linphone/build/android/Android.mk diff --git a/jni/Application.mk b/jni/Application.mk index ad5a65625..d78f951ee 100644 --- a/jni/Application.mk +++ b/jni/Application.mk @@ -3,7 +3,7 @@ APP_MODULES :=libspeex libgsm libortp libosip2 libeXosip2 libmediastreamer2 ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) -APP_MODULES +=libmsilbc libavutil libavcore libavcodec libswscale +APP_MODULES +=libmsilbc libavutil libavcore libavcodec libswscale libx264 endif APP_BUILD_SCRIPT:=$(call my-dir)/Android.mk APP_PLATFORM := android-8 diff --git a/submodules/externals/build/x264/Android.mk b/submodules/externals/build/x264/Android.mk new file mode 100644 index 000000000..2943c71b1 --- /dev/null +++ b/submodules/externals/build/x264/Android.mk @@ -0,0 +1,61 @@ +# +# List of compiled files and related options obtained using +# ./configure --cross-prefix=arm-none-linux-gnueabi- --host=arm-none-linux-gnueabi --disable-pthread --enable-pic +# && make +# + +LOCAL_PATH:= $(call my-dir)/../../x264 +include $(CLEAR_VARS) + +LOCAL_MODULE := libx264 + +LOCAL_SRC_FILES = \ + common/mc.c \ + common/predict.c \ + common/pixel.c \ + common/macroblock.c \ + common/frame.c \ + common/dct.c \ + common/cpu.c \ + common/cabac.c \ + common/common.c \ + common/mdate.c \ + common/rectangle.c \ + common/set.c \ + common/quant.c \ + common/deblock.c \ + common/vlc.c \ + common/mvpred.c \ + common/bitstream.c \ + encoder/analyse.c \ + encoder/me.c \ + encoder/ratecontrol.c \ + encoder/set.c \ + encoder/macroblock.c \ + encoder/cabac.c \ + encoder/cavlc.c \ + encoder/encoder.c \ + encoder/lookahead.c \ + common/arm/mc-c.c \ + common/arm/predict-c.c \ + common/arm/cpu-a.S \ + common/arm/pixel-a.S \ + common/arm/mc-a.S \ + common/arm/dct-a.S \ + common/arm/quant-a.S \ + common/arm/deblock-a.S \ + common/arm/predict-a.S + + +LOCAL_ARM_MODE := arm + + +LOCAL_CFLAGS += -DPIC -DBIT_DEPTH=8 -std=gnu99 + +#for including config.h: +LOCAL_C_INCLUDES += \ + $(LOCAL_PATH)/../build/x264 \ + $(LOCAL_PATH)/ + +include $(BUILD_STATIC_LIBRARY) + diff --git a/submodules/externals/build/x264/config.h b/submodules/externals/build/x264/config.h new file mode 100644 index 000000000..df6cd338a --- /dev/null +++ b/submodules/externals/build/x264/config.h @@ -0,0 +1,24 @@ +#define HAVE_MALLOC_H 1 +#define HAVE_ARMV6 1 +#define HAVE_ARMV6T2 1 +#define HAVE_NEON 1 +#define ARCH_ARM 1 +#define SYS_LINUX 1 +#define HAVE_LOG2F 1 +#define fseek fseeko +#define ftell ftello +#define BIT_DEPTH 8 +#define HAVE_GPL 1 +#define HAVE_ALTIVEC 0 +#define HAVE_ALTIVEC_H 0 +#define HAVE_MMX 0 +#define HAVE_PTHREAD 0 +#define HAVE_VISUALIZE 0 +#define HAVE_SWSCALE 0 +#define HAVE_LAVF 0 +#define HAVE_FFMS 0 +#define HAVE_GPAC 0 +#define HAVE_GF_MALLOC 0 +#define HAVE_AVS 0 +#define X264_VERSION " r1804 e89c4cf" +#define X264_POINTVER "0.110.1804 e89c4cf" diff --git a/submodules/externals/x264 b/submodules/externals/x264 new file mode 160000 index 000000000..e89c4cfc9 --- /dev/null +++ b/submodules/externals/x264 @@ -0,0 +1 @@ +Subproject commit e89c4cfc9f37d0b7684507974b333545b5bcc37a