libjpeg-turbo

What share of Android devices benefits from Libjpeg-turbo optimisations?

。_饼干妹妹 提交于 2019-12-22 04:06:33
问题 The libjpeg-turbo project "uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64, and ARM systems". What sort of share of the Android device space supports these instructions and hence would get a speed benefit from using this library? (I will be decompressing jpegs in native code accessed via NDK.) 回答1: The vast majority of Android devices in the market use some flavor of ARM CPU. High end phones (e.g. HTC Sensation) tend to use ARM

Examples or tutorials of using libjpeg-turbo's TurboJPEG

江枫思渺然 提交于 2019-12-17 21:53:48
问题 The instructions for libjpeg-turbo here describes the TurboJPEG API thus: "This API wraps libjpeg-turbo and provides an easy-to-use interface for compressing and decompressing JPEG images in memory". Great, but are there some solid examples of using this API available? Just looking to decompress a fairly vanilla jpeg in memory. I've found a few bits such as https://github.com/erlyvideo/jpeg/blob/master/c_src/jpeg.c, which appears to be using the TurboJPEG API, but are there any more solid

How to release buffer created by libjpeg?

妖精的绣舞 提交于 2019-12-12 12:57:04
问题 I am using libjpeg to transform image buffer from OpenCV Mat and write it to a memory location Here is the code: bool mat2jpeg(cv::Mat frame, unsigned char **outbuffer , long unsigned int *outlen) { unsigned char *outdata = frame.data; struct jpeg_compress_struct cinfo = { 0 }; struct jpeg_error_mgr jerr; JSAMPROW row_ptr[1]; int row_stride; *outbuffer = NULL; *outlen = 0; cinfo.err = jpeg_std_error(&jerr); jpeg_create_compress(&cinfo); jpeg_mem_dest(&cinfo, outbuffer, outlen); jpeg_set

Is there any easy way to edit jpeg marker data in-place?

拥有回忆 提交于 2019-12-12 04:48:09
问题 I am trying to edit jpeg marker data (eg: exif data) in APP0 section. I used libjpeg to decompress the source file to get exif data and uncompressed image data. I used libexif to modify exif data. Then I compressed the source image data and modified exif data to create a new jpeg file. Instead of doing decompressing and compressing again, I am wondering if there is any way to edit JPEG metadata without re-compressing the original image? (Looks like, I can call jpeg_write_header or jpeg_write

Android how to use libjpeg-turbo library through JNi example

Deadly 提交于 2019-12-09 07:04:54
问题 I successfully build libjpeg-turbo with ndk-build thanks to this post: libjpeg-turbo for android I would like to get a native function like read_JPEG_file in the example.c of libjpeg-turbo to call from the Java code to use it for Android app. Could someone give me an example how to do it? How to write a native method for Java which use libjpeg-turbo ndk built library? I can load library through System.loadLibrary("libjpeg"); But what next? The library doesn't have any native methods to call

Integration or build instructions for libjpeg-turbo on Android

陌路散爱 提交于 2019-12-06 02:38:17
问题 Various pages can be found on the internet mentioning libjpeg-turbo for Android (example). They all point at the repository here, and say to read ANDROID.txt for build instructions. There's no such text file in the repository though. Is this repository the official place to go to get libjpeg-turbo for Android? If so, where are the build/integration instructions? 回答1: I ported libjpeg-turbo for use in android a number of months back. You can find the code here: http://git.linaro.org/gitweb?p

What share of Android devices benefits from Libjpeg-turbo optimisations?

巧了我就是萌 提交于 2019-12-05 02:03:51
The libjpeg-turbo project "uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64, and ARM systems". What sort of share of the Android device space supports these instructions and hence would get a speed benefit from using this library? (I will be decompressing jpegs in native code accessed via NDK.) The vast majority of Android devices in the market use some flavor of ARM CPU. High end phones (e.g. HTC Sensation) tend to use ARM CPUs which support NEON (Qualcomm Snapdragon, OMAP4, Samsung Exynos, Tegra3). Older/less capable phones

Strange results while compressing batch of pictures with libjpegturbo

泪湿孤枕 提交于 2019-12-05 02:02:33
问题 First, what I (want to) do: compress and scale down an batch of pictures (jpg). Lets assume the original picture has this 1600w x 1200h dimensions. Now, i want to have one compressed copy of 1600x1200 and another 800x600 and 400x300. What I use: I'm using the libJpegTurob to achieve this. If the LibJpegTurob has some problem I try to use the android given methods. Already tried: First, I used the Java Wrapper ported from Tom Gall (https://github.com/jberkel/libjpeg-turbo). It went pretty fine

how can i use jpeg_mem_src, jpeg_mem_dest in libjpeg-turbo?

戏子无情 提交于 2019-12-04 14:58:16
libjpeg8 include are those two functions, but in libjpeg-turbo has the following: //jconfig.h #define JPEG_LIB_VERSION 62 ... //jpeglib.h #if JPEG_LIB_VERSION >= 80 /* Data source and destination managers: memory buffers. */ EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo, unsigned char ** outbuffer, unsigned long * outsize)); EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo, unsigned char * inbuffer, unsigned long insize)); #endif if i try to use "JPEG_LIB_VERSION 80" i'll get the following: error LNK2019: unresolved external symbol _jpeg_mem_src referenced in function ... so, how

Integration or build instructions for libjpeg-turbo on Android

妖精的绣舞 提交于 2019-12-04 06:20:43
Various pages can be found on the internet mentioning libjpeg-turbo for Android ( example ). They all point at the repository here , and say to read ANDROID.txt for build instructions. There's no such text file in the repository though. Is this repository the official place to go to get libjpeg-turbo for Android? If so, where are the build/integration instructions? I ported libjpeg-turbo for use in android a number of months back. You can find the code here: http://git.linaro.org/gitweb?p=people/tomgall/libjpeg-turbo/libjpeg-turbo.git;a=shortlog;h=refs/heads/android Android.txt is there etc.