acldvppVpcMakeBorderAsync

Applicable Products

Product

Supported

Ascend 950PR / Ascend 950DT

x

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

x

Function

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.

Must be the same as the channelDesc argument passed to the acldvppCreateChannel call.

inputDesc

Input

Pointer to the input image information.

outputDesc

Input/Output

Pointer to the output image information.

When outputDesc is used as 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, see aclrtStream.

Returns

0 on successful task delivery; else, failure. For details, see aclError.

Restrictions

  • The input image resolution must be in the range of [10 × 6, 4096 × 4096]. For details about the restrictions on the input image format, alignment, and buffer size, see Restrictions on Image Formats, Width and Height Alignment, and Buffers.
  • For details about the restrictions on the output image resolution, format, alignment, and buffer size, see VPC Restrictions.
  • Due to restrictions on downsampling of YUV images, note the following:
    • For the YUV420SP output format, even numbers are recommended for the border lengths at the top, bottom, left, and right of the image.
    • For the YUV422SP output format, even numbers are recommended for the border lengths at the left and right of the image.