hi_isp_ctrl_param
Description
Defines the ISP control parameters.
Definition
typedef struct {
hi_u8 be_buf_num;
hi_u32 proc_param;
hi_u32 stat_interval;
hi_u32 update_pos;
hi_u32 interrupt_time_out;
hi_u32 pwm_num;
hi_u32 port_interrupt_delay;
hi_bool ldci_tpr_flt_en;
} hi_isp_ctrl_param;
Members
Member |
Description |
|---|---|
be_buf_num |
Number of ISP BE config buffers. The value range is [2, 9], and the default value is 4. |
proc_param |
Frequency of updating the ISP proc information. The default value is 30. The minimum value is 1 for proc printing takings effect, and there is no upper limit. If proc_param is set to n, the ISP proc information is updated every n frame. The value 0 indicates that the proc information is not printed. |
stat_interval |
Frequency of updating the ISP statistical information. Note that you can use stat_interval to set the frequency of updating the ISP statistical information for services with a high frame rate, such as 120 fps and above. In this way, the CPU usage of the ISP and performance consumption can be reduced. The value range is (0,0xffffffff]. |
update_pos |
Defaults to 0. Set this parameter based on the value of interrupt_pos in hi_isp_sns_regs_info.
Value range: [0, 1] |
interrupt_time_out |
Interrupt timeout period (ms) |
pwm_num |
PWM ID, used for DC-Iris control |
port_interrupt_delay |
Port interrupt delay. The default value is 0. For some sensors such as IMX323 in Half WDR mode, flicker occurs during the first several lines in sensor register configuration, which requires a delay. port_init_delay is calculated based on the VI working clock frequency. Therefore, the value is in the unit of clock frequency. For example, if the VI clock frequency is 500 MHz and the delay is 1 ms, port_init_delay is calculated as follows: port_init_delay (1ms) = 500M/1000ms = 500000 Note that port_init_delay is valid only in Half WDR mode, because the sensor configuration in other modes does not need a port interrupt. |
ldci_tpr_flt_en |
Enabling of temporal filtering for the LDCI. The default value is 0. |
Restrictions
- The default value of proc_param is 30, indicating that the ISP proc information is updated every 30 frames. To disable the ISP proc information, set proc_param to 0 by calling hi_mpi_isp_set_ctrl_param before calling hi_mpi_isp_mem_init. This step does not allocate the memory for storing the ISP proc information, and prevents from setting proc_param to a non-zero value.
- To set this parameter to a value other than 0 for the first time, you must call hi_mpi_isp_set_ctrl_param first before calling hi_mpi_isp_mem_init. Because the memory stores the proc information needs to be allocated first. After the setting, the value of this parameter can be dynamically switched only between values other than 0.
- Frequently updating the ISP proc information consumes many CPU resources. You are advised to update the proc information once every 30 frames or enable the update function only during debugging.
- You must set update_pos, pwm_num, port_interrupt_delay, ldci_tpr_flt_en, and be_buf_num in any sequence by calling hi_mpi_isp_set_ctrl_param before calling hi_mpi_isp_mem_init. After hi_mpi_isp_mem_init is called, the values of the five parameters cannot be changed.
- The values of proc_param, stat_interval, and interrupt_time_out can be dynamically changed by calling hi_mpi_isp_set_ctrl_param.
- The ISP control parameters cannot be set when the .ko drivers are loaded.
- In offline mode, the depth of the queue of VI-buffered raw data is 8. If the service volume is large and the default value of be_buf_num is used, frames may not be lost but the error message "get FreeBeBuf is fail" is displayed in the ISP. In this case, you can increase the value of be_buf_num to alleviate this problem. In addition, you can decrease the value of be_buf_num in scenarios where the service volume is not heavy and the memory usage is high.