hc
2024-08-16 a24a44ff9ca902811b99aa9663d697cf452e08ef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
/*
 * atmo_head.h
 *
 *  Copyright (c) 2021 Rockchip Corporation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
 
#ifndef __CALIBDBV2_ATMO_HEADER_H__
#define __CALIBDBV2_ATMO_HEADER_H__
 
#include "rk_aiq_comm.h"
 
RKAIQ_BEGIN_DECLARE
 
typedef enum GlobalLumaMode_e {
    GLOBALLUMAMODE_ENVLV     = 0,
    GLOBALLUMAMODE_ISO       = 1,
} GlobalLumaMode_t;
 
typedef struct GlobalLumaData_s
{
    // M4_ARRAY_DESC("EnvLv", "f32", M4_SIZE(1,100), M4_RANGE(0,1), "0",M4_DIGIT(4), M4_DYNAMIC(1))
    float*            EnvLv;
    int EnvLv_len;
    // M4_ARRAY_DESC("ISO", "f32", M4_SIZE(1,100), M4_RANGE(0,10000000), "50",M4_DIGIT(4), M4_DYNAMIC(1))
    float* ISO;
    int ISO_len;
    // M4_ARRAY_DESC("Strength", "f32", M4_SIZE(1,100), M4_RANGE(0,1), "0.25",M4_DIGIT(4), M4_DYNAMIC(1))
    float*            Strength;
    int Strength_len;
} GlobalLumaData_t;
 
typedef struct CalibDbGlobalLuma_s
{
    // M4_ENUM_DESC("Mode", "GlobalLumaMode_t", "GLOBALLUMAMODE_ENVLV")
    GlobalLumaMode_t Mode;
    // M4_ARRAY_TABLE_DESC("GlobalLumaData", "array_table_ui", "none")
    GlobalLumaData_t GlobalLumaData;
    // M4_NUMBER_DESC("Tolerance", "f32", M4_RANGE(0,0.2), "0", M4_DIGIT(4))
    float            Tolerance;
} CalibDbGlobalLuma_t;
 
typedef enum DetailsHighLightMode_e {
    DETAILSHIGHLIGHTMODE_OEPDF       = 0,
    DETAILSHIGHLIGHTMODE_ENVLV       = 1,
} DetailsHighLightMode_t;
 
typedef struct HighLightData_s
{
    // M4_ARRAY_DESC("OEPdf", "f32", M4_SIZE(1,100), M4_RANGE(0,1), "0",M4_DIGIT(4), M4_DYNAMIC(1))
    float* OEPdf;
    int OEPdf_len;
    // M4_ARRAY_DESC("EnvLv", "f32", M4_SIZE(1,100), M4_RANGE(0,1), "0",M4_DIGIT(4), M4_DYNAMIC(1))
    float*            EnvLv;
    int EnvLv_len;
    // M4_ARRAY_DESC("Strength", "f32", M4_SIZE(1,100), M4_RANGE(0,1), "0.5",M4_DIGIT(4), M4_DYNAMIC(1))
    float*            Strength;
    int Strength_len;
} HighLightData_t;
 
typedef struct CalibDbDetailsHighLight_s
{
    // M4_ENUM_DESC("Mode", "DetailsHighLightMode_t", "DETAILSHIGHLIGHTMODE_ENVLV")
    DetailsHighLightMode_t Mode;
    // M4_ARRAY_TABLE_DESC("HighLightData", "array_table_ui", "none")
    HighLightData_t HighLightData;
    // M4_NUMBER_DESC("Tolerance", "f32", M4_RANGE(0,0.2), "0", M4_DIGIT(4))
    float                  Tolerance;
} CalibDbDetailsHighLight_t;
 
typedef enum DetailsLowLightMode_e {
    DETAILSLOWLIGHTMODE_FOCUSLUMA   = 0,
    DETAILSLOWLIGHTMODE_DARKPDF     = 1,
    DETAILSLOWLIGHTMODE_ISO          = 2,
} DetailsLowLightMode_t;
 
typedef struct LowLightData_s
{
    // M4_ARRAY_DESC("FocusLuma", "f32", M4_SIZE(1,100), M4_RANGE(0,100), "1",M4_DIGIT(4), M4_DYNAMIC(1))
    float* FocusLuma;
    int FocusLuma_len;
    // M4_ARRAY_DESC("DarkPdf", "f32", M4_SIZE(1,100), M4_RANGE(0,1), "0",M4_DIGIT(4), M4_DYNAMIC(1))
    float* DarkPdf;
    int DarkPdf_len;
    // M4_ARRAY_DESC("ISO", "f32", M4_SIZE(1,100), M4_RANGE(0,10000000), "50",M4_DIGIT(4), M4_DYNAMIC(1))
    float* ISO;
    int ISO_len;
    // M4_ARRAY_DESC("Strength", "f32", M4_SIZE(1,100), M4_RANGE(1,4), "1",M4_DIGIT(4), M4_DYNAMIC(1))
    float*            Strength;
    int Strength_len;
} LowLightData_t;
 
typedef struct CalibDbDetailsLowLight_s
{
    // M4_ENUM_DESC("Mode", "DetailsLowLightMode_t", "DETAILSLOWLIGHTMODE_ISO")
    DetailsLowLightMode_t Mode;
    // M4_ARRAY_TABLE_DESC("LowLightData", "array_table_ui", "none")
    LowLightData_t LowLightData;
    // M4_NUMBER_DESC("Tolerance", "f32", M4_RANGE(0,0.2), "0", M4_DIGIT(4))
    float                  Tolerance;
} CalibDbDetailsLowLight_t;
 
typedef enum TmoTypeMode_e {
    TMOTYPEMODE_DYNAMICRANGE   = 0,
    TMOTYPEMODE_ENVLV           = 1,
} TmoTypeMode_t;
 
typedef struct TmoData_s
{
    // M4_ARRAY_DESC("DynamicRange", "f32", M4_SIZE(1,100), M4_RANGE(1,84), "1",M4_DIGIT(4), M4_DYNAMIC(1))
    float* DynamicRange;
    int DynamicRange_len;
    // M4_ARRAY_DESC("EnvLv", "f32", M4_SIZE(1,100), M4_RANGE(0,1), "0",M4_DIGIT(4), M4_DYNAMIC(1))
    float*            EnvLv;
    int EnvLv_len;
    // M4_ARRAY_DESC("Strength", "f32", M4_SIZE(1,100), M4_RANGE(0,1), "0.5",M4_DIGIT(4), M4_DYNAMIC(1))
    float*            Strength;
    int Strength_len;
} TmoData_t;
 
typedef struct CalibDbLocalTMO_s
{
    // M4_ENUM_DESC("Mode", "TmoTypeMode_t", "TMOTYPEMODE_DYNAMICRANGE")
    TmoTypeMode_t Mode;
    // M4_ARRAY_TABLE_DESC("LocalTmoData", "array_table_ui", "none")
    TmoData_t LocalTmoData;
    // M4_NUMBER_DESC("Tolerance", "f32", M4_RANGE(0,0.2), "0", M4_DIGIT(4))
    float                  Tolerance;
} CalibDbLocalTMO_t;
 
typedef struct CalibDbGlobaTMO_s
{
    // M4_BOOL_DESC("Enable", "1")
    bool         Enable;
    // M4_NUMBER_DESC("IIR", "f32", M4_RANGE(1,1000), "64", M4_DIGIT(0))
    float         IIR;
    // M4_ENUM_DESC("Mode", "TmoTypeMode_t", "TMOTYPEMODE_DYNAMICRANGE")
    TmoTypeMode_t Mode;
    // M4_ARRAY_TABLE_DESC("GlobalTmoData", "array_table_ui", "none")
    TmoData_t GlobalTmoData;
    // M4_NUMBER_DESC("Tolerance", "f32", M4_RANGE(0,0.2), "0", M4_DIGIT(4))
    float                  Tolerance;
} CalibDbGlobaTMO_t;
 
typedef struct CalibDbTmoV20_s
{
    // M4_BOOL_DESC("Enable", "1")
    bool         Enable;
    // M4_STRUCT_DESC("GlobalLuma", "normal_ui_style")
    CalibDbGlobalLuma_t       GlobalLuma;
    // M4_STRUCT_DESC("DetailsHighLight", "normal_ui_style")
    CalibDbDetailsHighLight_t DetailsHighLight;
    // M4_STRUCT_DESC("DetailsLowLight", "normal_ui_style")
    CalibDbDetailsLowLight_t  DetailsLowLight;
    // M4_STRUCT_DESC("LocalTMO", "normal_ui_style")
    CalibDbLocalTMO_t         LocalTMO;
    // M4_STRUCT_DESC("GlobaTMO", "normal_ui_style")
    CalibDbGlobaTMO_t         GlobaTMO;
    // M4_NUMBER_DESC("damp", "f32", M4_RANGE(0,1), "0.9", M4_DIGIT(4))
    float damp;
} CalibDbTmoV20_t;
 
typedef struct CalibDbV2_tmo_s
{
    // M4_STRUCT_DESC("TmoTuningPara", "normal_ui_style")
    CalibDbTmoV20_t TmoTuningPara;
} CalibDbV2_tmo_t;
 
 
RKAIQ_END_DECLARE
 
#endif