| /OK3568_Linux_fs/external/camera_engine_rkaiq/rkisp_demo/demo/sample/ |
| H A D | sample_adebayer_module.cpp | 288 …attr->stManual.debayer_gain_offset = ROUND_F(INTERP_SAMPLE(attr->stAuto.g_interp.debayer_gain_offs… in sample_adebayer_translate_params_v2() 289 …attr->stManual.debayer_max_ratio = ROUND_F(INTERP_SAMPLE(attr->stAuto.g_interp.debayer_max_ratio[i… in sample_adebayer_translate_params_v2() 290 …attr->stManual.debayer_clip_en = ROUND_F(INTERP_SAMPLE(attr->stAuto.g_interp.debayer_clip_en[iso_l… in sample_adebayer_translate_params_v2() 292 …attr->stManual.debayer_thed0 = ROUND_F(INTERP_SAMPLE(attr->stAuto.g_drctwgt.debayer_thed0[iso_low_… in sample_adebayer_translate_params_v2() 293 …attr->stManual.debayer_thed1 = ROUND_F(INTERP_SAMPLE(attr->stAuto.g_drctwgt.debayer_thed1[iso_low_… in sample_adebayer_translate_params_v2() 295 …attr->stManual.debayer_dist_scale = ROUND_F(INTERP_SAMPLE(attr->stAuto.g_drctwgt.debayer_dist_scal… in sample_adebayer_translate_params_v2() 296 …attr->stManual.debayer_hf_offset = ROUND_F(INTERP_SAMPLE(attr->stAuto.g_drctwgt.debayer_hf_offset[… in sample_adebayer_translate_params_v2() 297 …attr->stManual.debayer_select_thed = ROUND_F(INTERP_SAMPLE(attr->stAuto.g_drctwgt.debayer_select_t… in sample_adebayer_translate_params_v2() 300 …attr->stManual.debayer_gfilter_en = ROUND_F(INTERP_SAMPLE(attr->stAuto.g_filter.debayer_gfilter_en… in sample_adebayer_translate_params_v2() 301 …attr->stManual.debayer_gfilter_offset = ROUND_F(INTERP_SAMPLE(attr->stAuto.g_filter.debayer_gfilte… in sample_adebayer_translate_params_v2() [all …]
|
| /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/algos/asharp/ |
| H A D | rk_aiq_asharp_algo_edgefilter.cpp | 612 …strkedgefilterParamsSelected->edge_thed = (short)ROUND_F(INTERP1(strkedgefilterParams->edge_the… in select_edgefilter_params_by_ISO() 621 …strkedgefilterParamsSelected->edge_thed_1[i] = (short)ROUND_F(INTERP1(strkedgefilterParams-… in select_edgefilter_params_by_ISO() 624 …strkedgefilterParamsSelected->clamp_pos_dog[i] = (short)ROUND_F(INTERP1(strkedgefilterParams-… in select_edgefilter_params_by_ISO() 625 …strkedgefilterParamsSelected->clamp_neg_dog[i] = (short)ROUND_F(INTERP1(strkedgefilterParams-… in select_edgefilter_params_by_ISO() 686 tmp = ROUND_F(edgeflt->edge_thed / fPercent ); in edgefilter_fix_transfer() 691 pEdgefilterCfg->dir_min = ROUND_F((edgeflt->dir_min ) * (1 << reg_dir_min_fix_bits)); in edgefilter_fix_transfer() 692 …tmp = ROUND_F((edgeflt->smoth4 + (fPercent - 1.0) / (SHARP_MAX_STRENGTH_PERCENT) * 1.0 ) * (1 << r… in edgefilter_fix_transfer() 699 tmp = ROUND_F(edgeflt->l_alpha / fPercent * (1 << reg_l_alpha_fix_bits)); in edgefilter_fix_transfer() 705 tmp = ROUND_F(edgeflt->g_alpha / fPercent * (1 << reg_g_alpha_fix_bits)); in edgefilter_fix_transfer() 714 …pEdgefilterCfg->eg_coef[0] = (char)ROUND_F(edgeflt->gf_coef_3x3[4] * (1 << reg_gf_coef_3x3_fix_bit… in edgefilter_fix_transfer() [all …]
|
| H A D | rk_aiq_asharp_algo_sharp.cpp | 988 …strksharpenParamsSelected->ehf_th = (short)ROUND_F(INTERP1(strksharpenParams->ehf_th… in select_rk_sharpen_hw_params_by_ISO() 994 …strksharpenParamsSelected->lum_clp_m[i] = (short)ROUND_F(INTERP1(strksharpenParams->lum_clp_m … in select_rk_sharpen_hw_params_by_ISO() 997 …strksharpenParamsSelected->lum_clp_h[i] = (short)ROUND_F(INTERP1(strksharpenParams->lum_clp_h … in select_rk_sharpen_hw_params_by_ISO() 1103 …strksharpenParamsSelected->ehf_th = (short)ROUND_F(INTERP1(strksharpenParams->ehf_th… in select_rk_sharpen_hw_v2_params_by_ISO() 1108 …strksharpenParamsSelected->lum_clip_h[i] = (short)ROUND_F(INTERP1(strksharpenParams->lum_clip_h… in select_rk_sharpen_hw_v2_params_by_ISO() 1190 …strksharpenParamsSelected->ehf_th = (short)ROUND_F(INTERP1(strksharpenParams->ehf_th… in select_rk_sharpen_hw_v3_params_by_ISO() 1194 …strksharpenParamsSelected->lum_clip_h[i] = (short)ROUND_F(INTERP1(strksharpenParams->lum_clip_h… in select_rk_sharpen_hw_v3_params_by_ISO() 1286 tmp = ROUND_F(pSharpV1->hbf_ratio / fPercent * (1 << reg_sharpenHW_hbf_ratio_fix_bits)); in rk_Sharp_V1_fix_transfer() 1291 tmp = ROUND_F(pSharpV1->ehf_th * fPercent); in rk_Sharp_V1_fix_transfer() 1296 tmp = ROUND_F(pSharpV1->pbf_ratio / fPercent * (1 << reg_sharpenHW_pbf_ratio_fix_bits)); in rk_Sharp_V1_fix_transfer() [all …]
|
| /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/algos/adebayer/ |
| H A D | rk_aiq_adebayer_algo_v2.cpp | 311 …pAdebayerCtx->select_param_v2.debayer_gain_offset = ROUND_F(INTERP_DEBAYER_V2(pAdebayerCtx->full_p… in AdebayerSelectParam() 312 …pAdebayerCtx->select_param_v2.debayer_max_ratio = ROUND_F(INTERP_DEBAYER_V2(pAdebayerCtx->full_par… in AdebayerSelectParam() 313 …pAdebayerCtx->select_param_v2.debayer_clip_en = ROUND_F(INTERP_DEBAYER_V2(pAdebayerCtx->full_param… in AdebayerSelectParam() 348 …pAdebayerCtx->select_param_v2.debayer_thed0 = ROUND_F(INTERP_DEBAYER_V2(pAdebayerCtx->full_param_v… in AdebayerSelectParam() 349 …pAdebayerCtx->select_param_v2.debayer_thed1 = ROUND_F(INTERP_DEBAYER_V2(pAdebayerCtx->full_param_v… in AdebayerSelectParam() 351 …pAdebayerCtx->select_param_v2.debayer_dist_scale = ROUND_F(INTERP_DEBAYER_V2(pAdebayerCtx->full_pa… in AdebayerSelectParam() 352 …pAdebayerCtx->select_param_v2.debayer_hf_offset = ROUND_F(INTERP_DEBAYER_V2(pAdebayerCtx->full_par… in AdebayerSelectParam() 353 …pAdebayerCtx->select_param_v2.debayer_select_thed = ROUND_F(INTERP_DEBAYER_V2(pAdebayerCtx->full_p… in AdebayerSelectParam() 387 …pAdebayerCtx->select_param_v2.debayer_gfilter_en = ROUND_F(INTERP_DEBAYER_V2(pAdebayerCtx->full_pa… in AdebayerSelectParam() 388 …pAdebayerCtx->select_param_v2.debayer_gfilter_offset = ROUND_F(INTERP_DEBAYER_V2(pAdebayerCtx->ful… in AdebayerSelectParam() [all …]
|
| /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/algos/asharp4/ |
| H A D | rk_aiq_asharp_algo_sharp_v4.cpp | 132 …pSelect->hf_clip[i] = (int16_t)ROUND_F(INTERP_V4(pParams->hf_clip[gain_low][i], pParams->hf_clip[… in sharp_select_params_by_ISO_V4() 133 …pSelect->local_sharp_strength[i] = (int16_t)ROUND_F(INTERP_V4(pParams->local_sharp_strength[gain_l… in sharp_select_params_by_ISO_V4() 196 tmp = (int)ROUND_F(pSelect->sharp_ratio * fPercent * (1 << rk_sharp_V4_sharp_ratio_fix_bits)); in sharp_fix_transfer_V4() 198 tmp = (int)ROUND_F(pSelect->bf_ratio / fPercent * (1 << rk_sharp_V4_bf_ratio_fix_bits)); in sharp_fix_transfer_V4() 200 tmp = (int)ROUND_F(pSelect->gaus_ratio / fPercent * (1 << rk_sharp_V4_gaus_ratio_fix_bits)); in sharp_fix_transfer_V4() 202 tmp = (int)ROUND_F(pSelect->pbf_ratio / fPercent * (1 << rk_sharp_V4_bf_ratio_fix_bits)); in sharp_fix_transfer_V4() 235 …tmp = (int16_t)ROUND_F((float)1 / (pSelect->luma_sigma[i] * pSelect->pbf_gain + pSelect->pbf_add) … in sharp_fix_transfer_V4() 260 …tmp = (int16_t)ROUND_F((float)1 / (pSelect->luma_sigma[i] * pSelect->bf_gain + pSelect->bf_add) * … in sharp_fix_transfer_V4() 308 tmp = (int)ROUND_F(prefilter_coeff[0] * (1 << rk_sharp_V4_pbfCoeff_fix_bits)); in sharp_fix_transfer_V4() 310 tmp = (int)ROUND_F(prefilter_coeff[1] * (1 << rk_sharp_V4_pbfCoeff_fix_bits)); in sharp_fix_transfer_V4() [all …]
|
| /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/algos/acnrV30/ |
| H A D | rk_aiq_acnr_algo_cnr_v30.cpp | 246 ROUND_F((1 << RKCNR_V30_uvgain) * pSelect->chroma_filter_uv_gain); in cnr_fix_transfer_V30() 247 int thumbBFilterSigma = ROUND_F(pSelect->thumb_sigma * scale * fStrength); in cnr_fix_transfer_V30() 261 tmp = ROUND_F((1 << RKCNR_V30_FIX_BIT_BF_RATIO) * pSelect->thumb_bf_ratio * fStrength); in cnr_fix_transfer_V30() 266 tmp = ROUND_F(pSelect->thumb_filter_wgt_coeff[i] * (1 << RKCNR_V30_exp2_lut_y)); in cnr_fix_transfer_V30() 271 tmp = ROUND_F((1 << RKCNR_V30_FIX_BIT_SLOPE) * pSelect->wgt_slope); in cnr_fix_transfer_V30() 274 …tmp = ROUND_F(1.2011 * (1 << RKCNR_V30_FIX_BIT_INV_SIGMA) / (pSelect->chroma_filter_strength * sca… in cnr_fix_transfer_V30() 286 tmp = ROUND_F((float)tmptmp / (1 << shiftBit)); in cnr_fix_transfer_V30() 289 tmp = ROUND_F((1 << RKCNR_V30_uvgain) * pSelect->chroma_filter_uv_gain); in cnr_fix_transfer_V30() 293 tmp = ROUND_F((1 << RKCNR_V30_FIX_BIT_IIR_WGT) * pSelect->anti_chroma_ghost); in cnr_fix_transfer_V30() 295 tmp = ROUND_F((1 << 3) * pSelect->chroma_filter_wgt_clip); in cnr_fix_transfer_V30() [all …]
|
| /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/algos/asharpV33/ |
| H A D | rk_aiq_asharp_algo_sharp_v33.cpp | 131 (uint16_t)ROUND_F(INTERP_V4(pParams->sharpParamsISO[gain_low].hf_clip[i], in sharp_select_params_by_ISO_V33() 135 (uint16_t)ROUND_F(INTERP_V4(pParams->sharpParamsISO[gain_low].hf_clip_neg[i], in sharp_select_params_by_ISO_V33() 376 tmp = (int)ROUND_F(pSelect->pbf_ratio / fPercent * in sharp_fix_transfer_V33() 379 tmp = (int)ROUND_F(pSelect->gaus_ratio / fPercent * in sharp_fix_transfer_V33() 383 tmp = (int)ROUND_F( (pSelect->sharp_ratio_0 + pSelect->sharp_ratio_1) * fPercent * in sharp_fix_transfer_V33() 386 tmp = (int)ROUND_F(pSelect->sharp_ratio * fPercent * in sharp_fix_transfer_V33() 391 tmp = (int)ROUND_F(pSelect->bf_ratio / fPercent * in sharp_fix_transfer_V33() 421 tmp = (int16_t)ROUND_F((float)1 / (pSelect->luma_sigma[i] * pSelect->pbf_gain + in sharp_fix_transfer_V33() 444 tmp = (int16_t)ROUND_F((float)1 / (pSelect->luma_sigma[i] * pSelect->bf_gain + in sharp_fix_transfer_V33() 492 tmp = (int)ROUND_F(pre_bila_filter[0] * (1 << RK_SHARP_V33_PBFCOEFF_FIX_BITS)); in sharp_fix_transfer_V33() [all …]
|
| /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/algos/asharp3/ |
| H A D | rk_aiq_asharp_algo_sharp_v3.cpp | 365 …pSelect->lum_clip_h[i] = (int16_t)ROUND_F(INTERP_V3(pParams->lum_clip_h[gain_low][i], pParams->lu… in sharp_select_params_by_ISO_V3() 366 …pSelect->ehf_th[i] = (int16_t)ROUND_F(INTERP_V3(pParams->ehf_th[gain_low][i], pParams->ehf_th[gain… in sharp_select_params_by_ISO_V3() 369 …pSelect->clip_hf[i] = (int16_t)ROUND_F(INTERP_V3(pParams->clip_hf[gain_low][i], pParams->clip_hf[… in sharp_select_params_by_ISO_V3() 370 …pSelect->clip_mf[i] = (int16_t)ROUND_F(INTERP_V3(pParams->clip_mf[gain_low][i], pParams->clip_mf[… in sharp_select_params_by_ISO_V3() 371 …pSelect->clip_lf[i] = (int16_t)ROUND_F(INTERP_V3(pParams->clip_lf[gain_low][i], pParams->clip_lf[… in sharp_select_params_by_ISO_V3() 372 …pSelect->local_wgt[i] = (int16_t)ROUND_F(INTERP_V3(pParams->local_wgt[gain_low][i], pParams->loca… in sharp_select_params_by_ISO_V3() 425 tmp = (int)ROUND_F(pSelect->sharp_ratio * fPercent * (1 << rk_sharp_V3_sharp_ratio_fix_bits)); in sharp_fix_transfer_V3() 427 tmp = (int)ROUND_F(pSelect->bf_ratio / fPercent * (1 << rk_sharp_V3_bf_ratio_fix_bits)); in sharp_fix_transfer_V3() 429 tmp = (int)ROUND_F(pSelect->gaus_ratio / fPercent * (1 << rk_sharp_V3_gaus_ratio_fix_bits)); in sharp_fix_transfer_V3() 431 tmp = (int)ROUND_F(pSelect->pbf_ratio / fPercent * (1 << rk_sharp_V3_bf_ratio_fix_bits)); in sharp_fix_transfer_V3() [all …]
|
| /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/algos/anr/ |
| H A D | rk_aiq_anr_algo_gain.cpp | 18 dst = ROUND_F(In * (1 << bit_deci_dst)); in FLOAT_LIM2_INT() 23 dst = ROUND_F(In / (1 << bit_deci_dst)); in FLOAT_LIM2_INT() 34 tmp = ROUND_F(In * (1 << bit_deci_dst)); in FLOAT_FIX()
|
| H A D | rk_aiq_anr_algo_mfnr.cpp | 1177 intep_pos[i] = ROUND_F(intep_pos[i] / (step_x1 * 4)) * (4 * step_x1); in select_mfnr_params_by_ISO() 1179 intep_pos[i] = ROUND_F(intep_pos[i] / (step_x1 * 16)) * (16 * step_x1); in select_mfnr_params_by_ISO() 1298 intep_pos_1[idx] = ROUND_F((double)intep_pos_1[idx] / step) * step; in select_mfnr_params_by_ISO() 1304 intep_pos[idx] = ROUND_F((double)intep_pos[idx] / step) * step; in select_mfnr_params_by_ISO()
|
| H A D | rk_aiq_anr_algo_ynr.cpp | 897 …stYnrParamSelected->ynr_level4_max_gain = ROUND_F(sqrt((float)isoValue / 50) * (1 << GAIN_YNR_FIX_… in select_ynr_params_by_ISO()
|
| /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/algos/again/ |
| H A D | rk_aiq_again_algo_gain.cpp | 16 dst = ROUND_F(In * (1 << bit_deci_dst)); in FLOAT_LIM2_INT_V1() 21 dst = ROUND_F(In / (1 << bit_deci_dst)); in FLOAT_LIM2_INT_V1() 32 tmp = ROUND_F(In * (1 << bit_deci_dst)); in FLOAT_FIX_V1()
|
| /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/algos/acac/ |
| H A D | cac_adaptor.cpp | 510 …output->config[0].strength[i] = ROUND_F(attr_->manual_param.strength_table[i] * (1 << RKCAC_STRENG… 519 …output->config[0].flat_thed_b = ROUND_F(attr_->manual_param.flat_thed_b * (1 << RKCAC_EDGE_DETECT_… 520 …output->config[0].flat_thed_r = ROUND_F(attr_->manual_param.flat_thed_r * (1 << RKCAC_EDGE_DETECT_… 546 output->config[0].strength[i] = ROUND_F(strength[i] * (1 << RKCAC_STRENGTH_FIX_BITS)); 566 output->config[0].flat_thed_b = ROUND_F(flat_thed_b * (1 << RKCAC_EDGE_DETECT_FIX_BITS)); 570 output->config[0].flat_thed_r = ROUND_F(flat_thed_r * (1 << RKCAC_EDGE_DETECT_FIX_BITS)); 574 … output->config[0].offset_b = CacClamp<uint32_t>(ROUND_F(input->hdr_ratio * offset_b), 0, 1 << 16); 578 … output->config[0].offset_r = CacClamp<uint32_t>(ROUND_F(input->hdr_ratio * offset_r), 0, 1 << 16);
|
| /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/algos/again2/ |
| H A D | rk_aiq_again_algo_gain_v2.cpp | 209 dst = ROUND_F(In * (1 << bit_deci_dst)); in gain_float_lim2_int() 214 dst = ROUND_F(In / (1 << bit_deci_dst)); in gain_float_lim2_int()
|
| /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/include/common/ |
| H A D | rk_aiq_comm.h | 74 #define ROUND_F(x) (int)(((float)x)+(((x) > 0) ? 0.5 : (-0.5))) macro
|
| /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/algos/amfnr/ |
| H A D | rk_aiq_amfnr_algo_mfnr_v1.cpp | 1056 intep_pos[i] = ROUND_F(intep_pos[i] / (step_x1 * 4)) * (4 * step_x1); in select_mfnr_params_by_ISO_v1() 1058 intep_pos[i] = ROUND_F(intep_pos[i] / (step_x1 * 16)) * (16 * step_x1); in select_mfnr_params_by_ISO_v1() 1177 intep_pos_1[idx] = ROUND_F((double)intep_pos_1[idx] / step) * step; in select_mfnr_params_by_ISO_v1() 1183 intep_pos[idx] = ROUND_F((double)intep_pos[idx] / step) * step; in select_mfnr_params_by_ISO_v1()
|
| /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/algos/aynr2/ |
| H A D | rk_aiq_aynr_algo_ynr_v2.cpp | 451 int M = ROUND_F((pow(2, r_sq_inv_log + E)) * 256); in ynr_fix_transfer_V2()
|
| /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/algos/aynr/ |
| H A D | rk_aiq_aynr_algo_ynr_v1.cpp | 842 …stYnrParamSelected->ynr_level4_max_gain = ROUND_F(sqrt((float)isoValue / 50) * (1 << GAIN_YNR_FIX_… in select_ynr_params_by_ISO_v1()
|