Boost logo

Boost :

Subject: Re: [boost] gil::io "non-review" (was: [gil] Can not open test.jpg)
From: Christian Henning (chhenning_at_[hidden])
Date: 2010-03-24 16:13:31


Hi there,

>> 1. setjmp() in each function (scope?) that calls into libjpeg.  That's
>> nasty because setjmp(), IIRC, is detected by the compiler and prevents
>> some optimisations.  It's relatively non-intrusive in your code though.
>
> I can't believe performance is a serious concern here.  I think this is
> the best option.  There's still the thread-safety issue.  Can you use
> the cinfo to pass the jmp_buf through to error_exit? If not then I guess
> the jmp_buf could be stored in static thread-local storage...

I have updated and uploaded the code. If someone could have a look I
would really appreciate it.

http://gil-contributions.googlecode.com/svn/trunk/gil_2/boost/gil/extension/io_new/formats/jpeg/read.hpp
http://gil-contributions.googlecode.com/svn/trunk/gil_2/boost/gil/extension/io_new/formats/jpeg/write.hpp

Am I correct to mark up the write operations with setjmp's, as well?

Does someone has an idea how to deal with multi-threaded scenarios?

Regards,
Christian


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk