Decodes PNG images. This API is asynchronous.
Function |
Input Format |
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 |
aclError acldvppPngDecodeAsync(acldvppChannelDesc *channelDesc,
const void *data,
uint32_t size,
acldvppPicDesc *outputDesc,
aclrtStream stream)
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 description. 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. |
0 on successful task delivery; else, failure.
For details about the API call sequence and example, see PNGD.