xref: /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/include/algos/awb/rk_aiq_types_awb_stat_v200.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2 * rk_aiq_types_awb_stat_v200.h
3 
4 * for rockchip v2.0.0
5 *
6 *  Copyright (c) 2019 Rockchip Corporation
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 *      http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 *
20 */
21 /* for rockchip v2.0.0*/
22 
23 #ifndef __RK_AIQ_TYPE_AWB_STAT_V200_H__
24 #define __RK_AIQ_TYPE_AWB_STAT_V200_H__
25 
26 #include "rk_aiq_types_awb_stat_v2xx.h"
27 
28 #define RK_AIQ_AWB_MULTIWINDOW_NUM 8
29 #define RK_AIQ_AWB_STAT_WP_RANGE_NUM_V200 7
30 
31 typedef enum rk_aiq_awb_xy_type_v200_e {
32     RK_AIQ_AWB_XY_TYPE_NORMAL_V200 = 0,
33     RK_AIQ_AWB_XY_TYPE_BIG_V200 = 1,
34     RK_AIQ_AWB_XY_TYPE_SMALL_V200 = 2,
35     RK_AIQ_AWB_XY_TYPE_MAX_V200
36 } rk_aiq_awb_xy_type_v200_t;
37 
38 typedef enum rk_aiq_blk_stat_mode_v200_e {
39     RK_AIQ_AWB_BLK_STAT_MODE_MIN_V200 = 0,
40     RK_AIQ_AWB_BLK_STAT_MODE_ALL_V200 = 1,
41     RK_AIQ_AWB_BLK_STAT_MODE_UVWP_V200 = 2,
42     RK_AIQ_AWB_BLK_STAT_MODE_XYWP_V200 = 3,
43     RK_AIQ_AWB_BLK_STAT_MODE_MAX_V200
44 } rk_aiq_blk_stat_mode_v200_t;//cxf333 repeat
45 typedef struct rk_aiq_awb_exc_range_s {
46     rk_aiq_awb_exc_range_domain_t domain;
47     bool excludeEnable;// 0 disable,1 eanble;
48     bool measureEnable;// 1 calculate sum value in the range,0 don't meausre
49     int xu[2];//left right
50     int yv[2];//top bottom
51 } rk_aiq_awb_exc_range_t;
52 
53 typedef struct rk_aiq_awb_stat_cfg_v200_s {
54     bool awbEnable;
55     bool lscBypEnable;
56     bool uvDetectionEnable;
57     bool xyDetectionEnable;
58     unsigned short storeWpFlagIllu[RK_AIQ_AWB_STORE_LS_WPFLAG_NUM];
59     unsigned short threeDyuvIllu[RK_AIQ_AWB_YUV_LS_PARA_NUM];
60     rk_aiq_down_scale_mode_t dsMode;
61     rk_aiq_blk_stat_mode_v200_t blkMeasureMode;
62     unsigned short blkMeasWpTh[3];
63     bool multiwindow_en;
64     uint8_t frameChoose;//default value is 0,support to choose long frame ,middle frame or short frame when hdr is on
65     uint8_t rgb2yuv_c_range;
66     uint8_t rgb2yuv_y_range;
67     short rgb2yuv_matrix[9];
68     unsigned short windowSet[4];//hOffset,vOffser,hSiz,vSize;
69     unsigned char lightNum;
70     unsigned short maxR;
71     unsigned short minR;
72     unsigned short maxG;
73     unsigned short minG;
74     unsigned short maxB;
75     unsigned short minB;
76     unsigned short maxY;
77     unsigned short minY;
78     rk_aiq_awb_uv_range_para_t         uvRange_param[RK_AIQ_AWB_MAX_WHITEREGIONS_NUM];//A CWF D50 D65 D75 HZ TL84
79     rk_aiq_awb_3dyuv_range_para_t       yuvRange_param[RK_AIQ_AWB_YUV_LS_PARA_NUM];
80     rk_aiq_rgb2xy_para_t     rgb2xy_param;
81     rk_aiq_awb_xy_range_para_t   xyRange_param[RK_AIQ_AWB_MAX_WHITEREGIONS_NUM];
82     //several window in pixel domain
83     unsigned short multiwindow[RK_AIQ_AWB_MULTIWINDOW_NUM][4];//8  windows in pixel domain ,hOffset,vOffser,hSize,vSize;
84     //several winow in uv or xy domain
85     rk_aiq_awb_exc_range_t excludeWpRange[RK_AIQ_AWB_EXCLUDE_WP_RANGE_NUM];
86 
87     int  groupIllIndxCurrent;//for time share
88     int  IllIndxSetCurrent[RK_AIQ_AWB_MAX_WHITEREGIONS_NUM];//for time share
89     char timeSign[64];
90 
91 } rk_aiq_awb_stat_cfg_v200_t;
92 
93 typedef struct rk_aiq_awb_stat_wp_res_v200_s {
94     unsigned int WpNo;
95     unsigned int Rvalue;
96     unsigned int Gvalue;
97     unsigned int Bvalue;
98 } rk_aiq_awb_stat_wp_res_v200_t;
99 
100 typedef struct rk_aiq_awb_stat_blk_res_v200_s {
101     unsigned int Rvalue;
102     unsigned int Gvalue;
103     unsigned int Bvalue;
104     bool isWP[RK_AIQ_AWB_STORE_LS_WPFLAG_NUM]; //record wp flag in three light sources
105 } rk_aiq_awb_stat_blk_res_v200_t;
106 
107 typedef struct rk_aiq_awb_stat_wp_res_light_v200_s {
108     rk_aiq_awb_stat_wp_res_v200_t xYType[RK_AIQ_AWB_XY_TYPE_MAX_V200];
109 } rk_aiq_awb_stat_wp_res_light_v200_t;
110 
111 typedef struct rk_aiq_awb_stat_res_v200_s {
112     rk_aiq_awb_stat_wp_res_light_v200_t light[RK_AIQ_AWB_MAX_WHITEREGIONS_NUM];
113     rk_aiq_awb_stat_blk_res_v200_t   blockResult[RK_AIQ_AWB_GRID_NUM_TOTAL];
114     //window in pixel domain
115     rk_aiq_awb_stat_wp_res_light_v200_t multiwindowLightResult[RK_AIQ_AWB_MAX_WHITEREGIONS_NUM];
116     //window in xy or uv domain
117     rk_aiq_awb_stat_wp_res_v200_t excWpRangeResult[RK_AIQ_AWB_STAT_WP_RANGE_NUM_V200];
118 
119     rk_aiq_awb_stat_cfg_v200_t  awb_cfg_effect_v200;
120 } rk_aiq_awb_stat_res_v200_t;
121 
122 #endif
123