hi_isp_af_cfg
Description
Defines AF statistics configuration parameters.
Definition
typedef struct {
hi_bool af_en;
hi_u16 zone_col;
hi_u16 zone_row;
hi_isp_af_peak_mode peak_mode;
hi_isp_af_squ_mode squ_mode;
hi_isp_af_crop crop;
hi_isp_af_stats_pos stats_pos;
hi_isp_af_raw_cfg raw_cfg;
hi_isp_af_pre_filter_cfg pre_flt_cfg;
hi_u16 high_luma_threshold
} hi_isp_af_cfg;
Members
Member |
Description |
|---|---|
af_en |
AF enable. The value can be 0 or 1. |
zone_col |
Number of horizontal AF statistical blocks. The value range is [1, 17]. |
zone_row |
Number of vertical AF statistical blocks. The value range is [1, 15]. |
peak_mode |
Peak mode, determining whether the peak value of the zoned statistics is calculated. Both peak_mode and square_mode affect the zoned statistics. 0: ISP_AF_STA_NORM 1: ISP_AF_STA_PEAK |
square_mode |
Square mode, determining whether the zoned horizontal and vertical statistics are squared. Both peak_mode and square_mode affect the zoned statistics. 0:ISP_AF_STA_SUM_NORM 1:ISP_AF_STA_SUM_SQU |
crop |
Cropping configuration of the AF input image. |
stats_pos |
Position of the AF statistics, which determines whether statistics are collected in the Bayer domain or YUV domain. 0:ISP_AF_STATISTICS_AFTER_DGAIN 1:ISP_AF_STATISTICS_AFTER_DRC 2:ISP_AF_STATISTICS_AFTER_CSC |
raw_cfg |
Configuration for the AF Bayer domain. raw_cfg is mandatory if the AF module is placed in the Bayer domain. |
pre_flt_cfg |
Pre-filtering configuration for the AF module, which can remove salt-and-pepper noise noise in the image. |
high_luma_threshold |
Threshold for the statistics of AF highlight points. The value range is [0, 0xFF]. |
Restrictions
- The zoned statistics are calculated as follows:
- When peak_mode is HI_ISP_AF_STA_NORM and square_mode is HI_ISP_AF_STA_SUM_NORM, the sum of the filter output value of each pixel in zones is the zoned statistics.
- When peak_mode is HI_ISP_AF_STA_NORM and square_mode is HI_ISP_AF_STA_SUM_SQUARE, the sum of squares of the filter output value of each pixel in zones is the zoned statistics.
- When peak_mode is HI_ISP_AF_STA_PEAK and square_mode is HI_ISP_AF_STA_SUM_NORM, the sum of maximum values of filter output values of each pixel in each line in zones is the zoned statistics.
- When peak_mode is HI_ISP_AF_STA_PEAK and square_mode is HI_ISP_AF_STA_SUM_SQUARE, the sum of squares of maximum values of filter output values of each pixel in each line in zones is the zoned statistics.
- The zoned luminance statistics (y) are the sum of the luminance of each pixel in zones.
- When the ISP BE is in block division mode, the minimum number of horizontal AF statistical windows is the number of blocks specified by BlockNum (For details, see the ISP proc information.). In this case, the value range is [BlockNum, 17].