]>
Commit | Line | Data |
---|---|---|
a49d2536 AC |
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_XNR3_TYPES_H | |
16 | #define __IA_CSS_XNR3_TYPES_H | |
17 | ||
d929fb4e | 18 | /* @file |
a49d2536 AC |
19 | * CSS-API header file for Extra Noise Reduction (XNR) parameters. |
20 | */ | |
21 | ||
22 | /** | |
23 | * \brief Scale of the XNR sigma parameters. | |
24 | * \details The define specifies which fixed-point value represents 1.0. | |
25 | */ | |
26 | #define IA_CSS_XNR3_SIGMA_SCALE (1 << 10) | |
27 | ||
28 | /** | |
29 | * \brief Scale of the XNR coring parameters. | |
30 | * \details The define specifies which fixed-point value represents 1.0. | |
31 | */ | |
32 | #define IA_CSS_XNR3_CORING_SCALE (1 << 15) | |
33 | ||
34 | /** | |
35 | * \brief Scale of the XNR blending parameter. | |
36 | * \details The define specifies which fixed-point value represents 1.0. | |
37 | */ | |
38 | #define IA_CSS_XNR3_BLENDING_SCALE (1 << 11) | |
39 | ||
40 | ||
41 | /** | |
42 | * \brief XNR3 Sigma Parameters. | |
43 | * \details Sigma parameters define the strength of the XNR filter. | |
44 | * A higher number means stronger filtering. There are two values for each of | |
45 | * the three YUV planes: one for dark areas and one for bright areas. All | |
46 | * sigma parameters are fixed-point values between 0.0 and 1.0, scaled with | |
47 | * IA_CSS_XNR3_SIGMA_SCALE. | |
48 | */ | |
49 | struct ia_css_xnr3_sigma_params { | |
d929fb4e MCC |
50 | int y0; /** Sigma for Y range similarity in dark area */ |
51 | int y1; /** Sigma for Y range similarity in bright area */ | |
52 | int u0; /** Sigma for U range similarity in dark area */ | |
53 | int u1; /** Sigma for U range similarity in bright area */ | |
54 | int v0; /** Sigma for V range similarity in dark area */ | |
55 | int v1; /** Sigma for V range similarity in bright area */ | |
a49d2536 AC |
56 | }; |
57 | ||
58 | /** | |
59 | * \brief XNR3 Coring Parameters | |
60 | * \details Coring parameters define the "coring" strength, which is a soft | |
61 | * thresholding technique to avoid false coloring. There are two values for | |
62 | * each of the two chroma planes: one for dark areas and one for bright areas. | |
63 | * All coring parameters are fixed-point values between 0.0 and 1.0, scaled | |
64 | * with IA_CSS_XNR3_CORING_SCALE. The ineffective value is 0. | |
65 | */ | |
66 | struct ia_css_xnr3_coring_params { | |
d929fb4e MCC |
67 | int u0; /** Coring threshold of U channel in dark area */ |
68 | int u1; /** Coring threshold of U channel in bright area */ | |
69 | int v0; /** Coring threshold of V channel in dark area */ | |
70 | int v1; /** Coring threshold of V channel in bright area */ | |
a49d2536 AC |
71 | }; |
72 | ||
73 | /** | |
74 | * \brief XNR3 Blending Parameters | |
75 | * \details Blending parameters define the blending strength of filtered | |
76 | * output pixels with the original chroma pixels from before xnr3. The | |
77 | * blending strength is a fixed-point value between 0.0 and 1.0 (inclusive), | |
78 | * scaled with IA_CSS_XNR3_BLENDING_SCALE. | |
79 | * A higher number applies xnr filtering more strongly. A value of 1.0 | |
80 | * disables the blending and returns the xnr3 filtered output, while a | |
81 | * value of 0.0 bypasses the entire xnr3 filter. | |
82 | */ | |
83 | struct ia_css_xnr3_blending_params { | |
d929fb4e | 84 | int strength; /** Blending strength */ |
a49d2536 AC |
85 | }; |
86 | ||
87 | /** | |
88 | * \brief XNR3 public parameters. | |
89 | * \details Struct with all parameters for the XNR3 kernel that can be set | |
90 | * from the CSS API. | |
91 | */ | |
92 | struct ia_css_xnr3_config { | |
d929fb4e MCC |
93 | struct ia_css_xnr3_sigma_params sigma; /** XNR3 sigma parameters */ |
94 | struct ia_css_xnr3_coring_params coring; /** XNR3 coring parameters */ | |
95 | struct ia_css_xnr3_blending_params blending; /** XNR3 blending parameters */ | |
a49d2536 AC |
96 | }; |
97 | ||
98 | #endif /* __IA_CSS_XNR3_TYPES_H */ |