From 9b5aa0aca36bb54e58c02433f36a2d6e9b3f1697 Mon Sep 17 00:00:00 2001 From: "mark a. foltz" Date: Fri, 9 Sep 2022 15:47:00 -0700 Subject: [PATCH 1/3] Add transfer-functions and hdr-metadata to video-capabilities. --- index.bs | 15 +++++++++++++-- messages_appendix.cddl | 8 +++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/index.bs b/index.bs index 1c73be2..df7b34b 100644 --- a/index.bs +++ b/index.bs @@ -1694,8 +1694,6 @@ 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 @@ -1703,6 +1701,19 @@ Issue(194): Expose capabilities for decoding HDR transfer functions and metadata in the [[!MEDIA-CAPABILITIES|Media Capabilities]] API. The default value is a list with the single entry "srgb". +: transfer-functions (optional) +:: An optional field indicating what HDR transfer functions can be decoded and rendered + by the media receiver. Valid values correspond to + [[MEDIA-CAPABILITIES#transferfunction|TransferFunction]] in the + [[!MEDIA-CAPABILITIES|Media Capabilities]] API. The default value is a list with the + single entry "srgb". + +: hdr-metadata (optional) +:: An optional field indicating what HDR metadata types can be decoded and rendered by + by the media receiver. Valid values correspond to + [[MEDIA-CAPABILITIES#hdrmetadatatype|HdrMetadataType]] in the + [[!MEDIA-CAPABILITIES|Media Capabilities]] API. The default value is an empty list. + : 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. diff --git a/messages_appendix.cddl b/messages_appendix.cddl index 08c5534..ea9e28d 100644 --- a/messages_appendix.cddl +++ b/messages_appendix.cddl @@ -561,9 +561,11 @@ receive-video-capability = { ? 4: uint ; min-bit-rate ? 5: ratio ; aspect-ratio ? 6: [* string] ; color-gamuts - ? 7: [* video-resolution] ; native-resolutions - ? 8: bool ; supports-scaling - ? 9: bool ; supports-rotation + ? 7: [* string] ; transfer-functions + ? 8: [* string] ; hdr-metadata + ? 9: [* video-resolution] ; native-resolutions + ? 10: bool ; supports-scaling + ? 11: bool ; supports-rotation } receive-data-capability = { From 3d1a69878e26702a7a8eb50c8168c1e5636af86a Mon Sep 17 00:00:00 2001 From: "mark a. foltz" Date: Mon, 31 Oct 2022 10:23:21 -0700 Subject: [PATCH 2/3] Update PR per spec --- index.bs | 31 +++++++++++++++++++------------ messages_appendix.cddl | 14 +++++++++----- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/index.bs b/index.bs index e6a95c7..8c1c8fc 100644 --- a/index.bs +++ b/index.bs @@ -1709,18 +1709,25 @@ following additional fields: in the [[!MEDIA-CAPABILITIES|Media Capabilities]] API. The default value is a list with the single entry "srgb". -: transfer-functions (optional) -:: An optional field indicating what HDR transfer functions can be decoded and rendered - by the media receiver. Valid values correspond to - [[MEDIA-CAPABILITIES#transferfunction|TransferFunction]] in the - [[!MEDIA-CAPABILITIES|Media Capabilities]] API. The default value is a list with the - single entry "srgb". - -: hdr-metadata (optional) -:: An optional field indicating what HDR metadata types can be decoded and rendered by - by the media receiver. Valid values correspond to - [[MEDIA-CAPABILITIES#hdrmetadatatype|HdrMetadataType]] in the - [[!MEDIA-CAPABILITIES|Media Capabilities]] API. The default value is an empty list. +: 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` 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`.) + + 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 diff --git a/messages_appendix.cddl b/messages_appendix.cddl index ea9e28d..5cbb49d 100644 --- a/messages_appendix.cddl +++ b/messages_appendix.cddl @@ -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 @@ -561,11 +566,10 @@ receive-video-capability = { ? 4: uint ; min-bit-rate ? 5: ratio ; aspect-ratio ? 6: [* string] ; color-gamuts - ? 7: [* string] ; transfer-functions - ? 8: [* string] ; hdr-metadata - ? 9: [* video-resolution] ; native-resolutions - ? 10: bool ; supports-scaling - ? 11: bool ; supports-rotation + ? 7: [* video-hdr-format] ; hdr-formats + ? 8: [* video-resolution] ; native-resolutions + ? 9: bool ; supports-scaling + ? 10: bool ; supports-rotation } receive-data-capability = { From cd9280d13d676fe43ddc13b75bdc474240ac425a Mon Sep 17 00:00:00 2001 From: "mark a. foltz" Date: Mon, 31 Oct 2022 10:38:26 -0700 Subject: [PATCH 3/3] Clarify handling of dupes. Reorder fields. --- index.bs | 3 ++- messages_appendix.cddl | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/index.bs b/index.bs index 8c1c8fc..d85a2d5 100644 --- a/index.bs +++ b/index.bs @@ -1716,7 +1716,7 @@ following additional fields: The `transfer-function` field must be a valid [[MEDIA-CAPABILITIES#transferfunction|TransferFunction]] - and the `hdr-metadata` must be a valid + and the `hdr-metadata` field must be a valid [[MEDIA-CAPABILITIES#hdrmetadatatype|HdrMetadataType]], both defined in the [[!MEDIA-CAPABILITIES|Media Capabilities]] API. @@ -1725,6 +1725,7 @@ following additional fields: 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. diff --git a/messages_appendix.cddl b/messages_appendix.cddl index 5cbb49d..6a10aca 100644 --- a/messages_appendix.cddl +++ b/messages_appendix.cddl @@ -566,10 +566,10 @@ receive-video-capability = { ? 4: uint ; min-bit-rate ? 5: ratio ; aspect-ratio ? 6: [* string] ; color-gamuts - ? 7: [* video-hdr-format] ; hdr-formats - ? 8: [* video-resolution] ; native-resolutions - ? 9: bool ; supports-scaling - ? 10: bool ; supports-rotation + ? 7: [* video-resolution] ; native-resolutions + ? 8: bool ; supports-scaling + ? 9: bool ; supports-rotation + ? 10: [* video-hdr-format] ; hdr-formats } receive-data-capability = {