[gst-devel] Help needed to reduce unusually high CPU utilization in v4l2src, caused by memory copy.

Donny Viszneki donny.viszneki at gmail.com
Sun Jan 24 03:40:13 CET 2010


What device is this coming from? Do you experience this for all v4l2
video capture sources? I think thisq is probably typical of a lot of
mediocre "web cams."

On Sat, Jan 23, 2010 at 8:24 PM, Yiliang Bao <yiliangb at gmail.com> wrote:
> Hi Gibro,
>
> Thanks for the kind reply. Even I remove the memcpy in v4l2src, the overhead
> is still there. I guess the overhead is just shifted to another stage that
> consumes the data. I found the problem was with the coherent buffer used in
> the driver, since the v4l2 driver I am investigating uses the buffer queue
> defined in videobuf-dma-contig.c. After I replace the coherent buffers with
> streaming buffers, the problem goes away.
>
> One correction to my previous email. The memory should "contiguous" instead
> of "contingent"
>
> Best regards,
> Yiliang
>
> On Fri, Jan 22, 2010 at 11:48 PM, Gibro Vacco <gibrovacco at gmail.com> wrote:
>>
>> Hi,
>>
>> would it ber possible to mmap the memory are from the driver so that
>> v4l2src passes that very buffer to the remaining of the pipeline?
>>
>> The only problem would be that, in case of a circular buffer in the
>> driver, each memory area will remain locked until the pipeline has
>> ended processing it.
>>
>> On Thu, Jan 21, 2010 at 12:57 AM, yiliang <yiliangb at gmail.com> wrote:
>> >
>> > Hi,
>> >
>> > I am optimizing a V4L2 driver for video capture device. In the v4l2
>> > driver,
>> > the DMA is performed based on frames using contingent memory buffers.
>> > After
>> > a frame is captured, the frame data is copied to a application buffer in
>> > v4l2src.
>> >
>> > gst_v4l2src_grab_frame()
>> >  ->     *buf = gst_buffer_copy (pool_buffer);
>> >
>> > However, the time spent on copying the buffer is very costly, about 0.01
>> > seconds, which is very large considering frame time is only 0.033
>> > seconds.
>> >
>> > I do not know whether this is the right forum. Any suggestions will be
>> > appreciated.
>> >
>> > Thanks,
>> > Yiliang
>> >
>> > --
>> > View this message in context:
>> > http://n4.nabble.com/Help-needed-to-reduce-unusually-high-CPU-utilization-in-v4l2src-caused-by-memory-copy-tp1019508p1019508.html
>> > Sent from the GStreamer-devel mailing list archive at Nabble.com.
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Throughout its 18-year history, RSA Conference consistently attracts the
>> > world's best and brightest in the field, creating opportunities for
>> > Conference
>> > attendees to learn about information security's most important issues
>> > through
>> > interactions with peers, luminaries and emerging and established
>> > companies.
>> > http://p.sf.net/sfu/rsaconf-dev2dev
>> > _______________________________________________
>> > gstreamer-devel mailing list
>> > gstreamer-devel at lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> Throughout its 18-year history, RSA Conference consistently attracts the
>> world's best and brightest in the field, creating opportunities for
>> Conference
>> attendees to learn about information security's most important issues
>> through
>> interactions with peers, luminaries and emerging and established
>> companies.
>> http://p.sf.net/sfu/rsaconf-dev2dev
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for
> Conference
> attendees to learn about information security's most important issues
> through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>



-- 
http://codebad.com/




More information about the gstreamer-devel mailing list