hi_isp_ae_sensor_exp_func

Description

Defines the sensor callback function.

Prototype

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;

Members

Member

Description

pfn_cmos_get_ae_default

Pointer to the callback function for obtaining the initial value of the AE algorithm library

pfn_cmos_fps_set

Sets the frame rate for a sensor.

pfn_cmos_slow_framerate_set

Sets the frame rate reduction of a sensor.

pfn_cmos_inttime_update

Sets the exposure time of a sensor.

pfn_cmos_gains_update

Sets the analog gain and digital gain of a sensor.

pfn_cmos_again_calc_table

Computes the analog gain of the table sensor.

pfn_cmos_dgain_calc_table

Computes the digital gain of the table sensor.

pfn_cmos_get_inttime_max

Pointer to the callback function for computing the maximum exposure time of short frames in WDR mode, which is closely related to the sensor.

pfn_cmos_ae_fswdr_attr_set

Pointer to the callback function for setting the long frame mode in 2to1LineWDR mode

pfn_cmos_ae_quick_start_status_set

Sets the AE no-light-sensor quick start convergence status.

pfn_cmos_exp_param_convert

Converts exposure parameters at different frame rates, which is provided by hi_mpi_isp_get_exp_convert.

Considerations

  • If the callback function pointer does not need to be assigned a value, set it to null.
  • The exposure time accuracy and gain is defined in hi_isp_ae_sensor_default. The exposure time and gain configured in pfn_cmos_inttime_update and pfn_cmos_gains_update are values with accuracy. How to convert them into the configured values of the sensor is closely related to the sensor. For details, see the sensor manual.
  • If the no-light-sensor quick start function is not used, pfn_cmos_ae_quick_start_status_set must be set to null.
  • quick_start_status is the flag bit of the AE no-light-sensor quick start convergence status. When this parameter is set to HI_TRUE, no-light-sensor quick start convergence is complete.