hi_mpi_isp_set_piris_attr

Description

Sets the AI control attribute of the P-Iris.

Prototype

hi_s32 hi_mpi_isp_set_piris_attr(hi_vi_pipe vi_pipe, const hi_isp_piris_attr *piris_attr)

Constraints

  • The AI control attribute of the P-Iris contains a write-only parameter step_fno_table_change. You are advised to assign a value to it and set the MPI before obtaining it. Otherwise, an error may occur.
  • The P-Iris is controlled by using the AE allocation route. To ensure that the P-Iris works properly, you need to correctly set the lens parameters and AE allocation route for P-Iris connection. For details, see hi_isp_piris_attr and hi_mpi_isp_set_ae_route_attr. The driving mode may differ according to the specifications of the P-Iris. You can modify the P-Iris driving mode to adapt to different lenses.

    If the AI function is disabled, the P-Iris will be opened to the maximum iris target value, which corresponds to the position of the stepper motor.

Parameters

Parameter

Input/Output

Description

vi_pipe

Input

VI pipe ID

Value range: [0, 8)

piris_attr

Input

Pointer to the AI control attribute of the P-Iris

Returns

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

Example

hi_vi_pipe vi_pipe = 0;     
hi_isp_piris_attr  piris_attr, piris_attr_def;     
hi_u16 total_step_def = 93;     
hi_u16 step_count_def = 62;     
hi_u16 step_fno_table_def[1024] =
{30,35,40,45,50,56,61,67,73,79,85,92,98,105,112,120,127,135,143,150,158,166,174,183,191,200,20 8,217,225,234,243,252,261,270,279,289,298,307,316,325,335,344,353,362,372,381,390,399,408,41
7,426,435,444,453,462,470,478,486,493,500,506,512};     
hi_isp_iris_f_no  max_iris_fno_target_def = 9;     
hi_isp_iris_f_no  min_iris_fno_target_def = 5;     
piris_attr_def.step_fno_table_change= HI_TRUE;     
piris_attr_def.zero_is_max= HI_TRUE;    
piris_attr_def.step_count= step_count_def;     
piris_attr_def.total_step= total_step_def;     
piris_attr_def.max_iris_fno_target = max_iris_fno_target_def;     
piris_attr_def.min_iris_fno_target = min_iris_fno_target_def;     
memcpy(piris_attr_def.step_fno_table, step_fno_table_def, sizeof(piris_attr_def.step_fno_table));
hi_mpi_isp_set_piris_attr(vi_pipe, &piris_attr_def); 
hi_mpi_isp_get_piris_attr(vi_pipe, &piris_attr);