Re: [Libjpeg-turbo-users] Thread safety once again
SIMD-accelerated libjpeg-compatible JPEG codec library
Brought to you by:
dcommander
From: DRC <dco...@us...> - 2014-12-24 21:46:03
|
Yes, I can confirm that the API version has nothing to do with thread safety and that libjpeg-turbo is, in all cases, as thread-safe as libjpeg. But you can also build libjpeg-turbo with the v8 API, so it would satisfy the bogus ImageMagick JPEG_LIB_VERSION check in that case-- this could be a workaround until ImageMagick fixes their code. > On Dec 24, 2014, at 2:34 PM, Marcin Owsiany <ma...@ow...> wrote: > > Hello, > > TL;DR: > is libjpeg-turbo's thread safety on the same level as that of libjpeg 8? > > More detailed question: > > I managed to convince imagemagick's authors to allow concurrent loading of JPEG images using libjpeg > (http://www.imagemagick.org/discourse-server/viewtopic.php?f=2&t=25495) > However when asking libjpeg's authors for confirmation of their code thread-safety I think I was being a bit too specific regarding versions, which caused imagemagick's authors to insert a rather specific check for JPEG_LIB_VERSION -- whether it is at least 80. It happens that libjpeg-turbo exports JPEG_LIB_VERSION=62, which does not satisfy that check, so I again cannot load images in parallel on debian jessie, which has imagemagick built against libjpeg62-turbo. > > Now, I did read the thread from 2011 (http://sourceforge.net/p/libjpeg-turbo/mailman/message/28603968/) in which DRC said: > >> I'm not aware of anything we are doing differently than libjpeg vis-a-vis error handling. I'm not sure why libjpeg would be unsafe in that regard as long as you are using a separate JPEG compress/decompress structure for every thread. I will double check it, though. > > However I'm not sure which libjpeg version that referred to. Can you confirm that any libjpeg-turbo's version (i.e. #if defined(LIBJPEG_TURBO_VERSION)) is no less thread-safe than libjpeg "80"? > > regards, > -- > Marcin Owsiany <ma...@ow...> http://marcin.owsiany.pl/ > GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216 > > "Every program in development at MIT expands until it can read mail." > -- Unknown > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Libjpeg-turbo-users mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libjpeg-turbo-users |