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_ABAYERTNR_ALGO_PRVT_V23_H_ 21 #define _RK_AIQ_TYPES_ABAYERTNR_ALGO_PRVT_V23_H_ 22 23 #include "abayertnrV23/rk_aiq_types_abayertnr_algo_int_v23.h" 24 #include "RkAiqCalibDbTypes.h" 25 #include "xcam_log.h" 26 #include "xcam_common.h" 27 28 //RKAIQ_BEGIN_DECLARE 29 30 // fix define 31 #define FIXVSTINV 10 // VST fix 32 #define FIXSQRTBIT 30 // SQRT fix bits 33 #define FIXSQRTDIV 1 // SQRT fix 34 #define FIXNLMCALC 10 // NLM calc fix 35 #define FIXGAINBIT 8 // NLM calc fix 36 #define FIXBILSTRG 8 // BIL flt strength calc fix 37 #define FIXNLMSQRT 6 // NLM SQRT fix, FIXNLMSQRT*2 nee less FIXNLMCALC 38 #define FIXGAUSBIT 8 // gauss weight fix bits; 39 #define FIXTNRWGT 10 40 #define FIXTNRDIF 10 41 #define FIXTNRSFT 10 42 #define FIXTNRSTG 8 43 #define FIXTNREXP 20 //20 // TNR EXP fix bits 44 #define FIXTNREXPMOD 14 //20 // TNR EXP fix bits 45 #define FIXTNRSQRT 30 46 #define FIXGAINOUT 8 47 48 #define FIXEXPBIT 20 // EXP fix bits 49 #define FIXEXP2BIT 10 // EXP fix bits 50 #define FIXEXPDIV 1 // EXP fix 51 52 #define FIXMERGEWG 10 // HDR merge weight 53 #define FIXTMOWG 12 // HDR TMO weight 54 55 #define FIXDIFMAX ((long long)1<<(14)) // DIFF USE 12bits 56 #define DIVSUBBIT 1 // div sub bits 57 58 #define FIXCURVE 8 // noise curve interp 59 #define FIXDIVBIT 20 // DIV MAX BITS 60 #define FIXDAOBIT 49 // DAO MAX BITS 61 #define FIXSHTBIT 2 // div result shift bits. 62 #define FIXMINBIT 8 // div min bits. 63 64 #define LUTMAX_FIX 30.0 65 #define LUTMAXM1_FIX 300.0 //29.0 66 #define LUTPRECISION_FIX (1<<FIXNLMCALC) 67 #define EXPPRECISION_FIX (1<<(FIXNLMCALC+5)) 68 #define EXP2RECISION_FIX (1<<(FIXNLMCALC+5)) 69 70 //anr context 71 typedef struct Abayertnr_Context_V23_s { 72 Abayertnr_ExpInfo_V23_t stExpInfo; 73 Abayertnr_State_V23_t eState; 74 Abayertnr_OPMode_V23_t eMode; 75 76 #if (RKAIQ_HAVE_BAYERTNR_V23) 77 Abayertnr_Auto_Attr_V23_t stAuto; 78 Abayertnr_Manual_Attr_V23_t stManual; 79 #else 80 Abayertnr_Auto_Attr_V23L_t stAuto; 81 Abayertnr_Manual_Attr_V23L_t stManual; 82 #endif 83 84 // struct list_head* list_bayernr_v23; 85 86 rk_aiq_bayertnr_strength_v23_t stStrength; 87 88 bool isIQParaUpdate; 89 bool isGrayMode; 90 Abayertnr_ParamMode_V23_t eParamMode; 91 int prepare_type; 92 93 #if (RKAIQ_HAVE_BAYERTNR_V23) 94 CalibDbV2_BayerTnrV23_t bayertnr_v23; 95 #else 96 CalibDbV2_BayerTnrV23Lite_t bayertnr_v23; 97 #endif 98 99 int isReCalculate; 100 } Abayertnr_Context_V23_t; 101 102 103 104 105 106 107 //RKAIQ_END_DECLARE 108 109 #endif 110 111 112