Commits on Source (9)
-
This adds color_chracteristics field in weston_output. This field is intended to be set by compositor frontends and read by color managers. Color managers can use this information when choosing the output color space and dynamic range, particularly when no ICC profile has been set. This is most useful for HDR outputs, where the HDR static metadata for PQ mode or the display luminance parameters for HLG mode can be based on color_characteristics. The fields of weston_color_characteristics mirror the information available in EDID. However, using EDID information as-is has several caveats, so the decision to use EDID for this is left for the frontend and ultimately to the end user. There are no defined ranges or validity checks for this data. The color manager will have to validate the values against whatever it is using them for. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
3696d9b6 -
This adds an option to program basic display color characteristics from weston.ini. In the future there will be a way to set this information from EDID, but because EDID is unreliable that will probably not be the default. An ICC profile will likely override most or all of this. The main reason to add this option is to be able to characterise HDR monitors. An 'output' section can have a key 'color_characteristics' (string) set to a name. The name refers to any 'color_characteristics' section with 'name' set to the same string. The 'name' key of a 'color_characteristics' section cannot contain a colon ':'. Names with colon in 'output' section key 'color_characteristics' value are reserved for future use, e.g. to indicate that the metadata is to be taken from EDID instead of a weston.ini section. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
518d72a3 -
This adds hdr_meta field in weston_output_color_outcome. This field is intended to be set by color manager modules, and read by backends which will send the information to the video sink in SMPTE ST 2084 mode a.k.a Perceptual Quantizer HDR system. Such metadata is essential in ST 2084 mode for the video sink to produce a good picture. The validation of the data and the group split is based on the HDR Static Metata Type 1 definition in CTA-861-G specification. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
cea53a90 -
This is the beginnings of creating composited content HDR metadata for the ST2084 HDR mode. The immediate goal is to allow essentially setting the HDR metadata from weston.ini, so that it can be experimented with. Setting an output ICC profile will stop weston.ini metadata from taking effect, but using an ICC profile in HDR mode is an open question anyway. maxDML, maxCLL, and minDML are set based on the assumption that we want to make use of the full sink/monitor dynamic range. This also adds several TODOs about how we should handle output profiles, basic output color characteristics, and HDR metadata. Implementing these properly will take more thought and effort. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
e108c1a2 -
Check that weston.ini settings to eotf-mode and basic color characteristics are correctly parsed. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
e13e64c4 -
'color_characteristics_config_error' test ensures that all code paths in parse_color_characteristics() and wet_output_set_color_characteristics() get exercised. The return value and logged error messages are checked. Other cases test the weston_hdr_metadata_type1 validation. These are for the sake of test coverage, but also an example of how to test a function from main.c, and how to capture messages from weston_log(). Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
ccb4c383 -
This creates a new file for KMS related color code, to avoid making drm.c even longer. The moved code was just added in 5151f9fe so the new file copyrights are written based on that. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
c4fedd50 -
Forward the HDR Static Metadata Type 1 to the video sink. This makes the sink aware of our video content parameters and may be able to produce a better picture. This type of metadata is used only with the ST 2084 HDR mode a.k.a PQ. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
c217453c -
Output color profile may be changed in flight. Output basic color characteristics and EOTF mode cannot yet be changed in flight, but it is reasonable to assume they could in the future. Therefore the color outcome data may change in flight as well, which is the basis for HDR metadata, which needs to be updated as well. Track the changes to color outcome data with a serial number. DRM-backend checks the serial number to see if it needs to re-create the HDR metadata blob. This allows the changes to propagate all the way to KMS. The code added here is more of a reminder of what should happen than a tested path. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
8ebebb20
compositor/weston-private.h
0 → 100644
libweston/backend-drm/kms-color.c
0 → 100644
tests/color-metadata-errors-test.c
0 → 100644
tests/color-metadata-parsing-test.c
0 → 100644