If a YUV image needs to be encoded into a JPEG image during app development, ensure that your app contains the code logic for such image encoding. For details about the API call sequence, see API Call Sequence. For details about the JPEGE functions, see Functions and Restrictions.
The current system supports YUV to JPG image encoding. The key APIs are described as follows:
Before creating a channel, call acldvppCreateChannelDesc to create a channel description.
Before allocating output buffer, call acldvppJpegPredictEncSize to predict the required output allocation size based on the input image description and the image encoding configuration.
Also call aclrtSynchronizeStream to wait for the stream tasks to complete.
After destroying the channel, call acldvppDestroyChannelDesc to destroy the channel description.