aclmdlSetAIPPPaddingParams

Description

Sets padding parameters in the dynamic AIPP scenario.

Prototype

aclError aclmdlSetAIPPPaddingParams(aclmdlAIPP *aippParmsSet, int8_t paddingSwitch,

int32_t paddingSizeTop, int32_t paddingSizeBottom,

int32_t paddingSizeLeft, int32_t paddingSizeRight,

uint64_t batchIndex)

Restrictions

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

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 enable.

  • 0: disabled. When 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

The value 0 indicates success, and other values indicate failure. For details, see aclError.