Trouble slow VPU encoding while streaming

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trouble slow VPU encoding while streaming

1,269 Views
smwsmart-e
Contributor II

Hi all,

 

I have two sabresd boards of which:

  • One is set up as a sender using a gst-launch pipeline to encode a file which is 1080p30 into h.264 placed in RAM and send it out using RTP
  • Second is set up to receive stream, decode and play to HDMI

 

I'm using the 3.10.17-imx kernel compiled from Freescale's repository and have set it so that the VPU is using the higher clock rate of 352MHz. The output that I'm getting is good quality but a little slow (max framerate is 23-24fps). I believe it to be the encoding side that is slowing everything down due to the same results when sending to computer After putting a more verbose debug output on sender for gstreamer (--gst-debug=3), I've found the following occurs I believe every buffer:

 

 

INFO                  vpuenc vpuenc.c:1213:gst_vpuenc_chain: Need memcpy input buffer, performance maybe drop

 

 

Could someone let me know why this is occurring and how badly it effects performance?

I've gone into the sourcecode for the vpu element for gstreamer and found that the following is what causes the INFO output:

 

 

    if ((IS_DMABLE_BUFFER (buffer)) && (vpuenc->force_copy == FALSE)) {

      paddr = DMABLE_BUFFER_PHY_ADDR (buffer);

      vaddr = GST_BUFFER_DATA (buffer);

    } else {

      gint size = vpuenc->ispec.pad_frame_size + vpuenc->ispec.buffer_align - 1;

      GST_INFO ("Need memcpy input buffer, performance maybe drop");

      if ((frameblock =

              vpuenc_core_mem_alloc_dma_buffer (vpuenc->ispec.pad_frame_size)) == NULL) {

        GST_ERROR ("Can not create dmaable buffer for input copy");

        goto bail;

      }

      paddr = (void *) Align (frameblock->paddr, vpuenc->ispec.buffer_align);

      vaddr = (void *) Align (frameblock->vaddr, vpuenc->ispec.buffer_align);

      gst_vpuenc_copy_frame (vpuenc, buffer, vaddr);

    }

 

 

If anyone has any clue as to what causes this issue or how to fix it I'd be very grateful! The two pipelines that I'm using are attached for viewing.

 

Best Regards,

Stuart Weaver

Original Attachment has been moved to: rtp_stream_send.txt.zip

Original Attachment has been moved to: rtp_stream_receive.txt.zip

0 Kudos
5 Replies

783 Views
YixingKong
Senior Contributor IV

Smwsmart

This discussion is closed since no activity. If you still need help, please feel free to reply with an update to this discussion, or create another discussion.

Thanks,

Yixing

0 Kudos

783 Views
YixingKong
Senior Contributor IV

Smwsmart

Had your issue got resolved? If yes, we are going to close the discussion in 3 days. If you still need help, please feel free to reply with an update to this discussion.

Thanks,

Yixing

0 Kudos

783 Views
joanxie
NXP TechSupport
NXP TechSupport

you mean the performance is good if you don't use -gst-debug=3, right? did you test encoding the RTP stream without decoding? how about the performance?

0 Kudos

783 Views
Wlodek_D_
Senior Contributor II

Hello,

Thank you for your post, however please consider moving it to the right community place (e.g.i.MX Community ) to get it visible for active members.

For details please see general advice Where to post a Discussion?

Thank you for using Freescale Community. 

0 Kudos

783 Views
smwsmart-e
Contributor II

Thanks Wlodek_D,

I've Moved it over :smileyhappy:

0 Kudos