acldvppVpcConvertColorAsync

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.

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.

Restrictions

For the supported input and output image formats, see Restrictions on Image Formats, Width and Height Alignment, and Buffers. When the input image format is YUV400, the output image format must be the same.

Prototype

aclError acldvppVpcConvertColorAsync(acldvppChannelDesc *channelDesc,

acldvppPicDesc *inputDesc,

acldvppPicDesc *outputDesc,

aclrtStream stream)

Parameters

Parameter

Input/Output

Description

channelDesc

Input

Pointer to channel description.

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

inputDesc

Input

Pointer to the input image description.

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

    The input image size must be in the range of [10 x 6, 4096 x 4096].

outputDesc

Input/Output

Pointer to the output image description.

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

  • Call acldvppCreatePicDesc to create an 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, 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 Table 4.

    • The width stride and height stride of the output image must meet the alignment requirements, which vary with the image format. For details, see Table 4.

stream

Input

Stream.

Returns

0 on successful task delivery; else, failure.

See Also

For the API call example, see Format Conversion.