hi_mpi_vpc_set_chn_workspace

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

This API is called to allocate a temporary buffer. For each channel, this API can be set only once and cannot be modified later.

Due to hardware restrictions, you need to call this API to allocate a temporary buffer required for storing task process data when you execute a remapping or affine transformation task. When this API is called, the system allocates an internal temporary buffer based on the maximum width and height of the input and output images. The allocated buffer is automatically released when the channel is destroyed.

Prototype

hi_s32 hi_mpi_vpc_set_chn_workspace (hi_vpc_chn chn, hi_vpc_workspace_param *workspace_param, hi_u32 param_cnt)

Parameters

Parameter

Input/Output

Description

chn

Input

Channel ID for image processing.

Atlas A3 training products/Atlas A3 inference products: The value range of this parameter is [0, 256). The maximum number of channels is 256.

Atlas A2 training products/Atlas A2 inference products: The value range of this parameter is [0, 256). The maximum number of channels is 256.

Atlas 200I/500 A2 inference products: The value range of this parameter is [0, 128). The maximum number of channels is 128.

Atlas inference products: The value range of this parameter is [0, 256). The maximum number of channels is 256.

workspace_param

Input

Pointer to the workspace_param array.

The value of hi_vpc_workspace_param.func needs to be set based on the used remapping or affine transformation function.

If the remapping and affine transformation functions both are involved in an application, the workspace_param array can contain two elements. Set hi_vpc_workspace_param.func of the elements to REMAP and AFFINE, respectively.

param_cnt

Input

Array length, which must be the same as the length of the workspace_param array.

Returns