Function: dvpp_png_predict_dec_size

Product Support

Product

Supported

Ascend 950PR / Ascend 950DT

x

Atlas A3 training products / Atlas A3 inference products

√

Atlas A2 training products / Atlas A2 inference products

√

Atlas training products

√

Atlas inference products

√

Atlas 200I/500 A2 inference products

√

Description

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

Prototype

  • C Prototype
    1
    aclError acldvppPngPredictDecSize(const void *data,uint32_t dataSize,acldvppPixelFormat outputPixelFormat,uint32_t *decSize)
    
  • Python Function
    1
    dec_size ,ret = acl.media.dvpp_png_predict_dec_size(data, data_size, output_pixel_format)
    

Parameters

Parameter

Description

data

Int, pointer address of the buffer location that stores the PNG image data.

data_size

Int, memory size, in bytes.

output_pixel_format

Int, format of the decoded output image:

  • PIXEL_FORMAT_UNKNOWN: maximum buffer size calculated based on the PNG decoding output format.

  • PIXEL_FORMAT_RGB_888

  • PIXEL_FORMAT_RGBA_8888

Return Value

Return Value

Description

dec_size

Int, output buffer size in bytes required for the decoded PNG image.

ret

Int, error code. 0 on success; else, failure.

Reference

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