hi_mpi_sys_get_image_align_info
The Ascend 310 AI Processor does not support this API.
The Ascend 910 AI Processor does not support this API.
Description
Calculates the aligned width and height and the buffer size for storing image data based on the module and image width and height.
Restrictions
- The width and height of the image cannot be less than the minimum width and height or exceed the maximum width and height of the module. The image format must be supported by the module.
- For details about the image formats and alignment requirements supported by each module, see the restrictions in VPC, VDEC/JPEGD, VENC/JPEGE, and PNGD.
The HI_PIXEL_FORMAT_UNKNOWN image format is not supported.
Prototype
hi_s32 hi_mpi_sys_get_image_align_info(const hi_module_type mod_type[], const hi_u32 mod_num, const hi_img_base_info *img_base_info, hi_img_align_info *img_align_info)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
mod_type |
Input |
Module type array. If the array contains only one module, the system calculates the alignment value of the module. If the array contains multiple modules, the system calculates the maximum alignment value of the modules. If the module type is set to HI_MOD_ALL, the system selects the maximum alignment value from all modules for calculation. This simplifies the understanding of the alignment differences between modules and is easy to operate, but may occupy a large amount of buffer. |
mod_num |
Input |
Length of the module type array. |
img_base_info |
Input |
Image basic information structure. |
img_align_info |
Output |
Structure of image alignment information and buffer size. |
Returns
- 0: success
- Other values: failure. For details, see Common Return Codes.