Is this a 3.2 Darktable bug?

I have recently upgraded from 3.1 to 3.2.

I have found a strange behaviour with one of my images.
This is the image cut from the screen:
image

It is processed using the new pipe and filmic and I have applied some color balance modules (tree copies: one to give some light to the child, one for color transformation the green/blue tone division preset and one to produce the vignette effect).

In the display all seems OK.

But when I export the image to jpeg in sRGB I get this result:

It seems that there is some clipping int the high lights.
I have tried in tiff and other formats with the same results.

If I disable the color balance modules, I get a correct image:

Is it a bug in the export feature or the color balance module?

I’ve occasionally seen something similar in my lighttable thumbnails but not attempted to track down the cause yet.

Never seen that !

Neither me, till now with this version and this photo.

In 3.1 there were some attempts to reduce the size of the preview image. It seems the vignette mask was calculated on an older code base an now doesn’t properly scale to the whole image.
That can happen when using development versions.

Thank you for your answer.

But I am not using development versions at all.

I was previously using the official version of darktable, from the official web page, and I have recently upgraded to 3.2.1.
(I am using windows by the way).

The photo was imported when the 3.2.1 version was already installed.

There is no issue with the photo in the screen, neither in the lightable nor the darkroom.
It displays correctly.

The problem comes when I export the photo to jpeg, jpeg 2000 or tiff.
In the exported version there are these kind of artifacts.
Other photos do not have this problem (and I am using similar color balance adjustments).

What modules are used on this picture ? Try deactivating on by one. Also may be an Intel OpenCL issue (again!) so if activated please deactivate it and retest.

As I have explained, the issue is produced when I activate the colour balance module.
I have used it three time to produce different effects.

In the screen everything is OK, but not when exported.

If I deactivate the color balance module and export the image, everything is OK.

It is not an Intel OpenCL issue, as long as I know the 3.2.1 official version does not use hardware acceleration in intel HD boards as they are still blacklisted.
I have no harware acceleration option in the settings.

In other pictures with similar adjustements and use of the color balance module there is no issue.

I suspect the problem is not the color balance module itshelf, but some bug or effect that only appears in pictures that have some channel burned or close to it.
The strange thing about it is that it only appears during export.

I can do some test or provide more info if required.

@ariznaf: Indeed I had read that you’ve been using Color Balance and forgot now :slight_smile: Is that for some specific settings done in color balance ?

Well, in your first post you mention:

Iirc, 3.1.0 is a development version, so potentially with errors…

Also, you use the colour balance moduel three times, did you try deactivating the three copies one by one to pinpoint the problem?

Sorry, it was a mistake on my part. I had previously 3.0 version installed.

I will try to do more tests in an organized way.

Well It seems that the problem is with one of the color balance modules I use.

It creates a vignette, darkening midtones, lights and shadows.

It applies an elliptical mask and uses a parametric luminosity mask in order to preserve the extreme lights and shadows.

If disabled the module, the photo is exported OK.

If I disable the masks of these module, the export is correct too.

The problem seems to be with the parametric mask, when this is enabled the export is not correct.

If I deactivate the ellipse mask and leave only the parametric mask, I can see artifacts en the screen too:
image

But if I activate parametric and ellipse mask, in the screen it looks OK, but not in the export.

I provide the raw file and the xmp.

If somebody can do tests with the image it would be greatly wellcome.

IMG_8110.CR2.xmp (39.4 KB) IMG_8110.CR2 (28.6 MB)

It seems a bug with the creation of the parametric mask in this particular image.

1 Like

This is so strange. I can reproduce there sorts of artifacts on some of my own photos, with just exposure, one colour balance instance and filmic. I set a parametic mask on the colour balance, with blend mode 80% or so (can’t reproduce with 100% opacity), move the triables on top of the input sliders towards the middle a bit, lower the mask contrast, then fiddle with the feathering slider, the artifacts come and go as I move the feathering slider. If I turn off filmic, I can’t seem to get the artifacts to appear, nor if the blend mode opacity is at 100%. It’s quite bizarre, there’s something interesting going on there…

I created an official ticket for this issue:
https://github.com/darktable-org/darktable/issues/6315

1 Like

It seems color balance creates NaN in your settings, because you use a negative offset in 2 instances. Then, the power doesn’t return something valid, because y^a = \oslash, \forall \{ x > 0, a < 1 \}.

If you set either the powers or the offsets to 0, it seems to make the weird pixels disappear.

Then, filmic makes it worse because the highlights reconstruction fetches these pixel and propagate the NaN around.

What I don’t understand is the power, in color balance, clips negatives, so this should not happen.

1 Like

this is clearly related to the demosaic module!

I played with the ‘VNG4’ demosaic method and this method fails on some of the pictures, resetting demosaic solves this immediately.

And I certainly cannot confirm that.

Also changing the blending mode from normal to normal bounded “fix” the issue. So this seems to indicates that indeed some pixels are going crazy :slight_smile:

In my case I am not using VNG4, but PPG to do the demosaicing.

I don’t understand well the answer of @anon41087856.
Do yo mean there are wrong settings in the parameters that I selected to develope the raw?
Or should the system take negative values into account and avoid them?

Is it wrong to use negative values to adjust black level in exposure modules?
If it is, the system should not let you introduce them.
I use that to adjust the black in a picture which blacks were to high.
May be it can be done in filmic too, but I understood that you should adjust exposition an gray level prior to filmic, in exposure and not in filmic.

I will let experts and developers to analyze the problem and if there is some bug, as I don’t understand well how the image is processed.

What is very strange for me is that most of the time you can see correctly the image in the screen, and the problem only appears in export.
The calculations and process are supposed to be the same for both

Let me know if I can help in some way.

It seems you can always seen them on screen when changing the zoom level.

1 Like