Re: Performance issue with HD Video cam

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

 



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

is it possible that you move the jpeg header to the front and tell it
that it is larger than it reall is? Or change the data offset point to
jpeg-data if there is one. Have no clue about the data format but a lot
of file formats have something like "size of header" field or an offset
to data fields within file. So if you can alter them you would get:

+-------------+--------------+-----------+
| jpeg-header | jpeg hdr ign | jpeg-data |
+-------------+--------------+-----------+

So you could move just the header alter it somehow so userland would
skip to the correct data and you could avoid the large memcpy.

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