hi_stiching_ipm_param

Description

Defines the distortion correction parameters.

Prototype

typedef struct {
    hi_u32 src_pic_width;
    hi_u32 src_pic_height;
    hi_u32 dest_pic_width;
    hi_u32 dest_pic_height;
    union{
	   hi_u32 ipm_table_len;
	   hi_u32 lut_table_len;
    }
    union{
	     hi_stiching_ipm_table *ipm_table_address;
	     void *lut_table_address;
    }
} hi_stiching_ipm_param;

Members

Member

Description

src_pic_width

Width of the input image.

The widths of the four input images must be the same.

src_pic_height

Height of the input image.

The heights of the four input images must be the same.

dest_pic_width

Width of the output image.

dest_pic_height

Height of the output image.

ipm_table_len or lut_table_len

  • If hi_roundview_stitching_param.stitch_table_type is set to 0 (indicating a stitching table of the hi_stiching_ipm_table type), set ipm_table_len (which indicates the array length) to dest_pic_width x dest_pic_height.
  • If hi_roundview_stitching_param.stitch_table_type is set to 1 (indicating a DVPP internal stitching table), set lut_table_len (which indicates the memory size) to ALIGN_UP(dest_pic_width x 12, 128) x dest_pic_height + dest_pic_width x dest_pic_height, where ALIGN_UP(dest_pic_width x 12, 128) indicates the value of dest_pic_width x 12 after 128-byte alignment.

ipm_table_address or lut_table_address

  • If hi_roundview_stitching_param.stitch_table_type is set to 0 (indicating a stitching table of the hi_stiching_ipm_table type), set ipm_table_address.

    You need to allocate memory in advance to store the stitching table data. Memory size (in bytes) = sizeof(hi_stiching_ipm_table) x ipm_table_size.

  • If hi_roundview_stitching_param.stitch_table_type is set to 1 (indicating a DVPP internal stitching table), set lut_table_address.

    You need to allocate memory in advance to store the stitching table data. The memory size (in bytes) is the value of lut_table_len.

The memory size may be large. If a memory allocation API in the C standard library is directly used to allocate memory, the memory will be fragmented and the number of huge pages will be reduced. As a result, the input/output memory of each DVPP function cannot be allocated by calling hi_mpi_dvpp_malloc. Therefore, you are advised to call hi_mpi_dvpp_malloc to allocate memory for storing data of ipm_table_address or lut_table_address.