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

avfilter/colorspace: fix dovi peak calculation #405

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

gnattu
Copy link
Member

@gnattu gnattu commented Jun 24, 2024

The max PQ to max mastering display luminance calculation is wrong and not within the scale of ffmpeg. This will overflow the pixels during tone mapping unless the user supplies a peak value to overwrite this.

  • No need to multiply by reference white for PQ to luminance
  • The ffmpeg brightness scale for SMPTE ST.2084 is 100 not 10000

Before: 811943.437500
After: 399.9721366995 (4000 nit master display)

Changes

Issues

The max PQ to max mastering display luminance calculation is wrong and not within the scale of ffmpeg. This will overflow the pixels during tone mapping unless the user supplies a peak value to overwrite this.

- No need to multiply by reference white for PQ to luminance
- The ffmpeg brightness scale for SMPTE ST.2084 is 100 not 10000

Before: 811943.437500
After: 399.9721366995 (4000 nit master display)
@gnattu gnattu requested a review from a team June 24, 2024 16:49
@gnattu
Copy link
Member Author

gnattu commented Jun 24, 2024

ubuntu noble fails again, not related to this particular PR

@nyanmisaka nyanmisaka merged commit 44e1bf0 into jellyfin Jun 25, 2024
23 of 28 checks passed
@nyanmisaka nyanmisaka deleted the fix-dovi-peak-calculation branch June 25, 2024 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants