1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Support for Intel Camera Imaging ISP subsystem.
4 * Copyright (c) 2015, Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13 * more details.
14 */
15
16#ifndef __IA_CSS_YNR2_TYPES_H
17#define __IA_CSS_YNR2_TYPES_H
18
19/* @file
20* CSS-API header file for Y(Luma) Noise Reduction.
21*/
22
23/* Y(Luma) Noise Reduction configuration.
24 *
25 *  ISP block: YNR2 & YEE2
26 * (ISP1: YNR1 and YEE1 are used.)
27 * (ISP2: YNR1 and YEE1 are used for Preview/Video.)
28 *  ISP2: YNR2 and YEE2 are used for Still.
29 */
30struct ia_css_ynr_config {
31	u16 edge_sense_gain_0;   /** Sensitivity of edge in dark area.
32					u13.0, [0,8191],
33					default 1000, ineffective 0 */
34	u16 edge_sense_gain_1;   /** Sensitivity of edge in bright area.
35					u13.0, [0,8191],
36					default 1000, ineffective 0 */
37	u16 corner_sense_gain_0; /** Sensitivity of corner in dark area.
38					u13.0, [0,8191],
39					default 1000, ineffective 0 */
40	u16 corner_sense_gain_1; /** Sensitivity of corner in bright area.
41					u13.0, [0,8191],
42					default 1000, ineffective 0 */
43};
44
45/* Fringe Control configuration.
46 *
47 *  ISP block: FC2 (FC2 is used with YNR2/YEE2.)
48 * (ISP1: FC2 is not used.)
49 * (ISP2: FC2 is not for Preview/Video.)
50 *  ISP2: FC2 is used for Still.
51 */
52struct ia_css_fc_config {
53	u8  gain_exp;   /** Common exponent of gains.
54				u8.0, [0,13],
55				default 1, ineffective 0 */
56	u16 coring_pos_0; /** Coring threshold for positive edge in dark area.
57				u0.13, [0,8191],
58				default 0(0), ineffective 0 */
59	u16 coring_pos_1; /** Coring threshold for positive edge in bright area.
60				u0.13, [0,8191],
61				default 0(0), ineffective 0 */
62	u16 coring_neg_0; /** Coring threshold for negative edge in dark area.
63				u0.13, [0,8191],
64				default 0(0), ineffective 0 */
65	u16 coring_neg_1; /** Coring threshold for negative edge in bright area.
66				u0.13, [0,8191],
67				default 0(0), ineffective 0 */
68	u16 gain_pos_0; /** Gain for positive edge in dark area.
69				u0.13, [0,8191],
70				default 4096(0.5), ineffective 0 */
71	u16 gain_pos_1; /** Gain for positive edge in bright area.
72				u0.13, [0,8191],
73				default 4096(0.5), ineffective 0 */
74	u16 gain_neg_0; /** Gain for negative edge in dark area.
75				u0.13, [0,8191],
76				default 4096(0.5), ineffective 0 */
77	u16 gain_neg_1; /** Gain for negative edge in bright area.
78				u0.13, [0,8191],
79				default 4096(0.5), ineffective 0 */
80	u16 crop_pos_0; /** Limit for positive edge in dark area.
81				u0.13, [0,8191],
82				default/ineffective 8191(almost 1.0) */
83	u16 crop_pos_1; /** Limit for positive edge in bright area.
84				u0.13, [0,8191],
85				default/ineffective 8191(almost 1.0) */
86	s16  crop_neg_0; /** Limit for negative edge in dark area.
87				s0.13, [-8192,0],
88				default/ineffective -8192(-1.0) */
89	s16  crop_neg_1; /** Limit for negative edge in bright area.
90				s0.13, [-8192,0],
91				default/ineffective -8192(-1.0) */
92};
93
94#endif /* __IA_CSS_YNR2_TYPES_H */
95