New HDR Settings

Discussion about displays and related hardware including MiSTer filters and video settings.
FoxbatStargazer
Top Contributor
Posts: 1016
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 315 times
Been thanked: 238 times

New HDR Settings

Unread post by FoxbatStargazer »

Latest updated added some kind of HDR support. Here's the new options from the ini file:

Code: Select all

hdr=0   ; 1 - enable HDR using the BT2020 color space (faux-HDR, use color controls to tweak).
        ; 2 - enable HDR using the DCI P3 color space.
        ; 3 - enable HDR without color space conversion.

There's also controls for brightness, contrast, hue, etc. as well.

I'm wondering what the practical use is here versus passing an SDR signal to your OLED TV. Is it possible to push max brightness higher? More color saturation? Is there some way to better approximate the CRT experience now, or is this more for making something unrealistic and striking? Which color space choice is best for these?

User avatar
thisisamigaspeaking
Posts: 244
Joined: Mon May 23, 2022 12:28 am
Has thanked: 79 times
Been thanked: 23 times

Re: New HDR Settings

Unread post by thisisamigaspeaking »

FoxbatStargazer wrote: Mon Dec 26, 2022 7:50 pm

Latest updated added some kind of HDR support. Here's the new options from the ini file:

Code: Select all

hdr=0   ; 1 - enable HDR using the BT2020 color space (faux-HDR, use color controls to tweak).
        ; 2 - enable HDR using the DCI P3 color space.
        ; 3 - enable HDR without color space conversion.

There's also controls for brightness, contrast, hue, etc. as well.

I'm wondering what the practical use is here versus passing an SDR signal to your OLED TV. Is it possible to push max brightness higher? More color saturation? Is there some way to better approximate the CRT experience now, or is this more for making something unrealistic and striking? Which color space choice is best for these?

Why is Rec.2020 faux HDR? Is there an actual HDR signal being sent to the monitor? I believe Rec.2020/BT2020 is actually standard for HDR and is not faux at all. Is it just an SDR signal in Rec.2020 color space? What if one's monitor is set to Rec.2020 (which mine currently is)?

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: New HDR Settings

Unread post by jca »

What is the use of it?

User avatar
Natrox
Scripting Wizard
Posts: 36
Joined: Thu Aug 04, 2022 2:05 pm
Has thanked: 8 times
Been thanked: 74 times

Re: New HDR Settings

Unread post by Natrox »

Hi, I was the person who did the PR for HDR and color controls. The color controls are primarily meant for tweaking your HDR output in case you don't like the image. For example, if you use BT2020 you may want to increase gain on red, if you use DCI P3 you may want to dial down saturation, if you feel the picture is too dark you can reduce the contrast. It can also be used for displays that do not have any controls, like some CRTs.

FoxbatStargazer wrote: Mon Dec 26, 2022 7:50 pm

I'm wondering what the practical use is here versus passing an SDR signal to your OLED TV. Is it possible to push max brightness higher? More color saturation? Is there some way to better approximate the CRT experience now, or is this more for making something unrealistic and striking? Which color space choice is best for these?

Indeed it is to push brightness higher as well as better approximate the CRT experience. You should try BT2020 first but there is a good chance DCI P3 works better for you.

thisisamigaspeaking wrote: Mon Dec 26, 2022 8:18 pm

Why is Rec.2020 faux HDR? Is there an actual HDR signal being sent to the monitor? I believe Rec.2020/BT2020 is actually standard for HDR and is not faux at all. Is it just an SDR signal in Rec.2020 color space? What if one's monitor is set to Rec.2020 (which mine currently is)?

I called it psuedo-HDR because the original systems were never designed to output HDR signals. This just pushes brightness up and makes highlights stand out from other parts of the picture. I see it not as true HDR. It does not have anything to do with the color space. The signal itself is HDR, yes.

If your monitor is set to Rec.2020 and you have good coverage you should have a pretty good picture.

jca wrote: Mon Dec 26, 2022 8:24 pm

What is the use of it?

Several, but the best use of it is to regain brightness from using scanlines and shadow masks. In general, you should get a brighter picture overall - at least, on most HDR displays. You will also see brightness peaks like regular HDR. E.g. if a game you're playing has a light bulb that's outputting at 0xFFFFFF, your TV or monitor will display it as bright as possible. This tends to work out well for the most part, but for instance, if the game has a character wearing white clothing, it will also display very bright. That is another reason for why I call it faux-HDR.

It will work better with some games over others. I hope people enjoy it.

