w3c / ColorWeb-CG

repo for the Color on the Web Community Group
47 stars 21 forks source link

Interpreting masteringDisplayMetadata #97

Closed palemieux closed 1 year ago

palemieux commented 1 year ago

How should masteringDisplayMetadata be interpreted when set on a Canvas element?

Why set masteringDisplayMetadata on a Canvas element?

What happens if multiple images with different masteringDisplayMetadata are drawn on the same Canvas element:

are drawn in a Canvas configured with dataType="float16" and colorSpace="rec2100-pq".

Should masteringDisplayMetadata be set on the Canvas and, if so, to what values? For example, should masteringDisplayMetadata be set to the superset of color volume A and B?

palemieux commented 1 year ago

Based on the 2023-05-03 telecon, specifying masteringDisplayMetadata on a Canvas element should allow some control over tone-mapping, if any is performed.

This requires that a metadata-driven tone-mapping method be recommended. Options include:

  1. SMPTE ST 2094-10, Annex B
  2. ITU BT.2408, Annex 5
  3. ITU BT.2446, Method A

Demo

(1) requires average image luminance in addition to max and min luminance, which would presumably need to be included in addition to masteringDisplayMetadata.

Metadata-driven tone-mapping metadata is usually more precise than methods that are independent of image statistics, and more efficient than methods that requires image statistics to be computed. They are also useful when tone-mapping sequence of images, where image statistics might fluctuate but tone-mapping should remain stable.

ppaalanen commented 1 year ago

Yes. I believe the metadata is also intended to guide color gamut mapping, especially from BT.2020 container format down to display native gamut.