darktable-org / darktable-org/darktable
AgX: wrong history display for pivot relative exposure
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
Root cause:
- The module stores the x coordinate of the pivot in the pivot_x property, presented via the curve/pivot relative exposure slider
- It modifies (and on each change, recalulates) the offset and scale of the slider, so the user is presented with an EV value
- In the history change popup, the previous value of pivot_x is interpreted using the current offset and scale.
For example, starting from black/white -10 EV -> 6.5 EV, pivot at mid-grey (0 EV shift), and changing the black/white relative exposure to -8 EV -> 5 EV, and setting the pivot shift to 1.5 EV, then hovering over the history item 12 will show the original pivot exposure as -0.12 EV, not as 0 EV, because the old pivot_x is interpreted using the new scale and offset:
Resetting the sliders and hovering over history item 13 will then show the pivot was moved from 2.06 EV to 0 EV (not the correct 1.5 EV to 0 EV):
Hovering over the previous entry, number 12 (which previously showed -0.12 EV -> 1.5 EV), shows the pivot was shifted from 0 EV to 2.06 EV:
The field stores the pivot_x value (0..1, x coordinate of the curve's pivot) and not the EV value, and changes visualisation (offset and scale) so we don't have to modify hard limits (which was the previous solution, using those hard limits to enforce the pivot is between black and white relative exposure). This was done to address https://github.com/darktable-org/darktable/pull/19642#discussion_r2485896335. @dterrahe
This is a relatively minor issue, and is probably preferable to messing with hard limits.
Steps to reproduce
See above
Expected behavior
the history should be displayed correctly
Logfile | Screenshot | Screencast
No response
Commit
No response
Where did you obtain darktable from?
darktable.org / GitHub release
darktable version
7035503eb7283e1e8
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 the module that stores pivot_x and the history change popup that displays its previous value. Reproduce the black/white and pivot-relative-exposure sequence described in the issue, then trace how the stored pivot_x is interpreted before and after slider offset and scale changes. Done means history entries display the correct previous and current EV values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100