hi_mpi_vpc_pyrdown
The
The
Description
Downsamples an image using a pyramid. Only YUV400 format images are supported. This API is asynchronous.
Prototype
hi_s32 hi_mpi_vpc_pyrdown(hi_vpc_chn chn, const hi_vpc_pic_info *source_pic, hi_vpc_pic_info dest_pic[], hi_u32 filter_level, hi_s8 gaussian_filter[][5], hi_u16 divisor, hi_vpc_make_border_info make_border_info, hi_u32 *task_id, hi_s32 milli_sec)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
chn |
Input |
Channel ID for image processing. |
source_pic |
Input |
Pointer to the input image information. Only YUV400 format images are supported. The allowed maximum resolution is 2048 x 2048. The allowed minimum resolution varies with filter_level as follows: If filter_level = 1, the allowed minimum resolution is 20 x 12. If filter_level = 2, the allowed minimum resolution is 40 x 24. If filter_level = 3, the allowed minimum resolution is 80 x 48. If filter_level = 4, the allowed minimum resolution is 160 x 96. |
dest_pic |
Input |
Destination image information. The array length is the same as that of the filter_level value. dest_pic[0] saves the source image to 1/2 the original size. dest_pic[1] saves the source image to 1/4 the original size. dest_pic[2] saves the source image to 1/8 the original size. dest_pic[3] saves the source image to 1/16 the original size. |
filter_level |
Input |
Number of layers in the pyramid. Must be in the range of [1, 4]. |
gaussian_filter |
Input |
Gaussian filtering parameter. If this parameter is set to a null pointer, the following default values are used: {{1, 4, 6, 4, 1}, {4, 16, 24, 16, 4}, {6, 24, 36, 24, 6}, {4, 16, 24, 16, 4}, {1, 4, 6, 4, 1}} |
divisor |
Input |
Divisor of the filter. Must be a power of 2. |
make_border_info |
Input |
Border making information. A border with a length of 2 pixels is created. The supported border types are HI_BORDER_CONSTANT, HI_BOARD_REPLICATE, and HI_BOARD_REFLECT. |
task_id |
Output |
Pointer to the task ID, used to identify a task. |
milli_sec |
Input |
Timeout interval (ms).
|
Returns
- 0: success
- Other values: failure. For details, see VPC Return Codes.