darktable-org / darktable-org/darktable
Request: HDR viewers on macOS
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.1k
- Forks
- 1.4k
- Avg merge
- 22h 14m
- Merged PRs (30d)
- 198
Description
Is your feature request related to a problem? Please describe.
When editing HDR images (e.g. with PQ 2020 output space) the image viewer appears very dark on macOS. The viewer is limited to SDR.
Changing the display profile to PQ 2020 results in a grey viewer, so it appears that the colorspace is not communicated to macOS color management.
The output images in PQ 2020 look fine when viewed in external apps like Google Chrome.
Describe the solution you'd like
Use the macOS HDR APIs (e.g. https://developer.apple.com/documentation/metal/hdr_content) to display the viewers in HDR. This is enabled when output color space is set to PQ BT2020, and this (relatively common) color space will be communicated to macOS.
macOS PQ ST2084 has 2 HDR tone curves: 1. highlight rolloff and 2. clip
- Video consumption apps typically use highlight rolloff to display more highlight detail
- Professional apps like Lightroom and DaVinci resolve use the clip mode, so that "what you see is what you get" when editing. Lightroom also shows the current display clip point (determine by the HDR headroom), which is useful because in brighter environments, there is less HDR headroom
e.g. for the M1 Macbook Pro 16
- 1600 nits is 4 stops of headroom with SDR at 100 nits
- 1600 nits is 2 stops of headroom with SDR at 400 nits
Ideally, darktable would also use the ST2084 clip tone curve, and indicate to users where the clip point or HDR headroom is.
Alternatives
Additional context
Device: M1 Macbook Pro 16 with 1600 nits XDR display
darktable build: 4.9.0+916~gbc7af25093 (20241023)
Note: Macbooks 2018 and later, and iMac 2020 and later should support HDR 200 nits (when SDR is at 100 nits) https://support.apple.com/en-gb/102205 . I've tested an M1 Macbook Air which exhibits this behaviour. So, developers with these devices should be able to test this functionality.
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 at darktable's macOS image-viewer rendering path and its output color-space handling; the issue names no repository files or tests. Read Apple's Metal HDR content API guidance, then verify that PQ BT2020 output is communicated to macOS, HDR imagery renders correctly, and the ST2084 clip behavior and HDR headroom are represented as requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, macos
- Domain
- computer-graphics, desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100