/* SPDX-License-Identifier: GPL-2.0 */ /* * Support for Intel Camera Imaging ISP subsystem. * Copyright (c) 2015, Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. */ #ifndef __IA_CSS_S3A_TYPES_H #define __IA_CSS_S3A_TYPES_H /* @file * CSS-API header file for 3A statistics parameters. */ #include <ia_css_frac.h> #if (defined(SYSTEM_css_skycam_c0_system)) && (!defined(PIPE_GENERATION)) #include "../../../../components/stats_3a/src/stats_3a_public.h" #endif /* 3A configuration. This configures the 3A statistics collection * module. */ /* 3A statistics grid * * ISP block: S3A1 (3A Support for 3A ver.1 (Histogram is not used for AE)) * S3A2 (3A Support for 3A ver.2 (Histogram is used for AE)) * ISP1: S3A1 is used. * ISP2: S3A2 is used. */ struct ia_css_3a_grid_info { … }; /* This struct should be split into 3, for AE, AWB and AF. * However, that will require driver/ 3A lib modifications. */ /* 3A configuration. This configures the 3A statistics collection * module. * * ae_y_*: Coefficients to calculate luminance from bayer. * awb_lg_*: Thresholds to check the saturated bayer pixels for AWB. * Condition of effective pixel for AWB level gate check: * bayer(sensor) <= awb_lg_high_raw && * bayer(when AWB statisitcs is calculated) >= awb_lg_low && * bayer(when AWB statisitcs is calculated) <= awb_lg_high * af_fir*: Coefficients of high pass filter to calculate AF statistics. * * ISP block: S3A1(ae_y_* for AE/AF, awb_lg_* for AWB) * S3A2(ae_y_* for AF, awb_lg_* for AWB) * SDVS1(ae_y_*) * SDVS2(ae_y_*) * ISP1: S3A1 and SDVS1 are used. * ISP2: S3A2 and SDVS2 are used. */ struct ia_css_3a_config { … }; /* 3A statistics. This structure describes the data stored * in each 3A grid point. * * ISP block: S3A1 (3A Support for 3A ver.1) (Histogram is not used for AE) * S3A2 (3A Support for 3A ver.2) (Histogram is used for AE) * - ae_y is used only for S3A1. * - awb_* and af_* are used both for S3A1 and S3A2. * ISP1: S3A1 is used. * ISP2: S3A2 is used. */ struct ia_css_3a_output { … }; /* 3A Statistics. This structure describes the statistics that are generated * using the provided configuration (ia_css_3a_config). */ struct ia_css_3a_statistics { … }; /* Histogram (Statistics for AE). * * 4 histograms(r,g,b,y), * 256 bins for each histogram, unsigned 24bit value for each bin. * struct ia_css_3a_rgby_output data[256]; * ISP block: HIST2 * (ISP1: HIST2 is not used.) * ISP2: HIST2 is used. */ struct ia_css_3a_rgby_output { … }; #endif /* __IA_CSS_S3A_TYPES_H */