xref: /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/include/iq_parser_v2/cnr_head_v2.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
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_CNRV2_HEADER_H__
21 #define __CALIBDBV2_CNRV2_HEADER_H__
22 
23 #include "rk_aiq_comm.h"
24 
25 RKAIQ_BEGIN_DECLARE
26 
27 ///////////////////////////uvnr//////////////////////////////////////
28 typedef struct CalibDbV2_CNRV2_T_Set_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("global_gain", "f32", M4_RANGE(0, 64.0), "1.0", M4_DIGIT(2), M4_HIDE(0))
38     float global_gain;
39     // M4_NUMBER_DESC("global_gain_alpha", "f32", M4_RANGE(0, 1.0), "0.0", M4_DIGIT(2), M4_HIDE(0))
40     float global_gain_alpha;
41     // M4_NUMBER_DESC("local_gain_scale", "f32", M4_RANGE(0, 128.0), "1.0", M4_DIGIT(2), M4_HIDE(0))
42     float local_gain_scale;
43 
44     // M4_ARRAY_DESC("gain_adj_strength_ratio", "f32", M4_SIZE(1,13), M4_RANGE(0,255), "1.0", M4_DIGIT(2), M4_DYNAMIC(0))
45     float gain_adj_strength_ratio[13];
46 
47     // M4_NUMBER_DESC("color_sat_adj", "f32", M4_RANGE(1, 255.0), "40.0", M4_DIGIT(2))
48     float color_sat_adj;
49     // M4_NUMBER_DESC("color_sat_adj_alpha", "f32", M4_RANGE(0.0, 1.0), "0.8", M4_DIGIT(2))
50     float color_sat_adj_alpha;
51 
52     // M4_NUMBER_DESC("hf_spikes_reducion_strength", "f32", M4_RANGE(0.0, 1.0), "0.5", M4_DIGIT(2))
53     float hf_spikes_reducion_strength;
54     // M4_NUMBER_DESC("hf_denoise_strength", "f32", M4_RANGE(1, 1023.0), "10", M4_DIGIT(2))
55     float hf_denoise_strength;
56     // M4_NUMBER_DESC("hf_color_sat", "f32", M4_RANGE(0.0, 8.0), "1.5", M4_DIGIT(2))
57     float hf_color_sat;
58     // M4_NUMBER_DESC("hf_denoise_alpha", "f32", M4_RANGE(0.0, 1.0), "0.0", M4_DIGIT(2))
59     float hf_denoise_alpha;
60     // M4_NUMBER_DESC("hf_bf_wgt_clip", "u32", M4_RANGE(0, 255), "0", M4_DIGIT(0), M4_HIDE(0))
61     int hf_bf_wgt_clip;
62 
63     // M4_NUMBER_DESC("thumb_spikes_reducion_strength", "f32", M4_RANGE(0.0, 1.0), "0.2", M4_DIGIT(2))
64     float thumb_spikes_reducion_strength;
65     // M4_NUMBER_DESC("thumb_denoise_strength", "f32", M4_RANGE(1, 1023), "4.0", M4_DIGIT(2))
66     float thumb_denoise_strength;
67     // M4_NUMBER_DESC("thumb_color_sat", "f32", M4_RANGE(0.0, 8.0), "4.0", M4_DIGIT(2))
68     float thumb_color_sat;
69 
70 
71     // M4_NUMBER_DESC("lf_denoise_strength", "f32", M4_RANGE(1, 1023.0), "4.0", M4_DIGIT(2))
72     float lf_denoise_strength;
73     // M4_NUMBER_DESC("lf_color_sat", "f32", M4_RANGE(0.0, 8.0), "2.0", M4_DIGIT(2))
74     float lf_color_sat;
75     // M4_NUMBER_DESC("lf_denoise_alpha", "f32", M4_RANGE(0.0, 1.0), "1.0", M4_DIGIT(2))
76     float lf_denoise_alpha;
77 
78 } CalibDbV2_CNRV2_T_Set_ISO_t;
79 
80 typedef struct CalibDbV2_CNRV2_T_Set_s {
81     // M4_STRING_MARK_DESC("SNR_Mode", M4_SIZE(1,1), M4_RANGE(0, 64), "LSNR",M4_DYNAMIC(0), "index1")
82     char *SNR_Mode;
83     // M4_STRING_DESC("Sensor_Mode", M4_SIZE(1,1), M4_RANGE(0, 64), "lcg", M4_DYNAMIC(0))
84     char *Sensor_Mode;
85     // M4_STRUCT_LIST_DESC("Tuning_ISO", M4_SIZE_DYNAMIC, "double_index_list")
86     CalibDbV2_CNRV2_T_Set_ISO_t *Tuning_ISO;
87     int Tuning_ISO_len;
88 
89 } CalibDbV2_CNRV2_T_Set_t;
90 
91 typedef struct CalibDbV2_CNRV2_T_Kernel_s {
92     // 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))
93     float kernel_5x5[5];
94 } CalibDbV2_CNRV2_T_Kernel_t;
95 
96 
97 typedef struct CalibDbV2_CNRV2_Tuning_s {
98     // M4_BOOL_DESC("enable", "1")
99     int enable;
100     // M4_STRUCT_DESC("Kernel_Coeff", "normal_ui_style")
101     CalibDbV2_CNRV2_T_Kernel_t Kernel_Coeff;
102     // M4_STRUCT_LIST_DESC("Setting", M4_SIZE_DYNAMIC, "double_index_list")
103     CalibDbV2_CNRV2_T_Set_t *Setting;
104     int Setting_len;
105 } CalibDbV2_CNRV2_Tuning_t;
106 
107 
108 typedef struct CalibDbV2_CNRV2_s {
109     // M4_STRING_DESC("Version", M4_SIZE(1,1), M4_RANGE(0, 64), "V1", M4_DYNAMIC(0))
110     char *Version;
111     // M4_STRUCT_DESC("TuningPara", "normal_ui_style")
112     CalibDbV2_CNRV2_Tuning_t TuningPara;
113 } CalibDbV2_CNRV2_t;
114 
115 RKAIQ_END_DECLARE
116 
117 #endif
118