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