Skip to content

Commit

Permalink
Merge pull request #300 from w3c/issue-194-hdr
Browse files Browse the repository at this point in the history
Add transfer-functions and hdr-metadata to video-capabilities.
  • Loading branch information
markafoltz authored Nov 7, 2022
2 parents 37cef31 + cd9280d commit 246bc07
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
23 changes: 21 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1702,15 +1702,34 @@ following additional fields:
display could return this value as 1.6 to indicate its preferred content
scaling. Default is none.

Issue(194): Expose capabilities for decoding HDR transfer functions and metadata formats.

: color-gamuts (optional)
:: An optional field indicating what color spaces can be decoded and rendered by
the media receiver. The media sender may use these values to determine how
to encode video. Valid values correspond to [[MEDIA-CAPABILITIES#colorgamut|ColorGamut]]
in the [[!MEDIA-CAPABILITIES|Media Capabilities]] API. The default value is
a list with the single entry "srgb".

: hdr-formats (optional)
:: An optional field indicating what HDR transfer functions and metadata formats
can be decoded and rendered by the media receiver. Each `video-hdr-format`
consists of two fields, `transfer-function` and `hdr-metadata`.

The `transfer-function` field must be a valid
[[MEDIA-CAPABILITIES#transferfunction|TransferFunction]]
and the `hdr-metadata` field must be a valid
[[MEDIA-CAPABILITIES#hdrmetadatatype|HdrMetadataType]], both defined in the
[[!MEDIA-CAPABILITIES|Media Capabilities]] API.

If a `video-hdr-format` is provided with a `transfer-function` but no
`hdr-metadata`, then the media receiver can render the `transfer-function`
without any associated metadata. (This is the case, for example, with the
"hlg" `transfer-function`.)

The media receiver should ignore duplicate entries in `hdr-formats.`
If no `hdr-formats` are listed, then the media reciever cannot decode any
HDR formats.


: native-resolutions (optional)
:: An optional field indicating what video-resolutions the media receiver supports and
considers to be "native," meaning that scaling is not required.
Expand Down
6 changes: 6 additions & 0 deletions messages_appendix.cddl
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,11 @@ video-resolution = {
1: uint ; width
}

video-hdr-format = {
0: transfer-function ; string
1: ? hdr-metadata ; string
}

receive-video-capability = {
0: format ; codec
? 1: video-resolution ; max-resolution
Expand All @@ -564,6 +569,7 @@ receive-video-capability = {
? 7: [* video-resolution] ; native-resolutions
? 8: bool ; supports-scaling
? 9: bool ; supports-rotation
? 10: [* video-hdr-format] ; hdr-formats
}

receive-data-capability = {
Expand Down

0 comments on commit 246bc07

Please sign in to comment.