acldvppVpcMakeBorderAsync

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Function Description

Creates a border around an image (also referred to as padding). This API is asynchronous.

Prototype

1
2
3
4
5
aclError acldvppVpcMakeBorderAsync(const acldvppChannelDesc *channelDesc,
const acldvppPicDesc *inputDesc,
acldvppPicDesc *outputDesc,
const acldvppBorderConfig *borderConfig,
aclrtStream stream)

Parameters

Parameter

Input/Output

Description

channelDesc

Input

Pointer to the channel description.

The value must be the same as that of channelDesc specified when the acldvppCreateChannel API is called to create a channel.

inputDesc

Input

Pointer to the input image description.

outputDesc

Input/Output

Pointer to the output image description.

When outputDesc is an input, the user needs to:

borderConfig

Input

Pointer to the border configuration.

Call acldvppCreateBorderConfig to create a border configuration.

stream

Input

Stream. For details about the type definition, see aclrtStream.

Returns

If the return value is 0, the task is successfully delivered. If the return value is not 0, the task fails to be delivered. For details, see aclError.

Restrictions

  • The input image resolution is [10 x 6, 4096 x 4096]. For details about the restrictions on the input image format, alignment, and memory, see Restrictions on Image Formats, Width and Height Alignment, and Buffers.
  • For details about the restrictions on the output image resolution, format, alignment, and memory, see Restrictions.
  • Due to restrictions on downsampling of YUV images, pay attention to the following when the output image format is YUV420SP or YUV422SP:
    • For the YUV420SP output format, it is recommended that the border lengths at the top, bottom, left, and right of the image be even numbers.
    • For the YUV422SP output format, it is recommended that the border lengths at the left and right of the image be even numbers.