• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 *
3 * SPDX-License-Identifier: GPL-2.0
4 *
5 * Copyright (C) 2011-2018 ARM or its affiliates
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 *
18 */
19 
20 #ifndef __ACAMERA_3AALG_PRESET_H__
21 #define __ACAMERA_3AALG_PRESET_H__
22 
23 #include "acamera_types.h"
24 
25 #define IOCTL_3AALG_AEPRE  			101
26 #define IOCTL_3AALG_AWBPRE  		102
27 #define IOCTL_3AALG_GAMMAPRE  		103
28 #define IOCTL_3AALG_IRIDIXPRE 		104
29 
30 //useful preset value for isp
31 typedef struct _isp_ae_preset_t {
32 	int32_t skip_cnt;
33 	int32_t exposure_log2;
34 	int32_t error_log2;
35 	int32_t integrator;
36 	int32_t exposure_ratio;
37 } isp_ae_preset_t;
38 
39 typedef struct _isp_awb_preset_t {
40 	uint32_t skip_cnt;
41 	int32_t wb_log2[4];
42 	int32_t wb[4];
43 	uint16_t global_awb_red_gain;
44 	uint16_t global_awb_blue_gain;
45     uint8_t p_high;
46     int32_t temperature_detected;
47     uint8_t light_source_candidate;
48 } isp_awb_preset_t;
49 
50 
51 typedef struct _isp_gamma_preset_t {
52 	uint32_t skip_cnt;
53 	uint32_t gamma_gain;
54     uint32_t gamma_offset;
55 } isp_gamma_preset_t;
56 
57 typedef struct _isp_iridix_preset_t {
58 	uint32_t skip_cnt;
59 	uint16_t strength_target;
60 	uint32_t iridix_contrast;
61     uint16_t dark_enh;
62     uint16_t iridix_global_DG;
63 	int32_t diff;
64 	uint16_t iridix_strength;
65 } isp_iridix_preset_t;
66 
67 typedef struct _isp_other_param_t {
68     uint32_t first_frm_timestamp;
69 } isp_other_param_t;
70 
71 typedef struct _acamera_alg_preset_t {
72 	isp_ae_preset_t ae_pre_info;
73 	isp_awb_preset_t awb_pre_info;
74 	isp_gamma_preset_t gamma_pre_info;
75 	isp_iridix_preset_t iridix_pre_info;
76 	isp_other_param_t other_param;
77 } acamera_alg_preset_t;
78 
79 #define ACAMERA_ALG_PRE_BASE (0x6FFFF000)
80 
81 //#define ACAMERA_PRESET_FREERTOS
82 
83 int ctrl_channel_3aalg_param_init(isp_ae_preset_t *ae, isp_awb_preset_t *awb, isp_gamma_preset_t *gamma, isp_iridix_preset_t *iridix);
84 
85 #endif
86