GNU Linux-libre 4.14.290-gnu1
[releases.git] / drivers / staging / media / atomisp / pci / atomisp2 / atomisp_tables.h
1 /*
2  * Support for Medifield PNW Camera Imaging ISP subsystem.
3  *
4  * Copyright (c) 2010 Intel Corporation. All Rights Reserved.
5  *
6  * Copyright (c) 2010 Silicon Hive www.siliconhive.com.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License version
10  * 2 as published by the Free Software Foundation.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20  * 02110-1301, USA.
21  *
22  */
23 #ifndef __ATOMISP_TABLES_H__
24 #define __ATOMISP_TABLES_H__
25
26 #include "sh_css_params.h"
27
28 /*Sepia image effect table*/
29 static struct atomisp_css_cc_config sepia_cc_config = {
30         .fraction_bits  = 8,
31         .matrix  = {141, 18, 68, -40, -5, -19, 35, 4, 16},
32 };
33
34 /*Negative image effect table*/
35 static struct atomisp_css_cc_config nega_cc_config = {
36         .fraction_bits  = 8,
37         .matrix  = {255, 29, 120, 0, 374, 342, 0, 672, -301},
38 };
39
40 /*Mono image effect table*/
41 static struct atomisp_css_cc_config mono_cc_config = {
42         .fraction_bits  = 8,
43         .matrix  = {255, 29, 120, 0, 0, 0, 0, 0, 0},
44 };
45
46 /*Skin whiten image effect table*/
47 static struct atomisp_css_macc_table skin_low_macc_table = {
48         .data = {
49         8192, 0, 0, 8192,
50         8192, 0, 0, 8192,
51         8192, 0, 0, 8192,
52         8192, 0, 0, 8192,
53         7168, 0, 2048, 8192,
54         5120, -1024, 2048, 8192,
55         8192, 2048, -1024, 5120,
56         8192, 2048, 0, 7168,
57         8192, 0, 0, 8192,
58         8192, 0, 0, 8192,
59         8192, 0, 0, 8192,
60         8192, 0, 0, 8192,
61         8192, 0, 0, 8192,
62         8192, 0, 0, 8192,
63         8192, 0, 0, 8192,
64         8192, 0, 0, 8192
65         }
66 };
67
68 static struct atomisp_css_macc_table skin_medium_macc_table = {
69         .data = {
70         8192, 0, 0, 8192,
71         8192, 0, 0, 8192,
72         8192, 0, 0, 8192,
73         8192, 0, 0, 8192,
74         5120, 0, 6144, 8192,
75         3072, -1024, 2048, 6144,
76         6144, 2048, -1024, 3072,
77         8192, 6144, 0, 5120,
78         8192, 0, 0, 8192,
79         8192, 0, 0, 8192,
80         8192, 0, 0, 8192,
81         8192, 0, 0, 8192,
82         8192, 0, 0, 8192,
83         8192, 0, 0, 8192,
84         8192, 0, 0, 8192,
85         8192, 0, 0, 8192
86         }
87 };
88
89 static struct atomisp_css_macc_table skin_high_macc_table = {
90         .data = {
91         8192, 0, 0, 8192,
92         8192, 0, 0, 8192,
93         8192, 0, 0, 8192,
94         8192, 0, 0, 8192,
95         4096, 0, 8192, 8192,
96         0, -2048, 4096, 6144,
97         6144, 4096, -2048, 0,
98         8192, 8192, 0, 4096,
99         8192, 0, 0, 8192,
100         8192, 0, 0, 8192,
101         8192, 0, 0, 8192,
102         8192, 0, 0, 8192,
103         8192, 0, 0, 8192,
104         8192, 0, 0, 8192,
105         8192, 0, 0, 8192,
106         8192, 0, 0, 8192
107         }
108 };
109
110 /*Blue enhencement image effect table*/
111 static struct atomisp_css_macc_table blue_macc_table = {
112         .data = {
113         9728, -3072, 0, 8192,
114         8192, 0, 0, 8192,
115         8192, 0, 0, 8192,
116         8192, 0, 0, 8192,
117         8192, 0, 0, 8192,
118         8192, 0, 0, 8192,
119         8192, 0, 0, 8192,
120         8192, 0, 0, 8192,
121         8192, 0, 0, 8192,
122         8192, 0, 0, 8192,
123         8192, 0, 0, 8192,
124         8192, 0, 0, 8192,
125         9728, 0, -3072, 8192,
126         12800, 1536, -3072, 8192,
127         11264, 0, 0, 11264,
128         9728, -3072, 0, 11264
129         }
130 };
131
132 /*Green enhencement image effect table*/
133 static struct atomisp_css_macc_table green_macc_table = {
134         .data = {
135         8192, 0, 0, 8192,
136         8192, 0, 0, 8192,
137         8192, 0, 0, 8192,
138         8192, 0, 0, 8192,
139         8192, 0, 0, 8192,
140         8192, 0, 0, 8192,
141         8192, 0, 0, 8192,
142         10240, 4096, 0, 8192,
143         10240, 4096, 0, 12288,
144         12288, 0, 0, 12288,
145         14336, -2048, 4096, 8192,
146         10240, 0, 4096, 8192,
147         8192, 0, 0, 8192,
148         8192, 0, 0, 8192,
149         8192, 0, 0, 8192,
150         8192, 0, 0, 8192
151         }
152 };
153
154 static struct atomisp_css_ctc_table vivid_ctc_table = {
155         .data.vamem_2 = {
156         0,  384,  837,  957, 1011, 1062, 1083, 1080,
157         1078, 1077, 1053, 1039, 1012,  992,  969,  951,
158         929,  906,  886,  866,  845,  823,  809,  790,
159         772,  758,  741,  726,  711,  701,  688,  675,
160         666,  656,  648,  639,  633,  626,  618,  612,
161         603,  594,  582,  572,  557,  545,  529,  516,
162         504,  491,  480,  467,  459,  447,  438,  429,
163         419,  412,  404,  397,  389,  382,  376,  368,
164         363,  357,  351,  345,  340,  336,  330,  326,
165         321,  318,  312,  308,  304,  300,  297,  294,
166         291,  286,  284,  281,  278,  275,  271,  268,
167         261,  257,  251,  245,  240,  235,  232,  225,
168         223,  218,  213,  209,  206,  204,  199,  197,
169         193,  189,  186,  185,  183,  179,  177,  175,
170         172,  170,  169,  167,  164,  164,  162,  160,
171         158,  157,  156,  154,  154,  152,  151,  150,
172         149,  148,  146,  147,  146,  144,  143,  143,
173         142,  141,  140,  141,  139,  138,  138,  138,
174         137,  136,  136,  135,  134,  134,  134,  133,
175         132,  132,  131,  130,  131,  130,  129,  128,
176         129,  127,  127,  127,  127,  125,  125,  125,
177         123,  123,  122,  120,  118,  115,  114,  111,
178         110,  108,  106,  105,  103,  102,  100,   99,
179         97,   97,   96,   95,   94,   93,   93,   91,
180         91,   91,   90,   90,   89,   89,   88,   88,
181         89,   88,   88,   87,   87,   87,   87,   86,
182         87,   87,   86,   87,   86,   86,   84,   84,
183         82,   80,   78,   76,   74,   72,   70,   68,
184         67,   65,   62,   60,   58,   56,   55,   54,
185         53,   51,   49,   49,   47,   45,   45,   45,
186         41,   40,   39,   39,   34,   33,   34,   32,
187         25,   23,   24,   20,   13,    9,   12,    0,
188         0
189         }
190 };
191 #endif