acldvppJpegEncodeAsync

Description

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

Restrictions

This API is asynchronous. The API call delivers a task rather than executes a task. After this API is called, call the synchronization API (for example, aclrtSynchronizeStream) to ensure that the task is complete.

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 predict 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.

See Also

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