acldvppPngDecodeAsync

Applicable Products

Product

Supported

Ascend 950PR / Ascend 950DT

x

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

√

Function

Decodes a PNG image. This API is asynchronous.

Function

Input Image Format

Output Image 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.

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

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 information.

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

When outputDesc is used as an output, the user can obtain the decoding output from the buffer address.

stream

Input

Stream. For details, see aclrtStream.

Returns

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

Reference

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