Dithering in Gamma vs. Linear Space

Here is some public domain image, originally created by Ricardo Cancho Niemietz.

Original 8888 color image
Original 8888 color image

Conversion to R4G4B4A4, without application of dithering, yields a rather unsightly result. Note the significant color banding on the gradients, which results in the Mach band optical illusion. There is some heavy color banding of the parrot's plumage as well.

Non-dithered 4444 color image
Non-dithered 4444 color image

Dithering improves the artifacts and replaces most of banding by visually less-objectionable high-frequency noise.

Dithered 4444 color image
Dithered 4444 color image

However, you may notice that there now appear slightly darkened stripes in the linear gradients on the right side where the undithered image jumps to the next color level. This is because the image has been dithered in gamma space where adding up color values results in a color with slightly lower intensity. Linearizing color values before computing and distributing the error, these artifacts disappear completely:

Dithered 4444 color image with sRGB correction
Dithered 4444 color image with sRGB correction

Visually, there's little advantage of using sRGB-correct dithering for high-frequency photographic images, as the differences are neglible. For low-frequency gradients the gain in quality is obvious; however images with perfect gradients are most likely lookup tables and the like that wouldn't be stored at low color depths in the first place.

Anyway, the result using an approximate (and cheaper) gamma exponent of 2.0 is visually completely indistinguishable from applying the proper sRGB conversion for the purposes of dithering, so there's that.