hi_isp_exp_info

Description

Defines the internal exposure status information about the ISP.

Definition

typedef struct {
    hi_u32  exp_time;  
    hi_u32  short_exp_time; 
    hi_u32  median_exp_time;  
    hi_u32  long_exp_time; 
    hi_u32  a_gain;  
    hi_u32  d_gain;  
    hi_u32  a_gain_sf;  
    hi_u32  d_gain_sf;  
    hi_u32  isp_d_gain;  
    hi_u32  exposure; 
    hi_bool exposure_is_max; 
    hi_s16  hist_error;  
    hi_u32  ae_hist1024_value[HI_ISP_HIST_NUM];  
    hi_u8  ave_lum; 
    hi_u32 lines_per500ms; 
    hi_u32 piris_fno; 
    hi_u32 fps;
    hi_u32 iso; 
    hi_u32 isosf; 
    hi_u32 iso_calibrate; 
    hi_u32 ref_exp_ratio; 
    hi_u32 wdr_exp_coef;
    hi_u32 first_stable_time;  
    hi_u32 quick_star_iso; 
    hi_isp_ae_route ae_route; 
    hi_isp_ae_route_ex ae_route_ex;
    hi_isp_ae_route ae_route_sf; 
    hi_isp_ae_route_ex ae_route_sf_ex;
} hi_isp_exp_info;

Members

Member

Description

exp_time

Current exposure time (in μs)

Value range: [0x0, 0xFFFFFFFF]

short_exp_time

Current exposure time (in μs) of the short frame (S) in FSWDR mode. This member can be ignored in linear mode.

Value range: [0x0, 0xFFFFFFFF]

median_exp_time

Current exposure time (in μs) of the medium frame (M) in FSWDR mode. This member can be ignored in linear mode.

Value range: [0x0, 0xFFFFFFFF]

long_exp_time

Current exposure time (in μs) of the long frame in FSWDR mode

Value range: [0x0, 0xFFFFFFFF]

a_gain

Current sensor analog gain (10-bit decimal precision)

Value range: [0x400, 0xFFFFFFFF]

d_gain

Current sensor digital gain (10-bit decimal precision)

Value range: [0x400, 0xFFFFFFFF]

a_gain_sf

Current sensor analog gain for short frames (10-bit decimal precision)

Value range: [0x400, 0xFFFFFFFF]

d_gain_sf

Current sensor digital gain for short frames (10-bit decimal precision)

Value range: [0x400, 0xFFFFFFFF]

isp_d_gain

Current ISP digital gain (10-bit decimal precision)

Value range: [0x400, 0xFFFFFFFF]

exposure

Current exposure, which is equal to the exposure time multiplied by the exposure gain. The unit of the exposure time is μs.

Value range: [0x0, 0xFFFFFFFF]

exposure_is_max

0: The ISP does not reach the maximum exposure performance.

1: The ISP reaches the maximum exposure performance.

hist_error

Statistics, indicating the difference between the target AE luminance and the actual luminance. If it is a positive value, the target luminance is greater than the actual luminance; if it is a negative value, the target luminance is less than the actual luminance.

Value range: [-0x8000, 0x7FFF]

ae_hist1024_value [HI_ISP_HIST_NUM]

Global 1024-segment histogram

Value range: [0x0, 0xFFFFFFFF]

#define HI_ISP_HIST_NUM  1024

ave_lum

Average luminance

Value range: [0x0, 0xFF]

lines_per500ms

Number of exposure lines within every 500 ms. This member is used for converting the exposure time in the unit of μs into that in the unit of line.

Value range: [0x0, 0xFFFFFFFF]

piris_fno

Equivalent gain corresponding to the current f-number of the P iris

Value range: [0x0, 0x400]

fps

Actual image frame rate x 100

Value range: [0x0, 0xFFFFFFFF]

iso

The value is calculated as follows: ISO = Sensor analog gain x Sensor digital gain x ISP digital gain x 100. The gain precision is 10 bits.

Value range: [0x64, 0xFFFFFFFF]

isosf

The value is calculated as follows: ISOSF = Current sensor analog gain for short frames x Current sensor digital gain for short frames x ISP digital gain for short frames x 100. The gain precision is 10 bits.

Value range: [0x64, 0xFFFFFFFF]

iso_calibrate

