To implement the JPEGE function, the API call requirements differ depending on actual type of APIs (acldvpp/hi_mpi APIs). The main difference is as follows: To use the APIs prefixed with acldvpp, pass the output buffer address each time when a frame of the image is encoded, and obtain the encode result the output buffer after the frame is encoded through stream synchronization. To use the APIs prefixed with hi_mpi, obtain the encode result asynchronously using the hi_mpi_venc_get_stream API all in a new thread.