Hacker News new | ask | show | jobs
by stavros 1097 days ago
I will never understand HDR. A friend has tried to explain it many times to me, but I always fail to get it. A display just has so much dynamic range (from full light off to full light on). HDR can't give you more range, so what does it actually do?

The only thing I've seen it do is override my brightness setting to make my screen go to full brightness when I've set it lower.

9 comments

There are generally TWO things going on, and we use one term. I think that’s because generally displays do both so it’s just easier.

One is that HDR displays can usually get MUCH brighter. An iPhone 5 could do 500 nits. An iPhone 14 Pro can do 1,000 - 2,000 nits.

That’s what’s used here. You get all the same colors as before, but max brightness is way brighter.

The other thing is color gamut. The standard we had for a long time was 24-bit color, so ~16.7 million colors. Instead of having 8 bits per channel, screens may now have 10 or 12 bits per channel. I can’t find just how many a modern iPhone has.

This means there are more shades between black and 100% bright red. There are more variations between blueish green and greenish blue. Gradients can be smoother. Objects that are mostly one color (yellow corn, a red apple, etc) now have more options the can use to provide definition and details.

In a very dark scene, there are now more dark shades to show things with. When looking at bright clouds, they don’t have to be all white and washed out.

And combined with the increased brightness a scene can show definition in both dark and bright areas without having to wash everything out.

To clarify slightly - the max brightness is the real feature, and everything else including more bits per channel is just a bonus used to describe colours that are dimmer or brighter in more detail than was possible before. Essentially more bits per channel means greater precision, but the real game changer is how the range has expanded and you can display more details in dim scenes, more details in bright scenes, and, very key for the HDR effect, to have both very bright and very dim content display next to each other. As a side effect, just like how you don’t want your seats to rattle in a movie theatre every time music plays, there’s a difference in visual brightness between “normal” sRGB content and brighter (or dimmer) than usual P3 content. This QR code trick exploits that difference.
BTW there are, or at least were, wide gamut only displays.

I have one Dell made a few years ago. It supports the additional colors of P3 but isn’t any brighter than any other quality normal display of the time.

Technically, then, that display is like OLED TVs pre-2018, which could only display about 70-85% of P3 wide gamut because they could not go bright enough across the entire display. They were amazingly bright if a small part of the panel needed to be lit, though, with excellent contrast ratios. By comparison, most LED panels that are wide gamut but don’t have dimming zones can only display a uniform brightness or dimness and often struggle to make colours pop against darker backdrops the way they do on MacBook screens (with dimming zones) or iPhones (with OLED screens). Point is, just because something is wide gamut doesn’t mean it can display the entire gamut nor does it mean it can display the entire gamut at the same time. Its quality can vary by image and lighting technology (since the quality and brightness of colours all rely on their lighting source, etc.) as well as the image content demanded to be displayed and the lighting of the room (since your eyes have to perceive the screen too, against whatever backdrop or lighting your room has).
That makes sense, thanks!
The way it is implemented on recent Apple devices is that the maximum brightness your display hardware is actually capable of is much higher than the color #FFFFFF at the maximum brightness available in settings. In other words, there's quite a lot of headroom that is only ever used for HDR content. This results in quite a strange sight of something (a QR code in this case) being much brighter than all of its surrounding UI.
That's odd, though, right? Why would they constantly cap the brightness of my screen, which I could really do with in bright light, just in case I watch some HDR content at some point?
If you applied HDR-white to all the UI on your screen, it'd likely lose brightness, because most HDR displays have limits on sustained brightness that are far lower than the peak brightness they can achieve on a small portion of the screen. HDR video doesn't really have this problem because people are mastering their HDR video to be significantly darker than SDR[0].

I will say that it is really annoying to have an HDR video just be way brighter for no reason, and I kind of hate HDR for this and this alone.

[0] This is also why streaming services have shows that are WAY TOO DAMNED DARK. Related: the people mastering the audio have also decided to make all the dialogue way too low because fuck people with hearing disabilities[1].

[1] An audio engineer was asked about this and he outright said he doesn't master for substandard audio setups. No I don't remember the source, it was from one of those articles that show up on the Firefox new tab page. Yes I am kind of reading into things and getting angry about it.

Re: #1

It was Christopher Nolan. He said

"The only platform I’m interested in talking about is theatrical exhibition."

and

"“We made the decision a couple of films ago that we weren’t going to mix films for substandard theaters... We’re mixing for well-aligned, great theaters... At a certain point, you have to decide if you’ve made the best possible version of the film and you’re trying to account for inadequacies in presentation... That’s chasing the tail. It doesn’t work. I will say, with our sound mixes, we spent a lot of time and attention making sure that they work in as predictable a way possible."

https://www.indiewire.com/features/general/christopher-nolan...

https://www.indiewire.com/features/craft/dunkirk-too-loud-ch...

Re: #1

