acldvppVpcConvertColorAsync

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 Description

Converts the image format. The width and height of the output image must be the same as those of the input image. This API is asynchronous.

Prototype

1
2
3
4
aclError acldvppVpcConvertColorAsync(acldvppChannelDesc *channelDesc,
acldvppPicDesc *inputDesc,
acldvppPicDesc *outputDesc,
aclrtStream stream)

Parameters

Parameter

Input/Output

Description

channelDesc

Input

Pointer to the channel description.

The value must be the same as that of channelDesc specified when the acldvppCreateChannel API is called to create a channel.

inputDesc

Input

Pointer to the input image description.

outputDesc

Input/Output

Pointer to the output image description.

When outputDesc is used an input, the user needs to:

  • Call the acldvppCreatePicDesc API to create the image description.
  • Call acldvppSetPicDesc series to set the image description (including the buffer address, buffer size, image format, and image resolution).

    You must specify the width, height, width stride, height stride, buffer address, buffer size, and format of the output image.

    • The width and height of the output image must be the same as those of the input image. Otherwise, an error is reported.

      If the width or height of the output image is set to 0, the VPC uses the width and height of the input image as those of the output image. In addition, the VPC calculates the width stride and height stride based on the alignment requirements. The alignment requirements vary depending on the image format. For details, see Restrictions on Image Formats, Width and Height Alignment, and Buffers.

    • The width stride and height stride of the output image must meet the alignment requirements. The alignment requirements vary depending on the image format. For details, see Restrictions on Image Formats, Width and Height Alignment, and Buffers..

stream

Input

Stream. For details about the type definition, see aclrtStream.

Returns

If the return value is 0, the task is successfully delivered. If the return value is not 0, the task fails to be delivered. For details, see aclError.

Restrictions

See Also

For the API call example, see Sample Code for Format Conversion.