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_AYNR_ALGO_PRVT_V1_H_ 21 #define _RK_AIQ_TYPES_AYNR_ALGO_PRVT_V1_H_ 22 23 #include "aynr/rk_aiq_types_aynr_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 31 RKAIQ_BEGIN_DECLARE 32 33 /************ynr fix***************/ 34 #define FIX_BIT_CI 5//7 35 #define FIX_BIT_NOISE_SIGMA 5//7 36 #define FIX_BIT_DENOISE_WEIGHT 7 37 #define FIX_BIT_BF_SCALE 4//7 38 #define FIX_BIT_LUMA_CURVE 4//7 39 #define FIX_BIT_EDGE_SOFTNESS 7 40 #define FIX_BIT_GRAD_ADJUST_CURVE 4//7 41 #define FIX_BIT_LSC_ADJUST_RATIO 4 42 #define FIX_BIT_RADIAL_ADJUST_CURVE 4 43 #define FIX_BIT_VAR_TEXTURE 4 44 #define FIX_BIT_BF_W 7 45 #define FIX_BIT_DENOISE_STRENGTH 4//7 46 #define FIX_BIT_SOFT_THRESHOLD_SCALE 8 47 #define FIX_BIT_SOFT_THRESHOLD_SCALE_V2 4 48 #define FIX_BIT_DIRECTION_STRENGTH FIX_BIT_BF_SCALE 49 #define FIX_BIT_4 4 50 #define FIX_BIT_6 6 51 #define FIX_BIT_7 7 52 #define FIX_COEF_BIT 2 53 #define YNR_FILT_MODE0 0 54 #define YNR_FILT_MODE1 1 55 #define YNR_DMA_NUM 4 56 57 #define YNR_exp_lut_num 16 58 #define YNR_exp_lut_x 7 59 #define YNR_exp_lut_y 7 60 #define CLIPVALUE 61 62 #define WAVELET_LEVEL_1 0 63 #define WAVELET_LEVEL_2 1 64 #define WAVELET_LEVEL_3 2 65 #define WAVELET_LEVEL_4 3 66 #define YNR_SIGMA_BITS 10 67 68 typedef struct Aynr_GainState_s { 69 int gain_stat_full_last; 70 int gainState; 71 int gainState_last; 72 float gain_th0[2]; 73 float gain_th1[2]; 74 float gain_cur; 75 float ratio; 76 } Aynr_GainState_t; 77 78 79 //anr context 80 typedef struct Aynr_Context_V1_s { 81 Aynr_ExpInfo_V1_t stExpInfo; 82 Aynr_State_V1_t eState; 83 Aynr_OPMode_V1_t eMode; 84 85 Aynr_Auto_Attr_V1_t stAuto; 86 Aynr_Manual_Attr_V1_t stManual; 87 88 float fLuma_SF_Strength; 89 90 int refYuvBit; 91 bool isIQParaUpdate; 92 bool isGrayMode; 93 Aynr_ParamMode_V1_t eParamMode; 94 int prepare_type; 95 96 CalibDb_YNR_2_t stYnrCalib; 97 CalibDbV2_YnrV1_t ynr_v1; 98 99 int mfnr_mode_3to1; 100 Aynr_GainState_t stGainState; 101 102 } Aynr_Context_V1_t; 103 104 105 106 107 108 109 RKAIQ_END_DECLARE 110 111 #endif 112 113 114