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

Panagiotis Issaris takis.issaris
Thu Feb 15 16:26:03 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Michael Niedermayer schreef:
> On Tue, Feb 13, 2007 at 02:44:27PM +0100, Luca Abeni wrote:
>> 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 ...)
> 
> [...]
Ahum, I'd like to get some more people to test the ffh264 patch too... :)

With friendly regards,
Takis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF1HuK9kOxLuzz4CkRAuCaAJ4oqlRtLQQ8BuC5Fk8F3vi0WNzCjACfay9c
t8wYfhtdd3oC9VE2r6XZkIc=
=gzsW
-----END PGP SIGNATURE-----




More information about the ffmpeg-devel mailing list