Questions tagged [libjpeg-turbo]

libjpeg-turbo is a fork of libjpeg that uses SIMD instructions to accelerate baseline JPEG encoding and decoding.

Home page on SourceForge

libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64, and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as fast as the unmodified version of libjpeg, all else being equal.

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.

libjpeg-turbo generally achieves 80-120% of the performance of TurboJPEG/IPP. It is faster in some areas but slower in others.

104 questions
4
votes
1 answer

DownScaling Images when decoding with libPng

libjpeg-turbo, supports the ability to downscale an image whilst decoding as long as appropriate values are provided for scale numerator and denominator. So, if used within an app, an appropriate request can be made to deal with the fact that we may…
greysqrl
  • 937
  • 3
  • 13
  • 31
4
votes
1 answer

libjpeg-turbo - whats the difference between libturbojpeg.a and libjpeg.a

My intent is to use libjpeg-turbo ( see http://www.libjpeg-turbo.org/Main/HomePage ) as a drop in replacement for the common libjpeg (version 6) from Independent Jpeg Group (http://www.ijg.org/). My development platform is Linux on X_86 , 64 bit I…
Yogesh Devi
  • 617
  • 11
  • 30
4
votes
1 answer

How to compress a YUYV image into a jpeg

(Cross posted to libjpeg-turbo-users list.) I'm having a problem with libjpeg-turbo. The tjCompress2 function requires an RGB or Greyscale image to…
fadedbee
  • 42,671
  • 44
  • 178
  • 308
4
votes
2 answers

Strange results while compressing batch of pictures with libjpegturbo

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…
user950117
  • 117
  • 4
  • 12
4
votes
1 answer

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

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)…
hello
  • 43
  • 1
  • 4
3
votes
3 answers

Missing piece between libjpeg-turbo & h264 ffmpeg C/C++

On the left side I have a buffer with decoded pixels that I can get in two formats: RGB interleaved/packed where bytes in buffer are R0G0B0R1G1B1.... or YUV444 interleaved/packed where bytes in buffer are Y0U0V0Y1U1V1... (JCS_RGB or JCS_YCbCr in…
Nelstaar
  • 769
  • 9
  • 26
3
votes
1 answer

Use libexif with libjpeg to set exif tags on an existing JPEG

In my C program I would like to use libexif along with libjpeg to set exif tags on an existing jpeg file present at a given path inputFilePath, and save the resulting jpeg to output path outputFilePath. The input jpeg file is large (40000 X 40000…
AmaltasCoder
  • 1,123
  • 3
  • 17
  • 35
3
votes
3 answers

How to release buffer created by libjpeg?

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; …
Nexus2020
  • 538
  • 6
  • 18
3
votes
0 answers

Passing jpeg_write_scanlines manual lines

I'm having some weird issues using libjpeg-turbo, in particular I have a 1920x1080 rgba buffer that I'm reading via mmap (so it's read only) that I'm trying to encode as a jpeg, but I'd only like to encode the top left corner of say, 320x568 pixels…
Thomas Liu
  • 31
  • 2
3
votes
0 answers

How to use mozjpeg library/executables on Android?

I know, probably the best is to go ahead and try to build it by using NDK, but I never used NDK before, so it's going to be hard. Therefore, I think it's better to ask first. Maybe someone already tried building/running mozjpeg on Android? Is it…
Display Name
  • 8,022
  • 3
  • 31
  • 66
3
votes
1 answer

How to display a JPEG on ANativeWindow?

I am trying to show a JPEG to a ANativeWindow with the Android NDK. I am getting the ANativeWindow* by doing: _window = ANativeWindow_fromSurface(env, surface) I am loading the jpeg, with libjpeg-turbo, by doing: if (tjDecompressHeader2(tj, jpeg,…
François
  • 123
  • 1
  • 10
3
votes
1 answer

How to get java wrapper for libjpeg-turbo to actually compress?

I'm having trouble getting libjpeg-turbo in my java project to actually compress an image. It writes a .jpg fine - but the final size of the result is always e.g. almost the same as a 24bit windows .bmp of the same image. A 480x854 image turns…
jdowdell
  • 1,578
  • 12
  • 24
3
votes
3 answers

libjpeg with image_optim gem on Heroku Cedar Stack (Ruby buildpack)

I'm trying to get the image_optim gem to work with a Rails 4 app on Heroku's Cedar stack to optimize png/gif/jpeg images. I threw the required binaries (advpng, gifsicle, jpegoptim, jpegtran, optipng, pngcrush, pngout) into /bin and set ENV['PATH']…
sausman
  • 253
  • 1
  • 8
3
votes
1 answer

jpeg lossless transformations - memory consumption?

i have just downloaded the latest win32 jpegtran.exe from http://jpegclub.org/jpegtran/ and observed the following: i have prepared a 24 BPP jpeg test image with 14500 x 10000 pixels. compressed size in file system is around 7.5 MB. decompressing…
Opmet
  • 1,754
  • 18
  • 20
3
votes
0 answers

Why do we need to call jpeg_write_marker() and jpeg_write_header() after jpeg_start_compress() ? [libjpeg]

From my understanding, libjpeg is a library used to compress the image data. I should be able to write the marker metadata without calling jpeg_start_compress() function. I have 2 questions: Why doesn't libjpeg allow that? If I have a source jpeg…
ext.dev
  • 121
  • 6