Vero 4K HDMI colour space output

I’ve looked over my notes and a couple of thoughts:

We need to decouple colourspace from bit-depth in the future. In the interim:

  • We could look at putting Vero 4K in 10-bit output from Kodi. The advantage is also that users get a GUI option to control this behaviour. A mode like ‘Auto’ could evaluate hints from the video and set the sysfs parameter only when it makes sense to do so; switching back when playback stops.
  • Patch hdmitx_set_avi_colorimetry(struct hdmi_format_para *para) for AV Infoframe (signalling) and hdmitx_hdmi_dvi_config(struct hdmitx_dev *hdev (tell CSC what we’re doing)
  • AMVECM’s colourspace correction can be improved:
/* bit 0: use source primary,
   bit 1: use display primary,
   bit 2: adjust contrast according to source lumin,
   bit 3: adjust saturation according to source lumin */
uint hdr_flag = (1 << 0) | (1 << 1) | (0 << 2) | (0 << 3);
module_param(hdr_flag, uint, 0664);
MODULE_PARM_DESC(hdr_flag, "\n set hdr_flag\n");

There are a lot of options available via sysfs, but unfortunately documentation is sparse. See vero3-linux/amcsc.c at master · osmc/vero3-linux · GitHub.

There is also the potential to improve HDR → SDR colour saturation (I saw a post on this recently where a user wanted a brighter picture).