1 // SPDX-License-Identifier: GPL-2.0 2 /* 3 * Support for Intel Camera Imaging ISP subsystem. 4 * Copyright (c) 2015, Intel Corporation. 5 */ 6 7 #include "ia_css_dpc2.host.h" 8 #include "assert_support.h" 9 10 void ia_css_dpc2_encode(struct ia_css_isp_dpc2_params * to,const struct ia_css_dpc2_config * from,size_t size)11ia_css_dpc2_encode( 12 struct ia_css_isp_dpc2_params *to, 13 const struct ia_css_dpc2_config *from, 14 size_t size) 15 { 16 (void)size; 17 18 assert((from->metric1 >= 0) && (from->metric1 <= METRIC1_ONE_FP)); 19 assert((from->metric3 >= 0) && (from->metric3 <= METRIC3_ONE_FP)); 20 assert((from->metric2 >= METRIC2_ONE_FP) && 21 (from->metric2 < 256 * METRIC2_ONE_FP)); 22 assert((from->wb_gain_gr > 0) && (from->wb_gain_gr < 16 * WBGAIN_ONE_FP)); 23 assert((from->wb_gain_r > 0) && (from->wb_gain_r < 16 * WBGAIN_ONE_FP)); 24 assert((from->wb_gain_b > 0) && (from->wb_gain_b < 16 * WBGAIN_ONE_FP)); 25 assert((from->wb_gain_gb > 0) && (from->wb_gain_gb < 16 * WBGAIN_ONE_FP)); 26 27 to->metric1 = from->metric1; 28 to->metric2 = from->metric2; 29 to->metric3 = from->metric3; 30 31 to->wb_gain_gr = from->wb_gain_gr; 32 to->wb_gain_r = from->wb_gain_r; 33 to->wb_gain_b = from->wb_gain_b; 34 to->wb_gain_gb = from->wb_gain_gb; 35 } 36 37 /* TODO: AM: This needs a proper implementation. */ 38 void ia_css_init_dpc2_state(void * state,size_t size)39ia_css_init_dpc2_state( 40 void *state, 41 size_t size) 42 { 43 (void)state; 44 (void)size; 45 } 46 47 #ifndef IA_CSS_NO_DEBUG 48 /* TODO: AM: This needs a proper implementation. */ 49 void ia_css_dpc2_debug_dtrace(const struct ia_css_dpc2_config * config,unsigned int level)50ia_css_dpc2_debug_dtrace( 51 const struct ia_css_dpc2_config *config, 52 unsigned int level) 53 { 54 (void)config; 55 (void)level; 56 } 57 #endif 58