aclmdlSetAIPPScfParams

The Atlas 200/300/500 Inference Product does not support this API.

The Atlas Training Series Product does not support this API.

Description

Sets resizing parameters in the dynamic AIPP scenario.

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

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