• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Support for Intel Camera Imaging ISP subsystem.
4  * Copyright (c) 2015, Intel Corporation.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms and conditions of the GNU General Public License,
8  * version 2, as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13  * more details.
14  */
15 
16 #include "ia_css_types.h"
17 #include "sh_css_defs.h"
18 #include "ia_css_debug.h"
19 
20 #include "ia_css_de2.host.h"
21 
22 const struct ia_css_ecd_config default_ecd_config = {
23 	(1 << (ISP_VEC_ELEMBITS - 1)) * 2 / 3,	/* 2/3 */
24 	(1 << (ISP_VEC_ELEMBITS - 1)) - 1,	/* 1.0 */
25 	0,					/* 0.0 */
26 };
27 
28 void
ia_css_ecd_encode(struct sh_css_isp_ecd_params * to,const struct ia_css_ecd_config * from,unsigned int size)29 ia_css_ecd_encode(
30     struct sh_css_isp_ecd_params *to,
31     const struct ia_css_ecd_config *from,
32     unsigned int size)
33 {
34 	(void)size;
35 	to->zip_strength = from->zip_strength;
36 	to->fc_strength  = from->fc_strength;
37 	to->fc_debias    = from->fc_debias;
38 }
39 
40 void
41 ia_css_ecd_dump(
42     const struct sh_css_isp_ecd_params *ecd,
43     unsigned int level);
44 
45 void
ia_css_ecd_debug_dtrace(const struct ia_css_ecd_config * config,unsigned int level)46 ia_css_ecd_debug_dtrace(
47     const struct ia_css_ecd_config *config,
48     unsigned int level)
49 {
50 	ia_css_debug_dtrace(level,
51 			    "config.zip_strength=%d, config.fc_strength=%d, config.fc_debias=%d\n",
52 			    config->zip_strength,
53 			    config->fc_strength, config->fc_debias);
54 }
55