hi_isp_ae_stat_attr

Description

Defines the results returned by the AE algorithm library to the ISP for configuring registers.

Definition

typedef struct {
    hi_bool change;
    hi_bool hist_adjust;
    hi_u8 ae_be_sel;
    hi_u8 four_plane_mode;
    hi_u8 hist_offset_x;
    hi_u8 hist_offset_y;
    hi_u8 hist_skip_x;
    hi_u8 hist_skip_y;
    hi_bool mode_update;
    hi_u8 hist_mode;
    hi_u8 aver_mode;
    hi_u8 max_gain_mode;
    hi_bool wight_table_update;
    hi_u8 weight_table[HI_VI_MAX_PIPE_NUM][HI_ISP_AE_ZONE_ROW][HI_ISP_AE_ZONE_COLUMN];
} hi_isp_ae_stat_attr;

Members

Sub-Member

Description

change

Whether the value in this structure requires register configuration

  • HI_FALSE: disabled
  • HI_TRUE: enabled

hist_adjust

Histogram adjustment enable for the AE algorithm.

  • HI_FALSE: disabled
  • HI_TRUE: enabled

This parameter affects the settings of ae_be_sel, four_plane_mode, hist_offset_x, hist_offset_y, hist_skip_x, and hist_skip_y.

When hist_adjust is enabled, the preceding six parameters configure the chip register based on hi_isp_ae_result.

When hist_adjust is disabled, the preceding six parameters configure the chip register based on external register values (configured by the MPI).

ae_be_sel

Position of the AE statistical module of the BE in the ISP pipeline. The default value is 1. Note that the AE statistics module of the FE is fixed after WB and cannot be moved.

0: after ISP digital gain

1: after static WB

2: after DRC

four_plane_mode

FourPlaneMode enable. The default value is 0. When it is enabled, the 1024-segment histogram is the 256-segment histograms of four channels (R, Gr, Gb, B).

  • 0: disabled
  • 1: enabled

hist_skip_x

Configuration for the horizontal sampling points during histogram statistics (0: every pixel; 1: every 2nd pixel; 2: every 3rd pixel; 3: every 4th pixel; 4: every 5th pixel; 5: every 8th pixel; ≥ 6: every 9th pixel).

That is, the value 0 indicates that every pixel is sampled for statistics.

The value 1 indicates that every two pixels are sampled for statistics. This rule also applies to other cases.

This parameter can be set to 0 only when FourPlaneMode is enabled.

hist_skip_y

Configuration for the vertical sampling points during histogram statistics (0: every pixel; 1: every two pixels; 2: every three pixels; 3: every four pixels; 4: every five pixels; 5: every eight pixels; ≥ 6: every nine pixels).

hist_offset_x

Horizontal start point for histogram statistics.

0: first column

1: second column

hist_offset_y

Vertical start point for histogram statistics.

0: first row

1: second row

mode_update

Root extraction mode enable for the AE algorithm, affecting the configuration of three parameters: hist_mode, aver_mode, and max_gain_mode

If mode_update is not 0, the preceding parameters configure the logical register based on hi_isp_ae_result.

When mode_update is set to 0, the preceding three parameters configure the logical register based on the values of external registers (configured by the MPI).

hist_mode

Enabling of the root extraction mode for the global 1024-segment histogram

0: disabled

1: enabled

Only the statistics of the BE histogram are affected.

aver_mode

Enabling of the root extraction mode for the mean values

0: disabled

1: enabled

Only the statistics of the BE mean values are affected.

max_gain_mode

Enabling of the root extraction mode for the MG module

0: disabled

1: enabled

Only the statistics of the MG module are affected. To compare with the AE block statistics, you are advised to set this member to the same mode as aver_mode.

wight_table_update

Enabling the weight table for the AE algorithm, affecting the configuration of weight_table.

  • When wight_table_update is not set to 0, the values of hi_isp_ae_result are used to configure the chip register.
  • When wight_table_update is set to 0, the values of external registers (configured by the MPI) are used to configure the chip register.

weight_table[HI_ISP_AE_ZONE_ROW][HI_ISP_AE_ZONE_COLUMN]

AE weight table of 15 x 17 zones. The value range is [0, 15].

#define HI_ISP_AE_ZONE_ROW 	15
#define HI_ISP_AE_ZONE_COLUMN 	17

Restrictions

  • weight_table supports the configuration of multi-channel weights for the main channel in stitching mode. You can assign a value to the weight table of each pipe subscript corresponding to each branch channel in the main channel. In non-stitching mode, only the weight tables corresponding to the pipe subscripts take effect.
  • The AE algorithm provided by the SDK supports only the 1024-segment histogram. If four_plane_mode is enabled when the AE algorithm is used, the AE algorithm is abnormal.