2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
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.
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
16 #include "ia_css_types.h"
17 #include "sh_css_defs.h"
18 #include "ia_css_debug.h"
19 #include "sh_css_frac.h"
21 #include "ia_css_xnr.host.h"
23 const struct ia_css_xnr_config default_xnr_config = {
24 /* default threshold 6400 translates to 25 on ISP. */
29 ia_css_xnr_table_vamem_encode(
30 struct sh_css_isp_xnr_vamem_params *to,
31 const struct ia_css_xnr_table *from,
35 memcpy (&to->xnr, &from->data, sizeof(to->xnr));
40 struct sh_css_isp_xnr_params *to,
41 const struct ia_css_xnr_config *from,
47 (uint16_t)uDIGIT_FITTING(from->threshold, 16, SH_CSS_ISP_YUV_BITS);
51 ia_css_xnr_table_debug_dtrace(
52 const struct ia_css_xnr_table *config,
60 ia_css_xnr_debug_dtrace(
61 const struct ia_css_xnr_config *config,
64 ia_css_debug_dtrace(level,
65 "config.threshold=%d\n", config->threshold);