darktable-org / darktable-org/darktable
_dev_exposure_proxy_available finds wrong exposure instance?
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.1k
- Forks
- 1.4k
- Avg merge
- 22h 14m
- Merged PRs (30d)
- 198
Description
Is there an existing issue for this?
- I checked and did not find my issue in the already reported ones
Describe the bug
This is used by color calibration. However, it does not find the 'main' (first) exposure instance, but rather the last instance, even if it is disabled.
Calibrating from a Color Checker chart, with an instance of exposure enabled:
Same, but with an instance of exposure added (above the previous one), and then disabled:
Maybe modify exposure reading functions like this? In order to avoid repetition, this could be refactored to find the first instance in a separate function, and functions using it could just check if the instance was found, and if yes, call dev->proxy.whatever_function(module).
if (dt_view_get_current() != DT_VIEW_DARKROOM) return 0.0f;
// The proxy function pointers are only set if an exposure module has been initialized.
if (!dev->proxy.exposure.whatever_function) return 0.0f;
for (GList *l = dev->iop; l; l = g_list_next(l))
{
dt_iop_module_t *module = (dt_iop_module_t *)l->data;
if (module->enabled && dt_iop_module_is(module->so, "exposure"))
{
return dev->proxy.whatever_function(module);
}
}
Steps to reproduce
See above
Expected behavior
darktable should use the 1st enabled instance (probably)
Logfile | Screenshot | Screencast
No response
Commit
No response
Where did you obtain darktable from?
darktable.org / GitHub release
darktable version
684779a88d529 (current master)
What OS are you using?
Linux
What is the version of your OS?
OS-independent
Describe your system
No response
Are you using OpenCL GPU in darktable?
None
If yes, what is the GPU card and driver?
No response
Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating _dev_exposure_proxy_available and the exposure reading functions that use it, then reproduce the Color Checker calibration case with multiple exposure instances, including a disabled one. Trace how the exposure instances are selected and verify that darktable uses the first enabled instance consistently; the issue is done when the reported calibration behavior matches that expectation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100