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_TNR_HEADER_V2_H__ 21 #define __CALIBDBV2_BAYER_TNR_HEADER_V2_H__ 22 23 #include "rk_aiq_comm.h" 24 25 RKAIQ_BEGIN_DECLARE 26 27 ////////////////////////bayernr V2////////////////////////////////////// 28 typedef struct CalibDbV2_BayerTnrV2_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 // M4_ARRAY_DESC("lumapoint2", "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)) 39 int lumapoint2[16]; 40 41 // M4_ARRAY_DESC("lo_sigma", "s32", M4_SIZE(1,16), M4_RANGE(0,65535), "[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32]", M4_DIGIT(0), M4_DYNAMIC(0)) 42 int lo_sigma[16]; 43 44 // M4_ARRAY_DESC("hi_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)) 45 int hi_sigma[16]; 46 47 } CalibDbV2_BayerTnrV2_C_ISO_t; 48 49 typedef struct CalibDbV2_BayerTnrV2_C_Set_s { 50 // M4_STRING_MARK_DESC("SNR_Mode", M4_SIZE(1,1), M4_RANGE(0, 64), "LSNR",M4_DYNAMIC(0), "index1") 51 char *SNR_Mode; 52 // M4_STRING_DESC("Sensor_Mode", M4_SIZE(1,1), M4_RANGE(0, 64), "lcg", M4_DYNAMIC(0)) 53 char *Sensor_Mode; 54 // M4_STRUCT_LIST_DESC("Calib_ISO", M4_SIZE_DYNAMIC, "double_index_list") 55 CalibDbV2_BayerTnrV2_C_ISO_t *Calib_ISO; 56 int Calib_ISO_len; 57 58 } CalibDbV2_BayerTnrV2_C_Set_t; 59 60 typedef struct CalibDbV2_BayerTnrV2_Calib_s { 61 // M4_STRUCT_LIST_DESC("Setting", M4_SIZE_DYNAMIC, "double_index_list") 62 CalibDbV2_BayerTnrV2_C_Set_t *Setting; 63 int Setting_len; 64 } CalibDbV2_BayerTnrV2_Calib_t; 65 66 67 typedef struct CalibDbV2_BayerTnrV2_T_ISO_s { 68 // M4_NUMBER_MARK_DESC("iso", "f32", M4_RANGE(50, 204800), "50", M4_DIGIT(1), "index2") 69 float iso; 70 71 // M4_NUMBER_DESC("thumbds", "f32", M4_RANGE(0, 8), "8", M4_DIGIT(2)) 72 float thumbds; 73 74 // M4_BOOL_DESC("lo_enable", "1") 75 float lo_enable; 76 77 // M4_BOOL_DESC("hi_enable", "1") 78 float hi_enable; 79 80 // M4_BOOL_DESC("lo_med_en", "1") 81 float lo_med_en; 82 // M4_BOOL_DESC("lo_gsbay_en", "1") 83 float lo_gsbay_en; 84 // M4_BOOL_DESC("lo_gslum_en", "1") 85 float lo_gslum_en; 86 // M4_BOOL_DESC("hi_med_en", "1") 87 float hi_med_en; 88 // M4_BOOL_DESC("hi_gslum_en", "1") 89 float hi_gslum_en; 90 91 // M4_NUMBER_DESC("hi_wgt_comp", "f32", M4_RANGE(0, 1), "0.16", M4_DIGIT(2)) 92 float hi_wgt_comp; 93 94 // M4_NUMBER_DESC("clipwgt", "f32", M4_RANGE(0, 1), "0.03215", M4_DIGIT(5)) 95 float clipwgt; 96 97 // M4_BOOL_DESC("global_pk_en", "0") 98 float global_pk_en; 99 // M4_NUMBER_DESC("global_pksq", "f32", M4_RANGE(0, 268435455), "1024", M4_DIGIT(0)) 100 float global_pksq; 101 102 // M4_NUMBER_DESC("hidif_th", "f32", M4_RANGE(0, 65535), "32767", M4_DIGIT(0)) 103 float hidif_th; 104 105 106 // M4_NUMBER_DESC("lo_filter_strength", "f32", M4_RANGE(0, 16), "1.0", M4_DIGIT(2)) 107 float lo_filter_strength; 108 109 // M4_NUMBER_DESC("hi_filter_strength", "f32", M4_RANGE(0, 16), "1.0", M4_DIGIT(2)) 110 float hi_filter_strength; 111 112 113 114 // M4_NUMBER_DESC("soft_threshold_ratio", "f32", M4_RANGE(0, 1.0), "0.0", M4_DIGIT(2)) 115 float soft_threshold_ratio; 116 117 118 } CalibDbV2_BayerTnrV2_T_ISO_t; 119 120 typedef struct CalibDbV2_BayerTnrV2_T_Set_s { 121 // M4_STRING_MARK_DESC("SNR_Mode", M4_SIZE(1,1), M4_RANGE(0, 64), "LSNR",M4_DYNAMIC(0), "index1") 122 char *SNR_Mode; 123 // M4_STRING_DESC("Sensor_Mode", M4_SIZE(1,1), M4_RANGE(0, 64), "lcg", M4_DYNAMIC(0)) 124 char *Sensor_Mode; 125 // M4_STRUCT_LIST_DESC("Tuning_ISO", M4_SIZE_DYNAMIC, "double_index_list") 126 CalibDbV2_BayerTnrV2_T_ISO_t *Tuning_ISO; 127 int Tuning_ISO_len; 128 } CalibDbV2_BayerTnrV2_T_Set_t; 129 130 typedef struct CalibDbV2_BayerTnrV2_Tuning_s { 131 // M4_BOOL_DESC("enable", "1") 132 bool enable; 133 // M4_STRUCT_LIST_DESC("Setting", M4_SIZE_DYNAMIC, "double_index_list") 134 CalibDbV2_BayerTnrV2_T_Set_t *Setting; 135 int Setting_len; 136 } CalibDbV2_BayerTnrV2_Tuning_t; 137 138 139 typedef struct CalibDbV2_BayerTnrV2_s { 140 // M4_STRING_DESC("Version", M4_SIZE(1,1), M4_RANGE(0, 64), "V2", M4_DYNAMIC(0)) 141 char *Version; 142 // M4_STRUCT_DESC("CalibPara", "normal_ui_style") 143 CalibDbV2_BayerTnrV2_Calib_t CalibPara; 144 // M4_STRUCT_DESC("Bayernr3D", "normal_ui_style") 145 CalibDbV2_BayerTnrV2_Tuning_t TuningPara; 146 } CalibDbV2_BayerTnrV2_t; 147 148 RKAIQ_END_DECLARE 149 150 #endif 151