hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
/*
 *  Copyright (c) 2019 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 _RK_AIQ_CALIB_API_H_
#define _RK_AIQ_CALIB_API_H_
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
//#include "tinyxml2.h"
 
#include "RkAiqCalibDbTypes.h"
 
#if defined(_MSC_VER)
#define strcasecmp _stricmp
#define snprintf(buf,len, format,...) _snprintf_s(buf, len, len-1, format, __VA_ARGS__)
#endif
#ifndef container_of
#define container_of(ptr, type, member) \
  ((type *)(((unsigned long)(unsigned char *)(ptr)) - (unsigned long)(&((type *)0)->member)))
 
#endif
#if defined(__linux__)
#include "smartptr.h"
#include <xcam_common.h>
#include "xcam_log.h"
 
#ifdef DCT_ASSERT
#undef DCT_ASSERT
#endif
#define DCT_ASSERT  assert
 
#elif defined(_WIN32)
 
#ifdef DCT_ASSERT
#undef DCT_ASSERT
#endif
#define DCT_ASSERT(x) if(!(x))return false
 
#define LOGI printf
#define LOGD printf
#define LOGE printf
#define LOG1 printf
 
#endif
bool AddAecCalibProfile2AecCalibList(struct list_head *profile_list, CalibDb_Aec_CalibPara_t* pAddAec);
bool GetAecProfileFromAecCalibListBySceneName(const struct list_head* profile_list, const char* name, CalibDb_Aec_CalibPara_t** pAecProfile, int *name_index = NULL);
bool GetAecProfileFromAecCalibListByIdx(const struct list_head* profile_list, int idx, const CalibDb_Aec_CalibPara_t** pAecProfile) ;
bool AddAecTuneProfile2AecTuneList(struct list_head *profile_list, CalibDb_Aec_TunePara_t* pAddAec);
bool GetAecProfileFromAecTuneListBySceneName(const struct list_head* profile_list, const char* name, CalibDb_Aec_TunePara_t** pAecProfile);
bool GetAecProfileFromAecTuneListByIdx(const struct list_head* profile_list, int idx, const CalibDb_Aec_TunePara_t** pAecProfile) ;
bool AddAwbCalibV200Profile2AwbCalibV200List(struct list_head *profile_list, CalibDb_Awb_Calib_Para_V200_t* pAddAwb);
bool GetAwbProfileFromAwbCalibV200ListBySceneName(const struct list_head* profile_list, const char* name, CalibDb_Awb_Calib_Para_V200_t** pAwbProfile, int *name_index = NULL);
bool GetAwbProfileFromAwbCalibV200ListByIdx(const struct list_head* profile_list, int idx, const CalibDb_Awb_Calib_Para_V200_t** pAwbProfile) ;
bool AddAwbCalibV201Profile2AwbCalibV201List(struct list_head *profile_list, CalibDb_Awb_Calib_Para_V201_t* pAddAwb);
bool GetAwbProfileFromAwbCalibV201ListBySceneName(const struct list_head* profile_list, const char* name, CalibDb_Awb_Calib_Para_V201_t** pAwbProfile, int *name_index = NULL);
bool GetAwbProfileFromAwbCalibV201ListByIdx(const struct list_head* profile_list, int idx, const CalibDb_Awb_Calib_Para_V201_t** pAwbProfile) ;
bool AddAwbAdjustProfile2AwbAdjustList(struct list_head *profile_list, CalibDb_Awb_Adjust_Para_t* pAddAwb);
bool GetAwbProfileFromAwbAdjustListBySceneName(const struct list_head* profile_list, const char* name, CalibDb_Awb_Adjust_Para_t** pAwbProfile);
bool GetAwbProfileFromAwbAdjustListByIdx(const struct list_head* profile_list, int idx, const CalibDb_Awb_Adjust_Para_t** pAwbProfile) ;
 
bool CamCalibDbCreate
(
    CamCalibDbContext_t*  pCamCalibDbCtx
);
 
bool CamCalibDbRelease
(
    CamCalibDbContext_t*  pCamCalibDbCtx
) ;
 
bool CamCalibdbAddBayernrV2Setting2DProfile
(
    struct list_head *profile_list,
    Calibdb_Bayernr_2Dparams_V2_t* pAdd
 
);
 
bool CamCalibdbGetBayernrV2Setting2DByName
(
    const struct list_head* profile_list,
    char* name,
    Calibdb_Bayernr_2Dparams_V2_t** ppProfile
);
 
bool CamCalibdbGetBayernrV2Setting2DByIdx
(
    const struct list_head* profile_list,
    int idx,
    Calibdb_Bayernr_2Dparams_V2_t** ppProfile
);
 
bool CamCalibdbAddBayernrV2Setting3DProfile
(
    struct list_head *profile_list,
    CalibDb_Bayernr_3DParams_V2_t* pAdd
);
 
bool CamCalibdbGetBayernrV2Setting3DByName
(
    const struct list_head* profile_list,
    char* name,
    CalibDb_Bayernr_3DParams_V2_t** ppProfile
);
 
bool CamCalibdbGetBayernrV2Setting3DByIdx
(
    const struct list_head* profile_list,
    int idx,
    CalibDb_Bayernr_3DParams_V2_t** ppProfile
);
 
bool CamCalibdbAddBayernrV2Profile
(
    struct list_head *profile_list,
    CalibDb_Bayernr_V2_t* pAdd
) ;
 
bool CamCalibdbGetBayernrV2ProfileByName
(
    const struct list_head* profile_list,
    char* name,
    CalibDb_Bayernr_V2_t** ppProfile
);
 
bool CamCalibdbGetBayernrV2ProfileByIdx
(
    const struct list_head* profile_list,
    int idx,
    CalibDb_Bayernr_V2_t** ppProfile
);
 
bool CamCalibdbAddYnrV2SettingProfile
(
    struct list_head *profile_list,
    Calibdb_Ynr_params_V2_t* pAdd
);
 
bool CamCalibdbGetYnrV2SettingByName
(
    const struct list_head* profile_list,
    char* name,
    Calibdb_Ynr_params_V2_t** ppProfile
);
 
bool CamCalibdbGetYnrV2SettingByIdx
(
    const struct list_head* profile_list,
    int idx,
    Calibdb_Ynr_params_V2_t** ppProfile
);
 
bool CamCalibdbAddYnrV2Profile
(
    struct list_head *profile_list,
    Calibdb_Ynr_V2_t* pAdd
);
 
bool CamCalibdbGetYnrV2ProfileByName
(
    const struct list_head* profile_list,
    char* name,
    Calibdb_Ynr_V2_t** ppProfile
);
 
bool CamCalibdbGetYnrV2ProfileByIdx
(
    const struct list_head* profile_list,
    int idx,
    Calibdb_Ynr_V2_t** ppProfile
);
 
bool CamCalibdbAddCnrV1SettingProfile
(
    struct list_head *profile_list,
    Calibdb_Cnr_params_V1_t* pAdd
 
);
 
bool CamCalibdbGetCnrV1SettingByName
(
    const struct list_head* profile_list,
    char* name,
    Calibdb_Cnr_params_V1_t** ppProfile
);
 
bool CamCalibdbGetCnrV1SettingByIdx
(
    const struct list_head* profile_list,
    int idx,
    Calibdb_Cnr_params_V1_t** ppProfile
) ;
 
 
bool CamCalibdbAddCnrV1Profile
(
    struct list_head *profile_list,
    Calibdb_Cnr_V1_t* pAdd
);
 
bool CamCalibdbGetCnrV1ProfileByName
(
    const struct list_head* profile_list,
    char* name,
    Calibdb_Cnr_V1_t** ppProfile
);
 
bool CamCalibdbGetCnrV1ProfileByIdx
(
    const struct list_head* profile_list,
    int idx,
    Calibdb_Cnr_V1_t** ppProfile
);
 
 
bool CamCalibdbAddSharpV3SettingProfile
(
    struct list_head *profile_list,
    Calibdb_Sharp_params_V3_t* pAdd
 
);
 
bool CamCalibdbGetSharpV3SettingByName
(
    const struct list_head* profile_list,
    char* name,
    Calibdb_Sharp_params_V3_t** ppProfile
);
 
bool CamCalibdbGetSharpV3SettingByIdx
(
    const struct list_head* profile_list,
    int idx,
    Calibdb_Sharp_params_V3_t** ppProfile
);
 
bool CamCalibdbAddSharpV3Profile
(
    struct list_head *profile_list,
    Calibdb_Sharp_V3_t* pAdd
);
 
 
bool CamCalibdbGetSharpV3ProfileByName
(
    const struct list_head* profile_list,
    char* name,
    Calibdb_Sharp_V3_t** ppProfile
);
 
bool CamCalibdbGetSharpV3ProfileByIdx
(
    const struct list_head* profile_list,
    int idx,
    Calibdb_Sharp_V3_t** ppProfile
);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
#endif