Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.81k stars 317 forks source link

Bugfix and Enhancement for Clut #2567

Closed Beep6581 closed 9 years ago

Beep6581 commented 9 years ago

Originally reported on Google Code with ID 2584

In http://rawtherapee.com/forum/posting.php?mode=reply&f=3&t=5746#pr39814
Flössie posted a patch to fix a bug in clut handling, which also increases size of
clut cache from 1 to 8. Thanks a lot for the patch, Flössie :-)

I'll make some changes to this patch to allow the user to set the size of clut cache
in preferences and post a new patch soon.

Ingo

Reported by heckflosse@i-weyrich.de on 2014-11-20 13:14:20

Beep6581 commented 9 years ago
Here's the patch. Base of the patch is the work from Flössie. I added following things:

clut cache size defaults to number of cores for machines with x86/64 architecture and
omp rt builds.
For non x86/64 and non omp builds it defaults to 1.
In any case the clut cache size can be increased in preferences up to 2x number of
cores for omp builds and up to 8 for non omp builds.
Additional clearCache() (which was called in past as soon as you clicked on a thumb
of an image which didn't use a clut) now is only called when the cache size is 1 in
preferences (or per default).

Ingo

Reported by heckflosse@i-weyrich.de on 2014-11-20 17:24:07


Beep6581 commented 9 years ago
unpatched: I selected all raws in test_images except for the first one, and from the
File Browser enabled clut and selected "Negative", then I clicked on the first thumb
(the one I didnt select). No crash, but its hanging:
(gdb) bt
#0  0x00007f9c358ceaf4 in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x00007f9c358ca474 in _L_lock_571 () from /lib64/libpthread.so.0
#2  0x00007f9c358ca2d6 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x0000000000749dd5 in Thumbnail::setProcParams(rtengine::procparams::ProcParams
const&, ParamsEdited*, int, bool) ()
#4  0x000000000050126b in BatchToolPanelCoordinator::panelChanged(rtengine::ProcEvent,
Glib::ustring const&) ()
#5  0x00000000007d8857 in FilmSimulation::onClutSelected() ()
#6  0x00007f9c3acffb38 in Glib::SignalProxyNormal::slot0_void_callback(_GObject*, void*)
() from /usr/lib64/libglibmm-2.4.so.1 
(...)                                                                             

No crash and no hang in patched, very fast... almost too fast for me to click a different
thumb while its rendering them, but I did manage to, and no crash.

Reported by entertheyoni on 2014-11-20 23:37:27

Beep6581 commented 9 years ago
Committed to revision ccb35980ac7f

Reported by heckflosse@i-weyrich.de on 2014-11-22 00:21:16

Beep6581 commented 9 years ago
Issue 2558 has been merged into this issue.

Reported by heckflosse@i-weyrich.de on 2014-11-22 23:15:41

Beep6581 commented 9 years ago

Reported by heckflosse@i-weyrich.de on 2014-11-25 12:58:40