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_dpc2.host.h" 17 #include "assert_support.h" 18 19 void 20 ia_css_dpc2_encode( 21 struct ia_css_isp_dpc2_params *to, 22 const struct ia_css_dpc2_config *from, 23 size_t size) 24 { 25 (void)size; 26 27 assert((from->metric1 >= 0) && (from->metric1 <= METRIC1_ONE_FP)); 28 assert((from->metric3 >= 0) && (from->metric3 <= METRIC3_ONE_FP)); 29 assert((from->metric2 >= METRIC2_ONE_FP) && 30 (from->metric2 < 256 * METRIC2_ONE_FP)); 31 assert((from->wb_gain_gr > 0) && (from->wb_gain_gr < 16 * WBGAIN_ONE_FP)); 32 assert((from->wb_gain_r > 0) && (from->wb_gain_r < 16 * WBGAIN_ONE_FP)); 33 assert((from->wb_gain_b > 0) && (from->wb_gain_b < 16 * WBGAIN_ONE_FP)); 34 assert((from->wb_gain_gb > 0) && (from->wb_gain_gb < 16 * WBGAIN_ONE_FP)); 35 36 to->metric1 = from->metric1; 37 to->metric2 = from->metric2; 38 to->metric3 = from->metric3; 39 40 to->wb_gain_gr = from->wb_gain_gr; 41 to->wb_gain_r = from->wb_gain_r; 42 to->wb_gain_b = from->wb_gain_b; 43 to->wb_gain_gb = from->wb_gain_gb; 44 } 45 46 /* TODO: AM: This needs a proper implementation. */ 47 void 48 ia_css_init_dpc2_state( 49 void *state, 50 size_t size) 51 { 52 (void)state; 53 (void)size; 54 } 55 56 #ifndef IA_CSS_NO_DEBUG 57 /* TODO: AM: This needs a proper implementation. */ 58 void 59 ia_css_dpc2_debug_dtrace( 60 const struct ia_css_dpc2_config *config, 61 unsigned int level) 62 { 63 (void)config; 64 (void)level; 65 } 66 #endif 67