acldvppVpcConvertColorAsync

Applicability

Product

Supported

Atlas A3 training products / Atlas A3 inference products

Atlas A2 training products / Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

x

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

aclError acldvppVpcConvertColorAsync(acldvppChannelDesc *channelDesc,
acldvppPicDesc *inputDesc,
acldvppPicDesc *outputDesc,
aclrtStream stream)

Parameters

Parameter

Input/Output

Description

channelDesc

Input

Pointer to the channel description.

Must be the same as the channelDesc argument passed to the acldvppCreateChannel call.

inputDesc

Input

Pointer to the input image description.

outputDesc

Input/Output

Pointer to the output image description.

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

  • Call acldvppCreatePicDesc to create an image description.
  • Call the 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, VPC uses the width and height of the input image as the width and height of the output image respectively. In addition, VPC calculates the width stride and height stride based on the alignment requirements, which vary with 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, which vary with the image format. For details, see Restrictions on Image Formats, Width and Height Alignment, and Buffers.

stream

Input

Stream.

Returns

0 on successful task delivery; else, failure. For details, see aclError.

Restrictions

See Also

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