Hallo, Artem Baguinski hat gesagt: // Artem Baguinski wrote:
Should be doable faster - JPEG frames from your camera are decoded in some YUV format then converted to RGB (by libjpeg) - AFAIK imlib doesn't support other colourspaces then RGB. The RGB->YUV translation could be done in hardware using Xv X11 extension (e.g. pdp could do that for you). Not that I know how to wire the v2l device that provides JPEG frames into pdp. But given you've found an example - it should be copy and pastable ;-)
I already tried a bit of copy and pasting in pdp (with breaking compression-less v4l support, as it's just for me for now), but I don't really find my way around in PDP yet. Some thing I encountered: I'm not sure, where I need to do all this, probably in the pdp_v4l_bang function? Also I don't know, what kind of data pdp expects to get in the end, that is, what format should the image be in and do I need to set headers and so on. I really don't know my way around pdp yet. :(
So far I'm always getting libjpeg errors about "unknown markers" in the stream, it tries to decode...
Frank Barknecht _ ______footils.org__
I already tried a bit of copy and pasting in pdp (with breaking compression-less v4l support, as it's just for me for now), but I don't really find my way around in PDP yet. Some thing I encountered: I'm not sure, where I need to do all this, probably in the pdp_v4l_bang function? Also I don't know, what kind of data pdp expects to get in the end, that is, what format should the image be in and do I need to set headers and so on. I really don't know my way around pdp yet. :(
you can look into pdp_llconv to find out from which formats you can convert to the internal pdp format (signed 16bit yvu 4:1:1 (RIF_YVU__P411_S16)). naturally some of the conversions take longer than others, rgb being slowest.
you could of course do it in pdp_v4l_bang itself. the v4l object uses memory mapped io (i think). at least it assignes a memory portion to the driver to write the frame into - thats why you find no call a la get_frame(). thus in _bang it merely copies the frame into a packet (and converts it). if your driver supports that approach you can use pdp_v4l quite straightforward and just decompress the frame in bang - after it is written by the cam driver and before it is converted to RIF_YVU__P411_S16.
lg martin