acldvppJpegPredictEncSize

Applicability

Product

Supported

Atlas A3 training products / Atlas A3 inference products

Atlas A2 training products / Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

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

Prototype

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

Parameters

Parameter

Input/Output

Description

inputDesc

Input

Pointer to the input image description.

Call acldvppCreatePicDesc to create an image description, and call the acldvppSetPicDesc series to set the image description (including 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 predicted size is greater than what is actually needed, which can be obtained from the size parameter returned by the acldvppJpegEncodeAsync call.

Returns

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

See Also

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