mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
render/color: add wlr_color_primaries_to_xyz()
This commit is contained in:
parent
d8ad4809fc
commit
156201fe71
3 changed files with 68 additions and 0 deletions
|
|
@ -45,4 +45,9 @@ struct wlr_color_transform_lut3d {
|
|||
struct wlr_color_transform_lut3d *wlr_color_transform_lut3d_from_base(
|
||||
struct wlr_color_transform *tr);
|
||||
|
||||
/**
|
||||
* Compute the matrix to convert RGB color values to CIE 1931 XYZ.
|
||||
*/
|
||||
void wlr_color_primaries_to_xyz(const struct wlr_color_primaries *primaries, float matrix[static 9]);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -12,6 +12,20 @@
|
|||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/**
|
||||
* CIE 1931 xy chromaticity coordinates.
|
||||
*/
|
||||
struct wlr_color_cie1931_xy {
|
||||
float x, y;
|
||||
};
|
||||
|
||||
/**
|
||||
* Color primaries and white point describing a color volume.
|
||||
*/
|
||||
struct wlr_color_primaries {
|
||||
struct wlr_color_cie1931_xy red, green, blue, white;
|
||||
};
|
||||
|
||||
/**
|
||||
* A color transformation formula, which maps a linear color space with
|
||||
* sRGB primaries to an output color space.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue