Skip to content

color: Add enum definitions of code points

Enumerations for color primaries and transfer function as per discussion in wayland-protocols/!14.

The color primaries enum tries to use common names of color spaces, where they exist. It has no equivalent of the following H273 code points:

  • smpte_240m (7) is a variant equal to ntsc (6).
  • ebu3213 (22) is apparently revoked in a newer version of H273 (that I was not able to find): https://github.com/AOMediaCodec/libavif/issues/879, which results in a defined color space with no recognized name. Since it is not used anywhere it is not a useful color space. The real ebu3213 is equivalent to pal (5) and would not be included separately like smpte_240m.

A couple of color spaces could instead be reasonably named after ITU specs:

  • srgb -> bt709
  • pal_m -> bt407
  • pal -> bt601-652
  • ntsc -> bt601-525

The transfer function enumeration is mostly taken from !36 (closed). H273 references have been added.

Naming of the enumerations and related methods is probably worthy of a bike-shed. I didn't want to use cicp given this isn't strictly H237, so the protocol now refers to these values as "named primaries" and "named transfer functions".

Edited by Victoria Brekenfeld

Merge request reports

Loading