Open ccameron-chromium opened 10 months ago
Probably the simplest scheme for solving this would be add a property to the Screen
interface.
To avoid fingerprinting, implementations would probably want to round the value to to the nearest power-of-two, unless specific permission is granted.
Please consider the latest recommendation of the Color on the Web CG on adding output color volume information (including luminance headroom information) to the Screen interface of the CSS Object Model:
If it's the case that referenceWhiteLuminance
depends on viewing conditions which influence screen brightness, then WebKit objects to adding that. A web page should not be able to detect the viewing conditions in effect; it should not be able to detect when you walk outside, for instance. And I don't think there's a user prompt that could be worded in a way that users would understand that this access could be gated on.
The preferred approach is to allow authors to supply a list of assets, and have the UA pick the appropriate asset (like srcset
).
The preferred approach is to allow authors to supply a list of assets, and have the UA pick the appropriate asset (like srcset).
That approach doesn't really work well in the case where there is a single asset which can adapt to a range of HDR headroom values. One example of that approach is being standardized in ISO TC 42/WG 23 on Gain Maps. A single image resource has an SDR baseline image and a gain map; from that information a variety of HDR renderings can be reconstructed, corresponding to the actual HDR headroom.
That work is being driven and implemented by Apple, and Adobe.
Another example would be a web app which draws to Canvas 2D context, which computes a tone mapping curve in real time following the procedure in section 5.4.1 Mapping to display with limited brightness range of ITU Rec_BT.2390.
HDR is being widely adopted by native apps. The web also needs to adopt it, and one size definitely does not fit all viewing conditions. Presumably WebKit would not want to hold that back, especially since the Apple platforms on which it primarily runs already have that HDR headroom adaptation capability.
How can we move forward on this in a way that provides the capability in a privacy-sensitive way?
@ccameron-chromium wrote:
To avoid fingerprinting, implementations would probably want to round the value to to the nearest power-of-two, unless specific permission is granted.
So, that would give headroom values of 1 (_i.e._SDR), 2, 4 and 8 ? Or would 16 (three stops above reference white) also be useful, in a consumer web delivery context? At an SDR white of 100 nits those would correspond to peak white luminances of 200, 400, 800 and 1600 nits.
The CSS Working Group just discussed [css-color-hdr] Add mechanism to query HDR headroom
, and agreed to the following:
RESOLUTION adopt the CSS Color HDR draft as a work item
RESOLVED: CSS WG adopts the CSS Color HDR draft as a work item
@smfr there were some questions for you above, regarding how to expose this existing capability on the Web Platform.
On https://lightroom.adobe.com we'll need this to enable meaningful HDR editing, as you really need to know the amount of HDR headroom you're seeing to accurately understand the preview. For example, in the current Lightroom Desktop UI, as well as in the Adobe Camera Raw UI in Photoshop, we display a histogram of the image, along with a white line showing the peak brightness of the current monitor. It's very common to change brightness as you're editing to test different ranges, so having live updates to this during an editing session is needed,
It would be very reasonable to require the user to opt-in to this given the privacy implications.
The current dynamic-range media query indicates a binary value indicating if the screen is HDR (
high
) or SDR (standard
).The capability of an HDR screen is parameterized by its HDR headroom (how many times brighter than SDR white it can produce). This parameter is dynamic. It depends on the viewing conditions and the content on-screen.
This issue is to explore mechanisms for exposing this parameter.