acldvppJpegEncodeAsync

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

Encodes a YUV image into a JPG image. This API is asynchronous.

Prototype

aclError acldvppJpegEncodeAsync(acldvppChannelDesc *channelDesc,
acldvppPicDesc *inputDesc,
const void *data,
uint32_t *size,
acldvppJpegeConfig *config,
aclrtStream stream)

Parameters

Parameter

Input/Output

Description

channelDesc

Input

Pointer to the channel description.

Must be the same as the channelDesc argument passed to the acldvppCreateChannel call.

inputDesc

Input

Pointer to the description of input images.

data

Output

Pointer to the output buffer address for storing encoded data.

size

Input/Output

Pointer to the output buffer size in bytes.

When size is used as an input, call acldvppJpegPredictEncSize to estimate the output buffer size in advance.

When size is used as an output, it indicates the actual output buffer size, which may be different from that estimated by the acldvppJpegPredictEncSize call. The actual output buffer size should apply.

config

Input

Pointer to the image encoding configuration.

Call acldvppCreateJpegeConfig to create an image encoding configuration, and call acldvppSetJpegeConfigLevel to set the encoding configuration.

stream

Input

Stream.

Returns

0 on successful task delivery; else, failure. For details, see aclError.

See Also

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