aclmdlSetAIPPScfParams

Description

Sets resizing parameters in the dynamic AIPP scenario. This API is synchronous.

The Ascend 310 AI Processor does not support this API in the current version.

The Ascend 910 AI Processor does not support this API in the current version.

The Ascend 310P AI Processor does not support this API in the current version.

Prototype

aclError aclmdlSetAIPPScfParams(aclmdlAIPP *aippParmsSet, int8_t scfSwitch,

int32_t scfInputSizeW, int32_t scfInputSizeH,

int32_t scfOutputSizeW, int32_t scfOutputSizeH,

uint64_t batchIndex)

Restrictions

The resizing ratio is scfOutputSizeW/scfInputSizeW ∈ [1/16, 16] or scfOutputSizeH/scfInputSizeH ∈ [1/16, 16].

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.

scfSwitch

Input

Resizing enable.

  • 0: disabled. When set to 0, scfInputSizeW, scfInputSizeH, scfOutputSizeW and scfOutputSizeH are invalid.
  • 1: enabled

scfInputSizeW

Input

Source image width.

Value range: [16, 4096]

If cropping is enabled, the source image width is the same as that of the cropped image. If cropping is disabled, the source image width is the same as that of the original input.

scfInputSizeH

Input

Source image height.

Value range: [16, 4096]

If cropping is enabled, the source image height is the same as that of the cropped image. If cropping is disabled, the source image height is the same as that of the original input.

scfOutputSizeW

Input

Destination image width.

Value range: [16, 1920]

scfOutputSizeH

Input

Destination image height.

Value range: [16, 4096]

batchIndex

Input

Index of batch for image resizing.

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.