跳到主要内容

hi_isp_cmos_sensor_mode

hi_isp_cmos_alg_key

说明

定义 ISP 的各算法是否采用 cmos 中的默认配置的标志位。

定义

typedef union {
hi_u64 key;
struct {
hi_u64 bit1_drc : 1; /* [0] */
hi_u64 bit1_demosaic : 1; /* [1] */
hi_u64 bit1_pregamma : 1; /* [2] */
hi_u64 bit1_gamma : 1; /* [3] */
hi_u64 bit1_sharpen : 1; /* [4] */
hi_u64 bit1_edge_mark : 1; /* [5] */
hi_u64 bit1_hlc : 1; /* [6] */
hi_u64 bit1_ldci : 1; /* [7] */
hi_u64 bit1_dpc : 1; /* [8] */
hi_u64 bit1_lsc : 1; /* [9] */
hi_u64 bit1_ge : 1; /* [10] */
hi_u64 bit1_anti_false_color : 1; /* [11] */
hi_u64 bit1_bayer_nr : 1; /* [12] */
hi_u64 bit1_detail : 1; /* [13] */
hi_u64 bit1_ca : 1; /* [14] */
hi_u64 bit1_expander : 1; /* [15] */
hi_u64 bit1_clut : 1; /* [16] */
hi_u64 bit1_wdr : 1; /* [17] */
hi_u64 bit1_dehaze : 1; /* [18] */
hi_u64 bit1_lcac : 1; /* [19] */
hi_u64 bit1_acs : 1; /* [20] */
hi_u64 bit44_rsv : 43; /* [21:63] */
};
} hi_isp_cmos_alg_key;

成员

成员名称描述
bit1_drcdrc 模块是否采用 cmos 默认配置的标志位。
bit1_demosaicdemosaic 模块是否采用 cmos 默认配置的标志位。
bit1_pregammapregamma 模块是否采用 cmos 默认配置的标志位。
bit1_gammagamma 模块是否采用 cmos 默认配置的标志位。
bit1_sharpensharpen 模块是否采用 cmos 默认配置的标志位。
bit1_edge_markedge mark模块是否采用cmos默认配置的标志位
bit1_hlchlc模块是否采用cmos默认配置的标志位。
bit1_ldcildci 模块是否采用 cmos 默认配置的标志位。
bit1_dpcdpc 模块是否采用 cmos 默认配置的标志位。
bit1_lsclsc 模块是否采用 cmos 默认配置的标志位。
bit1_gege 模块是否采用 cmos 默认配置的标志位。
bit1_anti_false_coloranti false color 模块是否采用 cmos 默认配置的标志位。
bit1_bayer_nrbayer nr 模块是否采用 cmos 默认配置的标志位。
bit1_detaildetail enhance模块是否采用cmos默认配置的标志位
bit1_caca 模块是否采用 cmos 默认配置的标志位。
bit1_expanderexpander 模块是否采用 cmos 默认配置的标志位。 仅 sensor built-in 模式有效。
bit1_clutclut 模块是否采用 cmos 默认配置的标志位。
bit1_wdrwdr 模块是否采用 cmos 默认配置的标志位。
bit1_dehazedehaze 模块是否采用 cmos 默认配置的标志位。
bit1_lcacLocal cac 模块是否采用 cmos 默认配置的标志位。
bit1_acsacs 模块是否采用 cmos 默认配置的标志位。

注意事项

如果ISP的某个算法模块要使用cmos中的配置,要将对应的标志位置为1,否则采用的是算法内部的默认配置。

父主题: ISP系统控制及3A算法注册

hi_isp_cmos_noise_calibration

说明

定义噪声校正参数。

定义

typedef struct {
hi_u16 calibration_lut_num;
hi_float calibration_coef[HI_ISP_BAYER_CALIBTAION_MAX_NUM][HI_ISP_BAYER_CALIBRATION_PARA_NUM];
} hi_isp_cmos_noise_calibration;

成员

成员名称描述
calibration_lut_num标定序列数目。 取值范围:[0, 49]。
calibration_coef噪声标定表。 HI_ISP_BAYER_CALIBTAION_MAX_NUM用于定义标定噪声模型参数的iso档位个数的最大值,当前为50。 HI_ISP_BAYER_CALIBRATION_PARA_NUM用于定义标定噪声模型参数的最大个数,当前为16。

父主题: ISP系统控制及3A算法注册

hi_isp_cmos_sensor_max_resolution

说明

定义Sensor最大分辨率结构体。

定义

typedef struct {
hi_u32 max_width;
hi_u32 max_height;
} hi_isp_cmos_sensor_max_resolution;

成员

成员名称描述
max_width最大宽度。
max_height最大高度。

父主题: ISP系统控制及3A算法注册

hi_isp_cmos_sensor_mode

说明

定义sensor模式寄存器。

定义

typedef struct {
hi_u32 sensor_id;
hi_u8 sensor_mode;
} hi_isp_cmos_sensor_mode;

成员

成员名称描述
sensor_idSensor ID。
sensor_modeSensor自定义工作模式,不同分辨率与帧率对应不同的工作模式。

父主题: ISP系统控制及3A算法注册

hi_isp_cmos_wdr_switch_attr

说明

定义WDR切换属性。

定义

typedef struct {
hi_u32 exp_ratio[HI_ISP_EXP_RATIO_NUM];
} hi_isp_cmos_wdr_switch_attr;

