Function: dvpp_jpeg_predict_dec_size

Applicability

Product

Supported (√/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

Function Usage

Predicts the size of the output memory allocation required for JPEG decoding based on the JPEG input memory.

Prototype

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

Parameter Description

Parameter

Description

data

Int, pointer address of the memory location that stores the JPEG image data on the host.

data_size

Int, memory size, in bytes.

format

Int, format of the decoded output image. For details, see acldvppPixelFormat.

Return Value Description

Return Value

Description

dec_size

Int, pointer address of the predicted allocation in bytes for the output after the JPEG image is decoded.

ret

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

Reference

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