Processing RAWs for HDR displays in Darktable

Thanks for sharing @mosnee! My experience with macOS and JPEG XL is also consistent with what you wrote, but you managed to put it into words much better than I could.

One question to @kmilos, just out of curiosity: how did you come up with the -1.36 EV value for HLG?

I am not very familiar with HLG, so I almost exclusively used the PQ Rec2020 RGB profile so far, with a final exposure correction of log2(203 nits /10000 nits) ≈ -5.622 EV as the last step in the processing pipeline, in order to map the SDR white to 203 nits (which is the value used by the Adobe viewer).

However, Apple softwares have lots of performance issues with PQ (reported, but still not fixed), and so far I didn’t manage to preserve the middle gray and the contrast when exporting to HLG. So I still don’t have an export format that works out-of-the-box with “mainstream” viewers like macOS/iPadOS Photos.

EDIT: I just tested again with HLG and -1.36 EV, and I still get crushed blacks (darker than on the SDR or PQ images), while the specular highlights are brighter than on the PQ image. So the contrast is still unnaturally strong when I export to HLG. I’ll try to find a good test image to show the issue (I promised it long ago but then forgot about it…)