hi_isp_awb_info
Description
Defines the statistics provided by the ISP for the AWB algorithm library.
Definition
typedef struct {
hi_u32 frame_cnt;
hi_isp_awb_stat_1 *awb_stat1;
hi_isp_awb_stat_result awb_stat2;
hi_u8 awb_gain_switch;
hi_u8 awb_stat_switch;
hi_bool wb_gain_in_sensor;
hi_u32 wdr_wb_gain[HI_ISP_BAYER_CHN_NUM];
} hi_isp_awb_info;
Members
Member |
Description |
|---|---|
frame_cnt |
Accumulated frame counts Value range: [0, 0xFFFFFFFF] |
awb_stat1 |
AWB statistics 1 |
awb_stat2 |
AWB statistics 2 |
awb_gain_switch |
Position of the white balance gain in the ISP. Value range: [0, 1] 0: The white balance gain is configured in DG1 before the WDR fusion. 1: The white balance gain is configured in WB. |
awb_stat_switch |
Position of the white balance statistics module in the ISP. Value range: [0, 1, 2] 0: after DG 1: after Expander 2: after DRC |
wb_gain_in_sensor |
Whether the white balance gain is set in the sensor. Value range: [0, 1] 0: The white balance gain is set in the ISP. 1: The white balance gain is set in the sensor. |
wdr_wb_gain |
White balance gain configured in DG1 before the WDR fusion #define HI_ISP_BAYER_CHN_NUM 4 |
Restrictions
- The operation frequency (for example, once per two frames) of the AWB algorithm library can be controlled by setting frame_cnt.
- hi_isp_awb_info provides global statistics and zoned statistics. The number of horizontal/vertical zones varies according to the modes and can be calculated by using awb_zone_row and awb_zone_col of hi_isp_awb_param. Number of AWB blocks = awb_zone_row x awb_zone_col
- When the position of the white balance statistics module is changed, the 2-frame statistics will be incorrect. Therefore, you are advised to set a proper position to avoid module switching during startup. If a position change is required, you are advised to freeze the AWB algorithm for more than two frames after the change. Do not resume the calculation until the statistics are correct.
- After calling hi_mpi_isp_set_stats_cfg to configure the white balance statistics module to a position after DRC, call hi_mpi_isp_set_wb_attr to disable luminance influence on the white balance weight. This helps reduce red cast in dark regions in WDR mode.