local contrast (local laplacian) display bug when changing image
In darkroom, with the local contrast tool (new default mode: local laplacian), when switching from an image to another, I get a strange display bug: it seems darktable computes a mask for an image, and re-uses the mask when displaying the next image.
See example attached. Screenshots done with two images (image 1 and image 2), switching back and forth between the images.
The display bug disappears as soon as I move or zoom the image (i.e. when a new computation is triggered).
Thanks in advance,
#2 Updated by Matthieu Moy about 1 month ago
I found the guilty code:
If I replace the
if (... < 0.9) by
if (... < 0.0) (always false), then the issue disappears. What happens is that the full pipeline steals data from the preview pipeline, and apparently it steals it from the previously computed image.
According to gdb, the visual bug happens when
hash is 0, i.e. when the
if (hash != 0 && dt_dev_sync...) condition is false because of the left hand side of the
&&. Then, the pipeline sync is not done, but the stealing from the preview pipeline still happens (
I don't fully understand the logic here, but I'll try a naive fix (at least it should be simpler for a core dev to finish debugging/fixing with this initial attempt).