hi_isp_ae_sensor_exp_func

Description

Defines the sensor callback function.

Definition

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.

full_lines: input parameter, which is used to set the exposure lines.

pfn_cmos_inttime_update

Sets the exposure time of a sensor.

int_time: input parameter, which indicates the exposure time (in the unit of exposure line).

pfn_cmos_gains_update

Sets the analog gain and digital gain of a sensor.

  • again: input parameter, which indicates the analog exposure gain.
  • dgain: input parameter, which indicates the digital exposure gain.

pfn_cmos_again_calc_table

Computes the analog gain of the table sensor.

  • again_lin: input parameter, which indicates the calculated analog exposure gain.
  • again_lin: output parameter, which indicates the actual analog exposure gain that matches the table.
  • again_db: output, parameter, which indicates the table value corresponding to the analog exposure gain.

pfn_cmos_dgain_calc_table

Computes the digital gain of the table sensor.

  • dgain_lin: input parameter, which indicates the calculated digital exposure gain.
  • dgain_lin: output parameter, which indicates the actual digital exposure gain that matches the table.
  • dgain_db: output parameter, which indicates the table value corresponding to the digital exposure gain.

pfn_cmos_get_inttime_max

Computes the maximum exposure time of short frames in WDR mode, which is closely related to the sensor.

  • man_ratio_enable: input parameter, which indicates whether to enable the manual exposure ratio.
  • ratio: output parameter, which indicates the exposure time ratio.
  • int_time_max: output parameter, which indicates the maximum exposure time (in the unit of exposure line).
  • int_time_min: output parameter, which indicates the minimum exposure time (in the unit of exposure line).
  • lf_max_int_time: output parameter, which indicates the maximum exposure time in long frame mode (in the unit of exposure line).

pfn_cmos_ae_fswdr_attr_set

Sets the long frame mode in 2to1LineWDR mode.

pfn_cmos_ae_quick_start_status_set

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

quick_start_status: input parameter, which indicates 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. When this parameter is set to HI_FALSE, no-light-sensor quick start convergence is not complete.

pfn_cmos_exp_param_convert

Converts exposure parameters at different frame rates. It is implemented together with hi_mpi_isp_get_exp_convert.

Restrictions

  • 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.