Hi Robert, On Wednesday 02 March 2011 15:08:49 Robert Lukassen wrote: > Hi, > > I have a request to add support for a particular pixel-format (RGB565) to > the list of recognized formats in UVC. This format is known in video for > linux, but UVC does not list it. > > Here are the (rather minimal) patches with respect to the latest version of > the UVC driver as used in Ubuntu 10.04 (kernel 2.6.32-28):
Thanks for the patch. > diff -uN /usr/src/linux-source-2.6.32/drivers/media/video/uvc/uvc_driver.c > uvc-new/uvc_driver.c > --- > /usr/src/linux-source-2.6.32/drivers/media/video/uvc/uvc_driver.c 2009-12- > 03 04:51:21.000000000 +0100 > +++ uvc-new/uvc_driver.c 2011-03-02 14:54:36.000000000 +0100 > @@ -92,6 +92,11 @@ > .guid = UVC_GUID_FORMAT_BY8, > .fcc = V4L2_PIX_FMT_SBGGR8, > }, > + { > + .name = "RGB565", > + .guid = UVC_GUID_FORMAT_RGBP, > + .fcc = V4L2_PIX_FMT_RGB565, > + }, > }; > > /* > ------------------------------------------------------------------------ > diff -uN /usr/src/linux-source-2.6.32/drivers/media/video/uvc/uvcvideo.h > uvc-new/uvcvideo.h > --- > /usr/src/linux-source-2.6.32/drivers/media/video/uvc/uvcvideo.h > 2009-12-03 > 04:51:21.000000000 +0100 > +++ uvc-new/uvcvideo.h 2011-03-02 14:55:14.000000000 +0100 > @@ -130,7 +130,9 @@ > #define UVC_GUID_FORMAT_BY8 \ > { 'B', 'Y', '8', ' ', 0x00, 0x00, 0x10, 0x00, \ > 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} > - > +#define UVC_GUID_FORMAT_RGBP \ > + { 'R', 'G', 'B', 'P', 0x00, 0x00, 0x10, 0x00, \ > + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} > > /* > ------------------------------------------------------------------------ * > Driver specific constants. > > There is a product in the market that uses this pixel format, but as the > RGBP format is not supported out-of-the-box by UVC, we need to patch the > kernel driver each time we go along with a kernel upgrade. Can I ask you which product ? -- Regards, Laurent Pinchart _______________________________________________ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel