I went out today to capture some test-images in the stock camera app, advancedcam and opencam (jpg & raw) containing different subjects to maybe help track down some of the weirdness.
A word on compression
It has been suggested that tuning the JPEG compression may help. I highly doubt that this is true, since JPEG compression artifacts look nothing like the ones we are discussing here. Roughly speaking, JPEG will look at groupings of 8x8 pixels - if the compression is to high, you will see distinct separations between these groupings. The wikipedia article on compression artifacts has a good example of this.
Posterization
Small details seem to get ‘lumped’ together into blobs. This almost reminds me of how some RAW processors have issues with Fuji X-Trans sensors. This is true for all camera apps, even OpenCamera - it is less pronounced in Sailfish Camera since it only saves a lower resolution. If we look at the RAW, it is evident that the detail is actually there.
JP Advanced Camera
JP Sailfish Camera
JP Open Camera JPG
JP Open Camera RAW
Control: Pixel 6, Open Camera JPEG
Tone Mapping 1: Dark areas
Tonemapping (roughly speaking) is the process of taking a sensor reading (of the number of photons) and mapping it to a colorspace that can be displayed by screens in a way that makes sense to us humans. While this sounds very straight forward, it is incredibly complicated - you can find years worth of discussions by people much smarter than me on the topic on the darktable forums.
Particularly, dark areas seem to loose detail in a ‘splochy’ matter. Again, the RAW reveals, that the detail is there.
JP Advanced Camera
JP Sailfish Camera
JP Open Camera JPG
JP Open Camera RAW
Control: Pixel 6, Open Camera
Tone Mapping 2: Highlight Rolloff in Saturated areas
As the colorspace hits it’s extremes (full bright, full dark), the possible options for colors go down (If you are at [254,254,254] you only have a single ‘red’ option for example). Again, this is a topic that is highly debated and in the case of darktable, disagreements on how to handle it have caused a fork of the project by it’s original developer with corresponding drama.
Looking at the JPEGs, we can see that we try to retain saturation even in these more restrictive situations. Darktable (at least with AGX tonemapping) will try to desaturate the extremes to make them more pleasing to look at. Something else that’s interesting here is that in my example, the JPEGs looks like we are limited by dynamic range, whereas the RAW actually contains a lot more data - while that is normal it also means, that with more advanced tone mapping, we could gain a bunch more dynamic range.
JP Advanced Camera
JP Sailfish Camera
JP Open Camera JPEG
JP Open Camera RAW
Control: Pixel 6 Open Camera
My goal with the Pixel 6 was actually to compare RAW to RAW, but it seems I forgot to activate that option on the Pixel