xref: /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/algos/aynr/rk_aiq_aynr_algo_ynr_v1.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * rk_aiq_aynr_algo_ynr_v1.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 _RKAIQ_YNR_V1_H_
21 #define _RKAIQ_YNR_V1_H_
22 
23 #include <stdio.h>
24 #include <math.h>
25 #include <stdlib.h>
26 #include <string.h>
27 
28 #include "base/xcam_log.h"
29 #include "rk_aiq_comm.h"
30 #include "RkAiqCalibDbTypes.h"
31 #include "RkAiqCalibApi.h"
32 #include "aynr/rk_aiq_types_aynr_algo_prvt_v1.h"
33 #include "RkAiqCalibDbTypesV2.h"
34 
35 RKAIQ_BEGIN_DECLARE
36 
37 Aynr_Result_V1_t ynr_get_mode_cell_idx_by_name_v1(CalibDb_YNR_2_t *pCalibdb, char *name, int *mode_idx);
38 
39 Aynr_Result_V1_t ynr_get_setting_idx_by_name_v1(CalibDb_YNR_2_t *pCalibdb, char *name, int mode_idx, int *setting_idx);
40 
41 Aynr_Result_V1_t ynr_config_setting_param_v1(RK_YNR_Params_V1_t *pParams, CalibDb_YNR_2_t *pCalibdb, char* param_mode, char* snr_name);
42 
43 Aynr_Result_V1_t init_ynr_params_v1(RK_YNR_Params_V1_t *pYnrParams, CalibDb_YNR_2_t* pYnrCalib, int mode_idx, int setting_idx);
44 
45 Aynr_Result_V1_t select_ynr_params_by_ISO_v1(RK_YNR_Params_V1_t *stYnrParam, RK_YNR_Params_V1_Select_t *stYnrParamSelected, Aynr_ExpInfo_V1_t *pExpInfo, short bitValue);
46 
47 Aynr_Result_V1_t ynr_fix_transfer_v1(RK_YNR_Params_V1_Select_t* ynr, RK_YNR_Fix_V1_t *pNrCfg, float gain_ratio, float fStrength);
48 
49 Aynr_Result_V1_t ynr_fix_printf_v1(RK_YNR_Fix_V1_t * pNrCfg);
50 
51 Aynr_Result_V1_t ynr_get_setting_idx_by_name_json_v1(CalibDbV2_YnrV1_t *pCalibdb, char *name, int *calib_idx, int *tuning_idx);
52 
53 Aynr_Result_V1_t init_ynr_params_json_v1(RK_YNR_Params_V1_t *pYnrParams, CalibDbV2_YnrV1_t* pYnrCalib,  int calib_idx, int tuning_idx);
54 
55 Aynr_Result_V1_t ynr_config_setting_param_json_v1(RK_YNR_Params_V1_t *pParams, CalibDbV2_YnrV1_t*pCalibdb, char* param_mode, char* snr_name);
56 
57 Aynr_Result_V1_t ynr_calibdbV2_assign_v1(CalibDbV2_YnrV1_t *pDst, CalibDbV2_YnrV1_t *pSrc);
58 
59 void ynr_calibdbV2_free_v1(CalibDbV2_YnrV1_t *pCalibdbV2);
60 
61 Aynr_Result_V1_t ynr_algo_param_printf_v1(RK_YNR_Params_V1_t *pYnrParams);
62 
63 
64 
65 RKAIQ_END_DECLARE
66 
67 
68 #endif  // BAYERNR_READ_PARM_H_
69 
70