aclmdlSetAIPPPaddingParams

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 Usage

Sets padding parameters in the dynamic AIPP scenario.

Prototype

1
2
3
4
aclError aclmdlSetAIPPPaddingParams(aclmdlAIPP *aippParmsSet, int8_t paddingSwitch,
int32_t paddingSizeTop, int32_t paddingSizeBottom,
int32_t paddingSizeLeft, int32_t paddingSizeRight,
uint64_t batchIndex)

Parameters

Parameter

Input/Output

Description

aippParmsSet

Output

Pointer to the dynamic AIPP parameter object

Call aclmdlCreateAIPP in advance to create data of the aclmdlAIPP type.

paddingSwitch

Input

Padding switch

  • 0: disabled. When this parameter is set to 0, paddingSizeTop, paddingSizeBottom, paddingSizeLeft, and paddingSizeRight are invalid.
  • 1: enabled

paddingSizeTop

Input

Top padding size

Value range: [0, 32]

paddingSizeBottom

Input

Bottom padding size

Value range: [0, 32]

paddingSizeLeft

Input

Left padding size

Value range: [0, 32]

paddingSizeRight

Input

Right padding size

Value range: [0, 32]

batchIndex

Input

Index of batch for image padding

Value range: [0, batchSize)

batchSize is set when data of the aclmdlAIPP type is created by the aclmdlCreateAIPP call.

Returns

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

Restrictions

The padded width must be less than or equal to 1080 pixels.