1 /* 2 *rk_aiq_types_agamma_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_AGAMMA_ALGO_PRVT_H_ 21 #define _RK_AIQ_TYPES_AGAMMA_ALGO_PRVT_H_ 22 23 #include "RkAiqCalibDbTypes.h" 24 #include "agamma/rk_aiq_types_agamma_algo_int.h" 25 #include "amerge/rk_aiq_types_amerge_algo_prvt.h" 26 #include "rk_aiq_types_agamma_hw.h" 27 #include "xcam_log.h" 28 29 #define ISP3X_SEGNUM_LOG_49 (2) 30 #define ISP3X_SEGNUM_LOG_45 (0) 31 #define ISP3X_SEGNUM_EQU_45 (1) 32 #define GAMMA_CRUVE_MAX (4095) 33 #define GAMMA_CRUVE_MIN (0) 34 35 typedef struct rk_aiq_gamma_cfg_s { 36 bool gamma_en; 37 int gamma_out_segnum;//0:log 45 segment ; 1:equal segment ;2:log 49 segment ; 38 int gamma_out_offset; 39 int gamma_table[CALIBDB_AGAMMA_KNOTS_NUM_V11]; 40 } rk_aiq_gamma_cfg_t; 41 42 typedef struct AgammaHandle_s { 43 bool ifReCalcStAuto; 44 bool ifReCalcStManual; 45 uint32_t FrameID; 46 rk_aiq_gamma_cfg_t agamma_config; 47 #if RKAIQ_HAVE_GAMMA_V10 48 rk_aiq_gamma_v10_attr_t agammaAttrV10; 49 #endif 50 #if RKAIQ_HAVE_GAMMA_V11 51 rk_aiq_gamma_v11_attr_t agammaAttrV11; 52 #endif 53 rk_aiq_gamma_op_mode_t CurrApiMode; 54 int working_mode; 55 } AgammaHandle_t; 56 57 #endif 58 59