Relationships Between Registration Functions
hi_mpi_isp_ae_lib_reg_callback and hi_mpi_isp_awb_lib_reg_callback are hook functions provided by the ISP firmware library and are used to implement registration during the development of the 3A algorithm library. For example, hi_mpi_ae_register and hi_mpi_awb_register of the 3A algorithm library have called corresponding hook functions during execution. Therefore, you can register the AE algorithm library with the ISP firmware library by calling hi_mpi_ae_register.
Similarly, the 3A algorithm library also provides hook functions for the sensor library to register with the 3A algorithm library. For example, sensor_register_callback of hook functions hi_mpi_ae_sensor_reg_callback and hi_mpi_awb_sensor_reg_callback is called in xxx_cmos.c. When developing the 3A algorithm library, you can register the sensor library with the 3A algorithm library by using hook functions.
The ISP firmware library also provides hook functions for the sensor library to register with the ISP firmware library. For example, sensor_register_callback of the hook function hi_mpi_isp_sensor_reg_callback is called in xxx_cmos.c. Therefore, you can directly call hi_mpi_ae_register, hi_mpi_awb_register, and sensor_register_callback to register the 3A algorithm library with the ISP firmware library, and the sensor library with the 3A algorithm library and ISP firmware library.
When developing 3A algorithm libraries, you need to implement hi_mpi_axx_register. In addition, you need to implement the hi_mpi_axx_sensor_reg_callback hook function and add the code for calling the hook function in sensor_register_callback. For details, see the open-source code of the ISP firmware library.