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 #ifndef __IA_CSS_SDIS2_HOST_H 17 #define __IA_CSS_SDIS2_HOST_H 18 19 #include "ia_css_sdis2_types.h" 20 #include "ia_css_binary.h" 21 #include "ia_css_stream.h" 22 #include "sh_css_params.h" 23 24 extern const struct ia_css_dvs2_coefficients default_sdis2_config; 25 26 /* Opaque here, since size is binary dependent. */ 27 struct sh_css_isp_sdis_hori_coef_tbl; 28 struct sh_css_isp_sdis_vert_coef_tbl; 29 struct sh_css_isp_sdis_hori_proj_tbl; 30 struct sh_css_isp_sdis_vert_proj_tbl; 31 32 void ia_css_sdis2_horicoef_vmem_encode( 33 struct sh_css_isp_sdis_hori_coef_tbl *to, 34 const struct ia_css_dvs2_coefficients *from, 35 unsigned int size); 36 37 void ia_css_sdis2_vertcoef_vmem_encode( 38 struct sh_css_isp_sdis_vert_coef_tbl *to, 39 const struct ia_css_dvs2_coefficients *from, 40 unsigned int size); 41 42 void ia_css_sdis2_horiproj_encode( 43 struct sh_css_isp_sdis_hori_proj_tbl *to, 44 const struct ia_css_dvs2_coefficients *from, 45 unsigned int size); 46 47 void ia_css_sdis2_vertproj_encode( 48 struct sh_css_isp_sdis_vert_proj_tbl *to, 49 const struct ia_css_dvs2_coefficients *from, 50 unsigned int size); 51 52 void ia_css_get_isp_dvs2_coefficients( 53 struct ia_css_stream *stream, 54 short *hor_coefs_odd_real, 55 short *hor_coefs_odd_imag, 56 short *hor_coefs_even_real, 57 short *hor_coefs_even_imag, 58 short *ver_coefs_odd_real, 59 short *ver_coefs_odd_imag, 60 short *ver_coefs_even_real, 61 short *ver_coefs_even_imag); 62 63 void ia_css_sdis2_clear_coefficients( 64 struct ia_css_dvs2_coefficients *dvs2_coefs); 65 66 int 67 ia_css_get_dvs2_statistics( 68 struct ia_css_dvs2_statistics *host_stats, 69 const struct ia_css_isp_dvs_statistics *isp_stats); 70 71 void 72 ia_css_translate_dvs2_statistics( 73 struct ia_css_dvs2_statistics *host_stats, 74 const struct ia_css_isp_dvs_statistics_map *isp_stats); 75 76 struct ia_css_isp_dvs_statistics * 77 ia_css_isp_dvs2_statistics_allocate( 78 const struct ia_css_dvs_grid_info *grid); 79 80 void 81 ia_css_isp_dvs2_statistics_free( 82 struct ia_css_isp_dvs_statistics *me); 83 84 void ia_css_sdis2_horicoef_debug_dtrace( 85 const struct ia_css_dvs2_coefficients *config, unsigned int level); 86 87 void ia_css_sdis2_vertcoef_debug_dtrace( 88 const struct ia_css_dvs2_coefficients *config, unsigned int level); 89 90 void ia_css_sdis2_horiproj_debug_dtrace( 91 const struct ia_css_dvs2_coefficients *config, unsigned int level); 92 93 void ia_css_sdis2_vertproj_debug_dtrace( 94 const struct ia_css_dvs2_coefficients *config, unsigned int level); 95 96 #endif /* __IA_CSS_SDIS2_HOST_H */ 97