Function: dvpp_jpeg_predict_dec_size

C Prototype

aclError acldvppJpegPredictDecSize(const void *data, uint32_t dataSize, acldvppPixelFormat outputPixelFormat, uint32_t *decSize)

Python Function

dec_size, ret = acl.media.dvpp_jpeg_predict_dec_size(data, data_size, format)

Function Usage

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

Input Description

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

data_size: int, buffer size, in bytes.

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

Return Value

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

ret: int, error code.

Reference

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