1 /* 2 * uvnr_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_UVNR_HEADER_V1_H__ 21 #define __CALIBDBV2_UVNR_HEADER_V1_H__ 22 23 #include "rk_aiq_comm.h" 24 25 RKAIQ_BEGIN_DECLARE 26 27 ///////////////////////////uvnr////////////////////////////////////// 28 typedef struct CalibDbV2_UVNR_T_ISO_s { 29 // M4_NUMBER_MARK_DESC("iso", "f32", M4_RANGE(50, 204800), "50", M4_DIGIT(1), "index2") 30 float iso; 31 32 // M4_NUMBER_DESC("step0_uvgrad_ratio", "f32", M4_RANGE(1.0, 63.0), "40", M4_DIGIT(0)) 33 float step0_uvgrad_ratio; 34 // M4_NUMBER_DESC("step0_uvgrad_offset", "f32", M4_RANGE(0, 1.0), "0.8", M4_DIGIT(2)) 35 float step0_uvgrad_offset; 36 37 // M4_NUMBER_DESC("step1_median_ratio", "f32", M4_RANGE(0, 1.0), "0.2", M4_DIGIT(2)) 38 float step1_median_ratio; 39 // M4_NUMBER_DESC("step1_bf_sigmaR", "f32", M4_RANGE(2, 64.0), "10.0", M4_DIGIT(2)) 40 float step1_bf_sigmaR; 41 // M4_NUMBER_DESC("step1_bf_uvgain", "f32", M4_RANGE(0.0, 7.9), "1.5", M4_DIGIT(2)) 42 float step1_bf_uvgain; 43 // M4_NUMBER_DESC("step1_bf_ratio", "f32", M4_RANGE(0.0, 1.0), "0.0", M4_DIGIT(2)) 44 float step1_bf_ratio; 45 46 // M4_NUMBER_DESC("step2_median_ratio", "f32", M4_RANGE(0, 1.0), "0.2", M4_DIGIT(2)) 47 float step2_median_ratio; 48 // M4_NUMBER_DESC("step2_bf_sigmaR", "f32", M4_RANGE(2, 48.0), "5.0", M4_DIGIT(2)) 49 float step2_bf_sigmaR; 50 // M4_NUMBER_DESC("step2_bf_uvgain", "f32", M4_RANGE(0.0, 7.9), "2.0", M4_DIGIT(2)) 51 float step2_bf_uvgain; 52 // M4_NUMBER_DESC("step2_bf_ratio", "f32", M4_RANGE(0.0, 1.0), "0.0", M4_DIGIT(2), M4_HIDE(1)) 53 float step2_bf_ratio; 54 55 // M4_NUMBER_DESC("step3_bf_sigmaR", "f32", M4_RANGE(2, 24.0), "5.0", M4_DIGIT(2)) 56 float step3_bf_sigmaR; 57 // M4_NUMBER_DESC("step3_bf_uvgain", "f32", M4_RANGE(0.0, 7.9), "2.0", M4_DIGIT(2)) 58 float step3_bf_uvgain; 59 // M4_NUMBER_DESC("step3_bf_ratio", "f32", M4_RANGE(0.0, 1.0), "1.0", M4_DIGIT(2)) 60 float step3_bf_ratio; 61 62 } CalibDbV2_UVNR_T_ISO_t; 63 64 typedef struct CalibDbV2_UVNR_T_Set_s { 65 // M4_STRING_MARK_DESC("SNR_Mode", M4_SIZE(1,1), M4_RANGE(0, 64), "LSNR",M4_DYNAMIC(0), "index1") 66 char *SNR_Mode; 67 // M4_STRING_DESC("Sensor_Mode", M4_SIZE(1,1), M4_RANGE(0, 64), "lcg", M4_DYNAMIC(0)) 68 char *Sensor_Mode; 69 // M4_STRUCT_LIST_DESC("Tuning_ISO", M4_SIZE_DYNAMIC, "double_index_list") 70 CalibDbV2_UVNR_T_ISO_t *Tuning_ISO; 71 int Tuning_ISO_len; 72 73 } CalibDbV2_UVNR_T_Set_t; 74 75 typedef struct CalibDbV2_UVNR_Kernel_s { 76 // M4_ARRAY_DESC("kernel_3x3", "f32", M4_SIZE(1,3), M4_RANGE(0,1), "[1.0000,0.8825,0.7788]", M4_DIGIT(6), M4_DYNAMIC(0)) 77 float kernel_3x3[3]; 78 // M4_ARRAY_DESC("kernel_5x5", "f32", M4_SIZE(1,5), M4_RANGE(0,1), "[1.0000,0.8825,0.7788,0.6065,0.3679]", M4_DIGIT(6), M4_DYNAMIC(0)) 79 float kernel_5x5[5]; 80 // M4_ARRAY_DESC("kernel_9x9", "f32", M4_SIZE(1,8), M4_RANGE(0,1), "[1.0000,0.8825,0.7788,0.6065,0.3679,0.1969,0.1353,0.0439]", M4_DIGIT(6), M4_DYNAMIC(0)) 81 float kernel_9x9[8]; 82 // M4_NUMBER_DESC("kernel_9x9_num", "s32", M4_RANGE(0, 3), "0", M4_DIGIT(0)) 83 int kernel_9x9_num; 84 } CalibDbV2_UVNR_Kernel_t; 85 86 87 typedef struct CalibDbV2_UVNR_Tuning_s { 88 // M4_BOOL_DESC("enable", "1") 89 int enable; 90 // M4_STRUCT_DESC("Kernel_Coeff", "normal_ui_style") 91 CalibDbV2_UVNR_Kernel_t Kernel_Coeff; 92 // M4_STRUCT_LIST_DESC("Setting", M4_SIZE_DYNAMIC, "double_index_list") 93 CalibDbV2_UVNR_T_Set_t *Setting; 94 int Setting_len; 95 } CalibDbV2_UVNR_Tuning_t; 96 97 98 typedef struct CalibDbV2_UVNR_s { 99 // M4_STRING_DESC("Version", M4_SIZE(1,1), M4_RANGE(0, 64), "V1", M4_DYNAMIC(0)) 100 char *Version; 101 // M4_STRUCT_DESC("TuningPara", "normal_ui_style") 102 CalibDbV2_UVNR_Tuning_t TuningPara; 103 } CalibDbV2_UVNR_t; 104 105 RKAIQ_END_DECLARE 106 107 #endif 108