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_CTC2_PARAM_H
17 #define __IA_CSS_CTC2_PARAM_H
18 
19 #define IA_CSS_CTC_COEF_SHIFT          13
20 #include "vmem.h" /* needed for VMEM_ARRAY */
21 
22 /* CTC (Chroma Tone Control)ISP Parameters */
23 
24 /*VMEM Luma params*/
25 struct ia_css_isp_ctc2_vmem_params {
26 	/** Gains by Y(Luma) at Y = 0.0,Y_X1, Y_X2, Y_X3, Y_X4*/
27 	VMEM_ARRAY(y_x, ISP_VEC_NELEMS);
28 	/* kneepoints by Y(Luma) 0.0, y_x1, y_x2, y _x3, y_x4*/
29 	VMEM_ARRAY(y_y, ISP_VEC_NELEMS);
30 	/* Slopes of lines interconnecting
31 	 *  0.0 -> y_x1 -> y_x2 -> y _x3 -> y_x4 -> 1.0*/
32 	VMEM_ARRAY(e_y_slope, ISP_VEC_NELEMS);
33 };
34 
35 /*DMEM Chroma params*/
36 struct ia_css_isp_ctc2_dmem_params {
37 	/* Gains by UV(Chroma) under kneepoints uv_x0 and uv_x1*/
38 	s32 uv_y0;
39 	s32 uv_y1;
40 
41 	/* Kneepoints by UV(Chroma)- uv_x0 and uv_x1*/
42 	s32 uv_x0;
43 	s32 uv_x1;
44 
45 	/* Slope of line interconnecting uv_x0 -> uv_x1*/
46 	s32 uv_dydx;
47 
48 };
49 #endif /* __IA_CSS_CTC2_PARAM_H */
50