From 2acef2c17a4b445d1b000ccd52de776b314500b5 Mon Sep 17 00:00:00 2001 From: thermatk Date: Fri, 25 Jan 2019 21:02:36 +0100 Subject: [PATCH] [TF][JNI][UPDATE] libwebp source to 1.0.1 (cherry picked from commit 3cbfb8fd0861fda50ec900a3161fe2a371a5068c) --- .gitmodules | 3 ++ TMessagesProj/jni/Android.mk | 81 +----------------------------------- TMessagesProj/jni/image.cpp | 4 +- TMessagesProj/jni/libwebp | 1 + 4 files changed, 8 insertions(+), 81 deletions(-) create mode 100644 .gitmodules create mode 160000 TMessagesProj/jni/libwebp diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..101fa3eaf --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "TMessagesProj/jni/libwebp"] + path = TMessagesProj/jni/libwebp + url = https://github.com/webmproject/libwebp diff --git a/TMessagesProj/jni/Android.mk b/TMessagesProj/jni/Android.mk index 4b7681541..2e60cb66b 100755 --- a/TMessagesProj/jni/Android.mk +++ b/TMessagesProj/jni/Android.mk @@ -143,86 +143,9 @@ include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) -LOCAL_CFLAGS := -Wall -DANDROID -DHAVE_MALLOC_H -DHAVE_PTHREAD -DWEBP_USE_THREAD -finline-functions -ffast-math -ffunction-sections -fdata-sections -Os -LOCAL_C_INCLUDES += $(LOCAL_PATH)/libwebp/src -LOCAL_ARM_MODE := arm -LOCAL_STATIC_LIBRARIES := cpufeatures -LOCAL_MODULE := webp +include $(LOCAL_PATH)/libwebp/Android.mk -ifneq ($(findstring armeabi-v7a, $(TARGET_ARCH_ABI)),) - NEON := c.neon -else - NEON := c -endif - -LOCAL_SRC_FILES := \ -./libwebp/dec/alpha.c \ -./libwebp/dec/buffer.c \ -./libwebp/dec/frame.c \ -./libwebp/dec/idec.c \ -./libwebp/dec/io.c \ -./libwebp/dec/quant.c \ -./libwebp/dec/tree.c \ -./libwebp/dec/vp8.c \ -./libwebp/dec/vp8l.c \ -./libwebp/dec/webp.c \ -./libwebp/dsp/alpha_processing.c \ -./libwebp/dsp/alpha_processing_sse2.c \ -./libwebp/dsp/cpu.c \ -./libwebp/dsp/dec.c \ -./libwebp/dsp/dec_clip_tables.c \ -./libwebp/dsp/dec_mips32.c \ -./libwebp/dsp/dec_neon.$(NEON) \ -./libwebp/dsp/dec_sse2.c \ -./libwebp/dsp/enc.c \ -./libwebp/dsp/enc_avx2.c \ -./libwebp/dsp/enc_mips32.c \ -./libwebp/dsp/enc_neon.$(NEON) \ -./libwebp/dsp/enc_sse2.c \ -./libwebp/dsp/lossless.c \ -./libwebp/dsp/lossless_mips32.c \ -./libwebp/dsp/lossless_neon.$(NEON) \ -./libwebp/dsp/lossless_sse2.c \ -./libwebp/dsp/upsampling.c \ -./libwebp/dsp/upsampling_neon.$(NEON) \ -./libwebp/dsp/upsampling_sse2.c \ -./libwebp/dsp/yuv.c \ -./libwebp/dsp/yuv_mips32.c \ -./libwebp/dsp/yuv_sse2.c \ -./libwebp/enc/alpha.c \ -./libwebp/enc/analysis.c \ -./libwebp/enc/backward_references.c \ -./libwebp/enc/config.c \ -./libwebp/enc/cost.c \ -./libwebp/enc/filter.c \ -./libwebp/enc/frame.c \ -./libwebp/enc/histogram.c \ -./libwebp/enc/iterator.c \ -./libwebp/enc/picture.c \ -./libwebp/enc/picture_csp.c \ -./libwebp/enc/picture_psnr.c \ -./libwebp/enc/picture_rescale.c \ -./libwebp/enc/picture_tools.c \ -./libwebp/enc/quant.c \ -./libwebp/enc/syntax.c \ -./libwebp/enc/token.c \ -./libwebp/enc/tree.c \ -./libwebp/enc/vp8l.c \ -./libwebp/enc/webpenc.c \ -./libwebp/utils/bit_reader.c \ -./libwebp/utils/bit_writer.c \ -./libwebp/utils/color_cache.c \ -./libwebp/utils/filters.c \ -./libwebp/utils/huffman.c \ -./libwebp/utils/huffman_encode.c \ -./libwebp/utils/quant_levels.c \ -./libwebp/utils/quant_levels_dec.c \ -./libwebp/utils/random.c \ -./libwebp/utils/rescaler.c \ -./libwebp/utils/thread.c \ -./libwebp/utils/utils.c - -include $(BUILD_STATIC_LIBRARY) +LOCAL_PATH := $(MY_LOCAL_PATH) include $(CLEAR_VARS) diff --git a/TMessagesProj/jni/image.cpp b/TMessagesProj/jni/image.cpp index 83255245e..b9e733eba 100644 --- a/TMessagesProj/jni/image.cpp +++ b/TMessagesProj/jni/image.cpp @@ -5,8 +5,8 @@ #include #include #include -#include -#include +#include +#include #include "c_utils.h" extern "C" { diff --git a/TMessagesProj/jni/libwebp b/TMessagesProj/jni/libwebp new file mode 160000 index 000000000..e85d3313d --- /dev/null +++ b/TMessagesProj/jni/libwebp @@ -0,0 +1 @@ +Subproject commit e85d3313d6d52b1e9c6c181b488fc0831a747de8