[Ffmpeg-devel] Patch for testing: remove a memcpy() in v4l2.c

Michael Niedermayer michaelni
Tue Feb 13 21:53:20 CET 2007


On Tue, Feb 13, 2007 at 02:44:27PM +0100, Luca Abeni wrote:
> Hi all,
> when reading a frame from the video device, v4l2.c currently allocates a
> buffer and copies the frame into it.
> The attached patch eliminates the memory copy, by directly passing the
> v4l2 buffer in the AVPacket. I tested it on some machines with bt87x
> based cards, and it seems to work without problems.
> But I'd like other people with different cards and drivers to test this
> patch, before committing it.
> A little benchmark: before applying the patch,
> time ./ffmpeg -y -v 0 -vframes 1200 -s 352x288 -pix_fmt yuv420p -f yuv4mpegpipe /dev/null &> /dev/null
> returns
> real    0m48.127s
> user    0m0.197s
> sys     0m0.137s
> after applying this patch I get
> real    0m48.127s
> user    0m0.151s
> sys     0m0.012s


apply it!!!!! (more people will test it that way ...)

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070213/e35a03ab/attachment.pgp>

More information about the ffmpeg-devel mailing list