hi_mpi_isp_set_ae_route_attr
Description
Sets the AE allocation policy attributes.
Prototype
hi_s32 hi_mpi_isp_set_ae_route_attr(hi_vi_pipe vi_pipe, const hi_isp_ae_route *ae_route_attr)
Constraints
- This API is used to set the AE allocation route. The exposure calculated by the AE is allocated based on the configured route. You can also set the exposure-first , gain-first, and iris-first modes.
- The following figure shows the allocated AE route.
Figure 1 AE allocation route
Note the following limitations when allocating AE route:
- A maximum of 16 nodes are supported. Each node has the exposure time, gain, and iris components. The gain includes analog gain, digital gain, and ISP digital gain.
- The unit of the exposure time for a node is μs, and the exposure time cannot be set to 0. It cannot be too small. Otherwise, the number of actual corresponding exposure lines is 0 and exceptions may occur.
- Only the P-Iris component is used. The iris component is invalid when the DC-Iris or the manual iris is used because the DC-Iris cannot be precisely controlled. That is, when the iris type is DC-Iris, the node iris component has no effect on exposure allocation.
- The node exposure is the product of the exposure time, gain, and iris. The node exposure is monotonically increasing. To be specific, the exposure of a node is greater than or equal to that of the previous node. The exposure of the first node is the lowest, and the exposure of the last one is the highest.
- If the exposure of adjacent nodes increases, the value of a component should increase while the values of other components remain unchanged. The component with an increased value determines the allocation policy of the route. For example, if the value of the gain component increases, the allocation policy of the route is gain first.
- The nodes cannot be configured to have the same exposure.
- You can set the route based on the application scenario. The allocation route can be dynamically switched.
- The AE allocation route cannot be used to limit the maximum and minimum values of exposure parameters. If the current exposure value is not within the configured route range, that is, the exposure value exceeds the range between the first node and the last node, the exposure parameter allocation exceeds the node limit but does not exceed the limit of the parameter.
- According to the default AE allocation policy for the DC-Iris and manual iris, the exposure time is allocated first, and then the gain is allocated. According to the default AE allocation policy for the P-Iris, the iris is adjusted to the maximum size, and then the exposure time and gain are allocated in sequence. If the current exposure does not fall within the configured route range, the default allocation policy is used.
- When the DC-Iris and P-Iris are switched in online mode, the AE route is reset to the default allocation policy that matches the iris type. You can configure the AE route as required when switching the iris type.
- In 2-to-1 WDR mode, when short frames take the priority and separate gain configuration is disabled, the AE route does not take effect.
- During automatic frame rate reduction, if an AE route is set in cmos.c, the AE route in cmos.c is used after the switchover. Otherwise, the AE route that has taken effect is used. In addition, the change of the maximum exposure time is updated to the AE route.
- During the switchover between the linear mode and the WDR mode, if an AE route is configured in cmos.c, the route in cmos.c is used after the switching. Otherwise, the default AE route is used.
- During the frame rate switching or resolution switching, if the configured maximum target exposure time is greater than the maximum exposure time allowed by one frame after switching, the maximum exposure time for the allocation route is changed to the maximum exposure time allowed by one frame after switching.
- During automatic frame rate reduction, switchover between the liner mode and WDR mode, frame rate or resolution switching, priority frame switching, separate configuration and switching of gains, or when the maximum/minimum value of the exposure time or gain is limited, the actual AE route that takes effect may be different from that configured in the MPI. In this case, you can call hi_mpi_isp_query_exposure_info to obtain the actual AE route that takes effect.
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
vi_pipe |
Input |
VI pipe ID Value range: [0, 8) |
|
ae_route_attr |
Input |
Pointer to the data structure of the AE route attributes |
Returns
- 0: success
- Other values: failure. For details, see Error Codes.
Parent topic: AE Control Module