Non-Linear Transfer Functions/Tone Response Curves and Compression Codecs

Started 2 months ago | Discussions thread
Jack Hogan Veteran Member • Posts: 8,183
Re: 'Curves' Today Are All About Lossy Compression

John Vickers wrote:

Jack Hogan wrote:

[...]

As for references for compression I can think of this 15 year old post by Emil Martinec describing for instance how Nikon's D90-era 12-bit raw data was saved to NEF files using only 700 or so numbers. Look up tables did the decompression to linear raw for conversion. Call it archaic hybrid-log.

But Nikon's "lossy" RAW amplitude compression is a production format - it's not intended for delivery. It's basis is somewhat information-theoretic, rather than purely perceptual. If the lossy quantisation is proportional to noise, such a scheme gives a gamma of 2 in the midtones and highlights, falling to 1 in the deep shadows.

The number of codes required is roughly proportional to the chosen ratio of the noise to the quantisation step and to the square root of the (pre-ADC) gain, and is largely independent of the ADC bit depth for sufficient bit depths.

At a - rather conservative - (according to Jim Kasson) ratio of 1.5, I get about 883 codes for a noise model of a well-behaved 24MP FF sensor with 14-bit ADCs, and at a somewhat radical ratio of 0.5 I get about 293 codes.

These codes certainly fit in 10 bits. Which makes me question log encoding for video.

The design of Nikon's codes for D7200/D750/D810 imply a designed noise-to-quantisation ratio of something above 4.5 at base ISO. Since Nikon does not use different amplitude encodings for different gain settings, the implied quantisation ratio above the shadows increases with the square root of the gain.

Yes John, my point is that all these functions (linear conversion, compression, adaptation to output medium and viewing environment, making an image more pleasing) should be treated separately.  In particular I feel that in photography we should stick to a linear workflow right until we've decided what the output device and surround will be.

Jack

Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark MMy threads
Color scheme? Blue / Yellow