GNU Linux-libre 4.14.295-gnu1
[releases.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / hive_isp_css_include / host / gdc_public.h
1 /*
2  * Support for Intel Camera Imaging ISP subsystem.
3  * Copyright (c) 2015, Intel Corporation.
4  *
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.
8  *
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
12  * more details.
13  */
14
15 #ifndef __GDC_PUBLIC_H_INCLUDED__
16 #define __GDC_PUBLIC_H_INCLUDED__
17
18 /*! Write the bicubic interpolation table of GDC[ID]
19
20  \param ID[in]                          GDC identifier
21  \param data[in]                        The data matrix to be written
22
23  \pre
24         - data must point to a matrix[4][HRT_GDC_N]
25
26  \implementation dependent
27         - The value of "HRT_GDC_N" is device specific
28         - The LUT should not be partially written
29         - The LUT format is a quadri-phase interpolation
30           table. The layout is device specific
31         - The range of the values data[n][m] is device
32           specific
33
34  \return none, GDC[ID].lut[0...3][0...HRT_GDC_N-1] = data
35  */
36 STORAGE_CLASS_EXTERN void gdc_lut_store(
37         const gdc_ID_t          ID,
38         const int                       data[4][HRT_GDC_N]);
39
40 /*! Convert the bicubic interpolation table of GDC[ID] to the ISP-specific format
41
42  \param ID[in]                          GDC identifier
43  \param in_lut[in]                      The data matrix to be converted
44  \param out_lut[out]                    The data matrix as the output of conversion
45  */
46 STORAGE_CLASS_EXTERN void gdc_lut_convert_to_isp_format(
47         const int in_lut[4][HRT_GDC_N],
48         int out_lut[4][HRT_GDC_N]);
49
50 /*! Return the integer representation of 1.0 of GDC[ID]
51  
52  \param ID[in]                          GDC identifier
53
54  \return unity
55  */
56 STORAGE_CLASS_EXTERN int gdc_get_unity(
57         const gdc_ID_t          ID);
58
59 #endif /* __GDC_PUBLIC_H_INCLUDED__ */