Search found 9 matches

by porridge
2014-12-27T14:09:22-07:00
Forum: Developers
Topic: Loading JPEG images in parallel
Replies: 17
Views: 18003

Re: Loading JPEG images in parallel

I have confirmed that any version of libjpeg-turbo is as thread-safe as libjpeg8.

Given that, how would you feel about changing the following lines in coders/jpeg.c:

Code: Select all

#if JPEG_LIB_VERSION < 80
to something like the following?

Code: Select all

#if JPEG_LIB_VERSION < 80 && !defined(LIBJPEG_TURBO_VERSION)
by porridge
2014-12-16T14:44:36-07:00
Forum: Developers
Topic: Loading JPEG images in parallel
Replies: 17
Views: 18003

Re: Loading JPEG images in parallel

FTR, the reason there is no thread support on my system turned out to be... $ rgrep JPEG_LIB_VERSION /usr/include/ [...] /usr/include/x86_64-linux-gnu/jconfig.h:#define JPEG_LIB_VERSION 62 $ dpkg -S /usr/include/x86_64-linux-gnu/jconfig.h libjpeg62-turbo-dev:amd64: /usr/include/x86_64-linux-gnu/jcon...
by porridge
2014-12-14T00:40:48-07:00
Forum: Developers
Topic: Loading JPEG images in parallel
Replies: 17
Views: 18003

Re: Loading JPEG images in parallel

Thank you for the fast response, I'll keep digging.
by porridge
2014-12-13T14:49:03-07:00
Forum: Developers
Topic: Loading JPEG images in parallel
Replies: 17
Views: 18003

Re: Loading JPEG images in parallel

Hello again, I tried running my program against imagemagick library version 6.8.9.9-3 as distributed by Debian and unfortunately still at most one image decoding thead seems to be running at a time. I had a look at the source and I can see the ifdefs such as: #if JPEG_LIB_VERSION < 80 entry->thread_...
by porridge
2014-05-10T13:00:30-07:00
Forum: Developers
Topic: Loading JPEG images in parallel
Replies: 17
Views: 18003

Re: Loading JPEG images in parallel

Here's what I got from one of the libjpeg developers: Guido Vollbeding <guido@jpegclub.org> The parentheses suggest that lack of thread safety only applies to multiple threads working on the same JPEG object. I'd like to clarify if it is fine to have multiple concurrent threads using libjpeg8 if the...
by porridge
2014-05-06T11:37:50-07:00
Forum: Developers
Topic: Loading JPEG images in parallel
Replies: 17
Views: 18003

Re: Loading JPEG images in parallel

Hm, I had a look at that file in version 8d, and it says: [...] This is discussed further under "I/O suspension", above. (Note: the JPEG library currently is not thread-safe. You must not call jpeg_consume_input() from one thread of control if a different library routine is working on the same JPEG ...
by porridge
2014-05-04T12:06:52-07:00
Forum: Developers
Topic: Loading JPEG images in parallel
Replies: 17
Views: 18003

Re: Loading JPEG images in parallel

Could you please expand a bit on what makes the jpeg library thread-unsafe? I've found two threads about thread-safety of libjpeg-turbo (which seems to be what imagemagick is linked against at least on Ubuntu). The first[1] mentions usage of setjmp/longjmp and the other[2] the fact that tjGetErrorSt...
by porridge
2014-04-29T11:32:02-07:00
Forum: Developers
Topic: Loading JPEG images in parallel
Replies: 17
Views: 18003

Re: Loading JPEG images in parallel

Thanks, this answers the first two questions. Should I understand that there are no plans to change this, nor there are any ways around it?
by porridge
2014-04-28T11:53:25-07:00
Forum: Developers
Topic: Loading JPEG images in parallel
Replies: 17
Views: 18003

Loading JPEG images in parallel

Hello, Since I think this is more about internals than usage, I decided to post in this forum, hope it's OK. I'm using the gographics/imagick Go language binding for imagemagick in my program, whose main function is to load, resize and save a lot of JPEG files as fast as possible (in parallel). Afte...