GNU Linux-libre 4.14.266-gnu1
[releases.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / isp / kernels / anr / anr_1.0 / ia_css_anr.host.c
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 #include "ia_css_types.h"
16 #include "sh_css_defs.h"
17 #include "ia_css_debug.h"
18
19 #include "ia_css_anr.host.h"
20
21 const struct ia_css_anr_config default_anr_config = {
22         10,
23         { 0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
24           0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
25           0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
26           0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4},
27         {10, 20, 30}
28 };
29
30 void
31 ia_css_anr_encode(
32         struct sh_css_isp_anr_params *to,
33         const struct ia_css_anr_config *from,
34         unsigned size)
35 {
36         (void)size;
37         to->threshold = from->threshold;
38 }
39
40 void
41 ia_css_anr_dump(
42         const struct sh_css_isp_anr_params *anr,
43         unsigned level)
44 {
45         if (!anr) return;
46         ia_css_debug_dtrace(level, "Advance Noise Reduction:\n");
47         ia_css_debug_dtrace(level, "\t%-32s = %d\n",
48                         "anr_threshold", anr->threshold);
49 }
50
51 void
52 ia_css_anr_debug_dtrace(
53         const struct ia_css_anr_config *config,
54         unsigned level)
55 {
56         ia_css_debug_dtrace(level,
57                 "config.threshold=%d\n",
58                 config->threshold);
59 }
60