summaryrefslogtreecommitdiffstats
path: root/video/csputils.h
diff options
context:
space:
mode:
Diffstat (limited to 'video/csputils.h')
-rw-r--r--video/csputils.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/video/csputils.h b/video/csputils.h
index 9e81c90ebf..8b63ac3905 100644
--- a/video/csputils.h
+++ b/video/csputils.h
@@ -218,6 +218,14 @@ struct mp_csp_col_xy {
float x, y;
};
+static inline float mp_xy_X(struct mp_csp_col_xy xy) {
+ return xy.x / xy.y;
+}
+
+static inline float mp_xy_Z(struct mp_csp_col_xy xy) {
+ return (1 - xy.x - xy.y) / xy.y;
+}
+
struct mp_csp_primaries {
struct mp_csp_col_xy red, green, blue, white;
};
@@ -268,6 +276,7 @@ struct mp_cmat {
float c[3];
};
+void mp_get_rgb2xyz_matrix(struct mp_csp_primaries space, float m[3][3]);
void mp_get_cms_matrix(struct mp_csp_primaries src, struct mp_csp_primaries dest,
enum mp_render_intent intent, float cms_matrix[3][3]);