RawTherapee
RawTherapee copied to clipboard
Banding is visible when strong expossure correction is applied.
Short description
Banding is visible, after a strong exposure correction is applied ( 10 EV ). I'm operating on high bit depth TIFF image ( 32 bits per channel ). I assure it is not a problem with provided image, as GIMP and other tool chains I'm using are able to render high quality image. As a not important note, the image is a TIFF obtained from DNG ( the conversion was done by Siril software ).
Steps to reproduce
- Open provided .tif image in RawTherapee and apply 10 EV correction - verify banding is visible on the sky ( I have uploaded all images and RawTherapee vs GIMP comparision screenshots: https://drive.google.com/drive/folders/1Gliec48pKajwO-ArriPdKer8EHjzWleH?usp=drive_link
Expected behavior
No banding visible on the sky. The quality should be comparable with original .dng file.
Additional information
RawTherapee 5.9 AppImage, running under Ubuntu 22.04.4 LTS
All I see in that link is a single JPEG file.
Sorry, wrong link, fixed.
Possibly related to the embedded color profile. Choosing one of the RT sRGB profiles for the input profile avoids posterization. GIMP does not have the issue. darktable also shows posterization with the embedded profile, but not when selecting sRGB.
Hmm. When siril implemented color management, I reviewed the general architecture and it looked good, but didn't review the color profiles themselves. They were using canned pregenerated profiles instead of generating them on the fly and I suggested they used LCMS2 to generate them on the fly. Unfortunately last year I was severely burned out at work and suffering from chronic sleep deprivation so I didn't review it nearly as well as I should have. Looking at the MR again, they rearchitected it significantly since I last looked.
Also I could have sworn they were using linear for higher bit depths than 8, but that was an older version of the MR. Combining sRGB with 32-bit data is a bit... weird. Especially 32-bit float data!
Looks like there's now a choice of sRGB, Working, or "image profile" in a UI preference: https://gitlab.com/free-astro/siril/-/merge_requests/542/diffs#d6bad6a891d344d6133b1ec6628ca876ea75828e_731_829 - no choice for linear which IMO should be provided for high bitdepth as an option. There's also a comment that "32 bit files are always saved in the colorspace of their current profile" - https://gitlab.com/free-astro/siril/-/merge_requests/542/diffs#d6bad6a891d344d6133b1ec6628ca876ea75828e_731_858 - I haven't yet determined what the definition of "current" profile is.
A definite difference is that they're using what looks like a 1024 entry lookup TRC, while RT uses a parametric TRC for sRGB. I'm not sure why GIMP doesn't posterize, but given the particular nature of this file, a LUT-style TRC with only 1024 entries might be problematic. LCMS should be interpolating values between LUT entries but maybe something isn't working quite right there? (Especially since this appears to be combining a LUT TRC with floating point data...)
The fact that the maximum value in the image data is a little over 0.01, it seems like there might also be some scaling issues with how this was saved. Especially given that the input DNG is well exposed.