成员

成员名称描述
exp_ratio曝光比期望值

注意事项

在 cmos_get_isp_default 函数里根据 WDR 模式给 exp_ratio 赋默认值,所赋值要与cmos_get_ae_default 中 AE 初始化的曝光比保持一致性:

  • 若 ae_sns_dft->man_ratio_enable 为 TRUE,exp_ratio 与 ae_sns_dft->arr_ratio的值相同;
  • 若 ae_sns_dft->man_ratio_enable 为 FALSE,exp_ratio 为 0x40。

父主题: ISP系统控制及3A算法注册

hi_isp_cmos_default

说明

定义ISP基础算法库的初始化参数结构体。

定义

typedefstruct {
hi_isp_cmos_alg_key key;
const hi_isp_cmos_drc *drc;
const hi_isp_cmos_demosaic *demosaic;
const hi_isp_cmos_pregamma *pregamma;
const hi_isp_cmos_gamma *gamma;
const hi_isp_cmos_sharpen *sharpen;
const hi_isp_cmos_edgemark *edge_mark;
const hi_isp_cmos_hlc *hlc;
const hi_isp_cmos_ldci *ldci;
const hi_isp_cmos_dpc *dpc;
const hi_isp_cmos_lsc *lsc;
const hi_isp_cmos_ge *ge;
const hi_isp_cmos_afc *anti_false_color;
const hi_isp_cmos_bayernr *bayer_nr;
const hi_isp_cmos_ca *ca;
const hi_isp_expander_attr *expander;
const hi_isp_cmos_clut *clut;
const hi_isp_cmos_wdr *wdr;
const hi_isp_cmos_dehaze *dehaze;
const hi_isp_cmos_lcac *lcac;
const hi_isp_cmos_acs *acs;
hi_isp_cmos_noise_calibration noise_calibration;
hi_isp_cmos_sensor_max_resolution sensor_max_resolution;
hi_isp_cmos_sensor_mode sensor_mode;
hi_isp_cmos_wdr_switch_attr wdr_switch_attr;
} hi_isp_cmos_default;

成员

成员名称描述
key标识各算法是否采用 cmos 中默认配置的 key。
*drcDRC结构体指针。 结构体说明请参见《ISP图像调优指南》。
*demosaicDemosaic结构体指针。 结构体说明请参见《ISP图像调优指南》。
*pregammaPreGamma结构体指针。 结构体说明请参见《ISP图像调优指南》。
*gammaGamma结构体指针。 结构体说明请参见《ISP图像调优指南》。
*sharpenSharpen结构体指针。 结构体说明请参见《ISP图像调优指南》。
*edge_markEdgeMark结构体指针。 结构体说明请参见《ISP图像调优指南》。
*hlcHLC结构体指针。 结构体说明请参见《ISP图像调优指南》。
*ldciLDCI结构体指针。 结构体说明请参见《ISP图像调优指南》。
*dpcDPC结构体指针。 结构体说明请参见《ISP图像调优指南》。
*lscLSC结构体指针。 结构体说明请参见《ISP图像调优指南》。
*geGE模块结构体指针。 结构体说明请参见《ISP图像调优指南》。
*anti_false_colorAntiFalse结构体指针。 结构体说明请参见《ISP图像调优指南》。
*bayer_nrBayerNR结构体指针。 结构体说明请参见《ISP图像调优指南》。
*caCA模块结构体指针。 结构体说明请参见《ISP图像调优指南》。
*expanderExpander结构体指针。仅Sensor built-in模式有效。 结构体说明请参见《ISP图像调优指南》。
*clutClut结构体指针。 结构体说明请参见《ISP图像调优指南》。
*wdrWDR模式结构体指针。 结构体说明请参见《ISP图像调优指南》。
*dehazeDehaze结构体指针。 结构体说明请参见《ISP图像调优指南》。
*lcacLocal cac结构体指针。 结构体说明请参见《ISP图像调优指南》。
*acsACS结构体指针。 结构体说明请参见《ISP图像调优指南》。
noise_calibrationNoise校正结构体。
sensor_max_resolutionSensor最大宽高结构体。
sensor_modeSensor模式结构体。
wdr_switch_attrWDR切换属性。

注意事项

  • ISP的各算法模块如果要采用cmos的默认配置,要在回调函数pfn_cmos_get_isp_default中将对应的标志位置1,并给该算法模块的cmos结构体指针赋值。如果cmos默认值配置的不合法,会导致算法初始化失败,同时run起来之后算法不能正常调节。

父主题: ISP系统控制及3A算法注册

hi_isp_cmos_black_level

说明

定义sensor的黑电平结构体。

定义

typedef struct {
hi_bool update;
hi_u16 black_level[HI_ISP_BAYER_CHN_NUM];
} hi_isp_cmos_black_level;

成员

成员名称描述
updateSensor的黑电平是否会动态根据增益改变。 取值范围:
- HI_TRUE:是
- HI_FALSE:否
如果sensor的黑电平不会动态根据增益改变,update配置为HI_FALSE 即可。
black_levelSensor的黑电平数组,取值范围:[0, 4095]。 HI_ISP_BAYER_CHN_NUM用于定义Bayer数据的通道数目,当前为4。

父主题: ISP系统控制及3A算法注册

在线提单