Re: Xvideo extension artifacts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



> >  * 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>





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux