hi_mpi_isp_set_pub_attr
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
☓ |
|
|
☓ |
|
|
☓ |
|
|
√ |
|
|
☓ |
|
|
☓ |
Function Description
Sets the public attributes of the ISP library, such as the cropping resolution and frame rate.
Prototype
hi_s32 hi_mpi_isp_set_pub_attr(hi_vi_pipe vi_pipe, const hi_isp_pub_attr *pub_attr)
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
vi_pipe |
Input |
VI pipe ID. Value range: [0, 12) |
|
pub_attr |
Input |
Public attributes of the ISP. |
Returns
- 0: success
- Other values: failure. For details, see ISP Return Codes.
Restrictions
- Before calling this API, you must call the hi_mpi_isp_mem_init API to initialize the internal resources of the ISP.
- A running ISP supports the dynamic cropping of the start position of an image.
- After this API is called, the processing in the ISP library is as follows:
The ISP firmware checks whether the WDR mode, resolution, and frame rate of the image are changed. If they are not changed, the ISP firmware directly returns. Otherwise, the ISP firmware calls the callback functions pfn_cmos_set_wdr_mode and pfn_cmos_set_image_mode registered by calling the hi_mpi_isp_sensor_reg_callback API to change the sensor mode.
- If the sensor mode does not change (the return value of the callback function is -2), check whether the cropping width and height of the ISP change. If yes, the ISP firmware switches the resolution and calls the callback function pfn_cmos_sensor_init registered by using the hi_mpi_isp_sensor_reg_callback interface to reconfigure the sensor. If no, the sensor mode remains unchanged.
- If the sensor mode changes (the return value of the callback function is 0), the ISP firmware calls the callback function pfn_cmos_sensor_init registered by calling the hi_mpi_isp_sensor_reg_callback interface to reconfigure the sensor.
- You can modify the implementation of the callback function pfn_cmos_set_image_mode to adjust the sequence of switching the sensor mode. For example, if only the 5M@30 fps and 1080p@60 fps initialization sequences are provided, to run the 1080p@30 fps sensor, you can crop the 5M@30 fps sensor or reduce the frame rate of the 1080p@60 fps sensor by modifying the pfn_cmos_set_image_mode function.
- When the linear mode and frame WDR mode are switched, the return value of pfn_cmos_set_image_mode is also checked. Therefore, different image modes must be used for the linear mode and frame WDR mode to ensure successful switching.
Parent topic: ISP System Control and 3A Algorithm Registration