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_CNR2_TYPES_H
17 #define __IA_CSS_CNR2_TYPES_H
18 
19 /* @file
20 * CSS-API header file for Chroma Noise Reduction (CNR) parameters
21 */
22 
23 /* Chroma Noise Reduction configuration.
24  *
25  *  Small sensitivity of edge means strong smoothness and NR performance.
26  *  If you see blurred color on vertical edges,
27  *  set higher values on sense_gain_h*.
28  *  If you see blurred color on horizontal edges,
29  *  set higher values on sense_gain_v*.
30  *
31  *  ISP block: CNR2
32  * (ISP1: CNR1 is used.)
33  * (ISP2: CNR1 is used for Preview/Video.)
34  *  ISP2: CNR2 is used for Still.
35  */
36 struct ia_css_cnr_config {
37 	u16 coring_u;	/** Coring level of U.
38 				u0.13, [0,8191], default/ineffective 0 */
39 	u16 coring_v;	/** Coring level of V.
40 				u0.13, [0,8191], default/ineffective 0 */
41 	u16 sense_gain_vy;	/** Sensitivity of horizontal edge of Y.
42 				u13.0, [0,8191], default 100, ineffective 8191 */
43 	u16 sense_gain_vu;	/** Sensitivity of horizontal edge of U.
44 				u13.0, [0,8191], default 100, ineffective 8191 */
45 	u16 sense_gain_vv;	/** Sensitivity of horizontal edge of V.
46 				u13.0, [0,8191], default 100, ineffective 8191 */
47 	u16 sense_gain_hy;	/** Sensitivity of vertical edge of Y.
48 				u13.0, [0,8191], default 50, ineffective 8191 */
49 	u16 sense_gain_hu;	/** Sensitivity of vertical edge of U.
50 				u13.0, [0,8191], default 50, ineffective 8191 */
51 	u16 sense_gain_hv;	/** Sensitivity of vertical edge of V.
52 				u13.0, [0,8191], default 50, ineffective 8191 */
53 };
54 
55 #endif /* __IA_CSS_CNR2_TYPES_H */
56