2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 #include "ia_css_types.h"
16 #include "sh_css_defs.h"
17 #ifndef IA_CSS_NO_DEBUG
18 /* FIXME: See BZ 4427 */
19 #include "ia_css_debug.h"
21 #include "csc/csc_1.0/ia_css_csc.host.h"
24 #include "ia_css_gc2.host.h"
26 const struct ia_css_cc_config default_yuv2rgb_cc_config = {
28 {4096, -4096, 4096, 4096, 4096, 0, 4096, -4096, -4096}
31 const struct ia_css_cc_config default_rgb2yuv_cc_config = {
33 {2449, 4809, 934, -1382, -2714, 4096, 4096, -3430, -666}
37 ia_css_yuv2rgb_encode(
38 struct sh_css_isp_csc_params *to,
39 const struct ia_css_cc_config *from,
42 ia_css_encode_cc(to, from, size);
46 ia_css_rgb2yuv_encode(
47 struct sh_css_isp_csc_params *to,
48 const struct ia_css_cc_config *from,
51 ia_css_encode_cc(to, from, size);
55 ia_css_r_gamma_vamem_encode(
56 struct sh_css_isp_rgb_gamma_vamem_params *to,
57 const struct ia_css_rgb_gamma_table *from,
61 memcpy (&to->gc, &from->data, sizeof(to->gc));
65 ia_css_g_gamma_vamem_encode(
66 struct sh_css_isp_rgb_gamma_vamem_params *to,
67 const struct ia_css_rgb_gamma_table *from,
71 memcpy (&to->gc, &from->data, sizeof(to->gc));
75 ia_css_b_gamma_vamem_encode(
76 struct sh_css_isp_rgb_gamma_vamem_params *to,
77 const struct ia_css_rgb_gamma_table *from,
81 memcpy (&to->gc, &from->data, sizeof(to->gc));
84 #ifndef IA_CSS_NO_DEBUG
87 const struct sh_css_isp_csc_params *yuv2rgb,
90 ia_css_cc_dump(yuv2rgb, level, "YUV to RGB Conversion");
95 const struct sh_css_isp_csc_params *rgb2yuv,
98 ia_css_cc_dump(rgb2yuv, level, "RGB to YUV Conversion");
102 ia_css_rgb_gamma_table_debug_dtrace(
103 const struct ia_css_rgb_gamma_table *config,