Function: dvpp_jpeg_predict_dec_size

Applicability

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 size of the output buffer allocation required for JPEG decoding based on the JPEG input buffer.

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)
    

Parameters

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

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 examples, see JPEGD.