acldvppJpegEncodeAsync
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
☓ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function
Encodes a YUV image into a JPG image. This API is asynchronous.
Prototype
1 2 3 4 5 6 |
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. The value must be the same as that of channelDesc specified when the acldvppCreateChannel API is called to create a channel. |
|
inputDesc |
Input |
Pointer to the input image description.
|
|
data |
Output |
Pointer to the output memory address for storing encoded data. |
|
size |
Input/Output |
Pointer to the output buffer size, in bytes. When size is used as the input parameter, you can call the acldvppJpegPredictEncSize API in advance to estimate the output memory size. When size is used as an output parameter, it indicates the actual output buffer size, which may be different from the buffer size estimated by calling the acldvppJpegPredictEncSize API. If you need to obtain the encoded data, use the actual output buffer size. |
|
config |
Input |
Pointer to the image encoding configuration. Call the acldvppCreateJpegeConfig API to create the image encoding configuration data, and call the acldvppSetJpegeConfigLevel API to set the encoding configuration data. |
|
stream |
Input |
Returns
If the return value is 0, the task is successfully delivered. If the return value is not 0, the task fails to be delivered. For details, see aclError.