1 /* 2 *rk_aiq_types_accm_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_ACCM_ALGO_PRVT_H_ 21 #define _RK_AIQ_TYPES_ACCM_ALGO_PRVT_H_ 22 #include "accm/rk_aiq_types_accm_algo_int.h" 23 #include "xcam_log.h" 24 #include "xcam_common.h" 25 #include "common/list.h" 26 27 28 RKAIQ_BEGIN_DECLARE 29 #define RKAIQ_ACCM_ILLU_VOTE 0 30 #define CCM_CURVE_DOT_NUM 17 31 32 typedef struct ccm_3ares_info_s{ 33 float sensorGain; 34 float awbGain[2]; 35 } ccm_3ares_info_t; 36 37 38 typedef struct accm_rest_s { 39 float fSaturation; 40 #if RKAIQ_ACCM_ILLU_VOTE 41 struct list_head dominateIlluList;//to record domain illuminant 42 #endif 43 struct list_head problist; 44 int dominateIlluProfileIdx; 45 const CalibDbV2_Ccm_Matrix_Para_t *pCcmProfile1; 46 const CalibDbV2_Ccm_Matrix_Para_t *pCcmProfile2; 47 float undampedCcmMatrix[9]; 48 float undampedCcOffset[3]; 49 float fScale; 50 float color_inhibition_level; 51 float color_saturation_level; 52 ccm_3ares_info_t res3a_info; 53 } accm_rest_t; 54 55 typedef struct illu_node_s { 56 list_head node; /**< for adding to a list */ 57 unsigned int value; 58 } illu_node_t; 59 60 typedef struct prob_node_s { 61 list_head node; /**< for adding to a list */ 62 unsigned int value; 63 float prob; 64 } prob_node_t; 65 66 typedef struct accm_context_s { 67 #if RKAIQ_HAVE_CCM_V1 68 const CalibDbV2_Ccm_Para_V2_t* ccm_v1; 69 rk_aiq_ccm_cfg_t ccmHwConf; 70 rk_aiq_ccm_attrib_t mCurAtt; 71 #endif 72 #if RKAIQ_HAVE_CCM_V2 73 const CalibDbV2_Ccm_Para_V32_t* ccm_v2; 74 rk_aiq_ccm_cfg_v2_t ccmHwConf_v2; 75 rk_aiq_ccm_v2_attrib_t mCurAttV2; 76 #endif 77 const CalibDbV2_Ccm_Matrix_Para_t *pCcmMatrixAll[CCM_ILLUMINATION_MAX][CCM_PROFILES_NUM_MAX];// reorder para //to do, change to pointer 78 accm_sw_info_t accmSwInfo; 79 accm_rest_t accmRest; 80 unsigned int count; 81 #if RKAIQ_ACCM_ILLU_VOTE 82 CalibDbV2_Ccm_Tuning_Para_t ccm_tune; 83 #endif 84 //ctrl & api 85 uint8_t invarMode; // 0- mode change 1- mode unchange 86 bool updateAtt; 87 bool update; 88 bool calib_update; 89 bool isReCal_; 90 } accm_context_t ; 91 92 typedef accm_context_t* accm_handle_t ; 93 94 typedef struct _RkAiqAlgoContext { 95 accm_handle_t accm_para; 96 } RkAiqAlgoContext; 97 98 RKAIQ_END_DECLARE 99 100 #endif 101 102