> > * If the driver has to touch the video data (which is true for many usb
> > cams because they have to uncompress the data) it doesn't work nicely.
> > Basically the driver will have to do a extra memcpy then:
> > copy_to_user(v4l2_buffer->ptr,kernelbuf,size).
>
> I doubt that this is ever an issue. Clearly, anyone who is using the same
> buffer to gather his compressed datastream *and* the uncompressed image is
> nuts :-) And of course the decompression engine pokes data right into the
> output buffer. The application is never aware of any background
> decompression.
If the application mmap()s video buffer, the usb driver (probably) will:
(1) vmalloc() a memory block as output buffer, remap this to userspace
so the application can see it.
If you get passed in a userspace pointer you should write to, you can:
(2) vmalloc() a temporary buffer for the uncompressed image, then
copy_to_user().
(3) pass the userspace pointer to the decompression function and
make it writing the data directly to userland with put_user().
I'd expect both (2)+(3) being slower that (1) ...
Gerd
--
#include </dev/tty>
_______________________________________________
Video4linux-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/video4linux-list