FoxbatStargazer
Top Contributor
Posts: 1016
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 315 times
Been thanked: 238 times

Re: New HDR Settings

Unread post by FoxbatStargazer »

OK I started playing with it and yes, all modes definitely produce an HDR signal! The colors seem noticably off on my C1, and by default the whites can be blinding. So aside from wanting something super saturated or blindingly bright, I think the potential here is compensating for some of the darker/heavier shadow mask and scanline options, but you'll probably be tweaking the 6 point color to get it right.

I'm guessing this is basically taking the 8-bit color that is the end result of the scaler and then mapping that to colors in an HDR space? So all the filtering/masking is still baked into an 8-bit result before you translate it to HDR?

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: New HDR Settings

Unread post by jca »

@Natrox Thanks for this information, now it make more sense because all these retro devices were made long before HDR. Does this setting have any effect on a non HDR monitor/TV?

MiSTer Consoles
Posts: 150
Joined: Sun Dec 04, 2022 2:42 pm
Has thanked: 140 times
Been thanked: 24 times

Re: New HDR Settings

Unread post by MiSTer Consoles »

FoxbatStargazer wrote: Mon Dec 26, 2022 10:21 pm

OK I started playing with it and yes, all modes definitely produce an HDR signal! The colors seem noticably off on my C1, and by default the whites can be blinding. So aside from wanting something super saturated or blindingly bright, I think the potential here is compensating for some of the darker/heavier shadow mask and scanline options, but you'll probably be tweaking the 6 point color to get it right.

I'm guessing this is basically taking the 8-bit color that is the end result of the scaler and then mapping that to colors in an HDR space? So all the filtering/masking is still baked into an 8-bit result before you translate it to HDR?

I tried this on my LG CX and the colors were pretty far off using any of the three settings as well. Instead of being maroon the menu background was almost black. The whites/lighter colors definitely seemed to pop though. I'm curious if it is possible to get closer to the correct colors without having to adjust them on the TV itself?

FoxbatStargazer
Top Contributor
Posts: 1016
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 315 times
Been thanked: 238 times

Re: New HDR Settings

Unread post by FoxbatStargazer »

As mentioned check out the new adjustments near brightness/contrast you have 6-point color controls. Maybe you can dial in the colors right with a lot of work there.

jca wrote: Mon Dec 26, 2022 10:30 pm

@Natrox Thanks for this information, now it make more sense because all these retro devices were made long before HDR. Does this setting have any effect on a non HDR monitor/TV?

It sends out an HDR signal so many non-HDR devices will probably not display it at all. Although there are "fake HDR" displays that can interpret the signal at least, but I can't see that producing any better results.

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: New HDR Settings

Unread post by jca »

Thanks, it was just curiosity on my part and may be useful to others.

User avatar
thisisamigaspeaking
Posts: 244
Joined: Mon May 23, 2022 12:28 am
Has thanked: 79 times
Been thanked: 23 times

Re: New HDR Settings

Unread post by thisisamigaspeaking »

FoxbatStargazer wrote: Mon Dec 26, 2022 10:42 pm

It sends out an HDR signal so many non-HDR devices will probably not display it at all. Although there are "fake HDR" displays that can interpret the signal at least, but I can't see that producing any better results.

The vast majority of computer displays with "HDR" are some variety of fake HDR, just so people are aware. If their display was not $1000+ (as of end of 2022) and it's a computer monitor it will most likely not generate a useful HDR image. Prices will keep coming down though.

User avatar
Bunker
Posts: 84
Joined: Sun Jan 02, 2022 10:29 am
Has thanked: 46 times
Been thanked: 10 times

Re: New HDR Settings

Unread post by Bunker »

Has anyone with 10bit hdr display tried this out yet?

User avatar
Retro-Nerd
Posts: 273
Joined: Fri Jul 08, 2022 2:47 am
Has thanked: 10 times
Been thanked: 79 times

Re: New HDR Settings

Unread post by Retro-Nerd »

Yes, it looks really nice on my C9 OLED. Of course it makes only sense if you prefer CRT filter and maybe Black Frame insertion. It counters the image darkening pretty good. Don't use the default values. Try something like this:

Code: Select all

hdr=2                  ; 1 - enable HDR using the BT2020 color space (faux-HDR, use color controls to tweak).
                       ; 2 - enable HDR using the DCI P3 color space.
                       ; 3 - enable HDR without color space conversion.

Code: Select all

