1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Support for Intel Camera Imaging ISP subsystem.
4  * Copyright (c) 2015, Intel Corporation.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms and conditions of the GNU General Public License,
8  * version 2, as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13  * more details.
14  */
15 
16 #ifndef __IA_CSS_GC2_HOST_H
17 #define __IA_CSS_GC2_HOST_H
18 
19 #include "ia_css_gc2_types.h"
20 #include "ia_css_gc2_param.h"
21 #include "ia_css_gc2_table.host.h"
22 
23 extern const struct ia_css_cc_config default_yuv2rgb_cc_config;
24 extern const struct ia_css_cc_config default_rgb2yuv_cc_config;
25 
26 void
27 ia_css_yuv2rgb_encode(
28     struct sh_css_isp_csc_params *to,
29     const struct ia_css_cc_config *from,
30     unsigned int size);
31 
32 void
33 ia_css_rgb2yuv_encode(
34     struct sh_css_isp_csc_params *to,
35     const struct ia_css_cc_config *from,
36     unsigned int size);
37 
38 void
39 ia_css_r_gamma_vamem_encode(
40     struct sh_css_isp_rgb_gamma_vamem_params *to,
41     const struct ia_css_rgb_gamma_table *from,
42     unsigned int size);
43 
44 void
45 ia_css_g_gamma_vamem_encode(
46     struct sh_css_isp_rgb_gamma_vamem_params *to,
47     const struct ia_css_rgb_gamma_table *from,
48     unsigned int size);
49 
50 void
51 ia_css_b_gamma_vamem_encode(
52     struct sh_css_isp_rgb_gamma_vamem_params *to,
53     const struct ia_css_rgb_gamma_table *from,
54     unsigned int size);
55 
56 #ifndef IA_CSS_NO_DEBUG
57 void
58 ia_css_yuv2rgb_dump(
59     const struct sh_css_isp_csc_params *yuv2rgb,
60     unsigned int level);
61 
62 void
63 ia_css_rgb2yuv_dump(
64     const struct sh_css_isp_csc_params *rgb2yuv,
65     unsigned int level);
66 
67 void
68 ia_css_rgb_gamma_table_debug_dtrace(
69     const struct ia_css_rgb_gamma_table *config,
70     unsigned int level);
71 
72 #define ia_css_yuv2rgb_debug_dtrace ia_css_cc_config_debug_dtrace
73 #define ia_css_rgb2yuv_debug_dtrace ia_css_cc_config_debug_dtrace
74 #define ia_css_r_gamma_debug_dtrace ia_css_rgb_gamma_table_debug_dtrace
75 #define ia_css_g_gamma_debug_dtrace ia_css_rgb_gamma_table_debug_dtrace
76 #define ia_css_b_gamma_debug_dtrace ia_css_rgb_gamma_table_debug_dtrace
77 
78 #endif
79 
80 #endif /* __IA_CSS_GC2_HOST_H */
81