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
15 #include "ia_css_dpc2.host.h"
16 #include "assert_support.h"
20 struct ia_css_isp_dpc2_params *to,
21 const struct ia_css_dpc2_config *from,
26 assert ((from->metric1 >= 0) && (from->metric1 <= METRIC1_ONE_FP));
27 assert ((from->metric3 >= 0) && (from->metric3 <= METRIC3_ONE_FP));
28 assert ((from->metric2 >= METRIC2_ONE_FP) &&
29 (from->metric2 < 256*METRIC2_ONE_FP));
30 assert ((from->wb_gain_gr > 0) && (from->wb_gain_gr < 16*WBGAIN_ONE_FP));
31 assert ((from->wb_gain_r > 0) && (from->wb_gain_r < 16*WBGAIN_ONE_FP));
32 assert ((from->wb_gain_b > 0) && (from->wb_gain_b < 16*WBGAIN_ONE_FP));
33 assert ((from->wb_gain_gb > 0) && (from->wb_gain_gb < 16*WBGAIN_ONE_FP));
35 to->metric1 = from->metric1;
36 to->metric2 = from->metric2;
37 to->metric3 = from->metric3;
39 to->wb_gain_gr = from->wb_gain_gr;
40 to->wb_gain_r = from->wb_gain_r;
41 to->wb_gain_b = from->wb_gain_b;
42 to->wb_gain_gb = from->wb_gain_gb;
45 /* TODO: AM: This needs a proper implementation. */
47 ia_css_init_dpc2_state(
55 #ifndef IA_CSS_NO_DEBUG
56 /* TODO: AM: This needs a proper implementation. */
58 ia_css_dpc2_debug_dtrace(
59 const struct ia_css_dpc2_config *config,