-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[HDR] Use ExtendedDisplayP3 as the HDR backing store colorSpace on iOS #47313
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
[HDR] Use ExtendedDisplayP3 as the HDR backing store colorSpace on iOS #47313
Conversation
EWS run on previous version of this PR (hash 340e1ff) |
340e1ff
to
0125679
Compare
EWS run on previous version of this PR (hash 0125679) |
Can you expand on how a color space affects tone mapping? Commonly, it is only the headroom that has affect as all changing from extended SRGB to extended P3 does is change the coordinate space. |
I really do not know the difference between the tone-mapping to SRGB versus the tone-mapping to P3 on iOS. This was recommended internally by macOS system frameworks teams. I think iOS might have tone-mapping calculations tuned for P3 better than it for SRGB. |
@@ -45,7 +42,11 @@ std::optional<DestinationColorSpace> contentsFormatExtendedColorSpace(ContentsFo | |||
#endif | |||
#if ENABLE(PIXEL_FORMAT_RGBA16F) && ENABLE(DESTINATION_COLOR_SPACE_EXTENDED_REC_2020) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you stop using Rec2020 below it's' weird to still have this #if ...DESTINATION_COLOR_SPACE_EXTENDED_REC_2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
0125679
to
08ec995
Compare
EWS run on previous version of this PR (hash 08ec995) |
Given this can give different results, this feels like something we should be really clear on. I think before changing this kind of thing, getting more details on exactly what is different, and making sure those differences are tested, makes sense. |
Also, if macOS and iOS are giving different results, that seems like a bad thing, no? |
The PR also changes things to use ExtendedSRGB on all other platforms, instead of ExtendedRec2020, so the commit message should state that. |
08ec995
to
2364e58
Compare
EWS run on current version of this PR (hash 2364e58) |
I changed the PR to use |
On macOS, we rely on one of two things to get the colorSpace of the backing stores:
I am not aware of a more robust way to calculate the colorSpace on iOS. Please let me know if there is a better way to do that. |
There is no real technical reason for choosing The recommendation was to use an extended color for HDR backing store so I chose Recently we received reports about differences in the display between macOS and iOS when displaying gain-map images and when tone-mapping HDR images to SDR images. |
System tonemapping is not applied for non-extended color spaces. |
2364e58
to
5fe83f4
Compare
https://bugs.webkit.org/show_bug.cgi?id=295118 rdar://153919243 Reviewed by Mike Wyrzykowski and Simon Fraser. For compositing HDR drawing on macOS, the DisplayColorSpace should be used to avoid extra colorSpace conversion. For compositing HDR drawing on iOS, using ExtendedDisplayP3 ensures any blending operations happen in the same gamma space as the compositor. For non compositing HDR drawing, ExtendedDisplayP3 will be used for everything else on macOS and iOS. * Source/WebCore/platform/graphics/ContentsFormat.cpp: (WebCore::contentsFormatExtendedColorSpace): Canonical link: https://commits.webkit.org/296814@main
5fe83f4
to
c52a198
Compare
Committed 296814@main (c52a198): https://commits.webkit.org/296814@main Reviewed commits have been landed. Closing PR #47313 and removing active labels. |
c52a198
2364e58