acldvppPngPredictDecSize

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

Predicts the output buffer allocation required for PNG decoding based on the buffer of the input PNG image.

Prototype

1
2
3
4
aclError acldvppPngPredictDecSize(const void *data,
uint32_t dataSize,
acldvppPixelFormat outputPixelFormat,
uint32_t *decSize)

Parameters

Parameter

Input/Output

Description

data

Input

Pointer to the address of the buffer that stores the PNG image.

dataSize

Input

Buffer size in bytes.

outputPixelFormat

Input

Format of the decoded output image. For details, see acldvppPixelFormat. The following formats are supported:

  • PIXEL_FORMAT_UNKNOWN: the format that requires the maximum allocation.
  • PIXEL_FORMAT_RGB_888
  • PIXEL_FORMAT_RGBA_8888

decSize

Output

Pointer to the size of the output buffer for the decoded PNG image, in bytes.

Returns

0 on success; else, failure. For details, see aclError.

Reference

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