Function: dvpp_png_predict_dec_size

Product Support

Product

Supported

Atlas 350 Accelerator Card

x

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas training product

Atlas inference product

Atlas 200I/500 A2 inference product

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.