-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix: make sure correct HLR chroma corrections #13654
Bugfix: make sure correct HLR chroma corrections #13654
Conversation
|
For reference: The test "duck-at-the-pond" image can be downloaded from this post: https://discuss.pixls.us/t/using-darktable-master-with-intel-opencl-graphics-please-help/35371/5?u=ayro |
|
On my machine (Intel HD520 on i5-6300U). |
|
Intel Arc A750 and Ryzen 9 3900X. HLR result looks good. |
|
macos arm64 M1Max |
|
macos x86_64 AMD Radeon Pro 5500M |
|
I'll be glad to run a test if it helps, but only on Windows, and only if someone can provide a build that I can install. Note that my original attempt to reproduce this failed, so is there a point in my trying again? (I'm not allowed to touch the OS of the laptop running Windows; my Linux machine has an NVidia card.) |
|
Linux 5.15.0-60-generic, Ryzen 5 5600X, GeForce RTX 2070. |
My compile process is executing |
5b846b9 to
b72f474
Compare
|
The report from @MStraeten on AMD clearly showed a problem with the masking while calculating the chroma (the number of brackets should be identical or at least very close)
|
|
With the latest commits: |
|
The results for CPU path are irritating. Could you build and try with "Release" Version? |
|
I oversaw this, you must have set some parameters in raw prepare, temperature or hlr clip, the hash is different |
|
macos x86_64 AMD Radeon Pro 5500M |
|
macos arm64 M1Max |
b72f474 to
8b21571
Compare
|
@MStraeten the latest commits should likely fix your AMD issue (fingers crossed) |
|
@groutr could you check please again on intel too? (I have installed dt on my Intel notebook too, couldn't get OpenCL running yet ...) |
|
With the latest commits: Not sure if this is related or not, but just noticed that when I'm in the darkroom module, darktable is using consistently about 60% CPU even when idle (and in the background). |
|
macos x86_64 AMD Radeon Pro 5500M |
Can reproduce here. Goes away if the left panel is hidden. You should open a new issue |
8b21571 to
8630628
Compare
|
Friends @MStraeten and @groutr may i ask you again? |
|
The latest commit modifies the debug output so we should be able to have identical results if working fine |
See darktable-org#13632 and darktable-org#13646 In some situations the calculated chroma corrections are vastly wrong. The first idea was about precision errors because of using floats cor summing up data and the counters, that could be ruled out. The reported errors could be related (this is my current understanding) to: 1. improper data sampling because of the relaxed global memory policy, this could still be the case although unlikely because the errors keep happening after correcting data to be always in a gpu cacheline. 2. Errors on AMD often pinpointed to float data not initialized or div by zero. The code has been reviewed for strictly avoiding this. 3. The for_each_channel usage is wrong in many parts of the code as we don't calc 4-channel pixels but we do a loop over a "color-range" of 0-2 4. The dark-level was a code left-over, it's safe to use 0.2 of clip in all cases. 5. It is very good to avoid chroma corrections derived from a very small number of border pixels, we make sure now at least a "sensible" number.
The mask initializing before dilating to find out for unclipped locations close to unclipped->clipped transitions could have not-initialized data in opencl code. Fixed, also make sure the GPU and CPU code paths take exactly same locations.
The way we did this before worked fine on some architectuires, on some it failed completely because of different implementations for "relaxed memory policy" on global memory. As we only use one-update per line we can safely do this without bad performance drops now. Otherwise we would require OpenCL V 2.0
- the area checked for initializing masks was wrong - dilated buffer could have some data uninitialized - subtle error for xtrans fixed
516921d to
b842a5d
Compare
|
The good point: i have finally been able to reproduce the same issue on my intel notebook. Will come back if i have reached substancial progress. |
|
Closing this to proceed with a specific Intel & AMD OpenCl pr. |


See #13632 and #13646
In some situations the calculated chroma corrections are vastly wrong. The first idea was about precision errors because of using floats for summing up data and the counters, that could be ruled out.
The reported errors could be related (this is my current understanding) to:
lock-per-line)Thanks to many people having tested #13646, could i ask you to check again @groutr @MStraeten @kofa73 @gi-man @sarunasb ?
To test this:
--disable-openclor not-d pipeand watch out for reports like[opposed chroma cache GPU/CPU]A sidenote, the algo has also changed slightly, the results might be slightly different from master but tested on this pr the reports must be identical for GPU and CPU