API Call Sequence

For the Ascend 310 AI Processor, this function is not supported in the current version.

For the Ascend 910 AI Processor, this function is not supported in the current version.

If PNG image decoding is involved during app development, ensure that your app contains the code logic for such image decoding. For details about the API call sequence, see API Call Sequence. For details about the PNGD functions, see PNGD.

Figure 1 API call sequence

The system supports decoding PNG images. The key APIs are described as follows:

  1. Call hi_mpi_sys_init to initialize the media data processing system.
  2. Call hi_mpi_pngd_create_chn to create a channel.
  3. Call hi_mpi_dvpp_malloc to allocate the device buffer to store the input or output data.
  4. Call hi_mpi_pngd_send_stream to send the streams to be decoded. hi_mpi_pngd_send_stream is an asynchronous API. The API call only delivers a task. You also need to call hi_mpi_pngd_get_image_data to obtain the decoding result.
  5. Call hi_mpi_dvpp_free to free the input and output buffers.
  6. Call hi_mpi_pngd_destroy_chn to destroy the channel.
  7. Call hi_mpi_sys_exit to deinitialize the media data processing system.