A tone equalizer in darktable ?

I build on GCC9 with no issue.

It’s either the OpenMP #pragma omp declare simd or the __attribute__((target_clones())) decorators that fails on Win.

or just replace

#if __has_attribute(target_clones)
#define __DT_CLONE_TARGETS__ __attribute__((target_clones("default", "sse2", "sse3", "sse4.1", "sse4.2", "popcnt", "avx", "avx2", "avx512f", "fma4")))
#else
#define __DT_CLONE_TARGETS__
#endif

by

#define __DT_CLONE_TARGETS__

in darktable.h, line 99.

with this replacement tonequalizer compiles on win10/mingw

Yes, confirmed.
However, when activating the module I get the message: “tone equalizer buffers are ill-aligned, please report the bug to the developers”

Marco

I have added an extra check in the latest commit so the target clones are disabled if Win32 is detected. It’s a shame for Windows users though, because they won’t get the best optimization for their CPU, but… they choose the wrong OS, they should live with it.

The non-alignment of buffers is more concerning though. I have to track which buffer allocation does not align properly.

Aurelien, Thanks for all your work on this module and your explanations thus far. I have built and installed it and I am planning to test it out tonight. I had two quick questions and forgive my ignorance on any of the points but #1 when I complied your toneequalizer branch it noted that you are a good number of commits ahead of the master branch but the version shows as 2.5 and not 2.7 or higher. Does using this with any files the have been edited on a 2.7 dev build create any issues with previous edits…of course i will back things up before trying but just curious and secondly other than this post are there any other examples or documentation that you have created or are aware of for the use of this module. I will just have a go at it but if my testing could be more informed that would be gravy…thanks again.

#1 when I complied your toneequalizer branch it noted that you are a good number of commits ahead of the master branch but the version shows as 2.5 and not 2.7 or highe

The 2.5 tag is purely a git stuff, I never updated the tags. It means nothing for the actual program.

Does using this with any files the have been edited on a 2.7 dev build create any issues with previous edits…of course i will back things up before trying but just curious

It should not create issues per se, apart from the usual “this is still unstable stuff until proved stable” I guess.

secondly other than this post are there any other examples or documentation that you have created or are aware of for the use of this module.

Not yet.

Thanks for clarifying…

Module merged in darktable master today.

12 Likes

Superb! Merci!

Claes en Lund, La Suède

Excellent! I am happy to test it!

Excellent … I have been so looking forward to this!

Congratulations, great work. Looking forward to try it once Pascal merges my fix :wink:

Compiles fine on Windows 10.
Testing it, it seems to work, but…
On pictures taken in bright sunlight, with quite high dynamic range (main histogram spread end to end), the tone equalizer histogram covers only a small portion of the luminosity range

Cattura3

which leaves very limited room for adjustments, only 2-3 sliders / points have an effect.
What’s going wrong ?

Marco

I’m getting the same issues with all my pictures that have an histogram stretch from left to right in the main darktable histogram while the histogram in tone equalizer is compressed on the right side with only 3-4 sliders effective.

I will post a screenshot tomorrow when I have access to my Mac.

Nothing is going wrong. The guided filter is applied iteratively 2 or 3 times on top of itself, depending on the preset you choose. Depending of the feathering factor used, the guided filter tends to average the luminance piece-wise, thus compress the histogram around the average luminance of your picture.

Screenshot_20190924_110347

To compensate for that, in the masking tab, you can use the mask exposure and contrast compensation. The exposure compensation will slide the histogram to the left or right, and the contrast will dilate/compress it around -4 EV. To help you setting them, you get a bar representing the histogram spreading just above those settings. The bright bar represent the coverage of the first and last deciles of the histogram, so you get 80 % of the histogram in it. Orange highlights appear when a part of the histogram is outside the tone equalizer settings range.

You get auto-tuners to help you, but they work well only when mask quantization is set to 0.

2 Likes

1h45 of explainations about how to use filmic RGB and the new equalizer in a no-nonsense workflow. Also, my first video in English.

27 Likes

Thanks for all your efforts(and time)! :slight_smile:

Great English skills, Aurélien!

Merci, Aurélien!
I am only recently starting to play with the filmic module and look forward to watching your video.
Thank you for all the time and effort you contribute to darktable.

Actually, I’d like to thank all the developers of darktable, both past and future.

1 Like