Permalink
Browse files

first cut at port of Android extentions

  • Loading branch information...
tom-gall committed Sep 1, 2011
1 parent df82505 commit ff1f5e7ce17701b48e53b7fcb3509f40715fd2e4
Showing with 2,741 additions and 29 deletions.
  1. +254 −0 Android.mk
  2. +131 −0 config.h
  3. +69 −0 jccolor.c
  4. +66 −0 jconfig.h
  5. +9 −0 jdapimin.c
  6. +128 −1 jdapistd.c
  7. +344 −22 jdcoefct.c
  8. +532 −0 jdcolor.c
  9. +265 −0 jdhuff.c
  10. +1 −0 jdhuff.h
  11. +54 −1 jdinput.c
  12. +52 −0 jdmarker.c
  13. +23 −2 jdmaster.c
  14. +356 −1 jdmerge.c
  15. +127 −0 jdphuff.c
  16. +131 −0 jdtrans.c
  17. +28 −0 jmorecfg.h
  18. +59 −0 jpegint.h
  19. +107 −2 jpeglib.h
  20. +5 −0 jutils.c
View
@@ -0,0 +1,254 @@
+# Makefile for libjpeg-turbo
+
+ifneq ($(TARGET_SIMULATOR),true)
+
+##################################################
+### simd ###
+##################################################
+LOCAL_PATH := $(my-dir)
+include $(CLEAR_VARS)
+
+# 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 \
+ simd/jsimd_arm.c
+
+# or jsimd_none.c
+
+
+LOCAL_SRC_FILES := $(libsimd_SOURCES_DIST)
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/simd
+
+LOCAL_CFLAGS :=
+AM_CFLAGS := -march=armv7-a -mfpu=neon
+AM_CCASFLAGS := -march=armv7-a -mfpu=neon
+
+LOCAL_MODULE_TAGS := debug
+
+LOCAL_MODULE := libsimd
+
+include $(BUILD_STATIC_LIBRARY)
+
+######################################################
+### libjpeg.so ##
+######################################################
+
+include $(CLEAR_VARS)
+
+# From autoconf-generated Makefile
+libjpeg_SOURCES_DIST = jcapimin.c jcapistd.c jccoefct.c jccolor.c \
+ jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
+ jcomapi.c jcparam.c jcphuff.c jcprepct.c jcsample.c jctrans.c \
+ jdapimin.c jdapistd.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.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 \
+ jaricom.c jcarith.c jdarith.c \
+ turbojpeg.c transupp.c jdatadst-tj.c jdatasrc-tj.c \
+ turbojpeg-mapfile
+
+#possible adds jmem-android.c jmemnobs.c jmemmgr.c jmem-ashmem.c
+
+LOCAL_SRC_FILES:= $(libjpeg_SOURCES_DIST)
+
+LOCAL_SHARED_LIBRARIES := libcutils
+LOCAL_STATIC_LIBRARIES := libsimd
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)
+
+LOCAL_CFLAGS := -DAVOID_TABLES -O3 -fstrict-aliasing -fprefetch-loop-arrays -DANDROID
+
+#-DANDROID_TILE_BASED_DECODE -DUSE_ANDROID_ASHMEM
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_STATIC_LIBRARY)
+
+LOCAL_MODULE_TAGS := debug
+
+LOCAL_MODULE := libjpeg
+
+include $(BUILD_SHARED_LIBRARY)
+
+######################################################
+### cjpeg ###
+######################################################
+
+include $(CLEAR_VARS)
+
+# From autoconf-generated Makefile
+cjpeg_SOURCES = cdjpeg.c cjpeg.c rdbmp.c rdgif.c \
+ rdppm.c rdswitch.c rdtarga.c
+
+LOCAL_SRC_FILES:= $(cjpeg_SOURCES)
+
+LOCAL_SHARED_LIBRARIES := libjpeg
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)
+
+LOCAL_CFLAGS := -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLE)
+
+LOCAL_MODULE_TAGS := debug
+
+LOCAL_MODULE := cjpeg
+
+include $(BUILD_EXECUTABLE)
+
+######################################################
+### djpeg ###
+######################################################
+
+include $(CLEAR_VARS)
+
+# From autoconf-generated Makefile
+djpeg_SOURCES = cdjpeg.c djpeg.c rdcolmap.c rdswitch.c \
+ wrbmp.c wrgif.c wrppm.c wrtarga.c
+
+LOCAL_SRC_FILES:= $(djpeg_SOURCES)
+
+LOCAL_SHARED_LIBRARIES := libjpeg
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)
+
+LOCAL_CFLAGS := -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLE)
+
+LOCAL_MODULE_TAGS := debug
+
+LOCAL_MODULE := djpeg
+
+include $(BUILD_EXECUTABLE)
+
+######################################################
+### jpegtran ###
+######################################################
+
+include $(CLEAR_VARS)
+
+# From autoconf-generated Makefile
+jpegtran_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c
+
+LOCAL_SRC_FILES:= $(jpegtran_SOURCES)
+
+LOCAL_SHARED_LIBRARIES := libjpeg
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)
+
+LOCAL_CFLAGS :=
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLE)
+
+LOCAL_MODULE_TAGS := debug
+
+LOCAL_MODULE := jpegtran
+
+include $(BUILD_EXECUTABLE)
+
+######################################################
+### tjunittest ###
+######################################################
+
+include $(CLEAR_VARS)
+
+# From autoconf-generated Makefile
+tjunittest_SOURCES = tjunittest.c tjutil.c
+
+LOCAL_SRC_FILES:= $(tjunittest_SOURCES)
+
+LOCAL_SHARED_LIBRARIES := libjpeg
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)
+
+LOCAL_CFLAGS :=
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLE)
+
+LOCAL_MODULE_TAGS := debug
+
+LOCAL_MODULE := tjunittest
+
+include $(BUILD_EXECUTABLE)
+
+######################################################
+### tjbench ###
+######################################################
+
+include $(CLEAR_VARS)
+
+# From autoconf-generated Makefile
+tjbench_SOURCES = tjbench.c bmp.c tjutil.c rdbmp.c rdppm.c \
+ wrbmp.c wrppm.c
+
+LOCAL_SRC_FILES:= $(tjbench_SOURCES)
+
+LOCAL_SHARED_LIBRARIES := libjpeg
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)
+
+LOCAL_CFLAGS := -DBMP_SUPPORTED -DPPM_SUPPORTED
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLE)
+
+LOCAL_MODULE_TAGS := debug
+
+LOCAL_MODULE := tjbench
+
+include $(BUILD_EXECUTABLE)
+
+######################################################
+### rdjpgcom ###
+######################################################
+
+include $(CLEAR_VARS)
+
+# From autoconf-generated Makefile
+rdjpgcom_SOURCES = rdjpgcom.c
+
+LOCAL_SRC_FILES:= $(rdjpgcom_SOURCES)
+
+LOCAL_SHARED_LIBRARIES := libjpeg
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)
+
+LOCAL_CFLAGS :=
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLE)
+
+LOCAL_MODULE_TAGS := debug
+
+LOCAL_MODULE := rdjpgcom
+
+include $(BUILD_EXECUTABLE)
+
+######################################################
+### wrjpgcom ###
+######################################################
+
+include $(CLEAR_VARS)
+
+# From autoconf-generated Makefile
+wrjpgcom_SOURCES = wrjpgcom.c
+
+LOCAL_SRC_FILES:= $(wrjpgcom_SOURCES)
+
+LOCAL_SHARED_LIBRARIES := libjpeg
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)
+
+LOCAL_CFLAGS :=
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLE)
+
+LOCAL_MODULE_TAGS := debug
+
+LOCAL_MODULE := wrjpgcom
+
+include $(BUILD_EXECUTABLE)
+
+endif # TARGET_SIMULATOR != true
View
131 config.h
@@ -0,0 +1,131 @@
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Build number */
+#define BUILD "20110829"
+
+/* Support arithmetic encoding */
+#define C_ARITH_CODING_SUPPORTED 1
+
+/* Support arithmetic decoding */
+#define D_ARITH_CODING_SUPPORTED 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <jni.h> header file. */
+/* #undef HAVE_JNI_H */
+
+/* Define to 1 if you have the `memcpy' function. */
+#define HAVE_MEMCPY 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `memset' function. */
+#define HAVE_MEMSET 1
+
+/* Define if your compiler supports prototypes */
+#define HAVE_PROTOTYPES 1
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#define HAVE_STDDEF_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if the system has the type `unsigned char'. */
+#define HAVE_UNSIGNED_CHAR 1
+
+/* Define to 1 if the system has the type `unsigned short'. */
+#define HAVE_UNSIGNED_SHORT 1
+
+/* Compiler does not support pointers to undefined structures. */
+/* #undef INCOMPLETE_TYPES_BROKEN */
+
+/* libjpeg API version */
+#define JPEG_LIB_VERSION 62
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
+
+/* Define if you have BSD-like bzero and bcopy */
+/* #undef NEED_BSD_STRINGS */
+
+/* Define if you need short function names */
+/* #undef NEED_SHORT_EXTERNAL_NAMES */
+
+/* Define if you have sys/types.h */
+#define NEED_SYS_TYPES_H 1
+
+/* Name of package */
+#define PACKAGE "libjpeg-turbo"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "libjpeg-turbo"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "libjpeg-turbo 1.1.90"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "libjpeg-turbo"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "1.1.90"
+
+/* Define if shift is unsigned */
+/* #undef RIGHT_SHIFT_IS_UNSIGNED */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#define VERSION "1.1.90"
+
+/* Use accelerated SIMD routines. */
+#define WITH_SIMD 1
+
+/* Define to 1 if type `char' is unsigned and you are not using gcc. */
+#ifndef __CHAR_UNSIGNED__
+/* # undef __CHAR_UNSIGNED__ */
+#endif
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
Oops, something went wrong.

0 comments on commit ff1f5e7

Please sign in to comment.