Alien Representation of Dynamic Range

More channels means more money for the techs, right?
Post Reply
wswartzendruber
Posts: 2
Joined: Wed Sep 02, 2020 7:37 pm

Alien Representation of Dynamic Range

Post by wswartzendruber »

Backstory

I am developing a PQ to HLG converter. My goal is to devise a system of "ripping" where I can take a 4K disc and generate a file that plays back on any of my devices. So far, I have been largely successful, even when it comes to playback on Rec.709 displays.

But I have a problem when my normalized (for reference white) input signal exceeds 1,000 nits. I need to tonemap anything like that down to be within 1,000 nits. The best global tonemapping algorithm overall seems to be the Kim-Kautz approach for the stability it provides across different images with identical compression parameters, which is inherently required for video.

The Problem

Their research paper states:
Suppose that we have an HDR radiance map...which has a dynamic range (luminance) of 5.5 (1:343,512) and that we need to observe the radiance map through a display which has a dynamic range of 2.4 (1:256, 8-bits [36]).
What system is this of prescribing dynamic range with a decimal number like that? Citation #36 is for a textbook that is out of my budget. It doesn't appear to be the number of stops as 8-bit SDR has six.
User avatar
PID_Stop
Posts: 690
Joined: Thu Apr 01, 2010 11:58 am
Location: Syracuse, New York
Contact:

Re: Alien Representation of Dynamic Range

Post by PID_Stop »

wswartzendruber wrote: Wed Sep 02, 2020 8:46 pm
Suppose that we have an HDR radiance map...which has a dynamic range (luminance) of 5.5 (1:343,512) and that we need to observe the radiance map through a display which has a dynamic range of 2.4 (1:256, 8-bits [36]).
What system is this of prescribing dynamic range with a decimal number like that? Citation #36 is for a textbook that is out of my budget. It doesn't appear to be the number of stops as 8-bit SDR has six.
The decimal numbers 5.5 and 2.4 are the common logarithm (that is, to base 10) of the number of discrete values they list. Calculated to four decimal places, LOG(343,512) is 5.5359; LOG(256) is 2.4082.

Because of my photographic background, I tend to think of dynamic range in f-stops; you get that by taking the logarithm of the number of values in base 2 -- that is, dividing the log of the number of discrete values by the log of 2.

For a 256-value system, LOG(256) = 2.4082; LOG(2) = 0.3010; LOG(256) / LOG(2) = 8 f-stops.

For a 343,512-value system, LOG(343,512) = 5.5359; LOG(2) = 0.3010; LOG(343,512) / LOG(2) = 18.39 f-stops.

--Jeff
User avatar
PID_Stop
Posts: 690
Joined: Thu Apr 01, 2010 11:58 am
Location: Syracuse, New York
Contact:

Re: Alien Representation of Dynamic Range

Post by PID_Stop »

Thinking more broadly, converting HDR images to show on a real-world display is a non-trivial issue. As I recall, the human eye can generally discern about 14-15 f-stops of dynamic range; a good monitor can display about a 10 f-stop dynamic range. So if you have an image with broader dynamic range like 18 or 19 f-stops, what do you do?

This has been an issue with film photography from the earliest days -- particularly when deciding on appropriate aperture and shutter settings to use when shooting the negative, selecting a particular film stock and process, and finally choosing a paper with suitable contrast and printing and processing it to achieve the intended result. The Zone System, developed by Ansel Adams, is a particularly intentional way of approaching the problem. In essence, you determine which highlights and which shadow details are disposable, and that gets rid of some of the original dynamic range. You select a film stock that has a contrast index, gamma, knee and toe characteristics (as processed in a particular developer) to accommodate the remaining detail. The printing is then done to produce a final image that represents the photographer's visualization -- which is not necessarily the same as the original image.

Applied to a digital file, I'd expect to first clip the unnecessary highlights and shadow detail by enforcing maximum and minimum values to the data, then subtract out the black minimum to normalize the values so they start at 0... which should bring the dynamic range down considerably. Then apply whatever linear or nonlinear functions you want to use across the range of values to control the toe, gamma, and shoulder. If your functions are aggressive enough, the image should fall within your targeted dynamic range. The problem is, getting really good results is going to be subjective, and will probably vary according to the subject. Still, it's an interesting challenge.

Jeff
wswartzendruber
Posts: 2
Joined: Wed Sep 02, 2020 7:37 pm

Re: Alien Representation of Dynamic Range

Post by wswartzendruber »

It is a challenge. One I don't have to solve. I have the Kim-Kautz whitepaper. But if I don't understand their terminology, I cannot implement their algorithm.

Thank you for your answer. I can continue my implementation now.
Post Reply