Ascend 310 acldvpp or aclvenc API |
Ascend 310P hi_mpi API |
What You Need to Do |
|---|---|---|
Configure the input video frame information: acldvppSetPicDescData acldvppSetPicDescSize acldvppSetPicDescFormat acldvppSetPicDescWidth acldvppSetPicDescHeight acldvppSetPicDescWidthStride acldvppSetPicDescHeightStride |
No corresponding API. When configuring the input video frames, directly assign values to the members of the hi_video_frame_info struct: hi_video_frame_info.v_frame.virt_addr hi_video_frame_info.v_frame.pixel_format hi_video_frame_info.v_frame.width hi_video_frame_info.v_frame.height hi_video_frame_info.v_frame.width_stride hi_video_frame_info.v_frame.height_stride |
Modify your code to configure the parameters of the input video frames by assigning values to the members of the hi_video_frame_info struct. You do not need to set the size of the input data when using hi_mpi APIs as the system automatically calculates the size of the input data based on the image resolution and format. |
No corresponding API. The encoder does not need to be instructed to start receiving data frames to be encoded. |
Notify the encoder of starting receiving data frames to be encoded (the API needs to be called only once per channel): hi_mpi_venc_start_chn |
Add the hi_mpi_venc_start_chn API call in your code. |
Send video frames to be encoded by using the API call for each frame: aclvencSendFrame |
Send video frames to be encoded by using the API call for each frame: hi_mpi_venc_send_frame |
Modify your code to send video frames to be encoded by using hi_mpi_venc_send_frame and pass the channel ID. |