Merge tag 'for-4.15/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device...
[sfrench/cifs-2.6.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / isp / kernels / tnr / tnr_1.0 / ia_css_tnr_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_TNR_TYPES_H
16 #define __IA_CSS_TNR_TYPES_H
17
18 /* @file
19 * CSS-API header file for Temporal Noise Reduction (TNR) parameters.
20 */
21
22 /* Temporal Noise Reduction (TNR) configuration.
23  *
24  *  When difference between current frame and previous frame is less than or
25  *  equal to threshold, TNR works and current frame is mixed
26  *  with previous frame.
27  *  When difference between current frame and previous frame is greater
28  *  than threshold, we judge motion is detected. Then, TNR does not work and
29  *  current frame is outputted as it is.
30  *  Therefore, when threshold_y and threshold_uv are set as 0, TNR can be disabled.
31  *
32  *  ISP block: TNR1
33  *  ISP1: TNR1 is used.
34  *  ISP2: TNR1 is used.
35  */
36
37
38 struct ia_css_tnr_config {
39         ia_css_u0_16 gain; /** Interpolation ratio of current frame
40                                 and previous frame.
41                                 gain=0.0 -> previous frame is outputted.
42                                 gain=1.0 -> current frame is outputted.
43                                 u0.16, [0,65535],
44                         default 32768(0.5), ineffective 65535(almost 1.0) */
45         ia_css_u0_16 threshold_y; /** Threshold to enable interpolation of Y.
46                                 If difference between current frame and
47                                 previous frame is greater than threshold_y,
48                                 TNR for Y is disabled.
49                                 u0.16, [0,65535], default/ineffective 0 */
50         ia_css_u0_16 threshold_uv; /** Threshold to enable interpolation of
51                                 U/V.
52                                 If difference between current frame and
53                                 previous frame is greater than threshold_uv,
54                                 TNR for UV is disabled.
55                                 u0.16, [0,65535], default/ineffective 0 */
56 };
57
58
59 #endif /* __IA_CSS_TNR_TYPES_H */
60