Skip to content

Reference Media Capabilities ColorGamut for color space capability - #225

Merged
markafoltz merged 14 commits into
mainfrom
colorspaces
Jan 24, 2022
Merged

markafoltz merged 14 commits into
mainfrom
colorspaces

Conversation

@pthatcherg

@pthatcherg pthatcherg commented Sep 16, 2019 •

Copy link
Copy Markdown
Contributor

Reference CSS Color Module Level 4 for color spaces


Preview | Diff


Preview | Diff

Reference CSS Color Module Level 4 for color spaces
@mwatson2

Copy link
Copy Markdown

It might be better to look to media capabilities rather than CSS if you are interested in expressing video capabilities. CSS does not yet support HDR, for example.

@markafoltz markafoltz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify the meaning of this field a bit and how a media sender would use it?

At the codec level, the color spaces that can be supported in the bitstream vary from the CSS4 list. VP9 (and AV1?) seem to use a different list.

Are these the possible color profiles supported by the physical display on the media receiver? Or the currently selected profile?

Comment thread index.bs Resolved
Comment thread index.bs Resolved
@markafoltz
markafoltz changed the base branch from gh-pages to master September 18, 2019 23:53
@markafoltz

Copy link
Copy Markdown
Contributor

This PR has been updated to refer instead to the ColorGamut enum from MediaCapabilities. As is discussed at length in w3c/media-capabilities#14, w3c/media-capabilities#118, w3c/media-capabilities#119 and the w3c/media-capabilities#124 PR, this is intended to model the color spaces that are understood by a video decoder.

Along with HDR metadata and transfer function, this should give the media sender sufficient information to send an HDR video track and have it understood by the media receiver.

With this change, requesting the capabilities of the actual display on the video receiver for various color profiles/color spaces would have to be done as a separate protocol feature.

@markafoltz markafoltz changed the title Reference CSS Color Module Level 4 for color spaces Reference Media Capabilities ColorGamut for color space capability Feb 23, 2021
Comment thread index.bs Resolved
@markafoltz

Copy link
Copy Markdown
Contributor

Tagging @chcunningham who offered to check this PR before landing :)

@chcunningham

Copy link
Copy Markdown

Values look correct.

FYI, MediaCapabilities chose these color gamut properties to align with CSS color-gamut https://drafts.csswg.org/mediaqueries/#color-gamut. But I'm totally flexible on whatever spec you want to reference.

Does "understood by the media receiver" mean the video pipeline understands the color space, or does it also mean display is capable of outputting in that color space? For MediaCapabilties, we are describing only the former. Callers are expected to additionally check CSS color-gamut to determine the display's capabilities. I'm not sure what makes the most sense for this API.

For MediaCapabilities, colorGamut is just one of 3 properties needed to support for a given flavor of HDR. The others are TransferFunction and HdrMetadataType. Do those make sense as additional parameters in this spec?

@markafoltz

Copy link
Copy Markdown
Contributor

Thanks for the comments @chcunningham!

Does "understood by the media receiver" mean the video pipeline understands the color space, or does it also mean display is capable of outputting in that color space?

We were largely waiting for resolution in the Media WG for how to model the difference between the two. It appears that w3c/media-capabilities#119 was closed by the addition of color-gamut to CSS Media Queries 5 (using the same values as Media Capabilities).

The question now, is does the sender need to know both the decoding and rendering color-gamut before it decides to send an HDR stream to the receiver? I would argue "no", because if the receiver's display was not capable of rendering a specific color-gamut, then there would be no reason to advertise its decoding capability for a given streaming session.

Advertisement via capabilities should mean that the receiver is both capable of receiving that color-gamut, and configured to display. I'll update the PR to clarify.

For MediaCapabilities, colorGamut is just one of 3 properties needed to support for a given flavor of HDR. The others are TransferFunction and HdrMetadataType. Do those make sense as additional parameters in this spec?

Yes they would, if they affect how the sender might want to encode media (or decide if a media stream was compatible with a receiver). I'd like to tackle that in a separate PR since conveying the HDR data over the wire could require additional changes to the protocol.

@chcunningham

Copy link
Copy Markdown

I would argue "no", because if the receiver's display was not capable of rendering a specific color-gamut, then there would be no reason to advertise its decoding capability for a given streaming session.

SGTM. One thing to point out: for MC we chose to avoid display capabilities in part because you can have multiple displays with distinct capabilities. CSS handles this gracefully. But I could see this not being an issue for your use case - do you assume receivers have just one screen?

I'd like to tackle that in a separate PR since conveying the HDR data over the wire could require additional changes to the protocol.

SGTM

@markafoltz

Copy link
Copy Markdown
Contributor

But I could see this not being an issue for your use case - do you assume receivers have just one screen?

The protocol doesn't have a way to target a stream to a specific screen, so I would say that is the case. If there are multiple screens with different capabilities, they could be represented as different agents (endpoints). For the majority of smart TV/presentation device scenarios, this should be fine.

@markafoltz

Copy link
Copy Markdown
Contributor

Leaving this open for a few more days in case folks want to look at the current version of the PR.

@markafoltz
markafoltz merged commit 5d682cc into main Jan 24, 2022
@markafoltz
markafoltz deleted the colorspaces branch January 24, 2022 17:03
github-actions Bot added a commit that referenced this pull request Jan 24, 2022
SHA: 5d682cc
Reason: push, by @mfoltzgoogle

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants