hi_mpi_isp_set_wb_attr

Description

Sets the white balance (WB) attribute.

Prototype

hi_s32 hi_mpi_isp_set_wb_attr(hi_vi_pipe vi_pipe, const hi_isp_wb_attr *wb_attr)

Constraints

  • If the WB control mode is set to automatic, the WB coefficient is automatically adjusted based on the AWB algorithm.
  • If the WB control mode is set to manual, the AWB algorithm is invalid. In this case, you must set Rgain, Ggain, and Bgain.

    The ambient color temperature and illuminance affect the distribution range of white points. When the Ascend AWB algorithm is running, the white point parameters in the AWB statistics for the Bayer domain are automatically updated based on the environment parameters. If you want to modify the AWB statistical parameters when using the Ascend AWB algorithm, you must call hi_mpi_isp_set_wb_attr to disable the automatic update function of the statistical parameters. Two frames are delayed from the time the function of automatically updating the statistical parameters is disabled to the time the ISP receives the configuration and responds to it. Therefore, after the setting, you need to wait two frames before modifying the AWB statistical parameters again.

Parameters

Parameter

Input/Output

Description

vi_pipe

Input

VI pipe ID

Value range: [0, 8)

wb_attr

Input

WB attribute

Returns

  • 0: success
  • Other values: failure. For details, see Error Codes.