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_CNR_HEADER_V1_H__ 21 #define __CALIBDBV2_CNR_HEADER_V1_H__ 22 23 #include "rk_aiq_comm.h" 24 25 RKAIQ_BEGIN_DECLARE 26 27 ///////////////////////////uvnr////////////////////////////////////// 28 typedef struct CalibDbV2_CNR_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_BOOL_DESC("hf_bypass", "0") 33 float hf_bypass; 34 // M4_BOOL_DESC("lf_bypass", "0") 35 float lf_bypass; 36 37 // M4_NUMBER_DESC("cnr_exgain", "f32", M4_RANGE(0, 1.0), "1.0", M4_DIGIT(2), M4_HIDE(1)) 38 float cnr_exgain; 39 // M4_NUMBER_DESC("cnr_g_gain", "f32", M4_RANGE(0, 1.0), "1.0", M4_DIGIT(2), M4_HIDE(1)) 40 float cnr_g_gain; 41 42 // M4_NUMBER_DESC("color_sat_adj", "f32", M4_RANGE(1, 255.0), "40.0", M4_DIGIT(2)) 43 float color_sat_adj; 44 // M4_NUMBER_DESC("color_sat_adj_alpha", "f32", M4_RANGE(0.0, 1.0), "0.8", M4_DIGIT(2)) 45 float color_sat_adj_alpha; 46 47 // M4_NUMBER_DESC("hf_spikes_reducion_strength", "f32", M4_RANGE(0.0, 1.0), "0.5", M4_DIGIT(2)) 48 float hf_spikes_reducion_strength; 49 // M4_NUMBER_DESC("hf_denoise_strength", "f32", M4_RANGE(1, 1023.0), "10", M4_DIGIT(2)) 50 float hf_denoise_strength; 51 // M4_NUMBER_DESC("hf_color_sat", "f32", M4_RANGE(0.0, 8.0), "1.5", M4_DIGIT(2)) 52 float hf_color_sat; 53 // M4_NUMBER_DESC("hf_denoise_alpha", "f32", M4_RANGE(0.0, 1.0), "0.0", M4_DIGIT(2)) 54 float hf_denoise_alpha; 55 // M4_NUMBER_DESC("hf_bf_wgt_clip", "u32", M4_RANGE(0, 255), "0", M4_DIGIT(0), M4_HIDE(0)) 56 int hf_bf_wgt_clip; 57 58 // M4_NUMBER_DESC("thumb_spikes_reducion_strength", "f32", M4_RANGE(0.0, 1.0), "0.2", M4_DIGIT(2)) 59 float thumb_spikes_reducion_strength; 60 // M4_NUMBER_DESC("thumb_denoise_strength", "f32", M4_RANGE(1, 1023), "4.0", M4_DIGIT(2)) 61 float thumb_denoise_strength; 62 // M4_NUMBER_DESC("thumb_color_sat", "f32", M4_RANGE(0.0, 8.0), "4.0", M4_DIGIT(2)) 63 float thumb_color_sat; 64 65 66 // M4_NUMBER_DESC("lf_denoise_strength", "f32", M4_RANGE(1, 1023.0), "4.0", M4_DIGIT(2)) 67 float lf_denoise_strength; 68 // M4_NUMBER_DESC("lf_color_sat", "f32", M4_RANGE(0.0, 8.0), "2.0", M4_DIGIT(2)) 69 float lf_color_sat; 70 // M4_NUMBER_DESC("lf_denoise_alpha", "f32", M4_RANGE(0.0, 1.0), "1.0", M4_DIGIT(2)) 71 float lf_denoise_alpha; 72 73 } CalibDbV2_CNR_T_ISO_t; 74 75 typedef struct CalibDbV2_CNR_T_Set_s { 76 // M4_STRING_MARK_DESC("SNR_Mode", M4_SIZE(1,1), M4_RANGE(0, 64), "LSNR",M4_DYNAMIC(0), "index1") 77 char *SNR_Mode; 78 // M4_STRING_DESC("Sensor_Mode", M4_SIZE(1,1), M4_RANGE(0, 64), "lcg", M4_DYNAMIC(0)) 79 char *Sensor_Mode; 80 // M4_STRUCT_LIST_DESC("Tuning_ISO", M4_SIZE_DYNAMIC, "double_index_list") 81 CalibDbV2_CNR_T_ISO_t *Tuning_ISO; 82 int Tuning_ISO_len; 83 84 } CalibDbV2_CNR_T_Set_t; 85 86 typedef struct CalibDbV2_CNR_Kernel_s { 87 // 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)) 88 float kernel_5x5[5]; 89 } CalibDbV2_CNR_Kernel_t; 90 91 92 typedef struct CalibDbV2_CNR_Tuning_t { 93 // M4_BOOL_DESC("enable", "1") 94 int enable; 95 // M4_STRUCT_DESC("Kernel_Coeff", "normal_ui_style") 96 CalibDbV2_CNR_Kernel_t Kernel_Coeff; 97 // M4_STRUCT_LIST_DESC("Setting", M4_SIZE_DYNAMIC, "double_index_list") 98 CalibDbV2_CNR_T_Set_t *Setting; 99 int Setting_len; 100 } CalibDbV2_CNR_Tuning_t; 101 102 103 typedef struct CalibDbV2_CNR_s { 104 // M4_STRING_DESC("Version", M4_SIZE(1,1), M4_RANGE(0, 64), "V1", M4_DYNAMIC(0)) 105 char *Version; 106 // M4_STRUCT_DESC("TuningPara", "normal_ui_style") 107 CalibDbV2_CNR_Tuning_t TuningPara; 108 } CalibDbV2_CNR_t; 109 110 RKAIQ_END_DECLARE 111 112 #endif 113