xref: /linux/drivers/staging/media/atomisp/pci/isp/kernels/ynr/ynr_2/ia_css_ynr2_types.h (revision c771600c6af14749609b49565ffb4cac2959710d)
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_YNR2_TYPES_H
8 #define __IA_CSS_YNR2_TYPES_H
9 
10 /* @file
11 * CSS-API header file for Y(Luma) Noise Reduction.
12 */
13 
14 /* Y(Luma) Noise Reduction configuration.
15  *
16  *  ISP block: YNR2 & YEE2
17  * (ISP1: YNR1 and YEE1 are used.)
18  * (ISP2: YNR1 and YEE1 are used for Preview/Video.)
19  *  ISP2: YNR2 and YEE2 are used for Still.
20  */
21 struct ia_css_ynr_config {
22 	u16 edge_sense_gain_0;   /** Sensitivity of edge in dark area.
23 					u13.0, [0,8191],
24 					default 1000, ineffective 0 */
25 	u16 edge_sense_gain_1;   /** Sensitivity of edge in bright area.
26 					u13.0, [0,8191],
27 					default 1000, ineffective 0 */
28 	u16 corner_sense_gain_0; /** Sensitivity of corner in dark area.
29 					u13.0, [0,8191],
30 					default 1000, ineffective 0 */
31 	u16 corner_sense_gain_1; /** Sensitivity of corner in bright area.
32 					u13.0, [0,8191],
33 					default 1000, ineffective 0 */
34 };
35 
36 /* Fringe Control configuration.
37  *
38  *  ISP block: FC2 (FC2 is used with YNR2/YEE2.)
39  * (ISP1: FC2 is not used.)
40  * (ISP2: FC2 is not for Preview/Video.)
41  *  ISP2: FC2 is used for Still.
42  */
43 struct ia_css_fc_config {
44 	u8  gain_exp;   /** Common exponent of gains.
45 				u8.0, [0,13],
46 				default 1, ineffective 0 */
47 	u16 coring_pos_0; /** Coring threshold for positive edge in dark area.
48 				u0.13, [0,8191],
49 				default 0(0), ineffective 0 */
50 	u16 coring_pos_1; /** Coring threshold for positive edge in bright area.
51 				u0.13, [0,8191],
52 				default 0(0), ineffective 0 */
53 	u16 coring_neg_0; /** Coring threshold for negative edge in dark area.
54 				u0.13, [0,8191],
55 				default 0(0), ineffective 0 */
56 	u16 coring_neg_1; /** Coring threshold for negative edge in bright area.
57 				u0.13, [0,8191],
58 				default 0(0), ineffective 0 */
59 	u16 gain_pos_0; /** Gain for positive edge in dark area.
60 				u0.13, [0,8191],
61 				default 4096(0.5), ineffective 0 */
62 	u16 gain_pos_1; /** Gain for positive edge in bright area.
63 				u0.13, [0,8191],
64 				default 4096(0.5), ineffective 0 */
65 	u16 gain_neg_0; /** Gain for negative edge in dark area.
66 				u0.13, [0,8191],
67 				default 4096(0.5), ineffective 0 */
68 	u16 gain_neg_1; /** Gain for negative edge in bright area.
69 				u0.13, [0,8191],
70 				default 4096(0.5), ineffective 0 */
71 	u16 crop_pos_0; /** Limit for positive edge in dark area.
72 				u0.13, [0,8191],
73 				default/ineffective 8191(almost 1.0) */
74 	u16 crop_pos_1; /** Limit for positive edge in bright area.
75 				u0.13, [0,8191],
76 				default/ineffective 8191(almost 1.0) */
77 	s16  crop_neg_0; /** Limit for negative edge in dark area.
78 				s0.13, [-8192,0],
79 				default/ineffective -8192(-1.0) */
80 	s16  crop_neg_1; /** Limit for negative edge in bright area.
81 				s0.13, [-8192,0],
82 				default/ineffective -8192(-1.0) */
83 };
84 
85 #endif /* __IA_CSS_YNR2_TYPES_H */
86