Standard ISO, which is used for displaying the DCF information required for photographing iso_calibrate = iso x 256/iso_cal_coef

Value range: [0x0, 0xFFFFFFFF]

ref_exp_ratio

Reference exposure ratio, which is used to estimate the dynamic range of the current scenario. The value is affected by the values such as tolerance and speed in hi_isp_wdr_exposure_attr.

Value range: [0x40, 0x4000]

wdr_exp_coef

Exposure coefficient adjusted based on the original target luminance value. This member is valid only when advance_ae is enabled. A smaller value indicates lower overall luminance of the image. The target AE luminance is (compensation x wdr_exp_coef/1024).

Value range: [0x0, 0x400]

quick_star_iso

Approximate ISO value calculated by the AE algorithm in the current luminance after no-light-sensor quick convergence. You can determine whether to enable IR-cut and IR LED based on the ISO value.

Value range: [0x64, 0xFFFFFFFF]

first_stable_time

First time when AE convergence is stable (in μs)

Value range: [0x0, 0xFFFFFFFF]

ae_route

AE route that takes effect. The unit of exposure time of each node is µs. The gain precision is 10 bits. The iris value range is [HI_ISP_IRIS_F_NO_32_0, HI_ISP_IRIS_F_NO_1_0]. When the iris is DC-Iris, the node iris value does not affect the exposure allocation.

ae_route_ex

Extended AE route that takes effect. The unit of exposure time of each node is µs. The gain precision is 10 bits. The iris value range is [HI_ISP_IRIS_F_NO_32_0, HI_ISP_IRIS_F_NO_1_0]. When the iris is DC-Iris, the node iris value does not affect the exposure allocation.

ae_route_sf

AE route for short frames that takes effect. The unit of exposure time of each node is µs. The gain precision is 10 bits. The iris value range is [HI_ISP_IRIS_F_NO_32_0, HI_ISP_IRIS_F_NO_1_0]. When the iris is DC-Iris, the node iris value does not affect the exposure allocation.

ae_route_sf_ex

Extended AE route for short frames that takes effect. The unit of exposure time of each node is µs. The gain precision is 10 bits. The iris value range is [HI_ISP_IRIS_F_NO_32_0, HI_ISP_IRIS_F_NO_1_0]. When the iris is DC-Iris, the node iris value does not affect the exposure allocation.

Restrictions

  • The iris status is not considered during exposure calculation. The exposure is the product of the exposure time, sensor analog gain, sensor digital gain, and ISP digital gain. The exposure time is in the unit of exposure line, and the exposure gain is in 6-bit decimal precision. If the gain precision does not meet requirements, you can recalculate an exposure based on the high-precision exposure time (µs) and gain (10-bit decimal precision).
  • The iris status is not taken into account for checking whether the ISP reaches the maximum exposure performance. If the current exposure time is greater than or equal to the maximum target exposure time and the current gain is greater than or equal to the maximum target gain, the ISP is considered to reach the maximum exposure performance. Otherwise, the ISP does not reach the maximum exposure performance.
  • The average image luminance is normalized, and the value range is 0 to 255.
  • fps is used for querying the actual frame rate during automatic frame rate reduction.
  • iso and ref_exp_ratio can serve as the reference when the mode is switched from FSWDR mode to long frame mode. Note that if iso is used as the reference, the effect of the exposure ratio on the switching threshold should be considered to avoid frequent switchover between the long frame mode and the normal WDR mode. If ref_exp_ratio is used as the reference, overexposure may occur in the bight region in long frame mode and ref_exp_ratio cannot correctly represent the dynamic scenario range. In this case, the judgment of switching the long frame mode back to the normal WDR mode is affected. In linear mode, the value of ref_exp_ratio can be used as the reference for the dynamic range of the scenario. The narrower the dynamic range of the scenario, the smaller the value of ref_exp_ratio, and vice versa.
  • In linear mode, the default values of a_gain_sf, d_gain_sf, and isosf are 1024, 1024, and 100, respectively. However, when another mode is switched to the linear mode, the values configured last time are retained.
  • When the gains for long frames and short frames are separately configured, the results of iso and isosf include the WDRGain value of the corresponding frame.
  • In WDR mode, when long frames take the priority, exposure_is_max indicates whether the exposure of a long frame reaches the maximum value. When short frames take the priority, exposure_is_max indicates whether the exposure of a short frame reaches the maximum value.