Sending Images

Ascend 310 acldvpp API

Ascend 310P hi_mpi API

What You Need to Do

Configure the input stream information:

No corresponding API. Directly pass the input image information when using the acldvppJpegDecodeAsync API.

Directly assign values to the members of the hi_vdec_stream struct when configuring the input stream parameters:

hi_vdec_stream.addr

hi_vdec_stream.len

hi_vdec_stream.end_of_stream

hi_vdec_stream.end_of_frame

hi_vdec_stream.display

Modify your code to configure the parameters of the input stream information by assigning values to the members of the hi_vdec_chn_attr struct.

Configure the output image information:

acldvppCreatePicDesc

acldvppSetPicDescData

acldvppSetPicDescSize

acldvppSetPicDescFormat

acldvppSetPicDescWidth

acldvppSetPicDescHeight

acldvppSetPicDescWidthStride

acldvppSetPicDescHeightStride

No corresponding API. Directly assign values to the members of the hi_vdec_pic_info struct when configuring the output image parameters:

hi_vdec_pic_info.vir_addr

hi_vdec_pic_info.buffer_size

hi_vdec_pic_info.pixel_format

hi_vdec_pic_info.width

hi_vdec_pic_info.height

hi_vdec_pic_info.width_stride

hi_vdec_pic_info.height_stride

Modify your code to configure the parameters of the output image information by assigning values to the members of the hi_vdec_pic_info struct.

No corresponding API. The decoder does not need to be instructed to start receiving stream data.

Notify the decoder of starting receiving stream data (the API needs to be called only once per channel):

hi_mpi_vdec_start_recv_stream

Add the hi_mpi_vdec_start_recv_stream API call in your code.

Call the API to send an image for each frame:

acldvppJpegDecodeAsync

Call the API once per frame to send the stream to be decoded:

hi_mpi_vdec_send_stream

Modify your code to send the stream using the hi_mpi_vdec_send_stream API and pass the channel ID.