video_brightness=50
video_contrast=45
video_saturation=80
video_hue=0
video_gain_offset=1,0,1,0,1,0
User avatar
Natrox
Scripting Wizard
Posts: 36
Joined: Thu Aug 04, 2022 2:05 pm
Has thanked: 8 times
Been thanked: 74 times

Re: New HDR Settings

Unread post by Natrox »

FoxbatStargazer wrote: Mon Dec 26, 2022 10:21 pm

I'm guessing this is basically taking the 8-bit color that is the end result of the scaler and then mapping that to colors in an HDR space? So all the filtering/masking is still baked into an 8-bit result before you translate it to HDR?

That's right. It would be better to do the filtering in HDR space but it's simply not possible to do on this hardware.

User avatar
neogeo81
Top Contributor
Posts: 443
Joined: Fri Apr 16, 2021 1:52 pm
Has thanked: 34 times
Been thanked: 47 times

Re: New HDR Settings

Unread post by neogeo81 »

Absolutely not usable. Looks terrible.

User avatar
Retro-Nerd
Posts: 273
Joined: Fri Jul 08, 2022 2:47 am
Has thanked: 10 times
Been thanked: 79 times

Re: New HDR Settings

Unread post by Retro-Nerd »

I don't think this looks terrible. Quite nice, actually. It's a crappy smartphone pic. Of course the colors looks a bit different on my TV. And you cannot take a SDR pic with the real HDR look of your TV. But you get the idea.

misterfpgawithhdronr3da5.jpg
misterfpgawithhdronr3da5.jpg (6.72 MiB) Viewed 16521 times
User avatar
aberu
Core Developer
Posts: 1191
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 247 times
Been thanked: 411 times
Contact:

Re: New HDR Settings

Unread post by aberu »

How good it will look will be somewhat subjective, it will depend on your TV, it will depend on how long you mess with the other options associated with it to get the gain and offset for each color dialed in right, and even then it won't be a correct color matching.

The fact is, using scanlines and shadowmasks already mangles the color somewhat, so this is a way to regain some of the lost brightness, yet in the process it probably makes the color lost to scanlines and shadowmasks more apparent than it originally was.

This is not a proper SDR --> HDR conversion of the color space like the Retrotink 5x is reportedly going to do, the MiSTer can't really handle that as far as I know (or maybe it could but it wouldn't be worth the tradeoffs, I don't know).

The point of it is that it can help with people who lose a lot of brightness when they use scanlines + shadowmasks together, with the caveat that it will impact the color representation significantly.

birdybro~
User avatar
Retro-Nerd
Posts: 273
Joined: Fri Jul 08, 2022 2:47 am
Has thanked: 10 times
Been thanked: 79 times

Re: New HDR Settings

Unread post by Retro-Nerd »

This is not a proper SDR --> HDR conversion of the color space like the Retrotink 5x is reportedly going to do.

This is not true. Mike said some days ago that the Retrotink 5x will never be able to do a proper SDR to HDR color conversion. The FPGA isn't good enough for that (not enough RAM e.g). Actually the DCI P3 conversion with the Mister looks much more authentic, colorwise. The RT5X is a bit off. Magenta looks like violet, generally Red is too dark/cool. There is not much you can do to tweak it better. The Mister.ini settings gives you much better options for tweaking the colors. Only the Retrotink 4K will be sophisticated enough to create a proper HDR effect.

User avatar
thisisamigaspeaking
Posts: 244
Joined: Mon May 23, 2022 12:28 am
Has thanked: 79 times
Been thanked: 23 times

Re: New HDR Settings

Unread post by thisisamigaspeaking »

neogeo81 wrote: Tue Dec 27, 2022 4:38 pm

Absolutely not usable. Looks terrible.

Sure it's not your hardware, or user error?

User avatar
Retro-Nerd
Posts: 273
Joined: Fri Jul 08, 2022 2:47 am
Has thanked: 10 times
Been thanked: 79 times

Re: New HDR Settings

Unread post by Retro-Nerd »

It's an user error for sure. Only the DCI-P3 conversion looks good enough (with some tweaks in contrast and saturation, maybe a gamma correction in the Mister -> Video Processing settings too). Close enough to SDR, for me.

User avatar
Chris23235
Top Contributor
Posts: 976
Joined: Sun May 24, 2020 8:45 pm
Has thanked: 124 times
Been thanked: 194 times

Re: New HDR Settings

Unread post by Chris23235 »

I also have the almost black menu screen. Once a core is loaded it doesn't look wrong any more, but the initial menu screen of the MiSTer becomes almost black regardless which HDR settings I choose. I use this monitor:

