xref: /linux/drivers/staging/media/atomisp/pci/isp/kernels/sdis/sdis_2/ia_css_sdis2_types.h (revision f088104d837a991c65e51fa30bb4196169b3244d)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Support for Intel Camera Imaging ISP subsystem.
4  * Copyright (c) 2015, Intel Corporation.
5  */
6 
7 #ifndef __IA_CSS_SDIS2_TYPES_H
8 #define __IA_CSS_SDIS2_TYPES_H
9 
10 /* @file
11 * CSS-API header file for DVS statistics parameters.
12 */
13 
14 /* Number of DVS coefficient types */
15 #define IA_CSS_DVS2_NUM_COEF_TYPES     4
16 
17 #ifndef PIPE_GENERATION
18 #include "isp/kernels/sdis/common/ia_css_sdis_common_types.h"
19 #endif
20 
21 /* DVS 2.0 Coefficient types. This structure contains 4 pointers to
22  *  arrays that contain the coefficients for each type.
23  */
24 struct ia_css_dvs2_coef_types {
25 	s16 *odd_real; /** real part of the odd coefficients*/
26 	s16 *odd_imag; /** imaginary part of the odd coefficients*/
27 	s16 *even_real;/** real part of the even coefficients*/
28 	s16 *even_imag;/** imaginary part of the even coefficients*/
29 };
30 
31 /* DVS 2.0 Coefficients. This structure describes the coefficients that are needed for the dvs statistics.
32  *  e.g. hor_coefs.odd_real is the pointer to int16_t[grid.num_hor_coefs] containing the horizontal odd real
33  *  coefficients.
34  */
35 struct ia_css_dvs2_coefficients {
36 	struct ia_css_dvs_grid_info
37 		grid;        /** grid info contains the dimensions of the dvs grid */
38 	struct ia_css_dvs2_coef_types
39 		hor_coefs; /** struct with pointers that contain the horizontal coefficients */
40 	struct ia_css_dvs2_coef_types
41 		ver_coefs; /** struct with pointers that contain the vertical coefficients */
42 };
43 
44 /* DVS 2.0 Statistic types. This structure contains 4 pointers to
45  *  arrays that contain the statistics for each type.
46  */
47 struct ia_css_dvs2_stat_types {
48 	s32 *odd_real; /** real part of the odd statistics*/
49 	s32 *odd_imag; /** imaginary part of the odd statistics*/
50 	s32 *even_real;/** real part of the even statistics*/
51 	s32 *even_imag;/** imaginary part of the even statistics*/
52 };
53 
54 /* DVS 2.0 Statistics. This structure describes the statistics that are generated using the provided coefficients.
55  *  e.g. hor_prod.odd_real is the pointer to int16_t[grid.aligned_height][grid.aligned_width] containing
56  *  the horizontal odd real statistics. Valid statistics data area is int16_t[0..grid.height-1][0..grid.width-1]
57  */
58 struct ia_css_dvs2_statistics {
59 	struct ia_css_dvs_grid_info
60 		grid;       /** grid info contains the dimensions of the dvs grid */
61 	struct ia_css_dvs2_stat_types
62 		hor_prod; /** struct with pointers that contain the horizontal statistics */
63 	struct ia_css_dvs2_stat_types
64 		ver_prod; /** struct with pointers that contain the vertical statistics */
65 };
66 
67 #endif /* __IA_CSS_SDIS2_TYPES_H */
68