Re: Performance issue with HD Video cam

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

 



Hi Sarah,

On Tuesday 09 August 2011 00:18:02 Sarah Sharp wrote:
> On Tue, Aug 02, 2011 at 01:44:54AM +0200, Laurent Pinchart wrote:
> > On Monday 01 August 2011 18:57:14 Sebastian Andrzej Siewior wrote:
> > > * Laurent Pinchart | 2011-08-01 16:04:55 [+0200]:
> > > >> IIUC, there's no way to avoid copying the data since it has to
> > > >> processed before getting sent to userspace.
> > > > 
> > > > Every UVC packet starts with a header that needs to be removed, so we
> > > > unfortunately can't get rid of all memcpy() calls.
> > > 
> > > So we have something like that:
> > > +---------------+------------+-----------+
> > > 
> > > | hdr-to-remove | jpeg header| jpeg-data |
> > > 
> > > +---------------+------------+-----------+
> > 
> > First of all, UVC devices don't stream MJPEG only. Uncompressed video
> > formats are very common.
> 
> Would it help to have UVC use a scatter gather list for every
> isochronous frame?  Then you would just need to allocate the header to
> remove as the first sg entry, and place the jpeg header and data into
> the second sg entry, which would avoid the memory copy.  There's already
> scatter gather list support for bulk transfers, so I think it shouldn't
> be too hard to extend to isochronous transfers.

Thanks for your proposal.

Let's make it even more fun: the header size is not constant, and is specified 
by the first byte of the header. Good luck coming up with a generic solution 
for this :-)

I hope that the next video-related USB class spec will take this kind of 
issues into account.

-- 
Regards,

Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux