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 __METADATA_API_H__ 21 #define __METADATA_API_H__ 22 23 24 enum { 25 CCM_R = 0, 26 CCM_G, 27 CCM_B, 28 CCM_MAX 29 }; 30 31 typedef struct _firmware_metadata_t { 32 uint32_t frame_id; 33 34 int32_t sensor_width; 35 int32_t sensor_height; 36 int32_t image_format; 37 int32_t sensor_bits; 38 int32_t rggb_start; 39 uint32_t isp_mode; 40 uint32_t fps; 41 42 int32_t int_time; 43 int64_t int_time_ms; 44 int32_t int_time_medium; 45 int32_t int_time_long; 46 int32_t again; 47 int32_t dgain; 48 int32_t isp_dgain; 49 int32_t exposure; 50 int32_t exposure_equiv; 51 int32_t gain_log2; 52 53 int32_t lens_pos; 54 55 int32_t anti_flicker; 56 int32_t gain_00; 57 int32_t gain_01; 58 int32_t gain_10; 59 int32_t gain_11; 60 61 int32_t black_level_00; 62 int32_t black_level_01; 63 int32_t black_level_10; 64 int32_t black_level_11; 65 66 int32_t lsc_table; 67 int32_t lsc_blend; 68 int32_t lsc_mesh_strength; 69 70 int64_t awb_rgain; 71 int64_t awb_bgain; 72 int64_t awb_cct; 73 74 int32_t sinter_strength; 75 int32_t sinter_strength1; 76 int32_t sinter_strength4; 77 int32_t sinter_thresh_1h; 78 int32_t sinter_thresh_4h; 79 int32_t sinter_sad; 80 81 int32_t temper_strength; 82 83 int32_t iridix_strength; 84 85 int32_t dp_threash1; 86 int32_t dp_slope1; 87 88 int32_t dp_threash2; 89 int32_t dp_slope2; 90 91 int32_t sharpening_directional; 92 int32_t sharpening_unidirectional; 93 94 int32_t demosaic_np_offset; 95 96 int32_t fr_sharpern_strength; 97 int32_t ds1_sharpen_strength; 98 int32_t ds2_sharpen_strength; 99 100 int32_t ccm[3][3]; 101 } firmware_metadata_t; 102 103 typedef void ( *metadata_callback_t )( void *ctx_param, const firmware_metadata_t *fw_metadata ); 104 105 #endif // __METADATA_API_H__