1 /* 2 * lut3d_head.h 3 * 4 * Copyright (c) 2021 Rockchip Corporation 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 * 18 */ 19 20 #ifndef __CALIBDBV2_LUT3D_HEADER_H__ 21 #define __CALIBDBV2_LUT3D_HEADER_H__ 22 23 #include "rk_aiq_comm.h" 24 25 RKAIQ_BEGIN_DECLARE 26 27 /*****************************************************************************/ 28 /** 29 * @brief Global 3DLUT calibration structure of isp2.0 30 */ 31 /*****************************************************************************/ 32 typedef struct CalibDbV2_Lut3D_Table_Para_s { 33 // M4_ARRAY_DESC("Lut R", "u16", M4_SIZE(81,9), M4_RANGE(0,4096), "0", M4_DIGIT(0), M4_DYNAMIC(0)) 34 unsigned short look_up_table_r[729]; 35 // M4_ARRAY_DESC("Lut G", "u16", M4_SIZE(81,9), M4_RANGE(0,4096), "0", M4_DIGIT(0), M4_DYNAMIC(0)) 36 unsigned short look_up_table_g[729]; 37 // M4_ARRAY_DESC("Lut B", "u16", M4_SIZE(81,9), M4_RANGE(0,4096), "0", M4_DIGIT(0), M4_DYNAMIC(0)) 38 unsigned short look_up_table_b[729]; 39 }CalibDbV2_Lut3D_Table_Para_t; 40 41 typedef struct CalibDbV2_Lut3D_Gain_Alp_s { 42 // M4_ARRAY_DESC("gain", "f32", M4_SIZE(1,9), M4_RANGE(0,256), "[1,2,4,8,16,32,64,128,256]", M4_DIGIT(0), M4_DYNAMIC(0)) 43 float gain[9]; 44 // M4_ARRAY_DESC("Alpha", "f32", M4_SIZE(1,9), M4_RANGE(0,1), "1.00", M4_DIGIT(2), M4_DYNAMIC(0)) 45 float alpha[9]; 46 } CalibDbV2_Lut3D_Gain_Alp_t; 47 48 typedef struct CalibDbV2_Lut3D_LutPara_s { 49 // M4_STRING_DESC("name", M4_SIZE(1,1), M4_RANGE(0, 25), "Normal",M4_DYNAMIC(0)) 50 char *name; 51 // M4_ARRAY_DESC("awbGain", "f32", M4_SIZE(1,2), M4_RANGE(0,5), "[1.0000,1.0000]", M4_DIGIT(4), M4_DYNAMIC(0)) 52 float awbGain[2]; 53 // M4_ARRAY_TABLE_DESC("gain-alpha curve", "array_table_ui", M4_INDEX_DEFAULT) 54 CalibDbV2_Lut3D_Gain_Alp_t gain_alpha; 55 // M4_STRUCT_DESC("Table", "normal_ui_style") 56 CalibDbV2_Lut3D_Table_Para_t Table; 57 }CalibDbV2_Lut3D_LutPara_t; 58 59 typedef struct CalibDbV2_Lut3D_Auto_Para_s { 60 // M4_BOOL_DESC("damp enable", "0") 61 bool damp_en; 62 // M4_STRUCT_LIST_DESC("lutAll", M4_SIZE_DYNAMIC, "normal_ui_style") 63 CalibDbV2_Lut3D_LutPara_t* lutAll; 64 int lutAll_len; 65 }CalibDbV2_Lut3D_Auto_Para_t; 66 67 typedef struct CalibDbV2_Lut3D_Manual_Para_s { 68 // M4_STRUCT_DESC("Table", "normal_ui_style") 69 CalibDbV2_Lut3D_Table_Para_t Table; 70 }CalibDbV2_Lut3D_Manual_Para_t; 71 72 typedef struct CalibDbV2_Lut3D_Common_Para_s { 73 // M4_BOOL_DESC("enable", "0") 74 bool enable; 75 // M4_NUMBER_DESC("gain tolerance", "f32", M4_RANGE(0.0, 256), "0.2", M4_DIGIT(4)) 76 float gain_tolerance; 77 }CalibDbV2_Lut3D_Common_Para_t; 78 79 typedef struct { 80 // M4_STRUCT_DESC("common", "normal_ui_style") 81 CalibDbV2_Lut3D_Common_Para_t common; 82 // M4_STRUCT_DESC("autoLut3D", "normal_ui_style") 83 CalibDbV2_Lut3D_Auto_Para_t ALut3D; 84 } CalibDbV2_Lut3D_Para_V2_t; 85 86 RKAIQ_END_DECLARE 87 88 #endif 89 90