acldvppSetBorderConfig Series

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

Sets a border configuration.

Prototype

1
2
3
4
5
6
aclError acldvppSetBorderConfigValue(acldvppBorderConfig *borderConfig, uint32_t index, double value)
aclError acldvppSetBorderConfigBorderType(acldvppBorderConfig *borderConfig, acldvppBorderType borderType)
aclError acldvppSetBorderConfigTop(acldvppBorderConfig *borderConfig, uint32_t top)
aclError acldvppSetBorderConfigBottom(acldvppBorderConfig *borderConfig, uint32_t bottom)
aclError acldvppSetBorderConfigLeft(acldvppBorderConfig *borderConfig, uint32_t left)
aclError acldvppSetBorderConfigRight(acldvppBorderConfig *borderConfig, uint32_t right)

Parameters

Parameter

Input/Output

Description

borderConfig

Output

Pointer to the border padding configuration.

Call acldvppCreateBorderConfig to create data of the acldvppBorderConfig type in advance.

index

Input

Element index of the color component array.

The value 0 indicates the R or Y component, the value 1 indicates the G or U component, the value 2 indicates the B or V component, and the value 3 is reserved.

value

Input

Pixel value of each color component to fill.

Valid only when borderType = BORDER_CONSTANT.

You can set the values of the RGB or YUV components in sequence. If both the input and output are in YUV format, the YUV component values are used. Otherwise, the RGB component values are used.

borderType

Input

Border type. For details, see acldvppBorderType.

top

Input

Length of the border in pixels at the top of the image.

bottom

Input

Length of the border in pixels at the bottom of the image.

left

Input

Length of the border in pixels at the left of the image.

right

Input

Length of the border in pixels at the right of the image.

Returns

0 on success; else, failure. For details, see aclError.