videoaggregator: Create a new GstVideoAggregator baseclass
[platform/upstream/gstreamer.git] / gst-libs / gst / video / gstcms.h
1 /* GStreamer
2  * Copyright (C) 2008 David Schleef <ds@entropywave.com>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19
20 #ifndef _GST_CMS_H_
21 #define _GST_CMS_H_
22
23 #include <gst/gst.h>
24
25 G_BEGIN_DECLS
26
27 typedef struct _Color Color;
28 typedef struct _ColorMatrix ColorMatrix;
29
30 struct _Color
31 {
32   double v[3];
33 };
34
35 struct _ColorMatrix
36 {
37   double m[4][4];
38 };
39
40 void color_xyY_to_XYZ (Color * c);
41 void color_XYZ_to_xyY (Color * c);
42 void color_set (Color * c, double x, double y, double z);
43 void color_matrix_set_identity (ColorMatrix * m);
44 void color_matrix_dump (ColorMatrix * m);
45 void color_matrix_multiply (ColorMatrix * dst, ColorMatrix * a, ColorMatrix * b);
46 void color_matrix_apply (ColorMatrix * m, Color * dest, Color * src);
47 void color_matrix_offset_components (ColorMatrix * m, double a1, double a2,
48     double a3);
49 void color_matrix_scale_components (ColorMatrix * m, double a1, double a2, double a3);
50 void color_matrix_YCbCr_to_RGB (ColorMatrix * m, double Kr, double Kb);
51 void color_matrix_RGB_to_YCbCr (ColorMatrix * m, double Kr, double Kb);
52 void color_matrix_build_yuv_to_rgb_601 (ColorMatrix * dst);
53 void color_matrix_build_bt709_to_bt601 (ColorMatrix * dst);
54 void color_matrix_build_rgb_to_yuv_601 (ColorMatrix * dst);
55 void color_matrix_invert (ColorMatrix * m);
56 void color_matrix_copy (ColorMatrix * dest, ColorMatrix * src);
57 void color_matrix_transpose (ColorMatrix * m);
58 void color_matrix_build_XYZ (ColorMatrix * dst,
59     double rx, double ry,
60     double gx, double gy, double bx, double by, double wx, double wy);
61 void color_matrix_build_rgb_to_XYZ_601 (ColorMatrix * dst);
62 void color_matrix_build_XYZ_to_rgb_709 (ColorMatrix * dst);
63 void color_matrix_build_XYZ_to_rgb_dell (ColorMatrix * dst);
64 void color_transfer_function_apply (Color * dest, Color * src);
65 void color_transfer_function_unapply (Color * dest, Color * src);
66 void color_gamut_clamp (Color * dest, Color * src);
67
68 G_END_DECLS
69
70 #endif
71