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 #include "ia_css_types.h"
8 #include "sh_css_defs.h"
9 #include "ia_css_debug.h"
10
11 #include "ia_css_anr.host.h"
12
13 const struct ia_css_anr_config default_anr_config = {
14 10,
15 {
16 0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
17 0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
18 0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
19 0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4
20 },
21 {10, 20, 30}
22 };
23
24 void
ia_css_anr_encode(struct sh_css_isp_anr_params * to,const struct ia_css_anr_config * from,unsigned int size)25 ia_css_anr_encode(
26 struct sh_css_isp_anr_params *to,
27 const struct ia_css_anr_config *from,
28 unsigned int size)
29 {
30 (void)size;
31 to->threshold = from->threshold;
32 }
33
34 void
ia_css_anr_dump(const struct sh_css_isp_anr_params * anr,unsigned int level)35 ia_css_anr_dump(
36 const struct sh_css_isp_anr_params *anr,
37 unsigned int level)
38 {
39 if (!anr) return;
40 ia_css_debug_dtrace(level, "Advance Noise Reduction:\n");
41 ia_css_debug_dtrace(level, "\t%-32s = %d\n",
42 "anr_threshold", anr->threshold);
43 }
44
45 void
ia_css_anr_debug_dtrace(const struct ia_css_anr_config * config,unsigned int level)46 ia_css_anr_debug_dtrace(
47 const struct ia_css_anr_config *config,
48 unsigned int level)
49 {
50 ia_css_debug_dtrace(level,
51 "config.threshold=%d\n",
52 config->threshold);
53 }
54