Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libobs-d3d11: Add display primaries to the log #9975

Merged
merged 1 commit into from Dec 10, 2023

Conversation

jpark37
Copy link
Collaborator

@jpark37 jpark37 commented Dec 8, 2023

Description

Can't hurt to know what Windows thinks the mastering primaries are.

Motivation and Context

Doubt this info would be used in a support situation, but it could. Plus it's fun to have the info there.

How Has This Been Tested?

Example output:

22:04:00.652: 	    space=RGB_FULL_G2084_NONE_P2020
22:04:00.652: 	    primaries=[r=(0.679688, 0.312500), g=(0.281250, 0.666016), b=(0.154297, 0.066406), wp=(0.312500, 0.329102)]
22:04:00.652: 	    relative_gamut_area=[709=1.266340, P3=0.933509, 2020=0.669730]
22:04:00.652: 	    sdr_white_nits=100

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

Can't hurt to know what Windows thinks the mastering primaries are.
@WizardCM WizardCM added the Enhancement Improvement to existing functionality label Dec 9, 2023
@WizardCM
Copy link
Member

WizardCM commented Dec 9, 2023

I'm curious, what triggered this PR? Is it an issue that has come up often in your troubleshooting? Is there documentation (even on Wikipedia) that'd explain to a support volunteer how to understand these numbers?

@WizardCM WizardCM added the Windows Affects Windows label Dec 9, 2023
@jpark37
Copy link
Collaborator Author

jpark37 commented Dec 9, 2023

All three "important" gamut triangles (Rec. 709, P3, Rec. 2020) are on this page.
https://en.wikipedia.org/wiki/DCI-P3

Examples of wide color (use a monitor with HDR enabled):
https://webkit.org/blog-files/color-gamut/

The coordinates define a triangle of color reproducibility. This information can be set in HDR metadata, which is a soft promise that the colors will not go outside of that triangle because you as the author couldn't see those colors to tune them.

One way OBS could use this information in the future is to remap colors for HDR preview so broadcasters have a gamut-remapped view that doesn't clip colors outside of their display range.

Another future use would be to copy the display primaries (manually or automaticly) into the output video metadata, which we currently just hardcode to Display P3 coordinates IIRC. A broadcaster may not want to do that though if they want to preserve colors even if they can't see them.

Also note that the reported primaries can be of dubious accuracy, and the Windows HDR calibration tool has also been reported to clamp the reported gamut to Rec. 709 although not on my machine.

@Lain-B
Copy link
Collaborator

Lain-B commented Dec 10, 2023

Thank you for the detailed explanation

@Lain-B Lain-B merged commit a372f3f into obsproject:master Dec 10, 2023
14 checks passed
@jpark37 jpark37 deleted the display-gamut branch December 10, 2023 18:44
@RytoEX RytoEX added this to the OBS Studio (Next Version) milestone Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement to existing functionality Windows Affects Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants