---
title: hi_isp_ae_sensor_exp_func
description: "sensor回调函数结构体。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/ispdevug/ispdevapi_0073.html
sourcePath: /source/zh/canncommercial/900/others/ispdevug/ispdevapi_0073.html
indexId: d6b4feff714e29b9a272bb827f0fd58bb013137a210cff96cb7a9d313aab3bfb65
---
# hi_isp_ae_sensor_exp_func

#### 说明定义

sensor回调函数结构体。


#### 定义

```
typedef struct {
hi_s32
(*pfn_cmos_get_ae_default)(
hi_vi_pipe
vi_pipe,
hi_isp_ae_sensor_default
*ae_sns_dft);
/* the function of sensor set fps */
hi_void
(*pfn_cmos_fps_set)(
hi_vi_pipe
vi_pipe,
hi_float
f32_fps,
hi_isp_ae_sensor_default
*ae_sns_dft);
hi_void
(*pfn_cmos_slow_framerate_set)(
hi_vi_pipe
vi_pipe,
hi_u32
full_lines,
hi_isp_ae_sensor_default
*ae_sns_dft);
/* while isp notify ae to update sensor regs, ae call these funcs. */
hi_void
(*pfn_cmos_inttime_update)(
hi_vi_pipe
vi_pipe,
hi_u32
int_time);
hi_void
(*pfn_cmos_gains_update)(
hi_vi_pipe
vi_pipe,
hi_u32
again,
hi_u32
dgain);
hi_void
(*pfn_cmos_again_calc_table)(
hi_vi_pipe
vi_pipe,
hi_u32
*again_lin,
hi_u32
*again_db);
hi_void
(*pfn_cmos_dgain_calc_table)(
hi_vi_pipe
vi_pipe,
hi_u32
*dgain_lin,
hi_u32
*dgain_db);
hi_void
(*pfn_cmos_get_inttime_max)(
hi_vi_pipe
vi_pipe,
hi_u16
man_ratio_enable,
hi_u32
*ratio,
hi_u32
*int_time_max,
hi_u32
*int_time_min,
hi_u32
*lf_max_int_time);
/* long frame mode set */
hi_void
(*pfn_cmos_ae_fswdr_attr_set)(
hi_vi_pipe
vi_pipe,
hi_isp_ae_fswdr_attr
*ae_fswdr_attr);
hi_void
(*pfn_cmos_ae_quick_start_status_set)(
hi_vi_pipe
vi_pipe,
hi_bool
quick_start_status);
hi_void
(*pfn_cmos_exp_param_convert)(
hi_vi_pipe
vi_pipe,
hi_isp_ae_convert_param
*exp_param);
} hi_isp_ae_sensor_exp_func;
```


#### 成员

| 成员名称 | 描述 |
| --- | --- |
| pfn\_cmos\_get\_ae\_default | 获取AE算法库的初始值的回调函数指针。 |
| pfn\_cmos\_fps\_set | 设置sensor的帧率。 |
| pfn\_cmos\_slow\_framerate\_set | 设置sensor的降帧。 full\_lines：输入参数，设置的曝光行。 |
| pfn\_cmos\_inttime\_update | 设置sensor的曝光时间。 int\_time：输入参数，曝光时间，以曝光行为单位。 |
| pfn\_cmos\_gains\_update | 设置sensor的模拟增益和数字增益。 again：输入参数，模拟曝光增益。 dgain：输入参数，数字曝光增益。 |
| pfn\_cmos\_again\_calc\_table | 计算TABLE类型sensor模拟增益。 again\_lin：输入参数，计算出的模拟曝光增益。 again\_lin：输出参数，实际与table匹配到的模拟曝光增益。 again\_db：输出参数，模拟曝光增益对应table值。 |
| pfn\_cmos\_dgain\_calc\_table | 计算TABLE类型sensor数字增益。 dgain\_lin：输入参数，计算出的数字曝光增益。 dgain\_lin：输出参数，实际与table匹配到的数字曝光增益。 dgain\_db：输出参数，数字曝光增益对应table值。 |
| pfn\_cmos\_get\_inttime\_max | WDR模式下，计算短帧最大曝光时间的回调函数指针，与sensor强相关。 man\_ratio\_enable：输入参数，手动曝光比使能。 ratio：输出参数，曝光时间比。 int\_time\_max：输出参数，最大曝光时间，以曝光行为单位。 int\_time\_min：输出参数，最小曝光时间，以曝光行为单位。 lf\_max\_int\_time：输出参数，长帧模式最大曝光时间，以曝光行为单位。 |
| pfn\_cmos\_ae\_fswdr\_attr\_set | 2to1LineWDR模式下，设置长帧模式。 |
| pfn\_cmos\_ae\_quick\_start\_status\_set | 设置AE无光敏快启收敛状态。 不使用无光敏快启功能时，pfn\_cmos\_ae\_quick\_start\_status\_set需要设置为NULL。 quick\_start\_status：输入参数，AE无光敏快启收敛状态的标志位，HI\_TRUE表示无光敏快启收敛完成，HI\_FALSE表示无光敏快启收敛未完成。 |
| pfn\_cmos\_exp\_param\_convert | 完成不同帧率等曝光量转换曝光参数属性，配套hi\_mpi\_isp\_get\_exp\_convert提供。 |


#### 注意事项

- 如果回调函数指针不需要赋值，需要置为NULL。
- 在hi_isp_ae_sensor_default中定义了曝光时间和增益的精度，pfn_cmos_inttime_update和pfn_cmos_gains_update中设置的曝光时间和增益都是带精度的值，如何转换成sensor的配置值与sensor强相关，请参阅sensor手册。
