AnsweredAssumed Answered

Trouble slow VPU encoding while streaming

Question asked by smwsmart-e on May 2, 2014

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:

Original Attachment has been moved to: