├── .classpath ├── .gitignore ├── .project ├── .project.bak ├── .settings └── org.eclipse.jdt.core.prefs ├── AndroidManifest.xml ├── README.md ├── ic_launcher-web.png ├── jni ├── 2 ├── a1w0n │ ├── common.c │ ├── common.h │ ├── termExec.c │ └── termExec.h ├── android │ ├── config.h │ └── jconfig.h ├── cmakescripts │ ├── getdate.bat │ └── testclean.cmake ├── debian │ ├── README.source │ ├── changelog │ ├── compat │ ├── control │ ├── copyright │ ├── docs │ ├── extra │ │ ├── Makefile │ │ ├── exifautotran │ │ ├── exifautotran.1 │ │ ├── jpegexiforient.1 │ │ └── jpegexiforient.c │ ├── libjpeg-turbo-only.symbols │ ├── libjpeg-turbo-progs.install │ ├── libjpeg-turbo-test.install │ ├── libjpeg-turbo8-dev.install │ ├── libjpeg-turbo8.install │ ├── libjpeg-turbo8.lintian-overrides │ ├── libjpeg-turbo8.symbols │ ├── libturbojpeg.install │ ├── libturbojpeg.postinst │ ├── libturbojpeg.postrm │ ├── patches │ │ ├── FixLibraryStartup.patch │ │ ├── add-copying-for-debian-dir.patch │ │ ├── series │ │ └── tjunittest.patch │ ├── rules │ ├── source.lintian-overrides │ ├── source │ │ └── format │ └── watch ├── doc │ └── html │ │ ├── annotated.html │ │ ├── bc_s.png │ │ ├── classes.html │ │ ├── closed.png │ │ ├── doxygen.css │ │ ├── doxygen.png │ │ ├── functions.html │ │ ├── functions_vars.html │ │ ├── group___turbo_j_p_e_g.html │ │ ├── index.html │ │ ├── installdox │ │ ├── jquery.js │ │ ├── modules.html │ │ ├── nav_f.png │ │ ├── nav_h.png │ │ ├── open.png │ │ ├── search │ │ ├── all_63.html │ │ ├── all_64.html │ │ ├── all_68.html │ │ ├── all_6e.html │ │ ├── all_6f.html │ │ ├── all_72.html │ │ ├── all_74.html │ │ ├── all_77.html │ │ ├── all_78.html │ │ ├── all_79.html │ │ ├── classes_74.html │ │ ├── close.png │ │ ├── mag_sel.png │ │ ├── nomatches.html │ │ ├── search.css │ │ ├── search.js │ │ ├── search_l.png │ │ ├── search_m.png │ │ ├── search_r.png │ │ ├── variables_63.html │ │ ├── variables_64.html │ │ ├── variables_68.html │ │ ├── variables_6e.html │ │ ├── variables_6f.html │ │ ├── variables_72.html │ │ ├── variables_77.html │ │ ├── variables_78.html │ │ └── variables_79.html │ │ ├── structtjregion.html │ │ ├── structtjscalingfactor.html │ │ ├── structtjtransform.html │ │ ├── tab_a.png │ │ ├── tab_b.png │ │ ├── tab_h.png │ │ ├── tab_s.png │ │ └── tabs.css ├── java │ ├── CMakeLists.txt │ ├── MANIFEST.MF │ ├── Makefile.am │ ├── README │ ├── TJExample.java │ ├── TJUnitTest.java │ ├── doc │ │ ├── allclasses-frame.html │ │ ├── allclasses-noframe.html │ │ ├── constant-values.html │ │ ├── deprecated-list.html │ │ ├── help-doc.html │ │ ├── index-all.html │ │ ├── index.html │ │ ├── org │ │ │ └── libjpegturbo │ │ │ │ └── turbojpeg │ │ │ │ ├── TJ.html │ │ │ │ ├── TJCompressor.html │ │ │ │ ├── TJCustomFilter.html │ │ │ │ ├── TJDecompressor.html │ │ │ │ ├── TJScalingFactor.html │ │ │ │ ├── TJTransform.html │ │ │ │ ├── TJTransformer.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ └── package-tree.html │ │ ├── overview-tree.html │ │ ├── package-list │ │ ├── resources │ │ │ └── inherit.gif │ │ ├── serialized-form.html │ │ └── stylesheet.css │ ├── org │ │ └── libjpegturbo │ │ │ └── turbojpeg │ │ │ ├── TJ.java │ │ │ ├── TJCompressor.java │ │ │ ├── TJCustomFilter.java │ │ │ ├── TJDecompressor.java │ │ │ ├── TJLoader.java │ │ │ ├── TJLoader.java.in │ │ │ ├── TJScalingFactor.java │ │ │ ├── TJTransform.java │ │ │ └── TJTransformer.java │ ├── org_libjpegturbo_turbojpeg_TJ.h │ ├── org_libjpegturbo_turbojpeg_TJCompressor.h │ ├── org_libjpegturbo_turbojpeg_TJDecompressor.h │ └── org_libjpegturbo_turbojpeg_TJTransformer.h ├── machine │ └── cpu-features.h ├── pkgscripts │ ├── Description.plist │ ├── Info.plist │ ├── deb-control │ ├── libjpeg-turbo.spec │ ├── makecygwinpkg │ ├── makedpkg │ ├── makemacpkg │ ├── makesunpkg │ ├── pkginfo │ └── uninstall ├── release │ ├── Description.plist.in │ ├── Info.plist.in │ ├── License.rtf │ ├── ReadMe.rtf │ ├── Welcome.rtf │ ├── copyright │ ├── deb-control.tmpl │ ├── libjpeg-turbo.nsi.in │ ├── libjpeg-turbo.spec.in │ ├── makecygwinpkg.in │ ├── makedpkg.in │ ├── makemacpkg.in │ ├── makesunpkg.in │ ├── pkginfo.in │ └── uninstall.in ├── sharedlib │ └── CMakeLists.txt ├── simd │ ├── CMakeLists.txt │ ├── Makefile.am │ ├── jcclrmmx.asm │ ├── jcclrss2-64.asm │ ├── jcclrss2.asm │ ├── jccolmmx.asm │ ├── jccolss2-64.asm │ ├── jccolss2.asm │ ├── jcgrammx.asm │ ├── jcgrass2-64.asm │ ├── jcgrass2.asm │ ├── jcgrymmx.asm │ ├── jcgryss2-64.asm │ ├── jcgryss2.asm │ ├── jcolsamp.inc │ ├── jcqnt3dn.asm │ ├── jcqntmmx.asm │ ├── jcqnts2f-64.asm │ ├── jcqnts2f.asm │ ├── jcqnts2i-64.asm │ ├── jcqnts2i.asm │ ├── jcqntsse.asm │ ├── jcsammmx.asm │ ├── jcsamss2-64.asm │ ├── jcsamss2.asm │ ├── jdclrmmx.asm │ ├── jdclrss2-64.asm │ ├── jdclrss2.asm │ ├── jdcolmmx.asm │ ├── jdcolss2-64.asm │ ├── jdcolss2.asm │ ├── jdct.inc │ ├── jdmermmx.asm │ ├── jdmerss2-64.asm │ ├── jdmerss2.asm │ ├── jdmrgmmx.asm │ ├── jdmrgss2-64.asm │ ├── jdmrgss2.asm │ ├── jdsammmx.asm │ ├── jdsamss2-64.asm │ ├── jdsamss2.asm │ ├── jf3dnflt.asm │ ├── jfmmxfst.asm │ ├── jfmmxint.asm │ ├── jfss2fst-64.asm │ ├── jfss2fst.asm │ ├── jfss2int-64.asm │ ├── jfss2int.asm │ ├── jfsseflt-64.asm │ ├── jfsseflt.asm │ ├── ji3dnflt.asm │ ├── jimmxfst.asm │ ├── jimmxint.asm │ ├── jimmxred.asm │ ├── jiss2flt-64.asm │ ├── jiss2flt.asm │ ├── jiss2fst-64.asm │ ├── jiss2fst.asm │ ├── jiss2int-64.asm │ ├── jiss2int.asm │ ├── jiss2red-64.asm │ ├── jiss2red.asm │ ├── jisseflt.asm │ ├── jsimd.h │ ├── jsimd_arm.c │ ├── jsimd_arm_neon.S │ ├── jsimd_i386.c │ ├── jsimd_x86_64.c │ ├── jsimdcfg.inc.h │ ├── jsimdcpu.asm │ ├── jsimdext.inc │ └── nasm_lt.sh └── win │ ├── config.h.in │ ├── jconfig.h.in │ ├── jpeg62.def │ ├── jpeg7.def │ ├── jpeg8.def │ └── jsimdcfg.inc ├── libs ├── android-support-v4.jar ├── androidcommonutils.jar └── armeabi-v7a │ └── liba1w0n.so ├── proguard-project.txt ├── project.properties ├── res ├── drawable-hdpi │ └── ic_launcher.png ├── drawable-mdpi │ ├── bg_float_big.png │ ├── float_bg.png │ ├── ic_launcher.png │ ├── resize.png │ ├── text_highlight_bg_normal.9.png │ └── text_highlight_bg_pressed.9.png ├── drawable-xhdpi │ ├── aa.png │ └── ic_launcher.png ├── drawable-xxhdpi │ └── ic_launcher.png ├── drawable │ └── common_selector.xml ├── layout │ ├── activity_main.xml │ ├── activity_second.xml │ ├── edittext.xml │ ├── fragment_main.xml │ └── fragment_second.xml ├── values-v11 │ └── styles.xml ├── values-v14 │ └── styles.xml ├── values-w820dp │ └── dimens.xml └── values │ ├── attrs.xml │ ├── colors.xml │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml └── src └── com └── a1w0n └── standard ├── Jni └── Exec.java └── MainActivity.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # files for the dex VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # generated files 12 | bin/ 13 | gen/ 14 | obj/ 15 | #.settings/ 16 | 17 | # Local configuration file (sdk path, etc) 18 | local.properties 19 | 20 | # Eclipse project files 21 | #.classpath 22 | #.project 23 | 24 | # Proguard folder generated by Eclipse 25 | proguard/ 26 | 27 | # Intellij project files 28 | *.iml 29 | *.ipr 30 | *.iws 31 | .idea/ 32 | 33 | # Crashlytics 34 | com_crashlytics_export_strings.xml 35 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | AndroidFramebufferScreenshot 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /.project.bak: -------------------------------------------------------------------------------- 1 | 2 | 3 | A1w0nStandard 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.source=1.6 5 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | AndroidFramebufferScreenshot 2 | ============================ 3 | Take screenshot in jni, return byte array to java, decode and display in ImageView. 4 | 5 | Only works in rooted devices! 6 | 7 | 8 | 9 | Performance 10 | ============================ 11 | Take a 1280 * 720 jpeg from framebuffer cost about 150 - 180 ms (done with turbo-jpeg!). 12 | 13 | 14 | 15 | 16 | Build jni 17 | ============================ 18 | Use this command to build the so file to use Arm Neon Assembly: 19 | ndk-build APP_ABI=armeabi-v7a LOCAL_ARM_MODE=arm LOCAL_ARM_NEON=true ARCH_ARM_HAVE_NEON=true 20 | 21 | 22 | 23 | On working 24 | ============================ 25 | User Neon simd assembly to scale down image raw data. 26 | -------------------------------------------------------------------------------- /ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/ic_launcher-web.png -------------------------------------------------------------------------------- /jni/2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/jni/2 -------------------------------------------------------------------------------- /jni/a1w0n/common.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "termExec.h" 3 | 4 | // 这个必须要有,不然Log功能不能使用 5 | #define LOG_TAG "a1w0n" 6 | 7 | /* 8 | * 给每个类注册它们的本地方法 9 | */ 10 | int registerNativeMethods(JNIEnv* env, const char* className, 11 | JNINativeMethod* gMethods, int numMethods) 12 | { 13 | jclass clazz; 14 | 15 | clazz = (*env)->FindClass(env, className); 16 | 17 | if (clazz == NULL) { 18 | LOGE("Native registration unable to find class '%s'", className); 19 | return JNI_FALSE; 20 | } 21 | 22 | if ((*env)->RegisterNatives(env, clazz, gMethods, numMethods) < 0) { 23 | LOGE("RegisterNatives failed for '%s'", className); 24 | return JNI_FALSE; 25 | } 26 | 27 | return JNI_TRUE; 28 | } 29 | 30 | // ---------------------------------------------------------------------------- 31 | 32 | typedef union { 33 | JNIEnv* env; 34 | void* venv; 35 | } UnionJNIEnvToVoid; 36 | 37 | jint JNI_OnLoad(JavaVM* vm, void* reserved) { 38 | UnionJNIEnvToVoid uenv; 39 | uenv.venv = NULL; 40 | JNIEnv* env = NULL; 41 | 42 | LOGI("A1w0n : JNI_OnLoad"); 43 | 44 | // 从JavaVM获取JNIEnv,一般使用1.4的版本 45 | if ((*vm)->GetEnv(vm, (void**)&uenv.venv, JNI_VERSION_1_4) != JNI_OK) { 46 | LOGE("ERROR: GetEnv failed"); 47 | return -1; 48 | } 49 | 50 | // 从VM获取到了JNIEnv对象 51 | env = uenv.env; 52 | 53 | if (init_Exec(env) != JNI_TRUE) { 54 | LOGE("ERROR: init of Exec failed"); 55 | return -1; 56 | } 57 | 58 | return JNI_VERSION_1_4; 59 | } 60 | -------------------------------------------------------------------------------- /jni/a1w0n/common.h: -------------------------------------------------------------------------------- 1 | #ifndef _COMMON_H 2 | #define _COMMON_H 1 3 | 4 | #include 5 | 6 | #include "jni.h" 7 | #include 8 | 9 | #define LOGI(...) do { __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__); } while(0) 10 | #define LOGW(...) do { __android_log_print(ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__); } while(0) 11 | #define LOGE(...) do { __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__); } while(0) 12 | #define LOGD(...) do { __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__); } while(0) 13 | 14 | int registerNativeMethods(JNIEnv* env, const char* className, 15 | JNINativeMethod* gMethods, int numMethods); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /jni/a1w0n/termExec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Steven Luo 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _TERMEXEC_H 18 | #define _TERMEXEC_H 1 19 | 20 | #include "jni.h" 21 | 22 | typedef struct bgra8888 { 23 | char b; 24 | char g; 25 | char r; 26 | char a; 27 | } bgra8888_t; 28 | 29 | int init_Exec(JNIEnv *env); 30 | 31 | #endif /* !defined(_TERMEXEC_H) */ 32 | -------------------------------------------------------------------------------- /jni/android/jconfig.h: -------------------------------------------------------------------------------- 1 | /* jconfig.h. Generated from jconfig.h.in by configure. */ 2 | /* Version ID for the JPEG library. 3 | * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60". 4 | */ 5 | #define JPEG_LIB_VERSION 62 6 | 7 | /* Support arithmetic encoding */ 8 | #define C_ARITH_CODING_SUPPORTED 1 9 | 10 | /* Support arithmetic decoding */ 11 | #define D_ARITH_CODING_SUPPORTED 1 12 | 13 | /* Define if your compiler supports prototypes */ 14 | #define HAVE_PROTOTYPES 1 15 | 16 | /* Define to 1 if you have the header file. */ 17 | #define HAVE_STDDEF_H 1 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #define HAVE_STDLIB_H 1 21 | 22 | /* Define to 1 if the system has the type `unsigned char'. */ 23 | #define HAVE_UNSIGNED_CHAR 1 24 | 25 | /* Define to 1 if the system has the type `unsigned short'. */ 26 | #define HAVE_UNSIGNED_SHORT 1 27 | 28 | /* Define if you want use complete types */ 29 | /* #undef INCOMPLETE_TYPES_BROKEN */ 30 | 31 | /* Define if you have BSD-like bzero and bcopy */ 32 | /* #undef NEED_BSD_STRINGS */ 33 | 34 | /* Define if you need short function names */ 35 | /* #undef NEED_SHORT_EXTERNAL_NAMES */ 36 | 37 | /* Define if you have sys/types.h */ 38 | #define NEED_SYS_TYPES_H 1 39 | 40 | /* Define if shift is unsigned */ 41 | /* #undef RIGHT_SHIFT_IS_UNSIGNED */ 42 | 43 | /* Use accelerated SIMD routines. */ 44 | #define WITH_SIMD 1 45 | 46 | /* Define to 1 if type `char' is unsigned and you are not using gcc. */ 47 | #ifndef __CHAR_UNSIGNED__ 48 | /* # undef __CHAR_UNSIGNED__ */ 49 | #endif 50 | 51 | /* Define to empty if `const' does not conform to ANSI C. */ 52 | /* #undef const */ 53 | 54 | /* Define to `__inline__' or `__inline' if that's what the C compiler 55 | calls it, or to nothing if 'inline' is not supported under any name. */ 56 | #ifndef __cplusplus 57 | /* #undef inline */ 58 | #endif 59 | 60 | /* Define to `unsigned int' if does not define. */ 61 | /* #undef size_t */ 62 | 63 | -------------------------------------------------------------------------------- /jni/cmakescripts/getdate.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | for /f "tokens=1-4 eol=/ DELIMS=/ " %%i in ('date /t') do set BUILD=%%l%%j%%k 3 | echo %BUILD% 4 | -------------------------------------------------------------------------------- /jni/cmakescripts/testclean.cmake: -------------------------------------------------------------------------------- 1 | file(GLOB FILES 2 | testout* 3 | *_GRAY_*.bmp 4 | *_GRAY_*.png 5 | *_GRAY_*.ppm 6 | *_GRAY_*.jpg 7 | *_GRAY.yuv 8 | *_420_*.bmp 9 | *_420_*.png 10 | *_420_*.ppm 11 | *_420_*.jpg 12 | *_420.yuv 13 | *_422_*.bmp 14 | *_422_*.png 15 | *_422_*.ppm 16 | *_422_*.jpg 17 | *_422.yuv 18 | *_444_*.bmp 19 | *_444_*.png 20 | *_444_*.ppm 21 | *_444_*.jpg 22 | *_444.yuv 23 | *_440_*.bmp 24 | *_440_*.png 25 | *_440_*.ppm 26 | *_440_*.jpg 27 | *_440.yuv) 28 | 29 | if(NOT FILES STREQUAL "") 30 | message(STATUS "Removing test files") 31 | file(REMOVE ${FILES}) 32 | else() 33 | message(STATUS "No files to remove") 34 | endif() 35 | -------------------------------------------------------------------------------- /jni/debian/README.source: -------------------------------------------------------------------------------- 1 | Please refer to /usr/share/doc/quilt/README.source for use of quilt. 2 | -------------------------------------------------------------------------------- /jni/debian/changelog: -------------------------------------------------------------------------------- 1 | libjpeg-turbo (1.1.90+svn733-0ubuntu2) precise; urgency=low 2 | 3 | * Sync with upstream to svn733. 4 | 5 | * Rename libjpeg-test to libjpeg-turbo-test. 6 | * Rename libjpeg-turbo-dbg to libjpeg-turbo8-dbg. 7 | * Rename libjpeg8-dev to libjpeg-turbo8-dev. 8 | * Move the docs into the -dev package, install the upstream changelog 9 | in the -dev only. 10 | * Split out libturbojpeg.so into it's own package, don't let 11 | libjpeg-turbo8-dev depend on it. 12 | * Fix libjpeg-turbo8-dbg package description. 13 | * Install jconfig.h into multiarch include path. 14 | * Remove HAVE_STD{LIB,DEF}_H from jconfig.h since they are not used and 15 | conflict with autoconf. 16 | * libjpeg-turbo8: 17 | - Add a symbols file, with a different version for symbols only found 18 | in the libjpeg-turbo implementation. 19 | - Remove the shlibs file. 20 | - Breaks/Replaces libjpeg8 (<< 8c-2ubuntu5). 21 | * Copy the exifautotran and jpegexiforient tools from the libjpeg8 22 | sources, install into libjpeg-turbo-progs. 23 | * Don't install tjbench in libjpeg-turbo-progs to avoid dependency 24 | on libturbojpeg. 25 | 26 | -- Matthias Klose Tue, 20 Dec 2011 23:12:52 +0100 27 | 28 | libjpeg-turbo (1.1.90+svn722-1ubuntu5) precise; urgency=low 29 | 30 | * Remove all useage of diverts in preparation to replace 31 | libjpeg8 in precise 32 | * small clean up in debian/control 33 | 34 | -- Tom Gall Thu, 01 Dec 2011 09:50:26 -0600 35 | 36 | libjpeg-turbo (1.1.90+svn722-1ubuntu4) precise; urgency=low 37 | 38 | * Switch package to include libjpeg8 compatibility 39 | * Supply -dev -dbg and -test debs 40 | 41 | -- Tom Gall Wed, 16 Nov 2011 22:14:00 +0000 42 | 43 | libjpeg-turbo (1.1.90+svn722-1ubuntu2) oneiric; urgency=low 44 | 45 | * 11.11 Release 46 | * Sync with upstream to svn722 47 | 48 | -- Tom Gall Wed, 16 Nov 2011 14:32:12 +0000 49 | 50 | libjpeg-turbo (1.1.90+svn702-0ubuntu1) oneiric; urgency=low 51 | 52 | * Initial Release based on svn 702 53 | * Initial Release and packaging based on svn 702 (LP: #852207) 54 | 55 | -- Tom Gall Tue, 13 Sep 2011 03:53:56 +0000 56 | -------------------------------------------------------------------------------- /jni/debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /jni/debian/control: -------------------------------------------------------------------------------- 1 | Source: libjpeg-turbo 2 | Priority: optional 3 | Section: graphics 4 | Maintainer: Ubuntu Developers 5 | Uploaders: Tom Gall 6 | Build-Depends: debhelper (>= 8.1.3), dh-autoreconf, nasm [amd64 i386], quilt 7 | Standards-Version: 3.9.2 8 | Vcs-Bzr: lp:libjpeg-turbo 9 | Homepage: http://libjpeg-turbo.virtualgl.org/ 10 | 11 | Package: libjpeg-turbo8-dev 12 | Architecture: any 13 | Section: libdevel 14 | Multi-Arch: same 15 | Depends: libjpeg-turbo8 (= ${binary:Version}), libc-dev, ${misc:Depends} 16 | Conflicts: libjpeg62-dev, libjpeg7-dev 17 | Replaces: libjpeg62-dev, libjpeg7-dev, libjpeg8-dev (<< 8c-2ubuntu5) 18 | Provides: libjpeg-dev 19 | Description: Development files for the IJG JPEG library 20 | The Independent JPEG Group's JPEG library is a library for handling 21 | JPEG files. 22 | . 23 | This package contains the static library, headers and documentation. 24 | 25 | Package: libjpeg-turbo8 26 | Architecture: any 27 | Multi-Arch: same 28 | Section: libs 29 | Pre-Depends: multiarch-support 30 | Depends: ${shlibs:Depends}, ${misc:Depends} 31 | Breaks: libjpeg8 (<< 8c-2ubuntu5) 32 | Replaces: libjpeg8 (<< 8c-2ubuntu5) 33 | Description: IJG JPEG compliant runtime library. 34 | Runtime library supporting the Independent JPEG Group's standard 35 | for JPEG files. 36 | . 37 | This package contains the shared library which is a drop in 38 | replacement for libjpeg8, which has better performance than 39 | standard libjpeg by use of SIMD and other optimizations. 40 | 41 | Package: libturbojpeg 42 | Architecture: any 43 | Multi-Arch: same 44 | Section: libs 45 | Pre-Depends: multiarch-support 46 | Depends: ${shlibs:Depends}, ${misc:Depends} 47 | Replaces: libjpeg-turbo8 (<< 1.1.90+svn722-1ubuntu6) 48 | Description: IJG JPEG compliant runtime library. 49 | Runtime library supporting the Independent JPEG Group's standard 50 | for JPEG files. 51 | . 52 | This package contains the libturbojpeg.so library, used by 53 | turboVNC and other users of the past TurboJPEG library. 54 | 55 | Package: libjpeg-turbo-progs 56 | Architecture: any 57 | Depends: ${shlibs:Depends}, ${misc:Depends}, libturbojpeg (= ${binary:Version}) 58 | Replaces: libjpeg-progs (<< 8c-2ubuntu5) 59 | Provides: libjpeg-progs 60 | Description: Programs for manipulating JPEG files 61 | This package contains programs for manipulating JPEG files: 62 | cjpeg/djpeg: convert to/from the JPEG file format 63 | rdjpgcom/wrjpgcom: read/write comments in JPEG files 64 | jpegtran: lossless transformations of JPEG files 65 | tjbench: a simple JPEG benchmarking tool 66 | 67 | Package: libjpeg-turbo8-dbg 68 | Architecture: any 69 | Section: debug 70 | Priority: extra 71 | Depends: libjpeg-turbo8 (= ${binary:Version}), ${misc:Depends} 72 | Replaces: libjpeg62-dbg, libjpeg7-dbg, libjpeg-turbo-dbg (<< 1.1.90+svn722-1ubuntu6) 73 | Description: Debugging symbols for the libjpeg-turbo library 74 | An optimized implementation of the Independent JPEG Group's 75 | JPEG library is a library for handling JPEG files. 76 | . 77 | This package contains the debugging symbols for libjpeg-turbo. 78 | 79 | Package: libjpeg-turbo-test 80 | Architecture: any 81 | Priority: extra 82 | Section: debug 83 | Depends: ${shlibs:Depends}, ${misc:Depends} 84 | Replaces: libjpeg-test (<< 1.1.90+svn722-1ubuntu6) 85 | Description: Program for testing libjpeg-turbo 86 | This package contains tjunittest which tests 87 | the basic functionality of the library and 88 | data files for performing those tests. 89 | -------------------------------------------------------------------------------- /jni/debian/docs: -------------------------------------------------------------------------------- 1 | libjpeg.txt 2 | README 3 | README-turbo.txt 4 | structure.txt 5 | -------------------------------------------------------------------------------- /jni/debian/extra/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS = -O2 -Wall -g 2 | CC = cc 3 | INSTALL = install -m755 -o root -g root 4 | INSTALLDIR = install -m755 -o root -g root -d 5 | DESTDIR = 6 | prefix = /usr/local 7 | bindir = $(prefix)/bin 8 | mandir = $(prefix)/share/man/man1 9 | 10 | all: jpegexiforient 11 | 12 | jpegexiforient: jpegexiforient.c 13 | $(CC) $(CFLAGS) -o jpegexiforient jpegexiforient.c 14 | clean: 15 | -rm -f jpegexiforient 16 | install: 17 | $(INSTALLDIR) $(DESTDIR)$(bindir) 18 | $(INSTALLDIR) $(DESTDIR)$(mandir) 19 | $(INSTALL) jpegexiforient $(DESTDIR)$(bindir) 20 | $(INSTALL) jpegexiforient.1 $(DESTDIR)$(mandir) 21 | $(INSTALL) exifautotran $(DESTDIR)$(bindir) 22 | $(INSTALL) exifautotran.1 $(DESTDIR)$(mandir) 23 | -------------------------------------------------------------------------------- /jni/debian/extra/exifautotran: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # exifautotran [list of files] 3 | # 4 | # Transforms Exif files so that Orientation becomes 1 5 | # 6 | 7 | trap "if test -n \"\$tempfile\"; then rm -f \"\$tempfile\"; fi" INT QUIT TERM 8 | 9 | for i 10 | do 11 | case $i in 12 | -v|--version) echo "exifautotran"; exit 0;; 13 | -h|--help) 14 | cat <&2 37 | exit 1; 38 | fi 39 | echo Executing: jpegtran -copy all $transform $i >&2 40 | jpegtran -copy all $transform "$i" > $tempfile 41 | if test $? -ne 0; then 42 | echo Error while transforming $i - skipped. >&2 43 | rm "$tempfile" 44 | else 45 | cp "$tempfile" "$i" 46 | rm "$tempfile" 47 | jpegexiforient -1 "$i" > /dev/null 48 | fi 49 | fi 50 | done 51 | -------------------------------------------------------------------------------- /jni/debian/extra/exifautotran.1: -------------------------------------------------------------------------------- 1 | .TH EXIFAUTOTRAN "1" "February 2005" "exifautotran" "User Commands" 2 | .SH NAME 3 | exifautotran \- Transforms Exif files so that Orientation becomes 1 4 | .SH DESCRIPTION 5 | exifautotran [list of files] 6 | .PP 7 | Take a list of files as input and transform them in place so that the 8 | Orientation becomes 1. 9 | .SH "AUTHOR" 10 | Guido Vollbeding 11 | .SH "SEE ALSO" 12 | .BR jpegtran(1) 13 | .BR jpegexiforient(1) 14 | -------------------------------------------------------------------------------- /jni/debian/extra/jpegexiforient.1: -------------------------------------------------------------------------------- 1 | .TH JPEGEXIFORIENT "1" "February 2005" "jpegexiforient" "User Commands" 2 | .SH NAME 3 | jpegexiforient \- reads or writes the Exif Orientation Tag 4 | .SH SYNOPSIS 5 | .B jpegexiforient 6 | [\fIswitches\fR] \fIjpegfile\fR 7 | .SH DESCRIPTION 8 | . 9 | This is a utility program to get and set the Exif Orientation Tag. 10 | It can be used together with jpegtran in scripts for automatic 11 | orientation correction of digital camera pictures. 12 | .PP 13 | The Exif orientation value gives the orientation of the camera 14 | relative to the scene when the image was captured. The relation 15 | of the '0th row' and '0th column' to visual position is shown as 16 | below. 17 | .IP 18 | .nf 19 | .ft CR 20 | Value | 0th Row | 0th Column 21 | ------+-------------+----------- 22 | 1 | top | left side 23 | 2 | top | right side 24 | 3 | bottom | right side 25 | 4 | bottom | left side 26 | 5 | left side | top 27 | 6 | right side | top 28 | 7 | right side | bottom 29 | 8 | left side | bottom 30 | .fi 31 | .PP 32 | For convenience, here is what the letter F would look like if it were 33 | tagged correctly and displayed by a program that ignores the orientation 34 | tag: 35 | .IP 36 | .nf 37 | .ft CB 38 | 1 2 3 4 39 | 40 | 888888 888888 88 88 41 | 88 88 88 88 42 | 8888 8888 8888 8888 43 | 88 88 88 88 44 | 88 88 888888 888888 45 | 46 | 5 6 7 8 47 | 48 | 8888888888 88 88 8888888888 49 | 88 88 88 88 88 88 88 88 50 | 88 8888888888 8888888888 88 51 | .fi 52 | .PP 53 | jpegexiforient output the Exif Orientation Tag in a JPEG Exif file. 54 | With the options -1 .. -8, it can also be used to set the tag. 55 | . 56 | .SS "OPTIONS" 57 | .TP 58 | \fB\-\-help\fR 59 | display this help and exit 60 | .TP 61 | \fB\-\-version\fR 62 | output version information and exit 63 | .TP 64 | \fB\-n\fR 65 | Do not output the trailing newline 66 | .TP 67 | \fB\-1\fR .. \fB\-8\fR 68 | Set orientation value 1 .. 8 69 | .SH "AUTHOR" 70 | Guido Vollbeding 71 | .SH "SEE ALSO" 72 | .BR jpegtran(1), 73 | .BR exifautotran(1) 74 | -------------------------------------------------------------------------------- /jni/debian/libjpeg-turbo-only.symbols: -------------------------------------------------------------------------------- 1 | LIBJPEGTURBO_8.0@LIBJPEGTURBO_8.0 2 | auxv@LIBJPEG_8.0 3 | init_simd@LIBJPEG_8.0 4 | jinit_phuff_decoder@LIBJPEG_8.0 5 | jinit_phuff_encoder@LIBJPEG_8.0 6 | jpeg_fill_bit_buffer@LIBJPEG_8.0 7 | jpeg_gen_optimal_table@LIBJPEG_8.0 8 | jpeg_huff_decode@LIBJPEG_8.0 9 | jpeg_make_c_derived_tbl@LIBJPEG_8.0 10 | jpeg_make_d_derived_tbl@LIBJPEG_8.0 11 | jpeg_simd_cpu_support@LIBJPEG_8.0 12 | libjpeg_general_init@LIBJPEG_8.0 13 | -------------------------------------------------------------------------------- /jni/debian/libjpeg-turbo-progs.install: -------------------------------------------------------------------------------- 1 | usr/bin/cjpeg 2 | usr/bin/rdjpgcom 3 | usr/bin/djpeg 4 | usr/bin/jpegtran 5 | usr/bin/wrjpgcom 6 | usr/bin/exifautotran 7 | usr/bin/jpegexiforient 8 | usr/share/man/* 9 | -------------------------------------------------------------------------------- /jni/debian/libjpeg-turbo-test.install: -------------------------------------------------------------------------------- 1 | usr/bin/tjunittest 2 | -------------------------------------------------------------------------------- /jni/debian/libjpeg-turbo8-dev.install: -------------------------------------------------------------------------------- 1 | usr/include 2 | usr/lib/*/libjpeg.a 3 | usr/lib/*/libturbojpeg.a 4 | usr/lib/*/libjpeg.so 5 | -------------------------------------------------------------------------------- /jni/debian/libjpeg-turbo8.install: -------------------------------------------------------------------------------- 1 | usr/lib/*/libjpeg.so.8* 2 | -------------------------------------------------------------------------------- /jni/debian/libjpeg-turbo8.lintian-overrides: -------------------------------------------------------------------------------- 1 | # yes, we specifically want linkers to depends on the standard libjpeg name 2 | libjpeg-turbo8: shlibs-declares-dependency-on-other-package libjpeg8 #MINVER# 3 | libjpeg-turbo8: symbols-declares-dependency-on-other-package libjpeg8 #MINVER# 4 | libjpeg-turbo8: package-name-doesnt-match-sonames 5 | -------------------------------------------------------------------------------- /jni/debian/libturbojpeg.install: -------------------------------------------------------------------------------- 1 | usr/lib/*/libturbojpeg.so 2 | -------------------------------------------------------------------------------- /jni/debian/libturbojpeg.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | if [ "$1" = "configure" ]; then 6 | ldconfig 7 | fi 8 | 9 | #DEBHELPER# 10 | -------------------------------------------------------------------------------- /jni/debian/libturbojpeg.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | if [ "$1" = "remove" ]; then 6 | ldconfig 7 | fi 8 | 9 | #DEBHELPER# 10 | -------------------------------------------------------------------------------- /jni/debian/patches/series: -------------------------------------------------------------------------------- 1 | FixLibraryStartup.patch 2 | tjunittest.patch 3 | add-copying-for-debian-dir.patch 4 | -------------------------------------------------------------------------------- /jni/debian/patches/tjunittest.patch: -------------------------------------------------------------------------------- 1 | Index: libjpeg-turbo-1.1.90+svn733/Makefile.am 2 | =================================================================== 3 | --- libjpeg-turbo-1.1.90+svn733.orig/Makefile.am 2011-12-20 19:33:20.000000000 +0000 4 | +++ libjpeg-turbo-1.1.90+svn733/Makefile.am 2011-12-20 19:35:26.358583864 +0000 5 | @@ -72,8 +72,7 @@ 6 | 7 | endif 8 | 9 | -bin_PROGRAMS = cjpeg djpeg jpegtran rdjpgcom wrjpgcom tjbench 10 | -noinst_PROGRAMS = tjunittest jcstest 11 | +bin_PROGRAMS = cjpeg djpeg jpegtran rdjpgcom wrjpgcom tjbench tjunittest jcstest 12 | 13 | tjbench_SOURCES = tjbench.c bmp.h bmp.c tjutil.h tjutil.c rdbmp.c rdppm.c \ 14 | wrbmp.c wrppm.c 15 | -------------------------------------------------------------------------------- /jni/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | #export DH_VERBOSE=1 11 | 12 | # for architecture dependent variables and changelog vars 13 | vafilt = $(subst $(2)=,,$(filter $(2)=%,$(1))) 14 | 15 | DPKG_VARS := $(shell dpkg-architecture) 16 | DEB_BUILD_GNU_TYPE ?= $(call vafilt,$(DPKG_VARS),DEB_BUILD_GNU_TYPE) 17 | DEB_HOST_GNU_TYPE ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_TYPE) 18 | DEB_HOST_MULTIARCH ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_MULTIARCH) 19 | 20 | CFLAGS ?= $(shell dpkg-buildflags --get CFLAGS) 21 | ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) 22 | CFLAGS += -Wall 23 | endif 24 | 25 | ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) 26 | CC = gcc 27 | else 28 | CC = $(DEB_HOST_GNU_TYPE)-gcc 29 | endif 30 | 31 | %: 32 | dh $@ --with autoreconf 33 | 34 | override_dh_auto_configure: 35 | dh_auto_configure -v -- --with-jpeg8 CFLAGS="$(CFLAGS)" 36 | 37 | override_dh_auto_build: 38 | dh_auto_build -v 39 | $(MAKE) -C debian/extra CC=$(CC) CFLAGS="$(CFLAGS) -Wall" 40 | 41 | override_dh_install: 42 | $(MAKE) -C debian/extra install prefix=/usr DESTDIR=$(CURDIR)/debian/tmp 43 | dh_install 44 | : # fix jconfig.h 45 | rm -f debian/tmp/usr/include/jconfig.h 46 | mkdir -p debian/tmp/usr/include/$(DEB_HOST_MULTIARCH) 47 | sed -e "s/#\(undef\|define\) HAVE_\(LOCALE\|\(STD\(DEF\|LIB\)\)\)_H 1//g" \ 48 | jconfig.h > debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/jconfig.h 49 | 50 | override_dh_installchangelogs: 51 | dh_installchangelogs -plibjpeg-turbo8-dev change.log 52 | dh_installchangelogs -Nlibjpeg-turbo8-dev 53 | 54 | override_dh_strip: 55 | dh_strip -plibjpeg-turbo8 --dbg-package=libjpeg-turbo8-dbg 56 | dh_strip -Nlibjpeg-turbo8 libjpeg-turbo8-dbg 57 | 58 | override_dh_makeshlibs: 59 | : # keep the original libjpeg symbol version 60 | dh_makeshlibs -- -v8c 61 | : # ... and mark libjpeg-turbo only symbols with a different version 62 | sed -i "$$(for i in $$(cat debian/libjpeg-turbo-only.symbols); do echo "/^ $$i/s/8c$$/8c-2ubuntu5~/;"; done)" debian/libjpeg-turbo8/DEBIAN/symbols 63 | 64 | override_dh_auto_test: 65 | 66 | override_dh_auto_clean: 67 | dh_auto_clean 68 | $(MAKE) -C debian/extra clean 69 | rm -f simd/jsimdcfg.inc 70 | 71 | deb_source := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p') 72 | svn_rev := $(shell dpkg-parsechangelog | sed -rne 's,^Version: .*[+~]svn([0-9]+).*,\1,p') 73 | upstream_version := $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p') 74 | 75 | .PHONY: get-orig-source 76 | get-orig-source: 77 | rm -rf $(deb_source)-$(upstream_version).orig 78 | rm -f $(deb_source)-$(upstream_version).orig.tar.gz 79 | svn -q export -r $(svn_rev) https://libjpeg-turbo.svn.sourceforge.net/svnroot/libjpeg-turbo/trunk \ 80 | $(deb_source)-$(upstream_version).orig 81 | GZIP=--best tar -cz --owner root --group root --mode a+rX \ 82 | -f $(deb_source)_$(upstream_version).orig.tar.gz \ 83 | $(deb_source)-$(upstream_version).orig 84 | rm -r $(deb_source)-$(upstream_version).orig 85 | 86 | -------------------------------------------------------------------------------- /jni/debian/source.lintian-overrides: -------------------------------------------------------------------------------- 1 | package-needs-versioned-debhelper-build-depends 9 2 | -------------------------------------------------------------------------------- /jni/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /jni/debian/watch: -------------------------------------------------------------------------------- 1 | version=3 2 | http://sf.net/libjpeg-turbo/libjpeg-turbo-(.+)\.tar\.gz 3 | -------------------------------------------------------------------------------- /jni/doc/html/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/jni/doc/html/bc_s.png -------------------------------------------------------------------------------- /jni/doc/html/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/jni/doc/html/closed.png -------------------------------------------------------------------------------- /jni/doc/html/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/jni/doc/html/doxygen.png -------------------------------------------------------------------------------- /jni/doc/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | TurboJPEG: Main Page 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 |
17 |
18 | 19 | 20 | 21 | 24 | 25 | 26 |
22 |
TurboJPEG 1.2
23 |
27 |
28 | 51 |
52 |
53 |
54 |
TurboJPEG Documentation
55 |
56 |
57 |
58 | 59 | 64 | 65 | 66 |
67 | 70 |
71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /jni/doc/html/installdox: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | %subst = ( ); 4 | $quiet = 0; 5 | 6 | while ( @ARGV ) { 7 | $_ = shift @ARGV; 8 | if ( s/^-// ) { 9 | if ( /^l(.*)/ ) { 10 | $v = ($1 eq "") ? shift @ARGV : $1; 11 | ($v =~ /\/$/) || ($v .= "/"); 12 | $_ = $v; 13 | if ( /(.+)\@(.+)/ ) { 14 | if ( exists $subst{$1} ) { 15 | $subst{$1} = $2; 16 | } else { 17 | print STDERR "Unknown tag file $1 given with option -l\n"; 18 | &usage(); 19 | } 20 | } else { 21 | print STDERR "Argument $_ is invalid for option -l\n"; 22 | &usage(); 23 | } 24 | } 25 | elsif ( /^q/ ) { 26 | $quiet = 1; 27 | } 28 | elsif ( /^\?|^h/ ) { 29 | &usage(); 30 | } 31 | else { 32 | print STDERR "Illegal option -$_\n"; 33 | &usage(); 34 | } 35 | } 36 | else { 37 | push (@files, $_ ); 38 | } 39 | } 40 | 41 | foreach $sub (keys %subst) 42 | { 43 | if ( $subst{$sub} eq "" ) 44 | { 45 | print STDERR "No substitute given for tag file `$sub'\n"; 46 | &usage(); 47 | } 48 | elsif ( ! $quiet && $sub ne "_doc" && $sub ne "_cgi" ) 49 | { 50 | print "Substituting $subst{$sub} for each occurrence of tag file $sub\n"; 51 | } 52 | } 53 | 54 | if ( ! @files ) { 55 | if (opendir(D,".")) { 56 | foreach $file ( readdir(D) ) { 57 | $match = ".html"; 58 | next if ( $file =~ /^\.\.?$/ ); 59 | ($file =~ /$match/) && (push @files, $file); 60 | ($file =~ /\.svg/) && (push @files, $file); 61 | ($file =~ "navtree.js") && (push @files, $file); 62 | } 63 | closedir(D); 64 | } 65 | } 66 | 67 | if ( ! @files ) { 68 | print STDERR "Warning: No input files given and none found!\n"; 69 | } 70 | 71 | foreach $f (@files) 72 | { 73 | if ( ! $quiet ) { 74 | print "Editing: $f...\n"; 75 | } 76 | $oldf = $f; 77 | $f .= ".bak"; 78 | unless (rename $oldf,$f) { 79 | print STDERR "Error: cannot rename file $oldf\n"; 80 | exit 1; 81 | } 82 | if (open(F,"<$f")) { 83 | unless (open(G,">$oldf")) { 84 | print STDERR "Error: opening file $oldf for writing\n"; 85 | exit 1; 86 | } 87 | if ($oldf ne "tree.js") { 88 | while () { 89 | s/doxygen\=\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\" (xlink:href|href|src)=\"\2/doxygen\=\"$1:$subst{$1}\" \3=\"$subst{$1}/g; 90 | print G "$_"; 91 | } 92 | } 93 | else { 94 | while () { 95 | s/\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\", \"\2/\"$1:$subst{$1}\" ,\"$subst{$1}/g; 96 | print G "$_"; 97 | } 98 | } 99 | } 100 | else { 101 | print STDERR "Warning file $f does not exist\n"; 102 | } 103 | unlink $f; 104 | } 105 | 106 | sub usage { 107 | print STDERR "Usage: installdox [options] [html-file [html-file ...]]\n"; 108 | print STDERR "Options:\n"; 109 | print STDERR " -l tagfile\@linkName tag file + URL or directory \n"; 110 | print STDERR " -q Quiet mode\n\n"; 111 | exit 1; 112 | } 113 | -------------------------------------------------------------------------------- /jni/doc/html/modules.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | TurboJPEG: Modules 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 |
17 |
18 | 19 | 20 | 21 | 24 | 25 | 26 |
22 |
TurboJPEG 1.2
23 |
27 |
28 | 51 |
52 |
53 |
54 |
Modules
55 |
56 |
57 |
Here is a list of all modules:
60 |
61 | 62 | 67 | 68 | 69 |
70 | 73 |
74 | 75 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /jni/doc/html/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/jni/doc/html/nav_f.png -------------------------------------------------------------------------------- /jni/doc/html/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/jni/doc/html/nav_h.png -------------------------------------------------------------------------------- /jni/doc/html/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/jni/doc/html/open.png -------------------------------------------------------------------------------- /jni/doc/html/search/all_63.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | customFilter 13 | tjtransform 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /jni/doc/html/search/all_64.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | data 13 | tjtransform 14 |
15 |
16 |
17 |
18 | denom 19 | tjscalingfactor 20 |
21 |
22 |
Searching...
23 |
No Matches
24 | 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /jni/doc/html/search/all_68.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | h 13 | tjregion 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /jni/doc/html/search/all_6e.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | num 13 | tjscalingfactor 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /jni/doc/html/search/all_6f.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | op 13 | tjtransform 14 |
15 |
16 |
17 |
18 | options 19 | tjtransform 20 |
21 |
22 |
Searching...
23 |
No Matches
24 | 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /jni/doc/html/search/all_72.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | r 13 | tjtransform 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /jni/doc/html/search/all_74.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | tjregion 13 |
14 |
15 |
16 |
17 | tjscalingfactor 18 |
19 |
20 |
21 |
22 | tjtransform 23 |
24 |
25 |
Searching...
26 |
No Matches
27 | 33 |
34 | 35 | 36 | -------------------------------------------------------------------------------- /jni/doc/html/search/all_77.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | w 13 | tjregion 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /jni/doc/html/search/all_78.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | x 13 | tjregion 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /jni/doc/html/search/all_79.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | y 13 | tjregion 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /jni/doc/html/search/classes_74.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | tjregion 13 |
14 |
15 |
16 |
17 | tjscalingfactor 18 |
19 |
20 |
21 |
22 | tjtransform 23 |
24 |
25 |
Searching...
26 |
No Matches
27 | 33 |
34 | 35 | 36 | -------------------------------------------------------------------------------- /jni/doc/html/search/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/jni/doc/html/search/close.png -------------------------------------------------------------------------------- /jni/doc/html/search/mag_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/jni/doc/html/search/mag_sel.png -------------------------------------------------------------------------------- /jni/doc/html/search/nomatches.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
No Matches
10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /jni/doc/html/search/search_l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/jni/doc/html/search/search_l.png -------------------------------------------------------------------------------- /jni/doc/html/search/search_m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/jni/doc/html/search/search_m.png -------------------------------------------------------------------------------- /jni/doc/html/search/search_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/jni/doc/html/search/search_r.png -------------------------------------------------------------------------------- /jni/doc/html/search/variables_63.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | customFilter 13 | tjtransform 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /jni/doc/html/search/variables_64.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | data 13 | tjtransform 14 |
15 |
16 |
17 |
18 | denom 19 | tjscalingfactor 20 |
21 |
22 |
Searching...
23 |
No Matches
24 | 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /jni/doc/html/search/variables_68.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | h 13 | tjregion 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /jni/doc/html/search/variables_6e.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | num 13 | tjscalingfactor 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /jni/doc/html/search/variables_6f.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | op 13 | tjtransform 14 |
15 |
16 |
17 |
18 | options 19 | tjtransform 20 |
21 |
22 |
Searching...
23 |
No Matches
24 | 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /jni/doc/html/search/variables_72.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | r 13 | tjtransform 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /jni/doc/html/search/variables_77.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | w 13 | tjregion 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /jni/doc/html/search/variables_78.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | x 13 | tjregion 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /jni/doc/html/search/variables_79.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | y 13 | tjregion 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /jni/doc/html/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/jni/doc/html/tab_a.png -------------------------------------------------------------------------------- /jni/doc/html/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/jni/doc/html/tab_b.png -------------------------------------------------------------------------------- /jni/doc/html/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/jni/doc/html/tab_h.png -------------------------------------------------------------------------------- /jni/doc/html/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/jni/doc/html/tab_s.png -------------------------------------------------------------------------------- /jni/doc/html/tabs.css: -------------------------------------------------------------------------------- 1 | .tabs, .tabs2, .tabs3 { 2 | background-image: url('tab_b.png'); 3 | width: 100%; 4 | z-index: 101; 5 | font-size: 13px; 6 | } 7 | 8 | .tabs2 { 9 | font-size: 10px; 10 | } 11 | .tabs3 { 12 | font-size: 9px; 13 | } 14 | 15 | .tablist { 16 | margin: 0; 17 | padding: 0; 18 | display: table; 19 | } 20 | 21 | .tablist li { 22 | float: left; 23 | display: table-cell; 24 | background-image: url('tab_b.png'); 25 | line-height: 36px; 26 | list-style: none; 27 | } 28 | 29 | .tablist a { 30 | display: block; 31 | padding: 0 20px; 32 | font-weight: bold; 33 | background-image:url('tab_s.png'); 34 | background-repeat:no-repeat; 35 | background-position:right; 36 | color: #283A5D; 37 | text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); 38 | text-decoration: none; 39 | outline: none; 40 | } 41 | 42 | .tabs3 .tablist a { 43 | padding: 0 10px; 44 | } 45 | 46 | .tablist a:hover { 47 | background-image: url('tab_h.png'); 48 | background-repeat:repeat-x; 49 | color: #fff; 50 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 51 | text-decoration: none; 52 | } 53 | 54 | .tablist li.current a { 55 | background-image: url('tab_a.png'); 56 | background-repeat:repeat-x; 57 | color: #fff; 58 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 59 | } 60 | -------------------------------------------------------------------------------- /jni/java/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(JAR_FILE turbojpeg.jar) 2 | set(MANIFEST_FILE ${CMAKE_CURRENT_SOURCE_DIR}/MANIFEST.MF) 3 | 4 | set(JAVA_CLASSNAMES org/libjpegturbo/turbojpeg/TJ 5 | org/libjpegturbo/turbojpeg/TJCompressor 6 | org/libjpegturbo/turbojpeg/TJCustomFilter 7 | org/libjpegturbo/turbojpeg/TJDecompressor 8 | org/libjpegturbo/turbojpeg/TJScalingFactor 9 | org/libjpegturbo/turbojpeg/TJTransform 10 | org/libjpegturbo/turbojpeg/TJTransformer 11 | TJUnitTest 12 | TJExample) 13 | 14 | if(MSVC_IDE) 15 | set(OBJDIR "${CMAKE_CURRENT_BINARY_DIR}/$(OutDir)") 16 | else() 17 | set(OBJDIR ${CMAKE_CURRENT_BINARY_DIR}) 18 | endif() 19 | 20 | set(TURBOJPEG_DLL_NAME "turbojpeg") 21 | if(MINGW) 22 | set(TURBOJPEG_DLL_NAME "libturbojpeg") 23 | endif() 24 | configure_file(org/libjpegturbo/turbojpeg/TJLoader.java.in 25 | ${CMAKE_CURRENT_BINARY_DIR}/org/libjpegturbo/turbojpeg/TJLoader.java) 26 | 27 | set(JAVA_SOURCES "") 28 | set(JAVA_CLASSES "") 29 | set(JAVA_CLASSES_FULL "") 30 | foreach(class ${JAVA_CLASSNAMES}) 31 | set(JAVA_SOURCES ${JAVA_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/${class}.java) 32 | set(JAVA_CLASSES ${JAVA_CLASSES} ${class}.class) 33 | set(JAVA_CLASSES_FULL ${JAVA_CLASSES_FULL} ${OBJDIR}/${class}.class) 34 | endforeach() 35 | 36 | set(JAVA_SOURCES ${JAVA_SOURCES} 37 | ${CMAKE_CURRENT_BINARY_DIR}/org/libjpegturbo/turbojpeg/TJLoader.java) 38 | set(JAVA_CLASSES ${JAVA_CLASSES} 39 | org/libjpegturbo/turbojpeg/TJLoader.class) 40 | set(JAVA_CLASSES_FULL ${JAVA_CLASSES_FULL} 41 | ${OBJDIR}/org/libjpegturbo/turbojpeg/TJLoader.class) 42 | 43 | string(REGEX REPLACE " " ";" JAVACFLAGS "${JAVACFLAGS}") 44 | add_custom_command(OUTPUT ${JAVA_CLASSES_FULL} DEPENDS ${JAVA_SOURCES} 45 | COMMAND ${JAVA_COMPILE} ARGS ${JAVACFLAGS} -d ${OBJDIR} ${JAVA_SOURCES}) 46 | 47 | add_custom_command(OUTPUT ${JAR_FILE} DEPENDS ${JAVA_CLASSES_FULL} 48 | ${MANIFEST_FILE} 49 | COMMAND ${JAVA_ARCHIVE} cfm ${JAR_FILE} ${MANIFEST_FILE} ${JAVA_CLASSES} 50 | WORKING_DIRECTORY ${OBJDIR}) 51 | 52 | add_custom_target(java ALL DEPENDS ${JAR_FILE}) 53 | 54 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${JAR_FILE} DESTINATION classes) 55 | -------------------------------------------------------------------------------- /jni/java/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Main-Class: TJExample 3 | -------------------------------------------------------------------------------- /jni/java/Makefile.am: -------------------------------------------------------------------------------- 1 | JAVAROOT = . 2 | 3 | JAVASOURCES = org/libjpegturbo/turbojpeg/TJ.java \ 4 | org/libjpegturbo/turbojpeg/TJCompressor.java \ 5 | org/libjpegturbo/turbojpeg/TJCustomFilter.java \ 6 | org/libjpegturbo/turbojpeg/TJDecompressor.java \ 7 | org/libjpegturbo/turbojpeg/TJLoader.java \ 8 | org/libjpegturbo/turbojpeg/TJScalingFactor.java \ 9 | org/libjpegturbo/turbojpeg/TJTransform.java \ 10 | org/libjpegturbo/turbojpeg/TJTransformer.java \ 11 | TJExample.java \ 12 | TJUnitTest.java 13 | 14 | JNIHEADERS = org_libjpegturbo_turbojpeg_TJ.h \ 15 | org_libjpegturbo_turbojpeg_TJCompressor.h \ 16 | org_libjpegturbo_turbojpeg_TJDecompressor.h \ 17 | org_libjpegturbo_turbojpeg_TJTransformer.h 18 | 19 | if WITH_JAVA 20 | 21 | dist_noinst_JAVA = ${JAVASOURCES} 22 | 23 | JAVA_CLASSES = org/libjpegturbo/turbojpeg/TJ.class \ 24 | org/libjpegturbo/turbojpeg/TJCompressor.class \ 25 | org/libjpegturbo/turbojpeg/TJCustomFilter.class \ 26 | org/libjpegturbo/turbojpeg/TJDecompressor.class \ 27 | org/libjpegturbo/turbojpeg/TJLoader.class \ 28 | org/libjpegturbo/turbojpeg/TJScalingFactor.class \ 29 | org/libjpegturbo/turbojpeg/TJTransform.class \ 30 | org/libjpegturbo/turbojpeg/TJTransformer.class \ 31 | TJExample.class \ 32 | TJUnitTest.class 33 | 34 | all: all-am turbojpeg.jar 35 | 36 | turbojpeg.jar: $(JAVA_CLASSES) ${srcdir}/MANIFEST.MF 37 | $(JAR) cfm turbojpeg.jar ${srcdir}/MANIFEST.MF $(JAVA_CLASSES) 38 | 39 | clean-local: 40 | rm -f turbojpeg.jar 41 | 42 | install-exec-local: turbojpeg.jar 43 | mkdir -p $(DESTDIR)/$(prefix)/classes 44 | $(INSTALL) -m 644 turbojpeg.jar $(DESTDIR)/$(prefix)/classes/ 45 | 46 | uninstall-local: 47 | rm -f $(DESTDIR)/$(prefix)/classes/turbojpeg.jar 48 | if [ -d $(DESTDIR)/$(prefix)/classes ]; then rmdir $(DESTDIR)/$(prefix)/classes; fi 49 | 50 | headers: all 51 | javah -d ${srcdir} org.libjpegturbo.turbojpeg.TJ; \ 52 | javah -d ${srcdir} org.libjpegturbo.turbojpeg.TJCompressor; \ 53 | javah -d ${srcdir} org.libjpegturbo.turbojpeg.TJDecompressor; \ 54 | javah -d ${srcdir} org.libjpegturbo.turbojpeg.TJTransformer 55 | 56 | docs: all 57 | mkdir -p ${srcdir}/doc; \ 58 | javadoc -d ${srcdir}/doc -sourcepath ${srcdir} org.libjpegturbo.turbojpeg 59 | 60 | endif 61 | 62 | EXTRA_DIST = MANIFEST.MF ${JAVASOURCES} ${JNIHEADERS} doc CMakeLists.txt \ 63 | org/libjpegturbo/turbojpeg/TJLoader.java.in 64 | -------------------------------------------------------------------------------- /jni/java/README: -------------------------------------------------------------------------------- 1 | TurboJPEG/OSS Java Wrapper 2 | ========================== 3 | 4 | TurboJPEG/OSS can optionally be built with a Java Native Interface wrapper, 5 | which allows the TurboJPEG/OSS dynamic library to be loaded and used directly 6 | from Java applications. The Java front end for this is defined in several 7 | classes located under org/libjpegturbo/turbojpeg. The source code for these 8 | Java classes is licensed under a BSD-style license, so the files can be 9 | incorporated directly into both open source and proprietary projects without 10 | restriction. A Java archive (JAR) file containing these classes is also 11 | shipped with the "official" distribution packages of libjpeg-turbo. 12 | 13 | TJExample.java, which should also be located in the same directory as this 14 | README file, demonstrates how to use the TurboJPEG/OSS Java front end to 15 | compress and decompress JPEG images in memory. 16 | 17 | 18 | Performance Pitfalls 19 | -------------------- 20 | 21 | The TurboJPEG Java front end defines several convenience methods that can 22 | allocate image buffers or instantiate classes to hold the result of compress, 23 | decompress, or transform operations. However, if you use these methods, then 24 | be mindful of the amount of new data you are creating on the heap. It may be 25 | necessary to manually invoke the garbage collector to prevent heap exhaustion 26 | or to prevent performance degradation. Background garbage collection can kill 27 | performance, particularly in a multi-threaded environment (Java pauses all 28 | threads when the GC runs.) 29 | 30 | The Java front end always gives you the option of pre-allocating your own 31 | source and destination buffers, which allows you to re-use these buffers for 32 | compressing/decompressing multiple images. If the image sequence you are 33 | compressing or decompressing consists of images of the same size, then 34 | pre-allocating the buffers is recommended. 35 | 36 | 37 | Note for OS X users 38 | ------------------- 39 | 40 | /usr/lib, the directory under which libturbojpeg.dylib is installed on Mac 41 | systems, is not part of the normal Java library path. Thus, when running a 42 | Java application that uses TurboJPEG/OSS on Mac systems, you will need to pass 43 | an argument of -Djava.library.path=/usr/lib to java. 44 | 45 | 46 | Note for Solaris users 47 | ---------------------- 48 | 49 | /opt/libjpeg-turbo/lib, the directory under which libturbojpeg.so is installed 50 | on Solaris systems, is not part of the normal Java library path. Thus, when 51 | running a Java application that uses TurboJPEG/OSS on Solaris systems, you will 52 | need to pass an argument of -Djava.library.path=/opt/libjpeg-turbo/lib to java. 53 | If using a 64-bit data model, then instead pass an argument of 54 | -Djava.library.path=/opt/libjpeg-turbo/lib/amd64 to use the 64-bit version of 55 | libturbojpeg.so. 56 | -------------------------------------------------------------------------------- /jni/java/doc/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | All Classes 20 |
21 | 22 | 23 | 24 | 39 | 40 |
TJ 25 |
26 | TJCompressor 27 |
28 | TJCustomFilter 29 |
30 | TJDecompressor 31 |
32 | TJScalingFactor 33 |
34 | TJTransform 35 |
36 | TJTransformer 37 |
38 |
41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /jni/java/doc/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | All Classes 20 |
21 | 22 | 23 | 24 | 39 | 40 |
TJ 25 |
26 | TJCompressor 27 |
28 | TJCustomFilter 29 |
30 | TJDecompressor 31 |
32 | TJScalingFactor 33 |
34 | TJTransform 35 |
36 | TJTransformer 37 |
38 |
41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /jni/java/doc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Generated Documentation (Untitled) 8 | 9 | 20 | 22 | 23 | 24 | 25 | 26 | 27 | <H2> 28 | Frame Alert</H2> 29 | 30 | <P> 31 | This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. 32 | <BR> 33 | Link to<A HREF="org/libjpegturbo/turbojpeg/package-summary.html">Non-frame version.</A> 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /jni/java/doc/org/libjpegturbo/turbojpeg/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | org.libjpegturbo.turbojpeg 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | org.libjpegturbo.turbojpeg 20 | 21 | 22 | 27 | 28 |
23 | Interfaces  24 | 25 |
26 | TJCustomFilter
29 | 30 | 31 | 32 | 33 | 48 | 49 |
34 | Classes  35 | 36 |
37 | TJ 38 |
39 | TJCompressor 40 |
41 | TJDecompressor 42 |
43 | TJScalingFactor 44 |
45 | TJTransform 46 |
47 | TJTransformer
50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /jni/java/doc/package-list: -------------------------------------------------------------------------------- 1 | org.libjpegturbo.turbojpeg 2 | -------------------------------------------------------------------------------- /jni/java/doc/resources/inherit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/jni/java/doc/resources/inherit.gif -------------------------------------------------------------------------------- /jni/java/doc/stylesheet.css: -------------------------------------------------------------------------------- 1 | /* Javadoc style sheet */ 2 | 3 | /* Define colors, fonts and other style attributes here to override the defaults */ 4 | 5 | /* Page background color */ 6 | body { background-color: #FFFFFF; color:#000000 } 7 | 8 | /* Headings */ 9 | h1 { font-size: 145% } 10 | 11 | /* Table colors */ 12 | .TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */ 13 | .TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */ 14 | .TableRowColor { background: #FFFFFF; color:#000000 } /* White */ 15 | 16 | /* Font used in left-hand frame lists */ 17 | .FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 } 18 | .FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } 19 | .FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } 20 | 21 | /* Navigation bar fonts and colors */ 22 | .NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */ 23 | .NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */ 24 | .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;} 25 | .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;} 26 | 27 | .NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} 28 | .NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} 29 | 30 | -------------------------------------------------------------------------------- /jni/java/org/libjpegturbo/turbojpeg/TJCustomFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C)2011 D. R. Commander. All Rights Reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * - Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * - Redistributions in binary form must reproduce the above copyright notice, 10 | * this list of conditions and the following disclaimer in the documentation 11 | * and/or other materials provided with the distribution. 12 | * - Neither the name of the libjpeg-turbo Project nor the names of its 13 | * contributors may be used to endorse or promote products derived from this 14 | * software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | package org.libjpegturbo.turbojpeg; 30 | 31 | import java.awt.*; 32 | import java.nio.*; 33 | 34 | /** 35 | * Custom filter callback interface 36 | */ 37 | public interface TJCustomFilter { 38 | 39 | /** 40 | * A callback function that can be used to modify the DCT coefficients after 41 | * they are losslessly transformed but before they are transcoded to a new 42 | * JPEG file. This allows for custom filters or other transformations to be 43 | * applied in the frequency domain. 44 | * 45 | * @param coeffBuffer a buffer containing transformed DCT coefficients. 46 | * (NOTE: this buffer is not guaranteed to be valid once the callback 47 | * returns, so applications wishing to hand off the DCT coefficients to 48 | * another function or library should make a copy of them within the body of 49 | * the callback.) 50 | * 51 | * @param bufferRegion rectangle containing the width and height of 52 | * coeffBuffer as well as its offset relative to the component 53 | * plane. TurboJPEG implementations may choose to split each component plane 54 | * into multiple DCT coefficient buffers and call the callback function once 55 | * for each buffer. 56 | * 57 | * @param planeRegion rectangle containing the width and height of the 58 | * component plane to which coeffBuffer belongs 59 | * 60 | * @param componentID ID number of the component plane to which 61 | * coeffBufferbelongs (Y, Cb, and Cr have, respectively, ID's of 62 | * 0, 1, and 2 in typical JPEG images.) 63 | * 64 | * @param transformID ID number of the transformed image to which 65 | * coeffBuffer belongs. This is the same as the index of the 66 | * transform in the transforms array that was passed to {@link 67 | * TJTransformer#transform TJTransformer.transform()}. 68 | * 69 | * @param transform a {@link TJTransform} instance that specifies the 70 | * parameters and/or cropping region for this transform 71 | */ 72 | public void customFilter(ShortBuffer coeffBuffer, Rectangle bufferRegion, 73 | Rectangle planeRegion, int componentID, int transformID, 74 | TJTransform transform) 75 | throws Exception; 76 | } 77 | -------------------------------------------------------------------------------- /jni/java/org/libjpegturbo/turbojpeg/TJLoader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C)2011 D. R. Commander. All Rights Reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * - Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * - Redistributions in binary form must reproduce the above copyright notice, 10 | * this list of conditions and the following disclaimer in the documentation 11 | * and/or other materials provided with the distribution. 12 | * - Neither the name of the libjpeg-turbo Project nor the names of its 13 | * contributors may be used to endorse or promote products derived from this 14 | * software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | package org.libjpegturbo.turbojpeg; 30 | 31 | final class TJLoader { 32 | static void load() { 33 | System.loadLibrary("turbojpeg"); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /jni/java/org/libjpegturbo/turbojpeg/TJLoader.java.in: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C)2011 D. R. Commander. All Rights Reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * - Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * - Redistributions in binary form must reproduce the above copyright notice, 10 | * this list of conditions and the following disclaimer in the documentation 11 | * and/or other materials provided with the distribution. 12 | * - Neither the name of the libjpeg-turbo Project nor the names of its 13 | * contributors may be used to endorse or promote products derived from this 14 | * software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | package org.libjpegturbo.turbojpeg; 30 | 31 | final class TJLoader { 32 | static void load() { 33 | System.loadLibrary("@TURBOJPEG_DLL_NAME@"); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /jni/java/org/libjpegturbo/turbojpeg/TJScalingFactor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C)2011 D. R. Commander. All Rights Reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * - Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * - Redistributions in binary form must reproduce the above copyright notice, 10 | * this list of conditions and the following disclaimer in the documentation 11 | * and/or other materials provided with the distribution. 12 | * - Neither the name of the libjpeg-turbo Project nor the names of its 13 | * contributors may be used to endorse or promote products derived from this 14 | * software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | package org.libjpegturbo.turbojpeg; 30 | 31 | /** 32 | * Fractional scaling factor 33 | */ 34 | public class TJScalingFactor { 35 | 36 | public TJScalingFactor(int num, int denom) throws Exception { 37 | if(num < 1 || denom < 1) 38 | throw new Exception("Numerator and denominator must be >= 1"); 39 | this.num = num; 40 | this.denom = denom; 41 | } 42 | 43 | /** 44 | * Returns numerator 45 | * @return numerator 46 | */ 47 | public int getNum() { 48 | return num; 49 | } 50 | 51 | /** 52 | * Returns denominator 53 | * @return denominator 54 | */ 55 | public int getDenom() { 56 | return denom; 57 | } 58 | 59 | /** 60 | * Returns the scaled value of dimension. This function 61 | * performs the integer equivalent of 62 | * ceil(dimension * scalingFactor). 63 | * @return the scaled value of dimension 64 | */ 65 | public int getScaled(int dimension) { 66 | return (dimension * num + denom - 1) / denom; 67 | } 68 | 69 | /** 70 | * Returns true or false, depending on whether this instance and 71 | * other have the same numerator and denominator. 72 | * @return true or false, depending on whether this instance and 73 | * other have the same numerator and denominator 74 | */ 75 | public boolean equals(TJScalingFactor other) { 76 | return (this.num == other.num && this.denom == other.denom); 77 | } 78 | 79 | /** 80 | * Returns true or false, depending on whether this instance is equal to 81 | * 1/1. 82 | * @return true or false, depending on whether this instance is equal to 83 | * 1/1 84 | */ 85 | public boolean isOne() { 86 | return (num == 1 && denom == 1); 87 | } 88 | 89 | /** 90 | * Numerator 91 | */ 92 | private int num = 1; 93 | 94 | /** 95 | * Denominator 96 | */ 97 | private int denom = 1; 98 | }; 99 | -------------------------------------------------------------------------------- /jni/java/org_libjpegturbo_turbojpeg_TJ.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_libjpegturbo_turbojpeg_TJ */ 4 | 5 | #ifndef _Included_org_libjpegturbo_turbojpeg_TJ 6 | #define _Included_org_libjpegturbo_turbojpeg_TJ 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | #undef org_libjpegturbo_turbojpeg_TJ_NUMSAMP 11 | #define org_libjpegturbo_turbojpeg_TJ_NUMSAMP 5L 12 | #undef org_libjpegturbo_turbojpeg_TJ_SAMP_444 13 | #define org_libjpegturbo_turbojpeg_TJ_SAMP_444 0L 14 | #undef org_libjpegturbo_turbojpeg_TJ_SAMP_422 15 | #define org_libjpegturbo_turbojpeg_TJ_SAMP_422 1L 16 | #undef org_libjpegturbo_turbojpeg_TJ_SAMP_420 17 | #define org_libjpegturbo_turbojpeg_TJ_SAMP_420 2L 18 | #undef org_libjpegturbo_turbojpeg_TJ_SAMP_GRAY 19 | #define org_libjpegturbo_turbojpeg_TJ_SAMP_GRAY 3L 20 | #undef org_libjpegturbo_turbojpeg_TJ_SAMP_440 21 | #define org_libjpegturbo_turbojpeg_TJ_SAMP_440 4L 22 | #undef org_libjpegturbo_turbojpeg_TJ_NUMPF 23 | #define org_libjpegturbo_turbojpeg_TJ_NUMPF 11L 24 | #undef org_libjpegturbo_turbojpeg_TJ_PF_RGB 25 | #define org_libjpegturbo_turbojpeg_TJ_PF_RGB 0L 26 | #undef org_libjpegturbo_turbojpeg_TJ_PF_BGR 27 | #define org_libjpegturbo_turbojpeg_TJ_PF_BGR 1L 28 | #undef org_libjpegturbo_turbojpeg_TJ_PF_RGBX 29 | #define org_libjpegturbo_turbojpeg_TJ_PF_RGBX 2L 30 | #undef org_libjpegturbo_turbojpeg_TJ_PF_BGRX 31 | #define org_libjpegturbo_turbojpeg_TJ_PF_BGRX 3L 32 | #undef org_libjpegturbo_turbojpeg_TJ_PF_XBGR 33 | #define org_libjpegturbo_turbojpeg_TJ_PF_XBGR 4L 34 | #undef org_libjpegturbo_turbojpeg_TJ_PF_XRGB 35 | #define org_libjpegturbo_turbojpeg_TJ_PF_XRGB 5L 36 | #undef org_libjpegturbo_turbojpeg_TJ_PF_GRAY 37 | #define org_libjpegturbo_turbojpeg_TJ_PF_GRAY 6L 38 | #undef org_libjpegturbo_turbojpeg_TJ_PF_RGBA 39 | #define org_libjpegturbo_turbojpeg_TJ_PF_RGBA 7L 40 | #undef org_libjpegturbo_turbojpeg_TJ_PF_BGRA 41 | #define org_libjpegturbo_turbojpeg_TJ_PF_BGRA 8L 42 | #undef org_libjpegturbo_turbojpeg_TJ_PF_ABGR 43 | #define org_libjpegturbo_turbojpeg_TJ_PF_ABGR 9L 44 | #undef org_libjpegturbo_turbojpeg_TJ_PF_ARGB 45 | #define org_libjpegturbo_turbojpeg_TJ_PF_ARGB 10L 46 | #undef org_libjpegturbo_turbojpeg_TJ_FLAG_BOTTOMUP 47 | #define org_libjpegturbo_turbojpeg_TJ_FLAG_BOTTOMUP 2L 48 | #undef org_libjpegturbo_turbojpeg_TJ_FLAG_FORCEMMX 49 | #define org_libjpegturbo_turbojpeg_TJ_FLAG_FORCEMMX 8L 50 | #undef org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE 51 | #define org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE 16L 52 | #undef org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE2 53 | #define org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE2 32L 54 | #undef org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE3 55 | #define org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE3 128L 56 | #undef org_libjpegturbo_turbojpeg_TJ_FLAG_FASTUPSAMPLE 57 | #define org_libjpegturbo_turbojpeg_TJ_FLAG_FASTUPSAMPLE 256L 58 | /* 59 | * Class: org_libjpegturbo_turbojpeg_TJ 60 | * Method: bufSize 61 | * Signature: (III)I 62 | */ 63 | JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_bufSize 64 | (JNIEnv *, jclass, jint, jint, jint); 65 | 66 | /* 67 | * Class: org_libjpegturbo_turbojpeg_TJ 68 | * Method: bufSizeYUV 69 | * Signature: (III)I 70 | */ 71 | JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_bufSizeYUV 72 | (JNIEnv *, jclass, jint, jint, jint); 73 | 74 | /* 75 | * Class: org_libjpegturbo_turbojpeg_TJ 76 | * Method: getScalingFactors 77 | * Signature: ()[Lorg/libjpegturbo/turbojpeg/TJScalingFactor; 78 | */ 79 | JNIEXPORT jobjectArray JNICALL Java_org_libjpegturbo_turbojpeg_TJ_getScalingFactors 80 | (JNIEnv *, jclass); 81 | 82 | #ifdef __cplusplus 83 | } 84 | #endif 85 | #endif 86 | -------------------------------------------------------------------------------- /jni/java/org_libjpegturbo_turbojpeg_TJCompressor.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_libjpegturbo_turbojpeg_TJCompressor */ 4 | 5 | #ifndef _Included_org_libjpegturbo_turbojpeg_TJCompressor 6 | #define _Included_org_libjpegturbo_turbojpeg_TJCompressor 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* 11 | * Class: org_libjpegturbo_turbojpeg_TJCompressor 12 | * Method: init 13 | * Signature: ()V 14 | */ 15 | JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_init 16 | (JNIEnv *, jobject); 17 | 18 | /* 19 | * Class: org_libjpegturbo_turbojpeg_TJCompressor 20 | * Method: destroy 21 | * Signature: ()V 22 | */ 23 | JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_destroy 24 | (JNIEnv *, jobject); 25 | 26 | /* 27 | * Class: org_libjpegturbo_turbojpeg_TJCompressor 28 | * Method: compress 29 | * Signature: ([BIIII[BIII)I 30 | */ 31 | JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_compress___3BIIII_3BIII 32 | (JNIEnv *, jobject, jbyteArray, jint, jint, jint, jint, jbyteArray, jint, jint, jint); 33 | 34 | /* 35 | * Class: org_libjpegturbo_turbojpeg_TJCompressor 36 | * Method: compress 37 | * Signature: ([IIIII[BIII)I 38 | */ 39 | JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_compress___3IIIII_3BIII 40 | (JNIEnv *, jobject, jintArray, jint, jint, jint, jint, jbyteArray, jint, jint, jint); 41 | 42 | /* 43 | * Class: org_libjpegturbo_turbojpeg_TJCompressor 44 | * Method: encodeYUV 45 | * Signature: ([BIIII[BII)V 46 | */ 47 | JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIII_3BII 48 | (JNIEnv *, jobject, jbyteArray, jint, jint, jint, jint, jbyteArray, jint, jint); 49 | 50 | /* 51 | * Class: org_libjpegturbo_turbojpeg_TJCompressor 52 | * Method: encodeYUV 53 | * Signature: ([IIIII[BII)V 54 | */ 55 | JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIII_3BII 56 | (JNIEnv *, jobject, jintArray, jint, jint, jint, jint, jbyteArray, jint, jint); 57 | 58 | #ifdef __cplusplus 59 | } 60 | #endif 61 | #endif 62 | -------------------------------------------------------------------------------- /jni/java/org_libjpegturbo_turbojpeg_TJDecompressor.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_libjpegturbo_turbojpeg_TJDecompressor */ 4 | 5 | #ifndef _Included_org_libjpegturbo_turbojpeg_TJDecompressor 6 | #define _Included_org_libjpegturbo_turbojpeg_TJDecompressor 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* 11 | * Class: org_libjpegturbo_turbojpeg_TJDecompressor 12 | * Method: init 13 | * Signature: ()V 14 | */ 15 | JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_init 16 | (JNIEnv *, jobject); 17 | 18 | /* 19 | * Class: org_libjpegturbo_turbojpeg_TJDecompressor 20 | * Method: destroy 21 | * Signature: ()V 22 | */ 23 | JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_destroy 24 | (JNIEnv *, jobject); 25 | 26 | /* 27 | * Class: org_libjpegturbo_turbojpeg_TJDecompressor 28 | * Method: decompressHeader 29 | * Signature: ([BI)V 30 | */ 31 | JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompressHeader 32 | (JNIEnv *, jobject, jbyteArray, jint); 33 | 34 | /* 35 | * Class: org_libjpegturbo_turbojpeg_TJDecompressor 36 | * Method: decompress 37 | * Signature: ([BI[BIIIII)V 38 | */ 39 | JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompress___3BI_3BIIIII 40 | (JNIEnv *, jobject, jbyteArray, jint, jbyteArray, jint, jint, jint, jint, jint); 41 | 42 | /* 43 | * Class: org_libjpegturbo_turbojpeg_TJDecompressor 44 | * Method: decompress 45 | * Signature: ([BI[IIIIII)V 46 | */ 47 | JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompress___3BI_3IIIIII 48 | (JNIEnv *, jobject, jbyteArray, jint, jintArray, jint, jint, jint, jint, jint); 49 | 50 | /* 51 | * Class: org_libjpegturbo_turbojpeg_TJDecompressor 52 | * Method: decompressToYUV 53 | * Signature: ([BI[BI)V 54 | */ 55 | JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompressToYUV 56 | (JNIEnv *, jobject, jbyteArray, jint, jbyteArray, jint); 57 | 58 | #ifdef __cplusplus 59 | } 60 | #endif 61 | #endif 62 | -------------------------------------------------------------------------------- /jni/java/org_libjpegturbo_turbojpeg_TJTransformer.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_libjpegturbo_turbojpeg_TJTransformer */ 4 | 5 | #ifndef _Included_org_libjpegturbo_turbojpeg_TJTransformer 6 | #define _Included_org_libjpegturbo_turbojpeg_TJTransformer 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* 11 | * Class: org_libjpegturbo_turbojpeg_TJTransformer 12 | * Method: init 13 | * Signature: ()V 14 | */ 15 | JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJTransformer_init 16 | (JNIEnv *, jobject); 17 | 18 | /* 19 | * Class: org_libjpegturbo_turbojpeg_TJTransformer 20 | * Method: transform 21 | * Signature: ([BI[[B[Lorg/libjpegturbo/turbojpeg/TJTransform;I)[I 22 | */ 23 | JNIEXPORT jintArray JNICALL Java_org_libjpegturbo_turbojpeg_TJTransformer_transform 24 | (JNIEnv *, jobject, jbyteArray, jint, jobjectArray, jobjectArray, jint); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /jni/pkgscripts/Description.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IFPkgDescriptionDescription 6 | A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs 7 | IFPkgDescriptionTitle 8 | libjpeg-turbo 9 | IFPkgDescriptionVersion 10 | 1.1.1 11 | 12 | 13 | -------------------------------------------------------------------------------- /jni/pkgscripts/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleGetInfoString 6 | 1.1.1, The libjpeg-turbo Project 7 | CFBundleIdentifier 8 | com.libjpeg-turbo.libjpeg-turbo 9 | CFBundleShortVersionString 10 | 1.1.1 11 | IFMajorVersion 12 | 1 13 | IFMinorVersion 14 | 20110803 15 | IFPkgFlagAllowBackRev 16 | 17 | IFPkgFlagAuthorizationAction 18 | AdminAuthorization 19 | IFPkgFlagBackgroundAlignment 20 | topleft 21 | IFPkgFlagBackgroundScaling 22 | none 23 | IFPkgFlagDefaultLocation 24 | / 25 | IFPkgFlagFollowLinks 26 | 27 | IFPkgFlagInstallFat 28 | 29 | IFPkgFlagIsRequired 30 | 31 | IFPkgFlagOverwritePermissions 32 | 33 | IFPkgFlagRelocatable 34 | 35 | IFPkgFlagRestartAction 36 | NoRestart 37 | IFPkgFlagRootVolumeOnly 38 | 39 | IFPkgFlagUpdateInstalledLanguages 40 | 41 | IFPkgFormatVersion 42 | 0.10000000149011612 43 | 44 | 45 | -------------------------------------------------------------------------------- /jni/pkgscripts/deb-control: -------------------------------------------------------------------------------- 1 | Package: libjpeg-turbo 2 | Version: 1.1.1-20110803 3 | Section: misc 4 | Priority: optional 5 | Architecture: armel 6 | Essential: no 7 | Maintainer: The libjpeg-turbo Project [http://www.libjpeg-turbo.org] 8 | Description: A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs 9 | libjpeg-turbo is a derivative of libjpeg which uses SIMD instructions (MMX, 10 | SSE2, etc.) to accelerate baseline JPEG compression and decompression on x86 11 | and x86-64 systems. On such systems, libjpeg-turbo is generally 2-4x as fast 12 | as the unmodified version of libjpeg, all else being equal. libjpeg-turbo 13 | also includes a wrapper library which implements the TurboJPEG API used by 14 | VirtualGL and TurboVNC. 15 | . 16 | libjpeg-turbo was originally based on libjpeg/SIMD by Miyasaka Masaru, but 17 | the TigerVNC and VirtualGL projects made numerous enhancements to the codec 18 | in 2009, including improved support for Mac OS X, 64-bit support, support 19 | for 32-bit and big endian pixel formats (RGBX, XBGR, etc.), accelerated 20 | Huffman encoding/decoding, and various bug fixes. The goal was to produce a 21 | fully open source codec that could replace the partially closed source 22 | TurboJPEG/IPP codec used by VirtualGL and TurboVNC. libjpeg-turbo generally 23 | performs in the range of 80-120% of TurboJPEG/IPP. It is faster in some 24 | areas but slower in others. 25 | . 26 | In early 2010, libjpeg-turbo spun off into its own independent project, with 27 | the goal of making high-speed JPEG compression/decompression technology 28 | available to a broader range of users and developers. 29 | -------------------------------------------------------------------------------- /jni/pkgscripts/makecygwinpkg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -u 4 | set -e 5 | trap onexit INT 6 | trap onexit TERM 7 | trap onexit EXIT 8 | 9 | TMPDIR= 10 | 11 | onexit() 12 | { 13 | if [ ! "$TMPDIR" = "" ]; then 14 | rm -rf $TMPDIR 15 | fi 16 | } 17 | 18 | PACKAGE_NAME=libjpeg-turbo 19 | VERSION=1.1.1 20 | SRCDIR=/home/tgall/libjpeg-turbo-android/wip 21 | 22 | umask 022 23 | rm -f $PACKAGE_NAME-$VERSION-cygwin.tar.bz2 24 | TMPDIR=`mktemp -d /tmp/ljtbuild.XXXXXX` 25 | __PWD=`pwd` 26 | make install DESTDIR=$TMPDIR/pkg mandir=/opt/$PACKAGE_NAME/man 27 | rm $TMPDIR/pkg/opt/$PACKAGE_NAME/lib/*.la 28 | DOCDIR=$TMPDIR/pkg/usr/share/doc/$PACKAGE_NAME-$VERSION 29 | mkdir -p $DOCDIR 30 | install -m 644 $SRCDIR/README-turbo.txt $DOCDIR 31 | install -m 644 $SRCDIR/README $DOCDIR 32 | install -m 644 $SRCDIR/libjpeg.txt $DOCDIR 33 | install -m 644 $SRCDIR/usage.txt $DOCDIR 34 | install -m 644 $SRCDIR/LICENSE.txt $DOCDIR 35 | install -m 644 $SRCDIR/LGPL.txt $DOCDIR 36 | ln -fs lib $TMPDIR/pkg/opt/$PACKAGE_NAME/lib32 37 | cd $TMPDIR/pkg 38 | tar cfj ../$PACKAGE_NAME-$VERSION-cygwin.tar.bz2 * 39 | cd $__PWD 40 | mv $TMPDIR/*.tar.bz2 . 41 | 42 | exit 0 43 | -------------------------------------------------------------------------------- /jni/pkgscripts/makedpkg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -u 4 | set -e 5 | trap onexit INT 6 | trap onexit TERM 7 | trap onexit EXIT 8 | 9 | TMPDIR= 10 | 11 | onexit() 12 | { 13 | if [ ! "$TMPDIR" = "" ]; then 14 | sudo rm -rf $TMPDIR 15 | fi 16 | } 17 | 18 | makedeb() 19 | { 20 | SUPPLEMENT=$1 21 | DIRNAME=$PACKAGE_NAME 22 | 23 | if [ $SUPPLEMENT = 1 ]; then 24 | PACKAGE_NAME=$PACKAGE_NAME\32 25 | DEBARCH=amd64 26 | __LIB=lib32 27 | else 28 | __LIB=lib 29 | fi 30 | 31 | umask 022 32 | rm -f $PACKAGE_NAME\_$VERSION\_$DEBARCH.deb 33 | TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX` 34 | mkdir $TMPDIR/DEBIAN 35 | cp pkgscripts/deb-control $TMPDIR/DEBIAN/control 36 | 37 | make install prefix=$TMPDIR/opt/$DIRNAME libdir=$TMPDIR/opt/$DIRNAME/$__LIB mandir=$TMPDIR/opt/$DIRNAME/man 38 | rm -f $TMPDIR/opt/$DIRNAME/$__LIB/*.la 39 | 40 | if [ $SUPPLEMENT = 1 ]; then 41 | rm -rf $TMPDIR/opt/$DIRNAME/include 42 | rm -rf $TMPDIR/opt/$DIRNAME/man 43 | rm -rf $TMPDIR/opt/$DIRNAME/bin 44 | fi 45 | 46 | mkdir -p $TMPDIR/usr/$__LIB 47 | mv $TMPDIR/opt/$DIRNAME/$__LIB/libturbojpeg.* $TMPDIR/usr/$__LIB 48 | ln -fs /usr/$__LIB/libturbojpeg.a $TMPDIR/opt/$DIRNAME/$__LIB/ 49 | /sbin/ldconfig -n $TMPDIR/opt/$DIRNAME/$__LIB 50 | /sbin/ldconfig -n $TMPDIR/usr/$__LIB 51 | 52 | if [ ! $SUPPLEMENT = 1 ]; then 53 | if [ "$DEBARCH" = "amd64" ]; then 54 | ln -fs lib $TMPDIR/opt/$DIRNAME/lib64 55 | else 56 | if [ ! "$__LIB" = "lib32" ]; then 57 | ln -fs lib $TMPDIR/opt/$DIRNAME/lib32 58 | fi 59 | fi 60 | mkdir -p $TMPDIR/usr/include 61 | mv $TMPDIR/opt/$DIRNAME/include/turbojpeg.h $TMPDIR/usr/include 62 | ln -fs /usr/include/turbojpeg.h $TMPDIR/opt/$DIRNAME/include/ 63 | mkdir -p $TMPDIR/usr/share/doc/$DIRNAME-$VERSION 64 | install -m 644 $SRCDIR/LICENSE.txt $TMPDIR/usr/share/doc/$DIRNAME-$VERSION 65 | install -m 644 $SRCDIR/LGPL.txt $TMPDIR/usr/share/doc/$DIRNAME-$VERSION 66 | install -m 644 $SRCDIR/README-turbo.txt $TMPDIR/usr/share/doc/$DIRNAME-$VERSION 67 | install -m 644 $SRCDIR/README $TMPDIR/usr/share/doc/$DIRNAME-$VERSION 68 | install -m 644 $SRCDIR/libjpeg.txt $TMPDIR/usr/share/doc/$DIRNAME-$VERSION 69 | install -m 644 $SRCDIR/usage.txt $TMPDIR/usr/share/doc/$DIRNAME-$VERSION 70 | fi 71 | 72 | sudo chown -Rh root:root $TMPDIR/* 73 | dpkg -b $TMPDIR $PACKAGE_NAME\_$VERSION\_$DEBARCH.deb 74 | } 75 | 76 | PACKAGE_NAME=libjpeg-turbo 77 | VERSION=1.1.1 78 | BUILD=20110803 79 | DEBARCH=armel 80 | SRCDIR=/home/tgall/libjpeg-turbo-android/wip 81 | 82 | makedeb 0 83 | if [ "$DEBARCH" = "i386" ]; then makedeb 1; fi 84 | 85 | exit 86 | -------------------------------------------------------------------------------- /jni/pkgscripts/pkginfo: -------------------------------------------------------------------------------- 1 | ARCH=i386 2 | PKG=libjpeg-turbo 3 | NAME=libjpeg-turbo SDK and run time libraries 4 | VERSION=1.1.1,REV=20110803 5 | SUNW_PKGVERS=1.0 6 | DESC=A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs 7 | VENDOR=The libjpeg-turbo Project 8 | HOTLINE=http://www.libjpeg-turbo.org 9 | EMAIL=information@libjpeg-turbo.org 10 | MAXINST=1 11 | CATEGORY=application 12 | BASEDIR=/opt 13 | CLASSES=none 14 | SUNW_PKG_ALLZONES=true 15 | SUNW_PKG_HOLLOW=false 16 | SUNW_PKG_THISZONE=false 17 | -------------------------------------------------------------------------------- /jni/pkgscripts/uninstall: -------------------------------------------------------------------------------- 1 | # Copyright (C)2009-2011 D. R. Commander 2 | # Copyright (C)2009 Sun Microsystems, Inc. 3 | # 4 | # This library is free software and may be redistributed and/or modified under 5 | # the terms of the wxWindows Library License, Version 3.1 or (at your option) 6 | # any later version. The full license is in the LICENSE.txt file included 7 | # with this distribution. 8 | # 9 | # This library is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # wxWindows Library License for more details. 13 | 14 | #!/bin/sh 15 | 16 | error() 17 | { 18 | echo $1 19 | exit -1 20 | } 21 | 22 | if [ ! "`id -u`" = "0" ]; then 23 | error "This command must be run as root" 24 | fi 25 | 26 | PKGNAME=libjpeg-turbo 27 | MACPKGNAME=com.$PKGNAME.$PKGNAME 28 | RCPT=/Library/Receipts/$PKGNAME.pkg 29 | 30 | LSBOM= 31 | if [ -d $RCPT ]; then 32 | LSBOM='lsbom -s -f -l '$RCPT'/Contents/Archive.bom' 33 | else 34 | LSBOM='pkgutil --files '$MACPKGNAME 35 | fi 36 | 37 | echo Removing files ... 38 | $LSBOM >/dev/null || error "Could not list package contents" 39 | RETCODE=0 40 | PWD=`pwd` 41 | cd / 42 | $LSBOM | while read line; do 43 | if [ ! -d "$line" ]; then rm "$line" 2>&1 || RETCODE=-1; fi 44 | done 45 | cd $PWD 46 | 47 | echo Removing directories ... 48 | rmdir /opt/$PKGNAME/bin 2>&1 || RETCODE=-1 49 | if [ -d /opt/$PKGNAME/bin ]; then 50 | rmdir /opt/$PKGNAME/bin 2>&1 || RETCODE=-1 51 | fi 52 | if [ -d /opt/$PKGNAME/lib ]; then 53 | rmdir /opt/$PKGNAME/lib 2>&1 || RETCODE=-1 54 | fi 55 | if [ -d /opt/$PKGNAME/include ]; then 56 | rmdir /opt/$PKGNAME/include 2>&1 || RETCODE=-1 57 | fi 58 | rm /opt/$PKGNAME/lib32 2>&1 || RETCODE=-1 59 | rm /opt/$PKGNAME/lib64 2>&1 || RETCODE=-1 60 | if [ -d /opt/$PKGNAME/man/man1 ]; then 61 | rmdir /opt/$PKGNAME/man/man1 2>&1 || RETCODE=-1 62 | fi 63 | if [ -d /opt/$PKGNAME/man ]; then 64 | rmdir /opt/$PKGNAME/man 2>&1 || RETCODE=-1 65 | fi 66 | rmdir /opt/$PKGNAME 2>&1 || RETCODE=-1 67 | rmdir /Library/Documentation/$PKGNAME 2>&1 || RETCODE=-1 68 | 69 | if [ -d $RCPT ]; then 70 | echo Removing package receipt $RCPT ... 71 | rm -r $RCPT 2>&1 || RETCODE=-1 72 | else 73 | echo Forgetting package $MACPKGNAME 74 | pkgutil --forget $MACPKGNAME 75 | fi 76 | 77 | exit $RETCODE 78 | -------------------------------------------------------------------------------- /jni/release/Description.plist.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IFPkgDescriptionDescription 6 | A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs 7 | IFPkgDescriptionTitle 8 | @PACKAGE_NAME@ 9 | IFPkgDescriptionVersion 10 | @VERSION@ 11 | 12 | 13 | -------------------------------------------------------------------------------- /jni/release/Info.plist.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleGetInfoString 6 | @VERSION@, The libjpeg-turbo Project 7 | CFBundleIdentifier 8 | com.libjpeg-turbo.libjpeg-turbo 9 | CFBundleShortVersionString 10 | @VERSION@ 11 | IFMajorVersion 12 | 1 13 | IFMinorVersion 14 | @BUILD@ 15 | IFPkgFlagAllowBackRev 16 | 17 | IFPkgFlagAuthorizationAction 18 | AdminAuthorization 19 | IFPkgFlagBackgroundAlignment 20 | topleft 21 | IFPkgFlagBackgroundScaling 22 | none 23 | IFPkgFlagDefaultLocation 24 | / 25 | IFPkgFlagFollowLinks 26 | 27 | IFPkgFlagInstallFat 28 | 29 | IFPkgFlagIsRequired 30 | 31 | IFPkgFlagOverwritePermissions 32 | 33 | IFPkgFlagRelocatable 34 | 35 | IFPkgFlagRestartAction 36 | NoRestart 37 | IFPkgFlagRootVolumeOnly 38 | 39 | IFPkgFlagUpdateInstalledLanguages 40 | 41 | IFPkgFormatVersion 42 | 0.10000000149011612 43 | 44 | 45 | -------------------------------------------------------------------------------- /jni/release/License.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 3 | {\colortbl;\red255\green255\blue255;} 4 | {\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}} 5 | {\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}} 6 | \margl1440\margr1440\vieww9820\viewh8480\viewkind0 7 | \deftab720 8 | \pard\pardeftab720 9 | 10 | \f0\fs24 \cf0 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\ 11 | \ 12 | \pard\tx220\tx720\pardeftab720\li720\fi-720 13 | \ls1\ilvl0\cf0 {\listtext \'95 }Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\ 14 | {\listtext \'95 }Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\ 15 | {\listtext \'95 }Neither the name of the libjpeg-turbo Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\ 16 | \pard\pardeftab720\qc 17 | \cf0 \ 18 | \pard\pardeftab720 19 | \cf0 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\ 20 | } -------------------------------------------------------------------------------- /jni/release/ReadMe.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 3 | {\colortbl;\red255\green255\blue255;} 4 | \margl1440\margr1440\vieww15200\viewh9600\viewkind0 5 | \deftab720 6 | \pard\pardeftab720\ql\qnatural 7 | 8 | \f0\fs24 \cf0 libjpeg-turbo is a derivative of libjpeg which uses SIMD instructions (MMX, SSE2, etc.) to accelerate baseline JPEG compression and decompression on x86 and x86-64 systems. On such systems, libjpeg-turbo is generally 2-4x as fast as the unmodified version of libjpeg, all else being equal. libjpeg-turbo also includes a wrapper library which implements the TurboJPEG API used by VirtualGL and TurboVNC.\ 9 | \ 10 | libjpeg-turbo was originally based on libjpeg/SIMD by Miyasaka Masaru, but the TigerVNC and VirtualGL projects made numerous enhancements to the codec in 2009, including improved support for Mac OS X, 64-bit support, support for 32-bit and big endian pixel formats (RGBX, XBGR, etc.), accelerated Huffman encoding/decoding, and various bug fixes. The goal was to produce a fully open source codec that could replace the partially closed source TurboJPEG/IPP codec used by VirtualGL and TurboVNC. libjpeg-turbo generally performs in the range of 80-120% of TurboJPEG/IPP. It is faster in some areas but slower in others.\ 11 | \ 12 | In early 2010, libjpeg-turbo spun off into its own independent project, with the goal of making high-speed JPEG compression/decompression technology available to a broader range of users and developers.\ 13 | } -------------------------------------------------------------------------------- /jni/release/Welcome.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fmodern\fcharset0 CourierNewPSMT;} 3 | {\colortbl;\red255\green255\blue255;} 4 | \margl1440\margr1440\vieww9000\viewh8400\viewkind0 5 | \deftab720 6 | \pard\pardeftab720\ql\qnatural 7 | 8 | \f0\fs24 \cf0 This installer will install the libjpeg-turbo SDK and run-time libraries onto your computer so that you can use libjpeg-turbo to build new applications or accelerate existing ones. To remove the libjpeg-turbo package, run\ 9 | \ 10 | \pard\pardeftab720\ql\qnatural 11 | 12 | \f1 \cf0 /opt/libjpeg-turbo/bin/uninstall\ 13 | \pard\pardeftab720\ql\qnatural 14 | 15 | \f0 \cf0 \ 16 | from the command line.\ 17 | \ 18 | If TurboJPEG/IPP is currently installed, then it must be removed prior to installing libjpeg-turbo.\ 19 | } -------------------------------------------------------------------------------- /jni/release/copyright: -------------------------------------------------------------------------------- 1 | libjpeg-turbo is released under a BSD-style license (see README and README-turbo.txt) 2 | -------------------------------------------------------------------------------- /jni/release/deb-control.tmpl: -------------------------------------------------------------------------------- 1 | Package: {__PKGNAME} 2 | Version: {__VERSION}-{__BUILD} 3 | Section: misc 4 | Priority: optional 5 | Architecture: {__ARCH} 6 | Essential: no 7 | Maintainer: The libjpeg-turbo Project [http://www.libjpeg-turbo.org] 8 | Description: A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs 9 | libjpeg-turbo is a derivative of libjpeg which uses SIMD instructions (MMX, 10 | SSE2, etc.) to accelerate baseline JPEG compression and decompression on x86 11 | and x86-64 systems. On such systems, libjpeg-turbo is generally 2-4x as fast 12 | as the unmodified version of libjpeg, all else being equal. libjpeg-turbo 13 | also includes a wrapper library which implements the TurboJPEG API used by 14 | VirtualGL and TurboVNC. 15 | . 16 | libjpeg-turbo was originally based on libjpeg/SIMD by Miyasaka Masaru, but 17 | the TigerVNC and VirtualGL projects made numerous enhancements to the codec 18 | in 2009, including improved support for Mac OS X, 64-bit support, support 19 | for 32-bit and big endian pixel formats (RGBX, XBGR, etc.), accelerated 20 | Huffman encoding/decoding, and various bug fixes. The goal was to produce a 21 | fully open source codec that could replace the partially closed source 22 | TurboJPEG/IPP codec used by VirtualGL and TurboVNC. libjpeg-turbo generally 23 | performs in the range of 80-120% of TurboJPEG/IPP. It is faster in some 24 | areas but slower in others. 25 | . 26 | In early 2010, libjpeg-turbo spun off into its own independent project, with 27 | the goal of making high-speed JPEG compression/decompression technology 28 | available to a broader range of users and developers. 29 | -------------------------------------------------------------------------------- /jni/release/makecygwinpkg.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -u 4 | set -e 5 | trap onexit INT 6 | trap onexit TERM 7 | trap onexit EXIT 8 | 9 | TMPDIR= 10 | 11 | onexit() 12 | { 13 | if [ ! "$TMPDIR" = "" ]; then 14 | rm -rf $TMPDIR 15 | fi 16 | } 17 | 18 | PACKAGE_NAME=@PACKAGE_NAME@ 19 | VERSION=@VERSION@ 20 | SRCDIR=@abs_top_srcdir@ 21 | 22 | umask 022 23 | rm -f $PACKAGE_NAME-$VERSION-cygwin.tar.bz2 24 | TMPDIR=`mktemp -d /tmp/ljtbuild.XXXXXX` 25 | __PWD=`pwd` 26 | make install DESTDIR=$TMPDIR/pkg mandir=/opt/$PACKAGE_NAME/man 27 | rm $TMPDIR/pkg/opt/$PACKAGE_NAME/lib/*.la 28 | DOCDIR=$TMPDIR/pkg/usr/share/doc/$PACKAGE_NAME-$VERSION 29 | mkdir -p $DOCDIR 30 | install -m 644 $SRCDIR/README-turbo.txt $DOCDIR 31 | install -m 644 $SRCDIR/README $DOCDIR 32 | install -m 644 $SRCDIR/libjpeg.txt $DOCDIR 33 | install -m 644 $SRCDIR/usage.txt $DOCDIR 34 | ln -fs lib $TMPDIR/pkg/opt/$PACKAGE_NAME/lib32 35 | cd $TMPDIR/pkg 36 | tar cfj ../$PACKAGE_NAME-$VERSION-cygwin.tar.bz2 * 37 | cd $__PWD 38 | mv $TMPDIR/*.tar.bz2 . 39 | 40 | exit 0 41 | -------------------------------------------------------------------------------- /jni/release/makedpkg.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -u 4 | set -e 5 | trap onexit INT 6 | trap onexit TERM 7 | trap onexit EXIT 8 | 9 | TMPDIR= 10 | 11 | onexit() 12 | { 13 | if [ ! "$TMPDIR" = "" ]; then 14 | sudo rm -rf $TMPDIR 15 | fi 16 | } 17 | 18 | makedeb() 19 | { 20 | SUPPLEMENT=$1 21 | DIRNAME=$PACKAGE_NAME 22 | 23 | if [ $SUPPLEMENT = 1 ]; then 24 | PACKAGE_NAME=$PACKAGE_NAME\32 25 | DEBARCH=amd64 26 | __LIB=lib32 27 | else 28 | __LIB=lib 29 | fi 30 | 31 | umask 022 32 | rm -f $PACKAGE_NAME\_$VERSION\_$DEBARCH.deb 33 | TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX` 34 | mkdir $TMPDIR/DEBIAN 35 | (cat $SRCDIR/release/deb-control.tmpl | sed s/{__PKGNAME}/$PACKAGE_NAME/g \ 36 | | sed s/{__VERSION}/$VERSION/g | sed s/{__BUILD}/$BUILD/g \ 37 | | sed s/{__ARCH}/$DEBARCH/g > $TMPDIR/DEBIAN/control) 38 | 39 | make install prefix=$TMPDIR/opt/$DIRNAME libdir=$TMPDIR/opt/$DIRNAME/$__LIB mandir=$TMPDIR/opt/$DIRNAME/man 40 | rm -f $TMPDIR/opt/$DIRNAME/$__LIB/*.la 41 | 42 | if [ $SUPPLEMENT = 1 ]; then 43 | rm -rf $TMPDIR/opt/$DIRNAME/include 44 | rm -rf $TMPDIR/opt/$DIRNAME/man 45 | rm -rf $TMPDIR/opt/$DIRNAME/bin 46 | rm -rf $TMPDIR/opt/$DIRNAME/classes 47 | fi 48 | 49 | mkdir -p $TMPDIR/usr/$__LIB 50 | mv $TMPDIR/opt/$DIRNAME/$__LIB/libturbojpeg.* $TMPDIR/usr/$__LIB 51 | ln -fs /usr/$__LIB/libturbojpeg.a $TMPDIR/opt/$DIRNAME/$__LIB/ 52 | /sbin/ldconfig -n $TMPDIR/opt/$DIRNAME/$__LIB 53 | /sbin/ldconfig -n $TMPDIR/usr/$__LIB 54 | 55 | if [ ! $SUPPLEMENT = 1 ]; then 56 | if [ "$DEBARCH" = "amd64" ]; then 57 | ln -fs lib $TMPDIR/opt/$DIRNAME/lib64 58 | else 59 | if [ ! "$__LIB" = "lib32" ]; then 60 | ln -fs lib $TMPDIR/opt/$DIRNAME/lib32 61 | fi 62 | fi 63 | mkdir -p $TMPDIR/usr/include 64 | mv $TMPDIR/opt/$DIRNAME/include/turbojpeg.h $TMPDIR/usr/include 65 | ln -fs /usr/include/turbojpeg.h $TMPDIR/opt/$DIRNAME/include/ 66 | mkdir -p $TMPDIR/usr/share/doc/$DIRNAME-$VERSION 67 | install -m 644 $SRCDIR/README-turbo.txt $TMPDIR/usr/share/doc/$DIRNAME-$VERSION 68 | install -m 644 $SRCDIR/README $TMPDIR/usr/share/doc/$DIRNAME-$VERSION 69 | install -m 644 $SRCDIR/libjpeg.txt $TMPDIR/usr/share/doc/$DIRNAME-$VERSION 70 | install -m 644 $SRCDIR/usage.txt $TMPDIR/usr/share/doc/$DIRNAME-$VERSION 71 | fi 72 | 73 | sudo chown -Rh root:root $TMPDIR/* 74 | dpkg -b $TMPDIR $PACKAGE_NAME\_$VERSION\_$DEBARCH.deb 75 | } 76 | 77 | PACKAGE_NAME=@PACKAGE_NAME@ 78 | VERSION=@VERSION@ 79 | BUILD=@BUILD@ 80 | DEBARCH=@DEBARCH@ 81 | SRCDIR=@abs_top_srcdir@ 82 | 83 | makedeb 0 84 | if [ "$DEBARCH" = "i386" ]; then makedeb 1; fi 85 | 86 | exit 87 | -------------------------------------------------------------------------------- /jni/release/pkginfo.in: -------------------------------------------------------------------------------- 1 | ARCH=i386 2 | PKG=@PACKAGE_NAME@ 3 | NAME=@PACKAGE_NAME@ SDK and run time libraries 4 | VERSION=@VERSION@,REV=@BUILD@ 5 | SUNW_PKGVERS=1.0 6 | DESC=A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs 7 | VENDOR=The libjpeg-turbo Project 8 | HOTLINE=http://www.libjpeg-turbo.org 9 | EMAIL=information@libjpeg-turbo.org 10 | MAXINST=1 11 | CATEGORY=application 12 | BASEDIR=/opt 13 | CLASSES=none 14 | SUNW_PKG_ALLZONES=true 15 | SUNW_PKG_HOLLOW=false 16 | SUNW_PKG_THISZONE=false 17 | -------------------------------------------------------------------------------- /jni/release/uninstall.in: -------------------------------------------------------------------------------- 1 | # Copyright (C)2009-2011 D. R. Commander. All Rights Reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are met: 5 | # 6 | # - Redistributions of source code must retain the above copyright notice, 7 | # this list of conditions and the following disclaimer. 8 | # - Redistributions in binary form must reproduce the above copyright notice, 9 | # this list of conditions and the following disclaimer in the documentation 10 | # and/or other materials provided with the distribution. 11 | # - Neither the name of the libjpeg-turbo Project nor the names of its 12 | # contributors may be used to endorse or promote products derived from this 13 | # software without specific prior written permission. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", 16 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 19 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | # POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #!/bin/sh 28 | 29 | if [ ! "`id -u`" = "0" ]; then 30 | echo "ERROR: This script must be executed as root" 31 | exit -1 32 | fi 33 | 34 | PACKAGE=@PACKAGE_NAME@ 35 | MACPACKAGE=com.$PACKAGE.$PACKAGE 36 | RECEIPT=/Library/Receipts/$PACKAGE.pkg 37 | 38 | LSBOM= 39 | if [ -d $RECEIPT ]; then 40 | LSBOM='lsbom -s -f -l '$RECEIPT'/Contents/Archive.bom' 41 | else 42 | LSBOM='pkgutil --files '$MACPACKAGE 43 | fi 44 | 45 | mylsbom() 46 | { 47 | $LSBOM || (echo "ERROR: Could not list package contents"; exit -1) 48 | } 49 | 50 | echo Removing package files ... 51 | EXITSTATUS=0 52 | pushd / 53 | mylsbom | while read file; do 54 | if [ ! -d "$file" ]; then rm "$file" 2>&1 || EXITSTATUS=-1; fi 55 | done 56 | popd 57 | 58 | echo Removing package directories ... 59 | if [ -d /opt/$PACKAGE/bin ]; then 60 | rmdir /opt/$PACKAGE/bin 2>&1 || EXITSTATUS=-1 61 | fi 62 | if [ -d /opt/$PACKAGE/lib ]; then 63 | rmdir /opt/$PACKAGE/lib 2>&1 || EXITSTATUS=-1 64 | fi 65 | if [ -d /opt/$PACKAGE/include ]; then 66 | rmdir /opt/$PACKAGE/include 2>&1 || EXITSTATUS=-1 67 | fi 68 | rm /opt/$PACKAGE/lib32 2>&1 || EXITSTATUS=-1 69 | rm /opt/$PACKAGE/lib64 2>&1 || EXITSTATUS=-1 70 | if [ -d /opt/$PACKAGE/man/man1 ]; then 71 | rmdir /opt/$PACKAGE/man/man1 2>&1 || EXITSTATUS=-1 72 | fi 73 | if [ -d /opt/$PACKAGE/man ]; then 74 | rmdir /opt/$PACKAGE/man 2>&1 || EXITSTATUS=-1 75 | fi 76 | if [ -d /opt/$PACKAGE/classes ]; then 77 | rmdir /opt/$PACKAGE/classes 2>&1 || EXITSTATUS=-1 78 | fi 79 | rmdir /opt/$PACKAGE 2>&1 || EXITSTATUS=-1 80 | rmdir /Library/Documentation/$PACKAGE 2>&1 || EXITSTATUS=-1 81 | 82 | if [ -d $RECEIPT ]; then 83 | echo Removing package receipt ... 84 | rm -r $RECEIPT 2>&1 || EXITSTATUS=-1 85 | else 86 | echo Forgetting package $MACPACKAGE ... 87 | pkgutil --forget $MACPACKAGE 88 | fi 89 | 90 | exit $EXITSTATUS 91 | -------------------------------------------------------------------------------- /jni/sharedlib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Anything that must be linked against the shared C library on Windows must 2 | # be built in this subdirectory, because CMake doesn't allow us to override 3 | # the compiler flags for each build type except at directory scope. Note 4 | # to CMake developers: Add a COMPILE_FLAGS_ target property, or 5 | # better yet, provide a friendly way of configuring a Windows target to use the 6 | # static C library. 7 | 8 | if(MSVC) 9 | # Build all configurations against shared C library 10 | foreach(var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE 11 | CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) 12 | if(${var} MATCHES "/MT") 13 | string(REGEX REPLACE "/MT" "/MD" ${var} "${${var}}") 14 | endif() 15 | endforeach() 16 | endif() 17 | 18 | foreach(src ${JPEG_SOURCES}) 19 | set(JPEG_SRCS ${JPEG_SRCS} ${CMAKE_SOURCE_DIR}/${src}) 20 | endforeach() 21 | 22 | if(WITH_SIMD) 23 | # This tells CMake that the "source" files haven't been generated yet 24 | set_source_files_properties(${SIMD_OBJS} PROPERTIES GENERATED 1) 25 | endif() 26 | 27 | add_library(jpeg SHARED ${JPEG_SRCS} ${SIMD_OBJS} 28 | ${CMAKE_SOURCE_DIR}/win/jpeg${DLL_VERSION}.def) 29 | set_target_properties(jpeg PROPERTIES SOVERSION ${DLL_VERSION} 30 | VERSION ${FULLVERSION}) 31 | if(MSVC) 32 | set_target_properties(jpeg PROPERTIES SUFFIX ${DLL_VERSION}.dll) 33 | elseif(MINGW OR CYGWIN) 34 | set_target_properties(jpeg PROPERTIES SUFFIX -${DLL_VERSION}.dll) 35 | endif(MSVC) 36 | if(WITH_SIMD) 37 | add_dependencies(jpeg simd) 38 | endif() 39 | 40 | add_executable(cjpeg ../cjpeg.c ../cdjpeg.c ../rdbmp.c ../rdgif.c ../rdppm.c 41 | ../rdswitch.c ../rdtarga.c) 42 | set_property(TARGET cjpeg PROPERTY COMPILE_FLAGS 43 | "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED -DUSE_SETMODE") 44 | target_link_libraries(cjpeg jpeg) 45 | 46 | add_executable(djpeg ../djpeg.c ../cdjpeg.c ../rdcolmap.c ../rdswitch.c 47 | ../wrbmp.c ../wrgif.c ../wrppm.c ../wrtarga.c) 48 | set_property(TARGET djpeg PROPERTY COMPILE_FLAGS 49 | "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED -DUSE_SETMODE") 50 | target_link_libraries(djpeg jpeg) 51 | 52 | add_executable(jpegtran ../jpegtran.c ../cdjpeg.c ../rdswitch.c ../transupp.c) 53 | target_link_libraries(jpegtran jpeg) 54 | set_property(TARGET jpegtran PROPERTY COMPILE_FLAGS "-DUSE_SETMODE") 55 | 56 | add_executable(jcstest ../jcstest.c) 57 | target_link_libraries(jcstest jpeg) 58 | 59 | install(TARGETS jpeg cjpeg djpeg jpegtran 60 | ARCHIVE DESTINATION lib 61 | LIBRARY DESTINATION lib 62 | RUNTIME DESTINATION bin) 63 | -------------------------------------------------------------------------------- /jni/simd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(NOT DEFINED NASM) 2 | set(NASM nasm CACHE PATH "Path to NASM/YASM executable") 3 | endif() 4 | 5 | if(SIMD_X86_64) 6 | set(NAFLAGS -fwin64 -DWIN64 -D__x86_64__ -I${CMAKE_SOURCE_DIR}/win/ 7 | -I${CMAKE_CURRENT_SOURCE_DIR}/) 8 | else() 9 | set(NAFLAGS -fwin32 -DWIN32 -I${CMAKE_SOURCE_DIR}/win/ 10 | -I${CMAKE_CURRENT_SOURCE_DIR}/) 11 | endif() 12 | 13 | # This only works if building from the command line. There is currently no way 14 | # to set a variable's value based on the build type when using the MSVC IDE. 15 | if(CMAKE_BUILD_TYPE STREQUAL "Debug" 16 | OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") 17 | set(NAFLAGS ${NAFLAGS} -g) 18 | endif() 19 | 20 | if(SIMD_X86_64) 21 | set(SIMD_BASENAMES jfsseflt-64 jccolss2-64 jdcolss2-64 jcgrass2-64 22 | jcsamss2-64 jdsamss2-64 jdmerss2-64 jcqnts2i-64 jfss2fst-64 jfss2int-64 23 | jiss2red-64 jiss2int-64 jiss2fst-64 jcqnts2f-64 jiss2flt-64) 24 | message(STATUS "Building x86_64 SIMD extensions") 25 | else() 26 | set(SIMD_BASENAMES jsimdcpu jccolmmx jcgrammx jdcolmmx jcsammmx jdsammmx 27 | jdmermmx jcqntmmx jfmmxfst jfmmxint jimmxred jimmxint jimmxfst jcqnt3dn 28 | jf3dnflt ji3dnflt jcqntsse jfsseflt jisseflt jccolss2 jcgrass2 jdcolss2 29 | jcsamss2 jdsamss2 jdmerss2 jcqnts2i jfss2fst jfss2int jiss2red jiss2int 30 | jiss2fst jcqnts2f jiss2flt) 31 | message(STATUS "Building i386 SIMD extensions") 32 | endif() 33 | 34 | if(MSVC_IDE) 35 | set(OBJDIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}") 36 | else() 37 | set(OBJDIR ${CMAKE_CURRENT_BINARY_DIR}) 38 | endif() 39 | 40 | foreach(file ${SIMD_BASENAMES}) 41 | set(DEPFILE "") 42 | set(SIMD_SRC ${CMAKE_CURRENT_SOURCE_DIR}/${file}.asm) 43 | if(${file} MATCHES col) 44 | set(DEPFILE ${SIMD_SRC}) 45 | string(REGEX REPLACE "col" "clr" DEPFILE ${DEPFILE}) 46 | endif() 47 | if(${file} MATCHES mer) 48 | set(DEPFILE ${SIMD_SRC}) 49 | string(REGEX REPLACE "mer" "mrg" DEPFILE ${DEPFILE}) 50 | endif() 51 | if(${file} MATCHES gra) 52 | set(DEPFILE ${SIMD_SRC}) 53 | string(REGEX REPLACE "gra" "gry" DEPFILE ${DEPFILE}) 54 | endif() 55 | set(SIMD_OBJ ${OBJDIR}/${file}.obj) 56 | add_custom_command(OUTPUT ${SIMD_OBJ} DEPENDS ${SIMD_SRC} ${DEPFILE} *.inc 57 | COMMAND ${NASM} ${NAFLAGS} ${SIMD_SRC} -o${SIMD_OBJ}) 58 | set(SIMD_OBJS ${SIMD_OBJS} ${SIMD_OBJ}) 59 | endforeach() 60 | 61 | set(SIMD_OBJS ${SIMD_OBJS} PARENT_SCOPE) 62 | add_custom_target(simd DEPENDS ${SIMD_OBJS}) 63 | -------------------------------------------------------------------------------- /jni/simd/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libsimd.la 2 | 3 | BUILT_SOURCES = jsimdcfg.inc 4 | 5 | EXTRA_DIST = nasm_lt.sh jcclrmmx.asm jcclrss2.asm jdclrmmx.asm jdclrss2.asm \ 6 | jdmrgmmx.asm jdmrgss2.asm jcclrss2-64.asm jdclrss2-64.asm \ 7 | jdmrgss2-64.asm jcgryss2-64.asm jcgrymmx.asm jcgryss2.asm CMakeLists.txt 8 | 9 | if SIMD_X86_64 10 | 11 | libsimd_la_SOURCES = jsimd_x86_64.c \ 12 | jsimd.h jsimdcfg.inc.h \ 13 | jsimdext.inc jcolsamp.inc jdct.inc \ 14 | jfsseflt-64.asm jcgrass2-64.asm \ 15 | jccolss2-64.asm jdcolss2-64.asm \ 16 | jcsamss2-64.asm jdsamss2-64.asm jdmerss2-64.asm \ 17 | jcqnts2i-64.asm jfss2fst-64.asm jfss2int-64.asm \ 18 | jiss2red-64.asm jiss2int-64.asm jiss2fst-64.asm \ 19 | jcqnts2f-64.asm jiss2flt-64.asm 20 | 21 | jccolss2-64.lo: jcclrss2-64.asm 22 | jdcolss2-64.lo: jdclrss2-64.asm 23 | jcgrass2-64.lo: jcgryss2-64.asm 24 | jdmerss2-64.lo: jdmrgss2-64.asm 25 | endif 26 | 27 | if SIMD_I386 28 | 29 | libsimd_la_SOURCES = jsimd_i386.c \ 30 | jsimd.h jsimdcfg.inc.h \ 31 | jsimdext.inc jcolsamp.inc jdct.inc \ 32 | jsimdcpu.asm \ 33 | jccolmmx.asm jdcolmmx.asm jcgrammx.asm \ 34 | jcsammmx.asm jdsammmx.asm jdmermmx.asm \ 35 | jcqntmmx.asm jfmmxfst.asm jfmmxint.asm \ 36 | jimmxred.asm jimmxint.asm jimmxfst.asm \ 37 | jcqnt3dn.asm jf3dnflt.asm ji3dnflt.asm \ 38 | jcqntsse.asm jfsseflt.asm jisseflt.asm \ 39 | jccolss2.asm jdcolss2.asm jcgrass2.asm \ 40 | jcsamss2.asm jdsamss2.asm jdmerss2.asm \ 41 | jcqnts2i.asm jfss2fst.asm jfss2int.asm \ 42 | jiss2red.asm jiss2int.asm jiss2fst.asm \ 43 | jcqnts2f.asm jiss2flt.asm 44 | 45 | jccolmmx.lo: jcclrmmx.asm 46 | jcgrammx.lo: jcgrymmx.asm 47 | jccolss2.lo: jcclrss2.asm 48 | jcgrass2.lo: jcgryss2.asm 49 | jdcolmmx.lo: jdclrmmx.asm 50 | jdcolss2.lo: jdclrss2.asm 51 | jdmermmx.lo: jdmrgmmx.asm 52 | jdmerss2.lo: jdmrgss2.asm 53 | endif 54 | 55 | if SIMD_ARM 56 | 57 | libsimd_la_SOURCES = jsimd_arm.c jsimd_arm_neon.S 58 | 59 | endif 60 | 61 | AM_CPPFLAGS = -I$(top_srcdir) 62 | 63 | .asm.lo: 64 | $(LIBTOOL) --mode=compile --tag NASM $(srcdir)/nasm_lt.sh $(NASM) $(NAFLAGS) -I$(srcdir) -I. $< -o $@ 65 | 66 | jsimdcfg.inc: $(srcdir)/jsimdcfg.inc.h ../jpeglib.h ../jconfig.h ../jmorecfg.h 67 | $(CPP) -I$(top_builddir) -I$(top_builddir)/simd $(srcdir)/jsimdcfg.inc.h | $(EGREP) "^[\;%]|^\ %" | sed 's%_cpp_protection_%%' | sed 's@% define@%define@g' > $@ 68 | -------------------------------------------------------------------------------- /jni/simd/jccolss2.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; jccolss2.asm - colorspace conversion (SSE2) 3 | ; 4 | ; x86 SIMD extension for IJG JPEG library 5 | ; Copyright (C) 1999-2006, MIYASAKA Masaru. 6 | ; Copyright (C) 2009, D. R. Commander. 7 | ; For conditions of distribution and use, see copyright notice in jsimdext.inc 8 | ; 9 | ; This file should be assembled with NASM (Netwide Assembler), 10 | ; can *not* be assembled with Microsoft's MASM or any compatible 11 | ; assembler (including Borland's Turbo Assembler). 12 | ; NASM is available from http://nasm.sourceforge.net/ or 13 | ; http://sourceforge.net/project/showfiles.php?group_id=6208 14 | ; 15 | ; [TAB8] 16 | 17 | %include "jsimdext.inc" 18 | 19 | ; -------------------------------------------------------------------------- 20 | 21 | %define SCALEBITS 16 22 | 23 | F_0_081 equ 5329 ; FIX(0.08131) 24 | F_0_114 equ 7471 ; FIX(0.11400) 25 | F_0_168 equ 11059 ; FIX(0.16874) 26 | F_0_250 equ 16384 ; FIX(0.25000) 27 | F_0_299 equ 19595 ; FIX(0.29900) 28 | F_0_331 equ 21709 ; FIX(0.33126) 29 | F_0_418 equ 27439 ; FIX(0.41869) 30 | F_0_587 equ 38470 ; FIX(0.58700) 31 | F_0_337 equ (F_0_587 - F_0_250) ; FIX(0.58700) - FIX(0.25000) 32 | 33 | ; -------------------------------------------------------------------------- 34 | SECTION SEG_CONST 35 | 36 | alignz 16 37 | global EXTN(jconst_rgb_ycc_convert_sse2) 38 | 39 | EXTN(jconst_rgb_ycc_convert_sse2): 40 | 41 | PW_F0299_F0337 times 4 dw F_0_299, F_0_337 42 | PW_F0114_F0250 times 4 dw F_0_114, F_0_250 43 | PW_MF016_MF033 times 4 dw -F_0_168,-F_0_331 44 | PW_MF008_MF041 times 4 dw -F_0_081,-F_0_418 45 | PD_ONEHALFM1_CJ times 4 dd (1 << (SCALEBITS-1)) - 1 + (CENTERJSAMPLE << SCALEBITS) 46 | PD_ONEHALF times 4 dd (1 << (SCALEBITS-1)) 47 | 48 | alignz 16 49 | 50 | ; -------------------------------------------------------------------------- 51 | SECTION SEG_TEXT 52 | BITS 32 53 | 54 | %include "jcclrss2.asm" 55 | 56 | %undef RGB_RED 57 | %undef RGB_GREEN 58 | %undef RGB_BLUE 59 | %undef RGB_PIXELSIZE 60 | %define RGB_RED EXT_RGB_RED 61 | %define RGB_GREEN EXT_RGB_GREEN 62 | %define RGB_BLUE EXT_RGB_BLUE 63 | %define RGB_PIXELSIZE EXT_RGB_PIXELSIZE 64 | %define jsimd_rgb_ycc_convert_sse2 jsimd_extrgb_ycc_convert_sse2 65 | %include "jcclrss2.asm" 66 | 67 | %undef RGB_RED 68 | %undef RGB_GREEN 69 | %undef RGB_BLUE 70 | %undef RGB_PIXELSIZE 71 | %define RGB_RED EXT_RGBX_RED 72 | %define RGB_GREEN EXT_RGBX_GREEN 73 | %define RGB_BLUE EXT_RGBX_BLUE 74 | %define RGB_PIXELSIZE EXT_RGBX_PIXELSIZE 75 | %define jsimd_rgb_ycc_convert_sse2 jsimd_extrgbx_ycc_convert_sse2 76 | %include "jcclrss2.asm" 77 | 78 | %undef RGB_RED 79 | %undef RGB_GREEN 80 | %undef RGB_BLUE 81 | %undef RGB_PIXELSIZE 82 | %define RGB_RED EXT_BGR_RED 83 | %define RGB_GREEN EXT_BGR_GREEN 84 | %define RGB_BLUE EXT_BGR_BLUE 85 | %define RGB_PIXELSIZE EXT_BGR_PIXELSIZE 86 | %define jsimd_rgb_ycc_convert_sse2 jsimd_extbgr_ycc_convert_sse2 87 | %include "jcclrss2.asm" 88 | 89 | %undef RGB_RED 90 | %undef RGB_GREEN 91 | %undef RGB_BLUE 92 | %undef RGB_PIXELSIZE 93 | %define RGB_RED EXT_BGRX_RED 94 | %define RGB_GREEN EXT_BGRX_GREEN 95 | %define RGB_BLUE EXT_BGRX_BLUE 96 | %define RGB_PIXELSIZE EXT_BGRX_PIXELSIZE 97 | %define jsimd_rgb_ycc_convert_sse2 jsimd_extbgrx_ycc_convert_sse2 98 | %include "jcclrss2.asm" 99 | 100 | %undef RGB_RED 101 | %undef RGB_GREEN 102 | %undef RGB_BLUE 103 | %undef RGB_PIXELSIZE 104 | %define RGB_RED EXT_XBGR_RED 105 | %define RGB_GREEN EXT_XBGR_GREEN 106 | %define RGB_BLUE EXT_XBGR_BLUE 107 | %define RGB_PIXELSIZE EXT_XBGR_PIXELSIZE 108 | %define jsimd_rgb_ycc_convert_sse2 jsimd_extxbgr_ycc_convert_sse2 109 | %include "jcclrss2.asm" 110 | 111 | %undef RGB_RED 112 | %undef RGB_GREEN 113 | %undef RGB_BLUE 114 | %undef RGB_PIXELSIZE 115 | %define RGB_RED EXT_XRGB_RED 116 | %define RGB_GREEN EXT_XRGB_GREEN 117 | %define RGB_BLUE EXT_XRGB_BLUE 118 | %define RGB_PIXELSIZE EXT_XRGB_PIXELSIZE 119 | %define jsimd_rgb_ycc_convert_sse2 jsimd_extxrgb_ycc_convert_sse2 120 | %include "jcclrss2.asm" 121 | -------------------------------------------------------------------------------- /jni/simd/jcgrammx.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; jcgrammx.asm - grayscale colorspace conversion (MMX) 3 | ; 4 | ; Copyright 2009 Pierre Ossman for Cendio AB 5 | ; Copyright 2011 D. R. Commander 6 | ; 7 | ; Based on 8 | ; x86 SIMD extension for IJG JPEG library 9 | ; Copyright (C) 1999-2006, MIYASAKA Masaru. 10 | ; For conditions of distribution and use, see copyright notice in jsimdext.inc 11 | ; 12 | ; This file should be assembled with NASM (Netwide Assembler), 13 | ; can *not* be assembled with Microsoft's MASM or any compatible 14 | ; assembler (including Borland's Turbo Assembler). 15 | ; NASM is available from http://nasm.sourceforge.net/ or 16 | ; http://sourceforge.net/project/showfiles.php?group_id=6208 17 | ; 18 | ; [TAB8] 19 | 20 | %include "jsimdext.inc" 21 | 22 | ; -------------------------------------------------------------------------- 23 | 24 | %define SCALEBITS 16 25 | 26 | F_0_114 equ 7471 ; FIX(0.11400) 27 | F_0_250 equ 16384 ; FIX(0.25000) 28 | F_0_299 equ 19595 ; FIX(0.29900) 29 | F_0_587 equ 38470 ; FIX(0.58700) 30 | F_0_337 equ (F_0_587 - F_0_250) ; FIX(0.58700) - FIX(0.25000) 31 | 32 | ; -------------------------------------------------------------------------- 33 | SECTION SEG_CONST 34 | 35 | alignz 16 36 | global EXTN(jconst_rgb_gray_convert_mmx) 37 | 38 | EXTN(jconst_rgb_gray_convert_mmx): 39 | 40 | PW_F0299_F0337 times 2 dw F_0_299, F_0_337 41 | PW_F0114_F0250 times 2 dw F_0_114, F_0_250 42 | PD_ONEHALF times 2 dd (1 << (SCALEBITS-1)) 43 | 44 | alignz 16 45 | 46 | ; -------------------------------------------------------------------------- 47 | SECTION SEG_TEXT 48 | BITS 32 49 | 50 | %include "jcgrymmx.asm" 51 | 52 | %undef RGB_RED 53 | %undef RGB_GREEN 54 | %undef RGB_BLUE 55 | %undef RGB_PIXELSIZE 56 | %define RGB_RED EXT_RGB_RED 57 | %define RGB_GREEN EXT_RGB_GREEN 58 | %define RGB_BLUE EXT_RGB_BLUE 59 | %define RGB_PIXELSIZE EXT_RGB_PIXELSIZE 60 | %define jsimd_rgb_gray_convert_mmx jsimd_extrgb_gray_convert_mmx 61 | %include "jcgrymmx.asm" 62 | 63 | %undef RGB_RED 64 | %undef RGB_GREEN 65 | %undef RGB_BLUE 66 | %undef RGB_PIXELSIZE 67 | %define RGB_RED EXT_RGBX_RED 68 | %define RGB_GREEN EXT_RGBX_GREEN 69 | %define RGB_BLUE EXT_RGBX_BLUE 70 | %define RGB_PIXELSIZE EXT_RGBX_PIXELSIZE 71 | %define jsimd_rgb_gray_convert_mmx jsimd_extrgbx_gray_convert_mmx 72 | %include "jcgrymmx.asm" 73 | 74 | %undef RGB_RED 75 | %undef RGB_GREEN 76 | %undef RGB_BLUE 77 | %undef RGB_PIXELSIZE 78 | %define RGB_RED EXT_BGR_RED 79 | %define RGB_GREEN EXT_BGR_GREEN 80 | %define RGB_BLUE EXT_BGR_BLUE 81 | %define RGB_PIXELSIZE EXT_BGR_PIXELSIZE 82 | %define jsimd_rgb_gray_convert_mmx jsimd_extbgr_gray_convert_mmx 83 | %include "jcgrymmx.asm" 84 | 85 | %undef RGB_RED 86 | %undef RGB_GREEN 87 | %undef RGB_BLUE 88 | %undef RGB_PIXELSIZE 89 | %define RGB_RED EXT_BGRX_RED 90 | %define RGB_GREEN EXT_BGRX_GREEN 91 | %define RGB_BLUE EXT_BGRX_BLUE 92 | %define RGB_PIXELSIZE EXT_BGRX_PIXELSIZE 93 | %define jsimd_rgb_gray_convert_mmx jsimd_extbgrx_gray_convert_mmx 94 | %include "jcgrymmx.asm" 95 | 96 | %undef RGB_RED 97 | %undef RGB_GREEN 98 | %undef RGB_BLUE 99 | %undef RGB_PIXELSIZE 100 | %define RGB_RED EXT_XBGR_RED 101 | %define RGB_GREEN EXT_XBGR_GREEN 102 | %define RGB_BLUE EXT_XBGR_BLUE 103 | %define RGB_PIXELSIZE EXT_XBGR_PIXELSIZE 104 | %define jsimd_rgb_gray_convert_mmx jsimd_extxbgr_gray_convert_mmx 105 | %include "jcgrymmx.asm" 106 | 107 | %undef RGB_RED 108 | %undef RGB_GREEN 109 | %undef RGB_BLUE 110 | %undef RGB_PIXELSIZE 111 | %define RGB_RED EXT_XRGB_RED 112 | %define RGB_GREEN EXT_XRGB_GREEN 113 | %define RGB_BLUE EXT_XRGB_BLUE 114 | %define RGB_PIXELSIZE EXT_XRGB_PIXELSIZE 115 | %define jsimd_rgb_gray_convert_mmx jsimd_extxrgb_gray_convert_mmx 116 | %include "jcgrymmx.asm" 117 | -------------------------------------------------------------------------------- /jni/simd/jcgrass2-64.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; jcgrass2-64.asm - grayscale colorspace conversion (64-bit SSE2) 3 | ; 4 | ; x86 SIMD extension for IJG JPEG library 5 | ; Copyright (C) 1999-2006, MIYASAKA Masaru. 6 | ; Copyright (C) 2011, D. R. Commander. 7 | ; For conditions of distribution and use, see copyright notice in jsimdext.inc 8 | ; 9 | ; This file should be assembled with NASM (Netwide Assembler), 10 | ; can *not* be assembled with Microsoft's MASM or any compatible 11 | ; assembler (including Borland's Turbo Assembler). 12 | ; NASM is available from http://nasm.sourceforge.net/ or 13 | ; http://sourceforge.net/project/showfiles.php?group_id=6208 14 | ; 15 | ; [TAB8] 16 | 17 | %include "jsimdext.inc" 18 | 19 | ; -------------------------------------------------------------------------- 20 | 21 | %define SCALEBITS 16 22 | 23 | F_0_114 equ 7471 ; FIX(0.11400) 24 | F_0_250 equ 16384 ; FIX(0.25000) 25 | F_0_299 equ 19595 ; FIX(0.29900) 26 | F_0_587 equ 38470 ; FIX(0.58700) 27 | F_0_337 equ (F_0_587 - F_0_250) ; FIX(0.58700) - FIX(0.25000) 28 | 29 | ; -------------------------------------------------------------------------- 30 | SECTION SEG_CONST 31 | 32 | alignz 16 33 | global EXTN(jconst_rgb_gray_convert_sse2) 34 | 35 | EXTN(jconst_rgb_gray_convert_sse2): 36 | 37 | PW_F0299_F0337 times 4 dw F_0_299, F_0_337 38 | PW_F0114_F0250 times 4 dw F_0_114, F_0_250 39 | PD_ONEHALF times 4 dd (1 << (SCALEBITS-1)) 40 | 41 | alignz 16 42 | 43 | ; -------------------------------------------------------------------------- 44 | SECTION SEG_TEXT 45 | BITS 64 46 | 47 | %include "jcgryss2-64.asm" 48 | 49 | %undef RGB_RED 50 | %undef RGB_GREEN 51 | %undef RGB_BLUE 52 | %undef RGB_PIXELSIZE 53 | %define RGB_RED EXT_RGB_RED 54 | %define RGB_GREEN EXT_RGB_GREEN 55 | %define RGB_BLUE EXT_RGB_BLUE 56 | %define RGB_PIXELSIZE EXT_RGB_PIXELSIZE 57 | %define jsimd_rgb_gray_convert_sse2 jsimd_extrgb_gray_convert_sse2 58 | %include "jcgryss2-64.asm" 59 | 60 | %undef RGB_RED 61 | %undef RGB_GREEN 62 | %undef RGB_BLUE 63 | %undef RGB_PIXELSIZE 64 | %define RGB_RED EXT_RGBX_RED 65 | %define RGB_GREEN EXT_RGBX_GREEN 66 | %define RGB_BLUE EXT_RGBX_BLUE 67 | %define RGB_PIXELSIZE EXT_RGBX_PIXELSIZE 68 | %define jsimd_rgb_gray_convert_sse2 jsimd_extrgbx_gray_convert_sse2 69 | %include "jcgryss2-64.asm" 70 | 71 | %undef RGB_RED 72 | %undef RGB_GREEN 73 | %undef RGB_BLUE 74 | %undef RGB_PIXELSIZE 75 | %define RGB_RED EXT_BGR_RED 76 | %define RGB_GREEN EXT_BGR_GREEN 77 | %define RGB_BLUE EXT_BGR_BLUE 78 | %define RGB_PIXELSIZE EXT_BGR_PIXELSIZE 79 | %define jsimd_rgb_gray_convert_sse2 jsimd_extbgr_gray_convert_sse2 80 | %include "jcgryss2-64.asm" 81 | 82 | %undef RGB_RED 83 | %undef RGB_GREEN 84 | %undef RGB_BLUE 85 | %undef RGB_PIXELSIZE 86 | %define RGB_RED EXT_BGRX_RED 87 | %define RGB_GREEN EXT_BGRX_GREEN 88 | %define RGB_BLUE EXT_BGRX_BLUE 89 | %define RGB_PIXELSIZE EXT_BGRX_PIXELSIZE 90 | %define jsimd_rgb_gray_convert_sse2 jsimd_extbgrx_gray_convert_sse2 91 | %include "jcgryss2-64.asm" 92 | 93 | %undef RGB_RED 94 | %undef RGB_GREEN 95 | %undef RGB_BLUE 96 | %undef RGB_PIXELSIZE 97 | %define RGB_RED EXT_XBGR_RED 98 | %define RGB_GREEN EXT_XBGR_GREEN 99 | %define RGB_BLUE EXT_XBGR_BLUE 100 | %define RGB_PIXELSIZE EXT_XBGR_PIXELSIZE 101 | %define jsimd_rgb_gray_convert_sse2 jsimd_extxbgr_gray_convert_sse2 102 | %include "jcgryss2-64.asm" 103 | 104 | %undef RGB_RED 105 | %undef RGB_GREEN 106 | %undef RGB_BLUE 107 | %undef RGB_PIXELSIZE 108 | %define RGB_RED EXT_XRGB_RED 109 | %define RGB_GREEN EXT_XRGB_GREEN 110 | %define RGB_BLUE EXT_XRGB_BLUE 111 | %define RGB_PIXELSIZE EXT_XRGB_PIXELSIZE 112 | %define jsimd_rgb_gray_convert_sse2 jsimd_extxrgb_gray_convert_sse2 113 | %include "jcgryss2-64.asm" 114 | -------------------------------------------------------------------------------- /jni/simd/jcgrass2.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; jcgrass2.asm - grayscale colorspace conversion (SSE2) 3 | ; 4 | ; x86 SIMD extension for IJG JPEG library 5 | ; Copyright (C) 1999-2006, MIYASAKA Masaru. 6 | ; Copyright (C) 2011, D. R. Commander. 7 | ; For conditions of distribution and use, see copyright notice in jsimdext.inc 8 | ; 9 | ; This file should be assembled with NASM (Netwide Assembler), 10 | ; can *not* be assembled with Microsoft's MASM or any compatible 11 | ; assembler (including Borland's Turbo Assembler). 12 | ; NASM is available from http://nasm.sourceforge.net/ or 13 | ; http://sourceforge.net/project/showfiles.php?group_id=6208 14 | ; 15 | ; [TAB8] 16 | 17 | %include "jsimdext.inc" 18 | 19 | ; -------------------------------------------------------------------------- 20 | 21 | %define SCALEBITS 16 22 | 23 | F_0_114 equ 7471 ; FIX(0.11400) 24 | F_0_250 equ 16384 ; FIX(0.25000) 25 | F_0_299 equ 19595 ; FIX(0.29900) 26 | F_0_587 equ 38470 ; FIX(0.58700) 27 | F_0_337 equ (F_0_587 - F_0_250) ; FIX(0.58700) - FIX(0.25000) 28 | 29 | ; -------------------------------------------------------------------------- 30 | SECTION SEG_CONST 31 | 32 | alignz 16 33 | global EXTN(jconst_rgb_gray_convert_sse2) 34 | 35 | EXTN(jconst_rgb_gray_convert_sse2): 36 | 37 | PW_F0299_F0337 times 4 dw F_0_299, F_0_337 38 | PW_F0114_F0250 times 4 dw F_0_114, F_0_250 39 | PD_ONEHALF times 4 dd (1 << (SCALEBITS-1)) 40 | 41 | alignz 16 42 | 43 | ; -------------------------------------------------------------------------- 44 | SECTION SEG_TEXT 45 | BITS 32 46 | 47 | %include "jcgryss2.asm" 48 | 49 | %undef RGB_RED 50 | %undef RGB_GREEN 51 | %undef RGB_BLUE 52 | %undef RGB_PIXELSIZE 53 | %define RGB_RED EXT_RGB_RED 54 | %define RGB_GREEN EXT_RGB_GREEN 55 | %define RGB_BLUE EXT_RGB_BLUE 56 | %define RGB_PIXELSIZE EXT_RGB_PIXELSIZE 57 | %define jsimd_rgb_gray_convert_sse2 jsimd_extrgb_gray_convert_sse2 58 | %include "jcgryss2.asm" 59 | 60 | %undef RGB_RED 61 | %undef RGB_GREEN 62 | %undef RGB_BLUE 63 | %undef RGB_PIXELSIZE 64 | %define RGB_RED EXT_RGBX_RED 65 | %define RGB_GREEN EXT_RGBX_GREEN 66 | %define RGB_BLUE EXT_RGBX_BLUE 67 | %define RGB_PIXELSIZE EXT_RGBX_PIXELSIZE 68 | %define jsimd_rgb_gray_convert_sse2 jsimd_extrgbx_gray_convert_sse2 69 | %include "jcgryss2.asm" 70 | 71 | %undef RGB_RED 72 | %undef RGB_GREEN 73 | %undef RGB_BLUE 74 | %undef RGB_PIXELSIZE 75 | %define RGB_RED EXT_BGR_RED 76 | %define RGB_GREEN EXT_BGR_GREEN 77 | %define RGB_BLUE EXT_BGR_BLUE 78 | %define RGB_PIXELSIZE EXT_BGR_PIXELSIZE 79 | %define jsimd_rgb_gray_convert_sse2 jsimd_extbgr_gray_convert_sse2 80 | %include "jcgryss2.asm" 81 | 82 | %undef RGB_RED 83 | %undef RGB_GREEN 84 | %undef RGB_BLUE 85 | %undef RGB_PIXELSIZE 86 | %define RGB_RED EXT_BGRX_RED 87 | %define RGB_GREEN EXT_BGRX_GREEN 88 | %define RGB_BLUE EXT_BGRX_BLUE 89 | %define RGB_PIXELSIZE EXT_BGRX_PIXELSIZE 90 | %define jsimd_rgb_gray_convert_sse2 jsimd_extbgrx_gray_convert_sse2 91 | %include "jcgryss2.asm" 92 | 93 | %undef RGB_RED 94 | %undef RGB_GREEN 95 | %undef RGB_BLUE 96 | %undef RGB_PIXELSIZE 97 | %define RGB_RED EXT_XBGR_RED 98 | %define RGB_GREEN EXT_XBGR_GREEN 99 | %define RGB_BLUE EXT_XBGR_BLUE 100 | %define RGB_PIXELSIZE EXT_XBGR_PIXELSIZE 101 | %define jsimd_rgb_gray_convert_sse2 jsimd_extxbgr_gray_convert_sse2 102 | %include "jcgryss2.asm" 103 | 104 | %undef RGB_RED 105 | %undef RGB_GREEN 106 | %undef RGB_BLUE 107 | %undef RGB_PIXELSIZE 108 | %define RGB_RED EXT_XRGB_RED 109 | %define RGB_GREEN EXT_XRGB_GREEN 110 | %define RGB_BLUE EXT_XRGB_BLUE 111 | %define RGB_PIXELSIZE EXT_XRGB_PIXELSIZE 112 | %define jsimd_rgb_gray_convert_sse2 jsimd_extxrgb_gray_convert_sse2 113 | %include "jcgryss2.asm" 114 | -------------------------------------------------------------------------------- /jni/simd/jcolsamp.inc: -------------------------------------------------------------------------------- 1 | ; 2 | ; jcolsamp.inc - private declarations for color conversion & up/downsampling 3 | ; 4 | ; Copyright 2009 Pierre Ossman for Cendio AB 5 | ; 6 | ; Based on 7 | ; x86 SIMD extension for IJG JPEG library 8 | ; Copyright (C) 1999-2006, MIYASAKA Masaru. 9 | ; For conditions of distribution and use, see copyright notice in jsimdext.inc 10 | ; 11 | ; [TAB8] 12 | 13 | ; -------------------------------------------------------------------------- 14 | 15 | ; pseudo-resisters to make ordering of RGB configurable 16 | ; 17 | %if RGB_RED == 0 18 | %define mmA mm0 19 | %define mmB mm1 20 | %define xmmA xmm0 21 | %define xmmB xmm1 22 | %elif RGB_GREEN == 0 23 | %define mmA mm2 24 | %define mmB mm3 25 | %define xmmA xmm2 26 | %define xmmB xmm3 27 | %elif RGB_BLUE == 0 28 | %define mmA mm4 29 | %define mmB mm5 30 | %define xmmA xmm4 31 | %define xmmB xmm5 32 | %else 33 | %define mmA mm6 34 | %define mmB mm7 35 | %define xmmA xmm6 36 | %define xmmB xmm7 37 | %endif 38 | 39 | %if RGB_RED == 1 40 | %define mmC mm0 41 | %define mmD mm1 42 | %define xmmC xmm0 43 | %define xmmD xmm1 44 | %elif RGB_GREEN == 1 45 | %define mmC mm2 46 | %define mmD mm3 47 | %define xmmC xmm2 48 | %define xmmD xmm3 49 | %elif RGB_BLUE == 1 50 | %define mmC mm4 51 | %define mmD mm5 52 | %define xmmC xmm4 53 | %define xmmD xmm5 54 | %else 55 | %define mmC mm6 56 | %define mmD mm7 57 | %define xmmC xmm6 58 | %define xmmD xmm7 59 | %endif 60 | 61 | %if RGB_RED == 2 62 | %define mmE mm0 63 | %define mmF mm1 64 | %define xmmE xmm0 65 | %define xmmF xmm1 66 | %elif RGB_GREEN == 2 67 | %define mmE mm2 68 | %define mmF mm3 69 | %define xmmE xmm2 70 | %define xmmF xmm3 71 | %elif RGB_BLUE == 2 72 | %define mmE mm4 73 | %define mmF mm5 74 | %define xmmE xmm4 75 | %define xmmF xmm5 76 | %else 77 | %define mmE mm6 78 | %define mmF mm7 79 | %define xmmE xmm6 80 | %define xmmF xmm7 81 | %endif 82 | 83 | %if RGB_RED == 3 84 | %define mmG mm0 85 | %define mmH mm1 86 | %define xmmG xmm0 87 | %define xmmH xmm1 88 | %elif RGB_GREEN == 3 89 | %define mmG mm2 90 | %define mmH mm3 91 | %define xmmG xmm2 92 | %define xmmH xmm3 93 | %elif RGB_BLUE == 3 94 | %define mmG mm4 95 | %define mmH mm5 96 | %define xmmG xmm4 97 | %define xmmH xmm5 98 | %else 99 | %define mmG mm6 100 | %define mmH mm7 101 | %define xmmG xmm6 102 | %define xmmH xmm7 103 | %endif 104 | 105 | ; -------------------------------------------------------------------------- 106 | -------------------------------------------------------------------------------- /jni/simd/jdcolmmx.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; jdcolmmx.asm - colorspace conversion (MMX) 3 | ; 4 | ; Copyright 2009 Pierre Ossman for Cendio AB 5 | ; Copyright 2009 D. R. Commander 6 | ; 7 | ; Based on 8 | ; x86 SIMD extension for IJG JPEG library 9 | ; Copyright (C) 1999-2006, MIYASAKA Masaru. 10 | ; For conditions of distribution and use, see copyright notice in jsimdext.inc 11 | ; 12 | ; This file should be assembled with NASM (Netwide Assembler), 13 | ; can *not* be assembled with Microsoft's MASM or any compatible 14 | ; assembler (including Borland's Turbo Assembler). 15 | ; NASM is available from http://nasm.sourceforge.net/ or 16 | ; http://sourceforge.net/project/showfiles.php?group_id=6208 17 | ; 18 | ; [TAB8] 19 | 20 | %include "jsimdext.inc" 21 | 22 | ; -------------------------------------------------------------------------- 23 | 24 | %define SCALEBITS 16 25 | 26 | F_0_344 equ 22554 ; FIX(0.34414) 27 | F_0_714 equ 46802 ; FIX(0.71414) 28 | F_1_402 equ 91881 ; FIX(1.40200) 29 | F_1_772 equ 116130 ; FIX(1.77200) 30 | F_0_402 equ (F_1_402 - 65536) ; FIX(1.40200) - FIX(1) 31 | F_0_285 equ ( 65536 - F_0_714) ; FIX(1) - FIX(0.71414) 32 | F_0_228 equ (131072 - F_1_772) ; FIX(2) - FIX(1.77200) 33 | 34 | ; -------------------------------------------------------------------------- 35 | SECTION SEG_CONST 36 | 37 | alignz 16 38 | global EXTN(jconst_ycc_rgb_convert_mmx) 39 | 40 | EXTN(jconst_ycc_rgb_convert_mmx): 41 | 42 | PW_F0402 times 4 dw F_0_402 43 | PW_MF0228 times 4 dw -F_0_228 44 | PW_MF0344_F0285 times 2 dw -F_0_344, F_0_285 45 | PW_ONE times 4 dw 1 46 | PD_ONEHALF times 2 dd 1 << (SCALEBITS-1) 47 | 48 | alignz 16 49 | 50 | ; -------------------------------------------------------------------------- 51 | SECTION SEG_TEXT 52 | BITS 32 53 | 54 | %include "jdclrmmx.asm" 55 | 56 | %undef RGB_RED 57 | %undef RGB_GREEN 58 | %undef RGB_BLUE 59 | %undef RGB_PIXELSIZE 60 | %define RGB_RED EXT_RGB_RED 61 | %define RGB_GREEN EXT_RGB_GREEN 62 | %define RGB_BLUE EXT_RGB_BLUE 63 | %define RGB_PIXELSIZE EXT_RGB_PIXELSIZE 64 | %define jsimd_ycc_rgb_convert_mmx jsimd_ycc_extrgb_convert_mmx 65 | %include "jdclrmmx.asm" 66 | 67 | %undef RGB_RED 68 | %undef RGB_GREEN 69 | %undef RGB_BLUE 70 | %undef RGB_PIXELSIZE 71 | %define RGB_RED EXT_RGBX_RED 72 | %define RGB_GREEN EXT_RGBX_GREEN 73 | %define RGB_BLUE EXT_RGBX_BLUE 74 | %define RGB_PIXELSIZE EXT_RGBX_PIXELSIZE 75 | %define jsimd_ycc_rgb_convert_mmx jsimd_ycc_extrgbx_convert_mmx 76 | %include "jdclrmmx.asm" 77 | 78 | %undef RGB_RED 79 | %undef RGB_GREEN 80 | %undef RGB_BLUE 81 | %undef RGB_PIXELSIZE 82 | %define RGB_RED EXT_BGR_RED 83 | %define RGB_GREEN EXT_BGR_GREEN 84 | %define RGB_BLUE EXT_BGR_BLUE 85 | %define RGB_PIXELSIZE EXT_BGR_PIXELSIZE 86 | %define jsimd_ycc_rgb_convert_mmx jsimd_ycc_extbgr_convert_mmx 87 | %include "jdclrmmx.asm" 88 | 89 | %undef RGB_RED 90 | %undef RGB_GREEN 91 | %undef RGB_BLUE 92 | %undef RGB_PIXELSIZE 93 | %define RGB_RED EXT_BGRX_RED 94 | %define RGB_GREEN EXT_BGRX_GREEN 95 | %define RGB_BLUE EXT_BGRX_BLUE 96 | %define RGB_PIXELSIZE EXT_BGRX_PIXELSIZE 97 | %define jsimd_ycc_rgb_convert_mmx jsimd_ycc_extbgrx_convert_mmx 98 | %include "jdclrmmx.asm" 99 | 100 | %undef RGB_RED 101 | %undef RGB_GREEN 102 | %undef RGB_BLUE 103 | %undef RGB_PIXELSIZE 104 | %define RGB_RED EXT_XBGR_RED 105 | %define RGB_GREEN EXT_XBGR_GREEN 106 | %define RGB_BLUE EXT_XBGR_BLUE 107 | %define RGB_PIXELSIZE EXT_XBGR_PIXELSIZE 108 | %define jsimd_ycc_rgb_convert_mmx jsimd_ycc_extxbgr_convert_mmx 109 | %include "jdclrmmx.asm" 110 | 111 | %undef RGB_RED 112 | %undef RGB_GREEN 113 | %undef RGB_BLUE 114 | %undef RGB_PIXELSIZE 115 | %define RGB_RED EXT_XRGB_RED 116 | %define RGB_GREEN EXT_XRGB_GREEN 117 | %define RGB_BLUE EXT_XRGB_BLUE 118 | %define RGB_PIXELSIZE EXT_XRGB_PIXELSIZE 119 | %define jsimd_ycc_rgb_convert_mmx jsimd_ycc_extxrgb_convert_mmx 120 | %include "jdclrmmx.asm" 121 | -------------------------------------------------------------------------------- /jni/simd/jdcolss2-64.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; jdcolss2-64.asm - colorspace conversion (64-bit SSE2) 3 | ; 4 | ; Copyright 2009 Pierre Ossman for Cendio AB 5 | ; Copyright 2009 D. R. Commander 6 | ; 7 | ; Based on 8 | ; x86 SIMD extension for IJG JPEG library 9 | ; Copyright (C) 1999-2006, MIYASAKA Masaru. 10 | ; For conditions of distribution and use, see copyright notice in jsimdext.inc 11 | ; 12 | ; This file should be assembled with NASM (Netwide Assembler), 13 | ; can *not* be assembled with Microsoft's MASM or any compatible 14 | ; assembler (including Borland's Turbo Assembler). 15 | ; NASM is available from http://nasm.sourceforge.net/ or 16 | ; http://sourceforge.net/project/showfiles.php?group_id=6208 17 | ; 18 | ; [TAB8] 19 | 20 | %include "jsimdext.inc" 21 | 22 | ; -------------------------------------------------------------------------- 23 | 24 | %define SCALEBITS 16 25 | 26 | F_0_344 equ 22554 ; FIX(0.34414) 27 | F_0_714 equ 46802 ; FIX(0.71414) 28 | F_1_402 equ 91881 ; FIX(1.40200) 29 | F_1_772 equ 116130 ; FIX(1.77200) 30 | F_0_402 equ (F_1_402 - 65536) ; FIX(1.40200) - FIX(1) 31 | F_0_285 equ ( 65536 - F_0_714) ; FIX(1) - FIX(0.71414) 32 | F_0_228 equ (131072 - F_1_772) ; FIX(2) - FIX(1.77200) 33 | 34 | ; -------------------------------------------------------------------------- 35 | SECTION SEG_CONST 36 | 37 | alignz 16 38 | global EXTN(jconst_ycc_rgb_convert_sse2) 39 | 40 | EXTN(jconst_ycc_rgb_convert_sse2): 41 | 42 | PW_F0402 times 8 dw F_0_402 43 | PW_MF0228 times 8 dw -F_0_228 44 | PW_MF0344_F0285 times 4 dw -F_0_344, F_0_285 45 | PW_ONE times 8 dw 1 46 | PD_ONEHALF times 4 dd 1 << (SCALEBITS-1) 47 | 48 | alignz 16 49 | 50 | ; -------------------------------------------------------------------------- 51 | SECTION SEG_TEXT 52 | BITS 64 53 | 54 | %include "jdclrss2-64.asm" 55 | 56 | %undef RGB_RED 57 | %undef RGB_GREEN 58 | %undef RGB_BLUE 59 | %undef RGB_PIXELSIZE 60 | %define RGB_RED EXT_RGB_RED 61 | %define RGB_GREEN EXT_RGB_GREEN 62 | %define RGB_BLUE EXT_RGB_BLUE 63 | %define RGB_PIXELSIZE EXT_RGB_PIXELSIZE 64 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extrgb_convert_sse2 65 | %include "jdclrss2-64.asm" 66 | 67 | %undef RGB_RED 68 | %undef RGB_GREEN 69 | %undef RGB_BLUE 70 | %undef RGB_PIXELSIZE 71 | %define RGB_RED EXT_RGBX_RED 72 | %define RGB_GREEN EXT_RGBX_GREEN 73 | %define RGB_BLUE EXT_RGBX_BLUE 74 | %define RGB_PIXELSIZE EXT_RGBX_PIXELSIZE 75 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extrgbx_convert_sse2 76 | %include "jdclrss2-64.asm" 77 | 78 | %undef RGB_RED 79 | %undef RGB_GREEN 80 | %undef RGB_BLUE 81 | %undef RGB_PIXELSIZE 82 | %define RGB_RED EXT_BGR_RED 83 | %define RGB_GREEN EXT_BGR_GREEN 84 | %define RGB_BLUE EXT_BGR_BLUE 85 | %define RGB_PIXELSIZE EXT_BGR_PIXELSIZE 86 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extbgr_convert_sse2 87 | %include "jdclrss2-64.asm" 88 | 89 | %undef RGB_RED 90 | %undef RGB_GREEN 91 | %undef RGB_BLUE 92 | %undef RGB_PIXELSIZE 93 | %define RGB_RED EXT_BGRX_RED 94 | %define RGB_GREEN EXT_BGRX_GREEN 95 | %define RGB_BLUE EXT_BGRX_BLUE 96 | %define RGB_PIXELSIZE EXT_BGRX_PIXELSIZE 97 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extbgrx_convert_sse2 98 | %include "jdclrss2-64.asm" 99 | 100 | %undef RGB_RED 101 | %undef RGB_GREEN 102 | %undef RGB_BLUE 103 | %undef RGB_PIXELSIZE 104 | %define RGB_RED EXT_XBGR_RED 105 | %define RGB_GREEN EXT_XBGR_GREEN 106 | %define RGB_BLUE EXT_XBGR_BLUE 107 | %define RGB_PIXELSIZE EXT_XBGR_PIXELSIZE 108 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extxbgr_convert_sse2 109 | %include "jdclrss2-64.asm" 110 | 111 | %undef RGB_RED 112 | %undef RGB_GREEN 113 | %undef RGB_BLUE 114 | %undef RGB_PIXELSIZE 115 | %define RGB_RED EXT_XRGB_RED 116 | %define RGB_GREEN EXT_XRGB_GREEN 117 | %define RGB_BLUE EXT_XRGB_BLUE 118 | %define RGB_PIXELSIZE EXT_XRGB_PIXELSIZE 119 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extxrgb_convert_sse2 120 | %include "jdclrss2-64.asm" 121 | -------------------------------------------------------------------------------- /jni/simd/jdcolss2.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; jdcolss2.asm - colorspace conversion (SSE2) 3 | ; 4 | ; Copyright 2009 Pierre Ossman for Cendio AB 5 | ; Copyright 2009 D. R. Commander 6 | ; 7 | ; Based on 8 | ; x86 SIMD extension for IJG JPEG library 9 | ; Copyright (C) 1999-2006, MIYASAKA Masaru. 10 | ; For conditions of distribution and use, see copyright notice in jsimdext.inc 11 | ; 12 | ; This file should be assembled with NASM (Netwide Assembler), 13 | ; can *not* be assembled with Microsoft's MASM or any compatible 14 | ; assembler (including Borland's Turbo Assembler). 15 | ; NASM is available from http://nasm.sourceforge.net/ or 16 | ; http://sourceforge.net/project/showfiles.php?group_id=6208 17 | ; 18 | ; [TAB8] 19 | 20 | %include "jsimdext.inc" 21 | 22 | ; -------------------------------------------------------------------------- 23 | 24 | %define SCALEBITS 16 25 | 26 | F_0_344 equ 22554 ; FIX(0.34414) 27 | F_0_714 equ 46802 ; FIX(0.71414) 28 | F_1_402 equ 91881 ; FIX(1.40200) 29 | F_1_772 equ 116130 ; FIX(1.77200) 30 | F_0_402 equ (F_1_402 - 65536) ; FIX(1.40200) - FIX(1) 31 | F_0_285 equ ( 65536 - F_0_714) ; FIX(1) - FIX(0.71414) 32 | F_0_228 equ (131072 - F_1_772) ; FIX(2) - FIX(1.77200) 33 | 34 | ; -------------------------------------------------------------------------- 35 | SECTION SEG_CONST 36 | 37 | alignz 16 38 | global EXTN(jconst_ycc_rgb_convert_sse2) 39 | 40 | EXTN(jconst_ycc_rgb_convert_sse2): 41 | 42 | PW_F0402 times 8 dw F_0_402 43 | PW_MF0228 times 8 dw -F_0_228 44 | PW_MF0344_F0285 times 4 dw -F_0_344, F_0_285 45 | PW_ONE times 8 dw 1 46 | PD_ONEHALF times 4 dd 1 << (SCALEBITS-1) 47 | 48 | alignz 16 49 | 50 | ; -------------------------------------------------------------------------- 51 | SECTION SEG_TEXT 52 | BITS 32 53 | 54 | %include "jdclrss2.asm" 55 | 56 | %undef RGB_RED 57 | %undef RGB_GREEN 58 | %undef RGB_BLUE 59 | %undef RGB_PIXELSIZE 60 | %define RGB_RED EXT_RGB_RED 61 | %define RGB_GREEN EXT_RGB_GREEN 62 | %define RGB_BLUE EXT_RGB_BLUE 63 | %define RGB_PIXELSIZE EXT_RGB_PIXELSIZE 64 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extrgb_convert_sse2 65 | %include "jdclrss2.asm" 66 | 67 | %undef RGB_RED 68 | %undef RGB_GREEN 69 | %undef RGB_BLUE 70 | %undef RGB_PIXELSIZE 71 | %define RGB_RED EXT_RGBX_RED 72 | %define RGB_GREEN EXT_RGBX_GREEN 73 | %define RGB_BLUE EXT_RGBX_BLUE 74 | %define RGB_PIXELSIZE EXT_RGBX_PIXELSIZE 75 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extrgbx_convert_sse2 76 | %include "jdclrss2.asm" 77 | 78 | %undef RGB_RED 79 | %undef RGB_GREEN 80 | %undef RGB_BLUE 81 | %undef RGB_PIXELSIZE 82 | %define RGB_RED EXT_BGR_RED 83 | %define RGB_GREEN EXT_BGR_GREEN 84 | %define RGB_BLUE EXT_BGR_BLUE 85 | %define RGB_PIXELSIZE EXT_BGR_PIXELSIZE 86 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extbgr_convert_sse2 87 | %include "jdclrss2.asm" 88 | 89 | %undef RGB_RED 90 | %undef RGB_GREEN 91 | %undef RGB_BLUE 92 | %undef RGB_PIXELSIZE 93 | %define RGB_RED EXT_BGRX_RED 94 | %define RGB_GREEN EXT_BGRX_GREEN 95 | %define RGB_BLUE EXT_BGRX_BLUE 96 | %define RGB_PIXELSIZE EXT_BGRX_PIXELSIZE 97 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extbgrx_convert_sse2 98 | %include "jdclrss2.asm" 99 | 100 | %undef RGB_RED 101 | %undef RGB_GREEN 102 | %undef RGB_BLUE 103 | %undef RGB_PIXELSIZE 104 | %define RGB_RED EXT_XBGR_RED 105 | %define RGB_GREEN EXT_XBGR_GREEN 106 | %define RGB_BLUE EXT_XBGR_BLUE 107 | %define RGB_PIXELSIZE EXT_XBGR_PIXELSIZE 108 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extxbgr_convert_sse2 109 | %include "jdclrss2.asm" 110 | 111 | %undef RGB_RED 112 | %undef RGB_GREEN 113 | %undef RGB_BLUE 114 | %undef RGB_PIXELSIZE 115 | %define RGB_RED EXT_XRGB_RED 116 | %define RGB_GREEN EXT_XRGB_GREEN 117 | %define RGB_BLUE EXT_XRGB_BLUE 118 | %define RGB_PIXELSIZE EXT_XRGB_PIXELSIZE 119 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extxrgb_convert_sse2 120 | %include "jdclrss2.asm" 121 | -------------------------------------------------------------------------------- /jni/simd/jdct.inc: -------------------------------------------------------------------------------- 1 | ; 2 | ; jdct.inc - private declarations for forward & reverse DCT subsystems 3 | ; 4 | ; Copyright 2009 Pierre Ossman for Cendio AB 5 | ; 6 | ; Based on 7 | ; x86 SIMD extension for IJG JPEG library 8 | ; Copyright (C) 1999-2006, MIYASAKA Masaru. 9 | ; For conditions of distribution and use, see copyright notice in jsimdext.inc 10 | ; 11 | ; [TAB8] 12 | 13 | ; Each IDCT routine is responsible for range-limiting its results and 14 | ; converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could 15 | ; be quite far out of range if the input data is corrupt, so a bulletproof 16 | ; range-limiting step is required. We use a mask-and-table-lookup method 17 | ; to do the combined operations quickly. 18 | ; 19 | %define RANGE_MASK (MAXJSAMPLE * 4 + 3) ; 2 bits wider than legal samples 20 | 21 | %define ROW(n,b,s) ((b)+(n)*(s)) 22 | %define COL(n,b,s) ((b)+(n)*(s)*DCTSIZE) 23 | 24 | %define DWBLOCK(m,n,b,s) ((b)+(m)*DCTSIZE*(s)+(n)*SIZEOF_DWORD) 25 | %define MMBLOCK(m,n,b,s) ((b)+(m)*DCTSIZE*(s)+(n)*SIZEOF_MMWORD) 26 | %define XMMBLOCK(m,n,b,s) ((b)+(m)*DCTSIZE*(s)+(n)*SIZEOF_XMMWORD) 27 | 28 | ; -------------------------------------------------------------------------- 29 | -------------------------------------------------------------------------------- /jni/simd/jsimdcpu.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; jsimdcpu.asm - SIMD instruction support check 3 | ; 4 | ; Copyright 2009 Pierre Ossman for Cendio AB 5 | ; 6 | ; Based on 7 | ; x86 SIMD extension for IJG JPEG library 8 | ; Copyright (C) 1999-2006, MIYASAKA Masaru. 9 | ; For conditions of distribution and use, see copyright notice in jsimdext.inc 10 | ; 11 | ; This file should be assembled with NASM (Netwide Assembler), 12 | ; can *not* be assembled with Microsoft's MASM or any compatible 13 | ; assembler (including Borland's Turbo Assembler). 14 | ; NASM is available from http://nasm.sourceforge.net/ or 15 | ; http://sourceforge.net/project/showfiles.php?group_id=6208 16 | ; 17 | ; [TAB8] 18 | 19 | %include "jsimdext.inc" 20 | 21 | ; -------------------------------------------------------------------------- 22 | SECTION SEG_TEXT 23 | BITS 32 24 | ; 25 | ; Check if the CPU supports SIMD instructions 26 | ; 27 | ; GLOBAL(unsigned int) 28 | ; jpeg_simd_cpu_support (void) 29 | ; 30 | 31 | align 16 32 | global EXTN(jpeg_simd_cpu_support) 33 | 34 | EXTN(jpeg_simd_cpu_support): 35 | push ebx 36 | ; push ecx ; need not be preserved 37 | ; push edx ; need not be preserved 38 | ; push esi ; unused 39 | push edi 40 | 41 | xor edi,edi ; simd support flag 42 | 43 | pushfd 44 | pop eax 45 | mov edx,eax 46 | xor eax, 1<<21 ; flip ID bit in EFLAGS 47 | push eax 48 | popfd 49 | pushfd 50 | pop eax 51 | xor eax,edx 52 | jz short .return ; CPUID is not supported 53 | 54 | ; Check for MMX instruction support 55 | xor eax,eax 56 | cpuid 57 | test eax,eax 58 | jz short .return 59 | 60 | xor eax,eax 61 | inc eax 62 | cpuid 63 | mov eax,edx ; eax = Standard feature flags 64 | 65 | test eax, 1<<23 ; bit23:MMX 66 | jz short .no_mmx 67 | or edi, byte JSIMD_MMX 68 | .no_mmx: 69 | test eax, 1<<25 ; bit25:SSE 70 | jz short .no_sse 71 | or edi, byte JSIMD_SSE 72 | .no_sse: 73 | test eax, 1<<26 ; bit26:SSE2 74 | jz short .no_sse2 75 | or edi, byte JSIMD_SSE2 76 | .no_sse2: 77 | 78 | ; Check for 3DNow! instruction support 79 | mov eax, 0x80000000 80 | cpuid 81 | cmp eax, 0x80000000 82 | jbe short .return 83 | 84 | mov eax, 0x80000001 85 | cpuid 86 | mov eax,edx ; eax = Extended feature flags 87 | 88 | test eax, 1<<31 ; bit31:3DNow!(vendor independent) 89 | jz short .no_3dnow 90 | or edi, byte JSIMD_3DNOW 91 | .no_3dnow: 92 | 93 | .return: 94 | mov eax,edi 95 | 96 | pop edi 97 | ; pop esi ; unused 98 | ; pop edx ; need not be preserved 99 | ; pop ecx ; need not be preserved 100 | pop ebx 101 | ret 102 | 103 | ; For some reason, the OS X linker does not honor the request to align the 104 | ; segment unless we do this. 105 | align 16 106 | -------------------------------------------------------------------------------- /jni/simd/nasm_lt.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | command="" 3 | infile="" 4 | o_opt=no 5 | pic=no 6 | while [ $# -gt 0 ]; do 7 | case "$1" in 8 | -DPIC|-fPIC|-fpic|-Kpic|-KPIC) 9 | if [ "$pic" != "yes" ] ; then 10 | command="$command -DPIC" 11 | pic=yes 12 | fi 13 | ;; 14 | -f|-fbin|-faout|-faoutb|-fcoff|-felf|-felf64|-fas86| \ 15 | -fobj|-fwin32|-fwin64|-frdf|-fieee|-fmacho|-fmacho64) 16 | # it's a file format specifier for nasm. 17 | command="$command $1" 18 | ;; 19 | -f*) 20 | # maybe a code-generation flag for gcc. 21 | ;; 22 | -[Ii]*) 23 | incdir=`echo "$1" | sed 's/^-[Ii]//'` 24 | if [ "x$incdir" = x -a "x$2" != x ] ; then 25 | case "$2" in 26 | -*) ;; 27 | *) incdir="$2"; shift;; 28 | esac 29 | fi 30 | if [ "x$incdir" != x ] ; then 31 | # In the case of NASM, the trailing slash is necessary. 32 | incdir=`echo "$incdir" | sed 's%/*$%/%'` 33 | command="$command -I$incdir" 34 | fi 35 | ;; 36 | -o*) 37 | o_opt=yes 38 | command="$command $1" 39 | ;; 40 | *.asm) 41 | infile=$1 42 | command="$command $1" 43 | ;; 44 | *) 45 | command="$command $1" 46 | ;; 47 | esac 48 | shift 49 | done 50 | if [ "$o_opt" != yes ] ; then 51 | # By default, NASM creates an output file 52 | # in the same directory as the input file. 53 | outfile="-o `echo $infile | sed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.o" 54 | command="$command $outfile" 55 | fi 56 | echo $command 57 | exec $command 58 | -------------------------------------------------------------------------------- /jni/win/config.h.in: -------------------------------------------------------------------------------- 1 | #define VERSION "@VERSION@" 2 | #define BUILD "@BUILD@" 3 | #define PACKAGE_NAME "@CMAKE_PROJECT_NAME@" 4 | -------------------------------------------------------------------------------- /jni/win/jconfig.h.in: -------------------------------------------------------------------------------- 1 | /* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */ 2 | /* see jconfig.txt for explanations */ 3 | 4 | #define JPEG_LIB_VERSION @JPEG_LIB_VERSION@ 5 | #define LIBJPEG_TURBO_VERSION @VERSION@ 6 | #cmakedefine C_ARITH_CODING_SUPPORTED 7 | #cmakedefine D_ARITH_CODING_SUPPORTED 8 | 9 | #define HAVE_PROTOTYPES 10 | #define HAVE_UNSIGNED_CHAR 11 | #define HAVE_UNSIGNED_SHORT 12 | /* #define void char */ 13 | /* #define const */ 14 | #undef CHAR_IS_UNSIGNED 15 | #define HAVE_STDDEF_H 16 | #define HAVE_STDLIB_H 17 | #undef NEED_BSD_STRINGS 18 | #undef NEED_SYS_TYPES_H 19 | #undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */ 20 | #undef NEED_SHORT_EXTERNAL_NAMES 21 | #undef INCOMPLETE_TYPES_BROKEN 22 | 23 | /* Define "boolean" as unsigned char, not int, per Windows custom */ 24 | #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ 25 | typedef unsigned char boolean; 26 | #endif 27 | #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ 28 | 29 | /* Define "INT32" as int, not long, per Windows custom */ 30 | #if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */ 31 | typedef short INT16; 32 | typedef signed int INT32; 33 | #endif 34 | #define XMD_H /* prevent jmorecfg.h from redefining it */ 35 | 36 | #ifndef INLINE 37 | #if defined(__GNUC__) 38 | #define INLINE __attribute__((always_inline)) 39 | #elif defined(_MSC_VER) 40 | #define INLINE __forceinline 41 | #else 42 | #define INLINE 43 | #endif 44 | #endif 45 | 46 | #ifdef JPEG_INTERNALS 47 | 48 | #undef RIGHT_SHIFT_IS_UNSIGNED 49 | 50 | #endif /* JPEG_INTERNALS */ 51 | -------------------------------------------------------------------------------- /jni/win/jpeg62.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | jcopy_block_row @ 1 ; 3 | jcopy_sample_rows @ 2 ; 4 | jdiv_round_up @ 3 ; 5 | jinit_1pass_quantizer @ 4 ; 6 | jinit_2pass_quantizer @ 5 ; 7 | jinit_c_coef_controller @ 6 ; 8 | jinit_c_main_controller @ 7 ; 9 | jinit_c_master_control @ 8 ; 10 | jinit_c_prep_controller @ 9 ; 11 | jinit_color_converter @ 10 ; 12 | jinit_color_deconverter @ 11 ; 13 | jinit_compress_master @ 12 ; 14 | jinit_d_coef_controller @ 13 ; 15 | jinit_d_main_controller @ 14 ; 16 | jinit_d_post_controller @ 15 ; 17 | jinit_downsampler @ 16 ; 18 | jinit_forward_dct @ 17 ; 19 | jinit_huff_decoder @ 18 ; 20 | jinit_huff_encoder @ 19 ; 21 | jinit_input_controller @ 20 ; 22 | jinit_inverse_dct @ 21 ; 23 | jinit_marker_reader @ 22 ; 24 | jinit_marker_writer @ 23 ; 25 | jinit_master_decompress @ 24 ; 26 | jinit_memory_mgr @ 25 ; 27 | jinit_merged_upsampler @ 26 ; 28 | jinit_phuff_decoder @ 27 ; 29 | jinit_phuff_encoder @ 28 ; 30 | jinit_upsampler @ 29 ; 31 | jpeg_CreateCompress @ 30 ; 32 | jpeg_CreateDecompress @ 31 ; 33 | jpeg_abort @ 32 ; 34 | jpeg_abort_compress @ 33 ; 35 | jpeg_abort_decompress @ 34 ; 36 | jpeg_add_quant_table @ 35 ; 37 | jpeg_alloc_huff_table @ 36 ; 38 | jpeg_alloc_quant_table @ 37 ; 39 | jpeg_calc_output_dimensions @ 38 ; 40 | jpeg_consume_input @ 39 ; 41 | jpeg_copy_critical_parameters @ 40 ; 42 | jpeg_default_colorspace @ 41 ; 43 | jpeg_destroy @ 42 ; 44 | jpeg_destroy_compress @ 43 ; 45 | jpeg_destroy_decompress @ 44 ; 46 | jpeg_fdct_float @ 45 ; 47 | jpeg_fdct_ifast @ 46 ; 48 | jpeg_fdct_islow @ 47 ; 49 | jpeg_fill_bit_buffer @ 48 ; 50 | jpeg_finish_compress @ 49 ; 51 | jpeg_finish_decompress @ 50 ; 52 | jpeg_finish_output @ 51 ; 53 | jpeg_free_large @ 52 ; 54 | jpeg_free_small @ 53 ; 55 | jpeg_gen_optimal_table @ 54 ; 56 | jpeg_get_large @ 55 ; 57 | jpeg_get_small @ 56 ; 58 | jpeg_has_multiple_scans @ 57 ; 59 | jpeg_huff_decode @ 58 ; 60 | jpeg_idct_1x1 @ 59 ; 61 | jpeg_idct_2x2 @ 60 ; 62 | jpeg_idct_4x4 @ 61 ; 63 | jpeg_idct_float @ 62 ; 64 | jpeg_idct_ifast @ 63 ; 65 | jpeg_idct_islow @ 64 ; 66 | jpeg_input_complete @ 65 ; 67 | jpeg_make_c_derived_tbl @ 66 ; 68 | jpeg_make_d_derived_tbl @ 67 ; 69 | jpeg_mem_available @ 68 ; 70 | jpeg_mem_init @ 69 ; 71 | jpeg_mem_term @ 70 ; 72 | jpeg_new_colormap @ 71 ; 73 | jpeg_open_backing_store @ 72 ; 74 | jpeg_quality_scaling @ 73 ; 75 | jpeg_read_coefficients @ 74 ; 76 | jpeg_read_header @ 75 ; 77 | jpeg_read_raw_data @ 76 ; 78 | jpeg_read_scanlines @ 77 ; 79 | jpeg_resync_to_restart @ 78 ; 80 | jpeg_save_markers @ 79 ; 81 | jpeg_set_colorspace @ 80 ; 82 | jpeg_set_defaults @ 81 ; 83 | jpeg_set_linear_quality @ 82 ; 84 | jpeg_set_marker_processor @ 83 ; 85 | jpeg_set_quality @ 84 ; 86 | jpeg_simple_progression @ 85 ; 87 | jpeg_start_compress @ 86 ; 88 | jpeg_start_decompress @ 87 ; 89 | jpeg_start_output @ 88 ; 90 | jpeg_std_error @ 89 ; 91 | jpeg_stdio_dest @ 90 ; 92 | jpeg_stdio_src @ 91 ; 93 | jpeg_suppress_tables @ 92 ; 94 | jpeg_write_coefficients @ 93 ; 95 | jpeg_write_m_byte @ 94 ; 96 | jpeg_write_m_header @ 95 ; 97 | jpeg_write_marker @ 96 ; 98 | jpeg_write_raw_data @ 97 ; 99 | jpeg_write_scanlines @ 98 ; 100 | jpeg_write_tables @ 99 ; 101 | jround_up @ 100 ; 102 | jzero_far @ 101 ; 103 | -------------------------------------------------------------------------------- /jni/win/jpeg7.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | jcopy_block_row @ 1 ; 3 | jcopy_sample_rows @ 2 ; 4 | jdiv_round_up @ 3 ; 5 | jinit_1pass_quantizer @ 4 ; 6 | jinit_2pass_quantizer @ 5 ; 7 | jinit_c_coef_controller @ 6 ; 8 | jinit_c_main_controller @ 7 ; 9 | jinit_c_master_control @ 8 ; 10 | jinit_c_prep_controller @ 9 ; 11 | jinit_color_converter @ 10 ; 12 | jinit_color_deconverter @ 11 ; 13 | jinit_compress_master @ 12 ; 14 | jinit_d_coef_controller @ 13 ; 15 | jinit_d_main_controller @ 14 ; 16 | jinit_d_post_controller @ 15 ; 17 | jinit_downsampler @ 16 ; 18 | jinit_forward_dct @ 17 ; 19 | jinit_huff_decoder @ 18 ; 20 | jinit_huff_encoder @ 19 ; 21 | jinit_input_controller @ 20 ; 22 | jinit_inverse_dct @ 21 ; 23 | jinit_marker_reader @ 22 ; 24 | jinit_marker_writer @ 23 ; 25 | jinit_master_decompress @ 24 ; 26 | jinit_memory_mgr @ 25 ; 27 | jinit_merged_upsampler @ 26 ; 28 | jinit_phuff_decoder @ 27 ; 29 | jinit_phuff_encoder @ 28 ; 30 | jinit_upsampler @ 29 ; 31 | jpeg_CreateCompress @ 30 ; 32 | jpeg_CreateDecompress @ 31 ; 33 | jpeg_abort @ 32 ; 34 | jpeg_abort_compress @ 33 ; 35 | jpeg_abort_decompress @ 34 ; 36 | jpeg_add_quant_table @ 35 ; 37 | jpeg_alloc_huff_table @ 36 ; 38 | jpeg_alloc_quant_table @ 37 ; 39 | jpeg_calc_jpeg_dimensions @ 38 ; 40 | jpeg_calc_output_dimensions @ 39 ; 41 | jpeg_consume_input @ 40 ; 42 | jpeg_copy_critical_parameters @ 41 ; 43 | jpeg_default_colorspace @ 42 ; 44 | jpeg_default_qtables @ 43 ; 45 | jpeg_destroy @ 44 ; 46 | jpeg_destroy_compress @ 45 ; 47 | jpeg_destroy_decompress @ 46 ; 48 | jpeg_fdct_float @ 47 ; 49 | jpeg_fdct_ifast @ 48 ; 50 | jpeg_fdct_islow @ 49 ; 51 | jpeg_fill_bit_buffer @ 50 ; 52 | jpeg_finish_compress @ 51 ; 53 | jpeg_finish_decompress @ 52 ; 54 | jpeg_finish_output @ 53 ; 55 | jpeg_free_large @ 54 ; 56 | jpeg_free_small @ 55 ; 57 | jpeg_gen_optimal_table @ 56 ; 58 | jpeg_get_large @ 57 ; 59 | jpeg_get_small @ 58 ; 60 | jpeg_has_multiple_scans @ 59 ; 61 | jpeg_huff_decode @ 60 ; 62 | jpeg_idct_1x1 @ 61 ; 63 | jpeg_idct_2x2 @ 62 ; 64 | jpeg_idct_4x4 @ 63 ; 65 | jpeg_idct_float @ 64 ; 66 | jpeg_idct_ifast @ 65 ; 67 | jpeg_idct_islow @ 66 ; 68 | jpeg_input_complete @ 67 ; 69 | jpeg_make_c_derived_tbl @ 68 ; 70 | jpeg_make_d_derived_tbl @ 69 ; 71 | jpeg_mem_available @ 70 ; 72 | jpeg_mem_init @ 71 ; 73 | jpeg_mem_term @ 72 ; 74 | jpeg_new_colormap @ 73 ; 75 | jpeg_open_backing_store @ 74 ; 76 | jpeg_quality_scaling @ 75 ; 77 | jpeg_read_coefficients @ 76 ; 78 | jpeg_read_header @ 77 ; 79 | jpeg_read_raw_data @ 78 ; 80 | jpeg_read_scanlines @ 79 ; 81 | jpeg_resync_to_restart @ 80 ; 82 | jpeg_save_markers @ 81 ; 83 | jpeg_set_colorspace @ 82 ; 84 | jpeg_set_defaults @ 83 ; 85 | jpeg_set_linear_quality @ 84 ; 86 | jpeg_set_marker_processor @ 85 ; 87 | jpeg_set_quality @ 86 ; 88 | jpeg_simple_progression @ 87 ; 89 | jpeg_start_compress @ 88 ; 90 | jpeg_start_decompress @ 89 ; 91 | jpeg_start_output @ 90 ; 92 | jpeg_std_error @ 91 ; 93 | jpeg_stdio_dest @ 92 ; 94 | jpeg_stdio_src @ 93 ; 95 | jpeg_suppress_tables @ 94 ; 96 | jpeg_write_coefficients @ 95 ; 97 | jpeg_write_m_byte @ 96 ; 98 | jpeg_write_m_header @ 97 ; 99 | jpeg_write_marker @ 98 ; 100 | jpeg_write_raw_data @ 99 ; 101 | jpeg_write_scanlines @ 100 ; 102 | jpeg_write_tables @ 101 ; 103 | jround_up @ 102 ; 104 | jzero_far @ 103 ; 105 | -------------------------------------------------------------------------------- /jni/win/jpeg8.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | jcopy_block_row @ 1 ; 3 | jcopy_sample_rows @ 2 ; 4 | jdiv_round_up @ 3 ; 5 | jinit_1pass_quantizer @ 4 ; 6 | jinit_2pass_quantizer @ 5 ; 7 | jinit_c_coef_controller @ 6 ; 8 | jinit_c_main_controller @ 7 ; 9 | jinit_c_master_control @ 8 ; 10 | jinit_c_prep_controller @ 9 ; 11 | jinit_color_converter @ 10 ; 12 | jinit_color_deconverter @ 11 ; 13 | jinit_compress_master @ 12 ; 14 | jinit_d_coef_controller @ 13 ; 15 | jinit_d_main_controller @ 14 ; 16 | jinit_d_post_controller @ 15 ; 17 | jinit_downsampler @ 16 ; 18 | jinit_forward_dct @ 17 ; 19 | jinit_huff_decoder @ 18 ; 20 | jinit_huff_encoder @ 19 ; 21 | jinit_input_controller @ 20 ; 22 | jinit_inverse_dct @ 21 ; 23 | jinit_marker_reader @ 22 ; 24 | jinit_marker_writer @ 23 ; 25 | jinit_master_decompress @ 24 ; 26 | jinit_memory_mgr @ 25 ; 27 | jinit_merged_upsampler @ 26 ; 28 | jinit_phuff_decoder @ 27 ; 29 | jinit_phuff_encoder @ 28 ; 30 | jinit_upsampler @ 29 ; 31 | jpeg_CreateCompress @ 30 ; 32 | jpeg_CreateDecompress @ 31 ; 33 | jpeg_abort @ 32 ; 34 | jpeg_abort_compress @ 33 ; 35 | jpeg_abort_decompress @ 34 ; 36 | jpeg_add_quant_table @ 35 ; 37 | jpeg_alloc_huff_table @ 36 ; 38 | jpeg_alloc_quant_table @ 37 ; 39 | jpeg_calc_jpeg_dimensions @ 38 ; 40 | jpeg_calc_output_dimensions @ 39 ; 41 | jpeg_consume_input @ 40 ; 42 | jpeg_copy_critical_parameters @ 41 ; 43 | jpeg_core_output_dimensions @ 42 ; 44 | jpeg_default_colorspace @ 43 ; 45 | jpeg_default_qtables @ 44 ; 46 | jpeg_destroy @ 45 ; 47 | jpeg_destroy_compress @ 46 ; 48 | jpeg_destroy_decompress @ 47 ; 49 | jpeg_fdct_float @ 48 ; 50 | jpeg_fdct_ifast @ 49 ; 51 | jpeg_fdct_islow @ 50 ; 52 | jpeg_fill_bit_buffer @ 51 ; 53 | jpeg_finish_compress @ 52 ; 54 | jpeg_finish_decompress @ 53 ; 55 | jpeg_finish_output @ 54 ; 56 | jpeg_free_large @ 55 ; 57 | jpeg_free_small @ 56 ; 58 | jpeg_gen_optimal_table @ 57 ; 59 | jpeg_get_large @ 58 ; 60 | jpeg_get_small @ 59 ; 61 | jpeg_has_multiple_scans @ 60 ; 62 | jpeg_huff_decode @ 61 ; 63 | jpeg_idct_1x1 @ 62 ; 64 | jpeg_idct_2x2 @ 63 ; 65 | jpeg_idct_4x4 @ 64 ; 66 | jpeg_idct_float @ 65 ; 67 | jpeg_idct_ifast @ 66 ; 68 | jpeg_idct_islow @ 67 ; 69 | jpeg_input_complete @ 68 ; 70 | jpeg_make_c_derived_tbl @ 69 ; 71 | jpeg_make_d_derived_tbl @ 70 ; 72 | jpeg_mem_available @ 71 ; 73 | jpeg_mem_dest @ 72 ; 74 | jpeg_mem_init @ 73 ; 75 | jpeg_mem_src @ 74 ; 76 | jpeg_mem_term @ 75 ; 77 | jpeg_new_colormap @ 76 ; 78 | jpeg_open_backing_store @ 77 ; 79 | jpeg_quality_scaling @ 78 ; 80 | jpeg_read_coefficients @ 79 ; 81 | jpeg_read_header @ 80 ; 82 | jpeg_read_raw_data @ 81 ; 83 | jpeg_read_scanlines @ 82 ; 84 | jpeg_resync_to_restart @ 83 ; 85 | jpeg_save_markers @ 84 ; 86 | jpeg_set_colorspace @ 85 ; 87 | jpeg_set_defaults @ 86 ; 88 | jpeg_set_linear_quality @ 87 ; 89 | jpeg_set_marker_processor @ 88 ; 90 | jpeg_set_quality @ 89 ; 91 | jpeg_simple_progression @ 90 ; 92 | jpeg_start_compress @ 91 ; 93 | jpeg_start_decompress @ 92 ; 94 | jpeg_start_output @ 93 ; 95 | jpeg_std_error @ 94 ; 96 | jpeg_stdio_dest @ 95 ; 97 | jpeg_stdio_src @ 96 ; 98 | jpeg_suppress_tables @ 97 ; 99 | jpeg_write_coefficients @ 98 ; 100 | jpeg_write_m_byte @ 99 ; 101 | jpeg_write_m_header @ 100 ; 102 | jpeg_write_marker @ 101 ; 103 | jpeg_write_raw_data @ 102 ; 104 | jpeg_write_scanlines @ 103 ; 105 | jpeg_write_tables @ 104 ; 106 | jround_up @ 105 ; 107 | jzero_far @ 106 ; 108 | -------------------------------------------------------------------------------- /jni/win/jsimdcfg.inc: -------------------------------------------------------------------------------- 1 | ; 2 | ; Automatically generated include file from jsimdcfg.inc.h 3 | ; 4 | ; 5 | ; -- jpeglib.h 6 | ; 7 | %define DCTSIZE 8 8 | %define DCTSIZE2 64 9 | ; 10 | ; -- jmorecfg.h 11 | ; 12 | %define RGB_RED 0 13 | %define RGB_GREEN 1 14 | %define RGB_BLUE 2 15 | %define RGB_PIXELSIZE 3 16 | %define EXT_RGB_RED 0 17 | %define EXT_RGB_GREEN 1 18 | %define EXT_RGB_BLUE 2 19 | %define EXT_RGB_PIXELSIZE 3 20 | %define EXT_RGBX_RED 0 21 | %define EXT_RGBX_GREEN 1 22 | %define EXT_RGBX_BLUE 2 23 | %define EXT_RGBX_PIXELSIZE 4 24 | %define EXT_BGR_RED 2 25 | %define EXT_BGR_GREEN 1 26 | %define EXT_BGR_BLUE 0 27 | %define EXT_BGR_PIXELSIZE 3 28 | %define EXT_BGRX_RED 2 29 | %define EXT_BGRX_GREEN 1 30 | %define EXT_BGRX_BLUE 0 31 | %define EXT_BGRX_PIXELSIZE 4 32 | %define EXT_XBGR_RED 3 33 | %define EXT_XBGR_GREEN 2 34 | %define EXT_XBGR_BLUE 1 35 | %define EXT_XBGR_PIXELSIZE 4 36 | %define EXT_XRGB_RED 1 37 | %define EXT_XRGB_GREEN 2 38 | %define EXT_XRGB_BLUE 3 39 | %define EXT_XRGB_PIXELSIZE 4 40 | %define RGBX_FILLER_0XFF 1 41 | ; Representation of a single sample (pixel element value). 42 | ; On this SIMD implementation, this must be 'unsigned char'. 43 | ; 44 | %define JSAMPLE byte ; unsigned char 45 | %define SIZEOF_JSAMPLE SIZEOF_BYTE ; sizeof(JSAMPLE) 46 | %define CENTERJSAMPLE 128 47 | ; Representation of a DCT frequency coefficient. 48 | ; On this SIMD implementation, this must be 'short'. 49 | ; 50 | %define JCOEF word ; short 51 | %define SIZEOF_JCOEF SIZEOF_WORD ; sizeof(JCOEF) 52 | ; Datatype used for image dimensions. 53 | ; On this SIMD implementation, this must be 'unsigned int'. 54 | ; 55 | %define JDIMENSION dword ; unsigned int 56 | %define SIZEOF_JDIMENSION SIZEOF_DWORD ; sizeof(JDIMENSION) 57 | %define JSAMPROW POINTER ; JSAMPLE * (jpeglib.h) 58 | %define JSAMPARRAY POINTER ; JSAMPROW * (jpeglib.h) 59 | %define JSAMPIMAGE POINTER ; JSAMPARRAY * (jpeglib.h) 60 | %define JCOEFPTR POINTER ; JCOEF * (jpeglib.h) 61 | %define SIZEOF_JSAMPROW SIZEOF_POINTER ; sizeof(JSAMPROW) 62 | %define SIZEOF_JSAMPARRAY SIZEOF_POINTER ; sizeof(JSAMPARRAY) 63 | %define SIZEOF_JSAMPIMAGE SIZEOF_POINTER ; sizeof(JSAMPIMAGE) 64 | %define SIZEOF_JCOEFPTR SIZEOF_POINTER ; sizeof(JCOEFPTR) 65 | ; 66 | ; -- jdct.h 67 | ; 68 | ; A forward DCT routine is given a pointer to a work area of type DCTELEM[]; 69 | ; the DCT is to be performed in-place in that buffer. 70 | ; To maximize parallelism, Type DCTELEM is changed to short (originally, int). 71 | ; 72 | %define DCTELEM word ; short 73 | %define SIZEOF_DCTELEM SIZEOF_WORD ; sizeof(DCTELEM) 74 | %define float FP32 ; float 75 | %define SIZEOF_FAST_FLOAT SIZEOF_FP32 ; sizeof(float) 76 | ; To maximize parallelism, Type short is changed to short. 77 | ; 78 | %define ISLOW_MULT_TYPE word ; must be short 79 | %define SIZEOF_ISLOW_MULT_TYPE SIZEOF_WORD ; sizeof(ISLOW_MULT_TYPE) 80 | %define IFAST_MULT_TYPE word ; must be short 81 | %define SIZEOF_IFAST_MULT_TYPE SIZEOF_WORD ; sizeof(IFAST_MULT_TYPE) 82 | %define IFAST_SCALE_BITS 2 ; fractional bits in scale factors 83 | %define FLOAT_MULT_TYPE FP32 ; must be float 84 | %define SIZEOF_FLOAT_MULT_TYPE SIZEOF_FP32 ; sizeof(FLOAT_MULT_TYPE) 85 | ; 86 | ; -- jsimd.h 87 | ; 88 | %define JSIMD_NONE 0x00 89 | %define JSIMD_MMX 0x01 90 | %define JSIMD_3DNOW 0x02 91 | %define JSIMD_SSE 0x04 92 | %define JSIMD_SSE2 0x08 93 | ; Short forms of external names for systems with brain-damaged linkers. 94 | ; 95 | -------------------------------------------------------------------------------- /libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/libs/android-support-v4.jar -------------------------------------------------------------------------------- /libs/androidcommonutils.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/libs/androidcommonutils.jar -------------------------------------------------------------------------------- /libs/armeabi-v7a/liba1w0n.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/libs/armeabi-v7a/liba1w0n.so -------------------------------------------------------------------------------- /proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-19 15 | -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/bg_float_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/res/drawable-mdpi/bg_float_big.png -------------------------------------------------------------------------------- /res/drawable-mdpi/float_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/res/drawable-mdpi/float_bg.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/resize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/res/drawable-mdpi/resize.png -------------------------------------------------------------------------------- /res/drawable-mdpi/text_highlight_bg_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/res/drawable-mdpi/text_highlight_bg_normal.9.png -------------------------------------------------------------------------------- /res/drawable-mdpi/text_highlight_bg_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/res/drawable-mdpi/text_highlight_bg_pressed.9.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/aa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/res/drawable-xhdpi/aa.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faip520/AndroidFramebufferScreenshot/8e4b75a23e041b4fa25cd1cf0bc661e131782885/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable/common_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | -------------------------------------------------------------------------------- /res/layout/activity_second.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | -------------------------------------------------------------------------------- /res/layout/edittext.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /res/layout/fragment_main.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /res/layout/fragment_second.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 11 | 12 | 19 | 20 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 64dp 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #66000000 4 | #ffc6f9e5 5 | #ffb6e9b5 6 | #ffa6d9b5 7 | #ff96c9b5 8 | #ff86b9b5 9 | #ff76a9b5 10 | 11 | -------------------------------------------------------------------------------- /res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 16dp 6 | 7 | 8 | -------------------------------------------------------------------------------- /res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | A1w0nTest 5 | MainActivity 6 | Dummy Button 7 | DUMMY\nCONTENT 8 | Hello world! 9 | Settings 10 | SecondActivity 11 | 12 | 13 | -------------------------------------------------------------------------------- /res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 15 | 16 | 17 | 20 | 21 | 27 | 28 | 35 | 36 |