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_ASHARP_ALGO_PRVT_H_ 21 #define _RK_AIQ_TYPES_ASHARP_ALGO_PRVT_H_ 22 23 #include "asharp/rk_aiq_types_asharp_algo_int.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 //sharp fix 33 #define reg_sharpenHW_lratio_fix_bits 8 34 #define reg_sharpenHW_hratio_fix_bits 8 35 #define reg_sharpenHW_M_ratio_fix_bits 2 36 #define reg_sharpenHW_H_ratio_fix_bits 2 37 #define reg_sharpenHW_pbf_ratio_fix_bits 7 38 #define reg_sharpenHW_lum_min_m_fix_bits 4 39 #define reg_sharpenHW_hbf_ratio_fix_bits 8 40 #define reg_sharpenHW_pPBfCoeff_fix_bits 6 41 #define reg_sharpenHW_pMRfCoeff_fix_bits 7 42 #define reg_sharpenHW_pMBfCoeff_fix_bits 6 43 #define reg_sharpenHW_pHRfCoeff_fix_bits 7 44 #define reg_sharpenHW_pHBfCoeff_fix_bits 6 45 46 //edgefilter fix 47 #define RK_EDGEFILTER_COEF_BIT (6) 48 #define reg_dir_min_fix_bits RK_EDGEFILTER_COEF_BIT 49 #define reg_l_alpha_fix_bits 8 50 #define reg_g_alpha_fix_bits 8 51 #define reg_detail_alpha_dog_fix_bits 6 52 #define reg_h0_h_coef_5x5_fix_bits 6 53 #define reg_h_coef_5x5_fix_bits 6 54 #define reg_gf_coef_3x3_fix_bits 4 55 #define reg_dog_kernel_fix_bits 6 56 #define reg_smoth4_fix_bits 8 57 58 typedef struct AsharpContext_s { 59 AsharpExpInfo_t stExpInfo; 60 float fEnvLight; 61 AsharpState_t eState; 62 AsharpOPMode_t eMode; 63 64 Asharp_Auto_Attr_t stAuto; 65 Asharp_Manual_Attr_t stManual; 66 67 //xml 68 CalibDb_Sharp_2_t stSharpCalib; 69 CalibDb_EdgeFilter_2_t stEdgeFltCalib; 70 71 float fStrength; 72 73 bool isIQParaUpdate; 74 bool isGrayMode; 75 AsharpParamMode_t eParamMode; 76 77 int prepare_type; 78 int mfnr_mode_3to1; 79 80 //json 81 CalibDbV2_Edgefilter_t edgefilter_v1; 82 CalibDbV2_SharpV1_t sharp_v1; 83 84 } AsharpContext_t; 85 86 87 RKAIQ_END_DECLARE 88 89 #endif 90 91 92 93 94 95 96 97 98 99 100