1 /* 2 * bayernr_head_v1.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_BAYER_2DNR_HEADER_V2_H__ 21 #define __CALIBDBV2_BAYER_2DNR_HEADER_V2_H__ 22 23 #include "rk_aiq_comm.h" 24 25 RKAIQ_BEGIN_DECLARE 26 27 ////////////////////////bayernr V2////////////////////////////////////// 28 typedef struct CalibDbV2_Bayer2dnrV2_C_ISO_s { 29 // M4_NUMBER_MARK_DESC("iso", "f32", M4_RANGE(50, 204800), "50", M4_DIGIT(1), "index2") 30 float iso; 31 32 // M4_ARRAY_DESC("lumapoint", "s32", M4_SIZE(1,16), M4_RANGE(0,65535), "[512,1024,1536,2048,3072,4096,5120,6144,7168,8192,9216,10240,11264,12288,13312,14336]", M4_DIGIT(0), M4_DYNAMIC(0)) 33 int lumapoint[16]; 34 35 // M4_ARRAY_DESC("sigma", "s32", M4_SIZE(1,16), M4_RANGE(0,65535), "[256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256]", M4_DIGIT(0), M4_DYNAMIC(0)) 36 int sigma[16]; 37 38 } CalibDbV2_Bayer2dnrV2_C_ISO_t; 39 40 typedef struct CalibDbV2_Bayer2dnrV2_C_Set_s { 41 // M4_STRING_MARK_DESC("SNR_Mode", M4_SIZE(1,1), M4_RANGE(0, 64), "LSNR",M4_DYNAMIC(0), "index1") 42 char *SNR_Mode; 43 // M4_STRING_DESC("Sensor_Mode", M4_SIZE(1,1), M4_RANGE(0, 64), "lcg", M4_DYNAMIC(0)) 44 char *Sensor_Mode; 45 // M4_STRUCT_LIST_DESC("Calib_ISO", M4_SIZE_DYNAMIC, "double_index_list") 46 CalibDbV2_Bayer2dnrV2_C_ISO_t *Calib_ISO; 47 int Calib_ISO_len; 48 49 } CalibDbV2_Bayer2dnrV2_C_Set_t; 50 51 typedef struct CalibDbV2_Bayer2dnrV2_Calib_s { 52 // M4_STRUCT_LIST_DESC("Setting", M4_SIZE_DYNAMIC, "double_index_list") 53 CalibDbV2_Bayer2dnrV2_C_Set_t *Setting; 54 int Setting_len; 55 } CalibDbV2_Bayer2dnrV2_Calib_t; 56 57 typedef struct CalibDbV2_Bayer2dnrV2_T_ISO_s { 58 // M4_NUMBER_MARK_DESC("iso", "f32", M4_RANGE(50, 204800), "50", M4_DIGIT(1), "index2") 59 float iso; 60 61 // M4_BOOL_DESC("gauss_guide", "1") 62 bool gauss_guide; 63 64 // M4_NUMBER_DESC("filter_strength", "f32", M4_RANGE(0, 16), "0.5", M4_DIGIT(2)) 65 float filter_strength; 66 67 // M4_NUMBER_DESC("edgesofts", "f32", M4_RANGE(0, 16.0), "1.0", M4_DIGIT(2)) 68 float edgesofts; 69 70 // M4_NUMBER_DESC("ratio", "f32", M4_RANGE(0, 1.0), "0.2", M4_DIGIT(2)) 71 float ratio; 72 73 // M4_NUMBER_DESC("weight", "f32", M4_RANGE(0, 1.0), "1.0", M4_DIGIT(2)) 74 float weight; 75 76 // M4_NUMBER_DESC("pix_diff", "s32", M4_RANGE(0, 16383), "16383", M4_DIGIT(0)) 77 int pix_diff; 78 79 // M4_NUMBER_DESC("diff_thld", "s32", M4_RANGE(0, 1024), "1024", M4_DIGIT(0)) 80 int diff_thld; 81 82 // M4_NUMBER_DESC("hdr_dgain_scale_s", "f32", M4_RANGE(0, 128.0), "1.0", M4_DIGIT(2)) 83 float hdr_dgain_scale_s; 84 85 // M4_NUMBER_DESC("hdr_dgain_scale_m", "f32", M4_RANGE(0, 128.0), "1.0", M4_DIGIT(2)) 86 float hdr_dgain_scale_m; 87 } CalibDbV2_Bayer2dnrV2_T_ISO_t; 88 89 typedef struct CalibDbV2_Bayer2dnrV2_T_Set_s { 90 // M4_STRING_MARK_DESC("SNR_Mode", M4_SIZE(1,1), M4_RANGE(0, 64), "LSNR",M4_DYNAMIC(0), "index1") 91 char *SNR_Mode; 92 // M4_STRING_DESC("Sensor_Mode", M4_SIZE(1,1), M4_RANGE(0, 64), "lcg", M4_DYNAMIC(0)) 93 char *Sensor_Mode; 94 // M4_STRUCT_LIST_DESC("Tuning_ISO", M4_SIZE_DYNAMIC, "double_index_list") 95 CalibDbV2_Bayer2dnrV2_T_ISO_t *Tuning_ISO; 96 int Tuning_ISO_len; 97 } CalibDbV2_Bayer2dnrV2_T_Set_t; 98 99 typedef struct CalibDbV2_Bayer2dnrV2_Tuning_s { 100 // M4_BOOL_DESC("enable", "1") 101 bool enable; 102 // M4_BOOL_DESC("hdrdgain_ctrl_en", "1") 103 bool hdrdgain_ctrl_en; 104 // M4_STRUCT_LIST_DESC("Setting", M4_SIZE_DYNAMIC, "double_index_list") 105 CalibDbV2_Bayer2dnrV2_T_Set_t *Setting; 106 int Setting_len; 107 } CalibDbV2_Bayer2dnrV2_Tuning_t; 108 109 110 111 typedef struct CalibDbV2_Bayer2dnrV2_s { 112 // M4_STRING_DESC("Version", M4_SIZE(1,1), M4_RANGE(0, 64), "V2", M4_DYNAMIC(0)) 113 char *Version; 114 // M4_STRUCT_DESC("CalibPara", "normal_ui_style") 115 CalibDbV2_Bayer2dnrV2_Calib_t CalibPara; 116 // M4_STRUCT_DESC("Bayernr2D", "normal_ui_style") 117 CalibDbV2_Bayer2dnrV2_Tuning_t TuningPara; 118 // M4_STRUCT_DESC("Bayernr3D", "normal_ui_style") 119 } CalibDbV2_Bayer2dnrV2_t; 120 121 RKAIQ_END_DECLARE 122 123 #endif 124