Closed herbert-50 closed 5 years ago
That zip file is 400MB... could you possibly upload a single haldclut which exhibits this behavior to make it easier for others to try to reproduce? :-)
(Also, I think your listed darktable version is wrong. AFAIK rc1 doesn't exist yet.)
Reproduced this on Linux/i915 (already had the CLUTs in question downloaded) so at least doesn't seem to be AMD specific.
You are right about it being opencl related. I don't think it's related to a specific LUT. I saw this happen yesterday on a pana cine to rec lut where the main image looked very different from the one in preview.Turned off and restarted to restore it.
Turned off and restarted to restore it.
What do you mean? Just turn off lut3d module and enable it again?
Turned off and restarted to restore it.
What do you mean? Just turn off lut3d module and enable it again?
Turn off opencl.
Here is the Haltcut.png:
Yes - Version rc1 is wrong. Its rc0 (see also screenshot)!
Does that happen only with back & white clut or with color clut also ?
Also colorful ones, for me at least
I can reproduce the issue too, at least for some fuji black & white clut. I've noted that when I switch dt from full screen to resizable window, or when I switch darkroom from 100% to fit to screen, I get normal the right image (or something which looks right) half a second or a second before the wrong image is back (kind of glitch). Do you have this effect too ?
I only tried this quickly with one image (and the haldclut supplied by OP) and saw the difference between preview and main image immediately. After changing the 'application color space' values in the dropdown, it seems that the images are in sync with the two linear colorspaces, but changing to REC 709 or sRGB changes only the preview, not the main image... so it's probably related to a mismatch in working color spaces somewhere, I guess.
This wasn't happening with a clean profile for me, with its default setting of 'OpenCL scheduling profile' ('very fast GPU'), but it happens when I switch that setting to 'default' (what I use normally). @herbert-50 My graphics card is similar to yours, could you try changing that setting under 'core options' in preferences and see if it has any effect? This changes the way resources are used between the preview and main view.
I've tried the setting 'very fast GPU'. In this case the picture looks bad in the preview window too.
If I use the setting 'multiply GPUs' and shift the darktable window between my displays (they have different color-profiles, so darktable has to redraw the preview and the main view), the result differs. Sometime the main view looks good and sometimes the preview looks good and sometimes both.
If I use 'defaut' the preview looks good and the main window looks bad.
I think the result depends on the device, which darktable uses to calculate. If the CPU is used, because the GPU is looked, it's ok. But if the GPU is used, it's bad.
With 'darktable -d opencl' I can see, which device is used. If device 0 (GPU) is used for a window, the result is bad.
Perhaps the 3d lut code for the GPU is different from the CPU Code and has a bug!?
Perhaps the 3d lut code for the GPU is different from the CPU Code and has a bug!?
Yes, specifically the OpenCL code only seems to use the linear colorspaces, but never the gamma ones.
So... it looks like changing the working profile to a matching one in the input color profile module mitigates this. I don't know if that's the intended workflow or not (I've never touched the lut 3D module before today), but it's a workaround for now, at least.
EDIT: maybe it doesn't actually... the interraction with the working profile is more complicated than I thought... I give up. :-)
EDIT 2: Taking another look now, I think I was right the first time... and testing with a no-op identity haldclut doesn't show the issues, so I think the reason that some LUTs were showing more than others probably was a matter of how "strong" of an effect they had, since this effect was effectively being distorted by being applied in the wrong color space.
I've noted that when I switch dt from full screen to resizable window, or when I switch darkroom from 100% to fit to screen, I get normal the right image (or something which looks right) half a second or a second before the wrong image is back (kind of glitch). Do you have this effect too ?
@phweyland Yes, I see this too... so I guess the cache is being correctly generated in any case.
testing with a no-op identity haldclut doesn't show the issues
It seems to me that, in some cases, the switch from rec2020 (working profile) to lut profile doesn't happen. In those cases, the lut transform is done on rec2020.
Trying to compile dt backward to find the breaking point (on 20th October that was ok).
@aurelienpierre, Hi Aurélien, I think we need some help here. This issue occurs on commit b8e90ea while it is not present 2 commits before
These 2 commits seem to be important changes about opencl standards.
As far as I can understand the lut3d issue seems to be related to that the color space conversion is not always correct (instead of switching to sRGB or REC.709, the switch is done to lin sRGB/REC.709). lut3d uses the routine dt_ioppr_transform_image_colorspace_rgb_cl(). It seems not to return any error however.
Do you have any suggestion / explanation which could help solving that ? Thanks
@phweyland : PR #3316 fix this issue. Can you try and see if there is no other regression? thanks.
@TurboGit, I've fetch your PR (#3316). Everything seems ok and I haven't seen any other issue. Thanks
Yes - this works fine :1st_place_medal:
Thanks @all.
@aurelienpierre, Hi Aurélien, I think we need some help here. This issue occurs on commit b8e90ea while it is not present 2 commits before
These 2 commits seem to be important changes about opencl standards.
As far as I can understand the lut3d issue seems to be related to that the color space conversion is not always correct (instead of switching to sRGB or REC.709, the switch is done to lin sRGB/REC.709). lut3d uses the routine dt_ioppr_transform_image_colorspace_rgb_cl(). It seems not to return any error however.
Do you have any suggestion / explanation which could help solving that ? Thanks
I commented the TRC related lines to narrow the search while looking for the origin of the black output bug and forgot to restore them later. Sorry about that and thanks @TurboGit
Some of the pngs of the haldclut package are not working right. In the preview window of the darkroom the result look good. But in the main window and in the exported jpg the result looks very bad (no contrast).
To Reproduce Steps to reproduce the behavior:
Compare at the preview window with the main window in the darkroom view.
Here is a small list of pngs i've tested: Fuji Neopan 1600 2.png - works not Fuji Neopan Acros 100.png - works Fuji FP-3000b 1 --.png - works Fuji FP-3000b HC.png - works not Fuji 160C 1 -.png - works Fuji Superia 800 2.png - works not
Platform (please complete the following information):