acldvppPngDecodeAsync

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

Decodes a PNG image. This API is asynchronous.

Function

Input formats:

Output Format

Set the output format to PIXEL_FORMAT_UNKNOWN.

That is, the output image has the same format as the input image.

RGB/GRAY

RGB

Set the output format to PIXEL_FORMAT_UNKNOWN.

That is, the output image has the same format as the input image.

RGBA/AGRAY

RGBA

Set the output format to PIXEL_FORMAT_RGB_888. That is, the input image is converted to a specified format for output.

RGB/RGBA/GRAY/AGRAY

RGB

Prototype

1
2
3
4
5
aclError acldvppPngDecodeAsync(acldvppChannelDesc *channelDesc,
const void *data,
uint32_t size,
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.

data

Input

Pointer to the input buffer address.

size

Input

Actual size of the input image, in bytes.

outputDesc

Input/Output

Pointer to the output image description.

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

When outputDesc is an output, the user can obtain the decode output from memory.

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.

See Also

For details about the API call sequence and examples, see PNGD.