(Feature+Bugfix) Add HDR metadata tweaking options + fix HDR HDMI limited #740
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello Sorg,
This is another HDR-related PR. It's a small one, the feature was frequently requested in Discord and on the forum, and the bug I fixed was reported by a forum user as well.
Two options have been added to
MiSTer.ini
:hdr_max_nits
: Maximum brightness supported by display (MaxCLL).hdr_avg_nits
: Average brightness (MaxFALL).These values are reported to the display via metadata. Because this meant the metadata is no longer static, I have added checksum calculation as required.
Not all displays listen to these values. For example, my LG C8 TV completely ignores it. However, some other TVs and HDR monitors do make use of these values. It is unpredictable, but this gives users the ability to try and optimize for their display.
I have also fixed a bug related to HDMI limited in HDR-mode. The YPbPr bugfix broke HDMI limited color space conversion when using HDR - I have corrected the code and simplified the base CSC selection for clarity.
Impact
Default values for the new ini options are set to what the metadata had already (1000 and 250 respectively), so users will not need to take any action if they are happy with their setup.
HDMI limited users will no longer have problems with clipping colors.
For the conceivable future, I consider this the final change in HDR logic. It is pretty much feature complete at this point - not much more can be done with our hardware.
Thank you for your hard work!