https://www.tulparnotebook.de/gaming-mo ... d-a27-v1-1

FoxbatStargazer
Top Contributor
Posts: 1016
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 315 times
Been thanked: 238 times

Re: New HDR Settings

Unread post by FoxbatStargazer »

Retro-Nerd wrote: Tue Dec 27, 2022 9:20 pm

It's an user error for sure. Only the DCI-P3 conversion looks good enough (with some tweaks in contrast and saturation, maybe a gamma correction in the Mister -> Video Processing settings too). Close enough to SDR, for me.

I'm not really satisfied with your settings on a C1. The colors are still off no matter what. Personally I wish I could pull down the highlights without darkening the rest of the image so bad, especially under shadow mask, but I can't find a contrast/brightness combo that works. Maybe some color tweaking can fix it but it's not great out of the box.

User avatar
neogeo81
Top Contributor
Posts: 443
Joined: Fri Apr 16, 2021 1:52 pm
Has thanked: 34 times
Been thanked: 47 times

Re: New HDR Settings

Unread post by neogeo81 »

Retro-Nerd wrote: Tue Dec 27, 2022 9:20 pm

It's an user error for sure. Only the DCI-P3 conversion looks good enough (with some tweaks in contrast and saturation, maybe a gamma correction in the Mister -> Video Processing settings too). Close enough to SDR, for me.

close enough to SDR? cool so i can just let it off then :lol:

User avatar
thisisamigaspeaking
Posts: 244
Joined: Mon May 23, 2022 12:28 am
Has thanked: 79 times
Been thanked: 23 times

Re: New HDR Settings

Unread post by thisisamigaspeaking »

Bunker wrote: Tue Dec 27, 2022 1:21 pm

Has anyone with 10bit hdr display tried this out yet?

All the C9/CX/C1/C2 are 10-bit HDR. I just tried it on a true 10-bit HDR LCD. Not a great experience but I didn't play with it much.

Retro-Nerd wrote: Tue Dec 27, 2022 3:21 pm

Code: Select all

video_brightness=50
video_contrast=45
video_saturation=80
video_hue=0
video_gain_offset=1,0,1,0,1,0

These settings did not help on my Asus PA32UCX. Colors quite off. Neither DCI P3 not Rec.2020 worked right, but at least Rec.2020 (if set such on the monitor) didn't have extremely bright whites. I didn't play with it much though, don't see much point for my purposes. Not going to try on my CX (in another room) but I'll take your word for it that it looks ok.

neogeo81 wrote: Tue Dec 27, 2022 4:38 pm

Absolutely not usable. Looks terrible.

I apologize, you may be right.

aberu wrote: Tue Dec 27, 2022 8:13 pm

The point of it is that it can help with people who lose a lot of brightness when they use scanlines + shadowmasks together, with the caveat that it will impact the color representation significantly.

Yes seems to be quite a significant negative impact.

Retro-Nerd wrote: Tue Dec 27, 2022 9:20 pm

It's an user error for sure. Only the DCI-P3 conversion looks good enough (with some tweaks in contrast and saturation, maybe a gamma correction in the Mister -> Video Processing settings too). Close enough to SDR, for me.

