Permalink
Browse files

Merge remote-tracking branch 'origin/1.2-beta-linaro-andoid' into and…

…roid
  • Loading branch information...
tom-gall committed Jan 11, 2012
2 parents 60934b7 + 8413b88 commit 52969c9b2cf9db0162bc1c1e9b9f27bd362908ba
Showing with 3,083 additions and 279 deletions.
  1. +33 −11 Android.mk
  2. +4 −2 Makefile.am
  3. +1,742 −0 asm/armv7/jdcolor-armv7.S
  4. +762 −0 asm/armv7/jdidct-armv7.S
  5. +0 −131 config.h
  6. +0 −1 jconfig.h
  7. +60 −1 jdcolor.c
  8. +67 −10 jdmerge.c
  9. +40 −0 jpegint.h
  10. +10 −0 libjpeg.map
  11. +6 −1 simd/Makefile.am
  12. +111 −0 simd/jsimd_arm.c
  13. +248 −122 simd/jsimd_arm_neon.S
View
@@ -7,23 +7,37 @@ ifneq ($(TARGET_SIMULATOR),true)
##################################################
LOCAL_PATH := $(my-dir)
include $(CLEAR_VARS)
+
+# Set ANDROID_JPEG_USE_VENUM to true to enable VeNum optimizations
+ANDROID_JPEG_USE_VENUM := true
+
+# Disable VeNum optimizations if they are not supported on the build target
+#ifneq ($(ARCH_ARM_HAVE_VFP),true)
+#ANDROID_JPEG_USE_VENUM := false
+#else
+#ifneq ($(ARCH_ARM_HAVE_NEON),true)
+#ANDROID_JPEG_USE_VENUM := false
+#endif
+#endif
# From autoconf-generated Makefile
EXTRA_DIST = simd/nasm_lt.sh simd/jcclrmmx.asm simd/jcclrss2.asm simd/jdclrmmx.asm simd/jdclrss2.asm \
simd/jdmrgmmx.asm simd/jdmrgss2.asm simd/jcclrss2-64.asm simd/jdclrss2-64.asm \
simd/jdmrgss2-64.asm simd/CMakeLists.txt
libsimd_SOURCES_DIST = simd/jsimd_arm_neon.S \
+ asm/armv7//jdcolor-armv7.S asm/armv7/jdidct-armv7.S \
simd/jsimd_arm.c
# or jsimd_none.c
LOCAL_SRC_FILES := $(libsimd_SOURCES_DIST)
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/simd
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/simd \
+ $(LOCAL_PATH)/android
-LOCAL_CFLAGS :=
+LOCAL_CFLAGS := -DANDROID_JPEG_USE_VENUM
AM_CFLAGS := -march=armv7-a -mfpu=neon
AM_CCASFLAGS := -march=armv7-a -mfpu=neon
@@ -59,10 +73,11 @@ LOCAL_SRC_FILES:= $(libjpeg_SOURCES_DIST)
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_STATIC_LIBRARIES := libsimd
-LOCAL_C_INCLUDES := $(LOCAL_PATH)
+LOCAL_C_INCLUDES := $(LOCAL_PATH) \
+ $(LOCAL_PATH)/android
LOCAL_CFLAGS := -DAVOID_TABLES -O3 -fstrict-aliasing -fprefetch-loop-arrays -DANDROID \
- -DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT
+ -DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT -DANDROID_JPEG_USE_VENUM
#-DANDROID_TILE_BASED_DECODE -DUSE_ANDROID_ASHMEM
@@ -88,7 +103,8 @@ LOCAL_SRC_FILES:= $(cjpeg_SOURCES)
LOCAL_SHARED_LIBRARIES := libjpeg
-LOCAL_C_INCLUDES := $(LOCAL_PATH)
+LOCAL_C_INCLUDES := $(LOCAL_PATH) \
+ $(LOCAL_PATH)/android
LOCAL_CFLAGS := -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED \
-DANDROID -DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT
@@ -115,7 +131,8 @@ LOCAL_SRC_FILES:= $(djpeg_SOURCES)
LOCAL_SHARED_LIBRARIES := libjpeg
-LOCAL_C_INCLUDES := $(LOCAL_PATH)
+LOCAL_C_INCLUDES := $(LOCAL_PATH) \
+ $(LOCAL_PATH)/android
LOCAL_CFLAGS := -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED \
-DANDROID -DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT
@@ -141,7 +158,8 @@ LOCAL_SRC_FILES:= $(jpegtran_SOURCES)
LOCAL_SHARED_LIBRARIES := libjpeg
-LOCAL_C_INCLUDES := $(LOCAL_PATH)
+LOCAL_C_INCLUDES := $(LOCAL_PATH) \
+ $(LOCAL_PATH)/android
LOCAL_CFLAGS := -DANDROID -DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT
@@ -166,7 +184,8 @@ LOCAL_SRC_FILES:= $(tjunittest_SOURCES)
LOCAL_SHARED_LIBRARIES := libjpeg
-LOCAL_C_INCLUDES := $(LOCAL_PATH)
+LOCAL_C_INCLUDES := $(LOCAL_PATH) \
+ $(LOCAL_PATH)/android
LOCAL_CFLAGS := -DANDROID -DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT
@@ -192,7 +211,8 @@ LOCAL_SRC_FILES:= $(tjbench_SOURCES)
LOCAL_SHARED_LIBRARIES := libjpeg
-LOCAL_C_INCLUDES := $(LOCAL_PATH)
+LOCAL_C_INCLUDES := $(LOCAL_PATH) \
+ $(LOCAL_PATH)/android
LOCAL_CFLAGS := -DBMP_SUPPORTED -DPPM_SUPPORTED \
-DANDROID -DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT
@@ -218,7 +238,8 @@ LOCAL_SRC_FILES:= $(rdjpgcom_SOURCES)
LOCAL_SHARED_LIBRARIES := libjpeg
-LOCAL_C_INCLUDES := $(LOCAL_PATH)
+LOCAL_C_INCLUDES := $(LOCAL_PATH) \
+ $(LOCAL_PATH)/android
LOCAL_CFLAGS := -DANDROID -DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT
@@ -243,7 +264,8 @@ LOCAL_SRC_FILES:= $(wrjpgcom_SOURCES)
LOCAL_SHARED_LIBRARIES := libjpeg
-LOCAL_C_INCLUDES := $(LOCAL_PATH)
+LOCAL_C_INCLUDES := $(LOCAL_PATH) \
+ $(LOCAL_PATH)/android
LOCAL_CFLAGS := -DANDROID -DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT
View
@@ -1,6 +1,8 @@
lib_LTLIBRARIES = libjpeg.la libturbojpeg.la
libjpeg_la_LDFLAGS = -version-info ${SO_MAJOR_VERSION}:${SO_MINOR_VERSION} -no-undefined
libturbojpeg_la_LDFLAGS = -avoid-version -no-undefined
+libturbojpeg_la_CFLAGS = -DAVOID_TABLES -O3 -fstrict-aliasing -fprefetch-loop-arrays -DANDROID \
+ -DANDROID_TILE_BASED_DECODE -DENABLE_ANDROID_NULL_CONVERT -DANDROID_JPEG_USE_VENUM
include_HEADERS = jerror.h jmorecfg.h jpeglib.h turbojpeg.h
nodist_include_HEADERS = jconfig.h
@@ -14,7 +16,7 @@ libjpeg_la_SOURCES = $(HDRS) jcapimin.c jcapistd.c jccoefct.c jccolor.c \
jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
jdmerge.c jdphuff.c jdpostct.c jdsample.c jdtrans.c jerror.c \
jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c \
- jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c
+ jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c
if WITH_ARITH
@@ -42,7 +44,7 @@ SUBDIRS = java
if WITH_JAVA
libturbojpeg_la_SOURCES += turbojpeg-jni.c
-libturbojpeg_la_CFLAGS = ${JNI_CFLAGS}
+libturbojpeg_la_CFLAGS += ${JNI_CFLAGS}
TJMAPFILE = turbojpeg-mapfile.jni
else
Oops, something went wrong.

0 comments on commit 52969c9

Please sign in to comment.