acldvppJpegPredictEncSize

Applicability

Product

Supported

Atlas 350 Accelerator Card

☓

Atlas A3 training product / Atlas A3 inference product

√

Atlas A2 training product / Atlas A2 inference product

√

Atlas 200I/500 A2 inference product

√

Atlas inference product

√

Atlas training product

√

Function Description

Predicts the size of the output buffer allocation required for image encoding based on the input image description and image encoding configuration.

Prototype

1
aclError acldvppJpegPredictEncSize(const acldvppPicDesc *inputDesc, const acldvppJpegeConfig *config, uint32_t *size)

Parameters

Parameter

Input/Output

Description

inputDesc

Input

Pointer to the description of input images.

Call the acldvppCreatePicDesc API to create image description, and call acldvppSetPicDesc series APIs to set image description parameters (such as the image format, width, and height).

config

Input

Pointer to the image encoding configuration.

Call acldvppCreateJpegeConfig to create an image encoding configuration.

size

Output

Pointer to the predicted allocation in bytes for the output image.

The estimated output memory is greater than the actual output memory. The actual output memory needs to be obtained from the output parameter size of the acldvppJpegEncodeAsync API.

Returns

0 on success; otherwise, failure. For details, see aclError.

See Also

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