I added ideal photon noise to the test of the previous post, assuming that the camera’s ISO dial is set to 100.
Here’s the simulated uncompressed raw file demosaiced by bilinear interpolation:
And here’s the file companded by the Sony compression algorithm and demosaiced in same way, subtracted in a linear color space with Adobe RGB primaries, scaled into the range [0,1], and converted to regular gamma=2.2 Adobe RGB. The scale factor in linear space is 0.0626, meaning that the error artifacts span a range of about 6% of the range of tones in the image.
The noise breaks up some of the error pattern.