Merge remote-tracking branches 'asoc/topic/rl6231', 'asoc/topic/rt5514', 'asoc/topic...
[sfrench/cifs-2.6.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / isp / kernels / ynr / ynr_1.0 / ia_css_ynr_types.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 __IA_CSS_YNR_TYPES_H
16 #define __IA_CSS_YNR_TYPES_H
17
18 /* @file
19 * CSS-API header file for Noise Reduction (BNR) and YCC Noise Reduction (YNR,CNR).
20 */
21
22 /* Configuration used by Bayer Noise Reduction (BNR) and
23  *  YCC Noise Reduction (YNR,CNR).
24  *
25  *  ISP block: BNR1, YNR1, CNR1
26  *  ISP1: BNR1,YNR1,CNR1 are used.
27  *  ISP2: BNR1,YNR1,CNR1 are used for Preview/Video.
28  *        BNR1,YNR2,CNR2 are used for Still.
29  */
30 struct ia_css_nr_config {
31         ia_css_u0_16 bnr_gain;     /** Strength of noise reduction (BNR).
32                                 u0.16, [0,65535],
33                                 default 14336(0.21875), ineffective 0 */
34         ia_css_u0_16 ynr_gain;     /** Strength of noise reduction (YNR).
35                                 u0.16, [0,65535],
36                                 default 14336(0.21875), ineffective 0 */
37         ia_css_u0_16 direction;    /** Sensitivity of edge (BNR).
38                                 u0.16, [0,65535],
39                                 default 512(0.0078125), ineffective 0 */
40         ia_css_u0_16 threshold_cb; /** Coring threshold for Cb (CNR).
41                                 This is the same as
42                                 de_config.c1_coring_threshold.
43                                 u0.16, [0,65535],
44                                 default 0(0), ineffective 0 */
45         ia_css_u0_16 threshold_cr; /** Coring threshold for Cr (CNR).
46                                 This is the same as
47                                 de_config.c2_coring_threshold.
48                                 u0.16, [0,65535],
49                                 default 0(0), ineffective 0 */
50 };
51
52 /* Edge Enhancement (sharpen) configuration.
53  *
54  *  ISP block: YEE1
55  *  ISP1: YEE1 is used.
56  *  ISP2: YEE1 is used for Preview/Video.
57  *       (YEE2 is used for Still.)
58  */
59 struct ia_css_ee_config {
60         ia_css_u5_11 gain;        /** The strength of sharpness.
61                                         u5.11, [0,65535],
62                                         default 8192(4.0), ineffective 0 */
63         ia_css_u8_8 threshold;    /** The threshold that divides noises from
64                                         edge.
65                                         u8.8, [0,65535],
66                                         default 256(1.0), ineffective 65535 */
67         ia_css_u5_11 detail_gain; /** The strength of sharpness in pell-mell
68                                         area.
69                                         u5.11, [0,65535],
70                                         default 2048(1.0), ineffective 0 */
71 };
72
73 /* YNR and YEE (sharpen) configuration.
74  */
75 struct ia_css_yee_config {
76         struct ia_css_nr_config nr; /** The NR configuration. */
77         struct ia_css_ee_config ee; /** The EE configuration. */
78 };
79
80 #endif /* __IA_CSS_YNR_TYPES_H */
81