xref: /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/include/iq_parser_v2/agamma_uapi_head.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  *  Copyright (c) 2021 Rockchip Corporation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 #ifndef __AGAMMA_UAPI_HEAD_H__
19 #define __AGAMMA_UAPI_HEAD_H__
20 
21 #include "agamma_head.h"
22 
23 typedef struct AgammaApiManualV10_s {
24     // M4_BOOL_DESC("Gamma_en", "1")
25     bool Gamma_en;
26     // M4_ENUM_DESC("Gamma_out_segnum", "GammaType_t", "GAMMATYPE_LOG")
27     GammaType_t Gamma_out_segnum;
28     // M4_NUMBER_DESC("Gamma_out_offset", "u16", M4_RANGE(0,4095), "0", M4_DIGIT(0))
29     uint16_t Gamma_out_offset;
30     // M4_ARRAY_MARK_DESC("Gamma_curve", "u16", M4_SIZE(1,45),  M4_RANGE(0, 4095), "[0, 6, 11, 17, 22, 28, 33, 39, 44, 55, 66, 77, 88, 109, 130, 150, 170, 210, 248, 286, 323, 393, 460, 525, 586, 702, 809, 909, 1002, 1172, 1325, 1462, 1588, 1811, 2004, 2174, 2327, 2590, 2813, 3006, 3177, 3467, 3708, 3915, 4095]", M4_DIGIT(0), M4_DYNAMIC(0), "curve_table")
31     uint16_t Gamma_curve[CALIBDB_AGAMMA_KNOTS_NUM_V10];
32 } AgammaApiManualV10_t;
33 
34 typedef struct AgammaApiManualV11_s {
35     // M4_BOOL_DESC("Gamma_en", "1")
36     bool Gamma_en;
37     // M4_NUMBER_DESC("Gamma_out_offset", "u16", M4_RANGE(0,4095), "0", M4_DIGIT(0))
38     uint16_t Gamma_out_offset;
39     // M4_ARRAY_MARK_DESC("Gamma_curve", "u16", M4_SIZE(1,49),  M4_RANGE(0, 4095), "[0, 93, 128, 154, 175, 194, 211, 226, 240, 266, 289, 310, 329, 365, 396, 425, 451, 499, 543, 582, 618, 684, 744, 798, 848, 938, 1019, 1093, 1161, 1285, 1396, 1498, 1592, 1761, 1914, 2052, 2181, 2414, 2622, 2813, 2989, 3153, 3308, 3454, 3593, 3727, 3854, 3977, 4095]", M4_DIGIT(0), M4_DYNAMIC(0), "curve_table")
40     uint16_t Gamma_curve[CALIBDB_AGAMMA_KNOTS_NUM_V11];
41 } AgammaApiManualV11_t;
42 
43 #endif /*__AGAMMA_UAPI_HEAD_H__*/
44