The color space of the signal needs to match what your monitor is set for in theory. Mine has both Rec.2020 and DCI-P3 settings, complete P3 coverage, and decent Rec.2020 coverage. I couldn't get any combination of those settings to work right. I'm pretty sensitive to colors though (that's why I have a color accurate display).

FoxbatStargazer wrote: Wed Dec 28, 2022 12:10 am

I'm not really satisfied with your settings on a C1. The colors are still off no matter what. Personally I wish I could pull down the highlights without darkening the rest of the image so bad, especially under shadow mask, but I can't find a contrast/brightness combo that works. Maybe some color tweaking can fix it but it's not great out of the box.

Agree, it's bad enough that I won't be playing with this any further. Perhaps it will be useful to someone though, no harm including it.

KennyL
Posts: 120
Joined: Sun May 24, 2020 11:40 pm
Has thanked: 73 times
Been thanked: 50 times

Re: New HDR Settings

Unread post by KennyL »

I've been playing around with it on my LG C2 and I like it. I'm not too married to accuracy so this is pretty fun option. My problem is low-mid tones are too dark like many have mentioned and highs are clipped. But weirdly highs are not clipped with scanline filters and color look more pleasant with them so I go with scanlines on. To deal with dark low-mid tones, you can lower contrast to make them brighter as suggested by Natrox but it also lifts pure black. So I made a proof of concept gamma LUT that lifts low-mid without lifting black with simple curve up.

curve-low.png
curve-low.png (16.27 KiB) Viewed 16924 times

It's working for me so I hope someone with actual math skill can come up with a set of gamma LUTs. I attached my test txt that you can load up on Gamma correction filter option. This only deals with brightness, not color, obviously.

I tested with this ini setting:

Code: Select all

hdr=2

video_brightness=50
video_contrast=45
video_saturation=85
video_hue=0
video_gain_offset=1,0,1,0,1,0

I only tested it on my LG C2 with this setting:
Adjust Contrast: 100
Black Level: 50
Dynamic Tone Mapping: HGIG
Video Range: Limited (also limited on Mister)

I don't know if it's possible but it would be great if we could set HGIG values or even a list of hard coded values we can select. I think that could properly fix clipping highs and dark lows.

Attachments
HDR_Gamma_test_lift_low_01.zip
(526 Bytes) Downloaded 285 times
User avatar
thisisamigaspeaking
Posts: 244
Joined: Mon May 23, 2022 12:28 am
Has thanked: 79 times
Been thanked: 23 times

Re: New HDR Settings

Unread post by thisisamigaspeaking »

The colors look more off than if for example I set my Mac to Rec.2020 but don't set the monitor to Rec.2020 - which should be equivalent to what is happening here, right? Is the color space conversion definitely correct?

FoxbatStargazer
Top Contributor
Posts: 1016
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 315 times
Been thanked: 238 times

Re: New HDR Settings

Unread post by FoxbatStargazer »

KennyL wrote: Wed Dec 28, 2022 10:07 am

I've been playing around with it on my LG C2 and I like it. I'm not too married to accuracy so this is pretty fun option. My problem is low-mid tones are too dark like many have mentioned and highs are clipped. But weirdly highs are not clipped with scanline filters and color look more pleasant with them so I go with scanlines on.

Not that weird, it's Automatic Brightness Limiter (ABL), common in OLEDs. You can have intense bright spots but not across the entire screen at the same time. With scanlines darkening half the screen it opens up a bit more room to shine on the other half.

Remember the brightest spots in HDR are supposed to be for highlights only! Not blowing out your entire screen in max brightness as often happens in SDR.

User avatar
Retro-Nerd
Posts: 273
Joined: Fri Jul 08, 2022 2:47 am
Has thanked: 10 times
Been thanked: 79 times

Re: New HDR Settings

Unread post by Retro-Nerd »

Yes, something like ABL should be disabled with a service remote control. Or you get a completely dimmed image very fast when the stupid LG algorythm thinks the image doesn't get enough screenupdates. This happens in some movies/tv shows too.

This was never meant for a real HDR mode, with a texture/layer you know from modern games/movies. It's just a forced "HDR on" to get full luminance of your display, nothing else. Natrox did a good job in converting the colors, this is better than the RT5x can do it. And as many times explained, it's only use is to counter a too dark image when one use a CRT filter with scanlines and masks.

Try video_saturation=70 maybe this is colorwise closer to what one would expect. Look at my pic above. There is no black crush or highlights clipping. A bit colorful, but this is tweakable.

That you don't use the typical crappy image enhancer is self-explaining. Don't use something like dynamic contrast or dynamic tone mapping/HGIG.

naylord
Posts: 52
Joined: Sat May 21, 2022 11:55 pm
Has thanked: 20 times
Been thanked: 7 times

Re: New HDR Settings

Unread post by naylord »

I think you'd get similar results just pushing OLED brightness up on the SDR picture preset. I always worry about rounding errors when forcing color information to new containers like this. Like the gaps between the discrete brightness levels won't be preserved and you're more likely to see banding than you would if you just kept it in the native color space.

Still, a cool experiment I guess and there's no harm in trying it out.

User avatar
Retro-Nerd
Posts: 273
Joined: Fri Jul 08, 2022 2:47 am
Has thanked: 10 times
Been thanked: 79 times

Re: New HDR Settings

Unread post by Retro-Nerd »

I don't think so. The full luminance potential of the used display get's only unlocked with HDR on (forced or not).

User avatar
aberu
Core Developer
Posts: 1191
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 247 times
Been thanked: 411 times
Contact:

Re: New HDR Settings

Unread post by aberu »

Retro-Nerd wrote: Wed Dec 28, 2022 4:36 pm

Yes, something like ABL should be disabled with a service remote control.

"should be disabled" is not something I would ever give as advice. It will violate your warranty and it will increase the likelihood of burn-in occurring.

birdybro~
Post Reply