Doesn’t that happen because shows are mastered for 5.1 systems and the dialogs are put in the centre channel, whereas most of us are watching in stereo with poorly setup automatic remixing?

I definitely feel you about the darks and dialog volumes.
On my macbook with vscode on the left and chrome on the right. When I click on this link with the right side of my screen covered up, I can visibly see vscode on the left get a couple of shades darker (animated over a second or so). So it looks like it's not only a question of hidden max brightness, it looks like the device adjusts the whole screen to enhance contrast for the HDR content as part of the strategy.
Their idea is that you won't ever need your UI to be this bright, I guess? It's Apple, that's what they do — they build things that work optimally for most people. They aren't wrong about it in this particular case either. The MacBook Pro display does get bright enough for me as is to be readable in direct sunlight.

But if you do want to "use the full potential of your hardware", there was some third-party app that used private APIs to set the screen brightness above that limit. I don't remember its name.

This sounds incredibly stupid to me, giving some unspecified range of content providers access to things that users don't have access to. But that's Apple for you I guess.
The problem is when this was first rolled out no content was designed for it.

So if they they just mapped the new brightness everything, everywhere, would look wrong. And people would complain that the iPhone is broken. And they have to redo all their websites/apps. And when they do, they look wrong on every other device.

This is the only sane way. It has to be something people opt-in to. That’s what Apple did.

The colors are meant to be within a calibrated (sRGB) color space. Images and videos can request to be in a different color space which includes the HDR range. CSS can also request colors outside that space, but that is done by using extended RGB triples (e.g. RGB(999,999,999) for ultra white).

The difference is while most things support sRGB, those other color spaces may just be outside what the display can handle. My Ultrafine 5k for instance does not show a discernible difference between the two QR codes.

You also have the issue that static images displayed at higher brightness will use more power and require quicker mitigations to prevent burn-in, so an 'ultra white' background may just not be something supported for a web page.

> The colors are meant to be within a calibrated (sRGB) color space.

If this were true, monitor brightness would be hard-set at 80cd/sqm, which would be borderline unusable during the day and way too bright in the dark. But hey, true sRGB colours!

What do you mean by "some unspecified range of content providers"? You can edit your own HDR videos on it too. Affinity Photo also allows using the HDR mode for viewing raw photos. The APIs to sear user's retinas are there, they are public and available to all native apps, it's just that there's a very strict distinction between SDR and HDR content.
Maybe it makes sense inside the Apple reality distortion field, but in the rest of the world the monitors job is to represent colours the way it can from the current black to the highest possible white, utilizing its complete dynamic range, and it's the tonemapper's job to convert HDR to monitor colours.

I imagine very few people, i.e. graphics designers, want true sRGB colours. The rest (i.e. normal people) adjust the brightness to the ambient conditions, adjust their eyes to the current "white" and expect everything to follow suit.

sRGB defines these colors: https://en.wikipedia.org/wiki/SRGB

Every (compliant) screen will produce that range, when given numbers between the minimum and maximum. It's nowhere near every color we can see (the dark gray area), but it is a decent manufacturing target and it covers a very practical area of our vision.

Screens could just produce their maximum range all the time... but then you'd get screwed up colors, with every display being different than the others (some redder, some greener, etc.). Hence standard color ranges, like sRGB, so bananas used for color scale always look the same shade of yellow. That triangle looks the same on my screen as it does on yours, assuming the manufacturer cared at all about consistency. (remember the stupidly red OLEDs when they were new? they looked awful, humans looked like oompah loompahs)

So screens are capable of more than they normally display, sometimes by a pretty large margin. Somehow you have to tell the screen to go beyond its normal range, to show yellower yellows for super-bananas - that's HDR.

> HDR can't give you more range, so what does it actually do?

It does give you more range.

A lot of modern screens literally can't run at their full dynamic range, they would draw too much power and/or get too hot (some professional displays I use at work have a power cable as thick as your thumb and radiate heat like an oven with the door open. They also require following warm-down procedures to prevent the electronics from failing if they cool down too quickly when you power them off).

They can, however, run at full brightness for a small section of the display or brief periods of time. HDR videos are one way to instruct the screen to do that.

(obviously, how much range it can give you depends what screen technology you have - Apple's software has supported this for a long time, but even some current model displays they sell can't really do HDR properly - though many that "cant" to HDR are able to make a best effort using complex software tricks)

Thank you, I hadn't thought of full screen vs spot brightness!
HDR increases the granularity of available brightness levels, from 0-255 to some higher level. (1023, usually.) It then defines the "old" 100% level to be some value less than the new maximum.

It is usually combined with new display technologies that can emit unusually high brightness levels. On a traditional display there is obviously no point.

Ah, this kind of makes sense, but then why wouldn't they map the old 100% to the new maximum?

I can understand the increased granularity, if you're making monitors that go much brighter, then you get more light levels, but why define the old maximum to be less than the new maximum?

