xref: /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/include/algos/a3dlut/rk_aiq_types_a3dlut_ext.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * rk_aiq_types_a3dlut_ext.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 _RK_AIQ_TYPES_A3DLUT_EXT_H_
21 #define _RK_AIQ_TYPES_A3DLUT_EXT_H_
22 
23 RKAIQ_BEGIN_DECLARE
24 
25 
26 typedef struct rk_aiq_lut3d_mlut3d_attrib_s {
27     // M4_ARRAY_DESC("LutR", "f32", M4_SIZE(81,9), M4_RANGE(0,1023), "0", M4_DIGIT(0), M4_DYNAMIC(0))
28     unsigned short look_up_table_r[729];//10bit
29     // M4_ARRAY_DESC("LutG", "f32", M4_SIZE(81,9), M4_RANGE(0,4095), "0", M4_DIGIT(0), M4_DYNAMIC(0))
30     unsigned short look_up_table_g[729];//12bit
31     // M4_ARRAY_DESC("LutB", "f32", M4_SIZE(81,9), M4_RANGE(0,1023), "0", M4_DIGIT(0), M4_DYNAMIC(0))
32     unsigned short look_up_table_b[729];//10bit
33 } rk_aiq_lut3d_mlut3d_attrib_t;
34 
35 typedef enum rk_aiq_lut3d_op_mode_s {
36     RK_AIQ_LUT3D_MODE_INVALID                     = 0,        /**< initialization value */
37     RK_AIQ_LUT3D_MODE_MANUAL                      = 1,        /**< run manual lens shading correction */
38     RK_AIQ_LUT3D_MODE_AUTO                        = 2,        /**< run auto lens shading correction */
39     RK_AIQ_LUT3D_MODE_MAX
40 } rk_aiq_lut3d_op_mode_t;
41 
42 
43 typedef struct rk_aiq_lut3d_attrib_s {
44     rk_aiq_uapi_sync_t sync;
45     // M4_BOOL_DESC("bypass", "1")
46     bool byPass;
47     rk_aiq_lut3d_op_mode_t mode;
48     // M4_STRUCT_DESC("manual lut", "normal_ui_style")
49     rk_aiq_lut3d_mlut3d_attrib_t stManual;
50 } rk_aiq_lut3d_attrib_t;
51 
52 typedef struct rk_aiq_lut3d_querry_info_s {
53     bool lut3d_en;
54     // M4_NUMBER_DESC("alpha", "f32", M4_RANGE(0,1), "0", M4_DIGIT(2))
55     float alpha;
56     // M4_STRING_DESC("Lut name", M4_SIZE(1,1), M4_RANGE(0, 25), "Normal",M4_DYNAMIC(0))
57     char name[25];
58     // M4_ARRAY_DESC("LutR", "f32", M4_SIZE(81,9), M4_RANGE(0,1023), "0", M4_DIGIT(0), M4_DYNAMIC(0))
59     unsigned short look_up_table_r[729];//10bit
60     // M4_ARRAY_DESC("LutG", "f32", M4_SIZE(81,9), M4_RANGE(0,4095), "0", M4_DIGIT(0), M4_DYNAMIC(0))
61     unsigned short look_up_table_g[729];//12bit
62     // M4_ARRAY_DESC("LutB", "f32", M4_SIZE(81,9), M4_RANGE(0,1023), "0", M4_DIGIT(0), M4_DYNAMIC(0))
63     unsigned short look_up_table_b[729];//10bit
64 } rk_aiq_lut3d_querry_info_t;
65 
66 
67 RKAIQ_END_DECLARE
68 
69 #endif
70