xref: /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/algos/auvnr/rk_aiq_types_auvnr_algo_prvt_v1.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  *rk_aiq_types_alsc_algo_prvt.h
3  *
4  *  Copyright (c) 2019 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_AUVNR_ALGO_PRVT_V1_H_
21 #define _RK_AIQ_TYPES_AUVNR_ALGO_PRVT_V1_H_
22 
23 #include "auvnr/rk_aiq_types_auvnr_algo_int_v1.h"
24 #include "RkAiqCalibDbTypes.h"
25 #include "xcam_log.h"
26 #include "xcam_common.h"
27 #include "RkAiqCalibDbTypesV2.h"
28 #include "RkAiqCalibDbV2Helper.h"
29 
30 //RKAIQ_BEGIN_DECLARE
31 
32 /************uvnr fix***************/
33 #define RKUVNR_ratio 0
34 #define RKUVNR_offset 4
35 #define RKUVNR_kernels 7
36 #define RKUVNR_medRatio 4
37 #define RKUVNR_sigmaR 0
38 #define RKUVNR_uvgain 4
39 #define RKUVNR_exp2_lut_y 7
40 #define RKUVNR_bfRatio RKUVNR_exp2_lut_y
41 #define RKUVNR_gainRatio 7
42 #define RKUVNR_imgBit_set 8
43 #define RKUVNR_log2e 6
44 
45 typedef struct Auvnr_GainState_s {
46     int gain_stat_full_last;
47     int gainState;
48     int gainState_last;
49     float gain_th0[2];
50     float gain_th1[2];
51     float gain_cur;
52     float ratio;
53 } Auvnr_GainState_t;
54 
55 
56 //anr context
57 typedef struct Auvnr_Context_V1_s {
58     Auvnr_ExpInfo_t stExpInfo;
59     Auvnr_State_t eState;
60     Auvnr_OPMode_t eMode;
61 
62     Auvnr_Auto_Attr_V1_t stAuto;
63     Auvnr_Manual_Attr_V1_t stManual;
64 
65     CalibDb_UVNR_2_t stUvnrCalib;
66 	CalibDbV2_UVNR_t uvnr_v1;
67 
68 	float fChrom_SF_Strength;
69 
70 	bool isIQParaUpdate;
71 	bool isGrayMode;
72 	Auvnr_ParamMode_t eParamMode;
73 
74 	int rawWidth;
75 	int rawHeight;
76 
77 	Auvnr_GainState_t stGainState;
78 	int mfnr_mode_3to1;
79 	int mfnr_local_gain_en;
80 	int prepare_type;
81 } Auvnr_Context_V1_t;
82 
83 
84 
85 
86 
87 
88 //RKAIQ_END_DECLARE
89 
90 #endif
91 
92 
93