So there is always headroom to show HDR content.
So the innovation of HDR is that it always makes my screen dimmer so it can sometimes drive it to full brightness and say "look, magic"?
Yes that's essentially how I understand it: hardware-wise HDR is basically "a really bright screen" coupled with good black levels. To ensure that you always get the HDR effect at any brightness, you need to reserve some headroom. It should be noted that you probably could not sustain this peak brightness for long anyhow due to thermal issues.

You might be interested in reading https://prolost.com/blog/edr which explains in more detail.

Basically your eyes can see much more than SDR. There are lots of colors that are smooshed together on an SDR monitor that would be distinct on an HDR monitor. Sometimes this means more vivid colors, or sometimes this means much more subtle gradients, or sometimes darker darks that don't get killed by neighboring brights.

Whether the effect is significant depends on a lot of stuff; how the display is built, how the codec works, your viewing conditions, and not least of all, whether the content "looks better" artistically with that much more range.

Just like the compression audio effect clips the range of music and how some pieces of music sound more expressive when the range in amplitudes is used well for artistic effect.

But this only tells me that some monitors can show more colors than others. If you made a monitor that can show more colors, does it matter what you call it? SDR or HDR, it can still show more colors than other monitors.
The idea is that "full red" should always be about the same brightness (user controlled, so "same"). Not "red" on an SDR screen and "iris burning bright red" on a HDR screen. Essentially, you want to extend your color parameter space to give the iris-burning range new names so that SDR and HDR images can both be displayed sensibly.
> HDR can't give you more range,

It gives you more range.

> so what does it actually do?

If you have done a little C programming, you will know (or can check) that a 32-bit `int` represents values from -2147483648 to 2147483647 while a 32-bit `float` goes from -340282346638528859811704183484516925440. to 340282346638528859811704183484516925440. - clearly more "range". This is almost exactly what is happening here.

(If you haven't done a little C programming, you should!)

> The only thing I've seen it do is override my brightness setting to make my screen go to full brightness when I've set it lower.

That is too bad. My experience is very good: only the QR code becomes much more striking, while the rest of the display remains the same. Perhaps it is implemented by increasing the brightness on your display to compensate for the reduced range available due to your brightness setting, but if that's what is happening here, something else is also compensating the colours to make the non-HDR areas of my display darker so that I cannot notice.

A 32 bit float and only represent 2^32 numbers (maybe less), same as a 32 bit int.

What’s happening here is using a short (16 bit) rather than a byte (8 bit), although not quite to the same extent, for each channel. HDR allows you to represent 2^6/12/18 times as many colors as SDR.

HDR10 is 10-bits per component and there are plenty of 16-bit images that aren't HDR, for example: http://i.imgur.com/Wm2kSxd.png -- the main thing about using HDR is to increase the range of values, i.e. what the biggest and smallest values are, not merely how many distinct values you can represent.
Well that’s just the colour space, you’ve also got the gamma curve to consider when you look at the perception of how something looks
Lot of HDR tech is actually making sure that old conventional SDR sRGB looks "correct" (what people expect) on these newfangled displays. Lot of problems stem from lot of tech basically completely ignoring color management, even if wide-gamut displays were already a thing before HDR.

Basically if srgb content was just naively stretched to rec2020 it'd look garish and oversaturated instead of what the designer/photo/videographer intended. If it was additionally stretched to HDR, it'd look garish and eye-searingly bright.

Because the differences between HDR displays and SDR is so dramatic it is forcing everyone to scramble to do color management as the result would be pretty unusable otherwise.

https://webkit.org/blog-files/color-gamut/

Look at the second example ( red images) and click the Display P3 option.

Do you see the symbol inside? No? Well then your display / monitor isn’t capable of showing a colour range higher than sRGB.

HDR is similar in respect to brightness and contrast.

If your device supports HDR, then there’s more steps in the brightness scale that your monitor can display.

Is higher granularity all HDR is, then? Other commenters mention that the HDR brightness max is more than what the SDR brightness max is defined as, which seems odd to me. It's as if you're crippling the display for SDR permanently.
Rec.709 actually defines a peak luma of 100 nits. sRGB has it defined as 80 nits. These numbers are really only for mastering, but as you push further from the standard you start to see artifacts, namely banding in gradients.

HDR standards require higher bit depth and define higher peak brightness. In addition, and this is probably technically the toughest bit, they define dynamic metadata formats which define tone mapping as the content changes [0].

One thing you may be missing about the particular effect we see on this website is that it disappears as you turn your device brightness up. So you can still get that brightness with SDR content.

[0]: https://www.avforums.com/articles/what-is-4k-hdr-dynamic-met...

Ideal HDR goes up to 10000 nits or higher. It would be ridiculous to put SDR white anywhere near that level.

And there is no need to cripple anything. Brightness adjustment can/should let you put SDR white all the way up to the max full-screen brightness. If a manufacturer cripples that it's not HDR's fault.

But it's also important to note that "max full-screen brightness" is often a lot less than maximum spot brightness.